withdrawal.vue 85 KB

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