deposit.vue 98 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_customer.item2')" />
  4. <uni-loading v-if="loading" />
  5. <view class="custom-deposit-container" v-else>
  6. <view class="custom-deposit">
  7. <!-- 步骤1:选择账户 -->
  8. <view class="box">
  9. <view class="b-card">
  10. <view class="card-top">
  11. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  12. t('Custom.Deposit.Title1')
  13. }}</text>
  14. <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
  15. :placeholder="t('placeholder.choose')" />
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 步骤2:支付通道列表(卡片布局) -->
  20. <view class="box" v-if="step2">
  21. <view class="b-card">
  22. <view class="card-top">
  23. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  24. t('Custom.Deposit.Title2')
  25. }}</text>
  26. <cwg-combox :clearable="false" v-model:value="channelId" :options="channelListOptions"
  27. :placeholder="t('placeholder.choose')">
  28. </cwg-combox>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 步骤3:填写入金信息 -->
  33. <view class="box box-step3" v-if="step3">
  34. <view class="b-card">
  35. <view class="card-top">
  36. <!-- 表单(确认后显示) -->
  37. <uni-forms v-if="isStep3" ref="formRef" :model="params" :rules="rules" label-position="top"
  38. validate-trigger="submit" :label-width="300" class="base-info-form">
  39. <uni-row class="demo-uni-row uni-row1 uni-row2">
  40. </uni-row>
  41. <!-- 信用卡选择区域 -->
  42. <template v-if="isStep3 && channelData.confirmCreditCard == 1">
  43. <view>
  44. <view
  45. style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
  46. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  47. t('PersonalManagement.Label.selectCreditCard') }}</text>
  48. <view class="add-back">
  49. <text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
  50. <text class="add-btn crm-cursor" @click="openAddBankCard">{{
  51. t('Custom.Withdraw.addBank1') }}</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view>
  56. <uni-forms-item>
  57. <cwg-combox :clearable="false" v-model:value="myId"
  58. :options="creditCardOptions" :placeholder="t('placeholder.choose')"
  59. @change="selectCode" />
  60. </uni-forms-item>
  61. </view>
  62. </template>
  63. <!-- 银行选择(如有) -->
  64. <template v-if="isStep3 && bankOptions.length">
  65. <view>
  66. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  67. t('news_add_field.Label.Title4')
  68. }}</text>
  69. </view>
  70. <view>
  71. <uni-forms-item>
  72. <cwg-combox :clearable="false" v-model:value="code" :options="bankOptions"
  73. :placeholder="t('placeholder.choose')" @change="selectCode" />
  74. </uni-forms-item>
  75. </view>
  76. </template>
  77. <!-- 特别提示(B2BINPAY) -->
  78. <view v-if="isStep3 && bankOptions.length && channelData.code == 'B2BINPAY'">
  79. <text class="tit" style="margin: 10px 0 20px"><text class="iconfont iconi"></text>{{
  80. t('Custom.Deposit.Des') }}</text>
  81. </view>
  82. <!-- 电汇信息展示 -->
  83. <template
  84. v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
  85. <view>
  86. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  87. t('Custom.Deposit.Title5') }}</text>
  88. </view>
  89. <view>
  90. <view class="wire-transfer-account">
  91. <view class="row"><text class="label SpecialColor">{{
  92. t('Custom.Deposit.bankUname') }}</text><text
  93. class="content SpecialColor">{{
  94. WireTransferAccount.bankUname || '--'
  95. }}</text></view>
  96. <view class="row"><text class="label">{{ t('Custom.Deposit.bankName')
  97. }}</text><text class="content">{{ WireTransferAccount.bankName
  98. ||
  99. '--'
  100. }}</text></view>
  101. <view class="row"><text class="label SpecialColor">{{
  102. t('Custom.Deposit.bankCardNum') }}</text><text
  103. class="content SpecialColor">{{
  104. WireTransferAccount.bankCardNum || '--'
  105. }}</text></view>
  106. <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr')
  107. }}</text><text class="content">{{ WireTransferAccount.bankAddr
  108. ||
  109. '--'
  110. }}</text></view>
  111. <view class="row"><text class="label SpecialColor">{{
  112. t('Custom.Deposit.swiftCode') }}</text><text
  113. class="content SpecialColor">{{
  114. WireTransferAccount.swiftCode || '--'
  115. }}</text></view>
  116. <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode')
  117. }}</text><text class="content">{{ WireTransferAccount.bankCode
  118. ||
  119. '--'
  120. }}</text></view>
  121. <view class="row"><text class="label SpecialColor">{{
  122. t('Custom.Recording.Note')
  123. }}</text><text class="content SpecialColor">{{
  124. WireTransferAccount.bankMsg || '--' }}</text></view>
  125. </view>
  126. </view>
  127. </template>
  128. <!-- 数字货币信息展示 -->
  129. <template
  130. v-if="isStep3 && channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0">
  131. <view>
  132. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  133. t('Custom.Deposit.DigitalAcc') }}</text>
  134. </view>
  135. <view>
  136. <view class="wire-transfer-account">
  137. <view class="row"><text class="label SpecialColor">{{
  138. t('Custom.Deposit.DigitalName') }}</text><text
  139. class="content SpecialColor">{{ WireTransferAccount.name
  140. + '-' +
  141. WireTransferAccount.type }}</text></view>
  142. <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6')
  143. }}</text><text class="content">{{ WireTransferAccount.address ||
  144. '--'
  145. }}</text></view>
  146. <view class="row"><text class="label">QR Code</text>
  147. <image :src="Host05 + WireTransferAccount.url" mode="aspectFit"
  148. style="width: 100rpx; height: 100rpx;" />
  149. </view>
  150. </view>
  151. </view>
  152. </template>
  153. <!-- 表单区域(含金额、预估金额、上传凭证、优惠码) -->
  154. <template v-if="isStep3">
  155. <view>
  156. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  157. t('Custom.Deposit.Title3') }}</text>
  158. </view>
  159. <view v-loading="pictLoadingImg">
  160. <!-- 金额输入 -->
  161. <view class="amount-box">
  162. <uni-forms-item
  163. :label="t('Custom.Deposit.Title3') + '(' + channelData.currency + ')'"
  164. name="amount" :error-message="amountErrorMessage" class="amount-input">
  165. <uni-easyinput type="number" v-model="params.amount"
  166. :placeholder="t('placeholder.input')" @blur="validateAmount" />
  167. </uni-forms-item>
  168. <!-- <view class="btn" v-t="'State.All'" @click="setAllAmount"></view> -->
  169. </view>
  170. <!-- 预估金额(若有汇率) -->
  171. <view v-if="channelData.rate">
  172. <uni-forms-item>
  173. <template #label>
  174. <view class="label-with-icon">
  175. <text>{{ t('Custom.Deposit.EstimatedAmount') + '(' +
  176. channelData.transformCurrency + ')' }}</text>
  177. <uni-tooltip placement="top">
  178. <view class="item">?</view>
  179. <template #content>
  180. <text>{{ t('Custom.Deposit.des') }}</text>
  181. </template>
  182. </uni-tooltip>
  183. </view>
  184. </template>
  185. <uni-easyinput v-model="params.amount1" disabled
  186. :placeholder="t('placeholder.input')" />
  187. </uni-forms-item>
  188. </view>
  189. <!-- 优惠码 -->
  190. <view>
  191. <uni-forms-item name="promoCode">
  192. <template #label>
  193. <view class="label-with-icon">
  194. <text>{{ t('Custom.Deposit.PromoCode') }}</text>
  195. <uni-tooltip placement="top">
  196. <view class="item">?</view>
  197. <template #content>
  198. <text>{{ t('news_add_field.Des.item3') }}</text>
  199. </template>
  200. </uni-tooltip>
  201. </view>
  202. </template>
  203. <uni-easyinput v-model="params.promoCode"
  204. :placeholder="t('placeholder.input')" />
  205. </uni-forms-item>
  206. </view>
  207. <!-- 上传汇款凭证(特定渠道) -->
  208. <view v-if="
  209. channelData.code == 'UNION_PAY_TELEGRAPHIC' ||
  210. channelData.code == 'UNION_PAY_TELEGRAPHIC_SPECIAL' ||
  211. channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 ||
  212. channelData.code == 'UNION_PAY_TELEGRAPHIC_TWO'
  213. ">
  214. <uni-forms-item :label="t('Custom.Deposit.UploadRemittanceVoucher')">
  215. <cwg-file-picker-wrapper v-model="imageUrl" :limit="1" :editable="true"
  216. :fileMediatype="'all'" uploadUrl="/wasabi/upload/file"
  217. :baseUrl="Host80" />
  218. </uni-forms-item>
  219. </view>
  220. <!-- 电汇提示 -->
  221. <view
  222. v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
  223. <text>{{ t('Custom.Deposit.Tips') }}</text>
  224. </view>
  225. <!-- ========== 赠金活动部分 ========== -->
  226. <!-- 10%赠金(年中赠金) -->
  227. <view v-if="tableData4Flag">
  228. <uni-forms-item class="agree" name="agree4">
  229. <label class="checkbox">
  230. <checkbox :checked="params.agree4"
  231. @click="params.agree4 = !params.agree4" />
  232. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit1')
  233. }}</text>
  234. </label>
  235. <view style="line-height: 1.5; font-size: 14px">
  236. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit2')
  237. }}</text>
  238. <text class="clause crm-cursor" @click="dialogClauseNZ = true">{{
  239. t('news_add_field1.activitiesNZ.itemDeposit3')
  240. }}</text>
  241. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit4')
  242. }}</text>
  243. </view>
  244. </uni-forms-item>
  245. </view>
  246. <!-- 20%赠金(年中赠金) -->
  247. <view v-if="tableData4TwoFlag">
  248. <uni-forms-item class="agree" name="agree5">
  249. <label class="checkbox">
  250. <checkbox :checked="params.agree5"
  251. @click="params.agree5 = !params.agree5" />
  252. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
  253. }}</text>
  254. </label>
  255. <view style="line-height: 1.5; font-size: 14px">
  256. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
  257. }}</text>
  258. <text class="clause crm-cursor" @click="dialogClauseNZTwo = true">{{
  259. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  260. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
  261. }}</text>
  262. </view>
  263. </uni-forms-item>
  264. </view>
  265. <!-- 赠送活动(动态) -->
  266. <view v-if="tableDataNewListFlag">
  267. <uni-forms-item class="agree" name="agree6">
  268. <label>
  269. <checkbox :checked="params.agree6"
  270. @click="params.agree6 = !params.agree6" />
  271. <text>{{ tableDataNewList.title }}</text>
  272. </label>
  273. <view style="line-height: 1.5; font-size: 14px">
  274. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  275. <text class="clause crm-cursor"
  276. @click="dialogClauseNewList = true">{{
  277. tableDataNewList.title }}</text>
  278. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  279. </view>
  280. </uni-forms-item>
  281. </view>
  282. <!-- 20%赠金申请(特定账户类型) -->
  283. <view
  284. v-if="(ACCType == 1 || ACCType == 2 || ACCType == 5 || ACCType == 6 || ACCType == 7) && anshiClose">
  285. <uni-forms-item class="agree" name="agree3">
  286. <label class="checkbox">
  287. <checkbox :checked="params.agree3"
  288. @click="params.agree3 = !params.agree3" />
  289. <text>{{ t('news_add_field1.deposit.item3') }}</text>
  290. </label>
  291. <view style="line-height: 1.5; font-size: 14px">
  292. <text>{{ t('news_add_field1.deposit.item4') }}</text>
  293. <text class="clause crm-cursor" @click="dialogClause1 = true">{{
  294. t('news_add_field1.deposit.item5') }}</text>
  295. <text>{{ t('news_add_field1.deposit.item6') }}</text>
  296. </view>
  297. </uni-forms-item>
  298. </view>
  299. <!-- 普通10%赠金(非年中、非特定账户) -->
  300. <view
  301. v-if="!tableData4Flag && !tableData4TwoFlag && !tableDataNewListFlag && (country != 'CN' || (country == 'CN' && (ACCType == 1 || ACCType == 2 || ACCType == 7 || ACCType == 5 || ACCType == 6 || ACCType == 8))) && ACCType != 3">
  302. <template v-if="isSupportedCountry && (ACCType == 2 || ACCType == 7)">
  303. <uni-forms-item class="agree" name="agree2">
  304. <label>
  305. <checkbox :checked="params.agree2"
  306. @click="params.agree2 = !params.agree2" />
  307. <text>{{ t('news_add_field1.deposit.item2_1') }}</text>
  308. </label>
  309. <view style="line-height: 1.5; font-size: 14px">
  310. <text>{{ t('Custom.Deposit.agree21') }}</text>
  311. <cwg-link type="pdf" title="Custom.Deposit.agree22_2"
  312. :url="`pdf/pdf4/100Bonus-en.pdf`" style="color: black" />
  313. <text>{{ t('Custom.Deposit.agree23_2') }}</text>
  314. </view>
  315. </uni-forms-item>
  316. </template>
  317. <template
  318. v-else-if="!isSupportedCountry && ACCType != 8 && !isAfterSeptember30()">
  319. <uni-forms-item class="agree" name="agree2">
  320. <label>
  321. <checkbox :checked="params.agree2"
  322. @click="params.agree2 = !params.agree2" />
  323. <text>{{ t('news_add_field1.deposit.item1') }}</text>
  324. </label>
  325. <view style="line-height: 1.5; font-size: 14px">
  326. <text>{{ t('Custom.Deposit.agree21') }}</text>
  327. <cwg-link type="pdf" title="Custom.Deposit.agree22"
  328. :url="`pdf/pdf4/${langCN}.pdf`" style="color: black" />
  329. <text>{{ t('Custom.Deposit.agree23_1') }}</text>
  330. </view>
  331. </uni-forms-item>
  332. </template>
  333. </view>
  334. </view>
  335. </template>
  336. <button class="s-btn" type="primary" @click="submitConfirm">{{ t('Btn.Submit')
  337. }}</button>
  338. </uni-forms>
  339. </view>
  340. </view>
  341. </view>
  342. </view>
  343. <view class="step3-attention">
  344. <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
  345. <view>
  346. <rich-text class="attention"
  347. :nodes="isZh ? introduce.introduce : introduce.enIntroduce"></rich-text>
  348. </view>
  349. </view>
  350. </view>
  351. </view>
  352. <!-- 不参加活动弹出框 -->
  353. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  354. <!-- 新年24用户提示弹窗 -->
  355. <NewYear24Popup v-model:visible="tableDataNewYear24Flag" />
  356. <!-- 越南用户提示弹窗 -->
  357. <VietnamNoticePopup v-model:visible="dialogVietnamNotice" />
  358. <!-- 提交后确认弹窗 -->
  359. <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
  360. :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="params" :userName="userName"
  361. :login="loginValue" :loginDoc="loginValueDoc" @confirm="submit" />
  362. <!--提交后的弹出框-->
  363. <CheckPopup v-model:visible="dialogCheckSuccess" :goPayLink="goPayLink" @close="closeDia" />
  364. <!-- 提交后失败弹窗 -->
  365. <cwg-error-popup v-model:visible="dialogCheckError" :responseMessage="RES" />
  366. <!-- 最后失败弹窗 -->
  367. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  368. <!-- 最后成功弹窗 -->
  369. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  370. <!-- 等待弹窗 -->
  371. <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
  372. <!-- 赠金协议 -->
  373. <ClausePopup v-model:visible="dialogClause" country="CN" :isGuoQin="isGuoQin" />
  374. <!-- 赠金协议20 -->
  375. <Clause20Popup v-model:visible="dialogClause1" />
  376. <!-- 赠金协议10年中 -->
  377. <ClauseNZPopup v-model:visible="dialogClauseNZ" :title="t('news_add_field1.activitiesNZ.item6')"
  378. :startDate="tableData4.applicationStartTime" :endDate="tableData4.applicationEndTime" />
  379. <!-- 赠金协议20年中 -->
  380. <ClauseNZTwoPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  381. :startDate="tableData4Two.applicationStartTime" :endDate="tableData4Two.applicationEndTime" />
  382. <!-- 赠送活动详情-协议 -->
  383. <ClauseNewListPopup v-model:visible="dialogClauseNewList" :content="tableDataNewList.content"
  384. :title="tableDataNewList.title" />
  385. <!--提交后完成弹出框-->
  386. <ChinaUnionPayPopup v-model:visible="dialogChinaUnionPay" />
  387. <!-- 重新提交弹窗 -->
  388. <DealResultPopup v-model:visible="dialogDealResult" :responseMessage="responseMessage"
  389. :title="dialogDealResultTitle" :initialData="dialogDealResult_form" :type="DealResultType"
  390. @confirm="submitDealResult" />
  391. <!-- KYC成功弹窗 -->
  392. <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
  393. </cwg-page-wrapper>
  394. </template>
  395. <script setup>
  396. import { ref, reactive, computed, watch, onMounted, nextTick, onUnmounted } from 'vue'
  397. import { useI18n } from 'vue-i18n'
  398. const { t, locale } = useI18n()
  399. import useUserStore from '@/stores/use-user-store'
  400. import { customApi } from '@/service/custom'
  401. import { financialApi } from '@/service/financial'
  402. import { activityApi } from '@/service/activity'
  403. import Config from '@/config/index'
  404. const { Code, Host80, Host04 } = Config
  405. import { initLink } from '@/utils/setUrl'
  406. import isImageType from '@/global/isImageType'
  407. import PaymentMethodsList from './components/PaymentMethodsList.vue'
  408. import CwgKycPopup from './components/KycPopup.vue'
  409. import DealResultPopup from './components/DealResultPopup.vue'
  410. import ChinaUnionPayPopup from './components/ChinaUnionPayPopup.vue'
  411. import ClauseNewListPopup from './components/ClauseNewListPopup.vue'
  412. import ClauseNZTwoPopup from './components/ClauseNZTwoPopup.vue'
  413. import ClauseNZPopup from './components/ClauseNZPopup.vue'
  414. import Clause20Popup from './components/Clause20Popup.vue'
  415. import ClausePopup from './components/ClausePopup.vue'
  416. import CheckPopup from './components/CheckPopup.vue'
  417. import CwgCheckConfirmPopup from './components/DepositCheckConfirmPopup.vue'
  418. import VietnamNoticePopup from './components/VietnamNoticePopup.vue'
  419. import NewYear24Popup from './components/NewYear24Popup.vue'
  420. // 假设原有导入路径保持不变
  421. import tool from "@/global/tool"
  422. import { object } from 'uview-plus/libs/function/test'
  423. // import { createUploadRequest } from "@/lib/upload"
  424. // 常量
  425. const countries = [
  426. "DZ", "AO", "BJ", "BW", "BF", "CM", "CG", "CD", "CI", "DJ", "EG", "ET", "GA", "GM", "GH", "GN", "KE", "MG", "MW", "ML", "MR", "MA", "MZ", "NA", "NE", "NG", "RW", "SN", "SL", "SO", "ZA", "SS", "SD", "TZ", "TG", "TN", "UG", "ZM", "ZW", "LS", "BH", "IR", "IQ", "IL", "JO", "KW", "LB", "OM", "PS", "QA", "SA", "SY", "TR", "AE", "YE", "AR", "BO", "BR", "CL", "CO", "EC", "GY", "PY", "PE", "SR", "UY", "VE", "BZ", "CR", "SV", "GT", "HN", "NI", "PA", "AU", "CA", "AL", "AD", "AM", "AT", "AZ", "BY", "BE", "BA", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "GE", "DE", "GR", "HU", "IS", "IE", "IT", "XK", "LV", "LI", "LT", "LU", "MT", "MD", "MC", "ME", "NL", "MK", "NO", "PL", "PT", "RO", "RU", "SM", "RS", "SK", "SI", "ES", "SE", "CH", "UA", "VA",
  427. ]
  428. // 用户信息
  429. const userStore = useUserStore()
  430. const userInfo = computed(() => userStore.userInfo)
  431. // 获取全局 Session 等,假设它们挂载在 uni 或 global 上
  432. const Session = {
  433. Get: (key, parse = false) => {
  434. const val = uni.getStorageSync(key)
  435. return parse ? JSON.parse(val) : val
  436. }
  437. }
  438. const handleFileUpdate = (val, type) => {
  439. if (type == '1') {
  440. params.requiteVoucherUrl = val
  441. }
  442. }
  443. const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
  444. function isPdf(url, image) {
  445. let res = !!url
  446. if (image) {
  447. return res && url.substr(-3, 3) == 'pdf' &&
  448. url.substr(-3, 3) == 'PDF'
  449. }
  450. return res && (url.substr(-3, 3) == 'pdf' ||
  451. url.substr(-3, 3) == 'PDF')
  452. }
  453. const $pigeon = {
  454. MessageError: (msg) => uni.showToast({ title: msg, icon: 'none' }),
  455. MessageOK: (msg) => uni.showToast({ title: msg, icon: 'success' }),
  456. MessageWarning: (msg) => uni.showToast({ title: msg, icon: 'none' }),
  457. MessageConfirm: (msg, title, confirmText, cancelText, onConfirm, onCancel, options = {}) => {
  458. uni.showModal({
  459. title,
  460. content: msg,
  461. confirmText,
  462. cancelText,
  463. success: (res) => {
  464. if (res.confirm) onConfirm && onConfirm()
  465. else if (res.cancel) onCancel && onCancel()
  466. }
  467. })
  468. }
  469. }
  470. const $route = { query: {} } // 需从外部注入
  471. // 响应式数据
  472. const loginValue = ref("")
  473. const loginValueDoc = ref("")
  474. const metaInfo = ref(null)
  475. const text1 = ref("")
  476. const dialogKyc = ref(false)
  477. const requiteVoucherUrl = ref("")
  478. const limitedStatus = ref(null)
  479. const limitedStatusCheck = ref(false)
  480. const pictLoadingImg = ref(false)
  481. const flag = ref(false)
  482. const RES = ref("")
  483. const imgUrl = ref(Host80)
  484. const Host05 = ref(Config.Host05)
  485. const loginOptions = ref([])
  486. const code = ref("")
  487. const selectCodes = ref("")
  488. const bankValid = ref("")
  489. const requestUrl = ref("")
  490. const isStep3 = ref(false)
  491. const step2 = ref(false)
  492. const step3 = ref(false)
  493. const value = ref("")
  494. const giveLoginJoin = ref("")
  495. const openType = ref("")
  496. const dialogInfoTradingAdd = ref(false)
  497. const ruleForm = reactive({
  498. bankInfo: [],
  499. bankWrit: [],
  500. bankCredit: []
  501. })
  502. const bankInfoList = ref([])
  503. const bank = ref("")
  504. const myId = ref(null)
  505. const bankPayType = ref("")
  506. const form = reactive({})
  507. const dialogDealResult = ref(false)
  508. const dialogDealResult_form = reactive({})
  509. const DealResultType = ref(null)
  510. const DealResultResult = ref("")
  511. const dialogDealResultTitle = ref("")
  512. const anshiClose = ref(true)
  513. const isChannel = ref(true)
  514. const pictLoading = ref(false)
  515. const tableData = reactive({
  516. International_Transfer: [],
  517. China_UnionPay: [],
  518. Digital_Currency: [],
  519. Electronic_Wallet: [],
  520. Ucard_Wallet: []
  521. })
  522. const tableData1 = reactive({
  523. International_Transfer: [],
  524. China_UnionPay: [],
  525. Digital_Currency: [],
  526. Electronic_Wallet: [],
  527. Ucard_Wallet: []
  528. })
  529. //通道table-选择前后
  530. const activeTab = ref(1)
  531. // 🔥 自动过滤掉空数据的 tab
  532. const tabsConfig = computed(() => {
  533. const allTabs = [
  534. { text: t('Custom.Deposit.Channel3'), value: 1, type: 'Digital_Currency' },
  535. { text: t('Custom.Deposit.Channel2'), value: 2, type: 'China_UnionPay' },
  536. { text: t('Custom.Deposit.Channel4'), value: 3, type: 'Electronic_Wallet' },
  537. { text: t('Custom.Deposit.Channel1'), value: 4, type: 'International_Transfer' },
  538. { text: t('card.title'), value: 5, type: 'Ucard_Wallet' },
  539. ]
  540. // ✅ 只保留有数据的 tab
  541. return allTabs.filter(tab => {
  542. console.log(tableData1[tab.type], tab.type);
  543. return tableData1[tab.type]?.length > 0
  544. })
  545. })
  546. // 当前选中的 tab 项
  547. const currentTab = computed(() => tabsConfig.value.find(t => t.value === activeTab.value))
  548. // 当前要渲染的表格数据
  549. const currentTableData = computed(() => {
  550. const type = currentTab.value?.type
  551. return type ? tableData[type] || [] : []
  552. })
  553. // ✅ 监听 tab 变化,自动选中第一个有数据的 tab
  554. watch(
  555. tabsConfig,
  556. (newTabs) => {
  557. if (newTabs.length > 0) {
  558. activeTab.value = newTabs[0].value // 选中第一个
  559. }
  560. },
  561. { immediate: true }
  562. )
  563. watch(
  564. currentTab,
  565. (newTabs) => {
  566. // showTable()
  567. },
  568. { immediate: true }
  569. )
  570. const bankDate = ref([])
  571. const channelData = reactive({})
  572. const WireTransferAccount = reactive({})
  573. const actionAdd1 = ref("")
  574. const actionAdd2 = ref(Host04 + "/activity/requite/voucher/upload")
  575. const imageUrl = ref("")
  576. const imageUrl1 = ref("")
  577. const introduce = reactive({
  578. introduce: "",
  579. enIntroduce: ""
  580. })
  581. const params = reactive({
  582. amount: "",
  583. amount1: "",
  584. promoCode: "",
  585. agree: false,
  586. agree2: false,
  587. agree3: false,
  588. agree4: false,
  589. agree5: false,
  590. agree6: false
  591. })
  592. const resetForm = () => {
  593. //表单重置后,需要手动重置一些状态
  594. params.amount = ""
  595. params.amount1 = ""
  596. params.promoCode = ""
  597. params.agree = false
  598. params.agree2 = false
  599. params.agree3 = false
  600. params.agree4 = false
  601. params.agree5 = false
  602. params.agree6 = false
  603. form.bankUname = undefined
  604. form.bankCardNum = undefined
  605. form.cvv = undefined
  606. form.expiryMonth = undefined
  607. form.expiryYear = undefined
  608. form.pin = undefined
  609. amountErrorMessage.value = ""
  610. }
  611. const formRef = ref(null)
  612. const mAmount = reactive({
  613. minAmount: "",
  614. maxAmount: ""
  615. })
  616. const dialogCheck = ref(false)
  617. const dialogVisible = ref(false)
  618. const dialogCheckWait = ref(false)
  619. const dialogCheckOK = ref(false)
  620. const goPayLink = ref("")
  621. const dialogCheckConfirm = ref(false)
  622. const dialogCheckConfirm_form = reactive({
  623. confirmName: "",
  624. confirmAreaCode: "",
  625. confirmPhone: ""
  626. })
  627. const dialogClause = ref(false)
  628. const dialogClause1 = ref(false)
  629. const dialogClauseNZ = ref(false)
  630. const dialogClauseNZTwo = ref(false)
  631. const dialogClauseNewList = ref(false)
  632. const ACCType = ref(null)
  633. const CheckExistSuccess = ref(false)
  634. const dialogChinaUnionPay = ref(false)
  635. const tableData4Flag = ref(false)
  636. const tableData4 = reactive({})
  637. const tableData4TwoFlag = ref(false)
  638. const tableData4Two = reactive({})
  639. const tableDataNewListFlag = ref(false)
  640. const tableDataNewList = reactive({})
  641. const dialogDontActive = ref(false)
  642. const dialogVietnamNotice = ref(false)
  643. const tableDataNewYear24Flag = ref(false)
  644. const tableDataNewYear24 = ref(false)
  645. const rules = computed(() => ({
  646. amount: {
  647. rules: [
  648. {
  649. required: true,
  650. errorMessage: t('vaildate.amount.format1'),
  651. },
  652. {
  653. validateFunction: (rule, value, data, callback) => {
  654. // 空值处理:直接报格式错误
  655. if (!value) {
  656. callback(t('vaildate.amount.format1'))
  657. return false
  658. }
  659. // 范围校验
  660. if (
  661. mAmount.minAmount &&
  662. mAmount.maxAmount &&
  663. (Number(mAmount.minAmount) > Number(value) ||
  664. Number(mAmount.maxAmount) < Number(value))
  665. ) {
  666. callback(
  667. t('vaildate.amount.amount') +
  668. mAmount.minAmount +
  669. ' - ' +
  670. mAmount.maxAmount
  671. )
  672. return false
  673. }
  674. // 正整数校验(原正则)
  675. if (!/^[1-9]\d*$/.test(value)) {
  676. callback(t('vaildate.amount.format1'))
  677. return false
  678. }
  679. return true
  680. },
  681. trigger: 'change',
  682. },
  683. ],
  684. },
  685. agree: {
  686. rules: [
  687. {
  688. required: true,
  689. errorMessage: t('vaildate.agree.empty'),
  690. trigger: 'change',
  691. },
  692. ],
  693. },
  694. confirmAreaCode: {
  695. rules: [
  696. {
  697. required: true,
  698. errorMessage: t('vaildate.input.empty'),
  699. trigger: 'blur',
  700. },
  701. ],
  702. },
  703. confirmPhone: {
  704. rules: [
  705. {
  706. required: true,
  707. errorMessage: t('vaildate.input.empty'),
  708. trigger: 'blur',
  709. },
  710. ],
  711. },
  712. myId: {
  713. rules: [
  714. {
  715. required: true,
  716. errorMessage: t('vaildate.select.empty'),
  717. trigger: 'change',
  718. },
  719. ],
  720. },
  721. pin: {
  722. rules: [
  723. {
  724. required: true,
  725. errorMessage: t('PersonalManagement.Label.item1'),
  726. trigger: 'blur',
  727. },
  728. ],
  729. },
  730. phone: {
  731. rules: [
  732. {
  733. required: true,
  734. errorMessage: t('vaildate.input.empty'),
  735. trigger: 'blur',
  736. },
  737. ],
  738. },
  739. otp: {
  740. rules: [
  741. {
  742. required: true,
  743. errorMessage: t('vaildate.input.empty'),
  744. trigger: 'blur',
  745. },
  746. ],
  747. },
  748. state: {
  749. rules: [
  750. {
  751. required: true,
  752. errorMessage: t('vaildate.input.empty'),
  753. trigger: 'blur',
  754. },
  755. ],
  756. },
  757. city: {
  758. rules: [
  759. {
  760. required: true,
  761. errorMessage: t('vaildate.input.empty'),
  762. trigger: 'blur',
  763. },
  764. ],
  765. },
  766. country: {
  767. rules: [
  768. {
  769. required: true,
  770. errorMessage: t('vaildate.select.empty'),
  771. trigger: 'change',
  772. },
  773. ],
  774. },
  775. address: {
  776. rules: [
  777. {
  778. required: true,
  779. errorMessage: t('vaildate.input.empty'),
  780. trigger: 'blur',
  781. },
  782. ],
  783. },
  784. zipCode: {
  785. rules: [
  786. {
  787. required: true,
  788. errorMessage: t('vaildate.input.empty'),
  789. trigger: 'blur',
  790. },
  791. ],
  792. },
  793. }))
  794. const amountErrorMessage = ref('')
  795. const validateAmount = (value) => {
  796. const amount = params.amount
  797. if (!amount && amount !== 0) {
  798. amountErrorMessage.value = t('vaildate.amount.format1')
  799. return false
  800. }
  801. if (mAmount.minAmount && mAmount.maxAmount) {
  802. const min = Number(mAmount.minAmount);
  803. const max = Number(mAmount.maxAmount);
  804. const numValue = Number(amount);
  805. if (numValue < min || numValue > max) {
  806. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  807. return false
  808. }
  809. }
  810. if (!/^[1-9]\d*$/.test(amount)) {
  811. amountErrorMessage.value = t('vaildate.amount.format1')
  812. return false
  813. }
  814. amountErrorMessage.value = ''
  815. return true
  816. }
  817. const NewYear24Data = reactive({
  818. balance: 0,
  819. income: 0,
  820. rate: 0,
  821. index: 0
  822. })
  823. const AccessToken = computed(() => ({
  824. "Access-Token": Session.Get("access_token")
  825. }))
  826. const lang = computed(() => {
  827. return locale.value == "en" && document.body.clientWidth < 1200
  828. })
  829. const langCN = computed(() => locale.value)
  830. const isSupportedCountry = computed(() => {
  831. try {
  832. const country = userInfo.value.customInfo.country
  833. return countries.includes(country)
  834. } catch {
  835. return false
  836. }
  837. })
  838. const country = computed(() => {
  839. return userInfo.value.customInfo.country
  840. })
  841. const userName = computed(() => {
  842. let first = userInfo.value.customInfo.firstName
  843. let last = userInfo.value.customInfo.lastName
  844. let middle = userInfo.value.customInfo.middle
  845. if (!first && !last && !middle) return false
  846. return (first ? first + " " : "") + (middle ? middle + " " : "") + (last ? last : "")
  847. })
  848. const areaCode = computed(() => userInfo.value.customInfo.areaCode)
  849. const phone = computed(() => userInfo.value.customInfo.phone)
  850. // 是否是国庆节
  851. const isGuoQin = computed(() => {
  852. let flag = false
  853. let startTime1 = "2024/10/01 00:00:00"
  854. let endTime1 = "2024/10/07 23:59:59"
  855. let timezone = 8
  856. let offset_GMT = new Date().getTimezoneOffset()
  857. let nowDate = new Date().getTime()
  858. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  859. let end = new Date(endTime1).getTime()
  860. let start = new Date(startTime1).getTime()
  861. if (now > start && now < end) flag = true
  862. return flag
  863. })
  864. const groupTitleMap = {
  865. 1: 'Custom.Deposit.Channel1',
  866. 2: 'Custom.Deposit.Channel2',
  867. 3: 'Custom.Deposit.Channel3',
  868. 4: 'Custom.Deposit.Channel4',
  869. 5: 'card.title'
  870. }
  871. // 排序表格数据
  872. const sortedTableData = computed(() => {
  873. const order = [
  874. tableData.Digital_Currency,
  875. tableData.China_UnionPay,
  876. tableData.Electronic_Wallet,
  877. tableData.International_Transfer,
  878. tableData.Ucard_Wallet
  879. ]
  880. return order.filter(item => item && item.length > 0)
  881. })
  882. // 方法
  883. const isAfterJuly21 = () => {
  884. const currentDate = new Date()
  885. const july21 = new Date(currentDate.getFullYear(), 6, 21)
  886. return currentDate >= july21
  887. }
  888. // 货币
  889. const groupCurrency = (type) => {
  890. if (type == "GBP") return ": £"
  891. else if (type == "USD") return ": $"
  892. else if (type == "EUR") return ": €"
  893. else if (type == "USC") return ": ¢"
  894. else return ": $"
  895. }
  896. // 货币符号
  897. const groupCurrency1 = (type) => {
  898. if (type == "GBP") return "£"
  899. else if (type == "USD") return "$"
  900. else if (type == "EUR") return "€"
  901. else if (type == "USC") return "¢"
  902. else return "$"
  903. }
  904. // 选择银行
  905. const selectCode = (codeVal) => {
  906. bankDate.value.forEach(item => {
  907. if (item.code == codeVal) {
  908. selectCodes.value = lang.value == "cn" ? item.name : item.enName
  909. mAmount.minAmount = item.minAmount || mAmount.minAmount
  910. mAmount.maxAmount = item.maxAmount || mAmount.maxAmount
  911. channelData.rate = item.rate || channelData.rate
  912. channelData.transformCurrency = item.currency || channelData.transformCurrency
  913. }
  914. })
  915. }
  916. // 账户类型
  917. const groupTypeName = (type) => {
  918. if (type == "1") return t("AccountType.ClassicAccount")
  919. else if (type == "2") return t("AccountType.SeniorAccount")
  920. else if (type == "5") return t("AccountType.SpeedAccount")
  921. else if (type == "6") return t("AccountType.SpeedAccount")
  922. else if (type == "7") return t("AccountType.StandardAccount")
  923. else if (type == "8") return t("AccountType.CentAccount")
  924. }
  925. const selectChange = () => {
  926. // 强制更新,在 Vue 3 中通常不需要
  927. }
  928. const handleProgress1 = () => {
  929. pictLoadingImg.value = true
  930. }
  931. const handleAvatarError1 = (err) => {
  932. let errorMessage = t("Msg.Fail")
  933. if (err && err.status) {
  934. switch (err.status) {
  935. case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
  936. case 401: errorMessage = t("Msg.UploadUnauthorized"); break
  937. case 403: errorMessage = t("Msg.UploadForbidden"); break
  938. case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
  939. case 500: errorMessage = t("Msg.UploadServerError"); break
  940. case 502:
  941. case 503:
  942. case 504: errorMessage = t("Msg.UploadNetworkError"); break
  943. default:
  944. if (err.message) errorMessage = err.message
  945. else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
  946. }
  947. } else if (err && err.message) {
  948. if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
  949. else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
  950. else errorMessage = err.message
  951. }
  952. $pigeon.MessageError(errorMessage)
  953. pictLoadingImg.value = false
  954. }
  955. const handleAvatarSuccess1 = (res) => {
  956. if (res.code == Code.StatusOK) {
  957. $pigeon.MessageOK(res.msg)
  958. imageUrl1.value = res.data
  959. requiteVoucherUrl.value = res.data
  960. } else {
  961. uni.showToast({ title: res.msg, icon: 'none' })
  962. }
  963. pictLoadingImg.value = false
  964. }
  965. // 上传凭证前校验
  966. const beforeAvatarUpload1 = (file) => {
  967. const isJPG = isImageType.checkFile(file.type)
  968. const isLt2M = isImageType.checkSize(file.size)
  969. if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
  970. if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
  971. return isJPG && isLt2M
  972. }
  973. // 上传凭证进度
  974. const handleProgress = () => {
  975. pictLoadingImg.value = true
  976. }
  977. // 上传凭证失败
  978. const handleAvatarError = (err) => {
  979. let errorMessage = t("Msg.Fail")
  980. if (err && err.status) {
  981. switch (err.status) {
  982. case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
  983. case 401: errorMessage = t("Msg.UploadUnauthorized"); break
  984. case 403: errorMessage = t("Msg.UploadForbidden"); break
  985. case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
  986. case 500: errorMessage = t("Msg.UploadServerError"); break
  987. case 502:
  988. case 503:
  989. case 504: errorMessage = t("Msg.UploadNetworkError"); break
  990. default:
  991. if (err.message) errorMessage = err.message
  992. else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
  993. }
  994. } else if (err && err.message) {
  995. if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
  996. else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
  997. else errorMessage = err.message
  998. }
  999. $pigeon.MessageError(errorMessage)
  1000. pictLoadingImg.value = false
  1001. }
  1002. // 上传凭证
  1003. const handleUploadDeposit = (options) => {
  1004. const originalUrl = actionAdd1.value || Config.Host80 + "/common/upload"
  1005. return createUploadRequest(originalUrl, AccessToken.value, 1)(options)
  1006. }
  1007. // 上传凭证成功
  1008. const handleAvatarSuccess = (res) => {
  1009. if (res.code == Code.StatusOK) {
  1010. $pigeon.MessageOK(res.msg)
  1011. imageUrl.value = res.data
  1012. requiteVoucherUrl.value = res.data
  1013. } else {
  1014. uni.showToast({ title: res.msg, icon: 'none' })
  1015. }
  1016. pictLoadingImg.value = false
  1017. }
  1018. // 上传凭证前校验
  1019. const beforeAvatarUpload = (file) => {
  1020. const isJPG = isImageType.checkFile(file.type)
  1021. const isLt2M = isImageType.checkSize(file.size)
  1022. if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
  1023. if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
  1024. return isJPG && isLt2M
  1025. }
  1026. // 打开添加银行弹窗
  1027. const openAddBankCard = () => {
  1028. if (ruleForm.bankCredit.length == 2) {
  1029. $pigeon.MessageConfirm(
  1030. t("Msg.WireTransfers"),
  1031. t("Msg.SystemPrompt"),
  1032. t("Btn.Confirm"),
  1033. t("Btn.Cancel"),
  1034. async () => { },
  1035. () => { }
  1036. )
  1037. } else {
  1038. openType.value = "add_CreditCard"
  1039. dialogInfoTradingAdd.value = true
  1040. }
  1041. }
  1042. const closeDiaAdd = () => {
  1043. dialogInfoTradingAdd.value = false
  1044. }
  1045. // 关闭添加银行弹窗
  1046. const closeAdd = (val) => {
  1047. dialogInfoTradingAdd.value = val
  1048. }
  1049. // 确认重新加载银行信息
  1050. const confirmToReload = () => {
  1051. dialogInfoTradingAdd.value = false
  1052. getBankInfo()
  1053. }
  1054. // 获取银行信息
  1055. const getBankInfo = async () => {
  1056. let res = await financialApi.customBankList({})
  1057. if (res.code == Code.StatusOK) {
  1058. ruleForm.bankCredit = []
  1059. res.data.forEach(item => {
  1060. if (item.type == 3) {
  1061. item.customBankCode = item.bankCode
  1062. item.bankCode = null
  1063. ruleForm.bankCredit.push(item)
  1064. }
  1065. if (item.defaultBank && item.type == 3) {
  1066. myId.value = item.id
  1067. form.bankUname = item.bankUname
  1068. form.bankCardNum = item.bankCardNum
  1069. form.cvv = item.cvv
  1070. form.expiryMonth = item.expiryMonth
  1071. form.expiryYear = item.expiryYear
  1072. form.pin = item.pin
  1073. }
  1074. })
  1075. } else {
  1076. uni.showToast({ title: res.msg, icon: 'none' })
  1077. }
  1078. }
  1079. // 选择银行
  1080. const chooseBank = (item) => {
  1081. if (formRef.value) formRef.value.clearValidate()
  1082. form.bankUname = item.bankUname
  1083. form.bankCardNum = item.bankCardNum
  1084. form.cvv = item.cvv
  1085. form.expiryMonth = item.expiryMonth
  1086. form.expiryYear = item.expiryYear
  1087. form.pin = item.pin
  1088. }
  1089. // 返回首页
  1090. const toHome = () => {
  1091. uni.switchTab({ url: "/pages/customer/index" })
  1092. }
  1093. // 提交确认信息弹窗
  1094. const submitConfirm = async () => {
  1095. console.log(params.requiteVoucherUrl, 1212);
  1096. if (channelData.confirmCreditCard == 1 && !myId.value) {
  1097. $pigeon.MessageWarning(t("PersonalManagement.Label.selectCreditCard"))
  1098. return
  1099. }
  1100. if (channelData.bankValid == 1 && !code.value) {
  1101. $pigeon.MessageWarning(t("vaildate.depositCurrency.empty"))
  1102. return
  1103. }
  1104. if ((channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") && !imageUrl.value) {
  1105. $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
  1106. return
  1107. }
  1108. if (params.promoCode && params.agree2) {
  1109. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1110. return
  1111. }
  1112. if (params.promoCode && params.agree3) {
  1113. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1114. return
  1115. }
  1116. if (params.promoCode && params.agree4) {
  1117. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1118. return
  1119. }
  1120. if (params.promoCode && params.agree5) {
  1121. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1122. return
  1123. }
  1124. if (params.promoCode && params.agree6) {
  1125. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1126. return
  1127. }
  1128. if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 && !imageUrl.value) {
  1129. $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
  1130. return
  1131. }
  1132. try {
  1133. if (formRef.value) {
  1134. await formRef.value.validate()
  1135. openDontActive()
  1136. }
  1137. } catch (error) {
  1138. if (error instanceof Array) {
  1139. uni.showToast({ title: error[0].errorMessage, icon: 'none' });
  1140. return
  1141. } else {
  1142. responseMessage.value = error.msg;
  1143. }
  1144. }
  1145. }
  1146. // 打开不参加活动弹窗
  1147. const openDontActive = () => {
  1148. if (!tableData4Flag.value && !tableData4TwoFlag.value && !tableDataNewListFlag.value && (country.value != "CN" || (country.value == "CN" && (ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 7))) && ACCType.value != 3 && params.agree2) {
  1149. tosubmitConfirm()
  1150. return
  1151. }
  1152. if (tableData4Flag.value && params.agree4) {
  1153. tosubmitConfirm()
  1154. return
  1155. }
  1156. if (tableData4TwoFlag.value && params.agree5) {
  1157. tosubmitConfirm()
  1158. return
  1159. }
  1160. if (tableDataNewListFlag.value && params.agree6) {
  1161. tosubmitConfirm()
  1162. return
  1163. }
  1164. if (limitedStatus.value && limitedStatusCheck.value) {
  1165. tosubmitConfirm()
  1166. return
  1167. }
  1168. if ((ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 5 || ACCType.value == 6 || ACCType.value == 7) && anshiClose.value && params.agree3) {
  1169. tosubmitConfirm()
  1170. return
  1171. }
  1172. tosubmitConfirm()
  1173. }
  1174. // 打开提交前信息弹窗
  1175. const tosubmitConfirm = () => {
  1176. dialogDontActive.value = false
  1177. dialogCheckConfirm_form.confirmAreaCode = areaCode.value
  1178. dialogCheckConfirm_form.confirmPhone = phone.value
  1179. dialogCheckConfirm.value = true
  1180. }
  1181. // 最后确认
  1182. const dialogSuccess = computed(() => dialogCheckOK.value && dialogVisible.value)
  1183. // 最后失败
  1184. const dialogError = computed(() => dialogCheckOK.value && !dialogVisible.value)
  1185. // 提交后确认
  1186. const dialogCheckSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  1187. // 提交后失败
  1188. const dialogCheckError = computed(() => dialogCheck.value && !dialogVisible.value)
  1189. // 提交申请
  1190. const submit = async () => {
  1191. if (flag.value) return
  1192. flag.value = true
  1193. dialogCheckConfirm.value = false
  1194. dialogCheckWait.value = true
  1195. try {
  1196. if (channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") {
  1197. let res = await financialApi.telegraphicPay({
  1198. requiteVoucherUrl: imageUrl1.value,
  1199. amount: params.amount,
  1200. login: $route.query.login,
  1201. voucherUrl: imageUrl.value,
  1202. activityDeposit: params.agree2 ? 1 : 0,
  1203. activityPercentageGive: params.agree3 ? 1 : 0,
  1204. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1205. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1206. activityGive: params.agree6 ? 1 : 0,
  1207. promoCode: params.promoCode,
  1208. code: channelData.code,
  1209. bankMsg: WireTransferAccount.bankMsg || "",
  1210. name: channelData.confirmName ? userName.value : null,
  1211. areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
  1212. phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
  1213. ip: uni.getStorageSync("CLIENT")
  1214. })
  1215. dialogCheckWait.value = false
  1216. if (res.code == Code.StatusOK) {
  1217. imageUrl1.value = ""
  1218. limitedStatusCheck.value = false
  1219. dialogCheckOK.value = true
  1220. dialogVisible.value = true
  1221. flag.value = false
  1222. } else {
  1223. RES.value = res.msg
  1224. dialogCheckOK.value = true
  1225. dialogVisible.value = false
  1226. flag.value = false
  1227. }
  1228. } else if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0) {
  1229. let res = await financialApi.digitalPay({
  1230. requiteVoucherUrl: imageUrl1.value,
  1231. amount: params.amount,
  1232. login: $route.query.login,
  1233. voucherUrl: imageUrl.value,
  1234. activityDeposit: params.agree2 ? 1 : 0,
  1235. activityPercentageGive: params.agree3 ? 1 : 0,
  1236. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1237. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1238. activityGive: params.agree6 ? 1 : 0,
  1239. promoCode: params.promoCode,
  1240. ip: uni.getStorageSync("CLIENT")
  1241. })
  1242. dialogCheckWait.value = false
  1243. if (res.code == Code.StatusOK) {
  1244. dialogCheckOK.value = true
  1245. dialogVisible.value = true
  1246. flag.value = false
  1247. } else {
  1248. RES.value = res.msg
  1249. dialogCheckOK.value = true
  1250. dialogVisible.value = false
  1251. flag.value = false
  1252. }
  1253. } else {
  1254. let par = ""
  1255. if (channelData.bankValid == 1) {
  1256. par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${code.value}/${(params.agree2 ? 1 : 0)}`
  1257. } else {
  1258. par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${(params.agree2 ? 1 : 0)}`
  1259. }
  1260. let res = await financialApi.PayBankCode(par, {
  1261. requiteVoucherUrl: imageUrl1.value,
  1262. promoCode: params.promoCode,
  1263. name: channelData.confirmName ? userName.value : null,
  1264. areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
  1265. phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
  1266. activityPercentageGive: params.agree3 ? 1 : 0,
  1267. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1268. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1269. activityGive: params.agree6 ? 1 : 0,
  1270. ip: uni.getStorageSync("CLIENT"),
  1271. ...form
  1272. })
  1273. dialogCheckWait.value = false
  1274. if (res.code == Code.StatusOK) {
  1275. if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
  1276. dealResult(res.data)
  1277. } else {
  1278. if (res.data.type == 1) {
  1279. goPayLink.value = res.data.result
  1280. window.open(res.data.result)
  1281. } else if (res.data.type == 2) {
  1282. let token = AccessToken.value["Access-Token"]
  1283. token = tool.tokenReplace(token)
  1284. goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
  1285. window.open(goPayLink.value)
  1286. } else if (res.data.type == 5) {
  1287. $pigeon.MessageConfirm(
  1288. t("PersonalManagement.Label.item2"),
  1289. t("Msg.SystemPrompt"),
  1290. t("Btn.Cancel"),
  1291. t("Btn.Confirm"),
  1292. async () => { },
  1293. () => {
  1294. goPayLink.value = res.data.result
  1295. dialogCheck.value = true
  1296. dialogVisible.value = true
  1297. window.open(res.data.result)
  1298. }
  1299. )
  1300. } else if (res.data.type == 8) {
  1301. goPayLink.value = Host04 + res.data.result
  1302. window.open(goPayLink.value)
  1303. } else if (res.data.type == 9) {
  1304. goPayLink.value = setCardUrl(res.data.result)
  1305. window.open(goPayLink.value)
  1306. } else if (res.data.type == 10) {
  1307. goPayLink.value = Host80 + '/pay/onchainpay.html?params=' + res.data.result
  1308. window.open(goPayLink.value)
  1309. }
  1310. if (res.data.type != 5) {
  1311. dialogCheck.value = true
  1312. dialogVisible.value = true
  1313. }
  1314. }
  1315. flag.value = false
  1316. } else {
  1317. RES.value = res.msg
  1318. dialogCheck.value = true
  1319. dialogVisible.value = false
  1320. flag.value = false
  1321. }
  1322. }
  1323. } catch (error) {
  1324. dialogCheckWait.value = false
  1325. flag.value = false
  1326. dialogCheckOK.value = true
  1327. dialogVisible.value = false
  1328. RES.value = error.msg
  1329. }
  1330. }
  1331. const setCardUrl = (serial) => {
  1332. let params = `${AccessToken.value["Access-Token"]}/${locale.value}/${serial}/1/pay`
  1333. return initLink({ link: imgUrl.value + '/pay/paycard.html', params })
  1334. }
  1335. //处理申请返回result
  1336. const dealResult = (data) => {
  1337. DealResultType.value = data.type
  1338. DealResultResult.value = data.result
  1339. if (data.type == 3) {
  1340. dialogDealResult_form.pin = ""
  1341. } else if (data.type == 4) {
  1342. dialogDealResult_form.otp = ""
  1343. } else if (data.type == 6) {
  1344. dialogDealResult_form.state = userInfo.value.state
  1345. dialogDealResult_form.city = userInfo.value.city
  1346. dialogDealResult_form.country = (["cn", "zhHant"].indexOf(locale.value) != -1) ? userInfo.value.countryName : userInfo.value.countryEnName
  1347. dialogDealResult_form.address = (userInfo.value.addressLines && userInfo.value.addressLines[0]) || ""
  1348. dialogDealResult_form.zipCode = userInfo.value.zipCode
  1349. dialogDealResultTitle.value = t("PersonalManagement.Label.item3")
  1350. } else if (data.type == 7) {
  1351. dialogDealResult_form.phone = userInfo.value.phone
  1352. dialogDealResultTitle.value = t("PersonalManagement.Label.item4")
  1353. }
  1354. dialogDealResult.value = true
  1355. }
  1356. //重新提交
  1357. const submitDealResult = async () => {
  1358. if (flag.value) return
  1359. flag.value = true
  1360. dialogCheckConfirm.value = false
  1361. dialogCheckWait.value = true
  1362. let par = Host04 + DealResultResult.value
  1363. let dataList = {}
  1364. if (DealResultType.value == 3) dataList = { pin: dialogDealResult_form.pin }
  1365. else if (DealResultType.value == 4) dataList = { otp: dialogDealResult_form.otp }
  1366. else if (DealResultType.value == 6) {
  1367. dataList = {
  1368. state: dialogDealResult_form.state,
  1369. city: dialogDealResult_form.city,
  1370. country: dialogDealResult_form.country,
  1371. address: dialogDealResult_form.address,
  1372. zipCode: dialogDealResult_form.zipCode
  1373. }
  1374. } else if (DealResultType.value == 7) dataList = { phone: dialogDealResult_form.phone }
  1375. let res = await financialApi.PayDealResult(par, dataList)
  1376. dialogCheckWait.value = false
  1377. dialogDealResult.value = false
  1378. if (res.code == Code.StatusOK) {
  1379. if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
  1380. dealResult(res.data)
  1381. } else {
  1382. if (res.data.type == 1) {
  1383. goPayLink.value = res.data.result
  1384. window.open(res.data.result)
  1385. } else if (res.data.type == 2) {
  1386. let token = AccessToken.value["Access-Token"]
  1387. token = tool.tokenReplace(token)
  1388. goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
  1389. window.open(goPayLink.value)
  1390. } else if (res.data.type == 5) {
  1391. $pigeon.MessageConfirm(
  1392. t("PersonalManagement.Label.item2"),
  1393. t("Msg.SystemPrompt"),
  1394. t("Btn.Cancel"),
  1395. t("Btn.Confirm"),
  1396. async () => { },
  1397. () => {
  1398. goPayLink.value = res.data.result
  1399. dialogCheck.value = true
  1400. dialogVisible.value = true
  1401. window.open(res.data.result)
  1402. }
  1403. )
  1404. } else if (res.data.type == 8) {
  1405. goPayLink.value = Host04 + res.data.result
  1406. window.open(goPayLink.value)
  1407. } else if (res.data.type == 9) {
  1408. dialogCheckOK.value = true
  1409. dialogVisible.value = true
  1410. flag.value = false
  1411. return
  1412. }
  1413. if (res.data.type != 5) {
  1414. dialogCheck.value = true
  1415. dialogVisible.value = true
  1416. }
  1417. }
  1418. flag.value = false
  1419. } else {
  1420. RES.value = res.msg
  1421. dialogCheck.value = true
  1422. dialogVisible.value = false
  1423. flag.value = false
  1424. dialogDealResult.value = false
  1425. }
  1426. }
  1427. const closeDia = () => {
  1428. dialogCheck.value = false
  1429. dialogVisible.value = false
  1430. dialogCheckOK.value = false
  1431. showTable()
  1432. }
  1433. const isStep3Open = () => {
  1434. isStep3.value = true
  1435. //中国网银弹窗
  1436. if (tableData.China_UnionPay.length && tableData.China_UnionPay[0].type == 2) {
  1437. let timezone = 8
  1438. let offset_GMT = new Date().getTimezoneOffset()
  1439. let nowDate = new Date().getTime()
  1440. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1441. let newTime = now.getHours().toString()
  1442. if ((newTime.length == 1 && newTime >= 0 && newTime < 8) || (newTime.length == 2 && newTime >= 22 && newTime < 24)) {
  1443. dialogChinaUnionPay.value = true
  1444. }
  1445. }
  1446. }
  1447. // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
  1448. const isAfterSeptember30 = () => {
  1449. // const currentDate = new Date();
  1450. // const september30 = new Date(
  1451. // currentDate.getFullYear(),
  1452. // 8,
  1453. // 30,
  1454. // 23,
  1455. // 59,
  1456. // 59
  1457. // ); // 月份从0开始,8表示9月,设置为23:59:59
  1458. // return currentDate > september30;
  1459. return true
  1460. }
  1461. const getMetaInfo = () => {
  1462. metaInfo.value = window.getMetaInfo()
  1463. metaInfo.value = { ...metaInfo.value, deviceType: "h5" }
  1464. }
  1465. //获取kyc二维码
  1466. const qrCode = async (depositChannelCode, row) => {
  1467. getMetaInfo()
  1468. let res = await activityApi.getWebsdkLink({
  1469. depositChannelCode,
  1470. metaInfo: metaInfo.value
  1471. })
  1472. if (res.code == Code.StatusOK) {
  1473. if (res.data) {
  1474. text1.value = JSON.parse(res.data).url
  1475. dialogKyc.value = true
  1476. flag.value = false
  1477. } else {
  1478. doShowStep3(row)
  1479. }
  1480. } else {
  1481. flag.value = false
  1482. uni.showToast({ title: res.msg, icon: 'none' })
  1483. }
  1484. }
  1485. const doShowStep3 = (row) => {
  1486. if (row.confirmCreditCard == 1) getBankInfo()
  1487. getCheckExistSuccess()
  1488. if (row.bankValid && isChannel.value) {
  1489. getBankList(row)
  1490. isChannel.value = false
  1491. step3.value = true
  1492. Object.assign(channelData, row)
  1493. mAmount.minAmount = row.minAmount
  1494. mAmount.maxAmount = row.maxAmount
  1495. } else {
  1496. step3.value = true
  1497. bankDate.value = []
  1498. Object.assign(channelData, row)
  1499. mAmount.minAmount = row.minAmount
  1500. mAmount.maxAmount = row.maxAmount
  1501. }
  1502. tableData.International_Transfer = []
  1503. tableData.China_UnionPay = []
  1504. tableData.Digital_Currency = []
  1505. tableData.Electronic_Wallet = []
  1506. tableData.Ucard_Wallet = []
  1507. if (row.type == 1) tableData.International_Transfer[0] = row
  1508. if (row.type == 2) tableData.China_UnionPay[0] = row
  1509. if (row.type == 3) tableData.Digital_Currency[0] = row
  1510. if (row.type == 4) tableData.Electronic_Wallet[0] = row
  1511. if (row.type == 5) tableData.Ucard_Wallet[0] = row
  1512. introduce.introduce = row.introduce
  1513. introduce.enIntroduce = row.enIntroduce
  1514. if (row.code == "UNION_PAY_TELEGRAPHIC" || row.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || row.code == "UNION_PAY_TELEGRAPHIC_TWO" || (row.code && row.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0)) {
  1515. let pro = []
  1516. if (row.property && row.property.substring(0, 1) == "[") {
  1517. pro = JSON.parse(row.property)
  1518. } else if (row.property && row.property.substring(0, 1) != "[") {
  1519. let proper = "[" + row.property + "]"
  1520. pro = JSON.parse(proper)
  1521. }
  1522. let ind = pro.length
  1523. if (ind) {
  1524. let index = parseInt(Math.random() * ind + 1)
  1525. Object.assign(WireTransferAccount, pro[index - 1])
  1526. actionAdd1.value = Host80 + "/common/upload"
  1527. } else {
  1528. Object.assign(WireTransferAccount, {})
  1529. actionAdd1.value = Host80 + "/common/upload"
  1530. }
  1531. }
  1532. }
  1533. //选择支付方式
  1534. const isShowStep3 = (row) => {
  1535. if (row.kycChannel != 1) {
  1536. doShowStep3(row)
  1537. } else {
  1538. qrCode(row.code, row)
  1539. }
  1540. }
  1541. //更换支付方式
  1542. const showTable = () => {
  1543. resetForm();
  1544. dialogCheckWait.value = false;
  1545. dialogVisible.value = false;
  1546. flag.value = false;
  1547. form.bankUname = undefined
  1548. form.bankCardNum = undefined
  1549. form.cvv = undefined
  1550. form.expiryMonth = undefined
  1551. form.expiryYear = undefined
  1552. form.pin = undefined
  1553. myId.value = null
  1554. params.amount = ""
  1555. params.amount1 = ""
  1556. params.agree = false
  1557. params.agree2 = false
  1558. params.agree3 = false
  1559. params.agree4 = false
  1560. params.agree5 = false
  1561. params.agree6 = false
  1562. params.promoCode = ""
  1563. isChannel.value = true
  1564. imageUrl.value = ""
  1565. bankDate.value = []
  1566. code.value = ""
  1567. WireTransferAccount.bankMsg = ""
  1568. introduce.introduce = ""
  1569. introduce.enIntroduce = ""
  1570. }
  1571. const loginComboxOptions = computed(() => {
  1572. return loginOptions.value.map((item) => ({
  1573. text: item.label,
  1574. value: item.login
  1575. }))
  1576. })
  1577. const creditCardOptions = computed(() => {
  1578. return ruleForm.bankCredit.map((item, index) => ({
  1579. text: `${item.bankUname}-${item.bankCardNum}`,
  1580. value: item.id
  1581. }))
  1582. })
  1583. const bankOptions = computed(() => {
  1584. return bankDate.value.map((item, index) => ({
  1585. text: (locale.value === 'cn' || locale.value === 'zhHant') ? item.name : item.enName,
  1586. value: item.code
  1587. }))
  1588. })
  1589. // 获取账户信息
  1590. const getDateList = async () => {
  1591. loading.value = true
  1592. let res = await customApi.CustomDropdown({ platform: "" })
  1593. if (res.code == Code.StatusOK) {
  1594. loginOptions.value = res.data.map(item => ({
  1595. ...item,
  1596. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1597. }))
  1598. const pages = getCurrentPages()
  1599. const route = pages[pages.length - 1].$page?.options || {}
  1600. if (route.login) {
  1601. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1602. loginValue.value = found.login
  1603. loginValueDoc.value = found.label
  1604. step2.value = true
  1605. }
  1606. } else {
  1607. uni.showToast({ title: res.msg, icon: 'none' })
  1608. }
  1609. loading.value = false
  1610. }
  1611. //获取入金通道
  1612. const getDepositList = async () => {
  1613. pictLoading.value = true
  1614. tableData.International_Transfer = []
  1615. tableData.China_UnionPay = []
  1616. tableData.Digital_Currency = []
  1617. tableData.Electronic_Wallet = []
  1618. tableData.Ucard_Wallet = []
  1619. let res = await financialApi.RemittanceChannelList({})
  1620. if (res.code == Code.StatusOK) {
  1621. res.data.forEach(item => {
  1622. if (item.type == 1) tableData.International_Transfer.push(item), tableData1.International_Transfer.push(item)
  1623. if (item.type == 2) tableData.China_UnionPay.push(item), tableData1.China_UnionPay.push(item)
  1624. if (item.type == 3) tableData.Digital_Currency.push(item), tableData1.Digital_Currency.push(item)
  1625. if (item.type == 4) tableData.Electronic_Wallet.push(item), tableData1.Electronic_Wallet.push(item)
  1626. if (item.type == 5) tableData.Ucard_Wallet.push(item), tableData1.Ucard_Wallet.push(item)
  1627. })
  1628. pictLoading.value = false
  1629. } else {
  1630. uni.showToast({ title: res.msg, icon: 'none' })
  1631. pictLoading.value = false
  1632. }
  1633. }
  1634. //获取银行列表
  1635. const getBankList = async (row) => {
  1636. let res = await financialApi.BankList({ channelCode: row.code })
  1637. try {
  1638. if (res.code == Code.StatusOK) {
  1639. let bank = res.data
  1640. let data = []
  1641. bank.forEach(j => {
  1642. if (!j.minAmount && j.minAmount != 0) j.minAmount = row.minAmount
  1643. if (!j.maxAmount && j.maxAmount != 0) j.maxAmount = row.maxAmount
  1644. j.bankValid = row.bankValid
  1645. j.requestUrl = row.requestUrl
  1646. data.push(j)
  1647. })
  1648. bankDate.value = data
  1649. } else {
  1650. uni.showToast({ title: res.msg, icon: 'none' })
  1651. }
  1652. } catch (error) {
  1653. uni.showToast({ title: error.msg, icon: 'none' })
  1654. }
  1655. }
  1656. //获取20赠金活动信息
  1657. const getCheckExistSuccess = async () => {
  1658. let res = await financialApi.depositCheckExistSuccess({})
  1659. if (res.code == Code.StatusOK) {
  1660. CheckExistSuccess.value = res.data
  1661. } else {
  1662. uni.showToast({ title: res.msg, icon: 'none' })
  1663. }
  1664. }
  1665. //20赠金是否到期-4月30号23:59:59的时候关闭申请
  1666. const is20Open = () => {
  1667. let endTime1 = "2023/04/30 23:59:59"
  1668. let timezone = 2
  1669. let offset_GMT = new Date().getTimezoneOffset()
  1670. let nowDate = new Date().getTime()
  1671. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1672. let end = new Date(endTime1).getTime()
  1673. if (now > end) anshiClose.value = false
  1674. }
  1675. //限时活动
  1676. const ActivityRequiteInfo = async () => {
  1677. let res = await activityApi.ActivityRequiteInfo({})
  1678. if (res.code == Code.StatusOK) {
  1679. limitedStatus.value = res.data
  1680. } else {
  1681. uni.showToast({ title: res.msg, icon: 'none' })
  1682. }
  1683. }
  1684. //2023年中赠金活动数据-10
  1685. const Activity24nianzhongInfo = async () => {
  1686. let res = await activityApi.Activity23nianzhongInfo({})
  1687. if (res.code == Code.StatusOK) {
  1688. Object.assign(tableData4, res.data)
  1689. // const Data4 = {
  1690. // "activityEndTime": null,
  1691. // "activityStartTime": null,
  1692. // "applicationEndTime": null,
  1693. // "applicationStartTime": null,
  1694. // "loginTypes": [5, 6],
  1695. // "show": 1,
  1696. // "useApply": 1
  1697. // };
  1698. // Object.assign(tableData4, Data4)
  1699. // tableData4Flag.value = tableData4.show == 1 && tableData4.useApply == 1
  1700. } else {
  1701. uni.showToast({ title: res.msg, icon: 'none' })
  1702. }
  1703. }
  1704. //2023年中赠金活动数据-20
  1705. const Activity24nianzhongTwoInfo = async () => {
  1706. let res = await activityApi.Activity23nianzhongTwoInfo({})
  1707. if (res.code == Code.StatusOK) {
  1708. Object.assign(tableData4Two, res.data)
  1709. // const Data4 = {
  1710. // "activityEndTime": null,
  1711. // "activityStartTime": null,
  1712. // "applicationEndTime": null,
  1713. // "applicationStartTime": null,
  1714. // "loginTypes": [5, 6],
  1715. // "show": 1,
  1716. // "useApply": 1
  1717. // };
  1718. // Object.assign(tableData4Two, Data4)
  1719. // tableData4Flag.value = tableData4Two.show == 1 && tableData4Two.useApply == 1
  1720. } else {
  1721. uni.showToast({ title: res.msg, icon: 'none' })
  1722. }
  1723. }
  1724. //2023年中赠金活动权限
  1725. const get23nianzhongTwoLogin = async (newVal) => {
  1726. let res = await activityApi.Activity23nianzhongTwoLogin({ login: newVal })
  1727. if (res.code == Code.StatusOK) {
  1728. Object.assign(tableData4Two, res.data)
  1729. tableData4TwoFlag.value = tableData4Two.show == 1
  1730. } else {
  1731. uni.showToast({ title: res.msg, icon: 'none' })
  1732. }
  1733. }
  1734. const getActivityExtensionGiveLogin = async (newVal) => {
  1735. let res = await activityApi.ActivityExtensionGiveLogin({ login: newVal })
  1736. if (res.code == Code.StatusOK) {
  1737. Object.assign(tableDataNewList, res.data)
  1738. tableDataNewListFlag.value = tableDataNewList.show == 1
  1739. } else {
  1740. uni.showToast({ title: res.msg, icon: 'none' })
  1741. }
  1742. }
  1743. const getActivityExtensionGiveLoginJoin = async (newVal) => {
  1744. let res = await activityApi.ActivityExtensionGiveLoginJoin({ login: newVal })
  1745. if (res.code == Code.StatusOK) {
  1746. giveLoginJoin.value = res.data
  1747. } else {
  1748. uni.showToast({ title: res.msg, icon: 'none' })
  1749. giveLoginJoin.value = ""
  1750. }
  1751. }
  1752. //24新年庆典 开始
  1753. const isNewYear24Open = () => {
  1754. let endTime1 = "2025/3/31 23:59:59"
  1755. let startTime1 = "2025/1/1 00:00:00"
  1756. let timezone = 2
  1757. let offset_GMT = new Date().getTimezoneOffset()
  1758. let nowDate = new Date().getTime()
  1759. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1760. let end = new Date(endTime1).getTime()
  1761. let start = new Date(startTime1).getTime()
  1762. if (now < end && start < now) ActivityNewYear24()
  1763. }
  1764. const ActivityNewYear24 = async () => {
  1765. let res = await activityApi.ActivityNewYear24({})
  1766. if (res.code == Code.StatusOK) {
  1767. tableDataNewYear24.value = res.data
  1768. if (typeof tableDataNewYear24.value == "object") toIncome()
  1769. } else {
  1770. uni.showToast({ title: res.msg, icon: 'none' })
  1771. }
  1772. }
  1773. const toIncome = () => {
  1774. let balance = Number(tableDataNewYear24.value.balance) || 0
  1775. tableDataNewYear24.value.details.forEach((item, index) => {
  1776. if (balance > item.min && balance <= item.max) {
  1777. NewYear24Data.rate = item.rate
  1778. NewYear24Data.index = item.index
  1779. NewYear24Data.balance = (Number(tableDataNewYear24.value.details[index + 1].min) - balance).toFixed(2)
  1780. NewYear24Data.income = ((Number(tableDataNewYear24.value.details[index + 1].min) * Number(tableDataNewYear24.value.details[index + 1].rate) / 100 / 365) * 365).toFixed(2)
  1781. tableDataNewYear24Flag.value = true
  1782. } else if (balance > item.min && balance >= item.max && item.max == 0) {
  1783. tableDataNewYear24Flag.value = false
  1784. }
  1785. })
  1786. }
  1787. //24新年庆典 结束
  1788. // 新改内容
  1789. // userStore.paymentChannel.value
  1790. // userStore.channelList.value
  1791. const channel = computed(() => userStore.paymentChannel)
  1792. const channelList = computed(() => userStore.channelList)
  1793. const channelListOptions = ref([])
  1794. const channelId = ref(null)
  1795. const loading = ref(false)
  1796. const setAllAmount = () => {
  1797. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  1798. params.amount = parseInt(found.balance)
  1799. validateAmount()
  1800. }
  1801. const allTabs = computed(() => {
  1802. return {
  1803. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1804. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1805. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1806. "International_Transfer": t('Custom.Deposit.Channel1'),
  1807. "Ucard_Wallet": t('card.title'),
  1808. }
  1809. })
  1810. function formatChannels(data) {
  1811. const result = []
  1812. // 遍历每个分类
  1813. for (const key in data) {
  1814. const list = data[key] || []
  1815. // 插入分类标题(禁用项)
  1816. if (list.length) {
  1817. result.push({
  1818. text: allTabs.value[key],
  1819. value: key,
  1820. disable: true
  1821. })
  1822. }
  1823. list.forEach(item => {
  1824. result.push({
  1825. ...item,
  1826. text: item.name,
  1827. value: item.code
  1828. })
  1829. })
  1830. }
  1831. return result
  1832. }
  1833. // 生命周期
  1834. onMounted(() => {
  1835. if (channelList.value) {
  1836. channelListOptions.value = formatChannels(channelList.value)
  1837. }
  1838. channelId.value = channel.value
  1839. getDateList()
  1840. isStep3Open()
  1841. setTimeout(() => {
  1842. if (country.value === "VN") dialogVietnamNotice.value = true
  1843. is20Open()
  1844. // Activity24nianzhongInfo();
  1845. // Activity24nianzhongTwoInfo();
  1846. // dealResult({ "type": 7, "result": "/krad/pin?serial=123123" })
  1847. isNewYear24Open()
  1848. ActivityRequiteInfo()
  1849. }, 800);
  1850. })
  1851. onUnmounted(() => {
  1852. userStore.savePaymentChannel('')
  1853. userStore.saveChannelList('')
  1854. })
  1855. watch(channelId, async (newVal) => {
  1856. if (newVal) {
  1857. showTable()
  1858. let row = channelListOptions.value.find(item => item.code == newVal)
  1859. isShowStep3(row)
  1860. }
  1861. });
  1862. watch(isStep3, async (newVal) => {
  1863. if (newVal) {
  1864. await nextTick();
  1865. formRef.value?.clearValidate();
  1866. resetForm();
  1867. await nextTick();
  1868. formRef.value?.clearValidate();
  1869. }
  1870. });
  1871. // Watch
  1872. watch(loginValue, (login) => {
  1873. if (login) {
  1874. step3.value = true
  1875. }
  1876. })
  1877. watch(() => params.amount, (newVal) => {
  1878. if (newVal && channelData.rate) {
  1879. params.amount1 = (newVal * channelData.rate).toFixed(2)
  1880. }
  1881. })
  1882. watch(() => imageUrl, (newVal) => {
  1883. console.log(newVal, 12);
  1884. }, { deep: true })
  1885. watch(() => params.agree3, (newVal) => {
  1886. if (newVal) {
  1887. params.agree2 = false
  1888. params.agree4 = false
  1889. params.agree5 = false
  1890. params.agree6 = false
  1891. }
  1892. })
  1893. watch(() => params.agree2, (newVal) => {
  1894. if (newVal) {
  1895. params.agree3 = false
  1896. params.agree4 = false
  1897. params.agree5 = false
  1898. params.agree6 = false
  1899. }
  1900. })
  1901. watch(() => params.agree4, (newVal) => {
  1902. if (newVal) {
  1903. params.agree3 = false
  1904. params.agree2 = false
  1905. params.agree5 = false
  1906. params.agree6 = false
  1907. }
  1908. })
  1909. watch(() => params.agree5, (newVal) => {
  1910. if (newVal) {
  1911. params.agree3 = false
  1912. params.agree2 = false
  1913. params.agree4 = false
  1914. params.agree6 = false
  1915. }
  1916. })
  1917. watch(() => params.agree6, (newVal) => {
  1918. if (newVal) {
  1919. params.agree3 = false
  1920. params.agree2 = false
  1921. params.agree4 = false
  1922. params.agree5 = false
  1923. if (giveLoginJoin.value.flag == false) {
  1924. let tips = ""
  1925. if (giveLoginJoin.value.promptType == 1) tips = t("surplusList.item10")
  1926. else tips = t("surplusList.item11")
  1927. if (giveLoginJoin.value.activityCategory == 1) {
  1928. $pigeon.MessageConfirm(
  1929. tips,
  1930. t("Msg.SystemPrompt"),
  1931. t("surplusList.item12"),
  1932. t("Home.msg.item3"),
  1933. () => {
  1934. $pigeon.MessageConfirm(
  1935. t("surplusList.item13"),
  1936. t("Msg.SystemPrompt"),
  1937. t("Btn.Confirm"),
  1938. t("Btn.Cancel"),
  1939. async () => {
  1940. try {
  1941. const res = await activityApi.ActivityGiveCancel({ login: $route.query.login })
  1942. if (res.code == Code.StatusOK) $pigeon.MessageOK(res.msg || t("Msg.Success"))
  1943. else uni.showToast({ title: res.msg, icon: 'none' })
  1944. } catch (error) {
  1945. $pigeon.MessageError(t("Msg.Fail"))
  1946. }
  1947. },
  1948. () => { params.agree6 = false }
  1949. )
  1950. },
  1951. () => { },
  1952. { showCancelButton: true }
  1953. )
  1954. } else if (giveLoginJoin.value.activityCategory == 2) {
  1955. $pigeon.MessageConfirm(
  1956. tips,
  1957. t("Msg.SystemPrompt"),
  1958. "跳转",
  1959. t("Btn.Cancel"),
  1960. () => {
  1961. $pigeon.MessageConfirm(
  1962. "是否跳转到对应活动取消",
  1963. t("Msg.SystemPrompt"),
  1964. t("Btn.Confirm"),
  1965. t("Btn.Cancel"),
  1966. () => {
  1967. uni.navigateTo({ url: "/pages/customer/monthly/list" })
  1968. },
  1969. () => { params.agree6 = false }
  1970. )
  1971. },
  1972. () => { },
  1973. { showCancelButton: false }
  1974. )
  1975. } else {
  1976. $pigeon.MessageConfirm(
  1977. tips,
  1978. t("Msg.SystemPrompt"),
  1979. t("Btn.Confirm"),
  1980. t("Btn.Cancel")
  1981. )
  1982. }
  1983. }
  1984. }
  1985. })
  1986. </script>
  1987. <style lang="scss" scoped>
  1988. @import "@/uni.scss";
  1989. .custom-deposit {
  1990. width: px2rpx(566);
  1991. flex-shrink: 0;
  1992. .crm-title-box {
  1993. margin-bottom: px2rpx(20);
  1994. .tit {
  1995. font-size: px2rpx(20);
  1996. font-weight: 700;
  1997. color: var(--color-navy-900);
  1998. }
  1999. }
  2000. .box {
  2001. margin-bottom: px2rpx(20);
  2002. .b-card {
  2003. // background: #fff;
  2004. // border-radius: px2rpx(12);
  2005. // padding: px2rpx(20);
  2006. // box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  2007. .card-top {
  2008. .tit {
  2009. font-size: px2rpx(16);
  2010. font-weight: 600;
  2011. margin-bottom: px2rpx(16);
  2012. display: flex;
  2013. align-items: center;
  2014. color: var(--color-navy-900);
  2015. position: relative;
  2016. padding-left: 20px;
  2017. &:after {
  2018. content: '';
  2019. position: absolute;
  2020. left: 0;
  2021. top: 50%;
  2022. transform: translateY(-50%);
  2023. width: 0;
  2024. height: 0;
  2025. border-top: 6px solid transparent;
  2026. border-bottom: 6px solid transparent;
  2027. border-left: 8px solid currentColor;
  2028. }
  2029. }
  2030. }
  2031. .channelType {
  2032. font-size: px2rpx(15);
  2033. font-weight: 600;
  2034. margin: px2rpx(24) 0 px2rpx(12);
  2035. color: var(--color-navy-700);
  2036. padding-left: px2rpx(8);
  2037. border-left: px2rpx(4) solid var(--color-primary);
  2038. }
  2039. }
  2040. }
  2041. .reselect-btn {
  2042. margin-top: px2rpx(20);
  2043. display: flex;
  2044. justify-content: flex-end;
  2045. .reselect {
  2046. background-color: var(--color-zinc-100);
  2047. color: var(--color-navy-700);
  2048. border: none;
  2049. font-size: px2rpx(14);
  2050. padding: px2rpx(8) px2rpx(20);
  2051. border-radius: px2rpx(8);
  2052. &:active {
  2053. background-color: var(--color-zinc-200);
  2054. }
  2055. }
  2056. }
  2057. .s-btn[type="primary"] {
  2058. width: 100%;
  2059. height: px2rpx(48);
  2060. background-color: #cf1322;
  2061. color: #fff;
  2062. border-radius: px2rpx(12);
  2063. font-size: px2rpx(16);
  2064. font-weight: 600;
  2065. display: flex;
  2066. align-items: center;
  2067. justify-content: center;
  2068. border: none;
  2069. margin-top: px2rpx(30);
  2070. transition: all 0.2s;
  2071. &:active {
  2072. transform: scale(0.98);
  2073. background-color: #cf1322;
  2074. }
  2075. }
  2076. .add-back {
  2077. display: flex;
  2078. justify-content: space-between;
  2079. align-items: center;
  2080. margin-bottom: px2rpx(12);
  2081. padding: px2rpx(12) px2rpx(16);
  2082. background: var(--color-zinc-100);
  2083. border-radius: px2rpx(8);
  2084. text {
  2085. font-size: px2rpx(14);
  2086. color: var(--color-navy-700);
  2087. font-weight: 500;
  2088. }
  2089. .add-btn {
  2090. color: var(--color-primary);
  2091. font-weight: 600;
  2092. text-decoration: underline;
  2093. &:active {
  2094. opacity: 0.7;
  2095. }
  2096. }
  2097. }
  2098. .wire-transfer-account {
  2099. background: var(--color-zinc-50);
  2100. padding: px2rpx(16);
  2101. border-radius: px2rpx(12);
  2102. margin: px2rpx(16) 0;
  2103. .row {
  2104. display: flex;
  2105. margin-bottom: px2rpx(12);
  2106. font-size: px2rpx(14);
  2107. &:last-child {
  2108. margin-bottom: 0;
  2109. }
  2110. .label {
  2111. width: px2rpx(120);
  2112. color: var(--color-zinc-500);
  2113. }
  2114. .content {
  2115. flex: 1;
  2116. color: var(--color-navy-900);
  2117. font-weight: 500;
  2118. }
  2119. .SpecialColor {
  2120. color: var(--color-error);
  2121. }
  2122. }
  2123. }
  2124. .activities {
  2125. margin: px2rpx(24) 0;
  2126. .checkbox {
  2127. display: flex;
  2128. align-items: flex-start;
  2129. gap: px2rpx(8);
  2130. margin-bottom: px2rpx(12);
  2131. :deep(uni-checkbox .uni-checkbox-input) {
  2132. border-radius: px2rpx(4);
  2133. width: px2rpx(18);
  2134. height: px2rpx(18);
  2135. }
  2136. text {
  2137. font-size: px2rpx(14);
  2138. color: var(--color-navy-700);
  2139. font-weight: 500;
  2140. line-height: 1.5;
  2141. }
  2142. }
  2143. .clause-text {
  2144. font-size: px2rpx(13);
  2145. color: var(--color-zinc-500);
  2146. line-height: 1.6;
  2147. padding-left: px2rpx(26);
  2148. .clause {
  2149. color: var(--color-primary);
  2150. text-decoration: underline;
  2151. }
  2152. }
  2153. }
  2154. .step3-attention {
  2155. // background: var(--color-error-50, #fff1f0);
  2156. border-radius: px2rpx(12);
  2157. margin-bottom: px2rpx(20);
  2158. .tips {
  2159. line-height: 1.8;
  2160. font-size: px2rpx(12);
  2161. color: #909399;
  2162. background-color: #f9f9f9;
  2163. padding: px2rpx(12);
  2164. border-radius: px2rpx(4);
  2165. border-left: px2rpx(2) solid #cf1322;
  2166. .title {
  2167. font-weight: 600;
  2168. margin-bottom: px2rpx(6);
  2169. color: #606266;
  2170. }
  2171. }
  2172. .attention {
  2173. font-size: px2rpx(14);
  2174. // color: var(--color-error-600, #cf1322);
  2175. line-height: 1.6;
  2176. }
  2177. .btn-bottom {
  2178. margin-top: px2rpx(20);
  2179. display: flex;
  2180. justify-content: center;
  2181. .btn {
  2182. background: var(--color-error-600, #cf1322);
  2183. color: #fff;
  2184. padding: px2rpx(10) px2rpx(48);
  2185. border-radius: px2rpx(24);
  2186. font-size: px2rpx(15);
  2187. font-weight: 700;
  2188. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  2189. transition: all 0.2s;
  2190. &:active {
  2191. transform: scale(0.96);
  2192. opacity: 0.8;
  2193. }
  2194. }
  2195. }
  2196. }
  2197. .upload-box {
  2198. display: flex;
  2199. align-items: center;
  2200. gap: px2rpx(12);
  2201. .btn-upload {
  2202. background: var(--color-zinc-100);
  2203. border: px2rpx(1) dashed var(--color-zinc-300);
  2204. border-radius: px2rpx(8);
  2205. height: px2rpx(44);
  2206. font-size: px2rpx(14);
  2207. color: var(--color-zinc-600);
  2208. display: flex;
  2209. align-items: center;
  2210. justify-content: center;
  2211. padding: 0 px2rpx(20);
  2212. }
  2213. .img-preview {
  2214. width: px2rpx(44);
  2215. height: px2rpx(44);
  2216. border-radius: px2rpx(4);
  2217. object-fit: cover;
  2218. }
  2219. }
  2220. .label-with-icon {
  2221. font-size: px2rpx(14);
  2222. color: #606266;
  2223. box-sizing: border-box;
  2224. display: flex;
  2225. align-items: center;
  2226. padding: 0 0 8px;
  2227. height: px2rpx(36);
  2228. line-height: 1.5715;
  2229. text-align: left;
  2230. /* #ifndef APP-NVUE */
  2231. white-space: initial;
  2232. /* #endif */
  2233. .help-icon {
  2234. margin-left: px2rpx(8);
  2235. width: px2rpx(16);
  2236. height: px2rpx(16);
  2237. background: var(--color-zinc-200);
  2238. border-radius: 50%;
  2239. display: flex;
  2240. align-items: center;
  2241. justify-content: center;
  2242. font-size: px2rpx(12);
  2243. color: var(--color-zinc-600);
  2244. cursor: pointer;
  2245. }
  2246. }
  2247. .tooltip-content {
  2248. :deep(.uni-tooltip-popup) {
  2249. background-color: #fff !important;
  2250. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !important;
  2251. width: px2rpx(300) !important;
  2252. color: var(--color-zinc-500);
  2253. line-height: 1.6;
  2254. }
  2255. }
  2256. .error {
  2257. color: var(--color-error);
  2258. font-size: px2rpx(12);
  2259. margin-top: px2rpx(4);
  2260. display: block;
  2261. }
  2262. :deep(.base-info-form) {
  2263. .uni-row1 {
  2264. .uni-col {
  2265. padding: 0 px2rpx(10) !important;
  2266. }
  2267. .uni-forms-item {
  2268. min-height: px2rpx(79);
  2269. margin-bottom: px2rpx(10);
  2270. position: relative;
  2271. }
  2272. .uni-easyinput__content-input {
  2273. height: px2rpx(35) !important;
  2274. }
  2275. }
  2276. }
  2277. .popup-content {
  2278. background: #fff;
  2279. border-radius: px2rpx(20);
  2280. padding: px2rpx(24);
  2281. width: px2rpx(320);
  2282. text-align: center;
  2283. .popup-title {
  2284. font-size: px2rpx(18);
  2285. font-weight: 700;
  2286. margin-bottom: px2rpx(20);
  2287. color: var(--color-navy-900);
  2288. display: block;
  2289. }
  2290. .popup-text {
  2291. font-size: px2rpx(14);
  2292. line-height: 1.6;
  2293. color: var(--color-zinc-600);
  2294. margin-bottom: px2rpx(20);
  2295. display: block;
  2296. }
  2297. .popup-form {
  2298. background: var(--color-zinc-50);
  2299. border-radius: px2rpx(12);
  2300. padding: px2rpx(16);
  2301. margin-bottom: px2rpx(24);
  2302. text-align: left;
  2303. .popup-row {
  2304. display: flex;
  2305. justify-content: space-between;
  2306. margin-bottom: px2rpx(12);
  2307. font-size: px2rpx(14);
  2308. &:last-child {
  2309. margin-bottom: 0;
  2310. }
  2311. .label {
  2312. color: var(--color-zinc-500);
  2313. font-weight: 500;
  2314. }
  2315. text:not(.label) {
  2316. color: var(--color-navy-900);
  2317. font-weight: 500;
  2318. }
  2319. .small-input {
  2320. width: px2rpx(60);
  2321. background: #fff;
  2322. border: px2rpx(1) solid var(--color-zinc-200);
  2323. border-radius: px2rpx(4);
  2324. padding: 0 px2rpx(4);
  2325. height: px2rpx(24);
  2326. font-size: px2rpx(12);
  2327. }
  2328. }
  2329. }
  2330. .popup-buttons {
  2331. display: flex;
  2332. gap: px2rpx(12);
  2333. button {
  2334. flex: 1;
  2335. height: px2rpx(44);
  2336. border-radius: px2rpx(10);
  2337. font-size: px2rpx(15);
  2338. font-weight: 600;
  2339. display: flex;
  2340. align-items: center;
  2341. justify-content: center;
  2342. border: none;
  2343. &[type="primary"] {
  2344. background-color: #cf1322;
  2345. color: #fff;
  2346. }
  2347. &:not([type="primary"]) {
  2348. background: var(--color-zinc-100);
  2349. color: var(--color-zinc-600);
  2350. }
  2351. }
  2352. }
  2353. .result-icon {
  2354. display: flex;
  2355. justify-content: center;
  2356. margin-bottom: px2rpx(16);
  2357. .iconfont {
  2358. font-size: px2rpx(48);
  2359. &.iconchenggong {
  2360. color: #52c41a;
  2361. }
  2362. &.iconjingshi {
  2363. color: #faad14;
  2364. }
  2365. &.icondengdai {
  2366. color: var(--color-primary);
  2367. animation: rotate 2s linear infinite;
  2368. }
  2369. }
  2370. }
  2371. }
  2372. @keyframes rotate {
  2373. from {
  2374. transform: rotate(0deg);
  2375. }
  2376. to {
  2377. transform: rotate(360deg);
  2378. }
  2379. }
  2380. .avatar-uploader {
  2381. border: 1px dashed;
  2382. width: px2rpx(200);
  2383. height: px2rpx(150);
  2384. display: flex;
  2385. flex-direction: column;
  2386. align-items: center;
  2387. justify-content: center;
  2388. /*float: left;*/
  2389. //overflow: hidden;
  2390. }
  2391. :deep(.files-button) {
  2392. .file-item {
  2393. .icon,
  2394. .avatar {
  2395. width: px2rpx(200);
  2396. height: px2rpx(150);
  2397. }
  2398. }
  2399. }
  2400. }
  2401. .amount-box {
  2402. display: flex;
  2403. align-items: center;
  2404. gap: px2rpx(12);
  2405. .amount-input {
  2406. flex: 1;
  2407. }
  2408. .btn {
  2409. display: flex;
  2410. align-items: center;
  2411. justify-content: center;
  2412. font-size: px2rpx(14);
  2413. color: var(--color-zinc-600);
  2414. margin-bottom: px2rpx(12);
  2415. height: px2rpx(35);
  2416. background-color: #cf1322;
  2417. color: #fff;
  2418. border-radius: px2rpx(4);
  2419. font-weight: 600;
  2420. display: flex;
  2421. align-items: center;
  2422. justify-content: center;
  2423. border: none;
  2424. padding: 0 px2rpx(20);
  2425. margin-top: px2rpx(21);
  2426. cursor: pointer;
  2427. }
  2428. }
  2429. .custom-deposit-container {
  2430. width: 100%;
  2431. display: flex;
  2432. gap: px2rpx(60);
  2433. justify-content: space-between;
  2434. }
  2435. @media (max-width: 992px) {
  2436. .custom-deposit {
  2437. width: 100%;
  2438. margin-top: px2rpx(20);
  2439. }
  2440. .custom-deposit-container {
  2441. display: flex;
  2442. gap: px2rpx(30);
  2443. flex-wrap: wrap;
  2444. }
  2445. }
  2446. </style>