transfer.vue 31 KB

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