agent-transfer.vue 35 KB

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