deposit.vue 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_customer.item2')" />
  4. <uni-loading v-if="loading" />
  5. <view class="custom-deposit-container" v-else>
  6. <view class="custom-deposit">
  7. <!-- 步骤1:选择账户 -->
  8. <view class="box">
  9. <view class="b-card">
  10. <view class="card-top">
  11. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  12. t('Custom.Deposit.Title1')
  13. }}</text>
  14. <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
  15. :placeholder="t('placeholder.choose')" />
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 步骤2:支付通道列表(卡片布局) -->
  20. <view class="box" v-if="step2">
  21. <view class="b-card">
  22. <view class="card-top">
  23. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  24. t('Custom.Deposit.Title2')
  25. }}</text>
  26. <cwg-combox :clearable="false" v-model:value="channelId" :options="channelListOptions"
  27. :placeholder="t('placeholder.choose')">
  28. </cwg-combox>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 步骤3:填写入金信息 -->
  33. <view class="box box-step3" v-if="step3">
  34. <view class="b-card">
  35. <view class="card-top">
  36. <!-- 表单(确认后显示) -->
  37. <uni-forms v-if="isStep3" ref="formRef" :model="params" :rules="rules" label-position="top"
  38. validate-trigger="submit" :label-width="300" class="base-info-form">
  39. <uni-row class="demo-uni-row uni-row1 uni-row2">
  40. </uni-row>
  41. <!-- 信用卡选择区域 -->
  42. <template v-if="isStep3 && channelData.confirmCreditCard == 1">
  43. <view>
  44. <view
  45. style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
  46. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  47. t('PersonalManagement.Label.selectCreditCard') }}</text>
  48. <view class="add-back">
  49. <text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
  50. <text class="add-btn crm-cursor" @click="openAddBankCard">{{
  51. t('Custom.Withdraw.addBank1') }}</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view>
  56. <uni-forms-item>
  57. <cwg-combox :clearable="false" v-model:value="myId"
  58. :options="creditCardOptions" :placeholder="t('placeholder.choose')"
  59. @change="selectCode" />
  60. </uni-forms-item>
  61. </view>
  62. </template>
  63. <!-- 银行选择(如有) -->
  64. <template v-if="isStep3 && bankOptions.length">
  65. <view>
  66. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  67. t('news_add_field.Label.Title4')
  68. }}</text>
  69. </view>
  70. <view>
  71. <uni-forms-item>
  72. <cwg-combox :clearable="false" v-model:value="code" :options="bankOptions"
  73. :placeholder="t('placeholder.choose')" @change="selectCode" />
  74. </uni-forms-item>
  75. </view>
  76. </template>
  77. <!-- 特别提示(B2BINPAY) -->
  78. <view v-if="isStep3 && bankOptions.length && channelData.code == 'B2BINPAY'">
  79. <text class="tit" style="margin: 10px 0 20px"><text class="iconfont iconi"></text>{{
  80. t('Custom.Deposit.Des') }}</text>
  81. </view>
  82. <!-- 电汇信息展示 -->
  83. <template
  84. v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
  85. <view>
  86. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  87. t('Custom.Deposit.Title5') }}</text>
  88. </view>
  89. <view>
  90. <view class="wire-transfer-account">
  91. <view class="row"><text class="label SpecialColor">{{
  92. t('Custom.Deposit.bankUname') }}</text><text
  93. class="content SpecialColor">{{
  94. WireTransferAccount.bankUname || '--'
  95. }}</text></view>
  96. <view class="row"><text class="label">{{ t('Custom.Deposit.bankName')
  97. }}</text><text class="content">{{ WireTransferAccount.bankName
  98. ||
  99. '--'
  100. }}</text></view>
  101. <view class="row"><text class="label SpecialColor">{{
  102. t('Custom.Deposit.bankCardNum') }}</text><text
  103. class="content SpecialColor">{{
  104. WireTransferAccount.bankCardNum || '--'
  105. }}</text></view>
  106. <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr')
  107. }}</text><text class="content">{{ WireTransferAccount.bankAddr
  108. ||
  109. '--'
  110. }}</text></view>
  111. <view class="row"><text class="label SpecialColor">{{
  112. t('Custom.Deposit.swiftCode') }}</text><text
  113. class="content SpecialColor">{{
  114. WireTransferAccount.swiftCode || '--'
  115. }}</text></view>
  116. <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode')
  117. }}</text><text class="content">{{ WireTransferAccount.bankCode
  118. ||
  119. '--'
  120. }}</text></view>
  121. <view class="row"><text class="label SpecialColor">{{
  122. t('Custom.Recording.Note')
  123. }}</text><text class="content SpecialColor">{{
  124. WireTransferAccount.bankMsg || '--' }}</text></view>
  125. </view>
  126. </view>
  127. </template>
  128. <!-- 数字货币信息展示 -->
  129. <template
  130. v-if="isStep3 && channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0">
  131. <view>
  132. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  133. t('Custom.Deposit.DigitalAcc') }}</text>
  134. </view>
  135. <view>
  136. <view class="wire-transfer-account">
  137. <view class="row"><text class="label SpecialColor">{{
  138. t('Custom.Deposit.DigitalName') }}</text><text
  139. class="content SpecialColor">{{ WireTransferAccount.name
  140. + '-' +
  141. WireTransferAccount.type }}</text></view>
  142. <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6')
  143. }}</text><text class="content">{{ WireTransferAccount.address ||
  144. '--'
  145. }}</text></view>
  146. <view class="row"><text class="label">QR Code</text>
  147. <image :src="Host05 + WireTransferAccount.url" mode="aspectFit"
  148. style="width: 100rpx; height: 100rpx;" />
  149. </view>
  150. </view>
  151. </view>
  152. </template>
  153. <!-- 表单区域(含金额、预估金额、上传凭证、优惠码) -->
  154. <template v-if="isStep3">
  155. <view>
  156. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  157. t('Custom.Deposit.Title3') }}</text>
  158. </view>
  159. <view v-loading="pictLoadingImg">
  160. <!-- 金额输入 -->
  161. <view class="amount-box">
  162. <uni-forms-item
  163. :label="t('Custom.Deposit.Title3') + '(' + channelData.currency + ')'"
  164. name="amount" :error-message="amountErrorMessage" class="amount-input">
  165. <uni-easyinput type="number" v-model="params.amount"
  166. :placeholder="t('placeholder.input')" @blur="validateAmount" />
  167. </uni-forms-item>
  168. <!-- <view class="btn" v-t="'State.All'" @click="setAllAmount"></view> -->
  169. </view>
  170. <!-- 预估金额(若有汇率) -->
  171. <view v-if="channelData.rate">
  172. <uni-forms-item>
  173. <template #label>
  174. <view class="label-with-icon">
  175. <text>{{ t('Custom.Deposit.EstimatedAmount') + '(' +
  176. channelData.transformCurrency + ')' }}</text>
  177. <uni-tooltip placement="right">
  178. <view class="help-icon">ⓘ</view>
  179. <template #content>
  180. <text>{{ t('Custom.Deposit.des') }}</text>
  181. </template>
  182. </uni-tooltip>
  183. </view>
  184. </template>
  185. <uni-easyinput v-model="params.amount1" disabled
  186. :placeholder="t('placeholder.input')" />
  187. </uni-forms-item>
  188. </view>
  189. <!-- 优惠码 -->
  190. <view>
  191. <uni-forms-item name="promoCode">
  192. <template #label>
  193. <view class="label-with-icon">
  194. <text>{{ t('Custom.Deposit.PromoCode') }}</text>
  195. <uni-tooltip placement="right">
  196. <view class="help-icon">ⓘ</view>
  197. <template #content>
  198. <text>{{ t('news_add_field.Des.item3') }}</text>
  199. </template>
  200. </uni-tooltip>
  201. </view>
  202. </template>
  203. <uni-easyinput v-model="params.promoCode"
  204. :placeholder="t('placeholder.input')" />
  205. </uni-forms-item>
  206. </view>
  207. <!-- 上传汇款凭证(特定渠道) -->
  208. <view v-if="
  209. channelData.code == 'UNION_PAY_TELEGRAPHIC' ||
  210. channelData.code == 'UNION_PAY_TELEGRAPHIC_SPECIAL' ||
  211. channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 ||
  212. channelData.code == 'UNION_PAY_TELEGRAPHIC_TWO'
  213. ">
  214. <uni-forms-item :label="t('Custom.Deposit.UploadRemittanceVoucher')">
  215. <cwg-file-picker-wrapper v-model="imageUrl" :limit="1" :editable="true"
  216. :fileMediatype="'all'" uploadUrl="/wasabi/upload/file"
  217. :baseUrl="Host80" />
  218. </uni-forms-item>
  219. </view>
  220. <!-- 电汇提示 -->
  221. <view
  222. v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
  223. <text>{{ t('Custom.Deposit.Tips') }}</text>
  224. </view>
  225. <!-- ========== 赠金活动部分 ========== -->
  226. <!-- 10%赠金(年中赠金) -->
  227. <view v-if="tableData4Flag">
  228. <uni-forms-item class="agree" name="agree4">
  229. <label class="checkbox">
  230. <checkbox :checked="params.agree4"
  231. @click="params.agree4 = !params.agree4" />
  232. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit1')
  233. }}</text>
  234. </label>
  235. <view style="line-height: 1.5; font-size: 14px">
  236. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit2')
  237. }}</text>
  238. <text class="clause crm-cursor" @click="dialogClauseNZ = true">{{
  239. t('news_add_field1.activitiesNZ.itemDeposit3')
  240. }}</text>
  241. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit4')
  242. }}</text>
  243. </view>
  244. </uni-forms-item>
  245. </view>
  246. <!-- 20%赠金(年中赠金) -->
  247. <view v-if="tableData4TwoFlag">
  248. <uni-forms-item class="agree" name="agree5">
  249. <label class="checkbox">
  250. <checkbox :checked="params.agree5"
  251. @click="params.agree5 = !params.agree5" />
  252. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
  253. }}</text>
  254. </label>
  255. <view style="line-height: 1.5; font-size: 14px">
  256. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
  257. }}</text>
  258. <text class="clause crm-cursor" @click="dialogClauseNZTwo = true">{{
  259. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  260. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
  261. }}</text>
  262. </view>
  263. </uni-forms-item>
  264. </view>
  265. <!-- 赠送活动(动态) -->
  266. <view v-if="tableDataNewListFlag">
  267. <uni-forms-item class="agree" name="agree6">
  268. <label>
  269. <checkbox :checked="params.agree6"
  270. @click="params.agree6 = !params.agree6" />
  271. <text>{{ tableDataNewList.title }}</text>
  272. </label>
  273. <view style="line-height: 1.5; font-size: 14px">
  274. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  275. <text class="clause crm-cursor"
  276. @click="dialogClauseNewList = true">{{
  277. tableDataNewList.title }}</text>
  278. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  279. </view>
  280. </uni-forms-item>
  281. </view>
  282. <!-- 20%赠金申请(特定账户类型) -->
  283. <view
  284. v-if="(ACCType == 1 || ACCType == 2 || ACCType == 5 || ACCType == 6 || ACCType == 7) && anshiClose">
  285. <uni-forms-item class="agree" name="agree3">
  286. <label class="checkbox">
  287. <checkbox :checked="params.agree3"
  288. @click="params.agree3 = !params.agree3" />
  289. <text>{{ t('news_add_field1.deposit.item3') }}</text>
  290. </label>
  291. <view style="line-height: 1.5; font-size: 14px">
  292. <text>{{ t('news_add_field1.deposit.item4') }}</text>
  293. <text class="clause crm-cursor" @click="dialogClause1 = true">{{
  294. t('news_add_field1.deposit.item5') }}</text>
  295. <text>{{ t('news_add_field1.deposit.item6') }}</text>
  296. </view>
  297. </uni-forms-item>
  298. </view>
  299. <!-- 普通10%赠金(非年中、非特定账户) -->
  300. <view
  301. v-if="!tableData4Flag && !tableData4TwoFlag && !tableDataNewListFlag && (country != 'CN' || (country == 'CN' && (ACCType == 1 || ACCType == 2 || ACCType == 7 || ACCType == 5 || ACCType == 6 || ACCType == 8))) && ACCType != 3">
  302. <template v-if="isSupportedCountry && (ACCType == 2 || ACCType == 7)">
  303. <uni-forms-item class="agree" name="agree2">
  304. <label>
  305. <checkbox :checked="params.agree2"
  306. @click="params.agree2 = !params.agree2" />
  307. <text>{{ t('news_add_field1.deposit.item2_1') }}</text>
  308. </label>
  309. <view style="line-height: 1.5; font-size: 14px">
  310. <text>{{ t('Custom.Deposit.agree21') }}</text>
  311. <cwg-link type="pdf" title="Custom.Deposit.agree22_2"
  312. :url="`pdf/pdf4/100Bonus-en.pdf`" style="color: black" />
  313. <text>{{ t('Custom.Deposit.agree23_2') }}</text>
  314. </view>
  315. </uni-forms-item>
  316. </template>
  317. <template
  318. v-else-if="!isSupportedCountry && ACCType != 8 && !isAfterSeptember30()">
  319. <uni-forms-item class="agree" name="agree2">
  320. <label>
  321. <checkbox :checked="params.agree2"
  322. @click="params.agree2 = !params.agree2" />
  323. <text>{{ t('news_add_field1.deposit.item1') }}</text>
  324. </label>
  325. <view style="line-height: 1.5; font-size: 14px">
  326. <text>{{ t('Custom.Deposit.agree21') }}</text>
  327. <cwg-link type="pdf" title="Custom.Deposit.agree22"
  328. :url="`pdf/pdf4/${langCN}.pdf`" style="color: black" />
  329. <text>{{ t('Custom.Deposit.agree23_1') }}</text>
  330. </view>
  331. </uni-forms-item>
  332. </template>
  333. </view>
  334. </view>
  335. </template>
  336. <button class="s-btn" type="primary" @click="submitConfirm">{{ t('Btn.Submit')
  337. }}</button>
  338. </uni-forms>
  339. </view>
  340. </view>
  341. </view>
  342. </view>
  343. <view class="step3-attention">
  344. <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
  345. <view>
  346. <cwg-rich-text class="attention"
  347. :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
  348. </view>
  349. </view>
  350. </view>
  351. </view>
  352. <!-- 不参加活动弹出框 -->
  353. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  354. <!-- 新年24用户提示弹窗 -->
  355. <NewYear24Popup v-model:visible="tableDataNewYear24Flag" />
  356. <!-- 越南用户提示弹窗 -->
  357. <VietnamNoticePopup v-model:visible="dialogVietnamNotice" />
  358. <!-- 提交后确认弹窗 -->
  359. <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
  360. :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="params" :userName="userName"
  361. :login="loginValue" :loginDoc="loginValueDoc" @confirm="submit" />
  362. <!--提交后的弹出框-->
  363. <CheckPopup v-model:visible="dialogCheckSuccess" :goPayLink="goPayLink" @close="closeDia" />
  364. <!-- 提交后失败弹窗 -->
  365. <cwg-error-popup v-model:visible="dialogCheckError" :responseMessage="RES" />
  366. <!-- 最后失败弹窗 -->
  367. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  368. <!-- 最后成功弹窗 -->
  369. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  370. <!-- 等待弹窗 -->
  371. <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
  372. <!-- 赠金协议 -->
  373. <ClausePopup v-model:visible="dialogClause" country="CN" :isGuoQin="isGuoQin" />
  374. <!-- 赠金协议20 -->
  375. <Clause20Popup v-model:visible="dialogClause1" />
  376. <!-- 赠金协议10年中 -->
  377. <ClauseNZPopup v-model:visible="dialogClauseNZ" :title="t('news_add_field1.activitiesNZ.item6')"
  378. :startDate="tableData4.applicationStartTime" :endDate="tableData4.applicationEndTime" />
  379. <!-- 赠金协议20年中 -->
  380. <ClauseNZTwoPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  381. :startDate="tableData4Two.applicationStartTime" :endDate="tableData4Two.applicationEndTime" />
  382. <!-- 赠送活动详情-协议 -->
  383. <ClauseNewListPopup v-model:visible="dialogClauseNewList" :content="tableDataNewList.content"
  384. :title="tableDataNewList.title" />
  385. <!--提交后完成弹出框-->
  386. <ChinaUnionPayPopup v-model:visible="dialogChinaUnionPay" />
  387. <!-- 重新提交弹窗 -->
  388. <DealResultPopup v-model:visible="dialogDealResult" :responseMessage="responseMessage"
  389. :title="dialogDealResultTitle" :initialData="dialogDealResult_form" :type="DealResultType"
  390. @confirm="submitDealResult" />
  391. <!-- KYC成功弹窗 -->
  392. <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
  393. </cwg-page-wrapper>
  394. </template>
  395. <script setup>
  396. import { ref, reactive, computed, watch, onMounted, nextTick, onUnmounted } from 'vue'
  397. import { useI18n } from 'vue-i18n'
  398. const { t, locale } = useI18n()
  399. import useUserStore from '@/stores/use-user-store'
  400. import { customApi } from '@/service/custom'
  401. import { financialApi } from '@/service/financial'
  402. import { activityApi } from '@/service/activity'
  403. import Config from '@/config/index'
  404. const { Code, Host80, Host04 } = Config
  405. import { initLink } from '@/utils/setUrl'
  406. import isImageType from '@/global/isImageType'
  407. import PaymentMethodsList from './components/PaymentMethodsList.vue'
  408. import CwgKycPopup from './components/KycPopup.vue'
  409. import DealResultPopup from './components/DealResultPopup.vue'
  410. import ChinaUnionPayPopup from './components/ChinaUnionPayPopup.vue'
  411. import ClauseNewListPopup from './components/ClauseNewListPopup.vue'
  412. import ClauseNZTwoPopup from './components/ClauseNZTwoPopup.vue'
  413. import ClauseNZPopup from './components/ClauseNZPopup.vue'
  414. import Clause20Popup from './components/Clause20Popup.vue'
  415. import ClausePopup from './components/ClausePopup.vue'
  416. import CheckPopup from './components/CheckPopup.vue'
  417. import CwgCheckConfirmPopup from './components/DepositCheckConfirmPopup.vue'
  418. import VietnamNoticePopup from './components/VietnamNoticePopup.vue'
  419. import NewYear24Popup from './components/NewYear24Popup.vue'
  420. // 假设原有导入路径保持不变
  421. import tool from "@/global/tool"
  422. // import { createUploadRequest } from "@/lib/upload"
  423. // 常量
  424. const countries = [
  425. "DZ", "AO", "BJ", "BW", "BF", "CM", "CG", "CD", "CI", "DJ", "EG", "ET", "GA", "GM", "GH", "GN", "KE", "MG", "MW", "ML", "MR", "MA", "MZ", "NA", "NE", "NG", "RW", "SN", "SL", "SO", "ZA", "SS", "SD", "TZ", "TG", "TN", "UG", "ZM", "ZW", "LS", "BH", "IR", "IQ", "IL", "JO", "KW", "LB", "OM", "PS", "QA", "SA", "SY", "TR", "AE", "YE", "AR", "BO", "BR", "CL", "CO", "EC", "GY", "PY", "PE", "SR", "UY", "VE", "BZ", "CR", "SV", "GT", "HN", "NI", "PA", "AU", "CA", "AL", "AD", "AM", "AT", "AZ", "BY", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GR", "HU", "IS", "IE", "IT", "XK", "LV", "LI", "LT", "LU", "MT", "MD", "MC", "ME", "NL", "MK", "NO", "PL", "PT", "RO", "RU", "SM", "RS", "SK", "SI", "ES", "SE", "CH", "UA", "VA",
  426. ]
  427. // 用户信息
  428. const userStore = useUserStore()
  429. const userInfo = computed(() => userStore.userInfo)
  430. // 获取全局 Session 等,假设它们挂载在 uni 或 global 上
  431. const Session = {
  432. Get: (key, parse = false) => {
  433. const val = uni.getStorageSync(key)
  434. return parse ? JSON.parse(val) : val
  435. }
  436. }
  437. const handleFileUpdate = (val, type) => {
  438. if (type == '1') {
  439. params.requiteVoucherUrl = val
  440. }
  441. }
  442. const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
  443. function isPdf(url, image) {
  444. let res = !!url
  445. if (image) {
  446. return res && url.substr(-3, 3) == 'pdf' &&
  447. url.substr(-3, 3) == 'PDF'
  448. }
  449. return res && (url.substr(-3, 3) == 'pdf' ||
  450. url.substr(-3, 3) == 'PDF')
  451. }
  452. const $pigeon = {
  453. MessageError: (msg) => uni.showToast({ title: msg, icon: 'none' }),
  454. MessageOK: (msg) => uni.showToast({ title: msg, icon: 'success' }),
  455. MessageWarning: (msg) => uni.showToast({ title: msg, icon: 'none' }),
  456. MessageConfirm: (msg, title, confirmText, cancelText, onConfirm, onCancel, options = {}) => {
  457. uni.showModal({
  458. title,
  459. content: msg,
  460. confirmText,
  461. cancelText,
  462. success: (res) => {
  463. if (res.confirm) onConfirm && onConfirm()
  464. else if (res.cancel) onCancel && onCancel()
  465. }
  466. })
  467. }
  468. }
  469. const $route = { query: {} } // 需从外部注入
  470. // 响应式数据
  471. const loginValue = ref("")
  472. const loginValueDoc = ref("")
  473. const metaInfo = ref(null)
  474. const text1 = ref("")
  475. const dialogKyc = ref(false)
  476. const requiteVoucherUrl = ref("")
  477. const limitedStatus = ref(null)
  478. const limitedStatusCheck = ref(false)
  479. const pictLoadingImg = ref(false)
  480. const flag = ref(false)
  481. const RES = ref("")
  482. const imgUrl = ref(Host80)
  483. const Host05 = ref(Config.Host05)
  484. const loginOptions = ref([])
  485. const code = ref("")
  486. const selectCodes = ref("")
  487. const bankValid = ref("")
  488. const requestUrl = ref("")
  489. const isStep3 = ref(false)
  490. const step2 = ref(false)
  491. const step3 = ref(false)
  492. const value = ref("")
  493. const giveLoginJoin = ref("")
  494. const openType = ref("")
  495. const dialogInfoTradingAdd = ref(false)
  496. const ruleForm = reactive({
  497. bankInfo: [],
  498. bankWrit: [],
  499. bankCredit: []
  500. })
  501. const bankInfoList = ref([])
  502. const bank = ref("")
  503. const myId = ref(null)
  504. const bankPayType = ref("")
  505. const form = reactive({})
  506. const dialogDealResult = ref(false)
  507. const dialogDealResult_form = reactive({})
  508. const DealResultType = ref(null)
  509. const DealResultResult = ref("")
  510. const dialogDealResultTitle = ref("")
  511. const anshiClose = ref(true)
  512. const isChannel = ref(true)
  513. const pictLoading = ref(false)
  514. const tableData = reactive({
  515. International_Transfer: [],
  516. China_UnionPay: [],
  517. Digital_Currency: [],
  518. Electronic_Wallet: [],
  519. Ucard_Wallet: []
  520. })
  521. const tableData1 = reactive({
  522. International_Transfer: [],
  523. China_UnionPay: [],
  524. Digital_Currency: [],
  525. Electronic_Wallet: [],
  526. Ucard_Wallet: []
  527. })
  528. //通道table-选择前后
  529. const activeTab = ref(1)
  530. // 🔥 自动过滤掉空数据的 tab
  531. const tabsConfig = computed(() => {
  532. const allTabs = [
  533. { text: t('Custom.Deposit.Channel3'), value: 1, type: 'Digital_Currency' },
  534. { text: t('Custom.Deposit.Channel2'), value: 2, type: 'China_UnionPay' },
  535. { text: t('Custom.Deposit.Channel4'), value: 3, type: 'Electronic_Wallet' },
  536. { text: t('Custom.Deposit.Channel1'), value: 4, type: 'International_Transfer' },
  537. { text: t('card.title'), value: 5, type: 'Ucard_Wallet' },
  538. ]
  539. // ✅ 只保留有数据的 tab
  540. return allTabs.filter(tab => {
  541. console.log(tableData1[tab.type], tab.type);
  542. return tableData1[tab.type]?.length > 0
  543. })
  544. })
  545. // 当前选中的 tab 项
  546. const currentTab = computed(() => tabsConfig.value.find(t => t.value === activeTab.value))
  547. // 当前要渲染的表格数据
  548. const currentTableData = computed(() => {
  549. const type = currentTab.value?.type
  550. return type ? tableData[type] || [] : []
  551. })
  552. // ✅ 监听 tab 变化,自动选中第一个有数据的 tab
  553. watch(
  554. tabsConfig,
  555. (newTabs) => {
  556. if (newTabs.length > 0) {
  557. activeTab.value = newTabs[0].value // 选中第一个
  558. }
  559. },
  560. { immediate: true }
  561. )
  562. watch(
  563. currentTab,
  564. (newTabs) => {
  565. // showTable()
  566. },
  567. { immediate: true }
  568. )
  569. const bankDate = ref([])
  570. const channelData = reactive({})
  571. const WireTransferAccount = reactive({})
  572. const actionAdd1 = ref("")
  573. const actionAdd2 = ref(Host04 + "/activity/requite/voucher/upload")
  574. const imageUrl = ref("")
  575. const imageUrl1 = ref("")
  576. const introduce = reactive({
  577. introduce: "",
  578. enIntroduce: ""
  579. })
  580. const params = reactive({
  581. amount: "",
  582. amount1: "",
  583. promoCode: "",
  584. agree: false,
  585. agree2: false,
  586. agree3: false,
  587. agree4: false,
  588. agree5: false,
  589. agree6: false
  590. })
  591. const resetForm = () => {
  592. //表单重置后,需要手动重置一些状态
  593. params.amount = ""
  594. params.amount1 = ""
  595. params.promoCode = ""
  596. params.agree = false
  597. params.agree2 = false
  598. params.agree3 = false
  599. params.agree4 = false
  600. params.agree5 = false
  601. params.agree6 = false
  602. form.bankUname = undefined
  603. form.bankCardNum = undefined
  604. form.cvv = undefined
  605. form.expiryMonth = undefined
  606. form.expiryYear = undefined
  607. form.pin = undefined
  608. amountErrorMessage.value = ""
  609. }
  610. const formRef = ref(null)
  611. const mAmount = reactive({
  612. minAmount: "",
  613. maxAmount: ""
  614. })
  615. const dialogCheck = ref(false)
  616. const dialogVisible = ref(false)
  617. const dialogCheckWait = ref(false)
  618. const dialogCheckOK = ref(false)
  619. const goPayLink = ref("")
  620. const dialogCheckConfirm = ref(false)
  621. const dialogCheckConfirm_form = reactive({
  622. confirmName: "",
  623. confirmAreaCode: "",
  624. confirmPhone: ""
  625. })
  626. const dialogClause = ref(false)
  627. const dialogClause1 = ref(false)
  628. const dialogClauseNZ = ref(false)
  629. const dialogClauseNZTwo = ref(false)
  630. const dialogClauseNewList = ref(false)
  631. const ACCType = ref(null)
  632. const CheckExistSuccess = ref(false)
  633. const dialogChinaUnionPay = ref(false)
  634. const tableData4Flag = ref(false)
  635. const tableData4 = reactive({})
  636. const tableData4TwoFlag = ref(false)
  637. const tableData4Two = reactive({})
  638. const tableDataNewListFlag = ref(false)
  639. const tableDataNewList = reactive({})
  640. const dialogDontActive = ref(false)
  641. const dialogVietnamNotice = ref(false)
  642. const tableDataNewYear24Flag = ref(false)
  643. const tableDataNewYear24 = ref(false)
  644. const rules = computed(() => ({
  645. amount: {
  646. rules: [
  647. {
  648. required: true,
  649. errorMessage: t('vaildate.amount.format1'),
  650. },
  651. {
  652. validateFunction: (rule, value, data, callback) => {
  653. // 空值处理:直接报格式错误
  654. if (!value) {
  655. callback(t('vaildate.amount.format1'))
  656. return false
  657. }
  658. // 范围校验
  659. if (
  660. mAmount.minAmount &&
  661. mAmount.maxAmount &&
  662. (Number(mAmount.minAmount) > Number(value) ||
  663. Number(mAmount.maxAmount) < Number(value))
  664. ) {
  665. callback(
  666. t('vaildate.amount.amount') +
  667. mAmount.minAmount +
  668. ' - ' +
  669. mAmount.maxAmount
  670. )
  671. return false
  672. }
  673. // 正整数校验(原正则)
  674. if (!/^[1-9]\d*$/.test(value)) {
  675. callback(t('vaildate.amount.format1'))
  676. return false
  677. }
  678. return true
  679. },
  680. trigger: 'change',
  681. },
  682. ],
  683. },
  684. agree: {
  685. rules: [
  686. {
  687. required: true,
  688. errorMessage: t('vaildate.agree.empty'),
  689. trigger: 'change',
  690. },
  691. ],
  692. },
  693. confirmAreaCode: {
  694. rules: [
  695. {
  696. required: true,
  697. errorMessage: t('vaildate.input.empty'),
  698. trigger: 'blur',
  699. },
  700. ],
  701. },
  702. confirmPhone: {
  703. rules: [
  704. {
  705. required: true,
  706. errorMessage: t('vaildate.input.empty'),
  707. trigger: 'blur',
  708. },
  709. ],
  710. },
  711. myId: {
  712. rules: [
  713. {
  714. required: true,
  715. errorMessage: t('vaildate.select.empty'),
  716. trigger: 'change',
  717. },
  718. ],
  719. },
  720. pin: {
  721. rules: [
  722. {
  723. required: true,
  724. errorMessage: t('PersonalManagement.Label.item1'),
  725. trigger: 'blur',
  726. },
  727. ],
  728. },
  729. phone: {
  730. rules: [
  731. {
  732. required: true,
  733. errorMessage: t('vaildate.input.empty'),
  734. trigger: 'blur',
  735. },
  736. ],
  737. },
  738. otp: {
  739. rules: [
  740. {
  741. required: true,
  742. errorMessage: t('vaildate.input.empty'),
  743. trigger: 'blur',
  744. },
  745. ],
  746. },
  747. state: {
  748. rules: [
  749. {
  750. required: true,
  751. errorMessage: t('vaildate.input.empty'),
  752. trigger: 'blur',
  753. },
  754. ],
  755. },
  756. city: {
  757. rules: [
  758. {
  759. required: true,
  760. errorMessage: t('vaildate.input.empty'),
  761. trigger: 'blur',
  762. },
  763. ],
  764. },
  765. country: {
  766. rules: [
  767. {
  768. required: true,
  769. errorMessage: t('vaildate.select.empty'),
  770. trigger: 'change',
  771. },
  772. ],
  773. },
  774. address: {
  775. rules: [
  776. {
  777. required: true,
  778. errorMessage: t('vaildate.input.empty'),
  779. trigger: 'blur',
  780. },
  781. ],
  782. },
  783. zipCode: {
  784. rules: [
  785. {
  786. required: true,
  787. errorMessage: t('vaildate.input.empty'),
  788. trigger: 'blur',
  789. },
  790. ],
  791. },
  792. }))
  793. const amountErrorMessage = ref('')
  794. const validateAmount = (value) => {
  795. const amount = params.amount
  796. if (!amount && amount !== 0) {
  797. amountErrorMessage.value = t('vaildate.amount.format1')
  798. return false
  799. }
  800. if (mAmount.minAmount && mAmount.maxAmount) {
  801. const min = Number(mAmount.minAmount);
  802. const max = Number(mAmount.maxAmount);
  803. const numValue = Number(amount);
  804. if (numValue < min || numValue > max) {
  805. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  806. return false
  807. }
  808. }
  809. if (!/^[1-9]\d*$/.test(amount)) {
  810. amountErrorMessage.value = t('vaildate.amount.format1')
  811. return false
  812. }
  813. amountErrorMessage.value = ''
  814. return true
  815. }
  816. const NewYear24Data = reactive({
  817. balance: 0,
  818. income: 0,
  819. rate: 0,
  820. index: 0
  821. })
  822. const AccessToken = computed(() => ({
  823. "Access-Token": Session.Get("access_token")
  824. }))
  825. const lang = computed(() => {
  826. return locale.value == "en" && document.body.clientWidth < 1200
  827. })
  828. const langCN = computed(() => locale.value)
  829. const isSupportedCountry = computed(() => {
  830. try {
  831. const country = userInfo.value.customInfo.country
  832. return countries.includes(country)
  833. } catch {
  834. return false
  835. }
  836. })
  837. const country = computed(() => {
  838. return userInfo.value.customInfo.country
  839. })
  840. const userName = computed(() => {
  841. let first = userInfo.value.customInfo.firstName
  842. let last = userInfo.value.customInfo.lastName
  843. let middle = userInfo.value.customInfo.middle
  844. if (!first && !last && !middle) return false
  845. return (first ? first + " " : "") + (middle ? middle + " " : "") + (last ? last : "")
  846. })
  847. const areaCode = computed(() => userInfo.value.customInfo.areaCode)
  848. const phone = computed(() => userInfo.value.customInfo.phone)
  849. // 是否是国庆节
  850. const isGuoQin = computed(() => {
  851. let flag = false
  852. let startTime1 = "2024/10/01 00:00:00"
  853. let endTime1 = "2024/10/07 23:59:59"
  854. let timezone = 8
  855. let offset_GMT = new Date().getTimezoneOffset()
  856. let nowDate = new Date().getTime()
  857. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  858. let end = new Date(endTime1).getTime()
  859. let start = new Date(startTime1).getTime()
  860. if (now > start && now < end) flag = true
  861. return flag
  862. })
  863. const groupTitleMap = {
  864. 1: 'Custom.Deposit.Channel1',
  865. 2: 'Custom.Deposit.Channel2',
  866. 3: 'Custom.Deposit.Channel3',
  867. 4: 'Custom.Deposit.Channel4',
  868. 5: 'card.title'
  869. }
  870. // 排序表格数据
  871. const sortedTableData = computed(() => {
  872. const order = [
  873. tableData.Digital_Currency,
  874. tableData.China_UnionPay,
  875. tableData.Electronic_Wallet,
  876. tableData.International_Transfer,
  877. tableData.Ucard_Wallet
  878. ]
  879. return order.filter(item => item && item.length > 0)
  880. })
  881. // 方法
  882. const isAfterJuly21 = () => {
  883. const currentDate = new Date()
  884. const july21 = new Date(currentDate.getFullYear(), 6, 21)
  885. return currentDate >= july21
  886. }
  887. // 货币
  888. const groupCurrency = (type) => {
  889. if (type == "GBP") return ": £"
  890. else if (type == "USD") return ": $"
  891. else if (type == "EUR") return ": €"
  892. else if (type == "USC") return ": ¢"
  893. else return ": $"
  894. }
  895. // 货币符号
  896. const groupCurrency1 = (type) => {
  897. if (type == "GBP") return "£"
  898. else if (type == "USD") return "$"
  899. else if (type == "EUR") return "€"
  900. else if (type == "USC") return "¢"
  901. else return "$"
  902. }
  903. // 选择银行
  904. const selectCode = (codeVal) => {
  905. bankDate.value.forEach(item => {
  906. if (item.code == codeVal) {
  907. selectCodes.value = lang.value == "cn" ? item.name : item.enName
  908. mAmount.minAmount = item.minAmount || mAmount.minAmount
  909. mAmount.maxAmount = item.maxAmount || mAmount.maxAmount
  910. channelData.rate = item.rate || channelData.rate
  911. channelData.transformCurrency = item.currency || channelData.transformCurrency
  912. }
  913. })
  914. }
  915. // 账户类型
  916. const groupTypeName = (type) => {
  917. if (type == "1") return t("AccountType.ClassicAccount")
  918. else if (type == "2") return t("AccountType.SeniorAccount")
  919. else if (type == "5") return t("AccountType.SpeedAccount")
  920. else if (type == "6") return t("AccountType.SpeedAccount")
  921. else if (type == "7") return t("AccountType.StandardAccount")
  922. else if (type == "8") return t("AccountType.CentAccount")
  923. }
  924. const selectChange = () => {
  925. // 强制更新,在 Vue 3 中通常不需要
  926. }
  927. const handleProgress1 = () => {
  928. pictLoadingImg.value = true
  929. }
  930. const handleAvatarError1 = (err) => {
  931. let errorMessage = t("Msg.Fail")
  932. if (err && err.status) {
  933. switch (err.status) {
  934. case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
  935. case 401: errorMessage = t("Msg.UploadUnauthorized"); break
  936. case 403: errorMessage = t("Msg.UploadForbidden"); break
  937. case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
  938. case 500: errorMessage = t("Msg.UploadServerError"); break
  939. case 502:
  940. case 503:
  941. case 504: errorMessage = t("Msg.UploadNetworkError"); break
  942. default:
  943. if (err.message) errorMessage = err.message
  944. else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
  945. }
  946. } else if (err && err.message) {
  947. if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
  948. else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
  949. else errorMessage = err.message
  950. }
  951. $pigeon.MessageError(errorMessage)
  952. pictLoadingImg.value = false
  953. }
  954. const handleAvatarSuccess1 = (res) => {
  955. if (res.code == Code.StatusOK) {
  956. $pigeon.MessageOK(res.msg)
  957. imageUrl1.value = res.data
  958. requiteVoucherUrl.value = res.data
  959. } else {
  960. uni.showToast({ title: res.msg, icon: 'none' })
  961. }
  962. pictLoadingImg.value = false
  963. }
  964. // 上传凭证前校验
  965. const beforeAvatarUpload1 = (file) => {
  966. const isJPG = isImageType.checkFile(file.type)
  967. const isLt2M = isImageType.checkSize(file.size)
  968. if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
  969. if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
  970. return isJPG && isLt2M
  971. }
  972. // 上传凭证进度
  973. const handleProgress = () => {
  974. pictLoadingImg.value = true
  975. }
  976. // 上传凭证失败
  977. const handleAvatarError = (err) => {
  978. let errorMessage = t("Msg.Fail")
  979. if (err && err.status) {
  980. switch (err.status) {
  981. case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
  982. case 401: errorMessage = t("Msg.UploadUnauthorized"); break
  983. case 403: errorMessage = t("Msg.UploadForbidden"); break
  984. case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
  985. case 500: errorMessage = t("Msg.UploadServerError"); break
  986. case 502:
  987. case 503:
  988. case 504: errorMessage = t("Msg.UploadNetworkError"); break
  989. default:
  990. if (err.message) errorMessage = err.message
  991. else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
  992. }
  993. } else if (err && err.message) {
  994. if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
  995. else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
  996. else errorMessage = err.message
  997. }
  998. $pigeon.MessageError(errorMessage)
  999. pictLoadingImg.value = false
  1000. }
  1001. // 上传凭证
  1002. const handleUploadDeposit = (options) => {
  1003. const originalUrl = actionAdd1.value || Config.Host80 + "/common/upload"
  1004. return createUploadRequest(originalUrl, AccessToken.value, 1)(options)
  1005. }
  1006. // 上传凭证成功
  1007. const handleAvatarSuccess = (res) => {
  1008. if (res.code == Code.StatusOK) {
  1009. $pigeon.MessageOK(res.msg)
  1010. imageUrl.value = res.data
  1011. requiteVoucherUrl.value = res.data
  1012. } else {
  1013. uni.showToast({ title: res.msg, icon: 'none' })
  1014. }
  1015. pictLoadingImg.value = false
  1016. }
  1017. // 上传凭证前校验
  1018. const beforeAvatarUpload = (file) => {
  1019. const isJPG = isImageType.checkFile(file.type)
  1020. const isLt2M = isImageType.checkSize(file.size)
  1021. if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
  1022. if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
  1023. return isJPG && isLt2M
  1024. }
  1025. // 打开添加银行弹窗
  1026. const openAddBankCard = () => {
  1027. if (ruleForm.bankCredit.length == 2) {
  1028. $pigeon.MessageConfirm(
  1029. t("Msg.WireTransfers"),
  1030. t("Msg.SystemPrompt"),
  1031. t("Btn.Confirm"),
  1032. t("Btn.Cancel"),
  1033. async () => { },
  1034. () => { }
  1035. )
  1036. } else {
  1037. openType.value = "add_CreditCard"
  1038. dialogInfoTradingAdd.value = true
  1039. }
  1040. }
  1041. const closeDiaAdd = () => {
  1042. dialogInfoTradingAdd.value = false
  1043. }
  1044. // 关闭添加银行弹窗
  1045. const closeAdd = (val) => {
  1046. dialogInfoTradingAdd.value = val
  1047. }
  1048. // 确认重新加载银行信息
  1049. const confirmToReload = () => {
  1050. dialogInfoTradingAdd.value = false
  1051. getBankInfo()
  1052. }
  1053. // 获取银行信息
  1054. const getBankInfo = async () => {
  1055. let res = await financialApi.customBankList({})
  1056. if (res.code == Code.StatusOK) {
  1057. ruleForm.bankCredit = []
  1058. res.data.forEach(item => {
  1059. if (item.type == 3) {
  1060. item.customBankCode = item.bankCode
  1061. item.bankCode = null
  1062. ruleForm.bankCredit.push(item)
  1063. }
  1064. if (item.defaultBank && item.type == 3) {
  1065. myId.value = item.id
  1066. form.bankUname = item.bankUname
  1067. form.bankCardNum = item.bankCardNum
  1068. form.cvv = item.cvv
  1069. form.expiryMonth = item.expiryMonth
  1070. form.expiryYear = item.expiryYear
  1071. form.pin = item.pin
  1072. }
  1073. })
  1074. } else {
  1075. uni.showToast({ title: res.msg, icon: 'none' })
  1076. }
  1077. }
  1078. // 选择银行
  1079. const chooseBank = (item) => {
  1080. if (formRef.value) formRef.value.clearValidate()
  1081. form.bankUname = item.bankUname
  1082. form.bankCardNum = item.bankCardNum
  1083. form.cvv = item.cvv
  1084. form.expiryMonth = item.expiryMonth
  1085. form.expiryYear = item.expiryYear
  1086. form.pin = item.pin
  1087. }
  1088. // 返回首页
  1089. const toHome = () => {
  1090. uni.switchTab({ url: "/pages/customer/index" })
  1091. }
  1092. // 提交确认信息弹窗
  1093. const submitConfirm = async () => {
  1094. console.log(params.requiteVoucherUrl, 1212);
  1095. if (channelData.confirmCreditCard == 1 && !myId.value) {
  1096. $pigeon.MessageWarning(t("PersonalManagement.Label.selectCreditCard"))
  1097. return
  1098. }
  1099. if (channelData.bankValid == 1 && !code.value) {
  1100. $pigeon.MessageWarning(t("vaildate.depositCurrency.empty"))
  1101. return
  1102. }
  1103. if ((channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") && !imageUrl.value) {
  1104. $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
  1105. return
  1106. }
  1107. if (params.promoCode && params.agree2) {
  1108. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1109. return
  1110. }
  1111. if (params.promoCode && params.agree3) {
  1112. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1113. return
  1114. }
  1115. if (params.promoCode && params.agree4) {
  1116. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1117. return
  1118. }
  1119. if (params.promoCode && params.agree5) {
  1120. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1121. return
  1122. }
  1123. if (params.promoCode && params.agree6) {
  1124. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1125. return
  1126. }
  1127. if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 && !imageUrl.value) {
  1128. $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
  1129. return
  1130. }
  1131. try {
  1132. if (formRef.value) {
  1133. await formRef.value.validate()
  1134. openDontActive()
  1135. }
  1136. } catch (error) {
  1137. if (error instanceof Array) {
  1138. uni.showToast({ title: error[0].errorMessage, icon: 'none' });
  1139. return
  1140. } else {
  1141. responseMessage.value = error.msg;
  1142. }
  1143. }
  1144. }
  1145. // 打开不参加活动弹窗
  1146. const openDontActive = () => {
  1147. if (!tableData4Flag.value && !tableData4TwoFlag.value && !tableDataNewListFlag.value && (country.value != "CN" || (country.value == "CN" && (ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 7))) && ACCType.value != 3 && params.agree2) {
  1148. tosubmitConfirm()
  1149. return
  1150. }
  1151. if (tableData4Flag.value && params.agree4) {
  1152. tosubmitConfirm()
  1153. return
  1154. }
  1155. if (tableData4TwoFlag.value && params.agree5) {
  1156. tosubmitConfirm()
  1157. return
  1158. }
  1159. if (tableDataNewListFlag.value && params.agree6) {
  1160. tosubmitConfirm()
  1161. return
  1162. }
  1163. if (limitedStatus.value && limitedStatusCheck.value) {
  1164. tosubmitConfirm()
  1165. return
  1166. }
  1167. if ((ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 5 || ACCType.value == 6 || ACCType.value == 7) && anshiClose.value && params.agree3) {
  1168. tosubmitConfirm()
  1169. return
  1170. }
  1171. tosubmitConfirm()
  1172. }
  1173. // 打开提交前信息弹窗
  1174. const tosubmitConfirm = () => {
  1175. dialogDontActive.value = false
  1176. dialogCheckConfirm_form.confirmAreaCode = areaCode.value
  1177. dialogCheckConfirm_form.confirmPhone = phone.value
  1178. dialogCheckConfirm.value = true
  1179. }
  1180. // 最后确认
  1181. const dialogSuccess = computed(() => dialogCheckOK.value && dialogVisible.value)
  1182. // 最后失败
  1183. const dialogError = computed(() => dialogCheckOK.value && !dialogVisible.value)
  1184. // 提交后确认
  1185. const dialogCheckSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  1186. // 提交后失败
  1187. const dialogCheckError = computed(() => dialogCheck.value && !dialogVisible.value)
  1188. // 提交申请
  1189. const submit = async () => {
  1190. if (flag.value) return
  1191. flag.value = true
  1192. dialogCheckConfirm.value = false
  1193. dialogCheckWait.value = true
  1194. try {
  1195. if (channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") {
  1196. let res = await financialApi.telegraphicPay({
  1197. requiteVoucherUrl: imageUrl1.value,
  1198. amount: params.amount,
  1199. login: $route.query.login,
  1200. voucherUrl: imageUrl.value,
  1201. activityDeposit: params.agree2 ? 1 : 0,
  1202. activityPercentageGive: params.agree3 ? 1 : 0,
  1203. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1204. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1205. activityGive: params.agree6 ? 1 : 0,
  1206. promoCode: params.promoCode,
  1207. code: channelData.code,
  1208. bankMsg: WireTransferAccount.bankMsg || "",
  1209. name: channelData.confirmName ? userName.value : null,
  1210. areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
  1211. phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
  1212. ip: uni.getStorageSync("CLIENT")
  1213. })
  1214. dialogCheckWait.value = false
  1215. if (res.code == Code.StatusOK) {
  1216. imageUrl1.value = ""
  1217. limitedStatusCheck.value = false
  1218. dialogCheckOK.value = true
  1219. dialogVisible.value = true
  1220. flag.value = false
  1221. } else {
  1222. RES.value = res.msg
  1223. dialogCheckOK.value = true
  1224. dialogVisible.value = false
  1225. flag.value = false
  1226. }
  1227. } else if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0) {
  1228. let res = await financialApi.digitalPay({
  1229. requiteVoucherUrl: imageUrl1.value,
  1230. amount: params.amount,
  1231. login: $route.query.login,
  1232. voucherUrl: imageUrl.value,
  1233. activityDeposit: params.agree2 ? 1 : 0,
  1234. activityPercentageGive: params.agree3 ? 1 : 0,
  1235. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1236. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1237. activityGive: params.agree6 ? 1 : 0,
  1238. promoCode: params.promoCode,
  1239. ip: uni.getStorageSync("CLIENT")
  1240. })
  1241. dialogCheckWait.value = false
  1242. if (res.code == Code.StatusOK) {
  1243. dialogCheckOK.value = true
  1244. dialogVisible.value = true
  1245. flag.value = false
  1246. } else {
  1247. RES.value = res.msg
  1248. dialogCheckOK.value = true
  1249. dialogVisible.value = false
  1250. flag.value = false
  1251. }
  1252. } else {
  1253. let par = ""
  1254. if (channelData.bankValid == 1) {
  1255. par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${code.value}/${(params.agree2 ? 1 : 0)}`
  1256. } else {
  1257. par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${(params.agree2 ? 1 : 0)}`
  1258. }
  1259. let res = await financialApi.PayBankCode(par, {
  1260. requiteVoucherUrl: imageUrl1.value,
  1261. promoCode: params.promoCode,
  1262. name: channelData.confirmName ? userName.value : null,
  1263. areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
  1264. phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
  1265. activityPercentageGive: params.agree3 ? 1 : 0,
  1266. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1267. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1268. activityGive: params.agree6 ? 1 : 0,
  1269. ip: uni.getStorageSync("CLIENT"),
  1270. ...form
  1271. })
  1272. dialogCheckWait.value = false
  1273. if (res.code == Code.StatusOK) {
  1274. if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
  1275. dealResult(res.data)
  1276. } else {
  1277. if (res.data.type == 1) {
  1278. goPayLink.value = res.data.result
  1279. window.open(res.data.result)
  1280. } else if (res.data.type == 2) {
  1281. let token = AccessToken.value["Access-Token"]
  1282. token = tool.tokenReplace(token)
  1283. goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
  1284. window.open(goPayLink.value)
  1285. } else if (res.data.type == 5) {
  1286. $pigeon.MessageConfirm(
  1287. t("PersonalManagement.Label.item2"),
  1288. t("Msg.SystemPrompt"),
  1289. t("Btn.Cancel"),
  1290. t("Btn.Confirm"),
  1291. async () => { },
  1292. () => {
  1293. goPayLink.value = res.data.result
  1294. dialogCheck.value = true
  1295. dialogVisible.value = true
  1296. window.open(res.data.result)
  1297. }
  1298. )
  1299. } else if (res.data.type == 8) {
  1300. goPayLink.value = Host04 + res.data.result
  1301. window.open(goPayLink.value)
  1302. } else if (res.data.type == 9) {
  1303. goPayLink.value = setCardUrl(res.data.result)
  1304. window.open(goPayLink.value)
  1305. } else if (res.data.type == 10) {
  1306. goPayLink.value = Host80 + '/pay/onchainpay.html?params=' + res.data.result
  1307. window.open(goPayLink.value)
  1308. }
  1309. if (res.data.type != 5) {
  1310. dialogCheck.value = true
  1311. dialogVisible.value = true
  1312. }
  1313. }
  1314. flag.value = false
  1315. } else {
  1316. RES.value = res.msg
  1317. dialogCheck.value = true
  1318. dialogVisible.value = false
  1319. flag.value = false
  1320. }
  1321. }
  1322. } catch (error) {
  1323. dialogCheckWait.value = false
  1324. flag.value = false
  1325. dialogCheckOK.value = true
  1326. dialogVisible.value = false
  1327. RES.value = error.msg
  1328. }
  1329. }
  1330. const setCardUrl = (serial) => {
  1331. let params = `${AccessToken.value["Access-Token"]}/${locale.value}/${serial}/1/pay`
  1332. return initLink({ link: imgUrl.value + '/pay/paycard.html', params })
  1333. }
  1334. //处理申请返回result
  1335. const dealResult = (data) => {
  1336. DealResultType.value = data.type
  1337. DealResultResult.value = data.result
  1338. if (data.type == 3) {
  1339. dialogDealResult_form.pin = ""
  1340. } else if (data.type == 4) {
  1341. dialogDealResult_form.otp = ""
  1342. } else if (data.type == 6) {
  1343. dialogDealResult_form.state = userInfo.value.state
  1344. dialogDealResult_form.city = userInfo.value.city
  1345. dialogDealResult_form.country = (["cn", "zhHant"].indexOf(locale.value) != -1) ? userInfo.value.countryName : userInfo.value.countryEnName
  1346. dialogDealResult_form.address = (userInfo.value.addressLines && userInfo.value.addressLines[0]) || ""
  1347. dialogDealResult_form.zipCode = userInfo.value.zipCode
  1348. dialogDealResultTitle.value = t("PersonalManagement.Label.item3")
  1349. } else if (data.type == 7) {
  1350. dialogDealResult_form.phone = userInfo.value.phone
  1351. dialogDealResultTitle.value = t("PersonalManagement.Label.item4")
  1352. }
  1353. dialogDealResult.value = true
  1354. }
  1355. //重新提交
  1356. const submitDealResult = async () => {
  1357. if (flag.value) return
  1358. flag.value = true
  1359. dialogCheckConfirm.value = false
  1360. dialogCheckWait.value = true
  1361. let par = Host04 + DealResultResult.value
  1362. let dataList = {}
  1363. if (DealResultType.value == 3) dataList = { pin: dialogDealResult_form.pin }
  1364. else if (DealResultType.value == 4) dataList = { otp: dialogDealResult_form.otp }
  1365. else if (DealResultType.value == 6) {
  1366. dataList = {
  1367. state: dialogDealResult_form.state,
  1368. city: dialogDealResult_form.city,
  1369. country: dialogDealResult_form.country,
  1370. address: dialogDealResult_form.address,
  1371. zipCode: dialogDealResult_form.zipCode
  1372. }
  1373. } else if (DealResultType.value == 7) dataList = { phone: dialogDealResult_form.phone }
  1374. let res = await financialApi.PayDealResult(par, dataList)
  1375. dialogCheckWait.value = false
  1376. dialogDealResult.value = false
  1377. if (res.code == Code.StatusOK) {
  1378. if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
  1379. dealResult(res.data)
  1380. } else {
  1381. if (res.data.type == 1) {
  1382. goPayLink.value = res.data.result
  1383. window.open(res.data.result)
  1384. } else if (res.data.type == 2) {
  1385. let token = AccessToken.value["Access-Token"]
  1386. token = tool.tokenReplace(token)
  1387. goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
  1388. window.open(goPayLink.value)
  1389. } else if (res.data.type == 5) {
  1390. $pigeon.MessageConfirm(
  1391. t("PersonalManagement.Label.item2"),
  1392. t("Msg.SystemPrompt"),
  1393. t("Btn.Cancel"),
  1394. t("Btn.Confirm"),
  1395. async () => { },
  1396. () => {
  1397. goPayLink.value = res.data.result
  1398. dialogCheck.value = true
  1399. dialogVisible.value = true
  1400. window.open(res.data.result)
  1401. }
  1402. )
  1403. } else if (res.data.type == 8) {
  1404. goPayLink.value = Host04 + res.data.result
  1405. window.open(goPayLink.value)
  1406. } else if (res.data.type == 9) {
  1407. dialogCheckOK.value = true
  1408. dialogVisible.value = true
  1409. flag.value = false
  1410. return
  1411. }
  1412. if (res.data.type != 5) {
  1413. dialogCheck.value = true
  1414. dialogVisible.value = true
  1415. }
  1416. }
  1417. flag.value = false
  1418. } else {
  1419. RES.value = res.msg
  1420. dialogCheck.value = true
  1421. dialogVisible.value = false
  1422. flag.value = false
  1423. dialogDealResult.value = false
  1424. }
  1425. }
  1426. const closeDia = () => {
  1427. dialogCheck.value = false
  1428. dialogVisible.value = false
  1429. dialogCheckOK.value = false
  1430. showTable()
  1431. }
  1432. const isStep3Open = () => {
  1433. isStep3.value = true
  1434. //中国网银弹窗
  1435. if (tableData.China_UnionPay.length && tableData.China_UnionPay[0].type == 2) {
  1436. let timezone = 8
  1437. let offset_GMT = new Date().getTimezoneOffset()
  1438. let nowDate = new Date().getTime()
  1439. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1440. let newTime = now.getHours().toString()
  1441. if ((newTime.length == 1 && newTime >= 0 && newTime < 8) || (newTime.length == 2 && newTime >= 22 && newTime < 24)) {
  1442. dialogChinaUnionPay.value = true
  1443. }
  1444. }
  1445. }
  1446. // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
  1447. const isAfterSeptember30 = () => {
  1448. // const currentDate = new Date();
  1449. // const september30 = new Date(
  1450. // currentDate.getFullYear(),
  1451. // 8,
  1452. // 30,
  1453. // 23,
  1454. // 59,
  1455. // 59
  1456. // ); // 月份从0开始,8表示9月,设置为23:59:59
  1457. // return currentDate > september30;
  1458. return true
  1459. }
  1460. const getMetaInfo = () => {
  1461. metaInfo.value = window.getMetaInfo()
  1462. metaInfo.value = { ...metaInfo.value, deviceType: "h5" }
  1463. }
  1464. //获取kyc二维码
  1465. const qrCode = async (depositChannelCode, row) => {
  1466. getMetaInfo()
  1467. let res = await activityApi.getWebsdkLink({
  1468. depositChannelCode,
  1469. metaInfo: metaInfo.value
  1470. })
  1471. if (res.code == Code.StatusOK) {
  1472. if (res.data) {
  1473. text1.value = JSON.parse(res.data).url
  1474. dialogKyc.value = true
  1475. flag.value = false
  1476. } else {
  1477. doShowStep3(row)
  1478. }
  1479. } else {
  1480. flag.value = false
  1481. uni.showToast({ title: res.msg, icon: 'none' })
  1482. }
  1483. }
  1484. const doShowStep3 = (row) => {
  1485. if (row.confirmCreditCard == 1) getBankInfo()
  1486. getCheckExistSuccess()
  1487. if (row.bankValid && isChannel.value) {
  1488. getBankList(row)
  1489. isChannel.value = false
  1490. step3.value = true
  1491. Object.assign(channelData, row)
  1492. mAmount.minAmount = row.minAmount
  1493. mAmount.maxAmount = row.maxAmount
  1494. } else {
  1495. step3.value = true
  1496. bankDate.value = []
  1497. Object.assign(channelData, row)
  1498. mAmount.minAmount = row.minAmount
  1499. mAmount.maxAmount = row.maxAmount
  1500. }
  1501. tableData.International_Transfer = []
  1502. tableData.China_UnionPay = []
  1503. tableData.Digital_Currency = []
  1504. tableData.Electronic_Wallet = []
  1505. tableData.Ucard_Wallet = []
  1506. if (row.type == 1) tableData.International_Transfer[0] = row
  1507. if (row.type == 2) tableData.China_UnionPay[0] = row
  1508. if (row.type == 3) tableData.Digital_Currency[0] = row
  1509. if (row.type == 4) tableData.Electronic_Wallet[0] = row
  1510. if (row.type == 5) tableData.Ucard_Wallet[0] = row
  1511. introduce.introduce = row.introduce
  1512. introduce.enIntroduce = row.enIntroduce
  1513. if (row.code == "UNION_PAY_TELEGRAPHIC" || row.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || row.code == "UNION_PAY_TELEGRAPHIC_TWO" || (row.code && row.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0)) {
  1514. let pro = []
  1515. if (row.property && row.property.substring(0, 1) == "[") {
  1516. pro = JSON.parse(row.property)
  1517. } else if (row.property && row.property.substring(0, 1) != "[") {
  1518. let proper = "[" + row.property + "]"
  1519. pro = JSON.parse(proper)
  1520. }
  1521. let ind = pro.length
  1522. if (ind) {
  1523. let index = parseInt(Math.random() * ind + 1)
  1524. Object.assign(WireTransferAccount, pro[index - 1])
  1525. actionAdd1.value = Host80 + "/common/upload"
  1526. } else {
  1527. Object.assign(WireTransferAccount, {})
  1528. actionAdd1.value = Host80 + "/common/upload"
  1529. }
  1530. }
  1531. }
  1532. //选择支付方式
  1533. const isShowStep3 = (row) => {
  1534. if (row.kycChannel != 1) {
  1535. doShowStep3(row)
  1536. } else {
  1537. qrCode(row.code, row)
  1538. }
  1539. }
  1540. //更换支付方式
  1541. const showTable = () => {
  1542. resetForm();
  1543. dialogCheckWait.value = false;
  1544. dialogVisible.value = false;
  1545. flag.value = false;
  1546. form.bankUname = undefined
  1547. form.bankCardNum = undefined
  1548. form.cvv = undefined
  1549. form.expiryMonth = undefined
  1550. form.expiryYear = undefined
  1551. form.pin = undefined
  1552. myId.value = null
  1553. params.amount = ""
  1554. params.amount1 = ""
  1555. params.agree = false
  1556. params.agree2 = false
  1557. params.agree3 = false
  1558. params.agree4 = false
  1559. params.agree5 = false
  1560. params.agree6 = false
  1561. params.promoCode = ""
  1562. isChannel.value = true
  1563. imageUrl.value = ""
  1564. code.value = ""
  1565. WireTransferAccount.bankMsg = ""
  1566. introduce.introduce = ""
  1567. introduce.enIntroduce = ""
  1568. }
  1569. const loginComboxOptions = computed(() => {
  1570. return loginOptions.value.map((item) => ({
  1571. text: item.label,
  1572. value: item.login
  1573. }))
  1574. })
  1575. const creditCardOptions = computed(() => {
  1576. return ruleForm.bankCredit.map((item, index) => ({
  1577. text: `${item.bankUname}-${item.bankCardNum}`,
  1578. value: item.id
  1579. }))
  1580. })
  1581. const bankOptions = computed(() => {
  1582. return bankDate.value.map((item, index) => ({
  1583. text: (locale.value === 'cn' || locale.value === 'zhHant') ? item.name : item.enName,
  1584. value: item.code
  1585. }))
  1586. })
  1587. // 获取账户信息
  1588. const getDateList = async () => {
  1589. loading.value = true
  1590. let res = await customApi.CustomDropdown({ platform: "" })
  1591. if (res.code == Code.StatusOK) {
  1592. loginOptions.value = res.data.map(item => ({
  1593. ...item,
  1594. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1595. }))
  1596. const pages = getCurrentPages()
  1597. const route = pages[pages.length - 1].$page?.options || {}
  1598. if (route.login) {
  1599. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1600. loginValue.value = found.login
  1601. loginValueDoc.value = found.label
  1602. step2.value = true
  1603. }
  1604. } else {
  1605. uni.showToast({ title: res.msg, icon: 'none' })
  1606. }
  1607. loading.value = false
  1608. }
  1609. //获取入金通道
  1610. const getDepositList = async () => {
  1611. pictLoading.value = true
  1612. tableData.International_Transfer = []
  1613. tableData.China_UnionPay = []
  1614. tableData.Digital_Currency = []
  1615. tableData.Electronic_Wallet = []
  1616. tableData.Ucard_Wallet = []
  1617. let res = await financialApi.RemittanceChannelList({})
  1618. if (res.code == Code.StatusOK) {
  1619. res.data.forEach(item => {
  1620. if (item.type == 1) tableData.International_Transfer.push(item), tableData1.International_Transfer.push(item)
  1621. if (item.type == 2) tableData.China_UnionPay.push(item), tableData1.China_UnionPay.push(item)
  1622. if (item.type == 3) tableData.Digital_Currency.push(item), tableData1.Digital_Currency.push(item)
  1623. if (item.type == 4) tableData.Electronic_Wallet.push(item), tableData1.Electronic_Wallet.push(item)
  1624. if (item.type == 5) tableData.Ucard_Wallet.push(item), tableData1.Ucard_Wallet.push(item)
  1625. })
  1626. pictLoading.value = false
  1627. } else {
  1628. uni.showToast({ title: res.msg, icon: 'none' })
  1629. pictLoading.value = false
  1630. }
  1631. }
  1632. //获取银行列表
  1633. const getBankList = async (row) => {
  1634. let res = await financialApi.BankList({ channelCode: row.code })
  1635. try {
  1636. if (res.code == Code.StatusOK) {
  1637. let bank = res.data
  1638. let data = []
  1639. bank.forEach(j => {
  1640. if (!j.minAmount && j.minAmount != 0) j.minAmount = row.minAmount
  1641. if (!j.maxAmount && j.maxAmount != 0) j.maxAmount = row.maxAmount
  1642. j.bankValid = row.bankValid
  1643. j.requestUrl = row.requestUrl
  1644. data.push(j)
  1645. })
  1646. bankDate.value = data
  1647. } else {
  1648. uni.showToast({ title: res.msg, icon: 'none' })
  1649. }
  1650. } catch (error) {
  1651. uni.showToast({ title: error.msg, icon: 'none' })
  1652. }
  1653. }
  1654. //获取20赠金活动信息
  1655. const getCheckExistSuccess = async () => {
  1656. let res = await financialApi.depositCheckExistSuccess({})
  1657. if (res.code == Code.StatusOK) {
  1658. CheckExistSuccess.value = res.data
  1659. } else {
  1660. uni.showToast({ title: res.msg, icon: 'none' })
  1661. }
  1662. }
  1663. //20赠金是否到期-4月30号23:59:59的时候关闭申请
  1664. const is20Open = () => {
  1665. let endTime1 = "2023/04/30 23:59:59"
  1666. let timezone = 2
  1667. let offset_GMT = new Date().getTimezoneOffset()
  1668. let nowDate = new Date().getTime()
  1669. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1670. let end = new Date(endTime1).getTime()
  1671. if (now > end) anshiClose.value = false
  1672. }
  1673. //限时活动
  1674. const ActivityRequiteInfo = async () => {
  1675. let res = await activityApi.ActivityRequiteInfo({})
  1676. if (res.code == Code.StatusOK) {
  1677. limitedStatus.value = res.data
  1678. } else {
  1679. uni.showToast({ title: res.msg, icon: 'none' })
  1680. }
  1681. }
  1682. //2023年中赠金活动数据-10
  1683. const Activity24nianzhongInfo = async () => {
  1684. let res = await activityApi.Activity23nianzhongInfo({})
  1685. if (res.code == Code.StatusOK) {
  1686. Object.assign(tableData4, res.data)
  1687. // const Data4 = {
  1688. // "activityEndTime": null,
  1689. // "activityStartTime": null,
  1690. // "applicationEndTime": null,
  1691. // "applicationStartTime": null,
  1692. // "loginTypes": [5, 6],
  1693. // "show": 1,
  1694. // "useApply": 1
  1695. // };
  1696. // Object.assign(tableData4, Data4)
  1697. // tableData4Flag.value = tableData4.show == 1 && tableData4.useApply == 1
  1698. } else {
  1699. uni.showToast({ title: res.msg, icon: 'none' })
  1700. }
  1701. }
  1702. //2023年中赠金活动数据-20
  1703. const Activity24nianzhongTwoInfo = async () => {
  1704. let res = await activityApi.Activity23nianzhongTwoInfo({})
  1705. if (res.code == Code.StatusOK) {
  1706. Object.assign(tableData4Two, res.data)
  1707. // const Data4 = {
  1708. // "activityEndTime": null,
  1709. // "activityStartTime": null,
  1710. // "applicationEndTime": null,
  1711. // "applicationStartTime": null,
  1712. // "loginTypes": [5, 6],
  1713. // "show": 1,
  1714. // "useApply": 1
  1715. // };
  1716. // Object.assign(tableData4Two, Data4)
  1717. // tableData4Flag.value = tableData4Two.show == 1 && tableData4Two.useApply == 1
  1718. } else {
  1719. uni.showToast({ title: res.msg, icon: 'none' })
  1720. }
  1721. }
  1722. //2023年中赠金活动权限
  1723. const get23nianzhongTwoLogin = async (newVal) => {
  1724. let res = await activityApi.Activity23nianzhongTwoLogin({ login: newVal })
  1725. if (res.code == Code.StatusOK) {
  1726. Object.assign(tableData4Two, res.data)
  1727. tableData4TwoFlag.value = tableData4Two.show == 1
  1728. } else {
  1729. uni.showToast({ title: res.msg, icon: 'none' })
  1730. }
  1731. }
  1732. const getActivityExtensionGiveLogin = async (newVal) => {
  1733. let res = await activityApi.ActivityExtensionGiveLogin({ login: newVal })
  1734. if (res.code == Code.StatusOK) {
  1735. Object.assign(tableDataNewList, res.data)
  1736. tableDataNewListFlag.value = tableDataNewList.show == 1
  1737. } else {
  1738. uni.showToast({ title: res.msg, icon: 'none' })
  1739. }
  1740. }
  1741. const getActivityExtensionGiveLoginJoin = async (newVal) => {
  1742. let res = await activityApi.ActivityExtensionGiveLoginJoin({ login: newVal })
  1743. if (res.code == Code.StatusOK) {
  1744. giveLoginJoin.value = res.data
  1745. } else {
  1746. uni.showToast({ title: res.msg, icon: 'none' })
  1747. giveLoginJoin.value = ""
  1748. }
  1749. }
  1750. //24新年庆典 开始
  1751. const isNewYear24Open = () => {
  1752. let endTime1 = "2025/3/31 23:59:59"
  1753. let startTime1 = "2025/1/1 00:00:00"
  1754. let timezone = 2
  1755. let offset_GMT = new Date().getTimezoneOffset()
  1756. let nowDate = new Date().getTime()
  1757. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1758. let end = new Date(endTime1).getTime()
  1759. let start = new Date(startTime1).getTime()
  1760. if (now < end && start < now) ActivityNewYear24()
  1761. }
  1762. const ActivityNewYear24 = async () => {
  1763. let res = await activityApi.ActivityNewYear24({})
  1764. if (res.code == Code.StatusOK) {
  1765. tableDataNewYear24.value = res.data
  1766. if (typeof tableDataNewYear24.value == "object") toIncome()
  1767. } else {
  1768. uni.showToast({ title: res.msg, icon: 'none' })
  1769. }
  1770. }
  1771. const toIncome = () => {
  1772. let balance = Number(tableDataNewYear24.value.balance) || 0
  1773. tableDataNewYear24.value.details.forEach((item, index) => {
  1774. if (balance > item.min && balance <= item.max) {
  1775. NewYear24Data.rate = item.rate
  1776. NewYear24Data.index = item.index
  1777. NewYear24Data.balance = (Number(tableDataNewYear24.value.details[index + 1].min) - balance).toFixed(2)
  1778. NewYear24Data.income = ((Number(tableDataNewYear24.value.details[index + 1].min) * Number(tableDataNewYear24.value.details[index + 1].rate) / 100 / 365) * 365).toFixed(2)
  1779. tableDataNewYear24Flag.value = true
  1780. } else if (balance > item.min && balance >= item.max && item.max == 0) {
  1781. tableDataNewYear24Flag.value = false
  1782. }
  1783. })
  1784. }
  1785. //24新年庆典 结束
  1786. // 新改内容
  1787. // userStore.paymentChannel.value
  1788. // userStore.channelList.value
  1789. const channel = computed(() => userStore.paymentChannel)
  1790. const channelList = computed(() => userStore.channelList)
  1791. const channelListOptions = ref([])
  1792. const channelId = ref(null)
  1793. const loading = ref(false)
  1794. const setAllAmount = () => {
  1795. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  1796. params.amount = parseInt(found.balance)
  1797. validateAmount()
  1798. }
  1799. const allTabs = computed(() => {
  1800. return {
  1801. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1802. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1803. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1804. "International_Transfer": t('Custom.Deposit.Channel1'),
  1805. "Ucard_Wallet": t('card.title'),
  1806. }
  1807. })
  1808. function formatChannels(data) {
  1809. const result = []
  1810. // 遍历每个分类
  1811. for (const key in data) {
  1812. const list = data[key] || []
  1813. // 插入分类标题(禁用项)
  1814. if (list.length) {
  1815. result.push({
  1816. text: allTabs.value[key],
  1817. value: key,
  1818. disable: true
  1819. })
  1820. }
  1821. list.forEach(item => {
  1822. result.push({
  1823. ...item,
  1824. text: item.name,
  1825. value: item.code
  1826. })
  1827. })
  1828. }
  1829. return result
  1830. }
  1831. // 生命周期
  1832. onMounted(() => {
  1833. if (channelList.value) {
  1834. channelListOptions.value = formatChannels(channelList.value)
  1835. }
  1836. channelId.value = channel.value
  1837. getDateList()
  1838. isStep3Open()
  1839. setTimeout(() => {
  1840. if (country.value === "VN") dialogVietnamNotice.value = true
  1841. is20Open()
  1842. // Activity24nianzhongInfo();
  1843. // Activity24nianzhongTwoInfo();
  1844. // dealResult({ "type": 7, "result": "/krad/pin?serial=123123" })
  1845. isNewYear24Open()
  1846. ActivityRequiteInfo()
  1847. }, 800);
  1848. })
  1849. onUnmounted(() => {
  1850. // userStore.savePaymentChannel('')
  1851. // userStore.saveChannelList('')
  1852. })
  1853. watch(channelId, async (newVal) => {
  1854. if (newVal) {
  1855. showTable()
  1856. let row = channelListOptions.value.find(item => item.code == newVal)
  1857. isShowStep3(row)
  1858. }
  1859. });
  1860. watch(isStep3, async (newVal) => {
  1861. if (newVal) {
  1862. await nextTick();
  1863. formRef.value?.clearValidate();
  1864. resetForm();
  1865. await nextTick();
  1866. formRef.value?.clearValidate();
  1867. }
  1868. });
  1869. // Watch
  1870. watch(loginValue, (login) => {
  1871. if (login) {
  1872. step3.value = true
  1873. get23nianzhongTwoLogin(login);
  1874. getActivityExtensionGiveLogin(login);
  1875. getActivityExtensionGiveLoginJoin(login);
  1876. }
  1877. })
  1878. watch(() => params.amount, (newVal) => {
  1879. if (newVal && channelData.rate) {
  1880. params.amount1 = (newVal * channelData.rate).toFixed(2)
  1881. }
  1882. })
  1883. watch(() => imageUrl, (newVal) => {
  1884. console.log(newVal, 12);
  1885. }, { deep: true })
  1886. watch(() => params.agree3, (newVal) => {
  1887. if (newVal) {
  1888. params.agree2 = false
  1889. params.agree4 = false
  1890. params.agree5 = false
  1891. params.agree6 = false
  1892. }
  1893. })
  1894. watch(() => params.agree2, (newVal) => {
  1895. if (newVal) {
  1896. params.agree3 = false
  1897. params.agree4 = false
  1898. params.agree5 = false
  1899. params.agree6 = false
  1900. }
  1901. })
  1902. watch(() => params.agree4, (newVal) => {
  1903. if (newVal) {
  1904. params.agree3 = false
  1905. params.agree2 = false
  1906. params.agree5 = false
  1907. params.agree6 = false
  1908. }
  1909. })
  1910. watch(() => params.agree5, (newVal) => {
  1911. if (newVal) {
  1912. params.agree3 = false
  1913. params.agree2 = false
  1914. params.agree4 = false
  1915. params.agree6 = false
  1916. }
  1917. })
  1918. watch(() => params.agree6, (newVal) => {
  1919. if (newVal) {
  1920. params.agree3 = false
  1921. params.agree2 = false
  1922. params.agree4 = false
  1923. params.agree5 = false
  1924. if (giveLoginJoin.value.flag == false) {
  1925. let tips = ""
  1926. if (giveLoginJoin.value.promptType == 1) tips = t("surplusList.item10")
  1927. else tips = t("surplusList.item11")
  1928. if (giveLoginJoin.value.activityCategory == 1) {
  1929. $pigeon.MessageConfirm(
  1930. tips,
  1931. t("Msg.SystemPrompt"),
  1932. t("surplusList.item12"),
  1933. t("Home.msg.item3"),
  1934. () => {
  1935. $pigeon.MessageConfirm(
  1936. t("surplusList.item13"),
  1937. t("Msg.SystemPrompt"),
  1938. t("Btn.Confirm"),
  1939. t("Btn.Cancel"),
  1940. async () => {
  1941. try {
  1942. const res = await activityApi.ActivityGiveCancel({ login: $route.query.login })
  1943. if (res.code == Code.StatusOK) $pigeon.MessageOK(res.msg || t("Msg.Success"))
  1944. else uni.showToast({ title: res.msg, icon: 'none' })
  1945. } catch (error) {
  1946. $pigeon.MessageError(t("Msg.Fail"))
  1947. }
  1948. },
  1949. () => { params.agree6 = false }
  1950. )
  1951. },
  1952. () => { },
  1953. { showCancelButton: true }
  1954. )
  1955. } else if (giveLoginJoin.value.activityCategory == 2) {
  1956. $pigeon.MessageConfirm(
  1957. tips,
  1958. t("Msg.SystemPrompt"),
  1959. "跳转",
  1960. t("Btn.Cancel"),
  1961. () => {
  1962. $pigeon.MessageConfirm(
  1963. "是否跳转到对应活动取消",
  1964. t("Msg.SystemPrompt"),
  1965. t("Btn.Confirm"),
  1966. t("Btn.Cancel"),
  1967. () => {
  1968. uni.navigateTo({ url: "/pages/customer/monthly/list" })
  1969. },
  1970. () => { params.agree6 = false }
  1971. )
  1972. },
  1973. () => { },
  1974. { showCancelButton: false }
  1975. )
  1976. } else {
  1977. $pigeon.MessageConfirm(
  1978. tips,
  1979. t("Msg.SystemPrompt"),
  1980. t("Btn.Confirm"),
  1981. t("Btn.Cancel")
  1982. )
  1983. }
  1984. }
  1985. }
  1986. })
  1987. </script>
  1988. <style lang="scss" scoped>
  1989. @import "@/uni.scss";
  1990. .custom-deposit {
  1991. width: px2rpx(566);
  1992. flex-shrink: 0;
  1993. .crm-title-box {
  1994. margin-bottom: px2rpx(20);
  1995. .tit {
  1996. font-size: px2rpx(20);
  1997. font-weight: 700;
  1998. color: var(--color-navy-900);
  1999. }
  2000. }
  2001. .box {
  2002. margin-bottom: px2rpx(20);
  2003. .b-card {
  2004. // background: #fff;
  2005. // border-radius: px2rpx(12);
  2006. // padding: px2rpx(20);
  2007. // box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  2008. .card-top {
  2009. .tit {
  2010. font-size: px2rpx(16);
  2011. font-weight: 600;
  2012. margin-bottom: px2rpx(16);
  2013. display: flex;
  2014. align-items: center;
  2015. color: var(--color-navy-900);
  2016. position: relative;
  2017. padding-left: 20px;
  2018. &:after {
  2019. content: '';
  2020. position: absolute;
  2021. left: 0;
  2022. top: 50%;
  2023. transform: translateY(-50%);
  2024. width: 0;
  2025. height: 0;
  2026. border-top: 6px solid transparent;
  2027. border-bottom: 6px solid transparent;
  2028. border-left: 8px solid currentColor;
  2029. }
  2030. }
  2031. }
  2032. .channelType {
  2033. font-size: px2rpx(15);
  2034. font-weight: 600;
  2035. margin: px2rpx(24) 0 px2rpx(12);
  2036. color: var(--color-navy-700);
  2037. padding-left: px2rpx(8);
  2038. border-left: px2rpx(4) solid var(--color-primary);
  2039. }
  2040. }
  2041. }
  2042. .reselect-btn {
  2043. margin-top: px2rpx(20);
  2044. display: flex;
  2045. justify-content: flex-end;
  2046. .reselect {
  2047. background-color: var(--color-zinc-100);
  2048. color: var(--color-navy-700);
  2049. border: none;
  2050. font-size: px2rpx(14);
  2051. padding: px2rpx(8) px2rpx(20);
  2052. border-radius: px2rpx(8);
  2053. &:active {
  2054. background-color: var(--color-zinc-200);
  2055. }
  2056. }
  2057. }
  2058. .s-btn[type="primary"] {
  2059. width: 100%;
  2060. height: px2rpx(48);
  2061. background-color: #cf1322;
  2062. color: #fff;
  2063. border-radius: px2rpx(12);
  2064. font-size: px2rpx(16);
  2065. font-weight: 600;
  2066. display: flex;
  2067. align-items: center;
  2068. justify-content: center;
  2069. border: none;
  2070. margin-top: px2rpx(30);
  2071. transition: all 0.2s;
  2072. &:active {
  2073. transform: scale(0.98);
  2074. background-color: #cf1322;
  2075. }
  2076. }
  2077. .add-back {
  2078. display: flex;
  2079. justify-content: space-between;
  2080. align-items: center;
  2081. margin-bottom: px2rpx(12);
  2082. padding: px2rpx(12) px2rpx(16);
  2083. background: var(--color-zinc-100);
  2084. border-radius: px2rpx(8);
  2085. text {
  2086. font-size: px2rpx(14);
  2087. color: var(--color-navy-700);
  2088. font-weight: 500;
  2089. }
  2090. .add-btn {
  2091. color: var(--color-primary);
  2092. font-weight: 600;
  2093. text-decoration: underline;
  2094. &:active {
  2095. opacity: 0.7;
  2096. }
  2097. }
  2098. }
  2099. .wire-transfer-account {
  2100. background: var(--color-zinc-50);
  2101. padding: px2rpx(16);
  2102. border-radius: px2rpx(12);
  2103. margin: px2rpx(16) 0;
  2104. .row {
  2105. display: flex;
  2106. margin-bottom: px2rpx(12);
  2107. font-size: px2rpx(14);
  2108. &:last-child {
  2109. margin-bottom: 0;
  2110. }
  2111. .label {
  2112. width: px2rpx(120);
  2113. color: var(--color-zinc-500);
  2114. }
  2115. .content {
  2116. flex: 1;
  2117. color: var(--color-navy-900);
  2118. font-weight: 500;
  2119. }
  2120. .SpecialColor {
  2121. color: var(--color-error);
  2122. }
  2123. }
  2124. }
  2125. .activities {
  2126. margin: px2rpx(24) 0;
  2127. .checkbox {
  2128. display: flex;
  2129. align-items: flex-start;
  2130. gap: px2rpx(8);
  2131. margin-bottom: px2rpx(12);
  2132. :deep(uni-checkbox .uni-checkbox-input) {
  2133. border-radius: px2rpx(4);
  2134. width: px2rpx(18);
  2135. height: px2rpx(18);
  2136. }
  2137. text {
  2138. font-size: px2rpx(14);
  2139. color: var(--color-navy-700);
  2140. font-weight: 500;
  2141. line-height: 1.5;
  2142. }
  2143. }
  2144. .clause-text {
  2145. font-size: px2rpx(13);
  2146. color: var(--color-zinc-500);
  2147. line-height: 1.6;
  2148. padding-left: px2rpx(26);
  2149. .clause {
  2150. color: var(--color-primary);
  2151. text-decoration: underline;
  2152. }
  2153. }
  2154. }
  2155. .step3-attention {
  2156. // background: var(--color-error-50, #fff1f0);
  2157. border-radius: px2rpx(12);
  2158. margin-bottom: px2rpx(20);
  2159. .tips {
  2160. line-height: 1.8;
  2161. font-size: px2rpx(12);
  2162. color: #909399;
  2163. background-color: #f9f9f9;
  2164. padding: px2rpx(12);
  2165. border-radius: px2rpx(4);
  2166. border-left: px2rpx(2) solid #cf1322;
  2167. .title {
  2168. font-weight: 600;
  2169. margin-bottom: px2rpx(6);
  2170. color: #606266;
  2171. }
  2172. }
  2173. .attention {
  2174. font-size: px2rpx(14);
  2175. // color: var(--color-error-600, #cf1322);
  2176. line-height: 1.6;
  2177. }
  2178. .btn-bottom {
  2179. margin-top: px2rpx(20);
  2180. display: flex;
  2181. justify-content: center;
  2182. .btn {
  2183. background: var(--color-error-600, #cf1322);
  2184. color: #fff;
  2185. padding: px2rpx(10) px2rpx(48);
  2186. border-radius: px2rpx(24);
  2187. font-size: px2rpx(15);
  2188. font-weight: 700;
  2189. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  2190. transition: all 0.2s;
  2191. &:active {
  2192. transform: scale(0.96);
  2193. opacity: 0.8;
  2194. }
  2195. }
  2196. }
  2197. }
  2198. .upload-box {
  2199. display: flex;
  2200. align-items: center;
  2201. gap: px2rpx(12);
  2202. .btn-upload {
  2203. background: var(--color-zinc-100);
  2204. border: px2rpx(1) dashed var(--color-zinc-300);
  2205. border-radius: px2rpx(8);
  2206. height: px2rpx(44);
  2207. font-size: px2rpx(14);
  2208. color: var(--color-zinc-600);
  2209. display: flex;
  2210. align-items: center;
  2211. justify-content: center;
  2212. padding: 0 px2rpx(20);
  2213. }
  2214. .img-preview {
  2215. width: px2rpx(44);
  2216. height: px2rpx(44);
  2217. border-radius: px2rpx(4);
  2218. object-fit: cover;
  2219. }
  2220. }
  2221. .label-with-icon {
  2222. font-size: px2rpx(14);
  2223. color: #606266;
  2224. box-sizing: border-box;
  2225. display: flex;
  2226. align-items: center;
  2227. padding: 0 0 8px;
  2228. height: px2rpx(36);
  2229. line-height: 1.5715;
  2230. text-align: left;
  2231. /* #ifndef APP-NVUE */
  2232. white-space: initial;
  2233. /* #endif */
  2234. .help-icon {
  2235. margin-left: px2rpx(8);
  2236. width: px2rpx(16);
  2237. height: px2rpx(16);
  2238. background: var(--color-zinc-200);
  2239. border-radius: 50%;
  2240. display: flex;
  2241. align-items: center;
  2242. justify-content: center;
  2243. font-size: px2rpx(12);
  2244. color: var(--color-zinc-600);
  2245. cursor: pointer;
  2246. }
  2247. }
  2248. .tooltip-content {
  2249. :deep(.uni-tooltip-popup) {
  2250. background-color: #fff !important;
  2251. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !important;
  2252. width: px2rpx(300) !important;
  2253. color: var(--color-zinc-500);
  2254. line-height: 1.6;
  2255. }
  2256. }
  2257. .error {
  2258. color: var(--color-error);
  2259. font-size: px2rpx(12);
  2260. margin-top: px2rpx(4);
  2261. display: block;
  2262. }
  2263. :deep(.base-info-form) {
  2264. .uni-row1 {
  2265. .uni-col {
  2266. padding: 0 px2rpx(10) !important;
  2267. }
  2268. .uni-forms-item {
  2269. min-height: px2rpx(79);
  2270. margin-bottom: px2rpx(10);
  2271. position: relative;
  2272. }
  2273. .uni-easyinput__content-input {
  2274. height: px2rpx(35) !important;
  2275. }
  2276. }
  2277. }
  2278. .popup-content {
  2279. background: #fff;
  2280. border-radius: px2rpx(20);
  2281. padding: px2rpx(24);
  2282. width: px2rpx(320);
  2283. text-align: center;
  2284. .popup-title {
  2285. font-size: px2rpx(18);
  2286. font-weight: 700;
  2287. margin-bottom: px2rpx(20);
  2288. color: var(--color-navy-900);
  2289. display: block;
  2290. }
  2291. .popup-text {
  2292. font-size: px2rpx(14);
  2293. line-height: 1.6;
  2294. color: var(--color-zinc-600);
  2295. margin-bottom: px2rpx(20);
  2296. display: block;
  2297. }
  2298. .popup-form {
  2299. background: var(--color-zinc-50);
  2300. border-radius: px2rpx(12);
  2301. padding: px2rpx(16);
  2302. margin-bottom: px2rpx(24);
  2303. text-align: left;
  2304. .popup-row {
  2305. display: flex;
  2306. justify-content: space-between;
  2307. margin-bottom: px2rpx(12);
  2308. font-size: px2rpx(14);
  2309. &:last-child {
  2310. margin-bottom: 0;
  2311. }
  2312. .label {
  2313. color: var(--color-zinc-500);
  2314. font-weight: 500;
  2315. }
  2316. text:not(.label) {
  2317. color: var(--color-navy-900);
  2318. font-weight: 500;
  2319. }
  2320. .small-input {
  2321. width: px2rpx(60);
  2322. background: #fff;
  2323. border: px2rpx(1) solid var(--color-zinc-200);
  2324. border-radius: px2rpx(4);
  2325. padding: 0 px2rpx(4);
  2326. height: px2rpx(24);
  2327. font-size: px2rpx(12);
  2328. }
  2329. }
  2330. }
  2331. .popup-buttons {
  2332. display: flex;
  2333. gap: px2rpx(12);
  2334. button {
  2335. flex: 1;
  2336. height: px2rpx(44);
  2337. border-radius: px2rpx(10);
  2338. font-size: px2rpx(15);
  2339. font-weight: 600;
  2340. display: flex;
  2341. align-items: center;
  2342. justify-content: center;
  2343. border: none;
  2344. &[type="primary"] {
  2345. background-color: #cf1322;
  2346. color: #fff;
  2347. }
  2348. &:not([type="primary"]) {
  2349. background: var(--color-zinc-100);
  2350. color: var(--color-zinc-600);
  2351. }
  2352. }
  2353. }
  2354. .result-icon {
  2355. display: flex;
  2356. justify-content: center;
  2357. margin-bottom: px2rpx(16);
  2358. .iconfont {
  2359. font-size: px2rpx(48);
  2360. &.iconchenggong {
  2361. color: #52c41a;
  2362. }
  2363. &.iconjingshi {
  2364. color: #faad14;
  2365. }
  2366. &.icondengdai {
  2367. color: var(--color-primary);
  2368. animation: rotate 2s linear infinite;
  2369. }
  2370. }
  2371. }
  2372. }
  2373. @keyframes rotate {
  2374. from {
  2375. transform: rotate(0deg);
  2376. }
  2377. to {
  2378. transform: rotate(360deg);
  2379. }
  2380. }
  2381. .avatar-uploader {
  2382. border: 1px dashed;
  2383. width: px2rpx(200);
  2384. height: px2rpx(150);
  2385. display: flex;
  2386. flex-direction: column;
  2387. align-items: center;
  2388. justify-content: center;
  2389. /*float: left;*/
  2390. //overflow: hidden;
  2391. }
  2392. :deep(.files-button) {
  2393. .file-item {
  2394. .icon,
  2395. .avatar {
  2396. width: px2rpx(200);
  2397. height: px2rpx(150);
  2398. }
  2399. }
  2400. }
  2401. }
  2402. .amount-box {
  2403. display: flex;
  2404. align-items: center;
  2405. gap: px2rpx(12);
  2406. .amount-input {
  2407. flex: 1;
  2408. }
  2409. .btn {
  2410. display: flex;
  2411. align-items: center;
  2412. justify-content: center;
  2413. font-size: px2rpx(14);
  2414. color: var(--color-zinc-600);
  2415. margin-bottom: px2rpx(12);
  2416. height: px2rpx(35);
  2417. background-color: #cf1322;
  2418. color: #fff;
  2419. border-radius: px2rpx(4);
  2420. font-weight: 600;
  2421. display: flex;
  2422. align-items: center;
  2423. justify-content: center;
  2424. border: none;
  2425. padding: 0 px2rpx(20);
  2426. margin-top: px2rpx(21);
  2427. cursor: pointer;
  2428. }
  2429. }
  2430. .custom-deposit-container {
  2431. width: 100%;
  2432. display: flex;
  2433. gap: px2rpx(60);
  2434. justify-content: space-between;
  2435. }
  2436. @media (max-width: 992px) {
  2437. .custom-deposit {
  2438. width: 100%;
  2439. margin-top: px2rpx(20);
  2440. }
  2441. .custom-deposit-container {
  2442. display: flex;
  2443. gap: px2rpx(30);
  2444. flex-wrap: wrap;
  2445. }
  2446. }
  2447. </style>