withdrawal.vue 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455
  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="onAccountChange" />
  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')">
  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="'Custom.Withdraw.Title6'"></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>
  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="imgUrl + 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">
  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-dark 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>
  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')">
  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="imgUrl + 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 } = 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. const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
  661. // 获取组件实例,用于访问全局挂载的属性和方法(替代 this)
  662. const { proxy } = getCurrentInstance()
  663. // -------------------- data --------------------
  664. const loginValue = ref("")
  665. const loginValueDoc = ref("")
  666. const hiddenSelect = ref(false)
  667. const metaInfo = ref(null)
  668. const text1 = ref("")
  669. // const logoImageRef = logoImage
  670. const dialogCheck1 = ref(false)
  671. const flag = ref(false)
  672. const RES = ref("")
  673. //银行
  674. const openType = ref("") //弹出类别
  675. const dialogInfoTradingAdd = ref(false) //新增
  676. const ruleForm = reactive({
  677. bankInfo: [], //银行信息
  678. bankWrit: [], //电汇信息
  679. xykInfo: [], //信用卡信息
  680. bankBlockchain: [], //区块链
  681. })
  682. const imgUrl = Host80 //图片地址
  683. const loginOptions = ref([])
  684. const value = ref("") //账号
  685. const code = ref("") //通道code
  686. const bankValid = ref("") //通道是否有银行
  687. const requestUrl = ref("") //通道地址
  688. const isStep3 = ref(false)
  689. const step2 = ref(false)
  690. const step3 = ref(false)
  691. const dialogCheckTip = ref(false)
  692. const isChannel = ref(true)
  693. const pictLoading = ref(false)
  694. const tableData = reactive({
  695. Digital_Currency: [],
  696. China_UnionPay: [],
  697. Electronic_Wallet: [],
  698. International_Transfer: [],
  699. CHANNEL_TYPE_CARD: [],
  700. CHANNEL_TYPE_ALI_WALLET: [],
  701. Ucard_Wallet: [],
  702. })
  703. //通道table-选择前后
  704. const activeTab = ref(1)
  705. // 🔥 自动过滤掉空数据的 tab
  706. const tabsConfig = computed(() => {
  707. const allTabs = [
  708. { text: t('Custom.Deposit.Channel3'), value: 1, type: 'Digital_Currency' },
  709. { text: t('Custom.Deposit.Channel2'), value: 2, type: 'China_UnionPay' },
  710. { text: t('Custom.Deposit.Channel4'), value: 3, type: 'Electronic_Wallet' },
  711. { text: t('Custom.Deposit.Channel1'), value: 4, type: 'International_Transfer' },
  712. { text: t('PersonalManagement.Label.CreditCard'), value: 5, type: 'CHANNEL_TYPE_CARD' },
  713. { text: t('card.title'), value: 6, type: 'Ucard_Wallet' },
  714. { text: t('Label.Ali'), value: 7, type: 'CHANNEL_TYPE_ALI_WALLET' },
  715. ]
  716. // ✅ 只保留有数据的 tab
  717. return allTabs.filter(tab => {
  718. return tableData[tab.type]?.length > 0
  719. })
  720. })
  721. // 当前选中的 tab 项
  722. const currentTab = computed(() => tabsConfig.value.find(t => t.value === activeTab.value))
  723. // 当前要渲染的表格数据
  724. const currentTableData = computed(() => {
  725. const type = currentTab.value?.type
  726. return type ? tableData[type] || [] : []
  727. })
  728. const bankDate = ref([]) //通道下的银行列表
  729. const channelData = ref({}) //当前选择的通道信息
  730. const WireTransferAccount = ref({}) //银行电汇信息
  731. //表单
  732. const form = reactive({
  733. currency: "USD",
  734. amount: "",
  735. amount1: "",
  736. bankCode: '', // 银行代码(普通银行通道选择)
  737. address: '', // 电子钱包地址 / 数字货币地址(输入/展示)
  738. addressName: '', // 数字货币地址名称(展示)
  739. addressProve: '', // 数字货币地址证明文件路径(仅展示))
  740. bankUname: '', // 持卡人姓名
  741. bankCardNum: '', // 银行卡号
  742. bankName: '', // 银行名称
  743. bankBranchName: '', // 支行名称
  744. swiftCode: '', // SWIFT代码
  745. customBankCode: '', // 自定义银行代码
  746. bankAddr: '', // 银行地址
  747. agencyNo: '', // 代理机构编号(电汇专用,可编辑)
  748. cpf: '', // CPF号码(电汇专用,可编辑)
  749. cvv: '', // CVV码(电汇专用,可编辑)
  750. expiryYearMonth: '', // 过期年(电汇专用,可编辑)
  751. agree2: false, // 协议勾选2
  752. agree3: false // 协议勾选3(当dialogTipsIsShow为true时显示)
  753. })
  754. const formRef = ref(null)
  755. const resetForm = () => {
  756. //表单重置后,需要手动重置一些状态
  757. form.amount = ""
  758. form.amount1 = ""
  759. form.bankCode = ""
  760. form.address = ""
  761. form.addressName = ""
  762. form.addressProve = ""
  763. form.bankUname = ""
  764. form.bankCardNum = ""
  765. form.swiftCode = ""
  766. form.customBankCode = ""
  767. form.bankAddr = ""
  768. form.agencyNo = ""
  769. form.bankName = ""
  770. form.cpf = ""
  771. form.bankBranchName = ""
  772. form.cpf = ""
  773. form.cvv = ""
  774. form.expiryYearMonth = ""
  775. form.agree2 = false
  776. form.agree3 = false
  777. amountErrorMessage.value = ""
  778. dialogDealResult_form.emailCode = ''
  779. }
  780. //数量区间
  781. const mAmount = reactive({
  782. minAmount: "",
  783. maxAmount: "",
  784. })
  785. const introduce = reactive({
  786. introduce: "",
  787. enIntroduce: "",
  788. })
  789. //银行列表
  790. const bankInfoList = ref([])
  791. const bank = ref("")
  792. const myId = ref(null) //银行列表id
  793. const bankPayType = ref("") //临时放置通道code
  794. //银联/数字货币
  795. const step3_bank_cur = ref("")
  796. const agree2 = ref(false) //条款
  797. //数字表单
  798. const form1 = ref({})
  799. const dialogCheck = ref(false)
  800. const dialogKyc = ref(false)
  801. const dialogVisible = ref(false)
  802. const dialogCheckWait = ref(false)
  803. //新建银行弹窗
  804. const dialogNewBank = ref(false)
  805. const params = reactive({
  806. bankCardNum: "",
  807. bankUname: "",
  808. bankName: "",
  809. bankBranchName: "",
  810. bankAddr: "",
  811. swiftCode: "",
  812. bankFront: "",
  813. bankBack: "",
  814. defaultBank: false,
  815. })
  816. const dialogDealResult = ref(false)
  817. const emailCodeApi = ref(financialApi.withdrawCode)
  818. const dialogDealResult_form = reactive({
  819. emailCode: "", //数字货币出金,验证码
  820. })
  821. const dialogTips = ref(false) //提交时的确认弹窗
  822. const dialogTipsIsShow = ref(true) //提交时的确认弹窗-是否显示
  823. const dialogFreeNumber = ref(false) //可减免手续费用次数弹窗
  824. const FreeNumber = ref(0)
  825. const dialogCheckConfirm = ref(false)
  826. const dialogCheckConfirm_form = reactive({
  827. amount: "",
  828. feeAmount: "",
  829. })
  830. const tableDataNewYear24Flag = ref(false) //24新年庆典
  831. const tableDataNewYear24 = ref(false) //24新年庆典
  832. const NewYear24Data = reactive({
  833. balance: 0,
  834. income: 0,
  835. rate: 0,
  836. })
  837. const rules = computed(() => ({
  838. myId: {
  839. rules: [
  840. {
  841. required: true,
  842. errorMessage: t('vaildate.select.empty'),
  843. trigger: 'change',
  844. },
  845. ],
  846. },
  847. bankUname: {
  848. rules: [
  849. {
  850. required: true,
  851. errorMessage: t('vaildate.select.empty'),
  852. trigger: 'change',
  853. },
  854. ],
  855. },
  856. bankCode: {
  857. rules: [
  858. {
  859. required: true,
  860. errorMessage: t('vaildate.select.empty'),
  861. trigger: 'change',
  862. },
  863. ],
  864. },
  865. address: {
  866. rules: [
  867. {
  868. required: true,
  869. errorMessage: t('vaildate.input.empty'),
  870. trigger: 'blur',
  871. },
  872. ],
  873. },
  874. amount: {
  875. rules: [
  876. {
  877. required: true,
  878. errorMessage: t('vaildate.amount.format'),
  879. },
  880. {
  881. validateFunction: (rule, value, data, callback) => {
  882. if (
  883. !!value &&
  884. (mAmount.minAmount > value || mAmount.maxAmount < value)
  885. ) {
  886. callback(
  887. t('vaildate.amount.amount') +
  888. mAmount.minAmount +
  889. ' - ' +
  890. mAmount.maxAmount
  891. );
  892. return false;
  893. }
  894. if (/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  895. return true;
  896. } else {
  897. callback(t('vaildate.amount.format'));
  898. return false;
  899. }
  900. },
  901. trigger: 'blur',
  902. },
  903. ],
  904. },
  905. agree2: {
  906. rules: [
  907. {
  908. validateFunction: (rule, value, data, callback) => {
  909. if (form.agree2) {
  910. return true;
  911. } else {
  912. callback(t('vaildate.agree.empty'));
  913. return false;
  914. }
  915. },
  916. trigger: 'change',
  917. },
  918. ],
  919. },
  920. agree3: {
  921. rules: [
  922. {
  923. validateFunction: (rule, value, data, callback) => {
  924. if (form.agree3) {
  925. return true;
  926. } else {
  927. callback(t('vaildate.agree.empty'));
  928. return false;
  929. }
  930. },
  931. trigger: 'change',
  932. },
  933. ],
  934. },
  935. agencyNo: {
  936. rules: [
  937. {
  938. required: true,
  939. errorMessage: t('vaildate.input.empty'),
  940. trigger: 'blur',
  941. },
  942. ],
  943. },
  944. cpf: {
  945. rules: [
  946. {
  947. required: true,
  948. errorMessage: t('vaildate.input.empty'),
  949. trigger: 'blur',
  950. },
  951. ],
  952. },
  953. emailCode: {
  954. rules: [
  955. {
  956. required: true,
  957. errorMessage: t('vaildate.code.empty'),
  958. trigger: 'blur',
  959. },
  960. ],
  961. },
  962. }));
  963. // 验证金额
  964. const amountErrorMessage = ref('')
  965. const validateAmount = () => {
  966. const amount = form.amount
  967. if (!amount && amount !== 0) {
  968. amountErrorMessage.value = t('vaildate.amount.format')
  969. return false
  970. }
  971. if (mAmount.minAmount && mAmount.maxAmount) {
  972. const min = Number(mAmount.minAmount);
  973. const max = Number(mAmount.maxAmount);
  974. const numValue = Number(amount);
  975. if (numValue < min || numValue > max) {
  976. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  977. return false
  978. }
  979. }
  980. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  981. amountErrorMessage.value = t('vaildate.amount.format')
  982. return false
  983. }
  984. amountErrorMessage.value = ''
  985. return true
  986. }
  987. // 分组标题映射
  988. const groupTitleMap = {
  989. 'Ucard_Wallet': 'card.title',
  990. 'Digital_Currency': 'Custom.Deposit.Channel3',
  991. 'China_UnionPay': 'Custom.Deposit.Channel2',
  992. 'Electronic_Wallet': 'Custom.Deposit.Channel4',
  993. 'International_Transfer': 'Custom.Deposit.Channel1',
  994. 'CHANNEL_TYPE_CARD': 'PersonalManagement.Label.CreditCard',
  995. 'CHANNEL_TYPE_ALI_WALLET': 'Label.Ali'
  996. }
  997. // -------------------- computed --------------------
  998. const getWalletLabel = computed(() => {
  999. if (channelData.value.type === 'CHANNEL_TYPE_WALLET') return t('Custom.Withdraw.Title7')
  1000. if (channelData.value.type === 'UCARD_WALLET') return t('card.title')
  1001. if (channelData.value.type === 'CHANNEL_TYPE_ALI_WALLET') return t('Label.AliAccout')
  1002. return ''
  1003. })
  1004. // 最后确认
  1005. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  1006. // 最后失败
  1007. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  1008. const loginComboxOptions = computed(() => {
  1009. return loginOptions.value.map((item, index) => ({
  1010. text: item.label,
  1011. value: item.login
  1012. }))
  1013. })
  1014. const bankOptions = computed(() => {
  1015. return bankDate.value.map((item, index) => ({
  1016. text: isZh.value ? item.name : item.enName,
  1017. value: item.code
  1018. }))
  1019. })
  1020. const digitalOptions = computed(() => {
  1021. return ruleForm.bankBlockchain.map((item, index) => ({
  1022. text: `${item.addressName}-${item.address}`,
  1023. value: item.id,
  1024. disable: item.authStatus == 0,
  1025. }))
  1026. })
  1027. const bankCardOptions = computed(() => {
  1028. return bankList.value.map((item, index) => ({
  1029. text: getBankLabel(item),
  1030. value: item.id
  1031. }))
  1032. })
  1033. const getBankLabel = (item) => {
  1034. if (channelData.value.type === 'BANK' || channelData.value.type === 'BANK_TELEGRAPHIC') {
  1035. return `${item.bankName}-${item.bankCardNum}`
  1036. } else if (channelData.value.type === 'CHANNEL_TYPE_CARD') {
  1037. return item.bankCardNum
  1038. }
  1039. return ''
  1040. }
  1041. const bankList = computed(() => {
  1042. if (channelData.value.type === 'BANK') return ruleForm.bankInfo
  1043. if (channelData.value.type === 'BANK_TELEGRAPHIC') return ruleForm.bankWrit
  1044. if (channelData.value.type === 'CHANNEL_TYPE_CARD') return ruleForm.xykInfo
  1045. if (channelData.value.type === 'DIGITAL_CURRENCY') return ruleForm.bankBlockchain
  1046. return []
  1047. })
  1048. const isFree = computed(() => {
  1049. let flag = false;
  1050. let startTime1 = "2024/11/01 00:00:00";
  1051. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1052. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1053. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1054. let now = new Date(
  1055. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1056. ).getTime();
  1057. let start = new Date(startTime1).getTime();
  1058. if (now > start) {
  1059. flag = true;
  1060. }
  1061. return flag;
  1062. })
  1063. // -------------------- methods --------------------
  1064. const groupCurrency = (type) => {
  1065. const symbol = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }[type] || '$'
  1066. return `: ${symbol}`
  1067. }
  1068. const groupCurrency1 = (type) => {
  1069. const symbol = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }[type] || '$'
  1070. return `${symbol}`
  1071. }
  1072. function groupTypeName(type) {
  1073. if (type == "1") {
  1074. return t("AccountType.ClassicAccount");
  1075. } else if (type == "2") {
  1076. return t("AccountType.SeniorAccount");
  1077. } else if (type == "3") {
  1078. return isAfterJuly28() ? "--" : t("AccountType.AgencyAccount");
  1079. } else if (type == "5") {
  1080. return t("AccountType.SpeedAccount");
  1081. } else if (type == "6") {
  1082. return t("AccountType.SpeedAccount");
  1083. } else if (type == "7") {
  1084. return t("AccountType.StandardAccount");
  1085. } else if (type == "8") {
  1086. return t("AccountType.CentAccount");
  1087. }
  1088. }
  1089. //回显
  1090. const onAgree3Change = (e) => {
  1091. form.agree3 = e.detail.value.length > 0
  1092. }
  1093. const onAgree2Change = (e) => {
  1094. form.agree2 = e.detail.value.length > 0
  1095. }
  1096. function selectChange() {
  1097. // proxy.$forceUpdate();
  1098. }
  1099. //新增
  1100. // function openAddBankCard(type) {
  1101. // if (type == "add_bankCard") {
  1102. // if (ruleForm.bankInfo.length == 2) {
  1103. // proxy.$pigeon.MessageConfirm(
  1104. // t("Msg.UnionPayCARDS"),
  1105. // t("Msg.SystemPrompt"),
  1106. // t("Btn.Confirm"),
  1107. // t("Btn.Cancel"),
  1108. // async function () { },
  1109. // function () { }
  1110. // );
  1111. // } else {
  1112. // openType.value = "add_bankCard";
  1113. // dialogInfoTradingAdd.value = true;
  1114. // }
  1115. // } else if (type == "add_wireTransfer") {
  1116. // if (ruleForm.bankWrit.length == 2) {
  1117. // proxy.$pigeon.MessageConfirm(
  1118. // t("Msg.WireTransfers"),
  1119. // t("Msg.SystemPrompt"),
  1120. // t("Btn.Confirm"),
  1121. // t("Btn.Cancel"),
  1122. // async function () { },
  1123. // function () { }
  1124. // );
  1125. // } else {
  1126. // openType.value = "add_wireTransfer";
  1127. // dialogInfoTradingAdd.value = true;
  1128. // }
  1129. // } else if (type == "add_CreditCard") {
  1130. // openType.value = "add_CreditCard";
  1131. // dialogInfoTradingAdd.value = true;
  1132. // } else if (type == "add_bankBlockchain") {
  1133. // if (ruleForm.bankBlockchain.length == 2) {
  1134. // proxy.$pigeon.MessageConfirm(
  1135. // t("blockchain.item9"),
  1136. // t("Msg.SystemPrompt"),
  1137. // t("Btn.Confirm"),
  1138. // t("Btn.Cancel"),
  1139. // async function () { },
  1140. // function () { }
  1141. // );
  1142. // } else {
  1143. // openType.value = "add_bankBlockchain";
  1144. // dialogInfoTradingAdd.value = true;
  1145. // }
  1146. // }
  1147. // }
  1148. // 新增银行信息
  1149. const addBankDialogRef = ref(null);
  1150. function openAddBankCard(type) {
  1151. console.log(type, 121212)
  1152. switch (type) {
  1153. case 'add_bankBlockchain':
  1154. openAddCrypto()
  1155. break;
  1156. case 'add_bankCard':
  1157. openAddUnionpay()
  1158. break;
  1159. case 'add_wireTransfer':
  1160. openAddBank()
  1161. break;
  1162. case 'add_CreditCard':
  1163. openAddCredit()
  1164. break;
  1165. }
  1166. }
  1167. function openAddCrypto() {
  1168. const wallets = bankCardOptions.value || []
  1169. // 1️⃣ 没有钱包
  1170. if (wallets.length === 0) {
  1171. addBankDialogRef.value?.open(4);
  1172. return;
  1173. }
  1174. // 2️⃣ 是否存在未认证钱包
  1175. const hasUnAuth = wallets.some(
  1176. item => item.authStatus === 0 || item.approveStatus === 1
  1177. );
  1178. if (hasUnAuth) {
  1179. uni.showToast({
  1180. title: "加密钱包未认证",
  1181. icon: "none"
  1182. });
  1183. return;
  1184. }
  1185. // 3️⃣ 是否达到上限
  1186. if (wallets.length >= 2) {
  1187. uni.showToast({
  1188. title: t('blockchain.item9'),
  1189. icon: "none"
  1190. });
  1191. return;
  1192. }
  1193. // 4️⃣ 正常打开
  1194. addBankDialogRef.value?.open(4);
  1195. }
  1196. function openAddUnionpay() {
  1197. const wallets = bankCardOptions.value || []
  1198. if (wallets.length === 0) {
  1199. addBankDialogRef.value?.open(1);
  1200. return;
  1201. }
  1202. if (wallets.length >= 2) {
  1203. uni.showToast({
  1204. title: t('Msg.UnionPayCARDS'),
  1205. icon: "none"
  1206. });
  1207. return;
  1208. }
  1209. addBankDialogRef.value?.open(1);
  1210. }
  1211. function openAddBank() {
  1212. const wallets = bankCardOptions.value || []
  1213. if (wallets.length === 0) {
  1214. addBankDialogRef.value?.open(2);
  1215. return;
  1216. }
  1217. if (wallets.length >= 2) {
  1218. uni.showToast({
  1219. title: t('Msg.WireTransfers'),
  1220. icon: "none"
  1221. });
  1222. return;
  1223. }
  1224. addBankDialogRef.value?.open(2);
  1225. }
  1226. function openAddCredit() {
  1227. const wallets = bankCardOptions.value || []
  1228. if (wallets.length === 0) {
  1229. addBankDialogRef.value?.open(3);
  1230. return;
  1231. }
  1232. addBankDialogRef.value?.open(3);
  1233. }
  1234. // 新增银行信息成功回调
  1235. const addSuccess = (e) => {
  1236. getBankInfo();
  1237. }
  1238. function closeDiaAdd() {
  1239. dialogInfoTradingAdd.value = false;
  1240. }
  1241. function closeAdd(val) {
  1242. dialogInfoTradingAdd.value = val;
  1243. }
  1244. function confirmToReload() {
  1245. dialogInfoTradingAdd.value = false;
  1246. getBankInfo();
  1247. }
  1248. const getBankInfo = async () => {
  1249. const res = await financialApi.customBankList({})
  1250. if (res.code === Code.StatusOK) {
  1251. ruleForm.bankInfo = []
  1252. ruleForm.bankWrit = []
  1253. ruleForm.xykInfo = []
  1254. ruleForm.bankBlockchain = []
  1255. res.data.forEach(item => {
  1256. item.customBankCode = item.bankCode
  1257. item.bankCode = null
  1258. if (item.type === 1) ruleForm.bankInfo.push(item)
  1259. else if (item.type === 2) ruleForm.bankWrit.push(item)
  1260. else if (item.type === 3) {
  1261. item.expiryYearMonth = `${item.expiryYear}/${item.expiryMonth}`
  1262. ruleForm.xykInfo.push(item)
  1263. } else if (item.type === 4) ruleForm.bankBlockchain.push(item)
  1264. })
  1265. // 如果有默认选中
  1266. const findDefault = (list, type) => list.find(b => b.defaultBank && b.type === type)
  1267. const defaultBank = findDefault(ruleForm.bankInfo, 1)
  1268. const defaultWire = findDefault(ruleForm.bankWrit, 2)
  1269. const defaultCard = findDefault(ruleForm.xykInfo, 3)
  1270. const defaultDigital = findDefault(ruleForm.bankBlockchain, 4)
  1271. if (channelData.value.type === 'BANK' && defaultBank) selectBankCard(defaultBank)
  1272. if (channelData.value.type === 'BANK_TELEGRAPHIC' && defaultWire) selectBankCard(defaultWire)
  1273. if (channelData.value.type === 'CHANNEL_TYPE_CARD' && defaultCard) selectBankCard(defaultCard)
  1274. if (channelData.value.type === 'DIGITAL_CURRENCY' && defaultDigital && defaultDigital.authStatus === 1) selectDigital(defaultDigital)
  1275. } else {
  1276. uni.showToast({ title: res.msg, icon: 'none' })
  1277. }
  1278. }
  1279. const selectBankCard = (item) => {
  1280. const index = bankList.value.findIndex(b => b.id === item.id)
  1281. if (index !== -1) {
  1282. myId.value = item.id
  1283. nextTick(() => {
  1284. Object.assign(form, item)
  1285. })
  1286. }
  1287. }
  1288. const selectDigital = (item) => {
  1289. const index = ruleForm.bankBlockchain.findIndex(b => b.id === item.id)
  1290. if (index !== -1) {
  1291. selectedDigitalIndex.value = item.id
  1292. form.addressName = item.addressName
  1293. form.address = item.address
  1294. form.addressProve = item.addressProve
  1295. }
  1296. }
  1297. const onDigitalCurrencyChange = (val) => {
  1298. const item = ruleForm.bankBlockchain.find(b => b.id === val)
  1299. chooseBank(item.id)
  1300. }
  1301. function chooseBank(id) {
  1302. const item = bankList.value.find(b => b.id === id)
  1303. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1304. if (item.authStatus == 0) {
  1305. showToast(t("Msg.item11"));
  1306. return;
  1307. }
  1308. }
  1309. let codeTmp = "";
  1310. if (form.bankCode) {
  1311. codeTmp = form.bankCode;
  1312. }
  1313. Object.assign(form, item);
  1314. form.agree2 = false;
  1315. form.agree3 = false;
  1316. if (channelData.value.type == "BANK_TELEGRAPHIC") {
  1317. form.currency = "USD";
  1318. if (codeTmp) {
  1319. form.bankCode = codeTmp;
  1320. }
  1321. }
  1322. }
  1323. function selectCode(codeVal) {
  1324. bankDate.value.forEach((item) => {
  1325. if (item.code == codeVal) {
  1326. // item.rate = 1
  1327. // mAmount.minAmount = item.minAmount || mAmount.minAmount;
  1328. // mAmount.maxAmount = item.maxAmount || mAmount.maxAmount;
  1329. channelData.value.rate = item.rate || channelData.value.rate;
  1330. channelData.value.transformCurrency =
  1331. item.currency || channelData.value.transformCurrency;
  1332. channelData.value.feeTypeBank = item.feeType || null;
  1333. channelData.value.freeBank = item.free || 0;
  1334. channelData.value.feeAmountBank = item.feeAmount || null;
  1335. }
  1336. });
  1337. }
  1338. //关闭提交后的弹出框
  1339. function closeDia() {
  1340. resetForm()
  1341. showTable();
  1342. dialogCheck.value = false;
  1343. dialogVisible.value = false;
  1344. }
  1345. //取消
  1346. function cancelCode() {
  1347. dialogDealResult.value = false;
  1348. }
  1349. //提交前弹窗确认
  1350. async function openTips() {
  1351. if (channelData.value.type == "BANK_TELEGRAPHIC" && !myId.value) {
  1352. showToast(t("vaildate.withdrawBank.empty"));
  1353. return;
  1354. }
  1355. if (channelData.value.type == "BANK" && !myId.value) {
  1356. showToast(t("vaildate.withdrawBank.empty"));
  1357. return;
  1358. }
  1359. if (channelData.value.type == "CHANNEL_TYPE_CARD" && !myId.value) {
  1360. showToast(t("vaildate.withdrawBank.empty"));
  1361. return;
  1362. }
  1363. if (channelData.value.type == "DIGITAL_CURRENCY" && !myId.value) {
  1364. showToast(t("blockchain.item11"));
  1365. return;
  1366. }
  1367. try {
  1368. if (formRef.value) {
  1369. const valid = await formRef.value.validate()
  1370. if (dialogTipsIsShow.value) {
  1371. dialogTips.value = true;
  1372. } else {
  1373. submit("form");
  1374. }
  1375. }
  1376. } catch (error) {
  1377. if (error instanceof Array) {
  1378. showToast(error[0].errorMessage);
  1379. return
  1380. } else {
  1381. RES.value = error.msg;
  1382. }
  1383. }
  1384. }
  1385. // 提示同意提交出金
  1386. function closeTipsConfirm() {
  1387. if (isFree.value) {
  1388. dialogTips.value = false;
  1389. if (channelData.value.feeTypeBank) {
  1390. if (channelData.value.feeTypeBank == 1) {
  1391. dialogCheckConfirm_form.feeAmount =
  1392. Number(form.amount || 0) *
  1393. (Number(channelData.value.freeBank || 0) / 100);
  1394. } else if (channelData.value.feeTypeBank == 2) {
  1395. dialogCheckConfirm_form.feeAmount = Number(
  1396. channelData.value.feeAmountBank || 0
  1397. );
  1398. }
  1399. } else {
  1400. if (channelData.value.feeType == 1) {
  1401. dialogCheckConfirm_form.feeAmount =
  1402. Number(form.amount || 0) *
  1403. (Number(channelData.value.free || 0) / 100);
  1404. } else if (channelData.value.feeType == 2) {
  1405. dialogCheckConfirm_form.feeAmount = Number(
  1406. channelData.value.feeAmount || 0
  1407. );
  1408. }
  1409. }
  1410. if (FreeNumber.value > 0) {
  1411. dialogCheckConfirm_form.amount = new Decimal(
  1412. Number(form.amount || 0)
  1413. )
  1414. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1415. .toNumber();
  1416. } else {
  1417. dialogCheckConfirm_form.amount = new Decimal(
  1418. Number(form.amount || 0)
  1419. )
  1420. .sub(
  1421. new Decimal(Number(dialogCheckConfirm_form.feeAmount || 0))
  1422. )
  1423. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1424. .toNumber();
  1425. }
  1426. if (
  1427. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  1428. ) {
  1429. dialogCheckConfirm_form.feeAmount = parseInt(
  1430. dialogCheckConfirm_form.feeAmount
  1431. );
  1432. dialogCheckConfirm_form.amount = parseInt(
  1433. dialogCheckConfirm_form.amount
  1434. );
  1435. }
  1436. dialogCheckConfirm.value = true;
  1437. } else {
  1438. dialogTips.value = false;
  1439. submit("form");
  1440. }
  1441. }
  1442. function getMetaInfo() {
  1443. metaInfo.value = window.getMetaInfo();
  1444. metaInfo.value = { ...metaInfo.value, deviceType: "h5" };
  1445. }
  1446. async function qrCode(serial) {
  1447. getMetaInfo()
  1448. let res = await customApi.getWebsdkLink({
  1449. serial,
  1450. metaInfo: metaInfo.value,
  1451. });
  1452. if (res.code == Code.StatusOK) {
  1453. text1.value = JSON.parse(res.data).url;
  1454. dialogKyc.value = true;
  1455. flag.value = false;
  1456. } else {
  1457. flag.value = false;
  1458. }
  1459. }
  1460. const submitCode = async (code) => {
  1461. console.log(code, 111);
  1462. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1463. dialogDealResult_form.emailCode = code;
  1464. submit("form");
  1465. }
  1466. }
  1467. //提交
  1468. async function submit(formName) {
  1469. console.log(channelData.value, 1212);
  1470. if (channelData.value.type == "BANK_TELEGRAPHIC" && !myId.value) {
  1471. showToast(t("vaildate.withdrawBank.empty"));
  1472. return;
  1473. }
  1474. if (channelData.value.type == "BANK" && !myId.value) {
  1475. showToast(t("vaildate.withdrawBank.empty"));
  1476. return;
  1477. }
  1478. if (channelData.value.type == "CHANNEL_TYPE_CARD" && !myId.value) {
  1479. showToast(t("vaildate.withdrawBank.empty"));
  1480. return;
  1481. }
  1482. if (channelData.value.type == "DIGITAL_CURRENCY" && !myId.value) {
  1483. showToast(t("blockchain.item11"));
  1484. return;
  1485. }
  1486. try {
  1487. if (formRef.value) {
  1488. await formRef.value.validate()
  1489. if (
  1490. channelData.value.type == "DIGITAL_CURRENCY" &&
  1491. !dialogDealResult_form.emailCode
  1492. ) {
  1493. // let res = await financialApi.withdrawCode({});
  1494. // if (res.code == Code.StatusOK) {
  1495. // dialogDealResult = true;
  1496. // } else {
  1497. // $pigeon.MessageWarning(res.msg);
  1498. // }
  1499. dialogDealResult.value = true;
  1500. return;
  1501. }
  1502. // 检查活动参与情况
  1503. // let selectedAccount = loginOptions.find(item => item.login === value);
  1504. // if (selectedAccount) {
  1505. // let activityRes = await activityApi.ActivityGiveLoginParticipate({
  1506. // login: value,
  1507. // platform: selectedAccount.platform,
  1508. // amount: form.amount
  1509. // });
  1510. //
  1511. // if (activityRes.code == Code.StatusOK && activityRes.data === false) {
  1512. // // 使用 Promise 包装确认对话框,等待用户选择
  1513. // try {
  1514. // await new Promise((resolve, reject) => {
  1515. // $pigeon.MessageConfirm(
  1516. // "您参加的活动正在进行中,发起申请后结束活动",
  1517. // $i18n.t("Msg.SystemPrompt"),
  1518. // $i18n.t("Btn.Confirm"),
  1519. // $i18n.t("Btn.Cancel"),
  1520. // () => {
  1521. // resolve(); // 确认时继续执行
  1522. // },
  1523. // () => {
  1524. // reject(); // 取消时阻止执行
  1525. // }
  1526. // );
  1527. // });
  1528. // } catch {
  1529. // return; // 用户点击取消,阻止执行
  1530. // }
  1531. // }
  1532. // }
  1533. if (flag.value) {
  1534. return;
  1535. } else {
  1536. flag.value = true;
  1537. }
  1538. dialogCheckWait.value = true;
  1539. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1540. let res = await financialApi.WithdrawAapplyDigitalCurrency(
  1541. channelData.value.requestUrl,
  1542. {
  1543. ...form,
  1544. login: loginValue.value,
  1545. payType: channelData.value.code,
  1546. emailCode: dialogDealResult_form.emailCode,
  1547. }
  1548. );
  1549. if (res.code == Code.StatusOK) {
  1550. flag.value = false;
  1551. dialogCheck.value = true;
  1552. dialogVisible.value = true;
  1553. // qrCode(res.data)
  1554. } else {
  1555. RES.value = res.msg;
  1556. dialogCheck.value = true;
  1557. dialogVisible.value = false;
  1558. flag.value = false;
  1559. }
  1560. cancelCode();
  1561. } else if (
  1562. channelData.value.type == "CHANNEL_TYPE_WALLET" ||
  1563. channelData.value.type == "UCARD_WALLET" ||
  1564. channelData.value.type == "CHANNEL_TYPE_ALI_WALLET"
  1565. ) {
  1566. let res = await financialApi.WithdrawAapplyDigitalCurrency(
  1567. channelData.value.requestUrl,
  1568. {
  1569. ...form,
  1570. login: loginValue.value,
  1571. payType: channelData.value.code,
  1572. }
  1573. );
  1574. if (res.code == Code.StatusOK) {
  1575. flag.value = false;
  1576. dialogCheck.value = true;
  1577. dialogVisible.value = true;
  1578. // qrCode(res.data)
  1579. } else {
  1580. RES.value = res.msg;
  1581. dialogCheck.value = true;
  1582. dialogVisible.value = false;
  1583. flag.value = false;
  1584. }
  1585. console.log(res, 'res', RES.value);
  1586. } else if (channelData.value.type == "BANK") {
  1587. let res = await financialApi.WithdrawApplyBank(
  1588. channelData.value.requestUrl,
  1589. {
  1590. ...form,
  1591. login: loginValue.value,
  1592. payType: channelData.value.code,
  1593. }
  1594. );
  1595. if (res.code == Code.StatusOK) {
  1596. flag.value = false;
  1597. dialogCheck.value = true;
  1598. dialogVisible.value = true;
  1599. // qrCode(res.data)
  1600. } else {
  1601. RES.value = res.msg;
  1602. dialogCheck.value = true;
  1603. dialogVisible.value = false;
  1604. flag.value = false;
  1605. }
  1606. } else if (channelData.value.type == "BANK_TELEGRAPHIC") {
  1607. let res = await financialApi.WithdrawApplyBank(
  1608. channelData.value.requestUrl,
  1609. {
  1610. ...form,
  1611. login: loginValue.value,
  1612. payType: channelData.value.code,
  1613. }
  1614. );
  1615. if (res.code == Code.StatusOK) {
  1616. flag.value = false;
  1617. dialogCheck.value = true;
  1618. dialogVisible.value = true;
  1619. // qrCode(res.data)
  1620. } else {
  1621. RES.value = res.msg;
  1622. dialogCheck.value = true;
  1623. dialogVisible.value = false;
  1624. flag.value = false;
  1625. }
  1626. } else if (channelData.value.type == "CHANNEL_TYPE_CARD") {
  1627. let res = await financialApi.WithdrawApplyBank(
  1628. channelData.value.requestUrl,
  1629. {
  1630. ...form,
  1631. login: loginValue.value,
  1632. payType: channelData.value.code,
  1633. }
  1634. );
  1635. if (res.code == Code.StatusOK) {
  1636. flag.value = false;
  1637. dialogCheck.value = true;
  1638. dialogVisible.value = true;
  1639. // qrCode(res.data)
  1640. } else {
  1641. RES.value = res.msg;
  1642. dialogCheck.value = true;
  1643. dialogVisible.value = false;
  1644. flag.value = false;
  1645. }
  1646. }
  1647. dialogCheckWait.value = false;
  1648. }
  1649. } catch (error) {
  1650. if (error instanceof Array) {
  1651. showToast(error[0].errorMessage);
  1652. return
  1653. } else {
  1654. RES.value = error.msg;
  1655. dialogCheck.value = true;
  1656. dialogCheckWait.value = false;
  1657. dialogVisible.value = false;
  1658. flag.value = false;
  1659. }
  1660. }
  1661. }
  1662. //初始化
  1663. function Initialize() {
  1664. loginValue.value = "";
  1665. isStep3.value = false;
  1666. step2.value = false;
  1667. step3.value = false;
  1668. showTable();
  1669. }
  1670. //手续费减免次数接口
  1671. async function getFreeNumber() {
  1672. if (!isFree.value) {
  1673. return;
  1674. }
  1675. dialogFreeNumber.value = true;
  1676. let res = await financialApi.remainingReductionNumber({});
  1677. if (res.code == Code.StatusOK) {
  1678. FreeNumber.value = res.data || 0;
  1679. } else {
  1680. showToast(res.msg);
  1681. }
  1682. }
  1683. function toShop() {
  1684. // $router.push({ path: "/shop/home" }).catch((arr) => arr);
  1685. // uni-app 中可能需要使用 uni.navigateTo,此处保留原逻辑但注释掉,因为原代码是 Vue Router
  1686. // 若需要可以改为 uni.navigateTo
  1687. }
  1688. //选择支付方式
  1689. function isShowStep3(row) {
  1690. console.log(row, 222);
  1691. dialogCheckWait.value = false;
  1692. dialogVisible.value = false;
  1693. flag.value = false;
  1694. isStep3.value = true;
  1695. //判断是否有bank
  1696. if (row.bankValid && isChannel.value) {
  1697. getBankList(row);
  1698. isChannel.value = false;
  1699. step3.value = true;
  1700. channelData.value = row;
  1701. mAmount.minAmount = row.minAmount;
  1702. mAmount.maxAmount = row.maxAmount;
  1703. } else {
  1704. step3.value = true;
  1705. bankDate.value = [];
  1706. channelData.value = row;
  1707. mAmount.minAmount = row.minAmount;
  1708. mAmount.maxAmount = row.maxAmount;
  1709. }
  1710. if (row.code == "UNION_PAY_TELEGRAPHIC") {
  1711. WireTransferAccount.value = JSON.parse(row.property);
  1712. }
  1713. if (['BANK', 'BANK_TELEGRAPHIC', 'CHANNEL_TYPE_CARD', 'DIGITAL_CURRENCY'].includes(row.type)) {
  1714. getBankInfo();
  1715. step3_bank_cur.value = "bank";
  1716. form.login = loginValue.value;
  1717. form.payType = row.code;
  1718. bankPayType.value = row.code;
  1719. }
  1720. tableData.Ucard_Wallet = []
  1721. tableData.Digital_Currency = []
  1722. tableData.China_UnionPay = []
  1723. tableData.Electronic_Wallet = []
  1724. tableData.International_Transfer = []
  1725. tableData.CHANNEL_TYPE_CARD = []
  1726. tableData.CHANNEL_TYPE_ALI_WALLET = []
  1727. if (row.type === 'UCARD_WALLET') tableData.Ucard_Wallet = [row]
  1728. if (row.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency = [row]
  1729. if (row.type === 'BANK') tableData.China_UnionPay = [row]
  1730. if (row.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet = [row]
  1731. if (row.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer = [row]
  1732. if (row.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD = [row]
  1733. if (row.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET = [row]
  1734. introduce.introduce = row.introduce
  1735. introduce.enIntroduce = row.enIntroduce
  1736. }
  1737. //更换支付方式
  1738. function showTable() {
  1739. resetForm()
  1740. myId.value = null;
  1741. isChannel.value = true;
  1742. form.currency = "USD";
  1743. }
  1744. //获取账户信息
  1745. async function getDateList() {
  1746. loading.value = true
  1747. let res = await customApi.CustomDropdown({ platform: "" });
  1748. if (res.code == Code.StatusOK) {
  1749. loginOptions.value = res.data.map(item => ({
  1750. ...item,
  1751. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1752. }))
  1753. const route = getCurrentPages().pop().$page.options
  1754. if (route.login) {
  1755. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1756. loginValue.value = found.login
  1757. loginValueDoc.value = found.label
  1758. step2.value = true;
  1759. // showTable();
  1760. }
  1761. } else {
  1762. showToast(res.msg);
  1763. }
  1764. loading.value = false
  1765. }
  1766. //获取出金通道
  1767. async function getDepositList() {
  1768. pictLoading.value = true;
  1769. tableData.Ucard_Wallet = [];
  1770. tableData.Digital_Currency = [];
  1771. tableData.China_UnionPay = [];
  1772. tableData.Electronic_Wallet = [];
  1773. tableData.International_Transfer = [];
  1774. tableData.CHANNEL_TYPE_CARD = [];
  1775. tableData.CHANNEL_TYPE_ALI_WALLET = [];
  1776. let res = await financialApi.RemitChannelList({});
  1777. if (res.code == Code.StatusOK) {
  1778. res.data.forEach(item => {
  1779. if (item.type === 'UCARD_WALLET') tableData.Ucard_Wallet.push(item)
  1780. if (item.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency.push(item)
  1781. if (item.type === 'BANK') tableData.China_UnionPay.push(item)
  1782. if (item.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet.push(item)
  1783. if (item.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer.push(item)
  1784. if (item.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD.push(item)
  1785. if (item.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET.push(item)
  1786. })
  1787. pictLoading.value = false;
  1788. } else {
  1789. showToast(res.msg);
  1790. pictLoading.value = false;
  1791. }
  1792. }
  1793. //获取出金通道银行列表
  1794. async function getBankList(row) {
  1795. let res = await financialApi.BankList({
  1796. channelCode: row.code,
  1797. });
  1798. if (res.code == Code.StatusOK) {
  1799. let bank = res.data;
  1800. let data = [];
  1801. bank.forEach((j) => {
  1802. if (!j.minAmount && j.minAmount != 0) {
  1803. j.minAmount = row.minAmount;
  1804. }
  1805. if (!j.maxAmount && j.maxAmount != 0) {
  1806. j.maxAmount = row.maxAmount;
  1807. }
  1808. j.payType = row.code;
  1809. data.push(j);
  1810. });
  1811. bankDate.value = data;
  1812. } else {
  1813. showToast(res.msg);
  1814. }
  1815. }
  1816. //取消
  1817. function cancelBank() {
  1818. dialogNewBank.value = false;
  1819. }
  1820. //24新年庆典
  1821. //是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
  1822. function isNewYear24Open() {
  1823. let endTime1 = "2025/3/31 23:59:59";
  1824. let startTime1 = "2025/1/1 00:00:00";
  1825. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1826. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1827. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1828. let now = new Date(
  1829. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1830. ).getTime();
  1831. let end = new Date(endTime1).getTime();
  1832. let start = new Date(startTime1).getTime();
  1833. if (now < end && start < now) {
  1834. ActivityNewYear24();
  1835. }
  1836. }
  1837. async function ActivityNewYear24() {
  1838. let res = await activityApi.ActivityNewYear24({});
  1839. if (res.code == Code.StatusOK) {
  1840. tableDataNewYear24.value = res.data;
  1841. if (typeof tableDataNewYear24.value == "object") {
  1842. toIncome();
  1843. }
  1844. } else {
  1845. showToast(res.msg);
  1846. }
  1847. }
  1848. function toIncome() {
  1849. NewYear24Data.balance = Number(tableDataNewYear24.value.balance) || 0;
  1850. // let rate = 0;
  1851. tableDataNewYear24.value.details.forEach((item) => {
  1852. if (
  1853. NewYear24Data.balance > item.min &&
  1854. NewYear24Data.balance <= item.max
  1855. ) {
  1856. NewYear24Data.rate = item.rate;
  1857. } else if (
  1858. NewYear24Data.balance > item.min &&
  1859. NewYear24Data.balance >= item.max &&
  1860. item.max == 0
  1861. ) {
  1862. NewYear24Data.rate = item.rate;
  1863. }
  1864. });
  1865. // console.log(NewYear24Data);
  1866. NewYear24Data.income = (
  1867. ((NewYear24Data.balance * NewYear24Data.rate) / 100 / 365) *
  1868. NewYear24RemainingTime()
  1869. ).toFixed(2);
  1870. tableDataNewYear24Flag.value = true;
  1871. }
  1872. function NewYear24RemainingTime() {
  1873. // let endTime1 = '2025/3/31 23:59:59';
  1874. // let startTime1 = '2025/1/1 00:00:00';
  1875. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1876. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1877. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1878. let now = new Date(
  1879. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1880. ).getTime();
  1881. // 获取当前月份的最后一天
  1882. let lastDayOfMonth = getFirstDayOfNextMonth();
  1883. // console.log(lastDayOfMonth);
  1884. let end = new Date(lastDayOfMonth).getTime();
  1885. // let now = new Date('2025/1/31 21:59:59').getTime();
  1886. // let end = new Date('2025/1/31 23:59:59').getTime();
  1887. let time = (end - now) / 60 / 60 / 1000 / 24;
  1888. time = Math.ceil(time);
  1889. return time;
  1890. }
  1891. function getFirstDayOfNextMonth() {
  1892. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1893. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1894. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1895. let now = new Date(
  1896. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1897. );
  1898. let lastDayOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0);
  1899. // console.log(lastDayOfMonth);
  1900. return lastDayOfMonth;
  1901. // const nextMonth = now.getMonth() + 1; // 当前月份加1
  1902. // const nextYear = now.getFullYear(); // 获取当前年份
  1903. // // 如果下个月大于11(即12月),年份需要增加1
  1904. // if (nextMonth > 11) {
  1905. // return new Date(nextYear + 1, 0, 1); // 下一年的1月1日
  1906. // } else {
  1907. // return new Date(nextYear, nextMonth, 1); // 下个月的1日
  1908. // }
  1909. }
  1910. // 新改内容
  1911. // userStore.paymentChannel.value
  1912. // userStore.channelList.value
  1913. const channel = computed(() => userStore.paymentChannel)
  1914. const channelList = computed(() => userStore.channelList)
  1915. const channelListOptions = ref([])
  1916. const channelId = ref(null)
  1917. const loading = ref(false)
  1918. const setAllAmount = () => {
  1919. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  1920. console.log(found, 1212);
  1921. form.amount = parseInt(found.balance)
  1922. validateAmount()
  1923. }
  1924. const allTabs = computed(() => {
  1925. return {
  1926. "Ucard_Wallet": t('card.title'),
  1927. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1928. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1929. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1930. "International_Transfer": t('Custom.Deposit.Channel1'),
  1931. "CHANNEL_TYPE_CARD": t('PersonalManagement.Label.CreditCard'),
  1932. "CHANNEL_TYPE_ALI_WALLET": t('Label.Ali'),
  1933. }
  1934. })
  1935. // 固定顺序数组
  1936. const tabOrder = [
  1937. "Ucard_Wallet",
  1938. "Digital_Currency",
  1939. "China_UnionPay",
  1940. "Electronic_Wallet",
  1941. "International_Transfer",
  1942. "CHANNEL_TYPE_CARD",
  1943. "CHANNEL_TYPE_ALI_WALLET"
  1944. ]
  1945. function formatChannels(data) {
  1946. const result = []
  1947. // 按固定顺序遍历
  1948. for (const key of tabOrder) {
  1949. const list = data[key] || []
  1950. if (list.length) {
  1951. result.push({
  1952. text: allTabs.value[key],
  1953. value: key,
  1954. disable: true
  1955. })
  1956. list.forEach(item => {
  1957. result.push({
  1958. ...item,
  1959. text: item.name,
  1960. value: item.code
  1961. })
  1962. })
  1963. }
  1964. }
  1965. return result
  1966. }
  1967. // -------------------- lifecycle --------------------
  1968. onMounted(() => {
  1969. if (channelList.value) {
  1970. channelListOptions.value = formatChannels(channelList.value)
  1971. }
  1972. channelId.value = channel.value
  1973. getDateList();
  1974. //调用手续费减免次数接口
  1975. getFreeNumber();
  1976. isNewYear24Open();
  1977. });
  1978. onUnmounted(() => {
  1979. userStore.savePaymentChannel('')
  1980. userStore.saveChannelList('')
  1981. })
  1982. // -------------------- watch --------------------
  1983. watch(channelId, async (newVal) => {
  1984. if (newVal) {
  1985. showTable()
  1986. let row = channelListOptions.value.find(item => item.code == newVal)
  1987. console.log(row, 123123);
  1988. isShowStep3(row)
  1989. }
  1990. });
  1991. watch(loginValue, (newVal) => {
  1992. if (newVal) {
  1993. // const found = loginOptions.value.find(opt => opt.login === Number(newVal))
  1994. // loginValueDoc.value = found.label
  1995. showTable();
  1996. }
  1997. });
  1998. watch(isStep3, async (newVal) => {
  1999. if (newVal) {
  2000. await nextTick();
  2001. formRef.value?.clearValidate(); // 先清除旧错误
  2002. await nextTick();
  2003. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  2004. }
  2005. });
  2006. watch(() => form.amount, (newVal) => {
  2007. if (newVal && channelData.value.rate) {
  2008. // form.amount1 = (newVal * channelData.rate).toFixed(2);
  2009. if (isFree.value) {
  2010. let feeAmount = 0;
  2011. if (channelData.value.feeTypeBank) {
  2012. if (channelData.value.feeTypeBank == 1) {
  2013. feeAmount =
  2014. Number(newVal || 0) *
  2015. (Number(channelData.value.freeBank || 0) / 100);
  2016. } else if (channelData.value.feeTypeBank == 2) {
  2017. feeAmount = Number(channelData.value.feeAmountBank || 0);
  2018. }
  2019. } else {
  2020. if (channelData.value.feeType == 1) {
  2021. feeAmount =
  2022. Number(newVal || 0) *
  2023. (Number(channelData.value.free || 0) / 100);
  2024. } else if (channelData.value.feeType == 2) {
  2025. feeAmount = Number(channelData.value.feeAmount || 0);
  2026. }
  2027. }
  2028. if (FreeNumber.value > 0) {
  2029. form.amount1 = new Decimal(Number(newVal || 0))
  2030. .mul(new Decimal(Number(channelData.value.rate || 0)))
  2031. .toNumber();
  2032. } else {
  2033. form.amount1 = new Decimal(Number(newVal || 0))
  2034. .sub(new Decimal(Number(feeAmount || 0)))
  2035. .mul(new Decimal(Number(channelData.value.rate || 0)))
  2036. .toNumber();
  2037. }
  2038. } else {
  2039. form.amount1 = (newVal * channelData.value.rate).toFixed(2);
  2040. }
  2041. if (
  2042. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  2043. ) {
  2044. form.amount1 = parseInt(form.amount1);
  2045. }
  2046. }
  2047. });
  2048. </script>
  2049. <style lang="scss" scoped>
  2050. @import "@/uni.scss";
  2051. .custom-withdraw {
  2052. width: px2rpx(566);
  2053. flex-shrink: 0;
  2054. .box {
  2055. margin-bottom: px2rpx(20);
  2056. .b-card {
  2057. // background: #fff;
  2058. // border-radius: px2rpx(12);
  2059. // padding: px2rpx(20);
  2060. // box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  2061. border: 1px solid var(--bs-border-color);
  2062. .card-top {
  2063. .tit {
  2064. font-size: px2rpx(16);
  2065. font-weight: 600;
  2066. margin-bottom: px2rpx(16);
  2067. display: flex;
  2068. align-items: center;
  2069. color: var(--bs-heading-color);
  2070. position: relative;
  2071. // padding-left: 20px;
  2072. // &:after {
  2073. // content: '';
  2074. // position: absolute;
  2075. // left: 0;
  2076. // top: 50%;
  2077. // transform: translateY(-50%);
  2078. // width: 0;
  2079. // height: 0;
  2080. // border-top: 6px solid transparent;
  2081. // border-bottom: 6px solid transparent;
  2082. // border-left: 8px solid currentColor;
  2083. // }
  2084. .iconfont {
  2085. margin-right: px2rpx(8);
  2086. color: var(--color-primary);
  2087. font-size: px2rpx(18);
  2088. }
  2089. }
  2090. }
  2091. .channelType {
  2092. font-size: px2rpx(15);
  2093. font-weight: 600;
  2094. margin: px2rpx(24) 0 px2rpx(12);
  2095. color: var(--color-navy-700);
  2096. padding-left: px2rpx(8);
  2097. border-left: px2rpx(4) solid var(--color-primary);
  2098. }
  2099. }
  2100. }
  2101. .reselect-btn {
  2102. margin-top: px2rpx(20);
  2103. display: flex;
  2104. justify-content: flex-end;
  2105. }
  2106. .s-btn {
  2107. &.reselect {
  2108. background-color: var(--color-zinc-100);
  2109. color: var(--color-navy-700);
  2110. border: none;
  2111. font-size: px2rpx(14);
  2112. padding: px2rpx(8) px2rpx(20);
  2113. border-radius: px2rpx(8);
  2114. &:active {
  2115. background-color: var(--color-zinc-200);
  2116. }
  2117. }
  2118. &[type="primary"] {
  2119. width: 100%;
  2120. height: px2rpx(48);
  2121. background-color: #cf1322;
  2122. color: var(--bs-emphasis-color);
  2123. border-radius: px2rpx(12);
  2124. font-size: px2rpx(16);
  2125. font-weight: 600;
  2126. display: flex;
  2127. align-items: center;
  2128. justify-content: center;
  2129. border: none;
  2130. margin-top: px2rpx(30);
  2131. transition: all 0.2s;
  2132. &:active {
  2133. transform: scale(0.98);
  2134. background-color: #cf1322;
  2135. }
  2136. }
  2137. }
  2138. .add-back {
  2139. display: flex;
  2140. justify-content: space-between;
  2141. align-items: center;
  2142. margin-bottom: px2rpx(12);
  2143. padding: px2rpx(12) px2rpx(16);
  2144. text {
  2145. font-size: px2rpx(14);
  2146. color: var(--color-navy-700);
  2147. font-weight: 500;
  2148. }
  2149. .add-btn {
  2150. color: var(--color-primary);
  2151. font-weight: 600;
  2152. text-decoration: underline;
  2153. &:active {
  2154. opacity: 0.7;
  2155. }
  2156. }
  2157. }
  2158. .proof {
  2159. margin-top: px2rpx(8);
  2160. border: px2rpx(1) dashed var(--color-zinc-300);
  2161. border-radius: px2rpx(8);
  2162. padding: px2rpx(8);
  2163. display: flex;
  2164. justify-content: center;
  2165. align-items: center;
  2166. background: var(--color-zinc-50);
  2167. .state {
  2168. padding: px2rpx(4) px2rpx(12);
  2169. border-radius: px2rpx(4);
  2170. font-size: px2rpx(12);
  2171. font-weight: bold;
  2172. }
  2173. }
  2174. .agree {
  2175. margin: px2rpx(24) 0;
  2176. display: flex;
  2177. align-items: flex-start;
  2178. .checkbox {
  2179. display: flex;
  2180. align-items: flex-start;
  2181. gap: px2rpx(8);
  2182. :deep(uni-checkbox .uni-checkbox-input) {
  2183. border-radius: px2rpx(4);
  2184. width: px2rpx(18);
  2185. height: px2rpx(18);
  2186. }
  2187. text {
  2188. font-size: px2rpx(13);
  2189. color: var(--color-zinc-500);
  2190. line-height: 1.5;
  2191. }
  2192. }
  2193. }
  2194. .step3-attention {
  2195. // background: var(--color-error-50, #fff1f0);
  2196. border-radius: px2rpx(12);
  2197. margin-bottom: px2rpx(20);
  2198. .tips {
  2199. line-height: 1.8;
  2200. font-size: px2rpx(12);
  2201. color: var(--bs-heading-color);
  2202. padding: px2rpx(12);
  2203. border-radius: px2rpx(4);
  2204. border-left: px2rpx(2) solid #cf1322;
  2205. .title {
  2206. font-weight: 600;
  2207. margin-bottom: px2rpx(6);
  2208. color: var(--bs-heading-color);
  2209. }
  2210. }
  2211. .attention {
  2212. font-size: px2rpx(14);
  2213. // color: var(--color-error-600, #cf1322);
  2214. line-height: 1.6;
  2215. }
  2216. .btn-bottom {
  2217. margin-top: px2rpx(20);
  2218. display: flex;
  2219. justify-content: center;
  2220. .btn {
  2221. background: var(--color-error-600, #cf1322);
  2222. color: var(--bs-emphasis-color);
  2223. padding: px2rpx(10) px2rpx(48);
  2224. border-radius: px2rpx(24);
  2225. font-size: px2rpx(15);
  2226. font-weight: 700;
  2227. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  2228. transition: all 0.2s;
  2229. &:active {
  2230. transform: scale(0.96);
  2231. opacity: 0.8;
  2232. }
  2233. }
  2234. }
  2235. }
  2236. :deep(.base-info-form) {
  2237. .uni-row1 {
  2238. .uni-col {
  2239. padding: 0 px2rpx(10) !important;
  2240. }
  2241. .uni-forms-item {
  2242. min-height: px2rpx(36);
  2243. margin-bottom: px2rpx(28);
  2244. }
  2245. .uni-easyinput__content-input {
  2246. height: px2rpx(35) !important;
  2247. }
  2248. }
  2249. }
  2250. @keyframes rotate {
  2251. from {
  2252. transform: rotate(0deg);
  2253. }
  2254. to {
  2255. transform: rotate(360deg);
  2256. }
  2257. }
  2258. }
  2259. .amount-box {
  2260. display: flex;
  2261. align-items: center;
  2262. gap: px2rpx(12);
  2263. .amount-input {
  2264. flex: 1;
  2265. }
  2266. // .btn {
  2267. // display: flex;
  2268. // align-items: center;
  2269. // justify-content: center;
  2270. // font-size: px2rpx(14);
  2271. // margin-bottom: px2rpx(12);
  2272. // height: px2rpx(35);
  2273. // background-color: #cf1322;
  2274. // color: #fff;
  2275. // border-radius: px2rpx(4);
  2276. // font-weight: 600;
  2277. // border: none;
  2278. // padding: 0 px2rpx(20);
  2279. // margin-top: px2rpx(21);
  2280. // cursor: pointer;
  2281. // }
  2282. }
  2283. .amount-box1 {
  2284. align-items: flex-start;
  2285. .btn {
  2286. margin-top: px2rpx(0);
  2287. }
  2288. }
  2289. .custom-deposit-container {
  2290. width: 100%;
  2291. display: flex;
  2292. gap: px2rpx(60);
  2293. justify-content: space-between;
  2294. }
  2295. @media (max-width: 992px) {
  2296. .custom-withdraw {
  2297. width: 100%;
  2298. margin-top: px2rpx(20);
  2299. }
  2300. .custom-deposit-container {
  2301. display: flex;
  2302. gap: px2rpx(30);
  2303. flex-wrap: wrap;
  2304. }
  2305. }
  2306. </style>