deposit.vue 99 KB

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