IbInfo.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <view class="IbInfo">
  3. <cwg-popup ref="dialogApplyIb" type="center" :title="t('Home.msg.ibTitle')" showFooterLine
  4. :cancelText="t('Btn.Cancel')" :confirmText="confirmText" @close="closeIb" @confirm="confirmIb">
  5. <view class="dia-content" v-if="ibStatus.status == 0">
  6. <view
  7. class="content"
  8. style="height: 400px; line-height: 1.5; text-align: left"
  9. id="Agreement"
  10. >
  11. <view class="title">{{ t('CWGMarketsLtdPARTNERSAgreement.title1') }}</view>
  12. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item0') }}</view>
  13. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item01') }}</view>
  14. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item02') }}</view>
  15. <view class="ul">
  16. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item03') }}</view>
  17. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item04') }}</view>
  18. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item05') }}</view>
  19. </view>
  20. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item1') }}</view>
  21. <view class="ul">
  22. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item11') }}</view>
  23. </view>
  24. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item2') }}</view>
  25. <view class="ul">
  26. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item21') }}</view>
  27. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item22') }}</view>
  28. <view class='ul-li'>
  29. <view class="ul">
  30. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item221') }}</view>
  31. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item222') }}</view>
  32. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item223') }}</view>
  33. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item224') }}</view>
  34. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item225') }}</view>
  35. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item226') }}</view>
  36. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item227') }}</view>
  37. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item228') }}</view>
  38. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item229') }}</view>
  39. </view>
  40. </view>
  41. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item23') }}</view>
  42. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item24') }}</view>
  43. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item25') }}</view>
  44. <view class='ul-li'>
  45. <view class="ul">
  46. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item251') }}</view>
  47. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item252') }}</view>
  48. </view>
  49. </view>
  50. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item26') }}</view>
  51. </view>
  52. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item3') }}</view>
  53. <view class="ul">
  54. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item31') }}</view>
  55. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item32') }}</view>
  56. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item33') }}</view>
  57. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item34') }}</view>
  58. <view class='ul-li'>
  59. <view class="ul">
  60. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item341') }}</view>
  61. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item342') }}</view>
  62. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item343') }}</view>
  63. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item344') }}</view>
  64. </view>
  65. </view>
  66. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item35') }}</view>
  67. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item36') }}</view>
  68. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item37') }}</view>
  69. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item38') }}</view>
  70. </view>
  71. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item4') }}</view>
  72. <view class="ul">
  73. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item41') }}</view>
  74. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item42') }}</view>
  75. </view>
  76. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item5') }}</view>
  77. <view class="ul">
  78. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item51') }}</view>
  79. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item52') }}</view>
  80. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item53') }}</view>
  81. </view>
  82. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item6') }}</view>
  83. <view class="ul">
  84. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item61') }}</view>
  85. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item62') }}</view>
  86. </view>
  87. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item7') }}</view>
  88. <view class="ul">
  89. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item71') }}</view>
  90. <view class='ul-li'>
  91. <view class="ul">
  92. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item711') }}</view>
  93. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item712') }}</view>
  94. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item713') }}</view>
  95. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item714') }}</view>
  96. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item715') }}</view>
  97. </view>
  98. </view>
  99. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item72') }}</view>
  100. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item73') }}</view>
  101. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item74') }}</view>
  102. </view>
  103. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item8') }}</view>
  104. <view class="ul">
  105. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item81') }}</view>
  106. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item82') }}</view>
  107. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item83') }}</view>
  108. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item84') }}</view>
  109. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item85') }}</view>
  110. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item86') }}</view>
  111. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item87') }}</view>
  112. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item88') }}</view>
  113. <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item89') }}</view>
  114. </view>
  115. <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item9') }}</view>
  116. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item91') }}</view>
  117. <view class="title">{{ t('CWGMarketsLtdPARTNERSAgreement.title2') }}</view>
  118. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item101') }}</view>
  119. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item102') }}</view>
  120. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item103') }}</view>
  121. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item104') }}</view>
  122. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item105') }}</view>
  123. <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item106') }}</view>
  124. </view>
  125. </view>
  126. <view class="dia-content" v-if="ibStatus.status == 1">
  127. <view
  128. class="content"
  129. style="
  130. display: flex;
  131. justify-content: center;
  132. align-content: center;
  133. flex-wrap: wrap;
  134. font-size: 20px;
  135. height: 150px;
  136. "
  137. >
  138. <view style="width: 100%; margin: 15px 0; font-size: 16px">
  139. <i class="el-icon-loading" style="font-size: 32px"></i>
  140. </view>
  141. <view style="width: 100%; margin: 15px 0; font-size: 14px">
  142. <span>{{ t('ApplicationDialog.ibStatus') }}</span>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="dia-content" v-if="ibStatus.status == 3">
  147. <view
  148. class="content"
  149. style="
  150. display: flex;
  151. justify-content: center;
  152. align-content: center;
  153. flex-wrap: wrap;
  154. font-size: 14px;
  155. height: 150px;
  156. "
  157. >
  158. <view
  159. style="width: 100%; margin: 15px 0; font-weight: bold"
  160. >{{ t('ApplicationDialog.ibRefused') }}
  161. </view>
  162. <view style="width: 100%; margin: 15px 0; font-size: 14px">
  163. <span>{{ t('ApplicationDialog.ibDes') }}</span>
  164. <span v-if="reasons[ibStatus.approveDesc]">{{
  165. lang == 'cn'
  166. ? reasons[ibStatus.approveDesc].content
  167. : reasons[ibStatus.approveDesc].enContent
  168. }}</span>
  169. <span v-else>{{ ibStatus.approveDesc || '--' }}</span>
  170. </view>
  171. </view>
  172. </view>
  173. <view class="agree" slot="footer">
  174. <checkbox-group v-model="ibAgree">
  175. <label class="checkbox">
  176. <checkbox value="1" />
  177. <text class="crm-cursor" style="text-decoration: underline;" @click="dialogCheckTip = true">{{
  178. t('Home.msg.Agree1') }}</text>
  179. </label>
  180. </checkbox-group>
  181. </view>
  182. </cwg-popup>
  183. </view>
  184. </template>
  185. <script setup lang="ts">
  186. import { computed, ref, onMounted } from 'vue'
  187. import { useI18n } from 'vue-i18n'
  188. import useUserStore from '@/stores/use-user-store'
  189. import useRouter from '@/hooks/useRouter'
  190. import useRoute from '@/hooks/useRoute'
  191. import { personalApi } from '@/service/personal'
  192. import Config from '@/config'
  193. import { customApi } from '@/service/custom'
  194. import { useStorage } from '@vueuse/core'
  195. const { Code } = Config
  196. const router = useRouter()
  197. const route = useRoute()
  198. const { userInfo,saveUserInfo } = useUserStore()
  199. const { t } = useI18n()
  200. const dialogCheckStatus = ref('')
  201. const dialogCheck = ref()
  202. const dialogApplyIb = ref()
  203. const ibStatus = ref({})
  204. const lang = useStorage('lang')
  205. const reasons = ref({})
  206. const ibAgree = ref('')
  207. const customInfo = computed(() => {
  208. return userInfo.customInfo
  209. })
  210. const confirmText = computed(() => {
  211. return ibStatus.value.status == 3 ? t('Btn.AgainApply') : t('Btn.Confirm')
  212. })
  213. const getLogin = async () => {
  214. let res = await personalApi.CustomLoginInfo()
  215. if (res.code == Code.StatusOK) {
  216. dialogCheckStatus.value = res.data.customInfo.applyRealStatus
  217. if (
  218. res.data.customInfo.status == 2 &&
  219. res.data.customInfo.applyRealStatus == 2
  220. ) {
  221. applyIbStatus()
  222. } else {
  223. // applyIbStatus()
  224. // dialogAuthCheck.value = false;
  225. // dialogCheck.value.open()
  226. }
  227. } else {
  228. uni.showToast({
  229. title: t('Msg.SystemError'),
  230. icon: 'none',
  231. })
  232. }
  233. }
  234. //获取原因列表
  235. const searchReasons = async () => {
  236. let res = await customApi.reasonsRefusalList({ type: nviewl })
  237. if (res.code == Code.StatusOK) {
  238. if (res.data == nviewl) {
  239. reasons.value = {}
  240. } else {
  241. reasons.value = res.data
  242. }
  243. } else {
  244. uni.showToast({
  245. title: res.msg,
  246. icon: 'none',
  247. })
  248. }
  249. }
  250. const closeIb = async () => {
  251. dialogApplyIb.value.close()
  252. }
  253. // 确认按钮
  254. const confirmIb = async () => {
  255. const status = ibStatus.value.status
  256. if (status == 0) {
  257. applyIb()
  258. }else if (status == 1) {
  259. dialogApplyIb.value.close()
  260. }else if (status == 3) {
  261. ibStatus.value.status = 0
  262. }
  263. }
  264. const getLoginInfo = async () => {
  265. let res = await customApi.CustomLoginInfo();
  266. if (res.code == Code.StatusOK) {
  267. saveUserInfo(res.data)
  268. } else {
  269. uni.showToast({title: t('Msg.SystemError'),
  270. icon: 'none'})
  271. }
  272. }
  273. // 申请ib
  274. const applyIb = async () => {
  275. if (!ibAgree.value) {
  276. uni.showToast({title: t("Msg.Read"),icon: 'none'})
  277. return
  278. }
  279. let res = await customApi.customApplyIb()
  280. if (res.code == Code.StatusOK) {
  281. uni.showToast({title: t("Msg.Success"),icon: 'none'})
  282. getLoginInfo();
  283. reload();
  284. }
  285. }
  286. //判断申请ib状态
  287. const applyIbStatus = async () => {
  288. let res = await customApi.customApplyIbStatus({})
  289. if (res.code == Code.StatusOK) {
  290. ibStatus.value = res.data
  291. if (ibStatus.value.status == 0) {
  292. dialogApplyIb.value.open()
  293. } else if (ibStatus.value.status == 1) {
  294. dialogApplyIb.value.open()
  295. } else if (ibStatus.value.status == 2) {
  296. } else if (this.ibStatus.status == 3) {
  297. searchReasons()
  298. dialogApplyIb.value.open()
  299. }
  300. } else {
  301. uni.showToast({
  302. title: res.msg,
  303. icon: 'none',
  304. })
  305. }
  306. }
  307. onMounted(() => {
  308. getLogin()
  309. dialogApplyIb.value.open()
  310. })
  311. </script>
  312. <style scoped lang="scss">
  313. @import "@/uni.scss";
  314. #Agreement {
  315. p,
  316. ul,
  317. li {
  318. line-height: 1.8;
  319. font-size: 14px;
  320. padding: 2px 0;
  321. text-indent: 25px;
  322. }
  323. ul ul {
  324. box-sizing: border-box;
  325. padding-left: 25px;
  326. }
  327. .title {
  328. text-align: center;
  329. font-size: 16px;
  330. font-weight: bold;
  331. text-indent: 0;
  332. color: #EB3F57;
  333. }
  334. .p,.ul-li,.ul{
  335. line-height: 1.8;
  336. font-size: 14px;
  337. padding: 2px 0;
  338. text-indent: 25px;
  339. }
  340. .ul .ul{
  341. box-sizing: border-box;
  342. padding-left: 25px;
  343. }
  344. .tit {
  345. font-weight: bold;
  346. text-indent: 0;
  347. }
  348. }
  349. </style>