deposit.vue 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_customer.item2')" />
  4. <uni-loading v-if="loading" />
  5. <view class="custom-deposit-container" v-else>
  6. <view class="custom-deposit">
  7. <!-- 步骤1:选择账户 -->
  8. <view class="box">
  9. <view class="b-card">
  10. <view class="card-top">
  11. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  12. t('Custom.Deposit.Title1')
  13. }}</text>
  14. <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
  15. :placeholder="t('placeholder.choose')" />
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 步骤2:支付通道列表(卡片布局) -->
  20. <view class="box" v-if="step2">
  21. <view class="b-card">
  22. <view class="card-top">
  23. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  24. t('Custom.Deposit.Title2')
  25. }}</text>
  26. <cwg-combox :clearable="false" v-model:value="channelId" :options="channelListOptions"
  27. :placeholder="t('placeholder.choose')">
  28. </cwg-combox>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 步骤3:填写入金信息 -->
  33. <view class="box box-step3" v-if="step3">
  34. <view class="b-card">
  35. <view class="card-top">
  36. <!-- 表单(确认后显示) -->
  37. <uni-forms v-if="isStep3" ref="formRef" :model="params" :rules="rules" label-position="top"
  38. validate-trigger="submit" :label-width="300" class="base-info-form">
  39. <uni-row class="demo-uni-row uni-row1 uni-row2">
  40. </uni-row>
  41. <!-- 信用卡选择区域 -->
  42. <template v-if="isStep3 && channelData.confirmCreditCard == 1">
  43. <view>
  44. <view
  45. style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
  46. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  47. t('PersonalManagement.Label.selectCreditCard') }}</text>
  48. <view class="add-back">
  49. <text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
  50. <text class="add-btn crm-cursor" @click="openAddBankCard">{{
  51. t('Custom.Withdraw.addBank1') }}</text>
  52. </view>
  53. </view>
  54. </view>
  55. <view>
  56. <uni-forms-item>
  57. <cwg-combox :clearable="false" v-model:value="myId"
  58. :options="creditCardOptions" :placeholder="t('placeholder.choose')"
  59. @change="selectCode" />
  60. </uni-forms-item>
  61. </view>
  62. </template>
  63. <!-- 银行选择(如有) -->
  64. <template v-if="isStep3 && bankOptions.length">
  65. <view>
  66. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  67. t('news_add_field.Label.Title4')
  68. }}</text>
  69. </view>
  70. <view>
  71. <uni-forms-item>
  72. <cwg-combox :clearable="false" v-model:value="code" :options="bankOptions"
  73. :placeholder="t('placeholder.choose')" @change="selectCode" />
  74. </uni-forms-item>
  75. </view>
  76. </template>
  77. <!-- 特别提示(B2BINPAY) -->
  78. <view v-if="isStep3 && bankOptions.length && channelData.code == 'B2BINPAY'">
  79. <text class="tit" style="margin: 10px 0 20px"><text class="iconfont iconi"></text>{{
  80. t('Custom.Deposit.Des') }}</text>
  81. </view>
  82. <!-- 电汇信息展示 -->
  83. <template
  84. v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
  85. <view>
  86. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  87. t('Custom.Deposit.Title5') }}</text>
  88. </view>
  89. <view>
  90. <view class="wire-transfer-account">
  91. <view class="row"><text class="label SpecialColor">{{
  92. t('Custom.Deposit.bankUname') }}</text><text
  93. class="content SpecialColor">{{
  94. WireTransferAccount.bankUname || '--'
  95. }}</text></view>
  96. <view class="row"><text class="label">{{ t('Custom.Deposit.bankName')
  97. }}</text><text class="content">{{ WireTransferAccount.bankName
  98. ||
  99. '--'
  100. }}</text></view>
  101. <view class="row"><text class="label SpecialColor">{{
  102. t('Custom.Deposit.bankCardNum') }}</text><text
  103. class="content SpecialColor">{{
  104. WireTransferAccount.bankCardNum || '--'
  105. }}</text></view>
  106. <view class="row"><text class="label">{{ t('Custom.Deposit.bankAddr')
  107. }}</text><text class="content">{{ WireTransferAccount.bankAddr
  108. ||
  109. '--'
  110. }}</text></view>
  111. <view class="row"><text class="label SpecialColor">{{
  112. t('Custom.Deposit.swiftCode') }}</text><text
  113. class="content SpecialColor">{{
  114. WireTransferAccount.swiftCode || '--'
  115. }}</text></view>
  116. <view class="row"><text class="label">{{ t('Custom.Deposit.bankCode')
  117. }}</text><text class="content">{{ WireTransferAccount.bankCode
  118. ||
  119. '--'
  120. }}</text></view>
  121. <view class="row"><text class="label SpecialColor">{{
  122. t('Custom.Recording.Note')
  123. }}</text><text class="content SpecialColor">{{
  124. WireTransferAccount.bankMsg || '--' }}</text></view>
  125. </view>
  126. </view>
  127. </template>
  128. <!-- 数字货币信息展示 -->
  129. <template
  130. v-if="isStep3 && channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0">
  131. <view>
  132. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  133. t('Custom.Deposit.DigitalAcc') }}</text>
  134. </view>
  135. <view>
  136. <view class="wire-transfer-account">
  137. <view class="row"><text class="label SpecialColor">{{
  138. t('Custom.Deposit.DigitalName') }}</text><text
  139. class="content SpecialColor">{{ WireTransferAccount.name
  140. + '-' +
  141. WireTransferAccount.type }}</text></view>
  142. <view class="row"><text class="label">{{ t('Custom.Withdraw.Title6')
  143. }}</text><text class="content">{{ WireTransferAccount.address ||
  144. '--'
  145. }}</text></view>
  146. <view class="row"><text class="label">QR Code</text>
  147. <image :src="Host05 + WireTransferAccount.url" mode="aspectFit"
  148. style="width: 100rpx; height: 100rpx;" />
  149. </view>
  150. </view>
  151. </view>
  152. </template>
  153. <!-- 表单区域(含金额、预估金额、上传凭证、优惠码) -->
  154. <template v-if="isStep3">
  155. <view>
  156. <text class="tit"><text class="iconfont icon-caret-right"></text>{{
  157. t('Custom.Deposit.Title3') }}</text>
  158. </view>
  159. <view v-loading="pictLoadingImg">
  160. <!-- 金额输入 -->
  161. <view class="amount-box">
  162. <uni-forms-item
  163. :label="t('Custom.Deposit.Title3') + '(' + channelData.currency + ')'"
  164. name="amount" :error-message="amountErrorMessage" class="amount-input">
  165. <uni-easyinput type="number" v-model="params.amount"
  166. :placeholder="t('placeholder.input')" @blur="validateAmount" />
  167. </uni-forms-item>
  168. <!-- <view class="btn" v-t="'State.All'" @click="setAllAmount"></view> -->
  169. </view>
  170. <!-- 预估金额(若有汇率) -->
  171. <view v-if="channelData.rate">
  172. <uni-forms-item>
  173. <template #label>
  174. <view class="label-with-icon">
  175. <text>{{ t('Custom.Deposit.EstimatedAmount') + '(' +
  176. channelData.transformCurrency + ')' }}</text>
  177. <uni-tooltip placement="right">
  178. <view class="help-icon">ⓘ</view>
  179. <template #content>
  180. <text>{{ t('Custom.Deposit.des') }}</text>
  181. </template>
  182. </uni-tooltip>
  183. </view>
  184. </template>
  185. <uni-easyinput v-model="params.amount1" disabled
  186. :placeholder="t('placeholder.input')" />
  187. </uni-forms-item>
  188. </view>
  189. <!-- 优惠码 -->
  190. <view>
  191. <uni-forms-item name="promoCode">
  192. <template #label>
  193. <view class="label-with-icon">
  194. <text>{{ t('Custom.Deposit.PromoCode') }}</text>
  195. <uni-tooltip placement="right">
  196. <view class="help-icon">ⓘ</view>
  197. <template #content>
  198. <text>{{ t('news_add_field.Des.item3') }}</text>
  199. </template>
  200. </uni-tooltip>
  201. </view>
  202. </template>
  203. <uni-easyinput v-model="params.promoCode"
  204. :placeholder="t('placeholder.input')" />
  205. </uni-forms-item>
  206. </view>
  207. <!-- 上传汇款凭证(特定渠道) -->
  208. <view v-if="
  209. channelData.code == 'UNION_PAY_TELEGRAPHIC' ||
  210. channelData.code == 'UNION_PAY_TELEGRAPHIC_SPECIAL' ||
  211. channelData.code && channelData.code.indexOf('DIGITAL_PAY_TYPE_KEY') === 0 ||
  212. channelData.code == 'UNION_PAY_TELEGRAPHIC_TWO'
  213. ">
  214. <uni-forms-item :label="t('Custom.Deposit.UploadRemittanceVoucher')">
  215. <cwg-file-picker-wrapper v-model="imageUrl" :limit="1" :editable="true"
  216. :fileMediatype="'all'" uploadUrl="/wasabi/upload/file"
  217. :baseUrl="Host80" />
  218. </uni-forms-item>
  219. </view>
  220. <!-- 电汇提示 -->
  221. <view
  222. v-if="isStep3 && ['UNION_PAY_TELEGRAPHIC', 'UNION_PAY_TELEGRAPHIC_SPECIAL', 'UNION_PAY_TELEGRAPHIC_TWO'].includes(channelData.code)">
  223. <text>{{ t('Custom.Deposit.Tips') }}</text>
  224. </view>
  225. <!-- ========== 赠金活动部分 ========== -->
  226. <!-- 10%赠金(年中赠金) -->
  227. <view v-if="tableData4Flag">
  228. <uni-forms-item class="agree" name="agree4">
  229. <label class="checkbox">
  230. <checkbox :checked="params.agree4"
  231. @click="params.agree4 = !params.agree4" />
  232. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit1')
  233. }}</text>
  234. </label>
  235. <view style="line-height: 1.5; font-size: 14px">
  236. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit2')
  237. }}</text>
  238. <text class="clause crm-cursor" @click="dialogClauseNZ = true">{{
  239. t('news_add_field1.activitiesNZ.itemDeposit3')
  240. }}</text>
  241. <text>{{ t('news_add_field1.activitiesNZ.itemDeposit4')
  242. }}</text>
  243. </view>
  244. </uni-forms-item>
  245. </view>
  246. <!-- 20%赠金(年中赠金) -->
  247. <view v-if="tableData4TwoFlag">
  248. <uni-forms-item class="agree" name="agree5">
  249. <label class="checkbox">
  250. <checkbox :checked="params.agree5"
  251. @click="params.agree5 = !params.agree5" />
  252. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
  253. }}</text>
  254. </label>
  255. <view style="line-height: 1.5; font-size: 14px">
  256. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
  257. }}</text>
  258. <text class="clause crm-cursor" @click="dialogClauseNZTwo = true">{{
  259. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  260. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
  261. }}</text>
  262. </view>
  263. </uni-forms-item>
  264. </view>
  265. <!-- 赠送活动(动态) -->
  266. <view v-if="tableDataNewListFlag">
  267. <uni-forms-item class="agree" name="agree6">
  268. <label>
  269. <checkbox :checked="params.agree6"
  270. @click="params.agree6 = !params.agree6" />
  271. <text>{{ tableDataNewList.title }}</text>
  272. </label>
  273. <view style="line-height: 1.5; font-size: 14px">
  274. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  275. <text class="clause crm-cursor"
  276. @click="dialogClauseNewList = true">{{
  277. tableDataNewList.title }}</text>
  278. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  279. </view>
  280. </uni-forms-item>
  281. </view>
  282. <!-- 20%赠金申请(特定账户类型) -->
  283. <view
  284. v-if="(ACCType == 1 || ACCType == 2 || ACCType == 5 || ACCType == 6 || ACCType == 7) && anshiClose">
  285. <uni-forms-item class="agree" name="agree3">
  286. <label class="checkbox">
  287. <checkbox :checked="params.agree3"
  288. @click="params.agree3 = !params.agree3" />
  289. <text>{{ t('news_add_field1.deposit.item3') }}</text>
  290. </label>
  291. <view style="line-height: 1.5; font-size: 14px">
  292. <text>{{ t('news_add_field1.deposit.item4') }}</text>
  293. <text class="clause crm-cursor" @click="dialogClause1 = true">{{
  294. t('news_add_field1.deposit.item5') }}</text>
  295. <text>{{ t('news_add_field1.deposit.item6') }}</text>
  296. </view>
  297. </uni-forms-item>
  298. </view>
  299. <!-- 普通10%赠金(非年中、非特定账户) -->
  300. <view
  301. v-if="!tableData4Flag && !tableData4TwoFlag && !tableDataNewListFlag && (country != 'CN' || (country == 'CN' && (ACCType == 1 || ACCType == 2 || ACCType == 7 || ACCType == 5 || ACCType == 6 || ACCType == 8))) && ACCType != 3">
  302. <template v-if="isSupportedCountry && (ACCType == 2 || ACCType == 7)">
  303. <uni-forms-item class="agree" name="agree2">
  304. <label>
  305. <checkbox :checked="params.agree2"
  306. @click="params.agree2 = !params.agree2" />
  307. <text>{{ t('news_add_field1.deposit.item2_1') }}</text>
  308. </label>
  309. <view style="line-height: 1.5; font-size: 14px">
  310. <text>{{ t('Custom.Deposit.agree21') }}</text>
  311. <cwg-link type="pdf" title="Custom.Deposit.agree22_2"
  312. :url="`pdf/pdf4/100Bonus-en.pdf`" style="color: black" />
  313. <text>{{ t('Custom.Deposit.agree23_2') }}</text>
  314. </view>
  315. </uni-forms-item>
  316. </template>
  317. <template
  318. v-else-if="!isSupportedCountry && ACCType != 8 && !isAfterSeptember30()">
  319. <uni-forms-item class="agree" name="agree2">
  320. <label>
  321. <checkbox :checked="params.agree2"
  322. @click="params.agree2 = !params.agree2" />
  323. <text>{{ t('news_add_field1.deposit.item1') }}</text>
  324. </label>
  325. <view style="line-height: 1.5; font-size: 14px">
  326. <text>{{ t('Custom.Deposit.agree21') }}</text>
  327. <cwg-link type="pdf" title="Custom.Deposit.agree22"
  328. :url="`pdf/pdf4/${langCN}.pdf`" style="color: black" />
  329. <text>{{ t('Custom.Deposit.agree23_1') }}</text>
  330. </view>
  331. </uni-forms-item>
  332. </template>
  333. </view>
  334. </view>
  335. </template>
  336. <button class="s-btn" type="primary" @click="submitConfirm">{{ t('Btn.Submit')
  337. }}</button>
  338. </uni-forms>
  339. </view>
  340. </view>
  341. </view>
  342. </view>
  343. <view class="step3-attention">
  344. <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
  345. <view>
  346. <rich-text class="attention"
  347. :nodes="isZh ? introduce.introduce : introduce.enIntroduce"></rich-text>
  348. </view>
  349. </view>
  350. </view>
  351. </view>
  352. <!-- 不参加活动弹出框 -->
  353. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  354. <!-- 新年24用户提示弹窗 -->
  355. <NewYear24Popup v-model:visible="tableDataNewYear24Flag" />
  356. <!-- 越南用户提示弹窗 -->
  357. <VietnamNoticePopup v-model:visible="dialogVietnamNotice" />
  358. <!-- 提交后确认弹窗 -->
  359. <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item2')"
  360. :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="params" :userName="userName"
  361. :login="loginValue" :loginDoc="loginValueDoc" @confirm="submit" />
  362. <!--提交后的弹出框-->
  363. <CheckPopup v-model:visible="dialogCheckSuccess" :goPayLink="goPayLink" @close="closeDia" />
  364. <!-- 提交后失败弹窗 -->
  365. <cwg-error-popup v-model:visible="dialogCheckError" :responseMessage="RES" />
  366. <!-- 最后失败弹窗 -->
  367. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  368. <!-- 最后成功弹窗 -->
  369. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  370. <!-- 等待弹窗 -->
  371. <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
  372. <!-- 赠金协议 -->
  373. <ClausePopup v-model:visible="dialogClause" country="CN" :isGuoQin="isGuoQin" />
  374. <!-- 赠金协议20 -->
  375. <Clause20Popup v-model:visible="dialogClause1" />
  376. <!-- 赠金协议10年中 -->
  377. <ClauseNZPopup v-model:visible="dialogClauseNZ" :title="t('news_add_field1.activitiesNZ.item6')"
  378. :startDate="tableData4.applicationStartTime" :endDate="tableData4.applicationEndTime" />
  379. <!-- 赠金协议20年中 -->
  380. <ClauseNZTwoPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  381. :startDate="tableData4Two.applicationStartTime" :endDate="tableData4Two.applicationEndTime" />
  382. <!-- 赠送活动详情-协议 -->
  383. <ClauseNewListPopup v-model:visible="dialogClauseNewList" :content="tableDataNewList.content"
  384. :title="tableDataNewList.title" />
  385. <!--提交后完成弹出框-->
  386. <ChinaUnionPayPopup v-model:visible="dialogChinaUnionPay" />
  387. <!-- 重新提交弹窗 -->
  388. <DealResultPopup v-model:visible="dialogDealResult" :responseMessage="responseMessage"
  389. :title="dialogDealResultTitle" :initialData="dialogDealResult_form" :type="DealResultType"
  390. @confirm="submitDealResult" />
  391. <!-- KYC成功弹窗 -->
  392. <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
  393. </cwg-page-wrapper>
  394. </template>
  395. <script setup>
  396. import { ref, reactive, computed, watch, onMounted, nextTick, onUnmounted } from 'vue'
  397. import { useI18n } from 'vue-i18n'
  398. const { t, locale } = useI18n()
  399. import useUserStore from '@/stores/use-user-store'
  400. import { customApi } from '@/service/custom'
  401. import { financialApi } from '@/service/financial'
  402. import { activityApi } from '@/service/activity'
  403. import Config from '@/config/index'
  404. const { Code, Host80, Host04 } = Config
  405. import { initLink } from '@/utils/setUrl'
  406. import isImageType from '@/global/isImageType'
  407. import PaymentMethodsList from './components/PaymentMethodsList.vue'
  408. import CwgKycPopup from './components/KycPopup.vue'
  409. import DealResultPopup from './components/DealResultPopup.vue'
  410. import ChinaUnionPayPopup from './components/ChinaUnionPayPopup.vue'
  411. import ClauseNewListPopup from './components/ClauseNewListPopup.vue'
  412. import ClauseNZTwoPopup from './components/ClauseNZTwoPopup.vue'
  413. import ClauseNZPopup from './components/ClauseNZPopup.vue'
  414. import Clause20Popup from './components/Clause20Popup.vue'
  415. import ClausePopup from './components/ClausePopup.vue'
  416. import CheckPopup from './components/CheckPopup.vue'
  417. import CwgCheckConfirmPopup from './components/DepositCheckConfirmPopup.vue'
  418. import VietnamNoticePopup from './components/VietnamNoticePopup.vue'
  419. import NewYear24Popup from './components/NewYear24Popup.vue'
  420. // 假设原有导入路径保持不变
  421. import tool from "@/global/tool"
  422. // import { 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. showTable()
  1431. }
  1432. const isStep3Open = () => {
  1433. isStep3.value = true
  1434. //中国网银弹窗
  1435. if (tableData.China_UnionPay.length && tableData.China_UnionPay[0].type == 2) {
  1436. let timezone = 8
  1437. let offset_GMT = new Date().getTimezoneOffset()
  1438. let nowDate = new Date().getTime()
  1439. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000)
  1440. let newTime = now.getHours().toString()
  1441. if ((newTime.length == 1 && newTime >= 0 && newTime < 8) || (newTime.length == 2 && newTime >= 22 && newTime < 24)) {
  1442. dialogChinaUnionPay.value = true
  1443. }
  1444. }
  1445. }
  1446. // 判断是否在9月30日晚上12点之后,用于隐藏特定活动
  1447. const isAfterSeptember30 = () => {
  1448. // const currentDate = new Date();
  1449. // const september30 = new Date(
  1450. // currentDate.getFullYear(),
  1451. // 8,
  1452. // 30,
  1453. // 23,
  1454. // 59,
  1455. // 59
  1456. // ); // 月份从0开始,8表示9月,设置为23:59:59
  1457. // return currentDate > september30;
  1458. return true
  1459. }
  1460. const getMetaInfo = () => {
  1461. metaInfo.value = window.getMetaInfo()
  1462. metaInfo.value = { ...metaInfo.value, deviceType: "h5" }
  1463. }
  1464. //获取kyc二维码
  1465. const qrCode = async (depositChannelCode, row) => {
  1466. getMetaInfo()
  1467. let res = await activityApi.getWebsdkLink({
  1468. depositChannelCode,
  1469. metaInfo: metaInfo.value
  1470. })
  1471. if (res.code == Code.StatusOK) {
  1472. if (res.data) {
  1473. text1.value = JSON.parse(res.data).url
  1474. dialogKyc.value = true
  1475. flag.value = false
  1476. } else {
  1477. doShowStep3(row)
  1478. }
  1479. } else {
  1480. flag.value = false
  1481. uni.showToast({ title: res.msg, icon: 'none' })
  1482. }
  1483. }
  1484. const doShowStep3 = (row) => {
  1485. if (row.confirmCreditCard == 1) getBankInfo()
  1486. getCheckExistSuccess()
  1487. if (row.bankValid && isChannel.value) {
  1488. getBankList(row)
  1489. isChannel.value = false
  1490. step3.value = true
  1491. Object.assign(channelData, row)
  1492. mAmount.minAmount = row.minAmount
  1493. mAmount.maxAmount = row.maxAmount
  1494. } else {
  1495. step3.value = true
  1496. bankDate.value = []
  1497. Object.assign(channelData, row)
  1498. mAmount.minAmount = row.minAmount
  1499. mAmount.maxAmount = row.maxAmount
  1500. }
  1501. tableData.International_Transfer = []
  1502. tableData.China_UnionPay = []
  1503. tableData.Digital_Currency = []
  1504. tableData.Electronic_Wallet = []
  1505. tableData.Ucard_Wallet = []
  1506. if (row.type == 1) tableData.International_Transfer[0] = row
  1507. if (row.type == 2) tableData.China_UnionPay[0] = row
  1508. if (row.type == 3) tableData.Digital_Currency[0] = row
  1509. if (row.type == 4) tableData.Electronic_Wallet[0] = row
  1510. if (row.type == 5) tableData.Ucard_Wallet[0] = row
  1511. introduce.introduce = row.introduce
  1512. introduce.enIntroduce = row.enIntroduce
  1513. 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)) {
  1514. let pro = []
  1515. if (row.property && row.property.substring(0, 1) == "[") {
  1516. pro = JSON.parse(row.property)
  1517. } else if (row.property && row.property.substring(0, 1) != "[") {
  1518. let proper = "[" + row.property + "]"
  1519. pro = JSON.parse(proper)
  1520. }
  1521. let ind = pro.length
  1522. if (ind) {
  1523. let index = parseInt(Math.random() * ind + 1)
  1524. Object.assign(WireTransferAccount, pro[index - 1])
  1525. actionAdd1.value = Host80 + "/common/upload"
  1526. } else {
  1527. Object.assign(WireTransferAccount, {})
  1528. actionAdd1.value = Host80 + "/common/upload"
  1529. }
  1530. }
  1531. }
  1532. //选择支付方式
  1533. const isShowStep3 = (row) => {
  1534. if (row.kycChannel != 1) {
  1535. doShowStep3(row)
  1536. } else {
  1537. qrCode(row.code, row)
  1538. }
  1539. }
  1540. //更换支付方式
  1541. const showTable = () => {
  1542. resetForm();
  1543. dialogCheckWait.value = false;
  1544. dialogVisible.value = false;
  1545. flag.value = false;
  1546. form.bankUname = undefined
  1547. form.bankCardNum = undefined
  1548. form.cvv = undefined
  1549. form.expiryMonth = undefined
  1550. form.expiryYear = undefined
  1551. form.pin = undefined
  1552. myId.value = null
  1553. params.amount = ""
  1554. params.amount1 = ""
  1555. params.agree = false
  1556. params.agree2 = false
  1557. params.agree3 = false
  1558. params.agree4 = false
  1559. params.agree5 = false
  1560. params.agree6 = false
  1561. params.promoCode = ""
  1562. isChannel.value = true
  1563. imageUrl.value = ""
  1564. bankDate.value = []
  1565. code.value = ""
  1566. WireTransferAccount.bankMsg = ""
  1567. introduce.introduce = ""
  1568. introduce.enIntroduce = ""
  1569. }
  1570. const loginComboxOptions = computed(() => {
  1571. return loginOptions.value.map((item) => ({
  1572. text: item.label,
  1573. value: item.login
  1574. }))
  1575. })
  1576. const creditCardOptions = computed(() => {
  1577. return ruleForm.bankCredit.map((item, index) => ({
  1578. text: `${item.bankUname}-${item.bankCardNum}`,
  1579. value: item.id
  1580. }))
  1581. })
  1582. const bankOptions = computed(() => {
  1583. return bankDate.value.map((item, index) => ({
  1584. text: (locale.value === 'cn' || locale.value === 'zhHant') ? item.name : item.enName,
  1585. value: item.code
  1586. }))
  1587. })
  1588. // 获取账户信息
  1589. const getDateList = async () => {
  1590. loading.value = true
  1591. let res = await customApi.CustomDropdown({ platform: "" })
  1592. if (res.code == Code.StatusOK) {
  1593. loginOptions.value = res.data.map(item => ({
  1594. ...item,
  1595. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1596. }))
  1597. const pages = getCurrentPages()
  1598. const route = pages[pages.length - 1].$page?.options || {}
  1599. if (route.login) {
  1600. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1601. loginValue.value = found.login
  1602. loginValueDoc.value = found.label
  1603. step2.value = true
  1604. }
  1605. } else {
  1606. uni.showToast({ title: res.msg, icon: 'none' })
  1607. }
  1608. loading.value = false
  1609. }
  1610. //获取入金通道
  1611. const getDepositList = async () => {
  1612. pictLoading.value = true
  1613. tableData.International_Transfer = []
  1614. tableData.China_UnionPay = []
  1615. tableData.Digital_Currency = []
  1616. tableData.Electronic_Wallet = []
  1617. tableData.Ucard_Wallet = []
  1618. let res = await financialApi.RemittanceChannelList({})
  1619. if (res.code == Code.StatusOK) {
  1620. res.data.forEach(item => {
  1621. if (item.type == 1) tableData.International_Transfer.push(item), tableData1.International_Transfer.push(item)
  1622. if (item.type == 2) tableData.China_UnionPay.push(item), tableData1.China_UnionPay.push(item)
  1623. if (item.type == 3) tableData.Digital_Currency.push(item), tableData1.Digital_Currency.push(item)
  1624. if (item.type == 4) tableData.Electronic_Wallet.push(item), tableData1.Electronic_Wallet.push(item)
  1625. if (item.type == 5) tableData.Ucard_Wallet.push(item), tableData1.Ucard_Wallet.push(item)
  1626. })
  1627. pictLoading.value = false
  1628. } else {
  1629. uni.showToast({ title: res.msg, icon: 'none' })
  1630. pictLoading.value = false
  1631. }
  1632. }
  1633. //获取银行列表
  1634. const getBankList = async (row) => {
  1635. let res = await financialApi.BankList({ channelCode: row.code })
  1636. try {
  1637. if (res.code == Code.StatusOK) {
  1638. let bank = res.data
  1639. let data = []
  1640. bank.forEach(j => {
  1641. if (!j.minAmount && j.minAmount != 0) j.minAmount = row.minAmount
  1642. if (!j.maxAmount && j.maxAmount != 0) j.maxAmount = row.maxAmount
  1643. j.bankValid = row.bankValid
  1644. j.requestUrl = row.requestUrl
  1645. data.push(j)
  1646. })
  1647. bankDate.value = data
  1648. } else {
  1649. uni.showToast({ title: res.msg, icon: 'none' })
  1650. }
  1651. } catch (error) {
  1652. uni.showToast({ title: error.msg, icon: 'none' })
  1653. }
  1654. }
  1655. //获取20赠金活动信息
  1656. const getCheckExistSuccess = async () => {
  1657. let res = await financialApi.depositCheckExistSuccess({})
  1658. if (res.code == Code.StatusOK) {
  1659. CheckExistSuccess.value = res.data
  1660. } else {
  1661. uni.showToast({ title: res.msg, icon: 'none' })
  1662. }
  1663. }
  1664. //20赠金是否到期-4月30号23:59:59的时候关闭申请
  1665. const is20Open = () => {
  1666. let endTime1 = "2023/04/30 23:59:59"
  1667. let timezone = 2
  1668. let offset_GMT = new Date().getTimezoneOffset()
  1669. let nowDate = new Date().getTime()
  1670. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1671. let end = new Date(endTime1).getTime()
  1672. if (now > end) anshiClose.value = false
  1673. }
  1674. //限时活动
  1675. const ActivityRequiteInfo = async () => {
  1676. let res = await activityApi.ActivityRequiteInfo({})
  1677. if (res.code == Code.StatusOK) {
  1678. limitedStatus.value = res.data
  1679. } else {
  1680. uni.showToast({ title: res.msg, icon: 'none' })
  1681. }
  1682. }
  1683. //2023年中赠金活动数据-10
  1684. const Activity24nianzhongInfo = async () => {
  1685. let res = await activityApi.Activity23nianzhongInfo({})
  1686. if (res.code == Code.StatusOK) {
  1687. Object.assign(tableData4, res.data)
  1688. // const Data4 = {
  1689. // "activityEndTime": null,
  1690. // "activityStartTime": null,
  1691. // "applicationEndTime": null,
  1692. // "applicationStartTime": null,
  1693. // "loginTypes": [5, 6],
  1694. // "show": 1,
  1695. // "useApply": 1
  1696. // };
  1697. // Object.assign(tableData4, Data4)
  1698. // tableData4Flag.value = tableData4.show == 1 && tableData4.useApply == 1
  1699. } else {
  1700. uni.showToast({ title: res.msg, icon: 'none' })
  1701. }
  1702. }
  1703. //2023年中赠金活动数据-20
  1704. const Activity24nianzhongTwoInfo = async () => {
  1705. let res = await activityApi.Activity23nianzhongTwoInfo({})
  1706. if (res.code == Code.StatusOK) {
  1707. Object.assign(tableData4Two, res.data)
  1708. // const Data4 = {
  1709. // "activityEndTime": null,
  1710. // "activityStartTime": null,
  1711. // "applicationEndTime": null,
  1712. // "applicationStartTime": null,
  1713. // "loginTypes": [5, 6],
  1714. // "show": 1,
  1715. // "useApply": 1
  1716. // };
  1717. // Object.assign(tableData4Two, Data4)
  1718. // tableData4Flag.value = tableData4Two.show == 1 && tableData4Two.useApply == 1
  1719. } else {
  1720. uni.showToast({ title: res.msg, icon: 'none' })
  1721. }
  1722. }
  1723. //2023年中赠金活动权限
  1724. const get23nianzhongTwoLogin = async (newVal) => {
  1725. let res = await activityApi.Activity23nianzhongTwoLogin({ login: newVal })
  1726. if (res.code == Code.StatusOK) {
  1727. Object.assign(tableData4Two, res.data)
  1728. tableData4TwoFlag.value = tableData4Two.show == 1
  1729. } else {
  1730. uni.showToast({ title: res.msg, icon: 'none' })
  1731. }
  1732. }
  1733. const getActivityExtensionGiveLogin = async (newVal) => {
  1734. let res = await activityApi.ActivityExtensionGiveLogin({ login: newVal })
  1735. if (res.code == Code.StatusOK) {
  1736. Object.assign(tableDataNewList, res.data)
  1737. tableDataNewListFlag.value = tableDataNewList.show == 1
  1738. } else {
  1739. uni.showToast({ title: res.msg, icon: 'none' })
  1740. }
  1741. }
  1742. const getActivityExtensionGiveLoginJoin = async (newVal) => {
  1743. let res = await activityApi.ActivityExtensionGiveLoginJoin({ login: newVal })
  1744. if (res.code == Code.StatusOK) {
  1745. giveLoginJoin.value = res.data
  1746. } else {
  1747. uni.showToast({ title: res.msg, icon: 'none' })
  1748. giveLoginJoin.value = ""
  1749. }
  1750. }
  1751. //24新年庆典 开始
  1752. const isNewYear24Open = () => {
  1753. let endTime1 = "2025/3/31 23:59:59"
  1754. let startTime1 = "2025/1/1 00:00:00"
  1755. let timezone = 2
  1756. let offset_GMT = new Date().getTimezoneOffset()
  1757. let nowDate = new Date().getTime()
  1758. let now = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000).getTime()
  1759. let end = new Date(endTime1).getTime()
  1760. let start = new Date(startTime1).getTime()
  1761. if (now < end && start < now) ActivityNewYear24()
  1762. }
  1763. const ActivityNewYear24 = async () => {
  1764. let res = await activityApi.ActivityNewYear24({})
  1765. if (res.code == Code.StatusOK) {
  1766. tableDataNewYear24.value = res.data
  1767. if (typeof tableDataNewYear24.value == "object") toIncome()
  1768. } else {
  1769. uni.showToast({ title: res.msg, icon: 'none' })
  1770. }
  1771. }
  1772. const toIncome = () => {
  1773. let balance = Number(tableDataNewYear24.value.balance) || 0
  1774. tableDataNewYear24.value.details.forEach((item, index) => {
  1775. if (balance > item.min && balance <= item.max) {
  1776. NewYear24Data.rate = item.rate
  1777. NewYear24Data.index = item.index
  1778. NewYear24Data.balance = (Number(tableDataNewYear24.value.details[index + 1].min) - balance).toFixed(2)
  1779. NewYear24Data.income = ((Number(tableDataNewYear24.value.details[index + 1].min) * Number(tableDataNewYear24.value.details[index + 1].rate) / 100 / 365) * 365).toFixed(2)
  1780. tableDataNewYear24Flag.value = true
  1781. } else if (balance > item.min && balance >= item.max && item.max == 0) {
  1782. tableDataNewYear24Flag.value = false
  1783. }
  1784. })
  1785. }
  1786. //24新年庆典 结束
  1787. // 新改内容
  1788. // userStore.paymentChannel.value
  1789. // userStore.channelList.value
  1790. const channel = computed(() => userStore.paymentChannel)
  1791. const channelList = computed(() => userStore.channelList)
  1792. const channelListOptions = ref([])
  1793. const channelId = ref(null)
  1794. const loading = ref(false)
  1795. const setAllAmount = () => {
  1796. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  1797. params.amount = parseInt(found.balance)
  1798. validateAmount()
  1799. }
  1800. const allTabs = computed(() => {
  1801. return {
  1802. "Digital_Currency": t('Custom.Deposit.Channel3'),
  1803. "China_UnionPay": t('Custom.Deposit.Channel2'),
  1804. "Electronic_Wallet": t('Custom.Deposit.Channel4'),
  1805. "International_Transfer": t('Custom.Deposit.Channel1'),
  1806. "Ucard_Wallet": t('card.title'),
  1807. }
  1808. })
  1809. function formatChannels(data) {
  1810. const result = []
  1811. // 遍历每个分类
  1812. for (const key in data) {
  1813. const list = data[key] || []
  1814. // 插入分类标题(禁用项)
  1815. if (list.length) {
  1816. result.push({
  1817. text: allTabs.value[key],
  1818. value: key,
  1819. disable: true
  1820. })
  1821. }
  1822. list.forEach(item => {
  1823. result.push({
  1824. ...item,
  1825. text: item.name,
  1826. value: item.code
  1827. })
  1828. })
  1829. }
  1830. return result
  1831. }
  1832. // 生命周期
  1833. onMounted(() => {
  1834. if (channelList.value) {
  1835. channelListOptions.value = formatChannels(channelList.value)
  1836. }
  1837. channelId.value = channel.value
  1838. getDateList()
  1839. isStep3Open()
  1840. setTimeout(() => {
  1841. if (country.value === "VN") dialogVietnamNotice.value = true
  1842. is20Open()
  1843. // Activity24nianzhongInfo();
  1844. // Activity24nianzhongTwoInfo();
  1845. // dealResult({ "type": 7, "result": "/krad/pin?serial=123123" })
  1846. isNewYear24Open()
  1847. ActivityRequiteInfo()
  1848. }, 800);
  1849. })
  1850. onUnmounted(() => {
  1851. userStore.savePaymentChannel('')
  1852. userStore.saveChannelList('')
  1853. })
  1854. watch(channelId, async (newVal) => {
  1855. if (newVal) {
  1856. showTable()
  1857. let row = channelListOptions.value.find(item => item.code == newVal)
  1858. isShowStep3(row)
  1859. }
  1860. });
  1861. watch(isStep3, async (newVal) => {
  1862. if (newVal) {
  1863. await nextTick();
  1864. formRef.value?.clearValidate();
  1865. resetForm();
  1866. await nextTick();
  1867. formRef.value?.clearValidate();
  1868. }
  1869. });
  1870. // Watch
  1871. watch(loginValue, (login) => {
  1872. if (login) {
  1873. step3.value = true
  1874. get23nianzhongTwoLogin(login);
  1875. getActivityExtensionGiveLogin(login);
  1876. getActivityExtensionGiveLoginJoin(login);
  1877. }
  1878. })
  1879. watch(() => params.amount, (newVal) => {
  1880. if (newVal && channelData.rate) {
  1881. params.amount1 = (newVal * channelData.rate).toFixed(2)
  1882. }
  1883. })
  1884. watch(() => imageUrl, (newVal) => {
  1885. console.log(newVal, 12);
  1886. }, { deep: true })
  1887. watch(() => params.agree3, (newVal) => {
  1888. if (newVal) {
  1889. params.agree2 = false
  1890. params.agree4 = false
  1891. params.agree5 = false
  1892. params.agree6 = false
  1893. }
  1894. })
  1895. watch(() => params.agree2, (newVal) => {
  1896. if (newVal) {
  1897. params.agree3 = false
  1898. params.agree4 = false
  1899. params.agree5 = false
  1900. params.agree6 = false
  1901. }
  1902. })
  1903. watch(() => params.agree4, (newVal) => {
  1904. if (newVal) {
  1905. params.agree3 = false
  1906. params.agree2 = false
  1907. params.agree5 = false
  1908. params.agree6 = false
  1909. }
  1910. })
  1911. watch(() => params.agree5, (newVal) => {
  1912. if (newVal) {
  1913. params.agree3 = false
  1914. params.agree2 = false
  1915. params.agree4 = false
  1916. params.agree6 = false
  1917. }
  1918. })
  1919. watch(() => params.agree6, (newVal) => {
  1920. if (newVal) {
  1921. params.agree3 = false
  1922. params.agree2 = false
  1923. params.agree4 = false
  1924. params.agree5 = false
  1925. if (giveLoginJoin.value.flag == false) {
  1926. let tips = ""
  1927. if (giveLoginJoin.value.promptType == 1) tips = t("surplusList.item10")
  1928. else tips = t("surplusList.item11")
  1929. if (giveLoginJoin.value.activityCategory == 1) {
  1930. $pigeon.MessageConfirm(
  1931. tips,
  1932. t("Msg.SystemPrompt"),
  1933. t("surplusList.item12"),
  1934. t("Home.msg.item3"),
  1935. () => {
  1936. $pigeon.MessageConfirm(
  1937. t("surplusList.item13"),
  1938. t("Msg.SystemPrompt"),
  1939. t("Btn.Confirm"),
  1940. t("Btn.Cancel"),
  1941. async () => {
  1942. try {
  1943. const res = await activityApi.ActivityGiveCancel({ login: $route.query.login })
  1944. if (res.code == Code.StatusOK) $pigeon.MessageOK(res.msg || t("Msg.Success"))
  1945. else uni.showToast({ title: res.msg, icon: 'none' })
  1946. } catch (error) {
  1947. $pigeon.MessageError(t("Msg.Fail"))
  1948. }
  1949. },
  1950. () => { params.agree6 = false }
  1951. )
  1952. },
  1953. () => { },
  1954. { showCancelButton: true }
  1955. )
  1956. } else if (giveLoginJoin.value.activityCategory == 2) {
  1957. $pigeon.MessageConfirm(
  1958. tips,
  1959. t("Msg.SystemPrompt"),
  1960. "跳转",
  1961. t("Btn.Cancel"),
  1962. () => {
  1963. $pigeon.MessageConfirm(
  1964. "是否跳转到对应活动取消",
  1965. t("Msg.SystemPrompt"),
  1966. t("Btn.Confirm"),
  1967. t("Btn.Cancel"),
  1968. () => {
  1969. uni.navigateTo({ url: "/pages/customer/monthly/list" })
  1970. },
  1971. () => { params.agree6 = false }
  1972. )
  1973. },
  1974. () => { },
  1975. { showCancelButton: false }
  1976. )
  1977. } else {
  1978. $pigeon.MessageConfirm(
  1979. tips,
  1980. t("Msg.SystemPrompt"),
  1981. t("Btn.Confirm"),
  1982. t("Btn.Cancel")
  1983. )
  1984. }
  1985. }
  1986. }
  1987. })
  1988. </script>
  1989. <style lang="scss" scoped>
  1990. @import "@/uni.scss";
  1991. .custom-deposit {
  1992. width: px2rpx(566);
  1993. flex-shrink: 0;
  1994. .crm-title-box {
  1995. margin-bottom: px2rpx(20);
  1996. .tit {
  1997. font-size: px2rpx(20);
  1998. font-weight: 700;
  1999. color: var(--color-navy-900);
  2000. }
  2001. }
  2002. .box {
  2003. margin-bottom: px2rpx(20);
  2004. .b-card {
  2005. // background: #fff;
  2006. // border-radius: px2rpx(12);
  2007. // padding: px2rpx(20);
  2008. // box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  2009. .card-top {
  2010. .tit {
  2011. font-size: px2rpx(16);
  2012. font-weight: 600;
  2013. margin-bottom: px2rpx(16);
  2014. display: flex;
  2015. align-items: center;
  2016. color: var(--color-navy-900);
  2017. position: relative;
  2018. padding-left: 20px;
  2019. &:after {
  2020. content: '';
  2021. position: absolute;
  2022. left: 0;
  2023. top: 50%;
  2024. transform: translateY(-50%);
  2025. width: 0;
  2026. height: 0;
  2027. border-top: 6px solid transparent;
  2028. border-bottom: 6px solid transparent;
  2029. border-left: 8px solid currentColor;
  2030. }
  2031. }
  2032. }
  2033. .channelType {
  2034. font-size: px2rpx(15);
  2035. font-weight: 600;
  2036. margin: px2rpx(24) 0 px2rpx(12);
  2037. color: var(--color-navy-700);
  2038. padding-left: px2rpx(8);
  2039. border-left: px2rpx(4) solid var(--color-primary);
  2040. }
  2041. }
  2042. }
  2043. .reselect-btn {
  2044. margin-top: px2rpx(20);
  2045. display: flex;
  2046. justify-content: flex-end;
  2047. .reselect {
  2048. background-color: var(--color-zinc-100);
  2049. color: var(--color-navy-700);
  2050. border: none;
  2051. font-size: px2rpx(14);
  2052. padding: px2rpx(8) px2rpx(20);
  2053. border-radius: px2rpx(8);
  2054. &:active {
  2055. background-color: var(--color-zinc-200);
  2056. }
  2057. }
  2058. }
  2059. .s-btn[type="primary"] {
  2060. width: 100%;
  2061. height: px2rpx(48);
  2062. background-color: #cf1322;
  2063. color: #fff;
  2064. border-radius: px2rpx(12);
  2065. font-size: px2rpx(16);
  2066. font-weight: 600;
  2067. display: flex;
  2068. align-items: center;
  2069. justify-content: center;
  2070. border: none;
  2071. margin-top: px2rpx(30);
  2072. transition: all 0.2s;
  2073. &:active {
  2074. transform: scale(0.98);
  2075. background-color: #cf1322;
  2076. }
  2077. }
  2078. .add-back {
  2079. display: flex;
  2080. justify-content: space-between;
  2081. align-items: center;
  2082. margin-bottom: px2rpx(12);
  2083. padding: px2rpx(12) px2rpx(16);
  2084. background: var(--color-zinc-100);
  2085. border-radius: px2rpx(8);
  2086. text {
  2087. font-size: px2rpx(14);
  2088. color: var(--color-navy-700);
  2089. font-weight: 500;
  2090. }
  2091. .add-btn {
  2092. color: var(--color-primary);
  2093. font-weight: 600;
  2094. text-decoration: underline;
  2095. &:active {
  2096. opacity: 0.7;
  2097. }
  2098. }
  2099. }
  2100. .wire-transfer-account {
  2101. background: var(--color-zinc-50);
  2102. padding: px2rpx(16);
  2103. border-radius: px2rpx(12);
  2104. margin: px2rpx(16) 0;
  2105. .row {
  2106. display: flex;
  2107. margin-bottom: px2rpx(12);
  2108. font-size: px2rpx(14);
  2109. &:last-child {
  2110. margin-bottom: 0;
  2111. }
  2112. .label {
  2113. width: px2rpx(120);
  2114. color: var(--color-zinc-500);
  2115. }
  2116. .content {
  2117. flex: 1;
  2118. color: var(--color-navy-900);
  2119. font-weight: 500;
  2120. }
  2121. .SpecialColor {
  2122. color: var(--color-error);
  2123. }
  2124. }
  2125. }
  2126. .activities {
  2127. margin: px2rpx(24) 0;
  2128. .checkbox {
  2129. display: flex;
  2130. align-items: flex-start;
  2131. gap: px2rpx(8);
  2132. margin-bottom: px2rpx(12);
  2133. :deep(uni-checkbox .uni-checkbox-input) {
  2134. border-radius: px2rpx(4);
  2135. width: px2rpx(18);
  2136. height: px2rpx(18);
  2137. }
  2138. text {
  2139. font-size: px2rpx(14);
  2140. color: var(--color-navy-700);
  2141. font-weight: 500;
  2142. line-height: 1.5;
  2143. }
  2144. }
  2145. .clause-text {
  2146. font-size: px2rpx(13);
  2147. color: var(--color-zinc-500);
  2148. line-height: 1.6;
  2149. padding-left: px2rpx(26);
  2150. .clause {
  2151. color: var(--color-primary);
  2152. text-decoration: underline;
  2153. }
  2154. }
  2155. }
  2156. .step3-attention {
  2157. // background: var(--color-error-50, #fff1f0);
  2158. border-radius: px2rpx(12);
  2159. margin-bottom: px2rpx(20);
  2160. .tips {
  2161. line-height: 1.8;
  2162. font-size: px2rpx(12);
  2163. color: #909399;
  2164. background-color: #f9f9f9;
  2165. padding: px2rpx(12);
  2166. border-radius: px2rpx(4);
  2167. border-left: px2rpx(2) solid #cf1322;
  2168. .title {
  2169. font-weight: 600;
  2170. margin-bottom: px2rpx(6);
  2171. color: #606266;
  2172. }
  2173. }
  2174. .attention {
  2175. font-size: px2rpx(14);
  2176. // color: var(--color-error-600, #cf1322);
  2177. line-height: 1.6;
  2178. }
  2179. .btn-bottom {
  2180. margin-top: px2rpx(20);
  2181. display: flex;
  2182. justify-content: center;
  2183. .btn {
  2184. background: var(--color-error-600, #cf1322);
  2185. color: #fff;
  2186. padding: px2rpx(10) px2rpx(48);
  2187. border-radius: px2rpx(24);
  2188. font-size: px2rpx(15);
  2189. font-weight: 700;
  2190. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  2191. transition: all 0.2s;
  2192. &:active {
  2193. transform: scale(0.96);
  2194. opacity: 0.8;
  2195. }
  2196. }
  2197. }
  2198. }
  2199. .upload-box {
  2200. display: flex;
  2201. align-items: center;
  2202. gap: px2rpx(12);
  2203. .btn-upload {
  2204. background: var(--color-zinc-100);
  2205. border: px2rpx(1) dashed var(--color-zinc-300);
  2206. border-radius: px2rpx(8);
  2207. height: px2rpx(44);
  2208. font-size: px2rpx(14);
  2209. color: var(--color-zinc-600);
  2210. display: flex;
  2211. align-items: center;
  2212. justify-content: center;
  2213. padding: 0 px2rpx(20);
  2214. }
  2215. .img-preview {
  2216. width: px2rpx(44);
  2217. height: px2rpx(44);
  2218. border-radius: px2rpx(4);
  2219. object-fit: cover;
  2220. }
  2221. }
  2222. .label-with-icon {
  2223. font-size: px2rpx(14);
  2224. color: #606266;
  2225. box-sizing: border-box;
  2226. display: flex;
  2227. align-items: center;
  2228. padding: 0 0 8px;
  2229. height: px2rpx(36);
  2230. line-height: 1.5715;
  2231. text-align: left;
  2232. /* #ifndef APP-NVUE */
  2233. white-space: initial;
  2234. /* #endif */
  2235. .help-icon {
  2236. margin-left: px2rpx(8);
  2237. width: px2rpx(16);
  2238. height: px2rpx(16);
  2239. background: var(--color-zinc-200);
  2240. border-radius: 50%;
  2241. display: flex;
  2242. align-items: center;
  2243. justify-content: center;
  2244. font-size: px2rpx(12);
  2245. color: var(--color-zinc-600);
  2246. cursor: pointer;
  2247. }
  2248. }
  2249. .tooltip-content {
  2250. :deep(.uni-tooltip-popup) {
  2251. background-color: #fff !important;
  2252. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !important;
  2253. width: px2rpx(300) !important;
  2254. color: var(--color-zinc-500);
  2255. line-height: 1.6;
  2256. }
  2257. }
  2258. .error {
  2259. color: var(--color-error);
  2260. font-size: px2rpx(12);
  2261. margin-top: px2rpx(4);
  2262. display: block;
  2263. }
  2264. :deep(.base-info-form) {
  2265. .uni-row1 {
  2266. .uni-col {
  2267. padding: 0 px2rpx(10) !important;
  2268. }
  2269. .uni-forms-item {
  2270. min-height: px2rpx(79);
  2271. margin-bottom: px2rpx(10);
  2272. position: relative;
  2273. }
  2274. .uni-easyinput__content-input {
  2275. height: px2rpx(35) !important;
  2276. }
  2277. }
  2278. }
  2279. .popup-content {
  2280. background: #fff;
  2281. border-radius: px2rpx(20);
  2282. padding: px2rpx(24);
  2283. width: px2rpx(320);
  2284. text-align: center;
  2285. .popup-title {
  2286. font-size: px2rpx(18);
  2287. font-weight: 700;
  2288. margin-bottom: px2rpx(20);
  2289. color: var(--color-navy-900);
  2290. display: block;
  2291. }
  2292. .popup-text {
  2293. font-size: px2rpx(14);
  2294. line-height: 1.6;
  2295. color: var(--color-zinc-600);
  2296. margin-bottom: px2rpx(20);
  2297. display: block;
  2298. }
  2299. .popup-form {
  2300. background: var(--color-zinc-50);
  2301. border-radius: px2rpx(12);
  2302. padding: px2rpx(16);
  2303. margin-bottom: px2rpx(24);
  2304. text-align: left;
  2305. .popup-row {
  2306. display: flex;
  2307. justify-content: space-between;
  2308. margin-bottom: px2rpx(12);
  2309. font-size: px2rpx(14);
  2310. &:last-child {
  2311. margin-bottom: 0;
  2312. }
  2313. .label {
  2314. color: var(--color-zinc-500);
  2315. font-weight: 500;
  2316. }
  2317. text:not(.label) {
  2318. color: var(--color-navy-900);
  2319. font-weight: 500;
  2320. }
  2321. .small-input {
  2322. width: px2rpx(60);
  2323. background: #fff;
  2324. border: px2rpx(1) solid var(--color-zinc-200);
  2325. border-radius: px2rpx(4);
  2326. padding: 0 px2rpx(4);
  2327. height: px2rpx(24);
  2328. font-size: px2rpx(12);
  2329. }
  2330. }
  2331. }
  2332. .popup-buttons {
  2333. display: flex;
  2334. gap: px2rpx(12);
  2335. button {
  2336. flex: 1;
  2337. height: px2rpx(44);
  2338. border-radius: px2rpx(10);
  2339. font-size: px2rpx(15);
  2340. font-weight: 600;
  2341. display: flex;
  2342. align-items: center;
  2343. justify-content: center;
  2344. border: none;
  2345. &[type="primary"] {
  2346. background-color: #cf1322;
  2347. color: #fff;
  2348. }
  2349. &:not([type="primary"]) {
  2350. background: var(--color-zinc-100);
  2351. color: var(--color-zinc-600);
  2352. }
  2353. }
  2354. }
  2355. .result-icon {
  2356. display: flex;
  2357. justify-content: center;
  2358. margin-bottom: px2rpx(16);
  2359. .iconfont {
  2360. font-size: px2rpx(48);
  2361. &.iconchenggong {
  2362. color: #52c41a;
  2363. }
  2364. &.iconjingshi {
  2365. color: #faad14;
  2366. }
  2367. &.icondengdai {
  2368. color: var(--color-primary);
  2369. animation: rotate 2s linear infinite;
  2370. }
  2371. }
  2372. }
  2373. }
  2374. @keyframes rotate {
  2375. from {
  2376. transform: rotate(0deg);
  2377. }
  2378. to {
  2379. transform: rotate(360deg);
  2380. }
  2381. }
  2382. .avatar-uploader {
  2383. border: 1px dashed;
  2384. width: px2rpx(200);
  2385. height: px2rpx(150);
  2386. display: flex;
  2387. flex-direction: column;
  2388. align-items: center;
  2389. justify-content: center;
  2390. /*float: left;*/
  2391. //overflow: hidden;
  2392. }
  2393. :deep(.files-button) {
  2394. .file-item {
  2395. .icon,
  2396. .avatar {
  2397. width: px2rpx(200);
  2398. height: px2rpx(150);
  2399. }
  2400. }
  2401. }
  2402. }
  2403. .amount-box {
  2404. display: flex;
  2405. align-items: center;
  2406. gap: px2rpx(12);
  2407. .amount-input {
  2408. flex: 1;
  2409. }
  2410. .btn {
  2411. display: flex;
  2412. align-items: center;
  2413. justify-content: center;
  2414. font-size: px2rpx(14);
  2415. color: var(--color-zinc-600);
  2416. margin-bottom: px2rpx(12);
  2417. height: px2rpx(35);
  2418. background-color: #cf1322;
  2419. color: #fff;
  2420. border-radius: px2rpx(4);
  2421. font-weight: 600;
  2422. display: flex;
  2423. align-items: center;
  2424. justify-content: center;
  2425. border: none;
  2426. padding: 0 px2rpx(20);
  2427. margin-top: px2rpx(21);
  2428. cursor: pointer;
  2429. }
  2430. }
  2431. .custom-deposit-container {
  2432. width: 100%;
  2433. display: flex;
  2434. gap: px2rpx(60);
  2435. justify-content: space-between;
  2436. }
  2437. @media (max-width: 992px) {
  2438. .custom-deposit {
  2439. width: 100%;
  2440. margin-top: px2rpx(20);
  2441. }
  2442. .custom-deposit-container {
  2443. display: flex;
  2444. gap: px2rpx(30);
  2445. flex-wrap: wrap;
  2446. }
  2447. }
  2448. </style>