agent-transfer.vue 33 KB

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