withdrawal.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Custom.Withdraw.Title')" />
  4. <view class="custom-withdraw">
  5. <!-- 步骤1:选择账户 -->
  6. <view class="box box-step1">
  7. <view class="b-card">
  8. <view class="card-top">
  9. <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title11') }}</text>
  10. <view class="base-info-form">
  11. <view class="uni-row2">
  12. <cwg-combox :clearable="false" v-model:value="loginValue" :options="loginComboxOptions"
  13. :placeholder="t('placeholder.choose')" @change="onAccountChange" />
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 步骤2:支付通道列表 -->
  20. <view class="box box-step2" v-if="step2">
  21. <view class="b-card">
  22. <view class="card-top">
  23. <text class="tit"><text class="iconfont icon-caret-right"></text>{{ t('Custom.Deposit.Title22') }}</text>
  24. <view v-for="(group, groupKey) in tableData" :key="groupKey">
  25. <!-- 通道分组标题 -->
  26. <view class="channelType" v-if="group.length" v-t="groupTitleMap[groupKey]" />
  27. <PaymentMethodsList :list="group" @select="isShowStep3" />
  28. </view>
  29. <view v-if="step3" class="reselect-btn">
  30. <button class="s-btn reselect" type="primary" @click="showTable">{{ t('Custom.Deposit.Reselect')
  31. }}</button>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 步骤3:填写出金信息 -->
  37. <view class="box box-step3" v-if="step3">
  38. <view class="b-card">
  39. <view class="card-top">
  40. <!-- 注意事项 -->
  41. <view v-if="!isStep3" class="step3-attention">
  42. {{ introduce.value }}
  43. <view class="tips" v-if="(introduce.introduce || introduce.enIntroduce)">
  44. <view>
  45. <rich-text class="attention" :nodes="isZh ? introduce.introduce : introduce.enIntroduce" />
  46. </view>
  47. </view>
  48. <view class="btn-bottom">
  49. <text class="btn crm-cursor" @click="isStep3 = true">{{ t('Btn.Confirm') }}</text>
  50. </view>
  51. </view>
  52. <!-- 表单 -->
  53. <uni-forms ref="formRef" :model="form" :rules="rules" labelWidth="200" label-position="top" v-show="isStep3"
  54. class="base-info-form" validate-trigger="submit">
  55. <uni-row class="demo-uni-row uni-row1">
  56. <!-- 银行选择(针对有银行列表的通道) -->
  57. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="bankDate.length">
  58. <uni-forms-item :label="t('Custom.Withdraw.Title5')" name="bankCode">
  59. <cwg-combox :clearable="false" v-model:value="form.bankCode" :options="bankOptions"
  60. :placeholder="t('placeholder.choose')" @change="selectCode" />
  61. </uni-forms-item>
  62. </uni-col>
  63. <!-- 电子钱包地址输入 -->
  64. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"
  65. v-if="['CHANNEL_TYPE_WALLET', 'CHANNEL_TYPE_ALI_WALLET'].includes(channelData.type)">
  66. <uni-forms-item :label="getWalletLabel" name="address">
  67. <uni-easyinput :clearable="false" v-model="form.address" :placeholder="t('placeholder.input')" />
  68. </uni-forms-item>
  69. </uni-col>
  70. <!-- 数字货币选择(从已保存地址中选择) -->
  71. <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" v-if="channelData.type === 'DIGITAL_CURRENCY'">
  72. <view class="add-back">
  73. <text>{{ t('blockchain.item10') }}</text>
  74. <text class="add-btn crm-cursor" @click="openAddBankCard('add_bankBlockchain')">{{
  75. t('Custom.Withdraw.addBank1') }}</text>
  76. </view>
  77. <uni-forms-item :label="t('Custom.Withdraw.Title6')">
  78. <cwg-combox :clearable="false" v-model:value="myId" :options="digitalOptions"
  79. :placeholder="t('placeholder.choose')" @change="onDigitalCurrencyChange"
  80. :disabled="!ruleForm.bankBlockchain.length" />
  81. </uni-forms-item>
  82. <uni-row>
  83. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
  84. <uni-forms-item :label="t('blockchain.item3')">
  85. <uni-easyinput disabled v-model="form.addressName" />
  86. </uni-forms-item>
  87. </uni-col>
  88. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
  89. <uni-forms-item :label="t('blockchain.item4')">
  90. <uni-easyinput disabled v-model="form.address" />
  91. </uni-forms-item>
  92. </uni-col>
  93. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.addressProve">
  94. <uni-forms-item :label="t('blockchain.item5')">
  95. <view class="proof">
  96. <template v-if="form.addressProve && (form.addressProve.slice(-3).toLowerCase() === 'pdf')">
  97. <a :href="imgUrl + form.addressProve" target="_blank" class="state crm_state_blue">PDF</a>
  98. </template>
  99. <image v-else :src="imgUrl + form.addressProve" mode="aspectFit"
  100. style="width: 100rpx; height: 100rpx;" @click="previewImage(imgUrl + form.addressProve)" />
  101. </view>
  102. </uni-forms-item>
  103. </uni-col>
  104. </uni-row>
  105. <text class="tit"><text class="iconfont iconi"></text>{{ t('Custom.Deposit.Des') }}</text>
  106. </uni-col>
  107. <!-- 银行卡/信用卡选择 -->
  108. <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"
  109. v-if="['BANK', 'BANK_TELEGRAPHIC', 'CHANNEL_TYPE_CARD'].includes(channelData.type)">
  110. <view class="add-back" v-if="channelData.type === 'BANK_TELEGRAPHIC'">
  111. <text>{{ t('Custom.Withdraw.addWire') }}</text>
  112. <text class="add-btn crm-cursor" @click="openAddBankCard('add_wireTransfer')">{{
  113. t('Custom.Withdraw.addBank1') }}</text>
  114. </view>
  115. <view class="add-back" v-else-if="channelData.type === 'BANK'">
  116. <text>{{ t('Custom.Withdraw.addBank') }}</text>
  117. <text class="add-btn crm-cursor" @click="openAddBankCard('add_bankCard')">{{
  118. t('Custom.Withdraw.addBank1')
  119. }}</text>
  120. </view>
  121. <view class="add-back" v-else-if="channelData.type === 'CHANNEL_TYPE_CARD'">
  122. <text>{{ t('PersonalManagement.Label.addCreditCard') }}</text>
  123. <text class="add-btn crm-cursor" @click="openAddBankCard('add_CreditCard')">{{
  124. t('Custom.Withdraw.addBank1') }}</text>
  125. </view>
  126. <uni-forms-item :label="t('Custom.Withdraw.Title4')">
  127. <cwg-combox :clearable="false" v-model:value="myId" :options="bankCardOptions" @change="chooseBank"
  128. :placeholder="t('placeholder.choose')" />
  129. </uni-forms-item>
  130. <!-- 通用银行信息展示 -->
  131. <uni-row>
  132. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.bankUname">
  133. <uni-forms-item :label="t('Custom.Withdraw.UserName')">
  134. <uni-easyinput disabled v-model="form.bankUname" />
  135. </uni-forms-item>
  136. </uni-col>
  137. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.bankCardNum">
  138. <uni-forms-item :label="t('Custom.Withdraw.BankCardNum')">
  139. <uni-easyinput disabled v-model="form.bankCardNum" />
  140. </uni-forms-item>
  141. </uni-col>
  142. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.bankName">
  143. <uni-forms-item :label="t('Custom.Withdraw.BankName')">
  144. <uni-easyinput disabled v-model="form.bankName" />
  145. </uni-forms-item>
  146. </uni-col>
  147. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.bankBranchName">
  148. <uni-forms-item :label="t('Custom.Withdraw.bankBranchName')">
  149. <uni-easyinput disabled v-model="form.bankBranchName" />
  150. </uni-forms-item>
  151. </uni-col>
  152. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.swiftCode">
  153. <uni-forms-item :label="t('Custom.Withdraw.swiftCode')">
  154. <uni-easyinput disabled v-model="form.swiftCode" />
  155. </uni-forms-item>
  156. </uni-col>
  157. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.customBankCode">
  158. <uni-forms-item :label="t('Custom.Withdraw.bankCode')" name="bankCode">
  159. <uni-easyinput disabled v-model="form.customBankCode" />
  160. </uni-forms-item>
  161. </uni-col>
  162. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="form.bankAddr">
  163. <uni-forms-item :label="t('Custom.Withdraw.bankAddr')">
  164. <uni-easyinput disabled v-model="form.bankAddr" />
  165. </uni-forms-item>
  166. </uni-col>
  167. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"
  168. v-if="channelData.type === 'BANK_TELEGRAPHIC' && form.agencyNo">
  169. <uni-forms-item label="Account Agency NO" name="agencyNo"
  170. v-if="channelData.code == 'PAY_RETAILER_REMIT_PAY_KEY_BRW'">
  171. <uni-easyinput v-model="form.agencyNo" />
  172. </uni-forms-item>
  173. <uni-forms-item label="Account Agency NO" v-else>
  174. <uni-easyinput v-model="form.agencyNo" />
  175. </uni-forms-item>
  176. </uni-col>
  177. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"
  178. v-if="channelData.type === 'BANK_TELEGRAPHIC' && form.cpf">
  179. <uni-forms-item label="CPF" name="cpf">
  180. <uni-easyinput v-model="form.cpf" />
  181. </uni-forms-item>
  182. </uni-col>
  183. </uni-row>
  184. </uni-col>
  185. <!-- 出金金额 -->
  186. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="channelData.type !== 'BANK_TELEGRAPHIC'">
  187. <uni-forms-item :label="t('Custom.Withdraw.Title3') + '(' + channelData.currency + ')'" name="amount"
  188. :error-message="amountErrorMessage">
  189. <uni-easyinput v-model="form.amount" type="number" @blur="validateAmount" />
  190. </uni-forms-item>
  191. </uni-col>
  192. <template v-else>
  193. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
  194. <uni-forms-item :label="t('Custom.Withdraw.CurrencyType')">
  195. <cwg-combox :clearable="false" v-model:value="form.currency"
  196. :options="[{ text: 'USD', value: 'USD' }]" @change="(val) => form.currency = val" />
  197. </uni-forms-item>
  198. </uni-col>
  199. <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
  200. <uni-forms-item :label="t('Custom.Withdraw.amount')" name="amount"
  201. :error-message="amountErrorMessage">
  202. <uni-easyinput v-model="form.amount" type="number" @blur="validateAmount" />
  203. </uni-forms-item>
  204. </uni-col>
  205. </template>
  206. </uni-row>
  207. <!-- 协议同意 -->
  208. <view class="agree">
  209. <uni-forms-item name="agree2">
  210. <checkbox-group :value="form.agree2 ? ['1'] : []" @change="onAgree2Change">
  211. <label class="checkbox">
  212. <checkbox value="1" />
  213. <text class="crm-cursor" style="text-decoration: underline;"
  214. @click.stop="dialogCheckTip = true">{{
  215. t('Custom.Withdraw.Des') }}</text>
  216. </label>
  217. </checkbox-group>
  218. </uni-forms-item>
  219. </view>
  220. <view class="agree" v-if="dialogTipsIsShow">
  221. <uni-forms-item name="agree3">
  222. <checkbox-group :value="form.agree3 ? ['1'] : []" @change="onAgree3Change">
  223. <label class="checkbox">
  224. <checkbox value="1" />
  225. <text>* {{ t('Custom.Withdraw.item1') }}<br>{{ t('Custom.Withdraw.item1_1') }}<br>{{
  226. t('Custom.Withdraw.item1_2') }}</text>
  227. </label>
  228. </checkbox-group>
  229. </uni-forms-item>
  230. </view>
  231. <button class="s-btn" type="primary" @click="openTips">{{ t('Btn.Submit') }}</button>
  232. </uni-forms>
  233. </view>
  234. </view>
  235. </view>
  236. <!-- 提示弹窗 -->
  237. <cwg-tips-popup v-model:visible="dialogTips" content="Custom.Withdraw.item2" @confirm="closeTipsConfirm" />
  238. <!-- 弹窗:确认信息 -->
  239. <cwg-check-confirm-popup v-model:visible="dialogCheckConfirm" :title="t('Home.page_customer.item3')"
  240. :channelData="channelData" :code="code" :selectCodes="selectCodes" :params="form" :FreeNumber="FreeNumber"
  241. :userName="userName" :dialogCheckConfirm_form="dialogCheckConfirm_form" :login="loginValue"
  242. :loginDoc="loginValueDoc" @confirm="submit" />
  243. <!-- 协议弹窗 -->
  244. <cwg-tips-popup v-model:visible="dialogCheckTip"
  245. :introduce="isZh.value ? introduce.introduce : introduce.enIntroduce" />
  246. <!-- 等待弹窗 -->
  247. <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
  248. <!-- 最后失败弹窗 -->
  249. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  250. <!-- 最后成功弹窗 -->
  251. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  252. <!-- kyc成功弹窗 -->
  253. <cwg-kyc-popup v-model:visible="dialogKyc" :qrText="text1" />
  254. <!--验证码-->
  255. <cwg-email-code-popup v-model:visible="dialogDealResult" @confirm="submitCode" :api="emailCodeApi" />
  256. <!-- 新增银行弹窗 -->
  257. <add-bank-dialog ref="addBankDialogRef" @success="addSuccess" />
  258. </view>
  259. </cwg-page-wrapper>
  260. </template>
  261. <script setup>
  262. import { ref, reactive, computed, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
  263. import { onLoad } from '@dcloudio/uni-app'
  264. import { showToast } from "@/utils/toast";
  265. import { isAfterJuly28 } from '@/utils/dateUtils'
  266. // import Drawer from "@/views/global/Drawer"
  267. import { customApi } from "@/service/custom"
  268. import { financialApi } from "@/service/financial"
  269. import { activityApi } from "@/service/activity"
  270. import Config from "@/config/index"
  271. import Decimal from "decimal.js"
  272. import QrCode from "@/components/QRCode.vue"
  273. // import logoImage from "@/assets/images/MTBG.jpg"
  274. import AddBankDialog from '@/components/AddBankDialog.vue';
  275. import PaymentMethodsList from './components/PaymentMethodsList.vue'
  276. import CwgCheckConfirmPopup from './components/WithdrawCheckConfirmPopup.vue'
  277. import CwgKycPopup from './components/KycPopup.vue'
  278. let { Code, Host80 } = Config
  279. import { useI18n } from 'vue-i18n'
  280. const { t, locale } = useI18n()
  281. const isZh = computed(() => ['cn', 'zhHant'].includes(locale.value))
  282. // 获取组件实例,用于访问全局挂载的属性和方法(替代 this)
  283. const { proxy } = getCurrentInstance()
  284. // -------------------- data --------------------
  285. const loginValue = ref("")
  286. const loginValueDoc = ref("")
  287. const hiddenSelect = ref(false)
  288. const metaInfo = ref(null)
  289. const text1 = ref("")
  290. // const logoImageRef = logoImage
  291. const dialogCheck1 = ref(false)
  292. const flag = ref(false)
  293. const RES = ref("")
  294. //银行
  295. const openType = ref("") //弹出类别
  296. const dialogInfoTradingAdd = ref(false) //新增
  297. const ruleForm = reactive({
  298. bankInfo: [], //银行信息
  299. bankWrit: [], //电汇信息
  300. xykInfo: [], //信用卡信息
  301. bankBlockchain: [], //区块链
  302. })
  303. const imgUrl = Host80 //图片地址
  304. const loginOptions = ref([])
  305. const value = ref("") //账号
  306. const code = ref("") //通道code
  307. const bankValid = ref("") //通道是否有银行
  308. const requestUrl = ref("") //通道地址
  309. const isStep3 = ref(false)
  310. const step2 = ref(false)
  311. const step3 = ref(false)
  312. const dialogCheckTip = ref(false)
  313. const isChannel = ref(true)
  314. const pictLoading = ref(false)
  315. const tableData = reactive({
  316. Ucard_Wallet: [],
  317. Digital_Currency: [],
  318. China_UnionPay: [],
  319. Electronic_Wallet: [],
  320. International_Transfer: [],
  321. CHANNEL_TYPE_CARD: [],
  322. CHANNEL_TYPE_ALI_WALLET: [],
  323. }) //通道table-选择前后
  324. const bankDate = ref([]) //通道下的银行列表
  325. const channelData = ref({}) //当前选择的通道信息
  326. const WireTransferAccount = ref({}) //银行电汇信息
  327. //表单
  328. const form = reactive({
  329. currency: "USD",
  330. amount: "",
  331. amount1: "",
  332. bankCode: '', // 银行代码(普通银行通道选择)
  333. address: '', // 电子钱包地址 / 数字货币地址(输入/展示)
  334. addressName: '', // 数字货币地址名称(展示)
  335. addressProve: '', // 数字货币地址证明文件路径(仅展示))
  336. bankUname: '', // 持卡人姓名
  337. bankCardNum: '', // 银行卡号
  338. bankName: '', // 银行名称
  339. bankBranchName: '', // 支行名称
  340. swiftCode: '', // SWIFT代码
  341. customBankCode: '', // 自定义银行代码
  342. bankAddr: '', // 银行地址
  343. agencyNo: '', // 代理机构编号(电汇专用,可编辑)
  344. cpf: '', // CPF号码(电汇专用,可编辑)
  345. agree2: false, // 协议勾选2
  346. agree3: false // 协议勾选3(当dialogTipsIsShow为true时显示)
  347. })
  348. const formRef = ref(null)
  349. const resetForm = () => {
  350. //表单重置后,需要手动重置一些状态
  351. form.amount = ""
  352. form.amount1 = ""
  353. form.bankCode = ""
  354. form.address = ""
  355. form.addressName = ""
  356. form.addressProve = ""
  357. form.bankUname = ""
  358. form.bankCardNum = ""
  359. form.swiftCode = ""
  360. form.customBankCode = ""
  361. form.bankAddr = ""
  362. form.agencyNo = ""
  363. form.cpf = ""
  364. form.agree2 = false
  365. form.agree3 = false
  366. amountErrorMessage.value = ""
  367. }
  368. //数量区间
  369. const mAmount = reactive({
  370. minAmount: "",
  371. maxAmount: "",
  372. })
  373. const introduce = reactive({
  374. introduce: "",
  375. enIntroduce: "",
  376. })
  377. //银行列表
  378. const bankInfoList = ref([])
  379. const bank = ref("")
  380. const myId = ref(null) //银行列表id
  381. const bankPayType = ref("") //临时放置通道code
  382. //银联/数字货币
  383. const step3_bank_cur = ref("")
  384. const agree2 = ref(false) //条款
  385. //数字表单
  386. const form1 = ref({})
  387. const dialogCheck = ref(false)
  388. const dialogKyc = ref(false)
  389. const dialogVisible = ref(false)
  390. const dialogCheckWait = ref(false)
  391. //新建银行弹窗
  392. const dialogNewBank = ref(false)
  393. const params = reactive({
  394. bankCardNum: "",
  395. bankUname: "",
  396. bankName: "",
  397. bankBranchName: "",
  398. bankAddr: "",
  399. swiftCode: "",
  400. bankFront: "",
  401. bankBack: "",
  402. defaultBank: false,
  403. })
  404. const dialogDealResult = ref(false)
  405. const emailCodeApi = ref(financialApi.withdrawCode)
  406. const dialogDealResult_form = reactive({
  407. emailCode: "", //数字货币出金,验证码
  408. })
  409. const dialogTips = ref(false) //提交时的确认弹窗
  410. const dialogTipsIsShow = ref(true) //提交时的确认弹窗-是否显示
  411. const dialogFreeNumber = ref(false) //可减免手续费用次数弹窗
  412. const FreeNumber = ref(0)
  413. const dialogCheckConfirm = ref(false)
  414. const dialogCheckConfirm_form = reactive({
  415. amount: "",
  416. feeAmount: "",
  417. })
  418. const tableDataNewYear24Flag = ref(false) //24新年庆典
  419. const tableDataNewYear24 = ref(false) //24新年庆典
  420. const NewYear24Data = reactive({
  421. balance: 0,
  422. income: 0,
  423. rate: 0,
  424. })
  425. const rules = computed(() => ({
  426. myId: {
  427. rules: [
  428. {
  429. required: true,
  430. errorMessage: t('vaildate.select.empty'),
  431. trigger: 'change',
  432. },
  433. ],
  434. },
  435. bankUname: {
  436. rules: [
  437. {
  438. required: true,
  439. errorMessage: t('vaildate.select.empty'),
  440. trigger: 'change',
  441. },
  442. ],
  443. },
  444. bankCode: {
  445. rules: [
  446. {
  447. required: true,
  448. errorMessage: t('vaildate.select.empty'),
  449. trigger: 'change',
  450. },
  451. ],
  452. },
  453. address: {
  454. rules: [
  455. {
  456. required: true,
  457. errorMessage: t('vaildate.input.empty'),
  458. trigger: 'blur',
  459. },
  460. ],
  461. },
  462. amount: {
  463. rules: [
  464. {
  465. required: true,
  466. errorMessage: t('vaildate.amount.format'),
  467. },
  468. {
  469. validateFunction: (rule, value, data, callback) => {
  470. if (
  471. !!value &&
  472. (mAmount.minAmount > value || mAmount.maxAmount < value)
  473. ) {
  474. callback(
  475. t('vaildate.amount.amount') +
  476. mAmount.minAmount +
  477. ' - ' +
  478. mAmount.maxAmount
  479. );
  480. return false;
  481. }
  482. if (/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  483. return true;
  484. } else {
  485. callback(t('vaildate.amount.format'));
  486. return false;
  487. }
  488. },
  489. trigger: 'blur',
  490. },
  491. ],
  492. },
  493. agree2: {
  494. rules: [
  495. {
  496. validateFunction: (rule, value, data, callback) => {
  497. if (form.agree2) {
  498. return true;
  499. } else {
  500. callback(t('vaildate.agree.empty'));
  501. return false;
  502. }
  503. },
  504. trigger: 'change',
  505. },
  506. ],
  507. },
  508. agree3: {
  509. rules: [
  510. {
  511. validateFunction: (rule, value, data, callback) => {
  512. if (form.agree3) {
  513. return true;
  514. } else {
  515. callback(t('vaildate.agree.empty'));
  516. return false;
  517. }
  518. },
  519. trigger: 'change',
  520. },
  521. ],
  522. },
  523. agencyNo: {
  524. rules: [
  525. {
  526. required: true,
  527. errorMessage: t('vaildate.input.empty'),
  528. trigger: 'blur',
  529. },
  530. ],
  531. },
  532. cpf: {
  533. rules: [
  534. {
  535. required: true,
  536. errorMessage: t('vaildate.input.empty'),
  537. trigger: 'blur',
  538. },
  539. ],
  540. },
  541. emailCode: {
  542. rules: [
  543. {
  544. required: true,
  545. errorMessage: t('vaildate.code.empty'),
  546. trigger: 'blur',
  547. },
  548. ],
  549. },
  550. }));
  551. // 验证金额
  552. const amountErrorMessage = ref('')
  553. const validateAmount = () => {
  554. const amount = form.amount
  555. if (!amount && amount !== 0) {
  556. amountErrorMessage.value = t('vaildate.amount.format')
  557. return false
  558. }
  559. if (mAmount.minAmount && mAmount.maxAmount) {
  560. const min = Number(mAmount.minAmount);
  561. const max = Number(mAmount.maxAmount);
  562. const numValue = Number(amount);
  563. if (numValue < min || numValue > max) {
  564. amountErrorMessage.value = t('vaildate.amount.amount') + min + '-' + max
  565. return false
  566. }
  567. }
  568. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  569. amountErrorMessage.value = t('vaildate.amount.format')
  570. return false
  571. }
  572. amountErrorMessage.value = ''
  573. return true
  574. }
  575. // 分组标题映射
  576. const groupTitleMap = {
  577. 'Ucard_Wallet': 'card.title',
  578. 'Digital_Currency': 'Custom.Deposit.Channel3',
  579. 'China_UnionPay': 'Custom.Deposit.Channel2',
  580. 'Electronic_Wallet': 'Custom.Deposit.Channel4',
  581. 'International_Transfer': 'Custom.Deposit.Channel1',
  582. 'CHANNEL_TYPE_CARD': 'PersonalManagement.Label.CreditCard',
  583. 'CHANNEL_TYPE_ALI_WALLET': 'Label.Ali'
  584. }
  585. // -------------------- computed --------------------
  586. const getWalletLabel = computed(() => {
  587. if (channelData.value.type === 'CHANNEL_TYPE_WALLET') return t('Custom.Withdraw.Title7')
  588. if (channelData.value.type === 'UCARD_WALLET') return t('card.title')
  589. if (channelData.value.type === 'CHANNEL_TYPE_ALI_WALLET') return t('Label.AliAccout')
  590. return ''
  591. })
  592. // 最后确认
  593. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  594. // 最后失败
  595. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  596. const loginComboxOptions = computed(() => {
  597. return loginOptions.value.map((item, index) => ({
  598. text: item.label,
  599. value: item.login
  600. }))
  601. })
  602. const bankOptions = computed(() => {
  603. return bankDate.value.map((item, index) => ({
  604. text: isZh.value ? item.name : item.enName,
  605. value: item.code
  606. }))
  607. })
  608. const digitalOptions = computed(() => {
  609. return ruleForm.bankBlockchain.map((item, index) => ({
  610. text: `${item.addressName}-${item.address}`,
  611. value: item.id,
  612. disable: item.authStatus == 0,
  613. }))
  614. })
  615. const bankCardOptions = computed(() => {
  616. return bankList.value.map((item, index) => ({
  617. text: getBankLabel(item),
  618. value: item.id
  619. }))
  620. })
  621. const getBankLabel = (item) => {
  622. if (channelData.value.type === 'BANK' || channelData.value.type === 'BANK_TELEGRAPHIC') {
  623. return `${item.bankName}-${item.bankCardNum}`
  624. } else if (channelData.value.type === 'CHANNEL_TYPE_CARD') {
  625. return item.bankCardNum
  626. }
  627. return ''
  628. }
  629. const bankList = computed(() => {
  630. if (channelData.value.type === 'BANK') return ruleForm.bankInfo
  631. if (channelData.value.type === 'BANK_TELEGRAPHIC') return ruleForm.bankWrit
  632. if (channelData.value.type === 'CHANNEL_TYPE_CARD') return ruleForm.xykInfo
  633. if (channelData.value.type === 'DIGITAL_CURRENCY') return ruleForm.bankBlockchain
  634. return []
  635. })
  636. const isFree = computed(() => {
  637. let flag = false;
  638. let startTime1 = "2024/11/01 00:00:00";
  639. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  640. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  641. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  642. let now = new Date(
  643. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  644. ).getTime();
  645. let start = new Date(startTime1).getTime();
  646. if (now > start) {
  647. flag = true;
  648. }
  649. return flag;
  650. })
  651. // -------------------- methods --------------------
  652. const groupCurrency = (type) => {
  653. const symbol = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }[type] || '$'
  654. return `: ${symbol}`
  655. }
  656. const groupCurrency1 = (type) => {
  657. const symbol = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }[type] || '$'
  658. return `${symbol}`
  659. }
  660. function groupTypeName(type) {
  661. if (type == "1") {
  662. return t("AccountType.ClassicAccount");
  663. } else if (type == "2") {
  664. return t("AccountType.SeniorAccount");
  665. } else if (type == "3") {
  666. return isAfterJuly28() ? "--" : t("AccountType.AgencyAccount");
  667. } else if (type == "5") {
  668. return t("AccountType.SpeedAccount");
  669. } else if (type == "6") {
  670. return t("AccountType.SpeedAccount");
  671. } else if (type == "7") {
  672. return t("AccountType.StandardAccount");
  673. } else if (type == "8") {
  674. return t("AccountType.CentAccount");
  675. }
  676. }
  677. //回显
  678. const onAgree3Change = (e) => {
  679. form.agree3 = e.detail.value.length > 0
  680. }
  681. const onAgree2Change = (e) => {
  682. form.agree2 = e.detail.value.length > 0
  683. }
  684. function selectChange() {
  685. // proxy.$forceUpdate();
  686. }
  687. //新增
  688. // function openAddBankCard(type) {
  689. // if (type == "add_bankCard") {
  690. // if (ruleForm.bankInfo.length == 2) {
  691. // proxy.$pigeon.MessageConfirm(
  692. // t("Msg.UnionPayCARDS"),
  693. // t("Msg.SystemPrompt"),
  694. // t("Btn.Confirm"),
  695. // t("Btn.Cancel"),
  696. // async function () { },
  697. // function () { }
  698. // );
  699. // } else {
  700. // openType.value = "add_bankCard";
  701. // dialogInfoTradingAdd.value = true;
  702. // }
  703. // } else if (type == "add_wireTransfer") {
  704. // if (ruleForm.bankWrit.length == 2) {
  705. // proxy.$pigeon.MessageConfirm(
  706. // t("Msg.WireTransfers"),
  707. // t("Msg.SystemPrompt"),
  708. // t("Btn.Confirm"),
  709. // t("Btn.Cancel"),
  710. // async function () { },
  711. // function () { }
  712. // );
  713. // } else {
  714. // openType.value = "add_wireTransfer";
  715. // dialogInfoTradingAdd.value = true;
  716. // }
  717. // } else if (type == "add_CreditCard") {
  718. // openType.value = "add_CreditCard";
  719. // dialogInfoTradingAdd.value = true;
  720. // } else if (type == "add_bankBlockchain") {
  721. // if (ruleForm.bankBlockchain.length == 2) {
  722. // proxy.$pigeon.MessageConfirm(
  723. // t("blockchain.item9"),
  724. // t("Msg.SystemPrompt"),
  725. // t("Btn.Confirm"),
  726. // t("Btn.Cancel"),
  727. // async function () { },
  728. // function () { }
  729. // );
  730. // } else {
  731. // openType.value = "add_bankBlockchain";
  732. // dialogInfoTradingAdd.value = true;
  733. // }
  734. // }
  735. // }
  736. // 新增银行信息
  737. const addBankDialogRef = ref(null);
  738. function openAddBankCard(type) {
  739. console.log(type, 121212)
  740. switch (type) {
  741. case 'add_bankBlockchain':
  742. openAddCrypto()
  743. break;
  744. case 'add_bankCard':
  745. openAddUnionpay()
  746. break;
  747. case 'add_wireTransfer':
  748. openAddBank()
  749. break;
  750. case 'add_CreditCard':
  751. openAddCredit()
  752. break;
  753. }
  754. }
  755. function openAddCrypto() {
  756. const wallets = bankCardOptions.value || []
  757. // 1️⃣ 没有钱包
  758. if (wallets.length === 0) {
  759. addBankDialogRef.value?.open(4);
  760. return;
  761. }
  762. // 2️⃣ 是否存在未认证钱包
  763. const hasUnAuth = wallets.some(
  764. item => item.authStatus === 0 || item.approveStatus === 1
  765. );
  766. if (hasUnAuth) {
  767. uni.showToast({
  768. title: "加密钱包未认证",
  769. icon: "none"
  770. });
  771. return;
  772. }
  773. // 3️⃣ 是否达到上限
  774. if (wallets.length >= 2) {
  775. uni.showToast({
  776. title: t('blockchain.item9'),
  777. icon: "none"
  778. });
  779. return;
  780. }
  781. // 4️⃣ 正常打开
  782. addBankDialogRef.value?.open(4);
  783. }
  784. function openAddUnionpay() {
  785. const wallets = bankCardOptions.value || []
  786. if (wallets.length === 0) {
  787. addBankDialogRef.value?.open(1);
  788. return;
  789. }
  790. if (wallets.length >= 2) {
  791. uni.showToast({
  792. title: t('Msg.UnionPayCARDS'),
  793. icon: "none"
  794. });
  795. return;
  796. }
  797. addBankDialogRef.value?.open(1);
  798. }
  799. function openAddBank() {
  800. const wallets = bankCardOptions.value || []
  801. if (wallets.length === 0) {
  802. addBankDialogRef.value?.open(2);
  803. return;
  804. }
  805. if (wallets.length >= 2) {
  806. uni.showToast({
  807. title: t('Msg.WireTransfers'),
  808. icon: "none"
  809. });
  810. return;
  811. }
  812. addBankDialogRef.value?.open(2);
  813. }
  814. function openAddCredit() {
  815. const wallets = bankCardOptions.value || []
  816. if (wallets.length === 0) {
  817. addBankDialogRef.value?.open(3);
  818. return;
  819. }
  820. addBankDialogRef.value?.open(3);
  821. }
  822. // 新增银行信息成功回调
  823. const addSuccess = (e) => {
  824. getBankInfo();
  825. }
  826. function closeDiaAdd() {
  827. dialogInfoTradingAdd.value = false;
  828. }
  829. function closeAdd(val) {
  830. dialogInfoTradingAdd.value = val;
  831. }
  832. function confirmToReload() {
  833. dialogInfoTradingAdd.value = false;
  834. getBankInfo();
  835. }
  836. const getBankInfo = async () => {
  837. const res = await financialApi.customBankList({})
  838. if (res.code === Code.StatusOK) {
  839. ruleForm.bankInfo = []
  840. ruleForm.bankWrit = []
  841. ruleForm.xykInfo = []
  842. ruleForm.bankBlockchain = []
  843. res.data.forEach(item => {
  844. item.customBankCode = item.bankCode
  845. item.bankCode = null
  846. if (item.type === 1) ruleForm.bankInfo.push(item)
  847. else if (item.type === 2) ruleForm.bankWrit.push(item)
  848. else if (item.type === 3) {
  849. item.expiryYearMonth = `${item.expiryYear}/${item.expiryMonth}`
  850. ruleForm.xykInfo.push(item)
  851. } else if (item.type === 4) ruleForm.bankBlockchain.push(item)
  852. })
  853. // 如果有默认选中
  854. const findDefault = (list, type) => list.find(b => b.defaultBank && b.type === type)
  855. const defaultBank = findDefault(ruleForm.bankInfo, 1)
  856. const defaultWire = findDefault(ruleForm.bankWrit, 2)
  857. const defaultCard = findDefault(ruleForm.xykInfo, 3)
  858. const defaultDigital = findDefault(ruleForm.bankBlockchain, 4)
  859. if (channelData.value.type === 'BANK' && defaultBank) selectBankCard(defaultBank)
  860. if (channelData.value.type === 'BANK_TELEGRAPHIC' && defaultWire) selectBankCard(defaultWire)
  861. if (channelData.value.type === 'CHANNEL_TYPE_CARD' && defaultCard) selectBankCard(defaultCard)
  862. if (channelData.value.type === 'DIGITAL_CURRENCY' && defaultDigital && defaultDigital.authStatus === 1) selectDigital(defaultDigital)
  863. } else {
  864. uni.showToast({ title: res.msg, icon: 'none' })
  865. }
  866. }
  867. const selectBankCard = (item) => {
  868. const index = bankList.value.findIndex(b => b.id === item.id)
  869. if (index !== -1) {
  870. myId.value = item.id
  871. Object.assign(form, item)
  872. }
  873. }
  874. const selectDigital = (item) => {
  875. const index = ruleForm.bankBlockchain.findIndex(b => b.id === item.id)
  876. if (index !== -1) {
  877. selectedDigitalIndex.value = item.id
  878. form.addressName = item.addressName
  879. form.address = item.address
  880. form.addressProve = item.addressProve
  881. }
  882. }
  883. const onDigitalCurrencyChange = (val) => {
  884. const item = ruleForm.bankBlockchain.find(b => b.id === val)
  885. chooseBank(item)
  886. }
  887. function chooseBank({ id }) {
  888. const item = bankList.value.find(b => b.id === id)
  889. if (!item) {
  890. showToast(t("Msg.item11"));
  891. return;
  892. }
  893. if (channelData.value.type == "DIGITAL_CURRENCY") {
  894. if (item.authStatus == 0) {
  895. showToast(t("Msg.item11"));
  896. return;
  897. }
  898. }
  899. let codeTmp = "";
  900. if (form.bankCode) {
  901. codeTmp = form.bankCode;
  902. }
  903. Object.assign(form, item);
  904. form.agree2 = false;
  905. form.agree3 = false;
  906. if (channelData.value.type == "BANK_TELEGRAPHIC") {
  907. form.currency = "USD";
  908. if (codeTmp) {
  909. form.bankCode = codeTmp;
  910. }
  911. }
  912. }
  913. function selectCode(codeVal) {
  914. bankDate.value.forEach((item) => {
  915. if (item.code == codeVal) {
  916. // item.rate = 1
  917. // mAmount.minAmount = item.minAmount || mAmount.minAmount;
  918. // mAmount.maxAmount = item.maxAmount || mAmount.maxAmount;
  919. channelData.value.rate = item.rate || channelData.value.rate;
  920. channelData.value.transformCurrency =
  921. item.currency || channelData.value.transformCurrency;
  922. channelData.value.feeTypeBank = item.feeType || null;
  923. channelData.value.freeBank = item.free || 0;
  924. channelData.value.feeAmountBank = item.feeAmount || null;
  925. }
  926. });
  927. }
  928. //关闭提交后的弹出框
  929. function closeDia() {
  930. resetForm()
  931. isStep3.value = false;
  932. step2.value = false;
  933. showTable();
  934. loginValue.value = "";
  935. dialogCheck.value = false;
  936. dialogVisible.value = false;
  937. }
  938. //取消
  939. function cancelCode() {
  940. dialogDealResult.value = false;
  941. }
  942. //提交前弹窗确认
  943. async function openTips() {
  944. if (channelData.value.type == "BANK_TELEGRAPHIC" && !myId.value) {
  945. showToast(t("vaildate.withdrawBank.empty"));
  946. return;
  947. }
  948. if (channelData.value.type == "BANK" && !myId.value) {
  949. showToast(t("vaildate.withdrawBank.empty"));
  950. return;
  951. }
  952. if (channelData.value.type == "CHANNEL_TYPE_CARD" && !myId.value) {
  953. showToast(t("vaildate.withdrawBank.empty"));
  954. return;
  955. }
  956. if (channelData.value.type == "DIGITAL_CURRENCY" && !myId.value) {
  957. showToast(t("blockchain.item11"));
  958. return;
  959. }
  960. try {
  961. if (formRef.value) {
  962. const valid = await formRef.value.validate()
  963. console.log(valid, 1212);
  964. if (dialogTipsIsShow.value) {
  965. dialogTips.value = true;
  966. } else {
  967. submit("form");
  968. }
  969. }
  970. } catch (error) {
  971. if (error instanceof Array) {
  972. showToast(error[0].errorMessage);
  973. return
  974. } else {
  975. RES.value = error.msg;
  976. }
  977. }
  978. }
  979. // 提示同意提交出金
  980. function closeTipsConfirm() {
  981. if (isFree.value) {
  982. dialogTips.value = false;
  983. if (channelData.value.feeTypeBank) {
  984. if (channelData.value.feeTypeBank == 1) {
  985. dialogCheckConfirm_form.feeAmount =
  986. Number(form.amount || 0) *
  987. (Number(channelData.value.freeBank || 0) / 100);
  988. } else if (channelData.value.feeTypeBank == 2) {
  989. dialogCheckConfirm_form.feeAmount = Number(
  990. channelData.value.feeAmountBank || 0
  991. );
  992. }
  993. } else {
  994. if (channelData.value.feeType == 1) {
  995. dialogCheckConfirm_form.feeAmount =
  996. Number(form.amount || 0) *
  997. (Number(channelData.value.free || 0) / 100);
  998. } else if (channelData.value.feeType == 2) {
  999. dialogCheckConfirm_form.feeAmount = Number(
  1000. channelData.value.feeAmount || 0
  1001. );
  1002. }
  1003. }
  1004. if (FreeNumber.value > 0) {
  1005. dialogCheckConfirm_form.amount = new Decimal(
  1006. Number(form.amount || 0)
  1007. )
  1008. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1009. .toNumber();
  1010. } else {
  1011. dialogCheckConfirm_form.amount = new Decimal(
  1012. Number(form.amount || 0)
  1013. )
  1014. .sub(
  1015. new Decimal(Number(dialogCheckConfirm_form.feeAmount || 0))
  1016. )
  1017. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1018. .toNumber();
  1019. }
  1020. if (
  1021. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  1022. ) {
  1023. dialogCheckConfirm_form.feeAmount = parseInt(
  1024. dialogCheckConfirm_form.feeAmount
  1025. );
  1026. dialogCheckConfirm_form.amount = parseInt(
  1027. dialogCheckConfirm_form.amount
  1028. );
  1029. }
  1030. dialogCheckConfirm.value = true;
  1031. } else {
  1032. dialogTips.value = false;
  1033. submit("form");
  1034. }
  1035. }
  1036. function getMetaInfo() {
  1037. metaInfo.value = window.getMetaInfo();
  1038. metaInfo.value = { ...metaInfo.value, deviceType: "h5" };
  1039. }
  1040. async function qrCode(serial) {
  1041. // if (getInfoStatus.kycType == 3) {
  1042. // getMetaInfo();
  1043. // }
  1044. getMetaInfo()
  1045. let res = await customApi.getWebsdkLink({
  1046. serial,
  1047. metaInfo: metaInfo.value,
  1048. });
  1049. if (res.code == Code.StatusOK) {
  1050. text1.value = JSON.parse(res.data).url;
  1051. dialogKyc.value = true;
  1052. flag.value = false;
  1053. } else {
  1054. flag.value = false;
  1055. }
  1056. }
  1057. const submitCode = async (code) => {
  1058. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1059. dialogDealResult_form.emailCode = code;
  1060. submit("form");
  1061. }
  1062. }
  1063. //提交
  1064. async function submit(formName) {
  1065. if (channelData.value.type == "BANK_TELEGRAPHIC" && !myId.value) {
  1066. showToast(t("vaildate.withdrawBank.empty"));
  1067. return;
  1068. }
  1069. if (channelData.value.type == "BANK" && !myId.value) {
  1070. showToast(t("vaildate.withdrawBank.empty"));
  1071. return;
  1072. }
  1073. if (channelData.value.type == "CHANNEL_TYPE_CARD" && !myId.value) {
  1074. showToast(t("vaildate.withdrawBank.empty"));
  1075. return;
  1076. }
  1077. if (channelData.value.type == "DIGITAL_CURRENCY" && !myId.value) {
  1078. showToast(t("blockchain.item11"));
  1079. return;
  1080. }
  1081. try {
  1082. if (formRef.value) {
  1083. await formRef.value.validate()
  1084. if (
  1085. channelData.value.type == "DIGITAL_CURRENCY" &&
  1086. !dialogDealResult_form.emailCode
  1087. ) {
  1088. // let res = await financialApi.withdrawCode({});
  1089. // if (res.code == Code.StatusOK) {
  1090. // dialogDealResult = true;
  1091. // } else {
  1092. // $pigeon.MessageWarning(res.msg);
  1093. // }
  1094. dialogDealResult.value = true;
  1095. return;
  1096. }
  1097. // 检查活动参与情况
  1098. // let selectedAccount = loginOptions.find(item => item.login === value);
  1099. // if (selectedAccount) {
  1100. // let activityRes = await activityApi.ActivityGiveLoginParticipate({
  1101. // login: value,
  1102. // platform: selectedAccount.platform,
  1103. // amount: form.amount
  1104. // });
  1105. //
  1106. // if (activityRes.code == Code.StatusOK && activityRes.data === false) {
  1107. // // 使用 Promise 包装确认对话框,等待用户选择
  1108. // try {
  1109. // await new Promise((resolve, reject) => {
  1110. // $pigeon.MessageConfirm(
  1111. // "您参加的活动正在进行中,发起申请后结束活动",
  1112. // $i18n.t("Msg.SystemPrompt"),
  1113. // $i18n.t("Btn.Confirm"),
  1114. // $i18n.t("Btn.Cancel"),
  1115. // () => {
  1116. // resolve(); // 确认时继续执行
  1117. // },
  1118. // () => {
  1119. // reject(); // 取消时阻止执行
  1120. // }
  1121. // );
  1122. // });
  1123. // } catch {
  1124. // return; // 用户点击取消,阻止执行
  1125. // }
  1126. // }
  1127. // }
  1128. if (flag.value) {
  1129. return;
  1130. } else {
  1131. flag.value = true;
  1132. }
  1133. dialogCheckWait.value = true;
  1134. if (channelData.value.type == "DIGITAL_CURRENCY") {
  1135. let res = await financialApi.WithdrawAapplyDigitalCurrency(
  1136. channelData.value.requestUrl,
  1137. {
  1138. login: loginValue.value,
  1139. payType: channelData.value.code,
  1140. emailCode: dialogDealResult_form.emailCode,
  1141. ...form,
  1142. }
  1143. );
  1144. if (res.code == Code.StatusOK) {
  1145. flag.value = false;
  1146. dialogCheck.value = true;
  1147. dialogVisible.value = true;
  1148. // qrCode(res.data)
  1149. } else {
  1150. RES.value = res.msg;
  1151. dialogCheck.value = true;
  1152. dialogVisible.value = false;
  1153. flag.value = false;
  1154. }
  1155. cancelCode();
  1156. } else if (
  1157. channelData.value.type == "CHANNEL_TYPE_WALLET" ||
  1158. channelData.value.type == "UCARD_WALLET" ||
  1159. channelData.value.type == "CHANNEL_TYPE_ALI_WALLET"
  1160. ) {
  1161. let res = await financialApi.WithdrawAapplyDigitalCurrency(
  1162. channelData.value.requestUrl,
  1163. {
  1164. login: loginValue.value,
  1165. payType: channelData.value.code,
  1166. ...form,
  1167. }
  1168. );
  1169. if (res.code == Code.StatusOK) {
  1170. flag.value = false;
  1171. dialogCheck.value = true;
  1172. dialogVisible.value = true;
  1173. // qrCode(res.data)
  1174. } else {
  1175. RES.value = res.msg;
  1176. dialogCheck.value = true;
  1177. dialogVisible.value = false;
  1178. flag.value = false;
  1179. }
  1180. console.log(res, 'res', RES.value);
  1181. } else if (channelData.value.type == "BANK") {
  1182. let res = await financialApi.WithdrawApplyBank(
  1183. channelData.value.requestUrl,
  1184. {
  1185. login: loginValue.value,
  1186. payType: channelData.value.code,
  1187. ...form,
  1188. }
  1189. );
  1190. if (res.code == Code.StatusOK) {
  1191. flag.value = false;
  1192. dialogCheck.value = true;
  1193. dialogVisible.value = true;
  1194. // qrCode(res.data)
  1195. } else {
  1196. RES.value = res.msg;
  1197. dialogCheck.value = true;
  1198. dialogVisible.value = false;
  1199. flag.value = false;
  1200. }
  1201. } else if (channelData.value.type == "BANK_TELEGRAPHIC") {
  1202. let res = await financialApi.WithdrawApplyBank(
  1203. channelData.value.requestUrl,
  1204. {
  1205. login: loginValue.value,
  1206. payType: channelData.value.code,
  1207. ...form,
  1208. }
  1209. );
  1210. if (res.code == Code.StatusOK) {
  1211. flag.value = false;
  1212. dialogCheck.value = true;
  1213. dialogVisible.value = true;
  1214. // qrCode(res.data)
  1215. } else {
  1216. RES.value = res.msg;
  1217. dialogCheck.value = true;
  1218. dialogVisible.value = false;
  1219. flag.value = false;
  1220. }
  1221. } else if (channelData.value.type == "CHANNEL_TYPE_CARD") {
  1222. let res = await financialApi.WithdrawApplyBank(
  1223. channelData.value.requestUrl,
  1224. {
  1225. login: loginValue.value,
  1226. payType: channelData.value.code,
  1227. ...form,
  1228. }
  1229. );
  1230. if (res.code == Code.StatusOK) {
  1231. flag.value = false;
  1232. dialogCheck.value = true;
  1233. dialogVisible.value = true;
  1234. // qrCode(res.data)
  1235. } else {
  1236. RES.value = res.msg;
  1237. dialogCheck.value = true;
  1238. dialogVisible.value = false;
  1239. flag.value = false;
  1240. }
  1241. }
  1242. dialogCheckWait.value = false;
  1243. }
  1244. } catch (error) {
  1245. if (error instanceof Array) {
  1246. showToast(error[0].errorMessage);
  1247. return
  1248. } else {
  1249. RES.value = error.msg;
  1250. dialogCheck.value = true;
  1251. dialogCheckWait.value = false;
  1252. dialogVisible.value = false;
  1253. flag.value = false;
  1254. }
  1255. }
  1256. }
  1257. //初始化
  1258. function Initialize() {
  1259. loginValue.value = "";
  1260. isStep3.value = false;
  1261. step2.value = false;
  1262. step3.value = false;
  1263. showTable();
  1264. }
  1265. //手续费减免次数接口
  1266. async function getFreeNumber() {
  1267. if (!isFree.value) {
  1268. return;
  1269. }
  1270. dialogFreeNumber.value = true;
  1271. let res = await financialApi.remainingReductionNumber({});
  1272. if (res.code == Code.StatusOK) {
  1273. FreeNumber.value = res.data || 0;
  1274. } else {
  1275. showToast(res.msg);
  1276. }
  1277. }
  1278. function toShop() {
  1279. // $router.push({ path: "/shop/home" }).catch((arr) => arr);
  1280. // uni-app 中可能需要使用 uni.navigateTo,此处保留原逻辑但注释掉,因为原代码是 Vue Router
  1281. // 若需要可以改为 uni.navigateTo
  1282. }
  1283. //选择支付方式
  1284. function isShowStep3(row) {
  1285. console.log(row, 222);
  1286. dialogCheckWait.value = false;
  1287. dialogVisible.value = false;
  1288. flag.value = false;
  1289. //判断是否有bank
  1290. if (row.bankValid && isChannel.value) {
  1291. getBankList(row);
  1292. isChannel.value = false;
  1293. step3.value = true;
  1294. channelData.value = row;
  1295. mAmount.minAmount = row.minAmount;
  1296. mAmount.maxAmount = row.maxAmount;
  1297. } else {
  1298. step3.value = true;
  1299. bankDate.value = [];
  1300. channelData.value = row;
  1301. mAmount.minAmount = row.minAmount;
  1302. mAmount.maxAmount = row.maxAmount;
  1303. }
  1304. if (row.code == "UNION_PAY_TELEGRAPHIC") {
  1305. WireTransferAccount.value = JSON.parse(row.property);
  1306. }
  1307. if (['BANK', 'BANK_TELEGRAPHIC', 'CHANNEL_TYPE_CARD', 'DIGITAL_CURRENCY'].includes(row.type)) {
  1308. getBankInfo();
  1309. step3_bank_cur.value = "bank";
  1310. form.login = loginValue.value;
  1311. form.payType = row.code;
  1312. bankPayType.value = row.code;
  1313. }
  1314. tableData.Ucard_Wallet = []
  1315. tableData.Digital_Currency = []
  1316. tableData.China_UnionPay = []
  1317. tableData.Electronic_Wallet = []
  1318. tableData.International_Transfer = []
  1319. tableData.CHANNEL_TYPE_CARD = []
  1320. tableData.CHANNEL_TYPE_ALI_WALLET = []
  1321. if (row.type === 'UCARD_WALLET') tableData.Ucard_Wallet = [row]
  1322. if (row.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency = [row]
  1323. if (row.type === 'BANK') tableData.China_UnionPay = [row]
  1324. if (row.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet = [row]
  1325. if (row.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer = [row]
  1326. if (row.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD = [row]
  1327. if (row.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET = [row]
  1328. introduce.introduce = row.introduce
  1329. introduce.enIntroduce = row.enIntroduce
  1330. // 重置表单并清除校验结果
  1331. resetForm();
  1332. }
  1333. //更换支付方式
  1334. function showTable() {
  1335. resetForm()
  1336. myId.value = null;
  1337. step3.value = false;
  1338. isStep3.value = false;
  1339. isChannel.value = true;
  1340. getDepositList();
  1341. form.currency = "USD";
  1342. }
  1343. //获取账户信息
  1344. async function getDateList() {
  1345. let res = await customApi.CustomDropdown({ platform: "" });
  1346. if (res.code == Code.StatusOK) {
  1347. loginOptions.value = res.data.map(item => ({
  1348. ...item,
  1349. label: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`
  1350. }))
  1351. const route = getCurrentPages().pop().$page.options
  1352. if (route.login) {
  1353. const found = loginOptions.value.find(opt => opt.login === Number(route.login))
  1354. loginValue.value = found.login
  1355. loginValueDoc.value = found.label
  1356. step2.value = true;
  1357. // showTable();
  1358. }
  1359. } else {
  1360. showToast(res.msg);
  1361. }
  1362. }
  1363. //获取出金通道
  1364. async function getDepositList() {
  1365. pictLoading.value = true;
  1366. tableData.Ucard_Wallet = [];
  1367. tableData.Digital_Currency = [];
  1368. tableData.China_UnionPay = [];
  1369. tableData.Electronic_Wallet = [];
  1370. tableData.International_Transfer = [];
  1371. tableData.CHANNEL_TYPE_CARD = [];
  1372. tableData.CHANNEL_TYPE_ALI_WALLET = [];
  1373. let res = await financialApi.RemitChannelList({});
  1374. if (res.code == Code.StatusOK) {
  1375. res.data.forEach(item => {
  1376. if (item.type === 'UCARD_WALLET') tableData.Ucard_Wallet.push(item)
  1377. if (item.type === 'DIGITAL_CURRENCY') tableData.Digital_Currency.push(item)
  1378. if (item.type === 'BANK') tableData.China_UnionPay.push(item)
  1379. if (item.type === 'CHANNEL_TYPE_WALLET') tableData.Electronic_Wallet.push(item)
  1380. if (item.type === 'BANK_TELEGRAPHIC') tableData.International_Transfer.push(item)
  1381. if (item.type === 'CHANNEL_TYPE_CARD') tableData.CHANNEL_TYPE_CARD.push(item)
  1382. if (item.type === 'CHANNEL_TYPE_ALI_WALLET') tableData.CHANNEL_TYPE_ALI_WALLET.push(item)
  1383. })
  1384. pictLoading.value = false;
  1385. } else {
  1386. showToast(res.msg);
  1387. pictLoading.value = false;
  1388. }
  1389. }
  1390. //获取出金通道银行列表
  1391. async function getBankList(row) {
  1392. let res = await financialApi.BankList({
  1393. channelCode: row.code,
  1394. });
  1395. if (res.code == Code.StatusOK) {
  1396. let bank = res.data;
  1397. let data = [];
  1398. bank.forEach((j) => {
  1399. if (!j.minAmount && j.minAmount != 0) {
  1400. j.minAmount = row.minAmount;
  1401. }
  1402. if (!j.maxAmount && j.maxAmount != 0) {
  1403. j.maxAmount = row.maxAmount;
  1404. }
  1405. j.payType = row.code;
  1406. data.push(j);
  1407. });
  1408. bankDate.value = data;
  1409. } else {
  1410. showToast(res.msg);
  1411. }
  1412. }
  1413. //取消
  1414. function cancelBank() {
  1415. dialogNewBank.value = false;
  1416. }
  1417. //24新年庆典
  1418. //是否到期-2023-11-25 00:00:00-2023-12-31 23:59:59
  1419. function isNewYear24Open() {
  1420. let endTime1 = "2025/3/31 23:59:59";
  1421. let startTime1 = "2025/1/1 00:00:00";
  1422. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1423. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1424. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1425. let now = new Date(
  1426. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1427. ).getTime();
  1428. let end = new Date(endTime1).getTime();
  1429. let start = new Date(startTime1).getTime();
  1430. if (now < end && start < now) {
  1431. ActivityNewYear24();
  1432. }
  1433. }
  1434. async function ActivityNewYear24() {
  1435. let res = await activityApi.ActivityNewYear24({});
  1436. if (res.code == Code.StatusOK) {
  1437. tableDataNewYear24.value = res.data;
  1438. if (typeof tableDataNewYear24.value == "object") {
  1439. toIncome();
  1440. }
  1441. } else {
  1442. showToast(res.msg);
  1443. }
  1444. }
  1445. function toIncome() {
  1446. NewYear24Data.balance = Number(tableDataNewYear24.value.balance) || 0;
  1447. // let rate = 0;
  1448. tableDataNewYear24.value.details.forEach((item) => {
  1449. if (
  1450. NewYear24Data.balance > item.min &&
  1451. NewYear24Data.balance <= item.max
  1452. ) {
  1453. NewYear24Data.rate = item.rate;
  1454. } else if (
  1455. NewYear24Data.balance > item.min &&
  1456. NewYear24Data.balance >= item.max &&
  1457. item.max == 0
  1458. ) {
  1459. NewYear24Data.rate = item.rate;
  1460. }
  1461. });
  1462. // console.log(NewYear24Data);
  1463. NewYear24Data.income = (
  1464. ((NewYear24Data.balance * NewYear24Data.rate) / 100 / 365) *
  1465. NewYear24RemainingTime()
  1466. ).toFixed(2);
  1467. tableDataNewYear24Flag.value = true;
  1468. }
  1469. function NewYear24RemainingTime() {
  1470. // let endTime1 = '2025/3/31 23:59:59';
  1471. // let startTime1 = '2025/1/1 00:00:00';
  1472. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1473. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1474. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1475. let now = new Date(
  1476. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1477. ).getTime();
  1478. // 获取当前月份的最后一天
  1479. let lastDayOfMonth = getFirstDayOfNextMonth();
  1480. // console.log(lastDayOfMonth);
  1481. let end = new Date(lastDayOfMonth).getTime();
  1482. // let now = new Date('2025/1/31 21:59:59').getTime();
  1483. // let end = new Date('2025/1/31 23:59:59').getTime();
  1484. let time = (end - now) / 60 / 60 / 1000 / 24;
  1485. time = Math.ceil(time);
  1486. return time;
  1487. }
  1488. function getFirstDayOfNextMonth() {
  1489. let timezone = 2; //目标时区时间,东3区 东时区正数 西市区负数
  1490. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  1491. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  1492. let now = new Date(
  1493. nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000
  1494. );
  1495. let lastDayOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0);
  1496. // console.log(lastDayOfMonth);
  1497. return lastDayOfMonth;
  1498. // const nextMonth = now.getMonth() + 1; // 当前月份加1
  1499. // const nextYear = now.getFullYear(); // 获取当前年份
  1500. // // 如果下个月大于11(即12月),年份需要增加1
  1501. // if (nextMonth > 11) {
  1502. // return new Date(nextYear + 1, 0, 1); // 下一年的1月1日
  1503. // } else {
  1504. // return new Date(nextYear, nextMonth, 1); // 下个月的1日
  1505. // }
  1506. }
  1507. // -------------------- watch --------------------
  1508. watch(loginValue, (newVal) => {
  1509. if (newVal) {
  1510. step2.value = true;
  1511. const found = loginOptions.value.find(opt => opt.login === Number(newVal))
  1512. loginValueDoc.value = found.label
  1513. showTable();
  1514. }
  1515. });
  1516. watch(isStep3, async (newVal) => {
  1517. if (newVal) {
  1518. await nextTick();
  1519. formRef.value?.clearValidate(); // 先清除旧错误
  1520. resetForm(); // 再重置数据(重置数据可能触发新校验)
  1521. await nextTick();
  1522. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  1523. }
  1524. });
  1525. watch(() => form.amount, (newVal) => {
  1526. if (newVal && channelData.value.rate) {
  1527. // form.amount1 = (newVal * channelData.rate).toFixed(2);
  1528. if (isFree.value) {
  1529. let feeAmount = 0;
  1530. if (channelData.value.feeTypeBank) {
  1531. if (channelData.value.feeTypeBank == 1) {
  1532. feeAmount =
  1533. Number(newVal || 0) *
  1534. (Number(channelData.value.freeBank || 0) / 100);
  1535. } else if (channelData.value.feeTypeBank == 2) {
  1536. feeAmount = Number(channelData.value.feeAmountBank || 0);
  1537. }
  1538. } else {
  1539. if (channelData.value.feeType == 1) {
  1540. feeAmount =
  1541. Number(newVal || 0) *
  1542. (Number(channelData.value.free || 0) / 100);
  1543. } else if (channelData.value.feeType == 2) {
  1544. feeAmount = Number(channelData.value.feeAmount || 0);
  1545. }
  1546. }
  1547. if (FreeNumber.value > 0) {
  1548. form.amount1 = new Decimal(Number(newVal || 0))
  1549. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1550. .toNumber();
  1551. } else {
  1552. form.amount1 = new Decimal(Number(newVal || 0))
  1553. .sub(new Decimal(Number(feeAmount || 0)))
  1554. .mul(new Decimal(Number(channelData.value.rate || 0)))
  1555. .toNumber();
  1556. }
  1557. } else {
  1558. form.amount1 = (newVal * channelData.value.rate).toFixed(2);
  1559. }
  1560. if (
  1561. ["CNY", "THB", "VND"].indexOf(channelData.value.transformCurrency) > -1
  1562. ) {
  1563. form.amount1 = parseInt(form.amount1);
  1564. }
  1565. }
  1566. });
  1567. // -------------------- lifecycle --------------------
  1568. onMounted(() => {
  1569. getDateList();
  1570. //调用手续费减免次数接口
  1571. getFreeNumber();
  1572. isNewYear24Open();
  1573. });
  1574. </script>
  1575. <style lang="scss" scoped>
  1576. @import "@/uni.scss";
  1577. .custom-withdraw {
  1578. .box {
  1579. margin-bottom: px2rpx(20);
  1580. .b-card {
  1581. background: #fff;
  1582. border-radius: px2rpx(12);
  1583. padding: px2rpx(20);
  1584. box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.03);
  1585. .card-top {
  1586. .tit {
  1587. font-size: px2rpx(16);
  1588. font-weight: 600;
  1589. margin-bottom: px2rpx(16);
  1590. display: flex;
  1591. align-items: center;
  1592. color: var(--color-navy-900);
  1593. position: relative;
  1594. padding-left: 20px;
  1595. &:after {
  1596. content: '';
  1597. position: absolute;
  1598. left: 0;
  1599. top: 50%;
  1600. transform: translateY(-50%);
  1601. width: 0;
  1602. height: 0;
  1603. border-top: 6px solid transparent;
  1604. border-bottom: 6px solid transparent;
  1605. border-left: 8px solid currentColor;
  1606. }
  1607. .iconfont {
  1608. margin-right: px2rpx(8);
  1609. color: var(--color-primary);
  1610. font-size: px2rpx(18);
  1611. }
  1612. }
  1613. }
  1614. .channelType {
  1615. font-size: px2rpx(15);
  1616. font-weight: 600;
  1617. margin: px2rpx(24) 0 px2rpx(12);
  1618. color: var(--color-navy-700);
  1619. padding-left: px2rpx(8);
  1620. border-left: px2rpx(4) solid var(--color-primary);
  1621. }
  1622. }
  1623. }
  1624. .reselect-btn {
  1625. margin-top: px2rpx(20);
  1626. display: flex;
  1627. justify-content: flex-end;
  1628. }
  1629. .s-btn {
  1630. &.reselect {
  1631. background-color: var(--color-zinc-100);
  1632. color: var(--color-navy-700);
  1633. border: none;
  1634. font-size: px2rpx(14);
  1635. padding: px2rpx(8) px2rpx(20);
  1636. border-radius: px2rpx(8);
  1637. &:active {
  1638. background-color: var(--color-zinc-200);
  1639. }
  1640. }
  1641. &[type="primary"] {
  1642. width: 100%;
  1643. height: px2rpx(48);
  1644. background: var(--color-navy-900);
  1645. color: #fff;
  1646. border-radius: px2rpx(12);
  1647. font-size: px2rpx(16);
  1648. font-weight: 600;
  1649. display: flex;
  1650. align-items: center;
  1651. justify-content: center;
  1652. border: none;
  1653. margin-top: px2rpx(30);
  1654. transition: all 0.2s;
  1655. &:active {
  1656. transform: scale(0.98);
  1657. background: var(--color-navy-800);
  1658. }
  1659. }
  1660. }
  1661. .add-back {
  1662. display: flex;
  1663. justify-content: space-between;
  1664. align-items: center;
  1665. margin-bottom: px2rpx(12);
  1666. padding: px2rpx(12) px2rpx(16);
  1667. background: var(--color-zinc-100);
  1668. border-radius: px2rpx(8);
  1669. text {
  1670. font-size: px2rpx(14);
  1671. color: var(--color-navy-700);
  1672. font-weight: 500;
  1673. }
  1674. .add-btn {
  1675. color: var(--color-primary);
  1676. font-weight: 600;
  1677. text-decoration: underline;
  1678. &:active {
  1679. opacity: 0.7;
  1680. }
  1681. }
  1682. }
  1683. .proof {
  1684. margin-top: px2rpx(8);
  1685. border: px2rpx(1) dashed var(--color-zinc-300);
  1686. border-radius: px2rpx(8);
  1687. padding: px2rpx(8);
  1688. display: flex;
  1689. justify-content: center;
  1690. align-items: center;
  1691. background: var(--color-zinc-50);
  1692. .state {
  1693. padding: px2rpx(4) px2rpx(12);
  1694. border-radius: px2rpx(4);
  1695. font-size: px2rpx(12);
  1696. font-weight: bold;
  1697. }
  1698. }
  1699. .agree {
  1700. margin: px2rpx(24) 0;
  1701. display: flex;
  1702. align-items: flex-start;
  1703. .checkbox {
  1704. display: flex;
  1705. align-items: flex-start;
  1706. gap: px2rpx(8);
  1707. :deep(uni-checkbox .uni-checkbox-input) {
  1708. border-radius: px2rpx(4);
  1709. width: px2rpx(18);
  1710. height: px2rpx(18);
  1711. }
  1712. text {
  1713. font-size: px2rpx(13);
  1714. color: var(--color-zinc-500);
  1715. line-height: 1.5;
  1716. }
  1717. }
  1718. }
  1719. .step3-attention {
  1720. // background: var(--color-error-50, #fff1f0);
  1721. border-radius: px2rpx(12);
  1722. margin-bottom: px2rpx(20);
  1723. .tips {
  1724. line-height: 1.8;
  1725. font-size: px2rpx(12);
  1726. color: #909399;
  1727. padding: px2rpx(12);
  1728. border-radius: px2rpx(4);
  1729. border-left: px2rpx(2) solid #409eff;
  1730. .title {
  1731. font-weight: 600;
  1732. margin-bottom: px2rpx(6);
  1733. color: #606266;
  1734. }
  1735. }
  1736. .attention {
  1737. font-size: px2rpx(14);
  1738. // color: var(--color-error-600, #cf1322);
  1739. line-height: 1.6;
  1740. }
  1741. .btn-bottom {
  1742. margin-top: px2rpx(20);
  1743. display: flex;
  1744. justify-content: center;
  1745. .btn {
  1746. background: var(--color-error-600, #cf1322);
  1747. color: #fff;
  1748. padding: px2rpx(10) px2rpx(48);
  1749. border-radius: px2rpx(24);
  1750. font-size: px2rpx(15);
  1751. font-weight: 700;
  1752. box-shadow: 0 px2rpx(4) px2rpx(10) rgba(207, 19, 34, 0.2);
  1753. transition: all 0.2s;
  1754. &:active {
  1755. transform: scale(0.96);
  1756. opacity: 0.8;
  1757. }
  1758. }
  1759. }
  1760. }
  1761. :deep(.base-info-form) {
  1762. .uni-row1 {
  1763. .uni-col {
  1764. padding: 0 px2rpx(10) !important;
  1765. }
  1766. .uni-forms-item {
  1767. min-height: px2rpx(79);
  1768. margin-bottom: px2rpx(10);
  1769. }
  1770. .uni-select,
  1771. .uni-combox,
  1772. .uni-easyinput__content,
  1773. .uni-date-editor--x {
  1774. border: none !important;
  1775. background-color: var(--color-zinc-100) !important;
  1776. border-radius: px2rpx(8) !important;
  1777. }
  1778. .uni-date-x {
  1779. border: none !important;
  1780. background-color: rgba(195, 195, 195, 0) !important;
  1781. }
  1782. .uni-easyinput__content-input {
  1783. height: px2rpx(35) !important;
  1784. }
  1785. }
  1786. }
  1787. @keyframes rotate {
  1788. from {
  1789. transform: rotate(0deg);
  1790. }
  1791. to {
  1792. transform: rotate(360deg);
  1793. }
  1794. }
  1795. }
  1796. </style>