IbInfo.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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" :slot-name="'agree'">
  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. <template #agree>
  174. <view>
  175. <view class="agree" >
  176. <checkbox-group v-model="ibAgree" @change="onAgreeChange">
  177. <label class="checkbox">
  178. <checkbox value="1" />
  179. <text class="crm-cursor" style="text-decoration: underline;" @click="dialogCheckTip = true">{{
  180. t('Home.msg.Agree1') }}</text>
  181. </label>
  182. </checkbox-group>
  183. </view>
  184. </view>
  185. </template>
  186. </cwg-popup>
  187. </view>
  188. </template>
  189. <script setup lang="ts">
  190. import { computed, ref, onMounted } from 'vue'
  191. import { useI18n } from 'vue-i18n'
  192. import useUserStore from '@/stores/use-user-store'
  193. import useRouter from '@/hooks/useRouter'
  194. import useRoute from '@/hooks/useRoute'
  195. import { personalApi } from '@/service/personal'
  196. import Config from '@/config'
  197. import { customApi } from '@/service/custom'
  198. import { useStorage } from '@vueuse/core'
  199. const { Code } = Config
  200. const router = useRouter()
  201. const route = useRoute()
  202. const { userInfo,saveUserInfo } = useUserStore()
  203. const { t } = useI18n()
  204. const dialogCheckStatus = ref('')
  205. const dialogCheck = ref()
  206. const dialogApplyIb = ref()
  207. const ibStatus = ref({})
  208. const lang = useStorage('lang')
  209. const reasons = ref({})
  210. const ibAgree = ref('')
  211. const customInfo = computed(() => {
  212. return userInfo.customInfo
  213. })
  214. const confirmText = computed(() => {
  215. return ibStatus.value.status == 3 ? t('Btn.AgainApply') : t('Btn.Confirm')
  216. })
  217. const getLogin = async () => {
  218. let res = await personalApi.CustomLoginInfo()
  219. if (res.code == Code.StatusOK) {
  220. dialogCheckStatus.value = res.data.customInfo.applyRealStatus
  221. if (
  222. res.data.customInfo.status == 2 &&
  223. res.data.customInfo.applyRealStatus == 2
  224. ) {
  225. applyIbStatus()
  226. } else {
  227. // applyIbStatus()
  228. // dialogAuthCheck.value = false;
  229. // dialogCheck.value.open()
  230. }
  231. } else {
  232. uni.showToast({
  233. title: t('Msg.SystemError'),
  234. icon: 'none',
  235. })
  236. }
  237. }
  238. //获取原因列表
  239. const searchReasons = async () => {
  240. let res = await customApi.reasonsRefusalList({ type: nviewl })
  241. if (res.code == Code.StatusOK) {
  242. if (res.data == nviewl) {
  243. reasons.value = {}
  244. } else {
  245. reasons.value = res.data
  246. }
  247. } else {
  248. uni.showToast({
  249. title: res.msg,
  250. icon: 'none',
  251. })
  252. }
  253. }
  254. const closeIb = async () => {
  255. dialogApplyIb.value.close()
  256. }
  257. const onAgreeChange = async (value) => {
  258. ibAgree.value = (value?.detail?.value.length) || ''
  259. }
  260. // 确认按钮
  261. const confirmIb = async () => {
  262. const status = ibStatus.value.status
  263. if (status == 0) {
  264. applyIb()
  265. }else if (status == 1) {
  266. dialogApplyIb.value.close()
  267. }else if (status == 3) {
  268. ibStatus.value.status = 0
  269. }
  270. }
  271. const getLoginInfo = async () => {
  272. let res = await customApi.CustomLoginInfo();
  273. if (res.code == Code.StatusOK) {
  274. saveUserInfo(res.data)
  275. } else {
  276. uni.showToast({title: t('Msg.SystemError'),
  277. icon: 'none'})
  278. }
  279. }
  280. // 申请ib
  281. const applyIb = async () => {
  282. console.log(ibAgree.value)
  283. if (!ibAgree.value) {
  284. uni.showToast({title: t("Msg.Read"),icon: 'none'})
  285. return
  286. }
  287. let res = await customApi.customApplyIb()
  288. if (res.code == Code.StatusOK) {
  289. uni.showToast({title: t("Msg.Success"),icon: 'none'})
  290. getLoginInfo();
  291. dialogApplyIb.value.close()
  292. // reload();
  293. }
  294. }
  295. //判断申请ib状态
  296. const applyIbStatus = async () => {
  297. let res = await customApi.customApplyIbStatus({})
  298. if (res.code == Code.StatusOK) {
  299. ibStatus.value = res.data
  300. if (ibStatus.value.status == 0) {
  301. dialogApplyIb.value.open()
  302. } else if (ibStatus.value.status == 1) {
  303. dialogApplyIb.value.open()
  304. } else if (ibStatus.value.status == 2) {
  305. } else if (this.ibStatus.status == 3) {
  306. searchReasons()
  307. dialogApplyIb.value.open()
  308. }
  309. } else {
  310. uni.showToast({
  311. title: res.msg,
  312. icon: 'none',
  313. })
  314. }
  315. }
  316. onMounted(() => {
  317. // 进入ib相关页面时,请求
  318. if (route.path.indexOf('pages/ib/') !== -1) {
  319. getLogin()
  320. }
  321. // dialogApplyIb.value.open()
  322. })
  323. </script>
  324. <style scoped lang="scss">
  325. @import "@/uni.scss";
  326. #Agreement {
  327. p,
  328. ul,
  329. li {
  330. line-height: 1.8;
  331. font-size: 14px;
  332. padding: 2px 0;
  333. text-indent: 25px;
  334. }
  335. ul ul {
  336. box-sizing: border-box;
  337. padding-left: 25px;
  338. }
  339. .title {
  340. text-align: center;
  341. font-size: 16px;
  342. font-weight: bold;
  343. text-indent: 0;
  344. color: #EB3F57;
  345. }
  346. .p,.ul-li,.ul{
  347. line-height: 1.8;
  348. font-size: 14px;
  349. padding: 2px 0;
  350. text-indent: 25px;
  351. }
  352. .ul .ul{
  353. box-sizing: border-box;
  354. padding-left: 25px;
  355. }
  356. .tit {
  357. font-weight: bold;
  358. text-indent: 0;
  359. }
  360. }
  361. .agree {
  362. margin: px2rpx(24) 0;
  363. display: flex;
  364. align-items: flex-start;
  365. .checkbox {
  366. display: flex;
  367. align-items: flex-start;
  368. gap: px2rpx(8);
  369. :deep(uni-checkbox .uni-checkbox-input) {
  370. border-radius: px2rpx(4);
  371. width: px2rpx(18);
  372. height: px2rpx(18);
  373. }
  374. text {
  375. font-size: px2rpx(13);
  376. color: var(--color-zinc-500);
  377. line-height: 1.5;
  378. }
  379. }
  380. }
  381. </style>