withdrawal.vue 85 KB

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