withdrawal.vue 85 KB

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