agent-transfer.vue 33 KB

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