transfer.vue 33 KB

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