withdrawal.vue 59 KB

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