agent-transfer.vue 33 KB

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