deposit.vue 96 KB

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