agent-transfer.vue 34 KB

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