transfer.vue 29 KB

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