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="right">
  178. <view class="help-icon">ⓘ</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="right">
  196. <view class="help-icon">ⓘ</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. <cwg-rich-text class="attention" :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
  347. </view>
  348. </view>
  349. </view>
  350. </view>
  351. <!-- 不参加活动弹出框 -->
  352. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  353. <!-- 新年24用户提示弹窗 -->
  354. <NewYear24Popup v-model:visible="tableDataNewYear24Flag" />
  355. <!-- 越南用户提示弹窗 -->
  356. <VietnamNoticePopup v-model:visible="dialogVietnamNotice" />
  357. <!-- 提交后确认弹窗 -->
  358. <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
  359. :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="params" :userName="userName"
  360. :login="loginValue" :loginDoc="loginValueDoc" @confirm="submit" />
  361. <!--提交后的弹出框-->
  362. <CheckPopup v-model:visible="dialogCheckSuccess" :goPayLink="goPayLink" @close="closeDia" />
  363. <!-- 提交后失败弹窗 -->
  364. <cwg-error-popup v-model:visible="dialogCheckError" :responseMessage="RES" />
  365. <!-- 最后失败弹窗 -->
  366. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  367. <!-- 最后成功弹窗 -->
  368. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  369. <!-- 等待弹窗 -->
  370. <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
  371. <!-- 赠金协议 -->
  372. <ClausePopup v-model:visible="dialogClause" country="CN" :isGuoQin="isGuoQin" />
  373. <!-- 赠金协议20 -->
  374. <Clause20Popup v-model:visible="dialogClause1" />
  375. <!-- 赠金协议10年中 -->
  376. <ClauseNZPopup v-model:visible="dialogClauseNZ" :title="t('news_add_field1.activitiesNZ.item6')"
  377. :startDate="tableData4.applicationStartTime" :endDate="tableData4.applicationEndTime" />
  378. <!-- 赠金协议20年中 -->
  379. <ClauseNZTwoPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  380. :startDate="tableData4Two.applicationStartTime" :endDate="tableData4Two.applicationEndTime" />
  381. <!-- 赠送活动详情-协议 -->
  382. <ClauseNewListPopup v-model:visible="dialogClauseNewList" :content="tableDataNewList.content"
  383. :title="tableDataNewList.title" />
  384. <!--提交后完成弹出框-->
  385. <ChinaUnionPayPopup v-model:visible="dialogChinaUnionPay" />
  386. <!-- 重新提交弹窗 -->
  387. <DealResultPopup v-model:visible="dialogDealResult" :responseMessage="responseMessage"
  388. :title="dialogDealResultTitle" :initialData="dialogDealResult_form" :type="DealResultType"
  389. @confirm="submitDealResult" />
  390. <!-- KYC成功弹窗 -->
  391. <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
  392. </cwg-page-wrapper>
  393. </template>
  394. <script setup>
  395. import { ref, reactive, computed, watch, onMounted, nextTick, onUnmounted } from 'vue'
  396. import { useI18n } from 'vue-i18n'
  397. const { t, locale } = useI18n()
  398. import useUserStore from '@/stores/use-user-store'
  399. import { customApi } from '@/service/custom'
  400. import { financialApi } from '@/service/financial'
  401. import { activityApi } from '@/service/activity'
  402. import Config from '@/config/index'
  403. const { Code, Host80, Host04 } = Config
  404. import { initLink } from '@/utils/setUrl'
  405. import isImageType from '@/global/isImageType'
  406. import PaymentMethodsList from './components/PaymentMethodsList.vue'
  407. import CwgKycPopup from './components/KycPopup.vue'
  408. import DealResultPopup from './components/DealResultPopup.vue'
  409. import ChinaUnionPayPopup from './components/ChinaUnionPayPopup.vue'
  410. import ClauseNewListPopup from './components/ClauseNewListPopup.vue'
  411. import ClauseNZTwoPopup from './components/ClauseNZTwoPopup.vue'
  412. import ClauseNZPopup from './components/ClauseNZPopup.vue'
  413. import Clause20Popup from './components/Clause20Popup.vue'
  414. import ClausePopup from './components/ClausePopup.vue'
  415. import CheckPopup from './components/CheckPopup.vue'
  416. import CwgCheckConfirmPopup from './components/DepositCheckConfirmPopup.vue'
  417. import VietnamNoticePopup from './components/VietnamNoticePopup.vue'
  418. import NewYear24Popup from './components/NewYear24Popup.vue'
  419. // 假设原有导入路径保持不变
  420. import tool from "@/global/tool"
  421. // import { createUploadRequest } from "@/lib/upload"
  422. // 常量
  423. const countries = [
  424. "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",
  425. ]
  426. // 用户信息
  427. const userStore = useUserStore()
  428. const userInfo = computed(() => userStore.userInfo)
  429. // 获取全局 Session 等,假设它们挂载在 uni 或 global 上
  430. const Session = {
  431. Get: (key, parse = false) => {
  432. const val = uni.getStorageSync(key)
  433. return parse ? JSON.parse(val) : val
  434. }
  435. }
  436. const handleFileUpdate = (val, type) => {
  437. if (type == '1') {
  438. params.requiteVoucherUrl = val
  439. }
  440. }
  441. const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
  442. function isPdf(url, image) {
  443. let res = !!url
  444. if (image) {
  445. return res && url.substr(-3, 3) == 'pdf' &&
  446. url.substr(-3, 3) == 'PDF'
  447. }
  448. return res && (url.substr(-3, 3) == 'pdf' ||
  449. url.substr(-3, 3) == 'PDF')
  450. }
  451. const $pigeon = {
  452. MessageError: (msg) => uni.showToast({ title: msg, icon: 'none' }),
  453. MessageOK: (msg) => uni.showToast({ title: msg, icon: 'success' }),
  454. MessageWarning: (msg) => uni.showToast({ title: msg, icon: 'none' }),
  455. MessageConfirm: (msg, title, confirmText, cancelText, onConfirm, onCancel, options = {}) => {
  456. uni.showModal({
  457. title,
  458. content: msg,
  459. confirmText,
  460. cancelText,
  461. success: (res) => {
  462. if (res.confirm) onConfirm && onConfirm()
  463. else if (res.cancel) onCancel && onCancel()
  464. }
  465. })
  466. }
  467. }
  468. const $route = { query: {} } // 需从外部注入
  469. // 响应式数据
  470. const loginValue = ref("")
  471. const loginValueDoc = ref("")
  472. const metaInfo = ref(null)
  473. const text1 = ref("")
  474. const dialogKyc = ref(false)
  475. const requiteVoucherUrl = ref("")
  476. const limitedStatus = ref(null)
  477. const limitedStatusCheck = ref(false)
  478. const pictLoadingImg = ref(false)
  479. const flag = ref(false)
  480. const RES = ref("")
  481. const imgUrl = ref(Host80)
  482. const Host05 = ref(Config.Host05)
  483. const loginOptions = ref([])
  484. const code = ref("")
  485. const selectCodes = ref("")
  486. const bankValid = ref("")
  487. const requestUrl = ref("")
  488. const isStep3 = ref(false)
  489. const step2 = ref(false)
  490. const step3 = ref(false)
  491. const value = ref("")
  492. const giveLoginJoin = ref("")
  493. const openType = ref("")
  494. const dialogInfoTradingAdd = ref(false)
  495. const ruleForm = reactive({
  496. bankInfo: [],
  497. bankWrit: [],
  498. bankCredit: []
  499. })
  500. const bankInfoList = ref([])
  501. const bank = ref("")
  502. const myId = ref(null)
  503. const bankPayType = ref("")
  504. const form = reactive({})
  505. const dialogDealResult = ref(false)
  506. const dialogDealResult_form = reactive({})
  507. const DealResultType = ref(null)
  508. const DealResultResult = ref("")
  509. const dialogDealResultTitle = ref("")
  510. const anshiClose = ref(true)
  511. const isChannel = ref(true)
  512. const pictLoading = ref(false)
  513. const tableData = reactive({
  514. International_Transfer: [],
  515. China_UnionPay: [],
  516. Digital_Currency: [],
  517. Electronic_Wallet: [],
  518. Ucard_Wallet: []
  519. })
  520. const tableData1 = reactive({
  521. International_Transfer: [],
  522. China_UnionPay: [],
  523. Digital_Currency: [],
  524. Electronic_Wallet: [],
  525. Ucard_Wallet: []
  526. })
  527. //通道table-选择前后
  528. const activeTab = ref(1)
  529. // 🔥 自动过滤掉空数据的 tab
  530. const tabsConfig = computed(() => {
  531. const allTabs = [
  532. { text: t('Custom.Deposit.Channel3'), value: 1, type: 'Digital_Currency' },
  533. { text: t('Custom.Deposit.Channel2'), value: 2, type: 'China_UnionPay' },
  534. { text: t('Custom.Deposit.Channel4'), value: 3, type: 'Electronic_Wallet' },
  535. { text: t('Custom.Deposit.Channel1'), value: 4, type: 'International_Transfer' },
  536. { text: t('card.title'), value: 5, type: 'Ucard_Wallet' },
  537. ]
  538. // ✅ 只保留有数据的 tab
  539. return allTabs.filter(tab => {
  540. console.log(tableData1[tab.type], tab.type);
  541. return tableData1[tab.type]?.length > 0
  542. })
  543. })
  544. // 当前选中的 tab 项
  545. const currentTab = computed(() => tabsConfig.value.find(t => t.value === activeTab.value))
  546. // 当前要渲染的表格数据
  547. const currentTableData = computed(() => {
  548. const type = currentTab.value?.type
  549. return type ? tableData[type] || [] : []
  550. })
  551. // ✅ 监听 tab 变化,自动选中第一个有数据的 tab
  552. watch(
  553. tabsConfig,
  554. (newTabs) => {
  555. if (newTabs.length > 0) {
  556. activeTab.value = newTabs[0].value // 选中第一个
  557. }
  558. },
  559. { immediate: true }
  560. )
  561. watch(
  562. currentTab,
  563. (newTabs) => {
  564. // showTable()
  565. },
  566. { immediate: true }
  567. )
  568. const bankDate = ref([])
  569. const channelData = reactive({})
  570. const WireTransferAccount = reactive({})
  571. const actionAdd1 = ref("")
  572. const actionAdd2 = ref(Host04 + "/activity/requite/voucher/upload")
  573. const imageUrl = ref("")
  574. const imageUrl1 = ref("")
  575. const introduce = reactive({
  576. introduce: "",
  577. enIntroduce: ""
  578. })
  579. const params = reactive({
  580. amount: "",
  581. amount1: "",
  582. promoCode: "",
  583. agree: false,
  584. agree2: false,
  585. agree3: false,
  586. agree4: false,
  587. agree5: false,
  588. agree6: false
  589. })
  590. const resetForm = () => {
  591. //表单重置后,需要手动重置一些状态
  592. params.amount = ""
  593. params.amount1 = ""
  594. params.promoCode = ""
  595. params.agree = false
  596. params.agree2 = false
  597. params.agree3 = false
  598. params.agree4 = false
  599. params.agree5 = false
  600. params.agree6 = false
  601. form.bankUname = undefined
  602. form.bankCardNum = undefined
  603. form.cvv = undefined
  604. form.expiryMonth = undefined
  605. form.expiryYear = undefined
  606. form.pin = undefined
  607. amountErrorMessage.value = ""
  608. }
  609. const formRef = ref(null)
  610. const mAmount = reactive({
  611. minAmount: "",
  612. maxAmount: ""
  613. })
  614. const dialogCheck = ref(false)
  615. const dialogVisible = ref(false)
  616. const dialogCheckWait = ref(false)
  617. const dialogCheckOK = ref(false)
  618. const goPayLink = ref("")
  619. const dialogCheckConfirm = ref(false)
  620. const dialogCheckConfirm_form = reactive({
  621. confirmName: "",
  622. confirmAreaCode: "",
  623. confirmPhone: ""
  624. })
  625. const dialogClause = ref(false)
  626. const dialogClause1 = ref(false)
  627. const dialogClauseNZ = ref(false)
  628. const dialogClauseNZTwo = ref(false)
  629. const dialogClauseNewList = ref(false)
  630. const ACCType = ref(null)
  631. const CheckExistSuccess = ref(false)
  632. const dialogChinaUnionPay = ref(false)
  633. const tableData4Flag = ref(false)
  634. const tableData4 = reactive({})
  635. const tableData4TwoFlag = ref(false)
  636. const tableData4Two = reactive({})
  637. const tableDataNewListFlag = ref(false)
  638. const tableDataNewList = reactive({})
  639. const dialogDontActive = ref(false)
  640. const dialogVietnamNotice = ref(false)
  641. const tableDataNewYear24Flag = ref(false)
  642. const tableDataNewYear24 = ref(false)
  643. const rules = computed(() => ({
  644. amount: {
  645. rules: [
  646. {
  647. required: true,
  648. errorMessage: t('vaildate.amount.format1'),
  649. },
  650. {
  651. validateFunction: (rule, value, data, callback) => {
  652. // 空值处理:直接报格式错误
  653. if (!value) {
  654. callback(t('vaildate.amount.format1'))
  655. return false
  656. }
  657. // 范围校验
  658. if (
  659. mAmount.minAmount &&
  660. mAmount.maxAmount &&
  661. (Number(mAmount.minAmount) > Number(value) ||
  662. Number(mAmount.maxAmount) < Number(value))
  663. ) {
  664. callback(
  665. t('vaildate.amount.amount') +
  666. mAmount.minAmount +
  667. ' - ' +
  668. mAmount.maxAmount
  669. )
  670. return false
  671. }
  672. // 正整数校验(原正则)
  673. if (!/^[1-9]\d*$/.test(value)) {
  674. callback(t('vaildate.amount.format1'))
  675. return false
  676. }
  677. return true
  678. },
  679. trigger: 'change',
  680. },
  681. ],
  682. },
  683. agree: {
  684. rules: [
  685. {
  686. required: true,
  687. errorMessage: t('vaildate.agree.empty'),
  688. trigger: 'change',
  689. },
  690. ],
  691. },
  692. confirmAreaCode: {
  693. rules: [
  694. {
  695. required: true,
  696. errorMessage: t('vaildate.input.empty'),
  697. trigger: 'blur',
  698. },
  699. ],
  700. },
  701. confirmPhone: {
  702. rules: [
  703. {
  704. required: true,
  705. errorMessage: t('vaildate.input.empty'),
  706. trigger: 'blur',
  707. },
  708. ],
  709. },
  710. myId: {
  711. rules: [
  712. {
  713. required: true,
  714. errorMessage: t('vaildate.select.empty'),
  715. trigger: 'change',
  716. },
  717. ],
  718. },
  719. pin: {
  720. rules: [
  721. {
  722. required: true,
  723. errorMessage: t('PersonalManagement.Label.item1'),
  724. trigger: 'blur',
  725. },
  726. ],
  727. },
  728. phone: {
  729. rules: [
  730. {
  731. required: true,
  732. errorMessage: t('vaildate.input.empty'),
  733. trigger: 'blur',
  734. },
  735. ],
  736. },
  737. otp: {
  738. rules: [
  739. {
  740. required: true,
  741. errorMessage: t('vaildate.input.empty'),
  742. trigger: 'blur',
  743. },
  744. ],
  745. },
  746. state: {
  747. rules: [
  748. {
  749. required: true,
  750. errorMessage: t('vaildate.input.empty'),
  751. trigger: 'blur',
  752. },
  753. ],
  754. },
  755. city: {
  756. rules: [
  757. {
  758. required: true,
  759. errorMessage: t('vaildate.input.empty'),
  760. trigger: 'blur',
  761. },
  762. ],
  763. },
  764. country: {
  765. rules: [
  766. {
  767. required: true,
  768. errorMessage: t('vaildate.select.empty'),
  769. trigger: 'change',
  770. },
  771. ],
  772. },
  773. address: {
  774. rules: [
  775. {
  776. required: true,
  777. errorMessage: t('vaildate.input.empty'),
  778. trigger: 'blur',
  779. },
  780. ],
  781. },
  782. zipCode: {
  783. rules: [
  784. {
  785. required: true,
  786. errorMessage: t('vaildate.input.empty'),
  787. trigger: 'blur',
  788. },
  789. ],
  790. },
  791. }))
  792. const amountErrorMessage = ref('')
  793. const validateAmount = (value) => {
  794. const amount = params.amount
  795. if (!amount && amount !== 0) {
  796. amountErrorMessage.value = t('vaildate.amount.format1')
  797. return false
  798. }
  799. if (mAmount.minAmount && mAmount.maxAmount) {
  800. const min = Number(mAmount.minAmount);
  801. const max = Number(mAmount.maxAmount);
  802. const numValue = Number(amount);
  803. if (numValue < min || numValue > max) {
  804. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  805. return false
  806. }
  807. }
  808. if (!/^[1-9]\d*$/.test(amount)) {
  809. amountErrorMessage.value = t('vaildate.amount.format1')
  810. return false
  811. }
  812. amountErrorMessage.value = ''
  813. return true
  814. }
  815. const NewYear24Data = reactive({
  816. balance: 0,
  817. income: 0,
  818. rate: 0,
  819. index: 0
  820. })
  821. const AccessToken = computed(() => ({
  822. "Access-Token": Session.Get("access_token")
  823. }))
  824. const lang = computed(() => {
  825. return locale.value == "en" && document.body.clientWidth < 1200
  826. })
  827. const langCN = computed(() => locale.value)
  828. const isSupportedCountry = computed(() => {
  829. try {
  830. const country = userInfo.value.customInfo.country
  831. return countries.includes(country)
  832. } catch {
  833. return false
  834. }
  835. })
  836. const country = computed(() => {
  837. return userInfo.value.customInfo.country
  838. })
  839. const userName = computed(() => {
  840. let first = userInfo.value.customInfo.firstName
  841. let last = userInfo.value.customInfo.lastName
  842. let middle = userInfo.value.customInfo.middle
  843. if (!first && !last && !middle) return false
  844. return (first ? first + " " : "") + (middle ? middle + " " : "") + (last ? last : "")
  845. })
  846. const areaCode = computed(() => userInfo.value.customInfo.areaCode)
  847. const phone = computed(() => userInfo.value.customInfo.phone)
  848. // 是否是国庆节
  849. const isGuoQin = computed(() => {
  850. let flag = false
  851. let startTime1 = "2024/10/01 00:00:00"
  852. let endTime1 = "2024/10/07 23:59:59"
  853. let timezone = 8
  854. let offset_GMT = new Date().getTimezoneOffset()
  855. let nowDate = new Date().getTime()
  856. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  857. let end = new Date(endTime1).getTime()
  858. let start = new Date(startTime1).getTime()
  859. if (now > start && now < end) flag = true
  860. return flag
  861. })
  862. const groupTitleMap = {
  863. 1: 'Custom.Deposit.Channel1',
  864. 2: 'Custom.Deposit.Channel2',
  865. 3: 'Custom.Deposit.Channel3',
  866. 4: 'Custom.Deposit.Channel4',
  867. 5: 'card.title'
  868. }
  869. // 排序表格数据
  870. const sortedTableData = computed(() => {
  871. const order = [
  872. tableData.Digital_Currency,
  873. tableData.China_UnionPay,
  874. tableData.Electronic_Wallet,
  875. tableData.International_Transfer,
  876. tableData.Ucard_Wallet
  877. ]
  878. return order.filter(item => item && item.length > 0)
  879. })
  880. // 方法
  881. const isAfterJuly21 = () => {
  882. const currentDate = new Date()
  883. const july21 = new Date(currentDate.getFullYear(), 6, 21)
  884. return currentDate >= july21
  885. }
  886. // 货币
  887. const groupCurrency = (type) => {
  888. if (type == "GBP") return ": £"
  889. else if (type == "USD") return ": $"
  890. else if (type == "EUR") return ": €"
  891. else if (type == "USC") return ": ¢"
  892. else return ": $"
  893. }
  894. // 货币符号
  895. const groupCurrency1 = (type) => {
  896. if (type == "GBP") return "£"
  897. else if (type == "USD") return "$"
  898. else if (type == "EUR") return "€"
  899. else if (type == "USC") return "¢"
  900. else return "$"
  901. }
  902. // 选择银行
  903. const selectCode = (codeVal) => {
  904. bankDate.value.forEach(item => {
  905. if (item.code == codeVal) {
  906. selectCodes.value = lang.value == "cn" ? item.name : item.enName
  907. mAmount.minAmount = item.minAmount || mAmount.minAmount
  908. mAmount.maxAmount = item.maxAmount || mAmount.maxAmount
  909. channelData.rate = item.rate || channelData.rate
  910. channelData.transformCurrency = item.currency || channelData.transformCurrency
  911. }
  912. })
  913. }
  914. // 账户类型
  915. const groupTypeName = (type) => {
  916. if (type == "1") return t("AccountType.ClassicAccount")
  917. else if (type == "2") return t("AccountType.SeniorAccount")
  918. else if (type == "5") return t("AccountType.SpeedAccount")
  919. else if (type == "6") return t("AccountType.SpeedAccount")
  920. else if (type == "7") return t("AccountType.StandardAccount")
  921. else if (type == "8") return t("AccountType.CentAccount")
  922. }
  923. const selectChange = () => {
  924. // 强制更新,在 Vue 3 中通常不需要
  925. }
  926. const handleProgress1 = () => {
  927. pictLoadingImg.value = true
  928. }
  929. const handleAvatarError1 = (err) => {
  930. let errorMessage = t("Msg.Fail")
  931. if (err && err.status) {
  932. switch (err.status) {
  933. case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
  934. case 401: errorMessage = t("Msg.UploadUnauthorized"); break
  935. case 403: errorMessage = t("Msg.UploadForbidden"); break
  936. case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
  937. case 500: errorMessage = t("Msg.UploadServerError"); break
  938. case 502:
  939. case 503:
  940. case 504: errorMessage = t("Msg.UploadNetworkError"); break
  941. default:
  942. if (err.message) errorMessage = err.message
  943. else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
  944. }
  945. } else if (err && err.message) {
  946. if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
  947. else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
  948. else errorMessage = err.message
  949. }
  950. $pigeon.MessageError(errorMessage)
  951. pictLoadingImg.value = false
  952. }
  953. const handleAvatarSuccess1 = (res) => {
  954. if (res.code == Code.StatusOK) {
  955. $pigeon.MessageOK(res.msg)
  956. imageUrl1.value = res.data
  957. requiteVoucherUrl.value = res.data
  958. } else {
  959. uni.showToast({ title: res.msg, icon: 'none' })
  960. }
  961. pictLoadingImg.value = false
  962. }
  963. // 上传凭证前校验
  964. const beforeAvatarUpload1 = (file) => {
  965. const isJPG = isImageType.checkFile(file.type)
  966. const isLt2M = isImageType.checkSize(file.size)
  967. if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
  968. if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
  969. return isJPG && isLt2M
  970. }
  971. // 上传凭证进度
  972. const handleProgress = () => {
  973. pictLoadingImg.value = true
  974. }
  975. // 上传凭证失败
  976. const handleAvatarError = (err) => {
  977. let errorMessage = t("Msg.Fail")
  978. if (err && err.status) {
  979. switch (err.status) {
  980. case 400: errorMessage = t("Msg.UploadInvalidFormat"); break
  981. case 401: errorMessage = t("Msg.UploadUnauthorized"); break
  982. case 403: errorMessage = t("Msg.UploadForbidden"); break
  983. case 413: errorMessage = t("Msg.UploadFileTooLarge"); break
  984. case 500: errorMessage = t("Msg.UploadServerError"); break
  985. case 502:
  986. case 503:
  987. case 504: errorMessage = t("Msg.UploadNetworkError"); break
  988. default:
  989. if (err.message) errorMessage = err.message
  990. else if (err.response && err.response.data && err.response.data.msg) errorMessage = err.response.data.msg
  991. }
  992. } else if (err && err.message) {
  993. if (err.message.includes("Network Error") || err.message.includes("timeout")) errorMessage = t("Msg.UploadNetworkError")
  994. else if (err.message.includes("File too large")) errorMessage = t("Msg.UploadFileTooLarge")
  995. else errorMessage = err.message
  996. }
  997. $pigeon.MessageError(errorMessage)
  998. pictLoadingImg.value = false
  999. }
  1000. // 上传凭证
  1001. const handleUploadDeposit = (options) => {
  1002. const originalUrl = actionAdd1.value || Config.Host80 + "/common/upload"
  1003. return createUploadRequest(originalUrl, AccessToken.value, 1)(options)
  1004. }
  1005. // 上传凭证成功
  1006. const handleAvatarSuccess = (res) => {
  1007. if (res.code == Code.StatusOK) {
  1008. $pigeon.MessageOK(res.msg)
  1009. imageUrl.value = res.data
  1010. requiteVoucherUrl.value = res.data
  1011. } else {
  1012. uni.showToast({ title: res.msg, icon: 'none' })
  1013. }
  1014. pictLoadingImg.value = false
  1015. }
  1016. // 上传凭证前校验
  1017. const beforeAvatarUpload = (file) => {
  1018. const isJPG = isImageType.checkFile(file.type)
  1019. const isLt2M = isImageType.checkSize(file.size)
  1020. if (!isJPG) $pigeon.MessageError(t("Msg.JPG"))
  1021. if (!isLt2M) $pigeon.MessageError(t("Msg.3IMG"))
  1022. return isJPG && isLt2M
  1023. }
  1024. // 打开添加银行弹窗
  1025. const openAddBankCard = () => {
  1026. if (ruleForm.bankCredit.length == 2) {
  1027. $pigeon.MessageConfirm(
  1028. t("Msg.WireTransfers"),
  1029. t("Msg.SystemPrompt"),
  1030. t("Btn.Confirm"),
  1031. t("Btn.Cancel"),
  1032. async () => { },
  1033. () => { }
  1034. )
  1035. } else {
  1036. openType.value = "add_CreditCard"
  1037. dialogInfoTradingAdd.value = true
  1038. }
  1039. }
  1040. const closeDiaAdd = () => {
  1041. dialogInfoTradingAdd.value = false
  1042. }
  1043. // 关闭添加银行弹窗
  1044. const closeAdd = (val) => {
  1045. dialogInfoTradingAdd.value = val
  1046. }
  1047. // 确认重新加载银行信息
  1048. const confirmToReload = () => {
  1049. dialogInfoTradingAdd.value = false
  1050. getBankInfo()
  1051. }
  1052. // 获取银行信息
  1053. const getBankInfo = async () => {
  1054. let res = await financialApi.customBankList({})
  1055. if (res.code == Code.StatusOK) {
  1056. ruleForm.bankCredit = []
  1057. res.data.forEach(item => {
  1058. if (item.type == 3) {
  1059. item.customBankCode = item.bankCode
  1060. item.bankCode = null
  1061. ruleForm.bankCredit.push(item)
  1062. }
  1063. if (item.defaultBank && item.type == 3) {
  1064. myId.value = item.id
  1065. form.bankUname = item.bankUname
  1066. form.bankCardNum = item.bankCardNum
  1067. form.cvv = item.cvv
  1068. form.expiryMonth = item.expiryMonth
  1069. form.expiryYear = item.expiryYear
  1070. form.pin = item.pin
  1071. }
  1072. })
  1073. } else {
  1074. uni.showToast({ title: res.msg, icon: 'none' })
  1075. }
  1076. }
  1077. // 选择银行
  1078. const chooseBank = (item) => {
  1079. if (formRef.value) formRef.value.clearValidate()
  1080. form.bankUname = item.bankUname
  1081. form.bankCardNum = item.bankCardNum
  1082. form.cvv = item.cvv
  1083. form.expiryMonth = item.expiryMonth
  1084. form.expiryYear = item.expiryYear
  1085. form.pin = item.pin
  1086. }
  1087. // 返回首页
  1088. const toHome = () => {
  1089. uni.switchTab({ url: "/pages/customer/index" })
  1090. }
  1091. // 提交确认信息弹窗
  1092. const submitConfirm = async () => {
  1093. console.log(params.requiteVoucherUrl, 1212);
  1094. if (channelData.confirmCreditCard == 1 && !myId.value) {
  1095. $pigeon.MessageWarning(t("PersonalManagement.Label.selectCreditCard"))
  1096. return
  1097. }
  1098. if (channelData.bankValid == 1 && !code.value) {
  1099. $pigeon.MessageWarning(t("vaildate.depositCurrency.empty"))
  1100. return
  1101. }
  1102. if ((channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") && !imageUrl.value) {
  1103. $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
  1104. return
  1105. }
  1106. if (params.promoCode && params.agree2) {
  1107. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1108. return
  1109. }
  1110. if (params.promoCode && params.agree3) {
  1111. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1112. return
  1113. }
  1114. if (params.promoCode && params.agree4) {
  1115. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1116. return
  1117. }
  1118. if (params.promoCode && params.agree5) {
  1119. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1120. return
  1121. }
  1122. if (params.promoCode && params.agree6) {
  1123. $pigeon.MessageWarning(t("news_add_field.Des.item2"))
  1124. return
  1125. }
  1126. if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 && !imageUrl.value) {
  1127. $pigeon.MessageWarning(t("vaildate.depositVoucher.empty"))
  1128. return
  1129. }
  1130. try {
  1131. if (formRef.value) {
  1132. await formRef.value.validate()
  1133. openDontActive()
  1134. }
  1135. } catch (error) {
  1136. if (error instanceof Array) {
  1137. uni.showToast({ title: error[0].errorMessage, icon: 'none' });
  1138. return
  1139. } else {
  1140. responseMessage.value = error.msg;
  1141. }
  1142. }
  1143. }
  1144. // 打开不参加活动弹窗
  1145. const openDontActive = () => {
  1146. 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) {
  1147. tosubmitConfirm()
  1148. return
  1149. }
  1150. if (tableData4Flag.value && params.agree4) {
  1151. tosubmitConfirm()
  1152. return
  1153. }
  1154. if (tableData4TwoFlag.value && params.agree5) {
  1155. tosubmitConfirm()
  1156. return
  1157. }
  1158. if (tableDataNewListFlag.value && params.agree6) {
  1159. tosubmitConfirm()
  1160. return
  1161. }
  1162. if (limitedStatus.value && limitedStatusCheck.value) {
  1163. tosubmitConfirm()
  1164. return
  1165. }
  1166. if ((ACCType.value == 1 || ACCType.value == 2 || ACCType.value == 5 || ACCType.value == 6 || ACCType.value == 7) && anshiClose.value && params.agree3) {
  1167. tosubmitConfirm()
  1168. return
  1169. }
  1170. tosubmitConfirm()
  1171. }
  1172. // 打开提交前信息弹窗
  1173. const tosubmitConfirm = () => {
  1174. dialogDontActive.value = false
  1175. dialogCheckConfirm_form.confirmAreaCode = areaCode.value
  1176. dialogCheckConfirm_form.confirmPhone = phone.value
  1177. dialogCheckConfirm.value = true
  1178. }
  1179. // 最后确认
  1180. const dialogSuccess = computed(() => dialogCheckOK.value && dialogVisible.value)
  1181. // 最后失败
  1182. const dialogError = computed(() => dialogCheckOK.value && !dialogVisible.value)
  1183. // 提交后确认
  1184. const dialogCheckSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  1185. // 提交后失败
  1186. const dialogCheckError = computed(() => dialogCheck.value && !dialogVisible.value)
  1187. // 提交申请
  1188. const submit = async () => {
  1189. if (flag.value) return
  1190. flag.value = true
  1191. dialogCheckConfirm.value = false
  1192. dialogCheckWait.value = true
  1193. try {
  1194. if (channelData.code == "UNION_PAY_TELEGRAPHIC" || channelData.code == "UNION_PAY_TELEGRAPHIC_SPECIAL" || channelData.code == "UNION_PAY_TELEGRAPHIC_TWO") {
  1195. let res = await financialApi.telegraphicPay({
  1196. requiteVoucherUrl: imageUrl1.value,
  1197. amount: params.amount,
  1198. login: $route.query.login,
  1199. voucherUrl: imageUrl.value,
  1200. activityDeposit: params.agree2 ? 1 : 0,
  1201. activityPercentageGive: params.agree3 ? 1 : 0,
  1202. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1203. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1204. activityGive: params.agree6 ? 1 : 0,
  1205. promoCode: params.promoCode,
  1206. code: channelData.code,
  1207. bankMsg: WireTransferAccount.bankMsg || "",
  1208. name: channelData.confirmName ? userName.value : null,
  1209. areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
  1210. phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
  1211. ip: uni.getStorageSync("CLIENT")
  1212. })
  1213. dialogCheckWait.value = false
  1214. if (res.code == Code.StatusOK) {
  1215. imageUrl1.value = ""
  1216. limitedStatusCheck.value = false
  1217. dialogCheckOK.value = true
  1218. dialogVisible.value = true
  1219. flag.value = false
  1220. } else {
  1221. RES.value = res.msg
  1222. dialogCheckOK.value = true
  1223. dialogVisible.value = false
  1224. flag.value = false
  1225. }
  1226. } else if (channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0) {
  1227. let res = await financialApi.digitalPay({
  1228. requiteVoucherUrl: imageUrl1.value,
  1229. amount: params.amount,
  1230. login: $route.query.login,
  1231. voucherUrl: imageUrl.value,
  1232. activityDeposit: params.agree2 ? 1 : 0,
  1233. activityPercentageGive: params.agree3 ? 1 : 0,
  1234. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1235. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1236. activityGive: params.agree6 ? 1 : 0,
  1237. promoCode: params.promoCode,
  1238. ip: uni.getStorageSync("CLIENT")
  1239. })
  1240. dialogCheckWait.value = false
  1241. if (res.code == Code.StatusOK) {
  1242. dialogCheckOK.value = true
  1243. dialogVisible.value = true
  1244. flag.value = false
  1245. } else {
  1246. RES.value = res.msg
  1247. dialogCheckOK.value = true
  1248. dialogVisible.value = false
  1249. flag.value = false
  1250. }
  1251. } else {
  1252. let par = ""
  1253. if (channelData.bankValid == 1) {
  1254. par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${code.value}/${(params.agree2 ? 1 : 0)}`
  1255. } else {
  1256. par = `${channelData.requestUrl}/${loginValue.value}/${params.amount}/${(params.agree2 ? 1 : 0)}`
  1257. }
  1258. let res = await financialApi.PayBankCode(par, {
  1259. requiteVoucherUrl: imageUrl1.value,
  1260. promoCode: params.promoCode,
  1261. name: channelData.confirmName ? userName.value : null,
  1262. areaCode: channelData.confirmAreaCode ? dialogCheckConfirm_form.confirmAreaCode : null,
  1263. phone: channelData.confirmPhone ? dialogCheckConfirm_form.confirmPhone : null,
  1264. activityPercentageGive: params.agree3 ? 1 : 0,
  1265. activityMidyearTenPercentGive: params.agree4 ? 1 : 0,
  1266. activityTwoPercentGive: params.agree5 ? 1 : 0,
  1267. activityGive: params.agree6 ? 1 : 0,
  1268. ip: uni.getStorageSync("CLIENT"),
  1269. ...form
  1270. })
  1271. dialogCheckWait.value = false
  1272. if (res.code == Code.StatusOK) {
  1273. if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
  1274. dealResult(res.data)
  1275. } else {
  1276. if (res.data.type == 1) {
  1277. goPayLink.value = res.data.result
  1278. window.open(res.data.result)
  1279. } else if (res.data.type == 2) {
  1280. let token = AccessToken.value["Access-Token"]
  1281. token = tool.tokenReplace(token)
  1282. goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
  1283. window.open(goPayLink.value)
  1284. } else if (res.data.type == 5) {
  1285. $pigeon.MessageConfirm(
  1286. t("PersonalManagement.Label.item2"),
  1287. t("Msg.SystemPrompt"),
  1288. t("Btn.Cancel"),
  1289. t("Btn.Confirm"),
  1290. async () => { },
  1291. () => {
  1292. goPayLink.value = res.data.result
  1293. dialogCheck.value = true
  1294. dialogVisible.value = true
  1295. window.open(res.data.result)
  1296. }
  1297. )
  1298. } else if (res.data.type == 8) {
  1299. goPayLink.value = Host04 + res.data.result
  1300. window.open(goPayLink.value)
  1301. } else if (res.data.type == 9) {
  1302. goPayLink.value = setCardUrl(res.data.result)
  1303. window.open(goPayLink.value)
  1304. } else if (res.data.type == 10) {
  1305. goPayLink.value = Host80 + '/pay/onchainpay.html?params=' + res.data.result
  1306. window.open(goPayLink.value)
  1307. }
  1308. if (res.data.type != 5) {
  1309. dialogCheck.value = true
  1310. dialogVisible.value = true
  1311. }
  1312. }
  1313. flag.value = false
  1314. } else {
  1315. RES.value = res.msg
  1316. dialogCheck.value = true
  1317. dialogVisible.value = false
  1318. flag.value = false
  1319. }
  1320. }
  1321. } catch (error) {
  1322. dialogCheckWait.value = false
  1323. flag.value = false
  1324. dialogCheckOK.value = true
  1325. dialogVisible.value = false
  1326. RES.value = error.msg
  1327. }
  1328. }
  1329. const setCardUrl = (serial) => {
  1330. let params = `${AccessToken.value["Access-Token"]}/${locale.value}/${serial}/1/pay`
  1331. return initLink({ link: imgUrl.value + '/pay/paycard.html', params })
  1332. }
  1333. //处理申请返回result
  1334. const dealResult = (data) => {
  1335. DealResultType.value = data.type
  1336. DealResultResult.value = data.result
  1337. if (data.type == 3) {
  1338. dialogDealResult_form.pin = ""
  1339. } else if (data.type == 4) {
  1340. dialogDealResult_form.otp = ""
  1341. } else if (data.type == 6) {
  1342. dialogDealResult_form.state = userInfo.value.state
  1343. dialogDealResult_form.city = userInfo.value.city
  1344. dialogDealResult_form.country = (["cn", "zhHant"].indexOf(locale.value) != -1) ? userInfo.value.countryName : userInfo.value.countryEnName
  1345. dialogDealResult_form.address = (userInfo.value.addressLines && userInfo.value.addressLines[0]) || ""
  1346. dialogDealResult_form.zipCode = userInfo.value.zipCode
  1347. dialogDealResultTitle.value = t("PersonalManagement.Label.item3")
  1348. } else if (data.type == 7) {
  1349. dialogDealResult_form.phone = userInfo.value.phone
  1350. dialogDealResultTitle.value = t("PersonalManagement.Label.item4")
  1351. }
  1352. dialogDealResult.value = true
  1353. }
  1354. //重新提交
  1355. const submitDealResult = async () => {
  1356. if (flag.value) return
  1357. flag.value = true
  1358. dialogCheckConfirm.value = false
  1359. dialogCheckWait.value = true
  1360. let par = Host04 + DealResultResult.value
  1361. let dataList = {}
  1362. if (DealResultType.value == 3) dataList = { pin: dialogDealResult_form.pin }
  1363. else if (DealResultType.value == 4) dataList = { otp: dialogDealResult_form.otp }
  1364. else if (DealResultType.value == 6) {
  1365. dataList = {
  1366. state: dialogDealResult_form.state,
  1367. city: dialogDealResult_form.city,
  1368. country: dialogDealResult_form.country,
  1369. address: dialogDealResult_form.address,
  1370. zipCode: dialogDealResult_form.zipCode
  1371. }
  1372. } else if (DealResultType.value == 7) dataList = { phone: dialogDealResult_form.phone }
  1373. let res = await financialApi.PayDealResult(par, dataList)
  1374. dialogCheckWait.value = false
  1375. dialogDealResult.value = false
  1376. if (res.code == Code.StatusOK) {
  1377. if (res.data && (res.data.type == 3 || res.data.type == 4 || res.data.type == 6 || res.data.type == 7)) {
  1378. dealResult(res.data)
  1379. } else {
  1380. if (res.data.type == 1) {
  1381. goPayLink.value = res.data.result
  1382. window.open(res.data.result)
  1383. } else if (res.data.type == 2) {
  1384. let token = AccessToken.value["Access-Token"]
  1385. token = tool.tokenReplace(token)
  1386. goPayLink.value = `${Host04}/finance/deposit/get?serial=${res.data.result}&Access-Token=${token}`
  1387. window.open(goPayLink.value)
  1388. } else if (res.data.type == 5) {
  1389. $pigeon.MessageConfirm(
  1390. t("PersonalManagement.Label.item2"),
  1391. t("Msg.SystemPrompt"),
  1392. t("Btn.Cancel"),
  1393. t("Btn.Confirm"),
  1394. async () => { },
  1395. () => {
  1396. goPayLink.value = res.data.result
  1397. dialogCheck.value = true
  1398. dialogVisible.value = true
  1399. window.open(res.data.result)
  1400. }
  1401. )
  1402. } else if (res.data.type == 8) {
  1403. goPayLink.value = Host04 + res.data.result
  1404. window.open(goPayLink.value)
  1405. } else if (res.data.type == 9) {
  1406. dialogCheckOK.value = true
  1407. dialogVisible.value = true
  1408. flag.value = false
  1409. return
  1410. }
  1411. if (res.data.type != 5) {
  1412. dialogCheck.value = true
  1413. dialogVisible.value = true
  1414. }
  1415. }
  1416. flag.value = false
  1417. } else {
  1418. RES.value = res.msg
  1419. dialogCheck.value = true
  1420. dialogVisible.value = false
  1421. flag.value = false
  1422. dialogDealResult.value = false
  1423. }
  1424. }
  1425. const closeDia = () => {
  1426. dialogCheck.value = false
  1427. dialogVisible.value = false
  1428. dialogCheckOK.value = false
  1429. showTable()
  1430. }
  1431. const isStep3Open = () => {
  1432. isStep3.value = true
  1433. //中国网银弹窗
  1434. if (tableData.China_UnionPay.length && tableData.China_UnionPay[0].type == 2) {
  1435. let timezone = 8
  1436. let offset_GMT = new Date().getTimezoneOffset()
  1437. let nowDate = new Date().getTime()
  1438. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1439. let newTime = now.getHours().toString()
  1440. if ((newTime.length == 1 && newTime >= 0 && newTime < 8) || (newTime.length == 2 && newTime >= 22 && newTime < 24)) {
  1441. dialogChinaUnionPay.value = true
  1442. }
  1443. }
  1444. }
  1445. // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
  1446. const isAfterSeptember30 = () => {
  1447. // const currentDate = new Date();
  1448. // const september30 = new Date(
  1449. // currentDate.getFullYear(),
  1450. // 8,
  1451. // 30,
  1452. // 23,
  1453. // 59,
  1454. // 59
  1455. // ); // 月份从0开始,8表示9月,设置为23:59:59
  1456. // return currentDate > september30;
  1457. return true
  1458. }
  1459. const getMetaInfo = () => {
  1460. metaInfo.value = window.getMetaInfo()
  1461. metaInfo.value = { ...metaInfo.value, deviceType: "h5" }
  1462. }
  1463. //获取kyc二维码
  1464. const qrCode = async (depositChannelCode, row) => {
  1465. getMetaInfo()
  1466. let res = await activityApi.getWebsdkLink({
  1467. depositChannelCode,
  1468. metaInfo: metaInfo.value
  1469. })
  1470. if (res.code == Code.StatusOK) {
  1471. if (res.data) {
  1472. text1.value = JSON.parse(res.data).url
  1473. dialogKyc.value = true
  1474. flag.value = false
  1475. } else {
  1476. doShowStep3(row)
  1477. }
  1478. } else {
  1479. flag.value = false
  1480. uni.showToast({ title: res.msg, icon: 'none' })
  1481. }
  1482. }
  1483. const doShowStep3 = (row) => {
  1484. if (row.confirmCreditCard == 1) getBankInfo()
  1485. getCheckExistSuccess()
  1486. if (row.bankValid && isChannel.value) {
  1487. getBankList(row)
  1488. isChannel.value = false
  1489. step3.value = true
  1490. Object.assign(channelData, row)
  1491. mAmount.minAmount = row.minAmount
  1492. mAmount.maxAmount = row.maxAmount
  1493. } else {
  1494. step3.value = true
  1495. bankDate.value = []
  1496. Object.assign(channelData, row)
  1497. mAmount.minAmount = row.minAmount
  1498. mAmount.maxAmount = row.maxAmount
  1499. }
  1500. tableData.International_Transfer = []
  1501. tableData.China_UnionPay = []
  1502. tableData.Digital_Currency = []
  1503. tableData.Electronic_Wallet = []
  1504. tableData.Ucard_Wallet = []
  1505. if (row.type == 1) tableData.International_Transfer[0] = row
  1506. if (row.type == 2) tableData.China_UnionPay[0] = row
  1507. if (row.type == 3) tableData.Digital_Currency[0] = row
  1508. if (row.type == 4) tableData.Electronic_Wallet[0] = row
  1509. if (row.type == 5) tableData.Ucard_Wallet[0] = row
  1510. introduce.introduce = row.introduce
  1511. introduce.enIntroduce = row.enIntroduce
  1512. 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)) {
  1513. let pro = []
  1514. if (row.property && row.property.substring(0, 1) == "[") {
  1515. pro = JSON.parse(row.property)
  1516. } else if (row.property && row.property.substring(0, 1) != "[") {
  1517. let proper = "[" + row.property + "]"
  1518. pro = JSON.parse(proper)
  1519. }
  1520. let ind = pro.length
  1521. if (ind) {
  1522. let index = parseInt(Math.random() * ind + 1)
  1523. Object.assign(WireTransferAccount, pro[index - 1])
  1524. actionAdd1.value = Host80 + "/common/upload"
  1525. } else {
  1526. Object.assign(WireTransferAccount, {})
  1527. actionAdd1.value = Host80 + "/common/upload"
  1528. }
  1529. }
  1530. }
  1531. //选择支付方式
  1532. const isShowStep3 = (row) => {
  1533. if (row.kycChannel != 1) {
  1534. doShowStep3(row)
  1535. } else {
  1536. qrCode(row.code, row)
  1537. }
  1538. }
  1539. //更换支付方式
  1540. const showTable = () => {
  1541. resetForm();
  1542. dialogCheckWait.value = false;
  1543. dialogVisible.value = false;
  1544. flag.value = false;
  1545. form.bankUname = undefined
  1546. form.bankCardNum = undefined
  1547. form.cvv = undefined
  1548. form.expiryMonth = undefined
  1549. form.expiryYear = undefined
  1550. form.pin = undefined
  1551. myId.value = null
  1552. params.amount = ""
  1553. params.amount1 = ""
  1554. params.agree = false
  1555. params.agree2 = false
  1556. params.agree3 = false
  1557. params.agree4 = false
  1558. params.agree5 = false
  1559. params.agree6 = false
  1560. params.promoCode = ""
  1561. isChannel.value = true
  1562. imageUrl.value = ""
  1563. code.value = ""
  1564. WireTransferAccount.bankMsg = ""
  1565. introduce.introduce = ""
  1566. introduce.enIntroduce = ""
  1567. }
  1568. const loginComboxOptions = computed(() => {
  1569. return loginOptions.value.map((item) => ({
  1570. text: item.label,
  1571. value: item.login
  1572. }))
  1573. })
  1574. const creditCardOptions = computed(() => {
  1575. return ruleForm.bankCredit.map((item, index) => ({
  1576. text: `${item.bankUname}-${item.bankCardNum}`,
  1577. value: item.id
  1578. }))
  1579. })
  1580. const bankOptions = computed(() => {
  1581. return bankDate.value.map((item, index) => ({
  1582. text: (locale.value === 'cn' || locale.value === 'zhHant') ? item.name : item.enName,
  1583. value: item.code
  1584. }))
  1585. })
  1586. // 获取账户信息
  1587. const getDateList = async () => {
  1588. loading.value = true
  1589. let res = await customApi.CustomDropdown({ platform: "" })
  1590. if (res.code == Code.StatusOK) {
  1591. loginOptions.value = res.data.map(item => ({
  1592. ...item,
  1593. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1594. }))
  1595. const pages = getCurrentPages()
  1596. const route = pages[pages.length - 1].$page?.options || {}
  1597. if (route.login) {
  1598. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1599. loginValue.value = found.login
  1600. loginValueDoc.value = found.label
  1601. step2.value = true
  1602. }
  1603. } else {
  1604. uni.showToast({ title: res.msg, icon: 'none' })
  1605. }
  1606. loading.value = false
  1607. }
  1608. //获取入金通道
  1609. const getDepositList = async () => {
  1610. pictLoading.value = true
  1611. tableData.International_Transfer = []
  1612. tableData.China_UnionPay = []
  1613. tableData.Digital_Currency = []
  1614. tableData.Electronic_Wallet = []
  1615. tableData.Ucard_Wallet = []
  1616. let res = await financialApi.RemittanceChannelList({})
  1617. if (res.code == Code.StatusOK) {
  1618. res.data.forEach(item => {
  1619. if (item.type == 1) tableData.International_Transfer.push(item), tableData1.International_Transfer.push(item)
  1620. if (item.type == 2) tableData.China_UnionPay.push(item), tableData1.China_UnionPay.push(item)
  1621. if (item.type == 3) tableData.Digital_Currency.push(item), tableData1.Digital_Currency.push(item)
  1622. if (item.type == 4) tableData.Electronic_Wallet.push(item), tableData1.Electronic_Wallet.push(item)
  1623. if (item.type == 5) tableData.Ucard_Wallet.push(item), tableData1.Ucard_Wallet.push(item)
  1624. })
  1625. pictLoading.value = false
  1626. } else {
  1627. uni.showToast({ title: res.msg, icon: 'none' })
  1628. pictLoading.value = false
  1629. }
  1630. }
  1631. //获取银行列表
  1632. const getBankList = async (row) => {
  1633. let res = await financialApi.BankList({ channelCode: row.code })
  1634. try {
  1635. if (res.code == Code.StatusOK) {
  1636. let bank = res.data
  1637. let data = []
  1638. bank.forEach(j => {
  1639. if (!j.minAmount && j.minAmount != 0) j.minAmount = row.minAmount
  1640. if (!j.maxAmount && j.maxAmount != 0) j.maxAmount = row.maxAmount
  1641. j.bankValid = row.bankValid
  1642. j.requestUrl = row.requestUrl
  1643. data.push(j)
  1644. })
  1645. bankDate.value = data
  1646. } else {
  1647. uni.showToast({ title: res.msg, icon: 'none' })
  1648. }
  1649. } catch (error) {
  1650. uni.showToast({ title: error.msg, icon: 'none' })
  1651. }
  1652. }
  1653. //获取20赠金活动信息
  1654. const getCheckExistSuccess = async () => {
  1655. let res = await financialApi.depositCheckExistSuccess({})
  1656. if (res.code == Code.StatusOK) {
  1657. CheckExistSuccess.value = res.data
  1658. } else {
  1659. uni.showToast({ title: res.msg, icon: 'none' })
  1660. }
  1661. }
  1662. //20赠金是否到期-4月30号23:59:59的时候关闭申请
  1663. const is20Open = () => {
  1664. let endTime1 = "2023/04/30 23:59:59"
  1665. let timezone = 2
  1666. let offset_GMT = new Date().getTimezoneOffset()
  1667. let nowDate = new Date().getTime()
  1668. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1669. let end = new Date(endTime1).getTime()
  1670. if (now > end) anshiClose.value = false
  1671. }
  1672. //限时活动
  1673. const ActivityRequiteInfo = async () => {
  1674. let res = await activityApi.ActivityRequiteInfo({})
  1675. if (res.code == Code.StatusOK) {
  1676. limitedStatus.value = res.data
  1677. } else {
  1678. uni.showToast({ title: res.msg, icon: 'none' })
  1679. }
  1680. }
  1681. //2023年中赠金活动数据-10
  1682. const Activity24nianzhongInfo = async () => {
  1683. let res = await activityApi.Activity23nianzhongInfo({})
  1684. if (res.code == Code.StatusOK) {
  1685. Object.assign(tableData4, res.data)
  1686. // const Data4 = {
  1687. // "activityEndTime": null,
  1688. // "activityStartTime": null,
  1689. // "applicationEndTime": null,
  1690. // "applicationStartTime": null,
  1691. // "loginTypes": [5, 6],
  1692. // "show": 1,
  1693. // "useApply": 1
  1694. // };
  1695. // Object.assign(tableData4, Data4)
  1696. // tableData4Flag.value = tableData4.show == 1 && tableData4.useApply == 1
  1697. } else {
  1698. uni.showToast({ title: res.msg, icon: 'none' })
  1699. }
  1700. }
  1701. //2023年中赠金活动数据-20
  1702. const Activity24nianzhongTwoInfo = async () => {
  1703. let res = await activityApi.Activity23nianzhongTwoInfo({})
  1704. if (res.code == Code.StatusOK) {
  1705. Object.assign(tableData4Two, res.data)
  1706. // const Data4 = {
  1707. // "activityEndTime": null,
  1708. // "activityStartTime": null,
  1709. // "applicationEndTime": null,
  1710. // "applicationStartTime": null,
  1711. // "loginTypes": [5, 6],
  1712. // "show": 1,
  1713. // "useApply": 1
  1714. // };
  1715. // Object.assign(tableData4Two, Data4)
  1716. // tableData4Flag.value = tableData4Two.show == 1 && tableData4Two.useApply == 1
  1717. } else {
  1718. uni.showToast({ title: res.msg, icon: 'none' })
  1719. }
  1720. }
  1721. //2023年中赠金活动权限
  1722. const get23nianzhongTwoLogin = async (newVal) => {
  1723. let res = await activityApi.Activity23nianzhongTwoLogin({ login: newVal })
  1724. if (res.code == Code.StatusOK) {
  1725. Object.assign(tableData4Two, res.data)
  1726. tableData4TwoFlag.value = tableData4Two.show == 1
  1727. } else {
  1728. uni.showToast({ title: res.msg, icon: 'none' })
  1729. }
  1730. }
  1731. const getActivityExtensionGiveLogin = async (newVal) => {
  1732. let res = await activityApi.ActivityExtensionGiveLogin({ login: newVal })
  1733. if (res.code == Code.StatusOK) {
  1734. Object.assign(tableDataNewList, res.data)
  1735. tableDataNewListFlag.value = tableDataNewList.show == 1
  1736. } else {
  1737. uni.showToast({ title: res.msg, icon: 'none' })
  1738. }
  1739. }
  1740. const getActivityExtensionGiveLoginJoin = async (newVal) => {
  1741. let res = await activityApi.ActivityExtensionGiveLoginJoin({ login: newVal })
  1742. if (res.code == Code.StatusOK) {
  1743. giveLoginJoin.value = res.data
  1744. } else {
  1745. uni.showToast({ title: res.msg, icon: 'none' })
  1746. giveLoginJoin.value = ""
  1747. }
  1748. }
  1749. //24新年庆典 开始
  1750. const isNewYear24Open = () => {
  1751. let endTime1 = "2025/3/31 23:59:59"
  1752. let startTime1 = "2025/1/1 00:00:00"
  1753. let timezone = 2
  1754. let offset_GMT = new Date().getTimezoneOffset()
  1755. let nowDate = new Date().getTime()
  1756. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1757. let end = new Date(endTime1).getTime()
  1758. let start = new Date(startTime1).getTime()
  1759. if (now < end && start < now) ActivityNewYear24()
  1760. }
  1761. const ActivityNewYear24 = async () => {
  1762. let res = await activityApi.ActivityNewYear24({})
  1763. if (res.code == Code.StatusOK) {
  1764. tableDataNewYear24.value = res.data
  1765. if (typeof tableDataNewYear24.value == "object") toIncome()
  1766. } else {
  1767. uni.showToast({ title: res.msg, icon: 'none' })
  1768. }
  1769. }
  1770. const toIncome = () => {
  1771. let balance = Number(tableDataNewYear24.value.balance) || 0
  1772. tableDataNewYear24.value.details.forEach((item, index) => {
  1773. if (balance > item.min && balance <= item.max) {
  1774. NewYear24Data.rate = item.rate
  1775. NewYear24Data.index = item.index
  1776. NewYear24Data.balance = (Number(tableDataNewYear24.value.details[index + 1].min) - balance).toFixed(2)
  1777. NewYear24Data.income = ((Number(tableDataNewYear24.value.details[index + 1].min) * Number(tableDataNewYear24.value.details[index + 1].rate) / 100 / 365) * 365).toFixed(2)
  1778. tableDataNewYear24Flag.value = true
  1779. } else if (balance > item.min && balance >= item.max && item.max == 0) {
  1780. tableDataNewYear24Flag.value = false
  1781. }
  1782. })
  1783. }
  1784. //24新年庆典 结束
  1785. // 新改内容
  1786. // userStore.paymentChannel.value
  1787. // userStore.channelList.value
  1788. const channel = computed(() => userStore.paymentChannel)
  1789. const channelList = computed(() => userStore.channelList)
  1790. const channelListOptions = ref([])
  1791. const channelId = ref(null)
  1792. const loading = ref(false)
  1793. const setAllAmount = () => {
  1794. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  1795. params.amount = parseInt(found.balance)
  1796. validateAmount()
  1797. }
  1798. const allTabs = computed(() => {
  1799. return {
  1800. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1801. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1802. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1803. "International_Transfer": t('Custom.Deposit.Channel1'),
  1804. "Ucard_Wallet": t('card.title'),
  1805. }
  1806. })
  1807. function formatChannels(data) {
  1808. const result = []
  1809. // 遍历每个分类
  1810. for (const key in data) {
  1811. const list = data[key] || []
  1812. // 插入分类标题(禁用项)
  1813. if (list.length) {
  1814. result.push({
  1815. text: allTabs.value[key],
  1816. value: key,
  1817. disable: true
  1818. })
  1819. }
  1820. list.forEach(item => {
  1821. result.push({
  1822. ...item,
  1823. text: item.name,
  1824. value: item.code
  1825. })
  1826. })
  1827. }
  1828. return result
  1829. }
  1830. // 生命周期
  1831. onMounted(() => {
  1832. if (channelList.value) {
  1833. channelListOptions.value = formatChannels(channelList.value)
  1834. }
  1835. channelId.value = channel.value
  1836. getDateList()
  1837. isStep3Open()
  1838. setTimeout(() => {
  1839. if (country.value === "VN") dialogVietnamNotice.value = true
  1840. is20Open()
  1841. // Activity24nianzhongInfo();
  1842. // Activity24nianzhongTwoInfo();
  1843. // dealResult({ "type": 7, "result": "/krad/pin?serial=123123" })
  1844. isNewYear24Open()
  1845. ActivityRequiteInfo()
  1846. }, 800);
  1847. })
  1848. onUnmounted(() => {
  1849. // userStore.savePaymentChannel('')
  1850. // userStore.saveChannelList('')
  1851. })
  1852. watch(channelId, async (newVal) => {
  1853. if (newVal) {
  1854. showTable()
  1855. let row = channelListOptions.value.find(item => item.code == newVal)
  1856. isShowStep3(row)
  1857. }
  1858. });
  1859. watch(isStep3, async (newVal) => {
  1860. if (newVal) {
  1861. await nextTick();
  1862. formRef.value?.clearValidate();
  1863. resetForm();
  1864. await nextTick();
  1865. formRef.value?.clearValidate();
  1866. }
  1867. });
  1868. // Watch
  1869. watch(loginValue, (login) => {
  1870. if (login) {
  1871. step3.value = true
  1872. get23nianzhongTwoLogin(login);
  1873. getActivityExtensionGiveLogin(login);
  1874. getActivityExtensionGiveLoginJoin(login);
  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(--bs-heading-color);
  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(--bs-heading-color);
  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: var(--bs-emphasis-color);
  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(--bs-heading-color);
  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: var(--bs-emphasis-color);
  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(--bs-heading-color);
  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(--bs-heading-color);
  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: var(--bs-emphasis-color);
  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: var(--bs-emphasis-color);
  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>