withdrawal.vue 59 KB

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