agent-transfer.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_ib.item9')" />
  4. <uni-loading v-if="loading" />
  5. <view id="custom_IbTransfer" class="transfer-page" v-else>
  6. <view class="main-content">
  7. <!-- 步骤1:选择转出账户 -->
  8. <view class="box box-step1">
  9. <view class="b-card">
  10. <view class="card-top">
  11. <view class="card-row">
  12. <view class="tit">
  13. <text class="iconfont icon-caret-right"></text>
  14. <span>{{ t('Custom.Transfer.Title1') }}</span>
  15. </view>
  16. </view>
  17. <view class="card-row">
  18. <cwg-combox v-model:value="loginValue" :clearable="false" :options="withdrawDisplayList"
  19. :placeholder="t('placeholder.choose')" />
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 步骤2:转账表单 -->
  25. <view class="box box-step2" v-if="step2">
  26. <view class="b-card">
  27. <view class="card-top">
  28. <view class="card-row card-tit">
  29. <view class="title-wrapper">
  30. <view class="tit">
  31. <text class="iconfont icon-caret-right"></text>
  32. <span>{{ t('Custom.Transfer.Title2') }}</span>
  33. </view>
  34. </view>
  35. </view>
  36. <uni-forms ref="formRef" :model="form" :rules="rules" label-width="300" label-position="top"
  37. validate-trigger="submit">
  38. <view class="form-row">
  39. <view class="form-col">
  40. <!-- 转入账户 -->
  41. <uni-forms-item :label="t('Custom.Transfer.IntoAccount')" name="depositLogin">
  42. <cwg-combox v-model:value="form.depositLogin" :clearable="false"
  43. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  44. </uni-forms-item>
  45. </view>
  46. </view>
  47. <view class="form-row">
  48. <view class="form-col">
  49. <!-- 确认转入账户 -->
  50. <uni-forms-item :label="t('Custom.Transfer.ConfirmIntoAccount')"
  51. name="depositLogin1">
  52. <cwg-combox v-model:value="form.depositLogin1" :clearable="false"
  53. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  54. </uni-forms-item>
  55. </view>
  56. </view>
  57. <view class="form-row">
  58. <view class="form-col amount-box">
  59. <!-- 转账金额 -->
  60. <uni-forms-item :label="t('Custom.Transfer.Amount')" name="amount"
  61. :error-message="amountErrorMessage" class="amount-input">
  62. <uni-easyinput v-model="form.amount" :placeholder="t('placeholder.input')"
  63. @blur="validateAmount" />
  64. </uni-forms-item>
  65. <view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
  66. </view>
  67. </view>
  68. <!-- 20%赠金-年中赠金 -->
  69. <view class="form-row" v-if="tableData4TwoFlag">
  70. <view class="form-col-full">
  71. <uni-forms-item class="agree">
  72. <view class="agree-content">
  73. <checkbox :checked="form.agree5" @click="form.agree5 = !form.agree5" />
  74. <view class="agree-text">
  75. <view class="agree-title">{{
  76. t('news_add_field1.activitiesNZTwo.itemDeposit1') }}</view>
  77. </view>
  78. </view>
  79. </uni-forms-item>
  80. <view class="agree-detail">
  81. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2') }}</text>
  82. <text class="clause crm-cursor" style="text-decoration: underline;"
  83. @click="dialogClauseNZTwo = true">{{
  84. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  85. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4') }}</text>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 赠送活动 -->
  90. <view class="form-row" v-if="tableDataNewListFlag">
  91. <view class="form-col-full">
  92. <uni-forms-item class="agree">
  93. <view class="agree-content">
  94. <checkbox :checked="form.agree6" @click="form.agree6 = !form.agree6" />
  95. <view class="agree-text">
  96. <view class="agree-title">{{ tableDataNewList.title }}</view>
  97. </view>
  98. </view>
  99. </uni-forms-item>
  100. <view class="agree-detail">
  101. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  102. <text class="clause" @click="dialogClauseNewList = true">{{
  103. tableDataNewList.title }}</text>
  104. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="form-row">
  109. <view class="form-col-full">
  110. <uni-forms-item>
  111. <view class="tips">
  112. <view class="title">{{ t('Custom.Transfer.Tips') }}</view>
  113. <view>{{ t('Custom.Transfer.Tips1') }}</view>
  114. <view>{{ t('Custom.Transfer.Tips5') }}</view>
  115. <view>{{ t('Custom.Transfer.Tips3') }}</view>
  116. <view>{{ t('Custom.Transfer.Tips4') }}</view>
  117. </view>
  118. </uni-forms-item>
  119. </view>
  120. </view>
  121. <view class="form-row">
  122. <button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
  123. ?
  124. 'Enviar solicitud' : t('Btn.Submit') }}</button>
  125. </view>
  126. </uni-forms>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. <!-- 失败弹窗 -->
  132. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  133. <!-- 成功弹窗 -->
  134. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  135. <!-- 等待弹窗 -->
  136. <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
  137. <!-- 不参加活动弹出框 -->
  138. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  139. <!-- 功能关闭弹出 -->
  140. <cwg-function-disabled-popup v-model:visible="InfoStatus5" :showFooters="false" @confirm="toHome" />
  141. <!-- 赠金协议20年中 -->
  142. <BonusAgreementPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  143. type="nzTwo" :tableData4Two="tableData4Two" />
  144. <!-- 赠送活动协议 -->
  145. <BonusAgreementPopup v-model:visible="dialogClauseNewList" :title="tableDataNewList.title"
  146. :content="tableDataNewList.content" type="newList" />
  147. </view>
  148. </cwg-page-wrapper>
  149. </template>
  150. <script setup>
  151. import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
  152. import { useI18n } from 'vue-i18n'
  153. import { onLoad } from '@dcloudio/uni-app'
  154. import { getCurrentInstance } from 'vue'
  155. import { ibApi } from '@/service/ib'
  156. import { activityApi } from '@/service/activity'
  157. import { financialApi } from '@/service/financial'
  158. import Config from '@/config/index'
  159. import useUserStore from '@/stores/use-user-store'
  160. import BonusAgreementPopup from './components/BonusAgreementPopup.vue'
  161. const userStore = useUserStore()
  162. const ibInfo = computed(() => {
  163. return userStore?.userInfo?.ibInfo || {}
  164. })
  165. const { Code } = Config
  166. const { t, locale } = useI18n()
  167. // 获取全局实例(用于访问 Session、$pigeon 等)
  168. const { proxy } = getCurrentInstance()
  169. const $pigeon = proxy?.$pigeon
  170. // 响应式数据
  171. const loginValue = ref(null)
  172. const flag = ref(false)
  173. const RES = ref('') // 弹窗响应信息
  174. const giveLoginJoin = ref('')
  175. const loginOptions = ref([])
  176. const toOptions = ref([])
  177. const step2 = ref(false)
  178. const amountLimits = reactive({
  179. minAmount: '',
  180. maxAmount: '',
  181. })
  182. const form = reactive({
  183. currency: 'USD',
  184. depositLogin: null,
  185. depositLogin1: null,
  186. withdrawLogin: null,
  187. amount: '',
  188. agree5: false,
  189. agree6: false,
  190. })
  191. const resetForm = async () => {
  192. await nextTick();
  193. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  194. form.customBankCode = ""
  195. form.depositLogin = null
  196. form.depositLogin1 = null
  197. form.withdrawLogin = null
  198. form.amount = ""
  199. form.agree5 = false
  200. form.agree6 = false
  201. amountErrorMessage.value = ""
  202. submitting.value = false
  203. flag.value = false
  204. }
  205. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  206. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  207. const dialogCheck = ref(false)
  208. const dialogVisible = ref(false)
  209. const dialogCheckWait = ref(false)
  210. const InfoStatus5 = ref(false)
  211. const dialogClauseNZTwo = ref(false)
  212. const tableData4TwoFlag = ref(false)
  213. const tableData4Two = ref({})
  214. const dialogClauseNewList = ref(false)
  215. const tableDataNewListFlag = ref(false)
  216. const tableDataNewList = ref({})
  217. const dialogDontActive = ref(false)
  218. const submitting = ref(false)
  219. // 错误信息
  220. const amountErrorMessage = ref('')
  221. // 表单验证规则
  222. const rules = {
  223. withdrawLogin: {
  224. rules: [
  225. {
  226. required: true,
  227. errorMessage: t('vaildate.select.empty')
  228. },
  229. ],
  230. },
  231. depositLogin: {
  232. rules: [
  233. {
  234. required: true,
  235. errorMessage: t('vaildate.select.empty')
  236. },
  237. ],
  238. },
  239. depositLogin1: {
  240. rules: [
  241. {
  242. required: true,
  243. errorMessage: t('Custom.Transfer.ConfirmIntoAccount1')
  244. },
  245. {
  246. validateFunction: (rule, value, data, callback) => {
  247. if (value !== form.depositLogin) {
  248. callback(t('Custom.Transfer.ConfirmIntoAccount1'))
  249. }
  250. return true
  251. }
  252. },
  253. ],
  254. },
  255. amount: {
  256. rules: [
  257. {
  258. required: true,
  259. errorMessage: t('vaildate.amount.format'),
  260. },
  261. {
  262. validateFunction: (rule, value, data, callback) => {
  263. if (!value) {
  264. callback(t('vaildate.amount.format'))
  265. } else if (
  266. amountLimits.minAmount &&
  267. amountLimits.maxAmount &&
  268. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  269. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  270. ) {
  271. callback(t('vaildate.amount.amount') +
  272. amountLimits.minAmount +
  273. '-' +
  274. amountLimits.maxAmount)
  275. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  276. callback(t('vaildate.amount.format'))
  277. }
  278. return true
  279. }
  280. },
  281. ],
  282. }
  283. }
  284. function validateAmount() {
  285. const amount = form.amount
  286. if (!amount) {
  287. amountErrorMessage.value = t('vaildate.amount.format')
  288. return false
  289. }
  290. const numValue = parseFloat(amount)
  291. if (isNaN(numValue)) {
  292. amountErrorMessage.value = t('vaildate.amount.format')
  293. return false
  294. }
  295. if (amountLimits.minAmount && numValue < parseFloat(amountLimits.minAmount)) {
  296. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  297. return false
  298. }
  299. if (amountLimits.maxAmount && numValue > parseFloat(amountLimits.maxAmount)) {
  300. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  301. return false
  302. }
  303. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  304. amountErrorMessage.value = t('vaildate.amount.format')
  305. return false
  306. }
  307. amountErrorMessage.value = ''
  308. return true
  309. }
  310. const setAllAmount = () => {
  311. const found = loginOptions.value.find(opt => opt.login === Number(loginValue.value))
  312. form.amount = found.balance
  313. validateAmount()
  314. }
  315. // 模板引用
  316. const formRef = ref(null)
  317. // 计算属性
  318. const getInfoStatus5 = computed(() => {
  319. if (ibInfo.value?.closeFunctions) {
  320. return ibInfo.value.closeFunctions.indexOf('5') !== -1
  321. }
  322. return false
  323. })
  324. // 单位类型
  325. function groupCurrency(type) {
  326. const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
  327. return map[type] || ': $'
  328. }
  329. function groupCurrency1(type) {
  330. const map = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }
  331. return map[type] || '$'
  332. }
  333. // 账户类型
  334. function groupTypeName(type) {
  335. const typeMap = {
  336. '1': t('AccountType.ClassicAccount'),
  337. '2': t('AccountType.SeniorAccount'),
  338. '5': t('AccountType.SpeedAccount'),
  339. '6': t('AccountType.SpeedAccount'),
  340. '7': t('AccountType.StandardAccount'),
  341. '8': t('AccountType.CentAccount')
  342. }
  343. return typeMap[type] || ''
  344. }
  345. // 转出账户列表
  346. const withdrawDisplayList = computed(() => {
  347. return loginOptions.value.map(item => ({
  348. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  349. value: item.login,
  350. disable: item.closeFunctions?.indexOf('3') != -1 || item.closeFunctions?.indexOf('5') != -1
  351. }))
  352. })
  353. // 转入账户列表
  354. const depositDisplayList = computed(() => {
  355. return toOptions.value.map(item => ({
  356. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
  357. value: item.login
  358. }))
  359. })
  360. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  361. function toHome() {
  362. uni.navigateTo({ url: '/pages/ib/index' })
  363. InfoStatus5.value = false
  364. }
  365. function closeDia() {
  366. resetForm()
  367. formRef.value?.resetFields?.()
  368. step2.value = false
  369. loginValue.value = null
  370. dialogCheck.value = false
  371. dialogVisible.value = false
  372. tableData4TwoFlag.value = false
  373. tableDataNewListFlag.value = false
  374. }
  375. // 内转
  376. async function toTransfer() {
  377. if (submitting.value) return
  378. try {
  379. const valid = await formRef.value?.validate()
  380. if (!valid) {
  381. console.log('表单验证失败')
  382. return
  383. }
  384. openDontActive()
  385. } catch (error) {
  386. console.error('验证失败:', error)
  387. }
  388. }
  389. // 打开不参加活动弹窗
  390. function openDontActive() {
  391. tosubmitConfirm()
  392. }
  393. function tosubmitConfirm() {
  394. dialogDontActive.value = false
  395. transferConfig()
  396. }
  397. async function transferConfig() {
  398. if (submitting.value) return
  399. submitting.value = true
  400. try {
  401. if (flag.value) {
  402. return
  403. }
  404. flag.value = true
  405. form.activityTwoPercentGive = form.agree5 ? 1 : 0
  406. form.activityGive = form.agree6 ? 1 : 0
  407. dialogCheckWait.value = true
  408. const res = await ibApi.agentTransferApply({ ...form })
  409. dialogCheckWait.value = false
  410. if (res.code == Code.StatusOK) {
  411. dialogCheck.value = true
  412. dialogVisible.value = true
  413. flag.value = false
  414. } else {
  415. RES.value = res.msg
  416. dialogCheck.value = true
  417. dialogVisible.value = false
  418. flag.value = false
  419. }
  420. } catch (error) {
  421. console.error('转账失败:', error)
  422. RES.value = error.msg
  423. dialogCheck.value = true
  424. dialogVisible.value = false
  425. } finally {
  426. resetForm()
  427. if (dialogCheckWait.value) dialogCheckWait.value = false
  428. }
  429. }
  430. // 取消
  431. function cancle() {
  432. step2.value = false
  433. loginValue.value = null
  434. }
  435. // 获取账户信息
  436. async function getDateList() {
  437. const res = await ibApi.CustomDropdown({ platform: '' })
  438. if (res.code == Code.StatusOK) {
  439. loginOptions.value = res.data
  440. } else {
  441. uni.showToast({ title: res.msg, icon: 'none' })
  442. }
  443. }
  444. const loading = ref(false)
  445. // 获取转入账户信息
  446. async function getToDateList() {
  447. loading.value = true
  448. const res = await ibApi.accountCustomList({})
  449. if (res.code == Code.StatusOK) {
  450. toOptions.value = res.data
  451. } else {
  452. uni.showToast({ title: res.msg, icon: 'none' })
  453. }
  454. loading.value = false
  455. }
  456. // 获取内转数额区间
  457. async function getAmount() {
  458. const res = await financialApi.transferInfo({})
  459. if (res.code == Code.StatusOK) {
  460. Object.assign(amountLimits, res.data)
  461. } else {
  462. uni.showToast({ title: res.msg, icon: 'none' })
  463. }
  464. }
  465. async function Activity24nianzhongTwoInfo() {
  466. const res = await activityApi.Activity23nianzhongTwoInfo({})
  467. if (res.code == Code.StatusOK) {
  468. tableData4Two.value = res.data
  469. } else {
  470. uni.showToast({ title: res.msg, icon: 'none' })
  471. }
  472. }
  473. // 活动相关方法
  474. function togetActivity() {
  475. get23nianzhongTwoLogin()
  476. getActivityExtensionGiveLogin()
  477. getActivityExtensionGiveLoginJoin()
  478. }
  479. async function get23nianzhongTwoLogin() {
  480. const res = await activityApi.Activity23nianzhongTwoLogin({
  481. login: form.depositLogin,
  482. })
  483. if (res.code == Code.StatusOK) {
  484. tableData4Two.value = res.data
  485. if (tableData4Two.value.show == 1) {
  486. tableData4TwoFlag.value = true
  487. } else if (tableData4Two.value.show == 0) {
  488. tableData4TwoFlag.value = false
  489. }
  490. } else {
  491. uni.showToast({ title: res.msg, icon: 'none' })
  492. }
  493. }
  494. async function getActivityExtensionGiveLogin() {
  495. const res = await activityApi.ActivityExtensionGiveLogin({
  496. login: form.depositLogin,
  497. })
  498. if (res.code == Code.StatusOK) {
  499. tableDataNewList.value = res.data
  500. if (tableDataNewList.value.show == 1) {
  501. tableDataNewListFlag.value = true
  502. } else if (tableDataNewList.value.show == 0) {
  503. tableDataNewListFlag.value = false
  504. }
  505. } else {
  506. uni.showToast({ title: res.msg, icon: 'none' })
  507. }
  508. }
  509. async function getActivityExtensionGiveLoginJoin() {
  510. const res = await activityApi.ActivityExtensionGiveLoginJoin({
  511. login: form.depositLogin,
  512. })
  513. if (res.code == Code.StatusOK) {
  514. giveLoginJoin.value = res.data
  515. } else {
  516. uni.showToast({ title: res.msg, icon: 'none' })
  517. giveLoginJoin.value = ''
  518. }
  519. }
  520. // 监听 loginValue 变化
  521. watch(loginValue, (newVal) => {
  522. if (newVal != null) {
  523. step2.value = true
  524. form.withdrawLogin = Number(newVal)
  525. form.depositLogin = null
  526. form.depositLogin1 = null
  527. form.amount = ''
  528. form.agree5 = false
  529. form.agree6 = false
  530. amountErrorMessage.value = ''
  531. }
  532. })
  533. // 监听 loginValue 变化
  534. watch(form.depositLogin, (newVal) => {
  535. if (newVal) {
  536. togetActivity()
  537. }
  538. })
  539. // 监听 agree6 变化
  540. watch(() => form.agree6, (newVal) => {
  541. if (newVal && giveLoginJoin.value?.flag === false) {
  542. let tips = ''
  543. if (giveLoginJoin.value.promptType == 1) {
  544. tips = t('surplusList.item10')
  545. } else {
  546. tips = t('surplusList.item11')
  547. }
  548. return
  549. // 活动相关方法,后续需要在调整
  550. if (giveLoginJoin.value.activityCategory == 1) {
  551. $pigeon?.MessageConfirm(
  552. tips,
  553. t('Msg.SystemPrompt'),
  554. t('surplusList.item12'),
  555. t('Home.msg.item3'),
  556. () => {
  557. $pigeon?.MessageConfirm(
  558. t('surplusList.item13'),
  559. t('Msg.SystemPrompt'),
  560. t('Btn.Confirm'),
  561. t('Btn.Cancel'),
  562. async () => {
  563. try {
  564. const res = await activityApi.ActivityGiveCancel({
  565. login: loginValue.value,
  566. })
  567. if (res.code == Code.StatusOK) {
  568. $pigeon?.MessageOK(res.msg || t('Msg.Success'))
  569. } else {
  570. uni.showToast({ title: res.msg, icon: 'none' })
  571. }
  572. } catch (error) {
  573. $pigeon?.MessageError(t('Msg.Fail'))
  574. }
  575. },
  576. () => {
  577. form.agree6 = false
  578. }
  579. )
  580. },
  581. () => {
  582. form.agree6 = false
  583. }
  584. )
  585. } else {
  586. $pigeon?.MessageConfirm(
  587. tips,
  588. t('Msg.SystemPrompt'),
  589. t('Btn.Confirm'),
  590. t('Btn.Cancel'),
  591. () => { },
  592. () => {
  593. form.agree6 = false
  594. }
  595. )
  596. }
  597. }
  598. })
  599. onMounted(() => {
  600. if (getInfoStatus5.value) {
  601. InfoStatus5.value = true
  602. }
  603. getDateList()
  604. getToDateList()
  605. getAmount()
  606. // Activity24nianzhongTwoInfo()
  607. })
  608. onLoad((options) => {
  609. if (options?.login) {
  610. loginValue.value = Number(options.login)
  611. step2.value = true
  612. form.withdrawLogin = Number(options.login)
  613. }
  614. })
  615. </script>
  616. <style lang="scss" scoped>
  617. @import "@/uni.scss";
  618. .transfer-page {
  619. width: 100%;
  620. padding-bottom: px2rpx(20);
  621. .main-content {
  622. text-align: left;
  623. .box {
  624. padding-top: px2rpx(5);
  625. color: #303133;
  626. .b-card {
  627. background-color: #fff;
  628. margin-bottom: px2rpx(10);
  629. border-radius: px2rpx(6);
  630. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  631. &:hover {
  632. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  633. }
  634. .card-top {
  635. padding: px2rpx(15) px2rpx(20);
  636. box-sizing: border-box;
  637. .card-row {
  638. margin-bottom: px2rpx(12);
  639. &:last-child {
  640. margin-bottom: 0;
  641. }
  642. }
  643. .tit {
  644. font-size: px2rpx(16);
  645. font-weight: 600;
  646. margin-bottom: px2rpx(16);
  647. display: flex;
  648. align-items: center;
  649. color: var(--color-navy-900);
  650. position: relative;
  651. padding-left: 20px;
  652. &:after {
  653. content: '';
  654. position: absolute;
  655. left: 0;
  656. top: 50%;
  657. transform: translateY(-50%);
  658. width: 0;
  659. height: 0;
  660. border-top: 6px solid transparent;
  661. border-bottom: 6px solid transparent;
  662. border-left: 8px solid currentColor;
  663. }
  664. .iconfont {
  665. margin-right: px2rpx(8);
  666. color: var(--color-primary);
  667. font-size: px2rpx(18);
  668. }
  669. }
  670. .title-wrapper {
  671. display: flex;
  672. justify-content: space-between;
  673. align-items: center;
  674. }
  675. }
  676. }
  677. }
  678. .box-step2 {
  679. .form-row {
  680. display: flex;
  681. flex-wrap: wrap;
  682. margin-bottom: px2rpx(12);
  683. gap: px2rpx(12);
  684. &:last-child {
  685. margin-bottom: 0;
  686. }
  687. .form-col {
  688. flex: 1;
  689. min-width: px2rpx(140);
  690. @media screen and (max-width: 991px) {
  691. flex: 0 0 100%;
  692. width: 100%;
  693. }
  694. }
  695. .amount-box {
  696. display: flex;
  697. align-items: center;
  698. gap: px2rpx(12);
  699. .amount-input {
  700. flex: 1;
  701. }
  702. .btn {
  703. display: flex;
  704. align-items: center;
  705. justify-content: center;
  706. font-size: px2rpx(14);
  707. color: var(--color-zinc-600);
  708. margin-bottom: px2rpx(20);
  709. height: px2rpx(35);
  710. background-color: #cf1322;
  711. color: #fff;
  712. border-radius: px2rpx(4);
  713. font-weight: 600;
  714. display: flex;
  715. align-items: center;
  716. justify-content: center;
  717. border: none;
  718. padding: 0 px2rpx(20);
  719. cursor: pointer;
  720. margin-top: px2rpx(34);
  721. }
  722. }
  723. .form-col-full {
  724. width: 100%;
  725. padding: 0 px2rpx(5);
  726. }
  727. }
  728. .tips {
  729. line-height: 1.8;
  730. font-size: px2rpx(12);
  731. color: #909399;
  732. background-color: #f9f9f9;
  733. padding: px2rpx(12);
  734. border-radius: px2rpx(4);
  735. border-left: px2rpx(2) solid #cf1322;
  736. .title {
  737. font-weight: 600;
  738. margin-bottom: px2rpx(6);
  739. color: #606266;
  740. }
  741. }
  742. }
  743. }
  744. .picker-select {
  745. background-color: #f5f7fa;
  746. border: 1px solid #dcdfe6;
  747. border-radius: px2rpx(4);
  748. padding: px2rpx(12) px2rpx(14);
  749. font-size: px2rpx(14);
  750. color: #606266;
  751. line-height: 1.4;
  752. width: 100%;
  753. box-sizing: border-box;
  754. &:hover {
  755. border-color: #409eff;
  756. }
  757. &.picker-disabled {
  758. background-color: #f5f7fa;
  759. color: #c0c4cc;
  760. cursor: not-allowed;
  761. }
  762. }
  763. .disabled-input {
  764. background-color: #f5f7fa;
  765. border: 1px solid #dcdfe6;
  766. border-radius: px2rpx(4);
  767. padding: px2rpx(12) px2rpx(14);
  768. font-size: px2rpx(14);
  769. color: #606266;
  770. width: 100%;
  771. box-sizing: border-box;
  772. }
  773. .m-input {
  774. background-color: #f5f7fa;
  775. border: 1px solid #dcdfe6;
  776. border-radius: px2rpx(4);
  777. padding: px2rpx(12) px2rpx(14);
  778. font-size: px2rpx(14);
  779. width: 100%;
  780. box-sizing: border-box;
  781. &:focus {
  782. border-color: #409eff;
  783. outline: none;
  784. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  785. }
  786. }
  787. .popup-content {
  788. padding: px2rpx(30) px2rpx(20);
  789. text-align: center;
  790. min-width: px2rpx(250);
  791. max-width: 80%;
  792. margin: 0 auto;
  793. @media screen and (max-width: 991px) {
  794. min-width: 80%;
  795. max-width: 90%;
  796. margin: 0 px2rpx(10);
  797. }
  798. position: relative;
  799. .icon {
  800. .iconfont {
  801. font-size: px2rpx(60);
  802. display: block;
  803. margin: 0 auto;
  804. }
  805. .icon-chenggong {
  806. color: #67c23a;
  807. }
  808. .icon-jingshi {
  809. color: #f56c6c;
  810. }
  811. .icon-dengdai {
  812. color: #e6a23c;
  813. }
  814. }
  815. .des1 {
  816. font-weight: 600;
  817. font-size: px2rpx(16);
  818. margin: px2rpx(20) 0 px2rpx(15);
  819. color: #303133;
  820. line-height: 1.4;
  821. padding: 0 px2rpx(10);
  822. }
  823. .dialog-footer {
  824. display: flex;
  825. justify-content: center;
  826. gap: px2rpx(10);
  827. margin-top: px2rpx(10);
  828. @media (max-width: 750rpx) {
  829. flex-direction: column;
  830. align-items: center;
  831. gap: px2rpx(6);
  832. }
  833. button {
  834. min-width: px2rpx(90);
  835. padding: 0 px2rpx(12);
  836. border-radius: px2rpx(4);
  837. font-size: px2rpx(14);
  838. transition: all 0.3s ease;
  839. cursor: pointer;
  840. &[type="primary"] {
  841. background-color: #409eff;
  842. color: #fff;
  843. border: none;
  844. &:hover {
  845. background-color: #66b1ff;
  846. transform: translateY(px2rpx(-1));
  847. box-shadow: 0 px2rpx(2) px2rpx(6) 0 rgba(64, 158, 255, 0.3);
  848. }
  849. &:active {
  850. background-color: #3a8ee6;
  851. transform: translateY(0);
  852. }
  853. }
  854. &:not([type="primary"]) {
  855. background-color: #fff;
  856. border: 1px solid #dcdfe6;
  857. color: #606266;
  858. &:hover {
  859. border-color: #409eff;
  860. color: #409eff;
  861. transform: translateY(px2rpx(-1));
  862. }
  863. &:active {
  864. transform: translateY(0);
  865. }
  866. }
  867. }
  868. }
  869. }
  870. .wait-popup {
  871. .des1 {
  872. margin-top: px2rpx(10);
  873. }
  874. .icon {
  875. .iconfont {
  876. animation: spin 1s linear infinite;
  877. }
  878. }
  879. }
  880. }
  881. // 动画
  882. @keyframes popupFadeIn {
  883. from {
  884. opacity: 0;
  885. transform: scale(0.9);
  886. }
  887. to {
  888. opacity: 1;
  889. transform: scale(1);
  890. }
  891. }
  892. @keyframes fadeIn {
  893. from {
  894. opacity: 0;
  895. transform: translateY(px2rpx(10));
  896. }
  897. to {
  898. opacity: 1;
  899. transform: translateY(0);
  900. }
  901. }
  902. @keyframes pulse {
  903. 0% {
  904. transform: scale(1);
  905. }
  906. 50% {
  907. transform: scale(1.05);
  908. }
  909. 100% {
  910. transform: scale(1);
  911. }
  912. }
  913. @keyframes spin {
  914. from {
  915. transform: rotate(0deg);
  916. }
  917. to {
  918. transform: rotate(360deg);
  919. }
  920. }
  921. // 表单错误信息样式
  922. .uni-forms-item__error {
  923. font-size: px2rpx(12);
  924. color: #f56c6c;
  925. margin-top: px2rpx(4);
  926. }
  927. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  928. @media (max-width: 750rpx) {
  929. .transfer-page {
  930. .main-content {
  931. padding: px2rpx(8);
  932. .box {
  933. .b-card {
  934. .card-top {
  935. padding: px2rpx(12) px2rpx(16);
  936. .tit {
  937. font-size: px2rpx(14);
  938. .iconfont {
  939. font-size: px2rpx(16);
  940. }
  941. }
  942. }
  943. }
  944. }
  945. }
  946. .s-btn {
  947. font-size: px2rpx(14);
  948. padding: px2rpx(10) px2rpx(16);
  949. }
  950. .popup-content {
  951. padding: px2rpx(20) px2rpx(16);
  952. .icon {
  953. .iconfont {
  954. font-size: px2rpx(50);
  955. }
  956. }
  957. .des1 {
  958. font-size: px2rpx(14);
  959. margin: px2rpx(15) 0 px2rpx(10);
  960. }
  961. .dialog-footer {
  962. button {
  963. min-width: px2rpx(80);
  964. font-size: px2rpx(13);
  965. }
  966. }
  967. }
  968. }
  969. }
  970. </style>