withdrawal.vue 85 KB

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