deposit-select.vue 97 KB

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