withdrawal.vue 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490
  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. }))
  1763. const route = getCurrentPages().pop().$page.options
  1764. if (route.login) {
  1765. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1766. loginValue.value = found.login
  1767. loginValueDoc.value = found.label
  1768. step2.value = true;
  1769. // showTable();
  1770. }
  1771. } else {
  1772. showToast(res.msg);
  1773. }
  1774. loading.value = false
  1775. }
  1776. //获取出金通道
  1777. async function getDepositList() {
  1778. pictLoading.value = true;
  1779. tableData.Ucard_Wallet = [];
  1780. tableData.Digital_Currency = [];
  1781. tableData.China_UnionPay = [];
  1782. tableData.Electronic_Wallet = [];
  1783. tableData.International_Transfer = [];
  1784. tableData.CHANNEL_TYPE_CARD = [];
  1785. tableData.CHANNEL_TYPE_ALI_WALLET = [];
  1786. let res = await financialApi.RemitChannelList({});
  1787. if (res.code == Code.StatusOK) {
  1788. res.data.forEach(item => {
  1789. if (item.type === 'UCARD_WALLET') tableData.Ucard_Wallet.push(item)
  1790. if (item.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency.push(item)
  1791. if (item.type === 'BANK') tableData.China_UnionPay.push(item)
  1792. if (item.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet.push(item)
  1793. if (item.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer.push(item)
  1794. if (item.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD.push(item)
  1795. if (item.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET.push(item)
  1796. })
  1797. pictLoading.value = false;
  1798. } else {
  1799. showToast(res.msg);
  1800. pictLoading.value = false;
  1801. }
  1802. }
  1803. //获取出金通道银行列表
  1804. async function getBankList(row) {
  1805. let res = await financialApi.BankList({
  1806. channelCode: row.code,
  1807. });
  1808. if (res.code == Code.StatusOK) {
  1809. let bank = res.data;
  1810. let data = [];
  1811. bank.forEach((j) => {
  1812. if (!j.minAmount && j.minAmount != 0) {
  1813. j.minAmount = row.minAmount;
  1814. }
  1815. if (!j.maxAmount && j.maxAmount != 0) {
  1816. j.maxAmount = row.maxAmount;
  1817. }
  1818. j.payType = row.code;
  1819. data.push(j);
  1820. });
  1821. bankDate.value = data;
  1822. } else {
  1823. showToast(res.msg);
  1824. }
  1825. }
  1826. //取消
  1827. function cancelBank() {
  1828. dialogNewBank.value = false;
  1829. }
  1830. //24新年庆典
  1831. //是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
  1832. function isNewYear24Open() {
  1833. let endTime1 = "2025/3/31 23:59:59";
  1834. let startTime1 = "2025/1/1 00:00:00";
  1835. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1836. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1837. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1838. let now = new Date(
  1839. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1840. ).getTime();
  1841. let end = new Date(endTime1).getTime();
  1842. let start = new Date(startTime1).getTime();
  1843. if (now < end && start < now) {
  1844. ActivityNewYear24();
  1845. }
  1846. }
  1847. async function ActivityNewYear24() {
  1848. let res = await activityApi.ActivityNewYear24({});
  1849. if (res.code == Code.StatusOK) {
  1850. tableDataNewYear24.value = res.data;
  1851. if (typeof tableDataNewYear24.value == "object") {
  1852. toIncome();
  1853. }
  1854. } else {
  1855. showToast(res.msg);
  1856. }
  1857. }
  1858. function toIncome() {
  1859. NewYear24Data.balance = Number(tableDataNewYear24.value.balance) || 0;
  1860. // let rate = 0;
  1861. tableDataNewYear24.value.details.forEach((item) => {
  1862. if (
  1863. NewYear24Data.balance > item.min &&
  1864. NewYear24Data.balance <= item.max
  1865. ) {
  1866. NewYear24Data.rate = item.rate;
  1867. } else if (
  1868. NewYear24Data.balance > item.min &&
  1869. NewYear24Data.balance >= item.max &&
  1870. item.max == 0
  1871. ) {
  1872. NewYear24Data.rate = item.rate;
  1873. }
  1874. });
  1875. // console.log(NewYear24Data);
  1876. NewYear24Data.income = (
  1877. ((NewYear24Data.balance * NewYear24Data.rate) / 100 / 365) *
  1878. NewYear24RemainingTime()
  1879. ).toFixed(2);
  1880. tableDataNewYear24Flag.value = true;
  1881. }
  1882. function NewYear24RemainingTime() {
  1883. // let endTime1 = '2025/3/31 23:59:59';
  1884. // let startTime1 = '2025/1/1 00:00:00';
  1885. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1886. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1887. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1888. let now = new Date(
  1889. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1890. ).getTime();
  1891. // 获取当前月份的最后一天
  1892. let lastDayOfMonth = getFirstDayOfNextMonth();
  1893. // console.log(lastDayOfMonth);
  1894. let end = new Date(lastDayOfMonth).getTime();
  1895. // let now = new Date('2025/1/31 21:59:59').getTime();
  1896. // let end = new Date('2025/1/31 23:59:59').getTime();
  1897. let time = (end - now) / 60 / 60 / 1000 / 24;
  1898. time = Math.ceil(time);
  1899. return time;
  1900. }
  1901. function getFirstDayOfNextMonth() {
  1902. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1903. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1904. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1905. let now = new Date(
  1906. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1907. );
  1908. let lastDayOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0);
  1909. // console.log(lastDayOfMonth);
  1910. return lastDayOfMonth;
  1911. // const nextMonth = now.getMonth() + 1; // 当前月份加1
  1912. // const nextYear = now.getFullYear(); // 获取当前年份
  1913. // // 如果下个月大于11(即12月),年份需要增加1
  1914. // if (nextMonth > 11) {
  1915. // return new Date(nextYear + 1, 0, 1); // 下一年的1月1日
  1916. // } else {
  1917. // return new Date(nextYear, nextMonth, 1); // 下个月的1日
  1918. // }
  1919. }
  1920. // 新改内容
  1921. // userStore.paymentChannel.value
  1922. // userStore.channelList.value
  1923. const channel = computed(() => userStore.paymentChannel)
  1924. const channelList = computed(() => userStore.channelList)
  1925. const channelListOptions = ref([])
  1926. const channelId = ref(null)
  1927. const loading = ref(false)
  1928. const loginAmount = ref(0)
  1929. const setAllAmount = () => {
  1930. form.amount = loginAmount.value
  1931. validateAmount()
  1932. }
  1933. const allTabs = computed(() => {
  1934. return {
  1935. "Ucard_Wallet": t('card.title'),
  1936. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1937. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1938. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1939. "International_Transfer": t('Custom.Deposit.Channel1'),
  1940. "CHANNEL_TYPE_CARD": t('PersonalManagement.Label.CreditCard'),
  1941. "CHANNEL_TYPE_ALI_WALLET": t('Label.Ali'),
  1942. }
  1943. })
  1944. // 固定顺序数组
  1945. const tabOrder = [
  1946. "Ucard_Wallet",
  1947. "Digital_Currency",
  1948. "China_UnionPay",
  1949. "Electronic_Wallet",
  1950. "International_Transfer",
  1951. "CHANNEL_TYPE_CARD",
  1952. "CHANNEL_TYPE_ALI_WALLET"
  1953. ]
  1954. function formatChannels(data) {
  1955. const result = []
  1956. // 按固定顺序遍历
  1957. for (const key of tabOrder) {
  1958. const list = data[key] || []
  1959. if (list.length) {
  1960. result.push({
  1961. text: allTabs.value[key],
  1962. value: key,
  1963. disable: true
  1964. })
  1965. list.forEach(item => {
  1966. result.push({
  1967. ...item,
  1968. text: item.name,
  1969. value: item.code
  1970. })
  1971. })
  1972. }
  1973. }
  1974. return result
  1975. }
  1976. const showCentAccountTransferTip = (login) => {
  1977. const selectedAccount = loginOptions.value.find(
  1978. (item) => item.login == login,
  1979. );
  1980. if (!selectedAccount) {
  1981. return;
  1982. }
  1983. const isCentAccount =
  1984. selectedAccount.type == "8" || selectedAccount.currency === "USC";
  1985. if (isCentAccount) {
  1986. confirm({
  1987. title: t("Msg.SystemPrompt"),
  1988. content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
  1989. confirmText: t("Btn.Confirm"),
  1990. cancelText: t("Btn.Cancel"),
  1991. })
  1992. }
  1993. }
  1994. // -------------------- lifecycle --------------------
  1995. onMounted(() => {
  1996. if (channelList.value) {
  1997. channelListOptions.value = formatChannels(channelList.value)
  1998. }
  1999. channelId.value = channel.value
  2000. getDateList();
  2001. //调用手续费减免次数接口
  2002. getFreeNumber();
  2003. isNewYear24Open();
  2004. });
  2005. onUnmounted(() => {
  2006. userStore.savePaymentChannel('')
  2007. userStore.saveChannelList('')
  2008. })
  2009. // -------------------- watch --------------------
  2010. watch(channelId, async (newVal) => {
  2011. if (newVal) {
  2012. showTable()
  2013. let row = channelListOptions.value.find(item => item.code == newVal)
  2014. console.log(row, 123123);
  2015. isShowStep3(row)
  2016. validateAmount()
  2017. }
  2018. });
  2019. watch(loginValue, (newVal) => {
  2020. if (newVal) {
  2021. // const found = loginOptions.value.find(opt => opt.login === Number(newVal))
  2022. // loginValueDoc.value = found.label
  2023. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  2024. loginAmount.value = found.balance ? Number(found.balance) : 0
  2025. // showCentAccountTransferTip(Number(newVal))
  2026. showTable();
  2027. validateAmount()
  2028. }
  2029. });
  2030. watch(isStep3, async (newVal) => {
  2031. if (newVal) {
  2032. await nextTick();
  2033. formRef.value?.clearValidate(); // 先清除旧错误
  2034. await nextTick();
  2035. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  2036. }
  2037. });
  2038. watch(() => form.amount, (newVal) => {
  2039. if (newVal && channelData.value.rate) {
  2040. // form.amount1 = (newVal * channelData.rate).toFixed(2);
  2041. if (isFree.value) {
  2042. let feeAmount = 0;
  2043. if (channelData.value.feeTypeBank) {
  2044. if (channelData.value.feeTypeBank == 1) {
  2045. feeAmount =
  2046. Number(newVal || 0) *
  2047. (Number(channelData.value.freeBank || 0) / 100);
  2048. } else if (channelData.value.feeTypeBank == 2) {
  2049. feeAmount = Number(channelData.value.feeAmountBank || 0);
  2050. }
  2051. } else {
  2052. if (channelData.value.feeType == 1) {
  2053. feeAmount =
  2054. Number(newVal || 0) *
  2055. (Number(channelData.value.free || 0) / 100);
  2056. } else if (channelData.value.feeType == 2) {
  2057. feeAmount = Number(channelData.value.feeAmount || 0);
  2058. }
  2059. }
  2060. if (FreeNumber.value > 0) {
  2061. form.amount1 = new Decimal(Number(newVal || 0))
  2062. .mul(new Decimal(Number(channelData.value.rate || 0)))
  2063. .toNumber();
  2064. } else {
  2065. form.amount1 = new Decimal(Number(newVal || 0))
  2066. .sub(new Decimal(Number(feeAmount || 0)))
  2067. .mul(new Decimal(Number(channelData.value.rate || 0)))
  2068. .toNumber();
  2069. }
  2070. } else {
  2071. form.amount1 = (newVal * channelData.value.rate).toFixed(2);
  2072. }
  2073. if (
  2074. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  2075. ) {
  2076. form.amount1 = parseInt(form.amount1);
  2077. }
  2078. }
  2079. });
  2080. </script>
  2081. <style lang="scss" scoped>
  2082. @import "@/uni.scss";
  2083. .card{
  2084. color: var(--bs-emphasis-color);
  2085. }
  2086. .custom-withdraw {
  2087. width: px2rpx(566);
  2088. flex-shrink: 0;
  2089. .box {
  2090. margin-bottom: px2rpx(20);
  2091. .b-card {
  2092. // background: #fff;
  2093. // border-radius: px2rpx(12);
  2094. // padding: px2rpx(20);
  2095. // box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  2096. border: 1px solid var(--bs-border-color);
  2097. .card-top {
  2098. .tit {
  2099. font-size: px2rpx(16);
  2100. font-weight: 600;
  2101. margin-bottom: px2rpx(16);
  2102. display: flex;
  2103. align-items: center;
  2104. color: var(--bs-heading-color);
  2105. position: relative;
  2106. // padding-left: 20px;
  2107. // &:after {
  2108. // content: '';
  2109. // position: absolute;
  2110. // left: 0;
  2111. // top: 50%;
  2112. // transform: translateY(-50%);
  2113. // width: 0;
  2114. // height: 0;
  2115. // border-top: 6px solid transparent;
  2116. // border-bottom: 6px solid transparent;
  2117. // border-left: 8px solid currentColor;
  2118. // }
  2119. .iconfont {
  2120. margin-right: px2rpx(8);
  2121. color: var(--color-primary);
  2122. font-size: px2rpx(18);
  2123. }
  2124. }
  2125. }
  2126. .channelType {
  2127. font-size: px2rpx(15);
  2128. font-weight: 600;
  2129. margin: px2rpx(24) 0 px2rpx(12);
  2130. color: var(--color-navy-700);
  2131. padding-left: px2rpx(8);
  2132. border-left: px2rpx(4) solid var(--color-primary);
  2133. }
  2134. }
  2135. }
  2136. .reselect-btn {
  2137. margin-top: px2rpx(20);
  2138. display: flex;
  2139. justify-content: flex-end;
  2140. }
  2141. .s-btn {
  2142. &.reselect {
  2143. background-color: var(--color-zinc-100);
  2144. color: var(--color-navy-700);
  2145. border: none;
  2146. font-size: px2rpx(14);
  2147. padding: px2rpx(8) px2rpx(20);
  2148. border-radius: px2rpx(8);
  2149. &:active {
  2150. background-color: var(--color-zinc-200);
  2151. }
  2152. }
  2153. &[type="primary"] {
  2154. width: 100%;
  2155. height: px2rpx(48);
  2156. background-color: #cf1322;
  2157. color: var(--bs-emphasis-color);
  2158. border-radius: px2rpx(12);
  2159. font-size: px2rpx(16);
  2160. font-weight: 600;
  2161. display: flex;
  2162. align-items: center;
  2163. justify-content: center;
  2164. border: none;
  2165. margin-top: px2rpx(30);
  2166. transition: all 0.2s;
  2167. &:active {
  2168. transform: scale(0.98);
  2169. background-color: #cf1322;
  2170. }
  2171. }
  2172. }
  2173. .add-back {
  2174. display: flex;
  2175. justify-content: space-between;
  2176. align-items: center;
  2177. margin-bottom: px2rpx(12);
  2178. padding: px2rpx(12) px2rpx(16);
  2179. text {
  2180. font-size: px2rpx(14);
  2181. color: var(--color-navy-700);
  2182. font-weight: 500;
  2183. }
  2184. .add-btn {
  2185. color: var(--color-primary);
  2186. font-weight: 600;
  2187. text-decoration: underline;
  2188. &:active {
  2189. opacity: 0.7;
  2190. }
  2191. }
  2192. }
  2193. .proof {
  2194. margin-top: px2rpx(8);
  2195. border: px2rpx(1) dashed var(--color-zinc-300);
  2196. border-radius: px2rpx(8);
  2197. padding: px2rpx(8);
  2198. display: flex;
  2199. justify-content: center;
  2200. align-items: center;
  2201. background: var(--color-zinc-50);
  2202. .state {
  2203. padding: px2rpx(4) px2rpx(12);
  2204. border-radius: px2rpx(4);
  2205. font-size: px2rpx(12);
  2206. font-weight: bold;
  2207. }
  2208. }
  2209. .agree {
  2210. margin: px2rpx(24) 0;
  2211. display: flex;
  2212. align-items: flex-start;
  2213. .checkbox {
  2214. display: flex;
  2215. align-items: flex-start;
  2216. gap: px2rpx(8);
  2217. :deep(uni-checkbox .uni-checkbox-input) {
  2218. border-radius: px2rpx(4);
  2219. width: px2rpx(18);
  2220. height: px2rpx(18);
  2221. }
  2222. text {
  2223. font-size: px2rpx(13);
  2224. color: var(--color-zinc-500);
  2225. line-height: 1.5;
  2226. }
  2227. }
  2228. }
  2229. .step3-attention {
  2230. // background: var(--color-error-50, #fff1f0);
  2231. border-radius: px2rpx(12);
  2232. margin-bottom: px2rpx(20);
  2233. .tips {
  2234. line-height: 1.8;
  2235. font-size: px2rpx(12);
  2236. color: var(--bs-heading-color);
  2237. padding: px2rpx(12);
  2238. border-radius: px2rpx(4);
  2239. border-left: px2rpx(2) solid #cf1322;
  2240. .title {
  2241. font-weight: 600;
  2242. margin-bottom: px2rpx(6);
  2243. color: var(--bs-heading-color);
  2244. }
  2245. }
  2246. .attention {
  2247. font-size: px2rpx(14);
  2248. // color: var(--color-error-600, #cf1322);
  2249. line-height: 1.6;
  2250. }
  2251. .btn-bottom {
  2252. margin-top: px2rpx(20);
  2253. display: flex;
  2254. justify-content: center;
  2255. .btn {
  2256. background: var(--color-error-600, #cf1322);
  2257. color: var(--bs-emphasis-color);
  2258. padding: px2rpx(10) px2rpx(48);
  2259. border-radius: px2rpx(24);
  2260. font-size: px2rpx(15);
  2261. font-weight: 700;
  2262. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  2263. transition: all 0.2s;
  2264. &:active {
  2265. transform: scale(0.96);
  2266. opacity: 0.8;
  2267. }
  2268. }
  2269. }
  2270. }
  2271. :deep(.base-info-form) {
  2272. .uni-row1 {
  2273. .uni-col {
  2274. padding: 0 px2rpx(10) !important;
  2275. }
  2276. .uni-forms-item {
  2277. min-height: px2rpx(36);
  2278. margin-bottom: px2rpx(28);
  2279. }
  2280. .uni-easyinput__content-input {
  2281. height: px2rpx(35) !important;
  2282. }
  2283. }
  2284. }
  2285. @keyframes rotate {
  2286. from {
  2287. transform: rotate(0deg);
  2288. }
  2289. to {
  2290. transform: rotate(360deg);
  2291. }
  2292. }
  2293. }
  2294. .amount-box {
  2295. display: flex;
  2296. align-items: center;
  2297. gap: px2rpx(12);
  2298. .amount-input {
  2299. flex: 1;
  2300. }
  2301. // .btn {
  2302. // display: flex;
  2303. // align-items: center;
  2304. // justify-content: center;
  2305. // font-size: px2rpx(14);
  2306. // margin-bottom: px2rpx(12);
  2307. // height: px2rpx(35);
  2308. // background-color: #cf1322;
  2309. // color: #fff;
  2310. // border-radius: px2rpx(4);
  2311. // font-weight: 600;
  2312. // border: none;
  2313. // padding: 0 px2rpx(20);
  2314. // margin-top: px2rpx(21);
  2315. // cursor: pointer;
  2316. // }
  2317. }
  2318. .amount-box1 {
  2319. align-items: flex-start;
  2320. .btn {
  2321. margin-top: px2rpx(0);
  2322. }
  2323. }
  2324. .custom-deposit-container {
  2325. width: 100%;
  2326. display: flex;
  2327. gap: px2rpx(60);
  2328. justify-content: space-between;
  2329. }
  2330. @media (max-width: 992px) {
  2331. .custom-withdraw {
  2332. width: 100%;
  2333. margin-top: px2rpx(20);
  2334. }
  2335. .custom-deposit-container {
  2336. display: flex;
  2337. gap: px2rpx(30);
  2338. flex-wrap: wrap;
  2339. }
  2340. }
  2341. </style>