withdrawal.vue 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_customer.item3')" />
  4. <view class="container">
  5. <!-- <view
  6. class="app-page-head card-header d-flex gap-3 flex-wrap align-items-center justify-content-between border-0">
  7. <view class="app-page-head mb-0">
  8. <h1 class="app-page-title">Withdrawal</h1>
  9. </view>
  10. </view> -->
  11. <uni-loading v-if="loading" />
  12. <view class="row" v-else>
  13. <p v-if="channelData.type === 'DIGITAL_CURRENCY'" class="text-secondary" v-t="'Custom.Deposit.Des'" />
  14. <view class="col-lg-8">
  15. <view class="card">
  16. <view class="border-0 card-header">
  17. <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top"
  18. v-show="isStep3" class="base-info-form" validate-trigger="submit">
  19. <view class="row">
  20. <!-- 步骤1:选择账户 -->
  21. <view class="col-lg-6">
  22. <h5 class="mb-3" v-t="'Custom.Deposit.Title11'"></h5>
  23. <uni-forms-item>
  24. <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
  25. :placeholder="t('placeholder.choose')" @change="showCentAccountTransferTip" />
  26. </uni-forms-item>
  27. </view>
  28. <!-- 步骤2:支付通道列表 -->
  29. <view class="col-lg-6" v-if="step2">
  30. <h5 class="mb-3" v-t="'Custom.Deposit.Title22'"></h5>
  31. <uni-forms-item>
  32. <cwg-combox :clearable="false" v-model:value="channelId" :options="channelListOptions"
  33. :placeholder="t('placeholder.choose')" needSpace>
  34. </cwg-combox>
  35. </uni-forms-item>
  36. </view>
  37. <!-- 银行选择(针对有银行列表的通道) -->
  38. <view class="col-lg-6" v-if="bankDate.length">
  39. <h5 class="mb-3" v-t="'Custom.Withdraw.Title5'"></h5>
  40. <uni-forms-item name="bankCode">
  41. <cwg-combox :clearable="false" v-model:value="form.bankCode" :options="bankOptions"
  42. :placeholder="t('placeholder.choose')" @change="selectCode" />
  43. </uni-forms-item>
  44. </view>
  45. <!-- 电子钱包地址输入 -->
  46. <template v-if="['CHANNEL_TYPE_WALLET', 'CHANNEL_TYPE_ALI_WALLET'].includes(channelData.type)">
  47. <view class="col-lg-6">
  48. <h5 class="mb-3">{{ getWalletLabel }}</h5>
  49. <uni-forms-item name="address">
  50. <uni-easyinput :clearable="false" v-model="form.address"
  51. :placeholder="t('placeholder.input')" />
  52. </uni-forms-item>
  53. </view>
  54. </template>
  55. <!-- 数字货币选择(从已保存地址中选择) -->
  56. <template v-if="channelData.type === 'DIGITAL_CURRENCY'">
  57. <view class="col-lg-6">
  58. <view
  59. style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
  60. <h5 class="mb-3" v-t="'blockchain.item11'"></h5>
  61. </view>
  62. <uni-forms-item>
  63. <cwg-combox :clearable="false" v-model:value="myId" :options="digitalOptions"
  64. :placeholder="t('placeholder.choose')" @change="onDigitalCurrencyChange" />
  65. <!-- <cwg-combox :clearable="false" v-model:value="myId" :options="digitalOptions"
  66. :placeholder="t('placeholder.choose')" @change="onDigitalCurrencyChange"
  67. :disabled="!ruleForm.bankBlockchain.length" /> -->
  68. </uni-forms-item>
  69. <h6 class="mb-3">
  70. <text v-t="'blockchain.item10'"></text>
  71. <text class="add-btn crm-cursor" @click="openAddBankCard('add_bankBlockchain')">
  72. {{ t('Custom.Withdraw.addBank1') }}
  73. </text>
  74. </h6>
  75. </view>
  76. <view class="col-lg-6">
  77. <h5 class="mb-3" v-t="'blockchain.item3'"></h5>
  78. <uni-forms-item>
  79. <uni-easyinput disabled v-model="form.addressName" />
  80. </uni-forms-item>
  81. </view>
  82. <view class="col-lg-6">
  83. <h5 class="mb-3" v-t="'blockchain.item4'"></h5>
  84. <uni-forms-item>
  85. <uni-easyinput disabled v-model="form.address" />
  86. </uni-forms-item>
  87. </view>
  88. <view class="col-lg-12" v-if="form.addressProve">
  89. <h5 class="mb-3" v-t="'blockchain.item5'"></h5>
  90. <uni-forms-item>
  91. <view class="proof">
  92. <template v-if="form.addressProve && (form.addressProve.slice(-3).toLowerCase() === 'pdf')">
  93. <cwg-link type="pdf1" :url="htmlUrl + form.addressProve" target="_blank"
  94. class="state crm_state_blue">PDF</cwg-link>
  95. </template>
  96. <image v-else :src="imgUrl + form.addressProve" mode="aspectFit"
  97. style="width: 100rpx; height: 100rpx;" @click="previewImage(imgUrl + form.addressProve)" />
  98. </view>
  99. </uni-forms-item>
  100. </view>
  101. <!-- <view class="col-lg-12">
  102. <text class="tit"><text class="iconfont iconi"></text><text
  103. v-t="'Custom.Deposit.Des'"></text></text>
  104. </view> -->
  105. </template>
  106. <!-- 银行卡/信用卡选择下拉框 -->
  107. <view class="col-lg-6"
  108. v-if="['BANK', 'BANK_TELEGRAPHIC', 'CHANNEL_TYPE_CARD'].includes(channelData.type)">
  109. <h5 class="mb-3" v-t="'Custom.Withdraw.Title4'"></h5>
  110. <uni-forms-item>
  111. <cwg-combox :clearable="false" v-model:value="myId" :options="bankCardOptions"
  112. @change="chooseBank" :placeholder="t('placeholder.choose')" />
  113. </uni-forms-item>
  114. <h6 class="add-back mb-3">
  115. <text v-if="channelData.type == 'BANK_TELEGRAPHIC'" v-t="'Custom.Withdraw.addWire'"></text>
  116. <text v-if="channelData.type == 'BANK_TELEGRAPHIC'" class="add-btn crm-cursor"
  117. @click="openAddBankCard('add_wireTransfer')">
  118. {{ t('Custom.Withdraw.addBank1') }}
  119. </text>
  120. <text v-if="channelData.type == 'BANK'" v-t="'Custom.Withdraw.addBank'"></text>
  121. <text v-if="channelData.type == 'BANK'" class="add-btn crm-cursor"
  122. @click="openAddBankCard('add_bankCard')">
  123. {{ t('Custom.Withdraw.addBank1') }}
  124. </text>
  125. <text v-if="channelData.type == 'CHANNEL_TYPE_CARD'"
  126. v-t="'PersonalManagement.Label.addCreditCard'"></text>
  127. <text v-if="channelData.type == 'CHANNEL_TYPE_CARD'" class="add-btn crm-cursor"
  128. @click="openAddBankCard('add_CreditCard')">
  129. {{ t('Custom.Withdraw.addBank1') }}
  130. </text>
  131. </h6>
  132. </view>
  133. <!-- 通用银行信息展示 (BANK) -->
  134. <template v-if="channelData.type == 'BANK'">
  135. <view class="col-lg-6">
  136. <h5 class="mb-3" v-t="'Custom.Withdraw.UserName'"></h5>
  137. <uni-forms-item>
  138. <uni-easyinput disabled v-model="form.bankUname" />
  139. </uni-forms-item>
  140. </view>
  141. <view class="col-lg-6">
  142. <h5 class="mb-3" v-t="'Custom.Withdraw.BankCardNum'"></h5>
  143. <uni-forms-item>
  144. <uni-easyinput disabled v-model="form.bankCardNum" />
  145. </uni-forms-item>
  146. </view>
  147. <view class="col-lg-6">
  148. <h5 class="mb-3" v-t="'Custom.Withdraw.BankName'"></h5>
  149. <uni-forms-item>
  150. <uni-easyinput disabled v-model="form.bankName" />
  151. </uni-forms-item>
  152. </view>
  153. <view class="col-lg-6">
  154. <h5 class="mb-3" v-t="'Custom.Withdraw.bankBranchName'"></h5>
  155. <uni-forms-item>
  156. <uni-easyinput disabled v-model="form.bankBranchName" />
  157. </uni-forms-item>
  158. </view>
  159. </template>
  160. <!-- 信用卡信息展示(针对有信用卡列表的通道) -->
  161. <template v-if="channelData.type == 'CHANNEL_TYPE_CARD'">
  162. <view class="col-lg-6">
  163. <h5 class="mb-3" v-t="'PersonalManagement.Label.CreditCardAccountName'"></h5>
  164. <uni-forms-item>
  165. <uni-easyinput disabled v-model="form.bankUname" />
  166. </uni-forms-item>
  167. </view>
  168. <view class="col-lg-6">
  169. <h5 class="mb-3" v-t="'PersonalManagement.Label.CreditCardAccount'"></h5>
  170. <uni-forms-item>
  171. <uni-easyinput disabled v-model="form.bankCardNum" />
  172. </uni-forms-item>
  173. </view>
  174. <view class="col-lg-6">
  175. <h5 class="mb-3">CVV</h5>
  176. <uni-forms-item>
  177. <uni-easyinput disabled v-model="form.cvv" />
  178. </uni-forms-item>
  179. </view>
  180. <view class="col-lg-6">
  181. <h5 class="mb-3" v-t="'PersonalManagement.Label.ExpirationYear'"></h5>
  182. <uni-forms-item>
  183. <uni-easyinput disabled v-model="form.expiryYearMonth" />
  184. </uni-forms-item>
  185. </view>
  186. </template>
  187. <!-- 银行电汇转账信息展示(针对有银行转账列表的通道) -->
  188. <template v-if="channelData.type == 'BANK_TELEGRAPHIC'">
  189. <view class="col-lg-6">
  190. <h5 class="mb-3" v-t="'Custom.Withdraw.UserName'"></h5>
  191. <uni-forms-item>
  192. <uni-easyinput disabled v-model="form.bankUname" />
  193. </uni-forms-item>
  194. </view>
  195. <view class="col-lg-6">
  196. <h5 class="mb-3" v-t="'Custom.Withdraw.BankCardNum'"></h5>
  197. <uni-forms-item>
  198. <uni-easyinput disabled v-model="form.bankCardNum" />
  199. </uni-forms-item>
  200. </view>
  201. <view class="col-lg-6">
  202. <h5 class="mb-3" v-t="'Custom.Withdraw.BankName'"></h5>
  203. <uni-forms-item>
  204. <uni-easyinput disabled v-model="form.bankName" />
  205. </uni-forms-item>
  206. </view>
  207. <view class="col-lg-6">
  208. <h5 class="mb-3" v-t="'Custom.Withdraw.swiftCode'"></h5>
  209. <uni-forms-item>
  210. <uni-easyinput disabled v-model="form.swiftCode" />
  211. </uni-forms-item>
  212. </view>
  213. <view class="col-lg-6">
  214. <h5 class="mb-3" v-t="'Custom.Withdraw.bankCode'"></h5>
  215. <uni-forms-item>
  216. <uni-easyinput disabled v-model="form.customBankCode" />
  217. </uni-forms-item>
  218. </view>
  219. <view class="col-lg-6">
  220. <h5 class="mb-3" v-t="'Custom.Withdraw.bankAddr'"></h5>
  221. <uni-forms-item>
  222. <uni-easyinput disabled v-model="form.bankAddr" />
  223. </uni-forms-item>
  224. </view>
  225. <view class="col-lg-6">
  226. <h5 class="mb-3"> Account Agency NO</h5>
  227. <uni-forms-item name="agencyNo">
  228. <uni-easyinput v-model="form.agencyNo" />
  229. </uni-forms-item>
  230. </view>
  231. <view class="col-lg-6" v-if="channelData.code == 'PAY_RETAILER_REMIT_PAY_KEY_BRW'">
  232. <h5 class="mb-3" v-t="'Custom.Withdraw.cpf'"></h5>
  233. <uni-forms-item name="cpf">
  234. <uni-easyinput v-model="form.cpf" />
  235. </uni-forms-item>
  236. </view>
  237. </template>
  238. <!-- 金额输入 (电汇带币种) -->
  239. <view class="col-lg-6" v-if="channelData.type == 'BANK_TELEGRAPHIC'">
  240. <h5 class="mb-3" v-t="'Custom.Withdraw.CurrencyType'"></h5>
  241. <uni-forms-item>
  242. <cwg-combox :clearable="false" v-model:value="form.currency"
  243. :options="[{ text: 'USD', value: 'USD' }]" @change="(val) => form.currency = val" />
  244. </uni-forms-item>
  245. </view>
  246. <view class="col-lg-6">
  247. <h5 class="mb-3">
  248. <text v-t="'Custom.Withdraw.Title3'"></text>
  249. <text v-if="channelData.type !== 'BANK_TELEGRAPHIC'">({{ channelData.currency }})</text>
  250. </h5>
  251. <view class="amount-box amount-box1">
  252. <uni-forms-item name="amount" :error-message="amountErrorMessage" class="amount-input">
  253. <uni-easyinput v-model="form.amount" type="number" @blur="validateAmount" />
  254. </uni-forms-item>
  255. <view class="btn btn-gray waves-effect waves-light" v-t="'State.All'" @click="setAllAmount">
  256. </view>
  257. </view>
  258. </view>
  259. <view class="col-lg-12 mb-3">
  260. <!-- 协议同意部分 -->
  261. <view class="agree mb-3">
  262. <uni-forms-item name="agree2">
  263. <checkbox-group :value="form.agree2 ? ['1'] : []" @change="onAgree2Change">
  264. <label class="checkbox">
  265. <checkbox value="1" :checked="form.agree2" />
  266. <text class="crm-cursor" style="text-decoration: underline;"
  267. @click.stop="dialogCheckTip = true" v-t="'Custom.Withdraw.Des'"></text>
  268. </label>
  269. </checkbox-group>
  270. </uni-forms-item>
  271. </view>
  272. <view class="agree mb-3" v-if="dialogTipsIsShow">
  273. <uni-forms-item name="agree3">
  274. <checkbox-group :value="form.agree3 ? ['1'] : []" @change="onAgree3Change">
  275. <label class="checkbox">
  276. <checkbox value="1" :checked="form.agree3" />
  277. <text>
  278. <text v-t="'Custom.Withdraw.item1'"></text><br>
  279. <text v-t="'Custom.Withdraw.item1_1'"></text><br>
  280. <text v-t="'Custom.Withdraw.item1_2'"></text>
  281. </text>
  282. </label>
  283. </checkbox-group>
  284. </uni-forms-item>
  285. </view>
  286. </view>
  287. <button class="btn btn-dark waves-effect waves-light" @click="openTips"><i class="fi fi-rs-check">
  288. </i><text v-t="'Btn.Submit'"></text></button>
  289. </view>
  290. </uni-forms>
  291. </view>
  292. </view>
  293. </view>
  294. <view class="col-lg-4">
  295. <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
  296. <view class="card card-body">
  297. <cwg-rich-text class="attention" :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
  298. </view>
  299. </view>
  300. </view>
  301. </view>
  302. </view>
  303. <template v-if="step4">
  304. <view class="custom-deposit-container">
  305. <view class="custom-withdraw">
  306. <!-- 步骤1:选择账户 -->
  307. <view class="box box-step1">
  308. <view class="b-card">
  309. <view class="card-top">
  310. <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title11')
  311. }}</text>
  312. <view class="base-info-form">
  313. <view class="uni-row2">
  314. <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
  315. :placeholder="t('placeholder.choose')" @change="onAccountChange" />
  316. </view>
  317. </view>
  318. </view>
  319. </view>
  320. </view>
  321. <!-- 步骤2:支付通道列表 -->
  322. <view class="box box-step2" v-if="step2">
  323. <view class="b-card">
  324. <view class="card-top">
  325. <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title22')
  326. }}</text>
  327. <cwg-combox :clearable="false" v-model:value="channelId" :options="channelListOptions"
  328. :placeholder="t('placeholder.choose')" needSpace>
  329. </cwg-combox>
  330. </view>
  331. </view>
  332. </view>
  333. <!-- 步骤3:填写出金信息 -->
  334. <view class="box box-step3" v-if="step3">
  335. <view class="b-card">
  336. <view class="card-top">
  337. <!-- 表单 -->
  338. <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top"
  339. v-show="isStep3" class="base-info-form" validate-trigger="submit">
  340. <view class="demo-uni-row uni-row1 uni-row2">
  341. <!-- 银行选择(针对有银行列表的通道) -->
  342. <view v-if="bankDate.length">
  343. <view class="tit">
  344. <text>{{ t('Custom.Withdraw.Title5') }}</text>
  345. </view>
  346. </view>
  347. <view v-if="bankDate.length">
  348. <uni-forms-item name="bankCode">
  349. <cwg-combox :clearable="false" v-model:value="form.bankCode" :options="bankOptions"
  350. :placeholder="t('placeholder.choose')" @change="selectCode" />
  351. </uni-forms-item>
  352. </view>
  353. <!-- 电子钱包地址输入 -->
  354. <view v-if="['CHANNEL_TYPE_WALLET', 'CHANNEL_TYPE_ALI_WALLET'].includes(channelData.type)">
  355. <view class="tit">
  356. <text>{{ getWalletLabel }}</text>
  357. </view>
  358. </view>
  359. <!-- 电子钱包地址输入 -->
  360. <view v-if="['CHANNEL_TYPE_WALLET', 'CHANNEL_TYPE_ALI_WALLET'].includes(channelData.type)">
  361. <uni-forms-item name="address">
  362. <uni-easyinput :clearable="false" v-model="form.address"
  363. :placeholder="t('placeholder.input')" />
  364. </uni-forms-item>
  365. </view>
  366. <!-- 数字货币选择(从已保存地址中选择) -->
  367. <template v-if="channelData.type === 'DIGITAL_CURRENCY'">
  368. <view :xs="24" :sm="24" :md="24" :lg="24" :xl="24" v-if="channelData.type === 'DIGITAL_CURRENCY'">
  369. <view
  370. style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
  371. <view class="tit">
  372. <text>{{ t('Custom.Withdraw.Title6') }}</text>
  373. </view>
  374. <view class="add-back">
  375. <text>{{
  376. t('blockchain.item10') }}</text>
  377. <text class="add-btn crm-cursor" @click="openAddBankCard('add_bankBlockchain')">
  378. {{ t('Custom.Withdraw.addBank1') }}
  379. </text>
  380. </view>
  381. </view>
  382. <uni-forms-item>
  383. <cwg-combox :clearable="false" v-model:value="myId" :options="digitalOptions"
  384. :placeholder="t('placeholder.choose')" @change="onDigitalCurrencyChange" />
  385. <!-- <cwg-combox :clearable="false" v-model:value="myId" :options="digitalOptions"
  386. :placeholder="t('placeholder.choose')" @change="onDigitalCurrencyChange"
  387. :disabled="!ruleForm.bankBlockchain.length" /> -->
  388. </uni-forms-item>
  389. </view>
  390. <view>
  391. <uni-forms-item :label="t('blockchain.item3')">
  392. <uni-easyinput disabled v-model="form.addressName" />
  393. </uni-forms-item>
  394. </view>
  395. <view>
  396. <uni-forms-item :label="t('blockchain.item4')">
  397. <uni-easyinput disabled v-model="form.address" />
  398. </uni-forms-item>
  399. </view>
  400. <view v-if="form.addressProve">
  401. <uni-forms-item :label="t('blockchain.item5')">
  402. <view class="proof">
  403. <template v-if="form.addressProve && (form.addressProve.slice(-3).toLowerCase() === 'pdf')">
  404. <cwg-link type="pdf1" :url="htmlUrl + form.addressProve" target="_blank"
  405. class="state crm_state_blue">PDF</cwg-link>
  406. </template>
  407. <image v-else :src="imgUrl + form.addressProve" mode="aspectFit"
  408. style="width: 100rpx; height: 100rpx;"
  409. @click="previewImage(imgUrl + form.addressProve)" />
  410. </view>
  411. </uni-forms-item>
  412. </view>
  413. <view :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
  414. <text class="tit"><text class="iconfont iconi"></text>{{ t('Custom.Deposit.Des') }}</text>
  415. </view>
  416. </template>
  417. <view class="card-tit"
  418. v-if="isStep3 && (channelData.type == 'BANK_TELEGRAPHIC' || channelData.type == 'BANK' || channelData.type == 'CHANNEL_TYPE_CARD')">
  419. <view
  420. style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
  421. <view class="tit">
  422. <text>{{ t('Custom.Withdraw.Title4') }}</text>
  423. </view>
  424. <view class="add-back">
  425. <text v-if="channelData.type == 'BANK_TELEGRAPHIC'">{{
  426. t('Custom.Withdraw.addWire') }}</text>
  427. <text v-if="channelData.type == 'BANK_TELEGRAPHIC'" class="add-btn crm-cursor"
  428. @click="openAddBankCard('add_wireTransfer')">
  429. {{ t('Custom.Withdraw.addBank1') }}
  430. </text>
  431. <text v-if="channelData.type == 'BANK'">{{
  432. t('Custom.Withdraw.addBank')
  433. }}</text>
  434. <text v-if="channelData.type == 'BANK'" class="add-btn crm-cursor"
  435. @click="openAddBankCard('add_bankCard')">
  436. {{ t('Custom.Withdraw.addBank1') }}
  437. </text>
  438. <text v-if="channelData.type == 'CHANNEL_TYPE_CARD'">{{
  439. t('PersonalManagement.Label.addCreditCard') }}</text>
  440. <text v-if="channelData.type == 'CHANNEL_TYPE_CARD'" class="add-btn crm-cursor"
  441. @click="openAddBankCard('add_CreditCard')">
  442. {{ t('Custom.Withdraw.addBank1') }}
  443. </text>
  444. </view>
  445. </view>
  446. </view>
  447. <!-- 银行卡/信用卡选择 -->
  448. <view v-if="['BANK', 'BANK_TELEGRAPHIC', 'CHANNEL_TYPE_CARD'].includes(channelData.type)">
  449. <uni-forms-item>
  450. <cwg-combox :clearable="false" v-model:value="myId" :options="bankCardOptions"
  451. @change="chooseBank" :placeholder="t('placeholder.choose')" />
  452. </uni-forms-item>
  453. </view>
  454. <!-- 通用银行信息展示 -->
  455. <template v-if="channelData.type == 'BANK'">
  456. <view>
  457. <uni-forms-item :label="t('Custom.Withdraw.UserName')">
  458. <uni-easyinput disabled v-model="form.bankUname" />
  459. </uni-forms-item>
  460. </view>
  461. <view>
  462. <uni-forms-item :label="t('Custom.Withdraw.BankCardNum')">
  463. <uni-easyinput disabled v-model="form.bankCardNum" />
  464. </uni-forms-item>
  465. </view>
  466. <view>
  467. <uni-forms-item :label="t('Custom.Withdraw.BankName')">
  468. <uni-easyinput disabled v-model="form.bankName" />
  469. </uni-forms-item>
  470. </view>
  471. <view>
  472. <uni-forms-item :label="t('Custom.Withdraw.bankBranchName')">
  473. <uni-easyinput disabled v-model="form.bankBranchName" />
  474. </uni-forms-item>
  475. </view>
  476. </template>
  477. <!-- 信用卡信息展示(针对有信用卡列表的通道) -->
  478. <template v-if="channelData.type == 'CHANNEL_TYPE_CARD'">
  479. <view>
  480. <uni-forms-item :label="t('PersonalManagement.Label.CreditCardAccountName')">
  481. <uni-easyinput disabled v-model="form.bankUname" />
  482. </uni-forms-item>
  483. </view>
  484. <view>
  485. <uni-forms-item :label="t('PersonalManagement.Label.CreditCardAccount')">
  486. <uni-easyinput disabled v-model="form.bankCardNum" />
  487. </uni-forms-item>
  488. </view>
  489. <view>
  490. <uni-forms-item label="CVV">
  491. <uni-easyinput disabled v-model="form.cvv" />
  492. </uni-forms-item>
  493. </view>
  494. <view>
  495. <uni-forms-item :label="t('PersonalManagement.Label.ExpirationYear')">
  496. <uni-easyinput disabled v-model="form.expiryYearMonth" />
  497. </uni-forms-item>
  498. </view>
  499. </template>
  500. <!-- 银行电汇转账信息展示(针对有银行转账列表的通道) -->
  501. <template v-if="channelData.type == 'BANK_TELEGRAPHIC'">
  502. <view>
  503. <uni-forms-item :label="t('Custom.Withdraw.UserName')">
  504. <uni-easyinput disabled v-model="form.bankUname" />
  505. </uni-forms-item>
  506. </view>
  507. <view>
  508. <uni-forms-item :label="t('Custom.Withdraw.BankCardNum')">
  509. <uni-easyinput disabled v-model="form.bankCardNum" />
  510. </uni-forms-item>
  511. </view>
  512. <view>
  513. <uni-forms-item :label="t('Custom.Withdraw.BankName')">
  514. <uni-easyinput disabled v-model="form.bankName" />
  515. </uni-forms-item>
  516. </view>
  517. <view>
  518. <uni-forms-item :label="t('Custom.Withdraw.swiftCode')">
  519. <uni-easyinput disabled v-model="form.swiftCode" />
  520. </uni-forms-item>
  521. </view>
  522. <view>
  523. <uni-forms-item :label="t('Custom.Withdraw.bankCode')">
  524. <uni-easyinput disabled v-model="form.customBankCode" />
  525. </uni-forms-item>
  526. </view>
  527. <view>
  528. <uni-forms-item :label="t('Custom.Withdraw.bankAddr')">
  529. <uni-easyinput disabled v-model="form.bankAddr" />
  530. </uni-forms-item>
  531. </view>
  532. <view>
  533. <uni-forms-item label="Account Agency NO" name="agencyNo"
  534. v-if="channelData.code == 'PAY_RETAILER_REMIT_PAY_KEY_BRW'">
  535. <uni-easyinput v-model="form.agencyNo" />
  536. </uni-forms-item>
  537. <uni-forms-item label="Account Agency NO" v-else>
  538. <uni-easyinput v-model="form.agencyNo" />
  539. </uni-forms-item>
  540. </view>
  541. <view v-if="channelData.code == 'PAY_RETAILER_REMIT_PAY_KEY_BRW'">
  542. <uni-forms-item label="CPF" name="cpf">
  543. <uni-easyinput v-model="form.cpf" />
  544. </uni-forms-item>
  545. </view>
  546. </template>
  547. <!-- 出金金额 -->
  548. <view v-if="channelData.type == 'BANK_TELEGRAPHIC' && isStep3">
  549. <view class="tit">
  550. <text>{{ t('Custom.Withdraw.Title3') }}</text>
  551. </view>
  552. </view>
  553. <view v-if="channelData.type != 'BANK_TELEGRAPHIC' && isStep3">
  554. <view class="tit">
  555. <text>{{ t('Custom.Withdraw.Title3') + '(' + channelData.currency + ')'
  556. }}</text>
  557. </view>
  558. </view>
  559. <view v-if="channelData.type !== 'BANK_TELEGRAPHIC'" class="amount-box amount-box1">
  560. <uni-forms-item name="amount" :error-message="amountErrorMessage" class="amount-input">
  561. <uni-easyinput v-model="form.amount" type="number" @blur="validateAmount" />
  562. </uni-forms-item>
  563. <view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
  564. </view>
  565. <template v-else>
  566. <view>
  567. <uni-forms-item :label="t('Custom.Withdraw.CurrencyType')">
  568. <cwg-combox :clearable="false" v-model:value="form.currency"
  569. :options="[{ text: 'USD', value: 'USD' }]" @change="(val) => form.currency = val" />
  570. </uni-forms-item>
  571. </view>
  572. <view class="amount-box">
  573. <uni-forms-item :label="t('Custom.Withdraw.amount')" name="amount"
  574. :error-message="amountErrorMessage" class="amount-input">
  575. <uni-easyinput v-model="form.amount" type="number" @blur="validateAmount" />
  576. </uni-forms-item>
  577. <view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
  578. </view>
  579. </template>
  580. </view>
  581. <!-- 协议同意 -->
  582. <view class="agree">
  583. <uni-forms-item name="agree2">
  584. <checkbox-group :value="form.agree2 ? ['1'] : []" @change="onAgree2Change">
  585. <label class="checkbox">
  586. <checkbox value="1" :checked="form.agree2" />
  587. <text class="crm-cursor" style="text-decoration: underline;"
  588. @click.stop="dialogCheckTip = true">{{
  589. t('Custom.Withdraw.Des') }}</text>
  590. </label>
  591. </checkbox-group>
  592. </uni-forms-item>
  593. </view>
  594. <view class="agree" v-if="dialogTipsIsShow">
  595. <uni-forms-item name="agree3">
  596. <checkbox-group :value="form.agree3 ? ['1'] : []" @change="onAgree3Change">
  597. <label class="checkbox">
  598. <checkbox value="1" :checked="form.agree3" />
  599. <text>* {{ t('Custom.Withdraw.item1') }}<br>{{ t('Custom.Withdraw.item1_1') }}<br>{{
  600. t('Custom.Withdraw.item1_2') }}</text>
  601. </label>
  602. </checkbox-group>
  603. </uni-forms-item>
  604. </view>
  605. <button class="s-btn" type="primary" @click="openTips">{{ t('Btn.Submit') }}</button>
  606. </uni-forms>
  607. </view>
  608. </view>
  609. </view>
  610. </view>
  611. </view>
  612. </template>
  613. <!-- 提示弹窗 -->
  614. <cwg-tips-popup v-model:visible="dialogTips" content="Custom.Withdraw.item2" @confirm="closeTipsConfirm" />
  615. <!-- 弹窗:确认信息 -->
  616. <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item3')"
  617. :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="form" :FreeNumber="FreeNumber"
  618. :userName="userName" :dialogCheckConfirm_form="dialogCheckConfirm_form" :login="loginValue"
  619. :loginDoc="loginValueDoc" @confirm="submit" />
  620. <!-- 协议弹窗 -->
  621. <cwg-tips-popup v-model:visible="dialogCheckTip" :introduce="isZh ? introduce.introduce : introduce.enIntroduce" />
  622. <!-- 等待弹窗 -->
  623. <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
  624. <!-- 最后失败弹窗 -->
  625. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  626. <!-- 最后成功弹窗 -->
  627. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  628. <!-- kyc成功弹窗 -->
  629. <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
  630. <!--验证码-->
  631. <cwg-email-code-popup v-model:visible="dialogDealResult" @confirm="submitCode" :api="emailCodeApi" />
  632. <!-- 新增银行弹窗 -->
  633. <add-bank-dialog ref="addBankDialogRef" @success="addSuccess" />
  634. </cwg-page-wrapper>
  635. </template>
  636. <script setup>
  637. import { ref, reactive, computed, onMounted, nextTick, watch, getCurrentInstance, onUnmounted } from 'vue'
  638. import { onLoad } from '@dcloudio/uni-app'
  639. import { showToast } from "@/utils/toast";
  640. import { isAfterJuly28 } from '@/utils/dateUtils'
  641. // import Drawer from "@/views/global/Drawer"
  642. import { customApi } from "@/service/custom"
  643. import { financialApi } from "@/service/financial"
  644. import { activityApi } from "@/service/activity"
  645. import Config from "@/config/index"
  646. import Decimal from "decimal.js"
  647. import QrCode from "@/components/QRCode.vue"
  648. // import logoImage from "@/assets/images/MTBG.jpg"
  649. import AddBankDialog from '@/components/AddBankDialog.vue';
  650. import PaymentMethodsList from './components/PaymentMethodsList.vue'
  651. import CwgCheckConfirmPopup from './components/WithdrawCheckConfirmPopup.vue'
  652. import CwgKycPopup from './components/KycPopup.vue'
  653. let { Code, Host80, Host05 } = Config
  654. import { useI18n } from 'vue-i18n'
  655. const { t, locale } = useI18n()
  656. import useRouter from '@/hooks/useRouter'
  657. const router = useRouter()
  658. import useUserStore from '@/stores/use-user-store'
  659. const userStore = useUserStore()
  660. import { useConfirm } from '@/hooks/useConfirm'
  661. const confirm = useConfirm()
  662. const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
  663. // 获取组件实例,用于访问全局挂载的属性和方法(替代 this)
  664. const { proxy } = getCurrentInstance()
  665. // -------------------- data --------------------
  666. const loginValue = ref("")
  667. const loginValueDoc = ref("")
  668. const hiddenSelect = ref(false)
  669. const metaInfo = ref(null)
  670. const text1 = ref("")
  671. // const logoImageRef = logoImage
  672. const dialogCheck1 = ref(false)
  673. const flag = ref(false)
  674. const RES = ref("")
  675. //银行
  676. const openType = ref("") //弹出类别
  677. const dialogInfoTradingAdd = ref(false) //新增
  678. const ruleForm = reactive({
  679. bankInfo: [], //银行信息
  680. bankWrit: [], //电汇信息
  681. xykInfo: [], //信用卡信息
  682. bankBlockchain: [], //区块链
  683. })
  684. const imgUrl = Host05 //图片地址
  685. const htmlUrl = Host80 //html地址地址
  686. const loginOptions = ref([])
  687. const value = ref("") //账号
  688. const code = ref("") //通道code
  689. const bankValid = ref("") //通道是否有银行
  690. const requestUrl = ref("") //通道地址
  691. const isStep3 = ref(false)
  692. const step2 = ref(false)
  693. const step3 = ref(false)
  694. const dialogCheckTip = ref(false)
  695. const isChannel = ref(true)
  696. const pictLoading = ref(false)
  697. const tableData = reactive({
  698. Digital_Currency: [],
  699. China_UnionPay: [],
  700. Electronic_Wallet: [],
  701. International_Transfer: [],
  702. CHANNEL_TYPE_CARD: [],
  703. CHANNEL_TYPE_ALI_WALLET: [],
  704. Ucard_Wallet: [],
  705. })
  706. //通道table-选择前后
  707. const activeTab = ref(1)
  708. // 🔥 自动过滤掉空数据的 tab
  709. const tabsConfig = computed(() => {
  710. const allTabs = [
  711. { text: t('Custom.Deposit.Channel3'), value: 1, type: 'Digital_Currency' },
  712. { text: t('Custom.Deposit.Channel2'), value: 2, type: 'China_UnionPay' },
  713. { text: t('Custom.Deposit.Channel4'), value: 3, type: 'Electronic_Wallet' },
  714. { text: t('Custom.Deposit.Channel1'), value: 4, type: 'International_Transfer' },
  715. { text: t('PersonalManagement.Label.CreditCard'), value: 5, type: 'CHANNEL_TYPE_CARD' },
  716. { text: t('card.title'), value: 6, type: 'Ucard_Wallet' },
  717. { text: t('Label.Ali'), value: 7, type: 'CHANNEL_TYPE_ALI_WALLET' },
  718. ]
  719. // ✅ 只保留有数据的 tab
  720. return allTabs.filter(tab => {
  721. return tableData[tab.type]?.length > 0
  722. })
  723. })
  724. // 当前选中的 tab 项
  725. const currentTab = computed(() => tabsConfig.value.find(t => t.value === activeTab.value))
  726. // 当前要渲染的表格数据
  727. const currentTableData = computed(() => {
  728. const type = currentTab.value?.type
  729. return type ? tableData[type] || [] : []
  730. })
  731. const bankDate = ref([]) //通道下的银行列表
  732. const channelData = ref({}) //当前选择的通道信息
  733. const WireTransferAccount = ref({}) //银行电汇信息
  734. //表单
  735. const form = reactive({
  736. currency: "USD",
  737. amount: "",
  738. amount1: "",
  739. bankCode: '', // 银行代码(普通银行通道选择)
  740. address: '', // 电子钱包地址 / 数字货币地址(输入/展示)
  741. addressName: '', // 数字货币地址名称(展示)
  742. addressProve: '', // 数字货币地址证明文件路径(仅展示))
  743. bankUname: '', // 持卡人姓名
  744. bankCardNum: '', // 银行卡号
  745. bankName: '', // 银行名称
  746. bankBranchName: '', // 支行名称
  747. swiftCode: '', // SWIFT代码
  748. customBankCode: '', // 自定义银行代码
  749. bankAddr: '', // 银行地址
  750. agencyNo: '', // 代理机构编号(电汇专用,可编辑)
  751. cpf: '', // CPF号码(电汇专用,可编辑)
  752. cvv: '', // CVV码(电汇专用,可编辑)
  753. expiryYearMonth: '', // 过期年(电汇专用,可编辑)
  754. agree2: false, // 协议勾选2
  755. agree3: false // 协议勾选3(当dialogTipsIsShow为true时显示)
  756. })
  757. const formRef = ref(null)
  758. const resetForm = () => {
  759. //表单重置后,需要手动重置一些状态
  760. form.amount = ""
  761. form.amount1 = ""
  762. form.bankCode = ""
  763. form.address = ""
  764. form.addressName = ""
  765. form.addressProve = ""
  766. form.bankUname = ""
  767. form.bankCardNum = ""
  768. form.swiftCode = ""
  769. form.customBankCode = ""
  770. form.bankAddr = ""
  771. form.agencyNo = ""
  772. form.bankName = ""
  773. form.cpf = ""
  774. form.bankBranchName = ""
  775. form.cpf = ""
  776. form.cvv = ""
  777. form.expiryYearMonth = ""
  778. form.agree2 = false
  779. form.agree3 = false
  780. amountErrorMessage.value = ""
  781. dialogDealResult_form.emailCode = ''
  782. }
  783. //数量区间
  784. const mAmount = reactive({
  785. minAmount: "",
  786. maxAmount: "",
  787. })
  788. const introduce = reactive({
  789. introduce: "",
  790. enIntroduce: "",
  791. })
  792. //银行列表
  793. const bankInfoList = ref([])
  794. const bank = ref("")
  795. const myId = ref(null) //银行列表id
  796. const bankPayType = ref("") //临时放置通道code
  797. //银联/数字货币
  798. const step3_bank_cur = ref("")
  799. const agree2 = ref(false) //条款
  800. //数字表单
  801. const form1 = ref({})
  802. const dialogCheck = ref(false)
  803. const dialogKyc = ref(false)
  804. const dialogVisible = ref(false)
  805. const dialogCheckWait = ref(false)
  806. //新建银行弹窗
  807. const dialogNewBank = ref(false)
  808. const params = reactive({
  809. bankCardNum: "",
  810. bankUname: "",
  811. bankName: "",
  812. bankBranchName: "",
  813. bankAddr: "",
  814. swiftCode: "",
  815. bankFront: "",
  816. bankBack: "",
  817. defaultBank: false,
  818. })
  819. const dialogDealResult = ref(false)
  820. const emailCodeApi = ref(financialApi.withdrawCode)
  821. const dialogDealResult_form = reactive({
  822. emailCode: "", //数字货币出金,验证码
  823. })
  824. const dialogTips = ref(false) //提交时的确认弹窗
  825. const dialogTipsIsShow = ref(true) //提交时的确认弹窗-是否显示
  826. const dialogFreeNumber = ref(false) //可减免手续费用次数弹窗
  827. const FreeNumber = ref(0)
  828. const dialogCheckConfirm = ref(false)
  829. const dialogCheckConfirm_form = reactive({
  830. amount: "",
  831. feeAmount: "",
  832. })
  833. const tableDataNewYear24Flag = ref(false) //24新年庆典
  834. const tableDataNewYear24 = ref(false) //24新年庆典
  835. const NewYear24Data = reactive({
  836. balance: 0,
  837. income: 0,
  838. rate: 0,
  839. })
  840. const rules = computed(() => ({
  841. myId: {
  842. rules: [
  843. {
  844. required: true,
  845. errorMessage: t('vaildate.select.empty'),
  846. trigger: 'change',
  847. },
  848. ],
  849. },
  850. bankUname: {
  851. rules: [
  852. {
  853. required: true,
  854. errorMessage: t('vaildate.select.empty'),
  855. trigger: 'change',
  856. },
  857. ],
  858. },
  859. bankCode: {
  860. rules: [
  861. {
  862. required: true,
  863. errorMessage: t('vaildate.select.empty'),
  864. trigger: 'change',
  865. },
  866. ],
  867. },
  868. address: {
  869. rules: [
  870. {
  871. required: true,
  872. errorMessage: t('vaildate.input.empty'),
  873. trigger: 'blur',
  874. },
  875. ],
  876. },
  877. amount: {
  878. rules: [
  879. {
  880. required: true,
  881. errorMessage: t('vaildate.amount.format'),
  882. },
  883. {
  884. validateFunction: (rule, value, data, callback) => {
  885. if (
  886. !!value &&
  887. (mAmount.minAmount > value || mAmount.maxAmount < value)
  888. ) {
  889. callback(
  890. t('vaildate.amount.amount') +
  891. mAmount.minAmount +
  892. ' - ' +
  893. mAmount.maxAmount
  894. );
  895. return false;
  896. }
  897. if (value > loginAmount.value) {
  898. callback(t('Label.LoginBalance') + ':$' + loginAmount.value);
  899. return false;
  900. }
  901. if (/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  902. return true;
  903. } else {
  904. callback(t('vaildate.amount.format'));
  905. return false;
  906. }
  907. },
  908. trigger: 'blur',
  909. },
  910. ],
  911. },
  912. agree2: {
  913. rules: [
  914. {
  915. validateFunction: (rule, value, data, callback) => {
  916. if (form.agree2) {
  917. return true;
  918. } else {
  919. callback(t('vaildate.agree.empty'));
  920. return false;
  921. }
  922. },
  923. trigger: 'change',
  924. },
  925. ],
  926. },
  927. agree3: {
  928. rules: [
  929. {
  930. validateFunction: (rule, value, data, callback) => {
  931. if (form.agree3) {
  932. return true;
  933. } else {
  934. callback(t('vaildate.agree.empty'));
  935. return false;
  936. }
  937. },
  938. trigger: 'change',
  939. },
  940. ],
  941. },
  942. agencyNo: {
  943. rules: [
  944. {
  945. required: true,
  946. errorMessage: t('vaildate.input.empty'),
  947. trigger: 'blur',
  948. },
  949. ],
  950. },
  951. cpf: {
  952. rules: [
  953. {
  954. required: true,
  955. errorMessage: t('vaildate.input.empty'),
  956. trigger: 'blur',
  957. },
  958. ],
  959. },
  960. emailCode: {
  961. rules: [
  962. {
  963. required: true,
  964. errorMessage: t('vaildate.code.empty'),
  965. trigger: 'blur',
  966. },
  967. ],
  968. },
  969. }));
  970. // 验证金额
  971. const amountErrorMessage = ref('')
  972. const validateAmount = () => {
  973. const amount = Number(form.amount)
  974. if (mAmount.minAmount && mAmount.maxAmount) {
  975. const min = Number(mAmount.minAmount);
  976. const max = Number(mAmount.maxAmount);
  977. if (!amount && amount !== 0) {
  978. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  979. return false
  980. }
  981. if (amount < min || amount > max) {
  982. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  983. return false
  984. }
  985. }
  986. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  987. amountErrorMessage.value = t('vaildate.amount.format')
  988. return false
  989. }
  990. if (amount > loginAmount.value) {
  991. amountErrorMessage.value = t('Label.LoginBalance') + ':$' + loginAmount.value
  992. return false
  993. }
  994. amountErrorMessage.value = ''
  995. return true
  996. }
  997. // 分组标题映射
  998. const groupTitleMap = {
  999. 'Ucard_Wallet': 'card.title',
  1000. 'Digital_Currency': 'Custom.Deposit.Channel3',
  1001. 'China_UnionPay': 'Custom.Deposit.Channel2',
  1002. 'Electronic_Wallet': 'Custom.Deposit.Channel4',
  1003. 'International_Transfer': 'Custom.Deposit.Channel1',
  1004. 'CHANNEL_TYPE_CARD': 'PersonalManagement.Label.CreditCard',
  1005. 'CHANNEL_TYPE_ALI_WALLET': 'Label.Ali'
  1006. }
  1007. // -------------------- computed --------------------
  1008. const getWalletLabel = computed(() => {
  1009. if (channelData.value.type === 'CHANNEL_TYPE_WALLET') return t('Custom.Withdraw.Title7')
  1010. if (channelData.value.type === 'UCARD_WALLET') return t('card.title')
  1011. if (channelData.value.type === 'CHANNEL_TYPE_ALI_WALLET') return t('Label.AliAccout')
  1012. return ''
  1013. })
  1014. // 最后确认
  1015. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  1016. // 最后失败
  1017. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  1018. const loginComboxOptions = computed(() => {
  1019. return loginOptions.value.map((item, index) => ({
  1020. text: item.label,
  1021. value: item.login
  1022. }))
  1023. })
  1024. const bankOptions = computed(() => {
  1025. return bankDate.value.map((item, index) => ({
  1026. text: isZh.value ? item.name : item.enName,
  1027. value: item.code
  1028. }))
  1029. })
  1030. const digitalOptions = computed(() => {
  1031. return ruleForm.bankBlockchain.map((item, index) => ({
  1032. text: `${item.addressName}-${item.address}`,
  1033. value: item.id,
  1034. disable: item.authStatus == 0
  1035. }))
  1036. })
  1037. const bankCardOptions = computed(() => {
  1038. return bankList.value.map((item, index) => ({
  1039. text: getBankLabel(item),
  1040. value: item.id
  1041. }))
  1042. })
  1043. const getBankLabel = (item) => {
  1044. if (channelData.value.type === 'BANK' || channelData.value.type === 'BANK_TELEGRAPHIC') {
  1045. return `${item.bankName}-${item.bankCardNum}`
  1046. } else if (channelData.value.type === 'CHANNEL_TYPE_CARD') {
  1047. return item.bankCardNum
  1048. }
  1049. return ''
  1050. }
  1051. const bankList = computed(() => {
  1052. if (channelData.value.type === 'BANK') return ruleForm.bankInfo
  1053. if (channelData.value.type === 'BANK_TELEGRAPHIC') return ruleForm.bankWrit
  1054. if (channelData.value.type === 'CHANNEL_TYPE_CARD') return ruleForm.xykInfo
  1055. if (channelData.value.type === 'DIGITAL_CURRENCY') return ruleForm.bankBlockchain
  1056. return []
  1057. })
  1058. const isFree = computed(() => {
  1059. let flag = false;
  1060. let startTime1 = "2024/11/01 00:00:00";
  1061. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1062. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1063. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1064. let now = new Date(
  1065. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1066. ).getTime();
  1067. let start = new Date(startTime1).getTime();
  1068. if (now > start) {
  1069. flag = true;
  1070. }
  1071. return flag;
  1072. })
  1073. // -------------------- methods --------------------
  1074. const groupCurrency = (type) => {
  1075. const symbol = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }[type] || '$'
  1076. return `: ${symbol}`
  1077. }
  1078. const groupCurrency1 = (type) => {
  1079. const symbol = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }[type] || '$'
  1080. return `${symbol}`
  1081. }
  1082. function groupTypeName(type) {
  1083. if (type == "1") {
  1084. return t("AccountType.ClassicAccount");
  1085. } else if (type == "2") {
  1086. return t("AccountType.SeniorAccount");
  1087. } else if (type == "3") {
  1088. return isAfterJuly28() ? "--" : t("AccountType.AgencyAccount");
  1089. } else if (type == "5") {
  1090. return t("AccountType.SpeedAccount");
  1091. } else if (type == "6") {
  1092. return t("AccountType.SpeedAccount");
  1093. } else if (type == "7") {
  1094. return t("AccountType.StandardAccount");
  1095. } else if (type == "8") {
  1096. return t("AccountType.CentAccount");
  1097. }
  1098. }
  1099. //回显
  1100. const onAgree3Change = (e) => {
  1101. form.agree3 = e.detail.value.length > 0
  1102. }
  1103. const onAgree2Change = (e) => {
  1104. form.agree2 = e.detail.value.length > 0
  1105. }
  1106. function selectChange() {
  1107. // proxy.$forceUpdate();
  1108. }
  1109. //新增
  1110. // function openAddBankCard(type) {
  1111. // if (type == "add_bankCard") {
  1112. // if (ruleForm.bankInfo.length == 2) {
  1113. // proxy.$pigeon.MessageConfirm(
  1114. // t("Msg.UnionPayCARDS"),
  1115. // t("Msg.SystemPrompt"),
  1116. // t("Btn.Confirm"),
  1117. // t("Btn.Cancel"),
  1118. // async function () { },
  1119. // function () { }
  1120. // );
  1121. // } else {
  1122. // openType.value = "add_bankCard";
  1123. // dialogInfoTradingAdd.value = true;
  1124. // }
  1125. // } else if (type == "add_wireTransfer") {
  1126. // if (ruleForm.bankWrit.length == 2) {
  1127. // proxy.$pigeon.MessageConfirm(
  1128. // t("Msg.WireTransfers"),
  1129. // t("Msg.SystemPrompt"),
  1130. // t("Btn.Confirm"),
  1131. // t("Btn.Cancel"),
  1132. // async function () { },
  1133. // function () { }
  1134. // );
  1135. // } else {
  1136. // openType.value = "add_wireTransfer";
  1137. // dialogInfoTradingAdd.value = true;
  1138. // }
  1139. // } else if (type == "add_CreditCard") {
  1140. // openType.value = "add_CreditCard";
  1141. // dialogInfoTradingAdd.value = true;
  1142. // } else if (type == "add_bankBlockchain") {
  1143. // if (ruleForm.bankBlockchain.length == 2) {
  1144. // proxy.$pigeon.MessageConfirm(
  1145. // t("blockchain.item9"),
  1146. // t("Msg.SystemPrompt"),
  1147. // t("Btn.Confirm"),
  1148. // t("Btn.Cancel"),
  1149. // async function () { },
  1150. // function () { }
  1151. // );
  1152. // } else {
  1153. // openType.value = "add_bankBlockchain";
  1154. // dialogInfoTradingAdd.value = true;
  1155. // }
  1156. // }
  1157. // }
  1158. // 新增银行信息
  1159. const addBankDialogRef = ref(null);
  1160. function openAddBankCard(type) {
  1161. console.log(type, 121212)
  1162. switch (type) {
  1163. case 'add_bankBlockchain':
  1164. openAddCrypto()
  1165. break;
  1166. case 'add_bankCard':
  1167. openAddUnionpay()
  1168. break;
  1169. case 'add_wireTransfer':
  1170. openAddBank()
  1171. break;
  1172. case 'add_CreditCard':
  1173. openAddCredit()
  1174. break;
  1175. }
  1176. }
  1177. function openAddCrypto() {
  1178. const wallets = bankCardOptions.value || []
  1179. // 1️⃣ 没有钱包
  1180. if (wallets.length === 0) {
  1181. addBankDialogRef.value?.open(4);
  1182. return;
  1183. }
  1184. // 2️⃣ 是否存在未认证钱包
  1185. const hasUnAuth = wallets.some(
  1186. item => item.authStatus === 0 || item.approveStatus === 1
  1187. );
  1188. if (hasUnAuth) {
  1189. uni.showToast({
  1190. title: "加密钱包未认证",
  1191. icon: "none"
  1192. });
  1193. return;
  1194. }
  1195. // 3️⃣ 是否达到上限
  1196. if (wallets.length >= 2) {
  1197. uni.showToast({
  1198. title: t('blockchain.item9'),
  1199. icon: "none"
  1200. });
  1201. return;
  1202. }
  1203. // 4️⃣ 正常打开
  1204. addBankDialogRef.value?.open(4);
  1205. }
  1206. function openAddUnionpay() {
  1207. const wallets = bankCardOptions.value || []
  1208. if (wallets.length === 0) {
  1209. addBankDialogRef.value?.open(1);
  1210. return;
  1211. }
  1212. if (wallets.length >= 2) {
  1213. uni.showToast({
  1214. title: t('Msg.UnionPayCARDS'),
  1215. icon: "none"
  1216. });
  1217. return;
  1218. }
  1219. addBankDialogRef.value?.open(1);
  1220. }
  1221. function openAddBank() {
  1222. const wallets = bankCardOptions.value || []
  1223. if (wallets.length === 0) {
  1224. addBankDialogRef.value?.open(2);
  1225. return;
  1226. }
  1227. if (wallets.length >= 2) {
  1228. uni.showToast({
  1229. title: t('Msg.WireTransfers'),
  1230. icon: "none"
  1231. });
  1232. return;
  1233. }
  1234. addBankDialogRef.value?.open(2);
  1235. }
  1236. function openAddCredit() {
  1237. const wallets = bankCardOptions.value || []
  1238. if (wallets.length === 0) {
  1239. addBankDialogRef.value?.open(3);
  1240. return;
  1241. }
  1242. addBankDialogRef.value?.open(3);
  1243. }
  1244. // 新增银行信息成功回调
  1245. const addSuccess = (e) => {
  1246. getBankInfo();
  1247. }
  1248. function closeDiaAdd() {
  1249. dialogInfoTradingAdd.value = false;
  1250. }
  1251. function closeAdd(val) {
  1252. dialogInfoTradingAdd.value = val;
  1253. }
  1254. function confirmToReload() {
  1255. dialogInfoTradingAdd.value = false;
  1256. getBankInfo();
  1257. }
  1258. const getBankInfo = async () => {
  1259. const res = await financialApi.customBankList({})
  1260. if (res.code === Code.StatusOK) {
  1261. ruleForm.bankInfo = []
  1262. ruleForm.bankWrit = []
  1263. ruleForm.xykInfo = []
  1264. ruleForm.bankBlockchain = []
  1265. res.data.forEach(item => {
  1266. item.customBankCode = item.bankCode
  1267. item.bankCode = null
  1268. if (item.type === 1) ruleForm.bankInfo.push(item)
  1269. else if (item.type === 2) ruleForm.bankWrit.push(item)
  1270. else if (item.type === 3) {
  1271. item.expiryYearMonth = `${item.expiryYear}/${item.expiryMonth}`
  1272. ruleForm.xykInfo.push(item)
  1273. } else if (item.type === 4) ruleForm.bankBlockchain.push(item)
  1274. })
  1275. // 如果有默认选中
  1276. const findDefault = (list, type) => list.find(b => b.defaultBank && b.type === type)
  1277. const defaultBank = findDefault(ruleForm.bankInfo, 1)
  1278. const defaultWire = findDefault(ruleForm.bankWrit, 2)
  1279. const defaultCard = findDefault(ruleForm.xykInfo, 3)
  1280. const defaultDigital = findDefault(ruleForm.bankBlockchain, 4)
  1281. if (channelData.value.type === 'BANK' && defaultBank) selectBankCard(defaultBank)
  1282. if (channelData.value.type === 'BANK_TELEGRAPHIC' && defaultWire) selectBankCard(defaultWire)
  1283. if (channelData.value.type === 'CHANNEL_TYPE_CARD' && defaultCard) selectBankCard(defaultCard)
  1284. if (channelData.value.type === 'DIGITAL_CURRENCY' && defaultDigital && defaultDigital.authStatus != 0) selectDigital(defaultDigital)
  1285. } else {
  1286. uni.showToast({ title: res.msg, icon: 'none' })
  1287. }
  1288. }
  1289. const selectBankCard = (item) => {
  1290. const index = bankList.value.findIndex(b => b.id === item.id)
  1291. if (index !== -1) {
  1292. myId.value = item.id
  1293. nextTick(() => {
  1294. Object.assign(form, item)
  1295. })
  1296. }
  1297. }
  1298. const selectDigital = (item) => {
  1299. const index = ruleForm.bankBlockchain.findIndex(b => b.id === item.id)
  1300. if (index !== -1) {
  1301. selectedDigitalIndex.value = item.id
  1302. form.addressName = item.addressName
  1303. form.address = item.address
  1304. form.addressProve = item.addressProve
  1305. }
  1306. }
  1307. const onDigitalCurrencyChange = (val) => {
  1308. const item = ruleForm.bankBlockchain.find(b => b.id === val)
  1309. chooseBank(item.id)
  1310. }
  1311. function chooseBank(id) {
  1312. const item = bankList.value.find(b => b.id === id)
  1313. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1314. if (item.authStatus == 0) {
  1315. showToast(t("Msg.item11"));
  1316. return;
  1317. }
  1318. }
  1319. let codeTmp = "";
  1320. if (form.bankCode) {
  1321. codeTmp = form.bankCode;
  1322. }
  1323. Object.assign(form, item);
  1324. form.agree2 = false;
  1325. form.agree3 = false;
  1326. if (channelData.value.type == "BANK_TELEGRAPHIC") {
  1327. form.currency = "USD";
  1328. if (codeTmp) {
  1329. form.bankCode = codeTmp;
  1330. }
  1331. }
  1332. }
  1333. function selectCode(codeVal) {
  1334. bankDate.value.forEach((item) => {
  1335. if (item.code == codeVal) {
  1336. // item.rate = 1
  1337. // mAmount.minAmount = item.minAmount || mAmount.minAmount;
  1338. // mAmount.maxAmount = item.maxAmount || mAmount.maxAmount;
  1339. channelData.value.rate = item.rate || channelData.value.rate;
  1340. channelData.value.transformCurrency =
  1341. item.currency || channelData.value.transformCurrency;
  1342. channelData.value.feeTypeBank = item.feeType || null;
  1343. channelData.value.freeBank = item.free || 0;
  1344. channelData.value.feeAmountBank = item.feeAmount || null;
  1345. }
  1346. });
  1347. }
  1348. //关闭提交后的弹出框
  1349. function closeDia() {
  1350. resetForm()
  1351. showTable();
  1352. dialogCheck.value = false;
  1353. dialogVisible.value = false;
  1354. }
  1355. //取消
  1356. function cancelCode() {
  1357. dialogDealResult.value = false;
  1358. }
  1359. //提交前弹窗确认
  1360. async function openTips() {
  1361. if (channelData.value.type == "BANK_TELEGRAPHIC" && !myId.value) {
  1362. showToast(t("vaildate.withdrawBank.empty"));
  1363. return;
  1364. }
  1365. if (channelData.value.type == "BANK" && !myId.value) {
  1366. showToast(t("vaildate.withdrawBank.empty"));
  1367. return;
  1368. }
  1369. if (channelData.value.type == "CHANNEL_TYPE_CARD" && !myId.value) {
  1370. showToast(t("vaildate.withdrawBank.empty"));
  1371. return;
  1372. }
  1373. if (channelData.value.type == "DIGITAL_CURRENCY" && !myId.value) {
  1374. showToast(t("blockchain.item11"));
  1375. return;
  1376. }
  1377. try {
  1378. if (formRef.value) {
  1379. const valid = await formRef.value.validate()
  1380. if (dialogTipsIsShow.value) {
  1381. dialogTips.value = true;
  1382. } else {
  1383. submit("form");
  1384. }
  1385. }
  1386. } catch (error) {
  1387. if (error instanceof Array) {
  1388. showToast(error[0].errorMessage);
  1389. return
  1390. } else {
  1391. RES.value = error.msg;
  1392. }
  1393. }
  1394. }
  1395. // 提示同意提交出金
  1396. function closeTipsConfirm() {
  1397. if (isFree.value) {
  1398. dialogTips.value = false;
  1399. if (channelData.value.feeTypeBank) {
  1400. if (channelData.value.feeTypeBank == 1) {
  1401. dialogCheckConfirm_form.feeAmount =
  1402. Number(form.amount || 0) *
  1403. (Number(channelData.value.freeBank || 0) / 100);
  1404. } else if (channelData.value.feeTypeBank == 2) {
  1405. dialogCheckConfirm_form.feeAmount = Number(
  1406. channelData.value.feeAmountBank || 0
  1407. );
  1408. }
  1409. } else {
  1410. if (channelData.value.feeType == 1) {
  1411. dialogCheckConfirm_form.feeAmount =
  1412. Number(form.amount || 0) *
  1413. (Number(channelData.value.free || 0) / 100);
  1414. } else if (channelData.value.feeType == 2) {
  1415. dialogCheckConfirm_form.feeAmount = Number(
  1416. channelData.value.feeAmount || 0
  1417. );
  1418. }
  1419. }
  1420. if (FreeNumber.value > 0) {
  1421. dialogCheckConfirm_form.amount = new Decimal(
  1422. Number(form.amount || 0)
  1423. )
  1424. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1425. .toNumber();
  1426. } else {
  1427. dialogCheckConfirm_form.amount = new Decimal(
  1428. Number(form.amount || 0)
  1429. )
  1430. .sub(
  1431. new Decimal(Number(dialogCheckConfirm_form.feeAmount || 0))
  1432. )
  1433. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1434. .toNumber();
  1435. }
  1436. if (
  1437. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  1438. ) {
  1439. dialogCheckConfirm_form.feeAmount = parseInt(
  1440. dialogCheckConfirm_form.feeAmount
  1441. );
  1442. dialogCheckConfirm_form.amount = parseInt(
  1443. dialogCheckConfirm_form.amount
  1444. );
  1445. }
  1446. dialogCheckConfirm.value = true;
  1447. } else {
  1448. dialogTips.value = false;
  1449. submit("form");
  1450. }
  1451. }
  1452. function getMetaInfo() {
  1453. metaInfo.value = window.getMetaInfo();
  1454. metaInfo.value = { ...metaInfo.value, deviceType: "h5" };
  1455. }
  1456. async function qrCode(serial) {
  1457. getMetaInfo()
  1458. let res = await customApi.getWebsdkLink({
  1459. serial,
  1460. metaInfo: metaInfo.value,
  1461. });
  1462. if (res.code == Code.StatusOK) {
  1463. text1.value = JSON.parse(res.data).url;
  1464. dialogKyc.value = true;
  1465. flag.value = false;
  1466. } else {
  1467. flag.value = false;
  1468. }
  1469. }
  1470. const submitCode = async (code) => {
  1471. console.log(code, 111);
  1472. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1473. dialogDealResult_form.emailCode = code;
  1474. submit("form");
  1475. }
  1476. }
  1477. //提交
  1478. async function submit(formName) {
  1479. console.log(channelData.value, 1212);
  1480. if (channelData.value.type == "BANK_TELEGRAPHIC" && !myId.value) {
  1481. showToast(t("vaildate.withdrawBank.empty"));
  1482. return;
  1483. }
  1484. if (channelData.value.type == "BANK" && !myId.value) {
  1485. showToast(t("vaildate.withdrawBank.empty"));
  1486. return;
  1487. }
  1488. if (channelData.value.type == "CHANNEL_TYPE_CARD" && !myId.value) {
  1489. showToast(t("vaildate.withdrawBank.empty"));
  1490. return;
  1491. }
  1492. if (channelData.value.type == "DIGITAL_CURRENCY" && !myId.value) {
  1493. showToast(t("blockchain.item11"));
  1494. return;
  1495. }
  1496. try {
  1497. if (formRef.value) {
  1498. await formRef.value.validate()
  1499. if (
  1500. channelData.value.type == "DIGITAL_CURRENCY" &&
  1501. !dialogDealResult_form.emailCode
  1502. ) {
  1503. // let res = await financialApi.withdrawCode({});
  1504. // if (res.code == Code.StatusOK) {
  1505. // dialogDealResult = true;
  1506. // } else {
  1507. // $pigeon.MessageWarning(res.msg);
  1508. // }
  1509. dialogDealResult.value = true;
  1510. return;
  1511. }
  1512. // 检查活动参与情况
  1513. // let selectedAccount = loginOptions.find(item => item.login === value);
  1514. // if (selectedAccount) {
  1515. // let activityRes = await activityApi.ActivityGiveLoginParticipate({
  1516. // login: value,
  1517. // platform: selectedAccount.platform,
  1518. // amount: form.amount
  1519. // });
  1520. //
  1521. // if (activityRes.code == Code.StatusOK && activityRes.data === false) {
  1522. // // 使用 Promise 包装确认对话框,等待用户选择
  1523. // try {
  1524. // await new Promise((resolve, reject) => {
  1525. // $pigeon.MessageConfirm(
  1526. // "您参加的活动正在进行中,发起申请后结束活动",
  1527. // $i18n.t("Msg.SystemPrompt"),
  1528. // $i18n.t("Btn.Confirm"),
  1529. // $i18n.t("Btn.Cancel"),
  1530. // () => {
  1531. // resolve(); // 确认时继续执行
  1532. // },
  1533. // () => {
  1534. // reject(); // 取消时阻止执行
  1535. // }
  1536. // );
  1537. // });
  1538. // } catch {
  1539. // return; // 用户点击取消,阻止执行
  1540. // }
  1541. // }
  1542. // }
  1543. if (flag.value) {
  1544. return;
  1545. } else {
  1546. flag.value = true;
  1547. }
  1548. dialogCheckWait.value = true;
  1549. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1550. let res = await financialApi.WithdrawAapplyDigitalCurrency(
  1551. channelData.value.requestUrl,
  1552. {
  1553. ...form,
  1554. login: loginValue.value,
  1555. payType: channelData.value.code,
  1556. emailCode: dialogDealResult_form.emailCode,
  1557. }
  1558. );
  1559. if (res.code == Code.StatusOK) {
  1560. flag.value = false;
  1561. dialogCheck.value = true;
  1562. dialogVisible.value = true;
  1563. // qrCode(res.data)
  1564. } else {
  1565. RES.value = res.msg;
  1566. dialogCheck.value = true;
  1567. dialogVisible.value = false;
  1568. flag.value = false;
  1569. }
  1570. cancelCode();
  1571. } else if (
  1572. channelData.value.type == "CHANNEL_TYPE_WALLET" ||
  1573. channelData.value.type == "UCARD_WALLET" ||
  1574. channelData.value.type == "CHANNEL_TYPE_ALI_WALLET"
  1575. ) {
  1576. let res = await financialApi.WithdrawAapplyDigitalCurrency(
  1577. channelData.value.requestUrl,
  1578. {
  1579. ...form,
  1580. login: loginValue.value,
  1581. payType: channelData.value.code,
  1582. }
  1583. );
  1584. if (res.code == Code.StatusOK) {
  1585. flag.value = false;
  1586. dialogCheck.value = true;
  1587. dialogVisible.value = true;
  1588. // qrCode(res.data)
  1589. } else {
  1590. RES.value = res.msg;
  1591. dialogCheck.value = true;
  1592. dialogVisible.value = false;
  1593. flag.value = false;
  1594. }
  1595. console.log(res, 'res', RES.value);
  1596. } else if (channelData.value.type == "BANK") {
  1597. let res = await financialApi.WithdrawApplyBank(
  1598. channelData.value.requestUrl,
  1599. {
  1600. ...form,
  1601. login: loginValue.value,
  1602. payType: channelData.value.code,
  1603. }
  1604. );
  1605. if (res.code == Code.StatusOK) {
  1606. flag.value = false;
  1607. dialogCheck.value = true;
  1608. dialogVisible.value = true;
  1609. // qrCode(res.data)
  1610. } else {
  1611. RES.value = res.msg;
  1612. dialogCheck.value = true;
  1613. dialogVisible.value = false;
  1614. flag.value = false;
  1615. }
  1616. } else if (channelData.value.type == "BANK_TELEGRAPHIC") {
  1617. let res = await financialApi.WithdrawApplyBank(
  1618. channelData.value.requestUrl,
  1619. {
  1620. ...form,
  1621. login: loginValue.value,
  1622. payType: channelData.value.code,
  1623. }
  1624. );
  1625. if (res.code == Code.StatusOK) {
  1626. flag.value = false;
  1627. dialogCheck.value = true;
  1628. dialogVisible.value = true;
  1629. // qrCode(res.data)
  1630. } else {
  1631. RES.value = res.msg;
  1632. dialogCheck.value = true;
  1633. dialogVisible.value = false;
  1634. flag.value = false;
  1635. }
  1636. } else if (channelData.value.type == "CHANNEL_TYPE_CARD") {
  1637. let res = await financialApi.WithdrawApplyBank(
  1638. channelData.value.requestUrl,
  1639. {
  1640. ...form,
  1641. login: loginValue.value,
  1642. payType: channelData.value.code,
  1643. }
  1644. );
  1645. if (res.code == Code.StatusOK) {
  1646. flag.value = false;
  1647. dialogCheck.value = true;
  1648. dialogVisible.value = true;
  1649. // qrCode(res.data)
  1650. } else {
  1651. RES.value = res.msg;
  1652. dialogCheck.value = true;
  1653. dialogVisible.value = false;
  1654. flag.value = false;
  1655. }
  1656. }
  1657. dialogCheckWait.value = false;
  1658. }
  1659. } catch (error) {
  1660. if (error instanceof Array) {
  1661. showToast(error[0].errorMessage);
  1662. return
  1663. } else {
  1664. RES.value = error.msg;
  1665. dialogCheck.value = true;
  1666. dialogCheckWait.value = false;
  1667. dialogVisible.value = false;
  1668. flag.value = false;
  1669. }
  1670. }
  1671. }
  1672. //初始化
  1673. function Initialize() {
  1674. loginValue.value = "";
  1675. isStep3.value = false;
  1676. step2.value = false;
  1677. step3.value = false;
  1678. showTable();
  1679. }
  1680. //手续费减免次数接口
  1681. async function getFreeNumber() {
  1682. if (!isFree.value) {
  1683. return;
  1684. }
  1685. dialogFreeNumber.value = true;
  1686. let res = await financialApi.remainingReductionNumber({});
  1687. if (res.code == Code.StatusOK) {
  1688. FreeNumber.value = res.data || 0;
  1689. } else {
  1690. showToast(res.msg);
  1691. }
  1692. }
  1693. function toShop() {
  1694. // $router.push({ path: "/shop/home" }).catch((arr) => arr);
  1695. // uni-app 中可能需要使用 uni.navigateTo,此处保留原逻辑但注释掉,因为原代码是 Vue Router
  1696. // 若需要可以改为 uni.navigateTo
  1697. }
  1698. //选择支付方式
  1699. function isShowStep3(row) {
  1700. console.log(row, 222);
  1701. dialogCheckWait.value = false;
  1702. dialogVisible.value = false;
  1703. flag.value = false;
  1704. isStep3.value = true;
  1705. //判断是否有bank
  1706. if (row.bankValid && isChannel.value) {
  1707. getBankList(row);
  1708. isChannel.value = false;
  1709. step3.value = true;
  1710. channelData.value = row;
  1711. mAmount.minAmount = row.minAmount;
  1712. mAmount.maxAmount = row.maxAmount;
  1713. } else {
  1714. step3.value = true;
  1715. bankDate.value = [];
  1716. channelData.value = row;
  1717. mAmount.minAmount = row.minAmount;
  1718. mAmount.maxAmount = row.maxAmount;
  1719. }
  1720. if (row.code == "UNION_PAY_TELEGRAPHIC") {
  1721. WireTransferAccount.value = JSON.parse(row.property);
  1722. }
  1723. if (['BANK', 'BANK_TELEGRAPHIC', 'CHANNEL_TYPE_CARD', 'DIGITAL_CURRENCY'].includes(row.type)) {
  1724. getBankInfo();
  1725. step3_bank_cur.value = "bank";
  1726. form.login = loginValue.value;
  1727. form.payType = row.code;
  1728. bankPayType.value = row.code;
  1729. }
  1730. tableData.Ucard_Wallet = []
  1731. tableData.Digital_Currency = []
  1732. tableData.China_UnionPay = []
  1733. tableData.Electronic_Wallet = []
  1734. tableData.International_Transfer = []
  1735. tableData.CHANNEL_TYPE_CARD = []
  1736. tableData.CHANNEL_TYPE_ALI_WALLET = []
  1737. if (row.type === 'UCARD_WALLET') tableData.Ucard_Wallet = [row]
  1738. if (row.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency = [row]
  1739. if (row.type === 'BANK') tableData.China_UnionPay = [row]
  1740. if (row.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet = [row]
  1741. if (row.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer = [row]
  1742. if (row.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD = [row]
  1743. if (row.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET = [row]
  1744. introduce.introduce = row.introduce
  1745. introduce.enIntroduce = row.enIntroduce
  1746. }
  1747. //更换支付方式
  1748. function showTable() {
  1749. resetForm()
  1750. myId.value = null;
  1751. isChannel.value = true;
  1752. form.currency = "USD";
  1753. }
  1754. //获取账户信息
  1755. async function getDateList() {
  1756. loading.value = true
  1757. let res = await customApi.CustomDropdown({ platform: "" });
  1758. if (res.code == Code.StatusOK) {
  1759. loginOptions.value = res.data.map(item => ({
  1760. ...item,
  1761. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  1762. disable: item.closeFunctions.includes('2')
  1763. }))
  1764. const route = getCurrentPages().pop().$page.options
  1765. if (route.login) {
  1766. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1767. loginValue.value = found.login
  1768. loginValueDoc.value = found.label
  1769. step2.value = true;
  1770. // showTable();
  1771. }
  1772. } else {
  1773. showToast(res.msg);
  1774. }
  1775. loading.value = false
  1776. }
  1777. //获取出金通道
  1778. async function getDepositList() {
  1779. pictLoading.value = true;
  1780. tableData.Ucard_Wallet = [];
  1781. tableData.Digital_Currency = [];
  1782. tableData.China_UnionPay = [];
  1783. tableData.Electronic_Wallet = [];
  1784. tableData.International_Transfer = [];
  1785. tableData.CHANNEL_TYPE_CARD = [];
  1786. tableData.CHANNEL_TYPE_ALI_WALLET = [];
  1787. let res = await financialApi.RemitChannelList({});
  1788. if (res.code == Code.StatusOK) {
  1789. res.data.forEach(item => {
  1790. if (item.type === 'UCARD_WALLET') tableData.Ucard_Wallet.push(item)
  1791. if (item.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency.push(item)
  1792. if (item.type === 'BANK') tableData.China_UnionPay.push(item)
  1793. if (item.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet.push(item)
  1794. if (item.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer.push(item)
  1795. if (item.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD.push(item)
  1796. if (item.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET.push(item)
  1797. })
  1798. pictLoading.value = false;
  1799. } else {
  1800. showToast(res.msg);
  1801. pictLoading.value = false;
  1802. }
  1803. }
  1804. //获取出金通道银行列表
  1805. async function getBankList(row) {
  1806. let res = await financialApi.BankList({
  1807. channelCode: row.code,
  1808. });
  1809. if (res.code == Code.StatusOK) {
  1810. let bank = res.data;
  1811. let data = [];
  1812. bank.forEach((j) => {
  1813. if (!j.minAmount && j.minAmount != 0) {
  1814. j.minAmount = row.minAmount;
  1815. }
  1816. if (!j.maxAmount && j.maxAmount != 0) {
  1817. j.maxAmount = row.maxAmount;
  1818. }
  1819. j.payType = row.code;
  1820. data.push(j);
  1821. });
  1822. bankDate.value = data;
  1823. } else {
  1824. showToast(res.msg);
  1825. }
  1826. }
  1827. //取消
  1828. function cancelBank() {
  1829. dialogNewBank.value = false;
  1830. }
  1831. //24新年庆典
  1832. //是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
  1833. function isNewYear24Open() {
  1834. let endTime1 = "2025/3/31 23:59:59";
  1835. let startTime1 = "2025/1/1 00:00:00";
  1836. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1837. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1838. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1839. let now = new Date(
  1840. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1841. ).getTime();
  1842. let end = new Date(endTime1).getTime();
  1843. let start = new Date(startTime1).getTime();
  1844. if (now < end && start < now) {
  1845. ActivityNewYear24();
  1846. }
  1847. }
  1848. async function ActivityNewYear24() {
  1849. let res = await activityApi.ActivityNewYear24({});
  1850. if (res.code == Code.StatusOK) {
  1851. tableDataNewYear24.value = res.data;
  1852. if (typeof tableDataNewYear24.value == "object") {
  1853. toIncome();
  1854. }
  1855. } else {
  1856. showToast(res.msg);
  1857. }
  1858. }
  1859. function toIncome() {
  1860. NewYear24Data.balance = Number(tableDataNewYear24.value.balance) || 0;
  1861. // let rate = 0;
  1862. tableDataNewYear24.value.details.forEach((item) => {
  1863. if (
  1864. NewYear24Data.balance > item.min &&
  1865. NewYear24Data.balance <= item.max
  1866. ) {
  1867. NewYear24Data.rate = item.rate;
  1868. } else if (
  1869. NewYear24Data.balance > item.min &&
  1870. NewYear24Data.balance >= item.max &&
  1871. item.max == 0
  1872. ) {
  1873. NewYear24Data.rate = item.rate;
  1874. }
  1875. });
  1876. // console.log(NewYear24Data);
  1877. NewYear24Data.income = (
  1878. ((NewYear24Data.balance * NewYear24Data.rate) / 100 / 365) *
  1879. NewYear24RemainingTime()
  1880. ).toFixed(2);
  1881. tableDataNewYear24Flag.value = true;
  1882. }
  1883. function NewYear24RemainingTime() {
  1884. // let endTime1 = '2025/3/31 23:59:59';
  1885. // let startTime1 = '2025/1/1 00:00:00';
  1886. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1887. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1888. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1889. let now = new Date(
  1890. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1891. ).getTime();
  1892. // 获取当前月份的最后一天
  1893. let lastDayOfMonth = getFirstDayOfNextMonth();
  1894. // console.log(lastDayOfMonth);
  1895. let end = new Date(lastDayOfMonth).getTime();
  1896. // let now = new Date('2025/1/31 21:59:59').getTime();
  1897. // let end = new Date('2025/1/31 23:59:59').getTime();
  1898. let time = (end - now) / 60 / 60 / 1000 / 24;
  1899. time = Math.ceil(time);
  1900. return time;
  1901. }
  1902. function getFirstDayOfNextMonth() {
  1903. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1904. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1905. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1906. let now = new Date(
  1907. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1908. );
  1909. let lastDayOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0);
  1910. // console.log(lastDayOfMonth);
  1911. return lastDayOfMonth;
  1912. // const nextMonth = now.getMonth() + 1; // 当前月份加1
  1913. // const nextYear = now.getFullYear(); // 获取当前年份
  1914. // // 如果下个月大于11(即12月),年份需要增加1
  1915. // if (nextMonth > 11) {
  1916. // return new Date(nextYear + 1, 0, 1); // 下一年的1月1日
  1917. // } else {
  1918. // return new Date(nextYear, nextMonth, 1); // 下个月的1日
  1919. // }
  1920. }
  1921. // 新改内容
  1922. // userStore.paymentChannel.value
  1923. // userStore.channelList.value
  1924. const channel = computed(() => userStore.paymentChannel)
  1925. const channelList = computed(() => userStore.channelList)
  1926. const channelListOptions = ref([])
  1927. const channelId = ref(null)
  1928. const loading = ref(false)
  1929. const loginAmount = ref(0)
  1930. const setAllAmount = () => {
  1931. form.amount = loginAmount.value
  1932. validateAmount()
  1933. }
  1934. const allTabs = computed(() => {
  1935. return {
  1936. "Ucard_Wallet": t('card.title'),
  1937. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1938. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1939. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1940. "International_Transfer": t('Custom.Deposit.Channel1'),
  1941. "CHANNEL_TYPE_CARD": t('PersonalManagement.Label.CreditCard'),
  1942. "CHANNEL_TYPE_ALI_WALLET": t('Label.Ali'),
  1943. }
  1944. })
  1945. // 固定顺序数组
  1946. const tabOrder = [
  1947. "Ucard_Wallet",
  1948. "Digital_Currency",
  1949. "China_UnionPay",
  1950. "Electronic_Wallet",
  1951. "International_Transfer",
  1952. "CHANNEL_TYPE_CARD",
  1953. "CHANNEL_TYPE_ALI_WALLET"
  1954. ]
  1955. function formatChannels(data) {
  1956. const result = []
  1957. // 按固定顺序遍历
  1958. for (const key of tabOrder) {
  1959. const list = data[key] || []
  1960. if (list.length) {
  1961. result.push({
  1962. text: allTabs.value[key],
  1963. value: key,
  1964. disable: true
  1965. })
  1966. list.forEach(item => {
  1967. result.push({
  1968. ...item,
  1969. text: item.name,
  1970. value: item.code
  1971. })
  1972. })
  1973. }
  1974. }
  1975. return result
  1976. }
  1977. const showCentAccountTransferTip = (login) => {
  1978. const selectedAccount = loginOptions.value.find(
  1979. (item) => item.login == login,
  1980. );
  1981. if (!selectedAccount) {
  1982. return;
  1983. }
  1984. const isCentAccount =
  1985. selectedAccount.type == "8" || selectedAccount.currency === "USC";
  1986. if (isCentAccount) {
  1987. confirm({
  1988. title: t("Msg.SystemPrompt"),
  1989. content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
  1990. confirmText: t("Btn.Confirm"),
  1991. cancelText: t("Btn.Cancel"),
  1992. })
  1993. }
  1994. }
  1995. // -------------------- lifecycle --------------------
  1996. onMounted(() => {
  1997. if (channelList.value) {
  1998. channelListOptions.value = formatChannels(channelList.value)
  1999. }
  2000. channelId.value = channel.value
  2001. getDateList();
  2002. //调用手续费减免次数接口
  2003. getFreeNumber();
  2004. isNewYear24Open();
  2005. });
  2006. onUnmounted(() => {
  2007. userStore.savePaymentChannel('')
  2008. userStore.saveChannelList('')
  2009. })
  2010. // -------------------- watch --------------------
  2011. watch(channelId, async (newVal) => {
  2012. if (newVal) {
  2013. showTable()
  2014. let row = channelListOptions.value.find(item => item.code == newVal)
  2015. console.log(row, 123123);
  2016. isShowStep3(row)
  2017. validateAmount()
  2018. }
  2019. });
  2020. watch(loginValue, (newVal) => {
  2021. if (newVal) {
  2022. // const found = loginOptions.value.find(opt => opt.login === Number(newVal))
  2023. // loginValueDoc.value = found.label
  2024. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  2025. loginAmount.value = found.balance ? Number(found.balance) : 0
  2026. // showCentAccountTransferTip(Number(newVal))
  2027. showTable();
  2028. validateAmount()
  2029. }
  2030. });
  2031. watch(isStep3, async (newVal) => {
  2032. if (newVal) {
  2033. await nextTick();
  2034. formRef.value?.clearValidate(); // 先清除旧错误
  2035. await nextTick();
  2036. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  2037. }
  2038. });
  2039. watch(() => form.amount, (newVal) => {
  2040. if (newVal && channelData.value.rate) {
  2041. // form.amount1 = (newVal * channelData.rate).toFixed(2);
  2042. if (isFree.value) {
  2043. let feeAmount = 0;
  2044. if (channelData.value.feeTypeBank) {
  2045. if (channelData.value.feeTypeBank == 1) {
  2046. feeAmount =
  2047. Number(newVal || 0) *
  2048. (Number(channelData.value.freeBank || 0) / 100);
  2049. } else if (channelData.value.feeTypeBank == 2) {
  2050. feeAmount = Number(channelData.value.feeAmountBank || 0);
  2051. }
  2052. } else {
  2053. if (channelData.value.feeType == 1) {
  2054. feeAmount =
  2055. Number(newVal || 0) *
  2056. (Number(channelData.value.free || 0) / 100);
  2057. } else if (channelData.value.feeType == 2) {
  2058. feeAmount = Number(channelData.value.feeAmount || 0);
  2059. }
  2060. }
  2061. if (FreeNumber.value > 0) {
  2062. form.amount1 = new Decimal(Number(newVal || 0))
  2063. .mul(new Decimal(Number(channelData.value.rate || 0)))
  2064. .toNumber();
  2065. } else {
  2066. form.amount1 = new Decimal(Number(newVal || 0))
  2067. .sub(new Decimal(Number(feeAmount || 0)))
  2068. .mul(new Decimal(Number(channelData.value.rate || 0)))
  2069. .toNumber();
  2070. }
  2071. } else {
  2072. form.amount1 = (newVal * channelData.value.rate).toFixed(2);
  2073. }
  2074. if (
  2075. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  2076. ) {
  2077. form.amount1 = parseInt(form.amount1);
  2078. }
  2079. }
  2080. });
  2081. </script>
  2082. <style lang="scss" scoped>
  2083. @import "@/uni.scss";
  2084. .card{
  2085. color: var(--bs-emphasis-color);
  2086. }
  2087. .custom-withdraw {
  2088. width: px2rpx(566);
  2089. flex-shrink: 0;
  2090. .box {
  2091. margin-bottom: px2rpx(20);
  2092. .b-card {
  2093. // background: #fff;
  2094. // border-radius: px2rpx(12);
  2095. // padding: px2rpx(20);
  2096. // box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  2097. border: 1px solid var(--bs-border-color);
  2098. .card-top {
  2099. .tit {
  2100. font-size: px2rpx(16);
  2101. font-weight: 600;
  2102. margin-bottom: px2rpx(16);
  2103. display: flex;
  2104. align-items: center;
  2105. color: var(--bs-heading-color);
  2106. position: relative;
  2107. // padding-left: 20px;
  2108. // &:after {
  2109. // content: '';
  2110. // position: absolute;
  2111. // left: 0;
  2112. // top: 50%;
  2113. // transform: translateY(-50%);
  2114. // width: 0;
  2115. // height: 0;
  2116. // border-top: 6px solid transparent;
  2117. // border-bottom: 6px solid transparent;
  2118. // border-left: 8px solid currentColor;
  2119. // }
  2120. .iconfont {
  2121. margin-right: px2rpx(8);
  2122. color: var(--color-primary);
  2123. font-size: px2rpx(18);
  2124. }
  2125. }
  2126. }
  2127. .channelType {
  2128. font-size: px2rpx(15);
  2129. font-weight: 600;
  2130. margin: px2rpx(24) 0 px2rpx(12);
  2131. color: var(--color-navy-700);
  2132. padding-left: px2rpx(8);
  2133. border-left: px2rpx(4) solid var(--color-primary);
  2134. }
  2135. }
  2136. }
  2137. .reselect-btn {
  2138. margin-top: px2rpx(20);
  2139. display: flex;
  2140. justify-content: flex-end;
  2141. }
  2142. .s-btn {
  2143. &.reselect {
  2144. background-color: var(--color-zinc-100);
  2145. color: var(--color-navy-700);
  2146. border: none;
  2147. font-size: px2rpx(14);
  2148. padding: px2rpx(8) px2rpx(20);
  2149. border-radius: px2rpx(8);
  2150. &:active {
  2151. background-color: var(--color-zinc-200);
  2152. }
  2153. }
  2154. &[type="primary"] {
  2155. width: 100%;
  2156. height: px2rpx(48);
  2157. background-color: #cf1322;
  2158. color: var(--bs-emphasis-color);
  2159. border-radius: px2rpx(12);
  2160. font-size: px2rpx(16);
  2161. font-weight: 600;
  2162. display: flex;
  2163. align-items: center;
  2164. justify-content: center;
  2165. border: none;
  2166. margin-top: px2rpx(30);
  2167. transition: all 0.2s;
  2168. &:active {
  2169. transform: scale(0.98);
  2170. background-color: #cf1322;
  2171. }
  2172. }
  2173. }
  2174. .add-back {
  2175. display: flex;
  2176. justify-content: space-between;
  2177. align-items: center;
  2178. margin-bottom: px2rpx(12);
  2179. padding: px2rpx(12) px2rpx(16);
  2180. text {
  2181. font-size: px2rpx(14);
  2182. color: var(--color-navy-700);
  2183. font-weight: 500;
  2184. }
  2185. .add-btn {
  2186. color: var(--color-primary);
  2187. font-weight: 600;
  2188. text-decoration: underline;
  2189. &:active {
  2190. opacity: 0.7;
  2191. }
  2192. }
  2193. }
  2194. .proof {
  2195. margin-top: px2rpx(8);
  2196. border: px2rpx(1) dashed var(--color-zinc-300);
  2197. border-radius: px2rpx(8);
  2198. padding: px2rpx(8);
  2199. display: flex;
  2200. justify-content: center;
  2201. align-items: center;
  2202. background: var(--color-zinc-50);
  2203. .state {
  2204. padding: px2rpx(4) px2rpx(12);
  2205. border-radius: px2rpx(4);
  2206. font-size: px2rpx(12);
  2207. font-weight: bold;
  2208. }
  2209. }
  2210. .agree {
  2211. margin: px2rpx(24) 0;
  2212. display: flex;
  2213. align-items: flex-start;
  2214. .checkbox {
  2215. display: flex;
  2216. align-items: flex-start;
  2217. gap: px2rpx(8);
  2218. :deep(uni-checkbox .uni-checkbox-input) {
  2219. border-radius: px2rpx(4);
  2220. width: px2rpx(18);
  2221. height: px2rpx(18);
  2222. }
  2223. text {
  2224. font-size: px2rpx(13);
  2225. color: var(--color-zinc-500);
  2226. line-height: 1.5;
  2227. }
  2228. }
  2229. }
  2230. .step3-attention {
  2231. // background: var(--color-error-50, #fff1f0);
  2232. border-radius: px2rpx(12);
  2233. margin-bottom: px2rpx(20);
  2234. .tips {
  2235. line-height: 1.8;
  2236. font-size: px2rpx(12);
  2237. color: var(--bs-heading-color);
  2238. padding: px2rpx(12);
  2239. border-radius: px2rpx(4);
  2240. border-left: px2rpx(2) solid #cf1322;
  2241. .title {
  2242. font-weight: 600;
  2243. margin-bottom: px2rpx(6);
  2244. color: var(--bs-heading-color);
  2245. }
  2246. }
  2247. .attention {
  2248. font-size: px2rpx(14);
  2249. // color: var(--color-error-600, #cf1322);
  2250. line-height: 1.6;
  2251. }
  2252. .btn-bottom {
  2253. margin-top: px2rpx(20);
  2254. display: flex;
  2255. justify-content: center;
  2256. .btn {
  2257. background: var(--color-error-600, #cf1322);
  2258. color: var(--bs-emphasis-color);
  2259. padding: px2rpx(10) px2rpx(48);
  2260. border-radius: px2rpx(24);
  2261. font-size: px2rpx(15);
  2262. font-weight: 700;
  2263. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  2264. transition: all 0.2s;
  2265. &:active {
  2266. transform: scale(0.96);
  2267. opacity: 0.8;
  2268. }
  2269. }
  2270. }
  2271. }
  2272. :deep(.base-info-form) {
  2273. .uni-row1 {
  2274. .uni-col {
  2275. padding: 0 px2rpx(10) !important;
  2276. }
  2277. .uni-forms-item {
  2278. min-height: px2rpx(36);
  2279. margin-bottom: px2rpx(28);
  2280. }
  2281. .uni-easyinput__content-input {
  2282. height: px2rpx(35) !important;
  2283. }
  2284. }
  2285. }
  2286. @keyframes rotate {
  2287. from {
  2288. transform: rotate(0deg);
  2289. }
  2290. to {
  2291. transform: rotate(360deg);
  2292. }
  2293. }
  2294. }
  2295. .amount-box {
  2296. display: flex;
  2297. align-items: center;
  2298. gap: px2rpx(12);
  2299. .amount-input {
  2300. flex: 1;
  2301. }
  2302. // .btn {
  2303. // display: flex;
  2304. // align-items: center;
  2305. // justify-content: center;
  2306. // font-size: px2rpx(14);
  2307. // margin-bottom: px2rpx(12);
  2308. // height: px2rpx(35);
  2309. // background-color: #cf1322;
  2310. // color: #fff;
  2311. // border-radius: px2rpx(4);
  2312. // font-weight: 600;
  2313. // border: none;
  2314. // padding: 0 px2rpx(20);
  2315. // margin-top: px2rpx(21);
  2316. // cursor: pointer;
  2317. // }
  2318. }
  2319. .amount-box1 {
  2320. align-items: flex-start;
  2321. .btn {
  2322. margin-top: px2rpx(0);
  2323. }
  2324. }
  2325. .custom-deposit-container {
  2326. width: 100%;
  2327. display: flex;
  2328. gap: px2rpx(60);
  2329. justify-content: space-between;
  2330. }
  2331. @media (max-width: 992px) {
  2332. .custom-withdraw {
  2333. width: 100%;
  2334. margin-top: px2rpx(20);
  2335. }
  2336. .custom-deposit-container {
  2337. display: flex;
  2338. gap: px2rpx(30);
  2339. flex-wrap: wrap;
  2340. }
  2341. }
  2342. </style>