| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <cwg-header :title="title" />
- <uni-loading v-if="loading" />
- <view id="custom_IbTransfer" class="transfer-page" v-else>
- <view class="main-content">
- <!-- 步骤1:选择转出账户 -->
- <cwg-asset-tabs v-model="activeTab" :tabs="tabsConfig" />
- <!-- 步骤2:转账表单 -->
- <view class="box box-step2">
- <view class="b-card">
- <view class="card-top">
- <view class="tit">
- <text>
- <text v-t="'Label.AgentNumber'"></text>
- :{{ ibInfo.ibNo }}
- </text>
- <text class="balance-kg"></text>
- <text>
- <text v-t="'Label.CommissionBalance'"></text>
- <text>:$</text>
- <text>{{ balanceInt }}</text>
- <text>.{{ balanceDecimal }}</text>
- </text>
- </view>
- <uni-forms ref="formRef" :model="form" :rules="rules" label-width="300" label-position="top"
- validate-trigger="submit">
- <view class="form-row">
- <view class="form-col">
- <!-- 转入账户 -->
- <uni-forms-item :label="toLabel" name="to"
- :error-message="deposittoErrorMessage">
- <cwg-combox v-model:value="form.to" :clearable="false"
- :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-row">
- <view class="form-col amount-box">
- <!-- 转账金额 -->
- <uni-forms-item :label="t('Custom.Transfer.Amount')" name="amount"
- :error-message="amountErrorMessage" class="amount-input">
- <uni-easyinput v-model="form.amount" :placeholder="t('placeholder.input')"
- @blur="validateAmount" />
- </uni-forms-item>
- <view class="btn" v-t="'State.All'" @click="setAllAmount"></view>
- </view>
- </view>
- <template v-if="activeTab != 3">
- <!-- 20%赠金-年中赠金 -->
- <view class="form-row" v-if="tableData4TwoFlag">
- <uni-forms-item class="agree">
- <checkbox-group :value="form.agree5 ? ['1'] : []" @change="onAgree5Change">
- <label class="checkbox">
- <checkbox value="1" :checked="form.agree5" />
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit1')
- }}</text>
- <view style="margin-top: 10px;line-height: 1.5; font-size: 14px">
- <text class="crm-cursor" @click.stop="dialogCheckTip = true">{{
- t('Custom.Withdraw.Des') }}</text>
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2')
- }}</text>
- <text class="clause crm-cursor"
- style="text-decoration: underline;"
- @click.stop="dialogClauseNZTwo = true">{{
- t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
- <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4')
- }}</text>
- </view>
- </label>
- </checkbox-group>
- </uni-forms-item>
- </view>
- <!-- 赠送活动 -->
- <view class="form-row" v-if="tableDataNewListFlag">
- <view class="form-col-full">
- <uni-forms-item name="agree6">
- <checkbox-group :value="form.agree6 ? ['1'] : []"
- @change="onAgree6Change">
- <label class="checkbox">
- <checkbox value="1" :checked="form.agree6" />
- <text @click.stop="dialogClauseNewList = true"
- style="text-decoration: underline;">{{
- tableDataNewList.title }}</text>
- <view
- style="margin-top: 10px; line-height: 1.5; font-size: 14px">
- <text> {{
- t('news_add_field1.activitiesNewList.item1') }}{{
- t('news_add_field1.activitiesNewList.item2') }}</text>
- </view>
- </label>
- </checkbox-group>
- </uni-forms-item>
- </view>
- </view>
- </template>
- <view class="form-row">
- <button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
- ?
- 'Enviar solicitud' : t('Btn.Submit') }}</button>
- </view>
- </uni-forms>
- </view>
- </view>
- </view>
- </view>
- <!-- 失败弹窗 -->
- <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
- <!-- 成功弹窗 -->
- <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
- <!-- 等待弹窗 -->
- <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
- <!-- 不参加活动弹出框 -->
- <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
- <!-- 功能关闭弹出 -->
- <cwg-function-disabled-popup v-model:visible="InfoStatus5" :showFooters="false" @confirm="toHome" />
- <!-- 赠金协议20年中 -->
- <BonusAgreementPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
- type="nzTwo" :tableData4Two="tableData4Two" />
- <!-- 赠送活动协议 -->
- <BonusAgreementPopup v-model:visible="dialogClauseNewList" :title="tableDataNewList.title"
- :content="tableDataNewList.content" type="newList" />
- </view>
- <cwg-confirm-popup />
- </cwg-page-wrapper>
- </template>
- <script setup>
- import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
- import { useI18n } from 'vue-i18n'
- import { onLoad } from '@dcloudio/uni-app'
- import { getCurrentInstance } from 'vue'
- import { ibApi } from '@/service/ib'
- import { activityApi } from '@/service/activity'
- import Config from '@/config/index'
- import useUserStore from '@/stores/use-user-store'
- import BonusAgreementPopup from './components/BonusAgreementPopup.vue'
- import { useFilters } from '@/composables/useFilters'
- const { numberFormat } = useFilters()
- const userStore = useUserStore()
- import { isAfterJuly28 } from '@/utils/dateUtils'
- const ibInfo = computed(() => {
- return userStore?.userInfo?.ibInfo || {}
- })
- const { Code } = Config
- const { t, locale } = useI18n()
- const activeTab = ref(1)
- const tabsConfig = computed(() => [
- { text: t('Ib.Transfer.CommissionTransfer'), value: 1, type: 'commission' },
- { text: t('Ib.Transfer.CommissionIssue'), value: 2, type: 'commissionIssue' },
- { text: t('Ib.Transfer.IbAccountTransfer'), value: 3, type: 'ib' },
- ])
- const title = computed(() => tabsConfig.value.find(item => item.value == activeTab.value)?.text || '')
- const toLabel = computed(() => activeTab.value == '1' || activeTab.value == '2' ? t('Label.IntoAccount') : t('Ib.Transfer.IntoAgentAccount'))
- // 获取全局实例(用于访问 Session、$pigeon 等)
- const { proxy } = getCurrentInstance()
- const $pigeon = proxy?.$pigeon
- import { useConfirm } from '@/hooks/useConfirm'
- const confirm = useConfirm()
- // 响应式数据
- const loginValue = ref('')
- const flag = ref(false)
- const RES = ref('') // 弹窗响应信息
- const giveLoginJoin = ref(null)
- const step2 = ref(false)
- const amountLimits = reactive({
- minAmount: '',
- maxAmount: '',
- })
- const form = reactive({
- currency: 'USD',
- depositLogin: null,
- to: null,
- amount: '',
- agree5: false,
- agree6: false,
- })
- const resetForm = async () => {
- await nextTick();
- formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
- form.customBankCode = ""
- form.depositLogin = ""
- form.withdrawLogin = ""
- form.to = ""
- form.amount = ""
- form.agree5 = false
- form.agree6 = false
- amountErrorMessage.value = ""
- submitting.value = false
- flag.value = false
- }
- const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
- const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
- const dialogCheck = ref(false)
- const dialogVisible = ref(false)
- const dialogCheckWait = ref(false)
- const InfoStatus5 = ref(false)
- const dialogClauseNZTwo = ref(false)
- const tableData4TwoFlag = ref(false)
- const tableData4Two = ref({})
- const dialogClauseNewList = ref(false)
- const tableDataNewListFlag = ref(false)
- const tableDataNewList = ref({})
- const dialogDontActive = ref(false)
- const submitting = ref(false)
- // 错误信息
- const depositErrorMessage = ref('')
- const depositLogin1ErrorMessage = ref('')
- const amountErrorMessage = ref('')
- // 表单验证规则
- const rules = {
- withdrawLogin: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- },
- ],
- },
- to: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- },
- ],
- },
- amount: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.amount.format'),
- },
- {
- validateFunction: (rule, value, data, callback) => {
- if (!value) {
- callback(t('vaildate.amount.format'))
- } else if (
- amountLimits.minAmount &&
- amountLimits.maxAmount &&
- (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
- parseFloat(amountLimits.maxAmount) < parseFloat(value))
- ) {
- callback(t('vaildate.amount.amount') +
- amountLimits.minAmount +
- '-' +
- amountLimits.maxAmount)
- } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
- callback(t('vaildate.amount.format'))
- }
- return true
- }
- },
- ],
- },
- agree5: {
- rules: [
- {
- validateFunction: (rule, value, data, callback) => {
- if (form.agree5) {
- return true;
- } else {
- callback(t('vaildate.agree.empty'));
- return false;
- }
- },
- trigger: 'change',
- },
- ],
- },
- }
- const onAgree5Change = (e) => {
- form.agree5 = e.detail.value.length > 0
- }
- const onAgree6Change = (e) => {
- form.agree6 = e.detail.value.length > 0
- }
- const balanceInt = computed(() => {
- return numberFormat(balance.value || 0, true)[0]
- })
- const balanceDecimal = computed(() => {
- return numberFormat(balance.value || 0, true)[1] || '00'
- })
- const balance = ref(0)
- //获取基础信息
- const getDateList = async () => {
- let res = await ibApi.IbData({});
- if (res.code == Code.StatusOK) {
- if (res.data != null) {
- balance.value = res.data.balance
- }
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- const setAllAmount = () => {
- form.amount = balance.value
- validateAmount()
- }
- function validateAmount() {
- const amount = form.amount
- if (!amount) {
- amountErrorMessage.value = t('vaildate.amount.format')
- return false
- }
- const numValue = parseFloat(amount)
- if (isNaN(numValue)) {
- amountErrorMessage.value = t('vaildate.amount.format')
- return false
- }
- if (amountLimits.minAmount && numValue < parseFloat(amountLimits.minAmount)) {
- amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
- return false
- }
- if (amountLimits.maxAmount && numValue > parseFloat(amountLimits.maxAmount)) {
- amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
- return false
- }
- if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
- amountErrorMessage.value = t('vaildate.amount.format')
- return false
- }
- amountErrorMessage.value = ''
- return true
- }
- // 模板引用
- const formRef = ref(null)
- // 计算属性
- const getInfoStatus5 = computed(() => {
- if (ibInfo.value?.closeFunctions) {
- return ibInfo.value.closeFunctions.indexOf('5') !== -1
- }
- return false
- })
- // 单位类型
- function groupCurrency(type) {
- const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
- return map[type] || ': $'
- }
- // 单位类型
- function groupCurrency1(type) {
- const map = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }
- return map[type] || '$'
- }
- // 账户类型
- function groupTypeName(type) {
- const typeMap = {
- '1': t('AccountType.ClassicAccount'),
- '2': t('AccountType.SeniorAccount'),
- '3': isAfterJuly28() ? '--' : t('AccountType.AgencyAccount'),
- '5': t('AccountType.SpeedAccount'),
- '6': t('AccountType.SpeedAccount'),
- '7': t('AccountType.StandardAccount'),
- '8': t('AccountType.CentAccount')
- }
- return typeMap[type] || ''
- }
- // 转入账户列表
- const depositDisplayList = computed(() => {
- if (activeTab.value != 3) {
- return toInfo.value.map(item => ({
- text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
- value: item.login,
- disabled: item.status
- }))
- } else {
- return agentInfo.value.map(item => ({
- text: `${item.ibNo} - ${item.name}`,
- value: item.id
- }))
- }
- })
- const fromInfo = ref('')
- const toInfo = ref([])
- const agentInfo = ref([])
- const loading = ref(false)
- //转出账户信息
- const ransferInfo = async function () {
- loading.value = true
- let res = await ibApi.agentBalanceTransferFrom({});
- if (res.code == Code.StatusOK) {
- fromInfo.value =
- res.data.ibNo +
- " - " +
- t("Custom.Deposit.AvailableBalance") +
- ": $" +
- (res.data.balance ? res.data.balance : 0);
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- loading.value = false
- }
- //转入账户信息
- const ransferToInfo = async function () {
- let res;
- // 佣金内转使用新接口 /account/dropdown
- if (activeTab.value == 1) {
- res = await ibApi.CustomDropdown({ platform: "" });
- } else {
- // 佣金下发和其他情况使用原接口
- res = await ibApi.agentTransferToList({});
- }
- if (res.code == Code.StatusOK) {
- toInfo.value = res.data || [];
- toInfo.value.forEach((item) => {
- if (item.closeFunctions && item.closeFunctions.length > 0) {
- const targetValues = ["7", "5", "9"];
- const hasTargetValue = item.closeFunctions.some(func => targetValues.includes(func));
- if (hasTargetValue) {
- item.status = true;
- }
- }
- })
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- //获取代理账户信息
- const getAgentInfo = async function () {
- let res = await ibApi.ibTreeForTransfer({});
- if (res.code == Code.StatusOK) {
- agentInfo.value = res.data || [];
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
- function toHome() {
- uni.navigateTo({ url: '/pages/ib/index' })
- InfoStatus5.value = false
- }
- function closeDia() {
- resetForm()
- formRef.value?.resetFields?.()
- step2.value = false
- loginValue.value = ''
- dialogCheck.value = false
- dialogVisible.value = false
- tableData4TwoFlag.value = false
- tableDataNewListFlag.value = false
- }
- // 内转
- async function toTransfer() {
- if (submitting.value) return
- try {
- const valid = await formRef.value?.validate()
- if (!valid) {
- console.log('表单验证失败')
- return
- }
- openDontActive()
- } catch (error) {
- console.error('验证失败:', error)
- }
- }
- // 打开不参加活动弹窗
- function openDontActive() {
- tosubmitConfirm()
- }
- function tosubmitConfirm() {
- dialogDontActive.value = false
- transferConfig()
- }
- async function transferConfig() {
- if (submitting.value) return
- submitting.value = true
- try {
- if (flag.value) {
- return
- }
- flag.value = true
- form.activityTwoPercentGive = form.agree5 ? 1 : 0
- form.activityGive = form.agree6 ? 1 : 0
- dialogCheckWait.value = true
- let api
- if (activeTab.value != 3) {
- api = ibApi.agentBalanceTransfer
- } else {
- api = ibApi.agentBalanceCommissionAdd
- }
- const res = await api({ ...form })
- dialogCheckWait.value = false
- if (res.code == Code.StatusOK) {
- dialogCheck.value = true
- dialogVisible.value = true
- flag.value = false
- } else {
- RES.value = res.msg
- dialogCheck.value = true
- dialogVisible.value = false
- flag.value = false
- }
- } catch (error) {
- console.error('转账失败:', error)
- RES.value = error.msg || t('Msg.Fail')
- dialogCheck.value = true
- dialogVisible.value = false
- } finally {
- submitting.value = false
- flag.value = false
- resetForm()
- if (dialogCheckWait.value) dialogCheckWait.value = false
- getDateList()
- uni.$emit('updatePayment')
- }
- }
- async function Activity24nianzhongTwoInfo() {
- const res = await activityApi.Activity23nianzhongTwoInfo({})
- if (res.code == Code.StatusOK) {
- tableData4Two.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- // 活动相关方法
- function togetActivity() {
- get23nianzhongTwoLogin()
- getActivityExtensionGiveLogin()
- getActivityExtensionGiveLoginJoin()
- }
- async function get23nianzhongTwoLogin() {
- const res = await activityApi.Activity23nianzhongTwoLogin({
- login: form.to,
- })
- if (res.code == Code.StatusOK) {
- tableData4Two.value = res.data
- if (tableData4Two.value.show == 1) {
- tableData4TwoFlag.value = true
- } else if (tableData4Two.value.show == 0) {
- tableData4TwoFlag.value = false
- }
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- async function getActivityExtensionGiveLogin() {
- const res = await activityApi.ActivityExtensionGiveLogin({
- login: form.to,
- })
- if (res.code == Code.StatusOK) {
- tableDataNewList.value = res.data
- if (tableDataNewList.value.show == 1) {
- tableDataNewListFlag.value = true
- } else if (tableDataNewList.value.show == 0) {
- tableDataNewListFlag.value = false
- }
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- async function getActivityExtensionGiveLoginJoin() {
- const res = await activityApi.ActivityExtensionGiveLoginJoin({
- login: form.to,
- })
- if (res.code == Code.StatusOK) {
- giveLoginJoin.value = res.data
- } else {
- uni.showToast({ title: res.msg, icon: 'none' })
- giveLoginJoin.value = ''
- }
- }
- // 监听 activeTab 变化
- watch(activeTab, (newVal) => {
- if (newVal) {
- console.log(newVal, 1212);
- if (newVal == 3) {
- getAgentInfo()
- } else {
- ransferToInfo()
- }
- resetForm()
- }
- })
- //
- watch(loginValue, (newVal) => {
- if (newVal) {
- step2.value = true
- form.withdrawLogin = newVal
- }
- })
- watch(() => form.to, (newVal) => {
- if (activeTab.value == 3) {
- getAgentInfo()
- } else {
- togetActivity()
- }
- })
- // 监听 agree6 变化
- watch(
- () => form.agree6,
- async (newVal) => {
- if (newVal && giveLoginJoin.value?.flag === false) {
- let tips = "";
- if (giveLoginJoin.value.promptType == 1) {
- tips = t("surplusList.item10");
- } else {
- tips = t("surplusList.item11");
- }
- // 根据 activityCategory 显示不同的操作按钮
- if (giveLoginJoin.value.activityCategory == 1) {
- try {
- // 第一次弹窗:取消活动
- await confirm({
- title: t("Msg.SystemPrompt"),
- content: tips,
- confirmText: t("surplusList.item12"),
- cancelText: t("Home.msg.item3"),
- });
- await new Promise((resolve) => {
- setTimeout(() => {
- resolve(true);
- }, 300);
- });
- await confirm({
- title: t("Msg.SystemPrompt"),
- content: t("surplusList.item13"),
- confirmText: t("Btn.Confirm"),
- cancelText: t("Btn.Cancel"),
- });
- // 调用取消接口
- const res = await activityApi.ActivityGiveCancel({
- login: loginValue.value,
- });
- if (res.code == Code.StatusOK) {
- MessageOK(res.msg || t("Msg.Success"));
- } else {
- MessageError(res.msg);
- }
- } catch (error) {
- // 任意一步取消 → 取消勾选
- form.agree6 = false;
- }
- } else if (giveLoginJoin.value.activityCategory == 2) {
- try {
- // 第一次弹窗:跳转
- await confirm({
- title: t("Msg.SystemPrompt"),
- content: tips,
- confirmText: "跳转",
- cancelText: t("Btn.Cancel"),
- showCancelButton: false,
- });
- await new Promise((resolve) => {
- setTimeout(() => {
- resolve(true);
- }, 300);
- });
- await confirm({
- title: t("Msg.SystemPrompt"),
- content: "是否跳转到对应活动取消",
- confirmText: t("Btn.Confirm"),
- cancelText: t("Btn.Cancel"),
- });
- // 跳转到月盈活动
- uni.navigateTo({
- path: "/pages/activity/monthly-list",
- });
- } catch (error) {
- // 取消 → 取消勾选
- form.agree6 = false;
- }
- } else {
- // 默认情况
- try {
- await confirm({
- title: t("Msg.SystemPrompt"),
- content: tips,
- confirmText: t("Btn.Confirm"),
- cancelText: t("Btn.Cancel"),
- });
- } catch (error) {
- form.agree6 = false;
- }
- }
- }
- }
- );
- onMounted(() => {
- if (getInfoStatus5.value) {
- InfoStatus5.value = true
- }
- getDateList()
- ransferInfo();
- ransferToInfo();
- // Activity24nianzhongTwoInfo()
- })
- onLoad((options) => {
- if (options?.login) {
- loginValue.value = options.login
- step2.value = true
- form.withdrawLogin = options.login
- }
- if (options?.tab) {
- activeTab.value = options?.tab
- }
- })
- </script>
- <style lang="scss" scoped>
- @import "@/uni.scss";
- .transfer-page {
- width: 100%;
- padding-bottom: px2rpx(20);
- .main-content {
- text-align: left;
- .box {
- padding-top: px2rpx(5);
- color: #303133;
- .b-card {
- background-color: #fff;
- margin-bottom: px2rpx(10);
- border-radius: px2rpx(6);
- box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
- &:hover {
- box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
- }
- .card-top {
- padding: px2rpx(15) px2rpx(20);
- box-sizing: border-box;
- .card-row {
- margin-bottom: px2rpx(12);
- &:last-child {
- margin-bottom: 0;
- }
- }
- .tit {
- font-size: px2rpx(16);
- font-weight: 600;
- margin-bottom: px2rpx(16);
- display: flex;
- align-items: center;
- color: var(--color-navy-900);
- position: relative;
- padding-left: 20px;
- &:after {
- content: '';
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- width: 0;
- height: 0;
- border-top: 6px solid transparent;
- border-bottom: 6px solid transparent;
- border-left: 8px solid currentColor;
- }
- .iconfont {
- margin-right: px2rpx(8);
- color: var(--color-primary);
- font-size: px2rpx(18);
- }
- }
- .balance-kg {
- width: px2rpx(20);
- }
- .title-wrapper {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- }
- }
- }
- .box-step2 {
- .form-row {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: px2rpx(12);
- gap: px2rpx(12);
- &:last-child {
- margin-bottom: 0;
- }
- .form-col {
- flex: 1;
- min-width: px2rpx(140);
- @media screen and (max-width: 991px) {
- flex: 0 0 100%;
- width: 100%;
- }
- }
- .amount-box {
- display: flex;
- align-items: center;
- gap: px2rpx(12);
- .amount-input {
- flex: 1;
- }
- .btn {
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: px2rpx(14);
- color: var(--color-zinc-600);
- margin-bottom: px2rpx(20);
- height: px2rpx(35);
- background-color: #cf1322;
- color: #fff;
- border-radius: px2rpx(4);
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- border: none;
- padding: 0 px2rpx(20);
- cursor: pointer;
- margin-top: px2rpx(34);
- }
- }
- .form-col-full {
- width: 100%;
- padding: 0 px2rpx(5);
- }
- }
- .tips {
- line-height: 1.8;
- font-size: px2rpx(12);
- color: #909399;
- background-color: #f9f9f9;
- padding: px2rpx(12);
- border-radius: px2rpx(4);
- border-left: px2rpx(2) solid #cf1322;
- .title {
- font-weight: 600;
- margin-bottom: px2rpx(6);
- color: #606266;
- }
- }
- }
- }
- .picker-select {
- background-color: #f5f7fa;
- border: 1px solid #dcdfe6;
- border-radius: px2rpx(4);
- padding: px2rpx(12) px2rpx(14);
- font-size: px2rpx(14);
- color: #606266;
- line-height: 1.4;
- width: 100%;
- box-sizing: border-box;
- &:hover {
- border-color: #409eff;
- }
- &.picker-disabled {
- background-color: #f5f7fa;
- color: #c0c4cc;
- cursor: not-allowed;
- }
- }
- .disabled-input {
- background-color: #f5f7fa;
- border: 1px solid #dcdfe6;
- border-radius: px2rpx(4);
- padding: px2rpx(12) px2rpx(14);
- font-size: px2rpx(14);
- color: #606266;
- width: 100%;
- box-sizing: border-box;
- }
- .m-input {
- background-color: #f5f7fa;
- border: 1px solid #dcdfe6;
- border-radius: px2rpx(4);
- padding: px2rpx(12) px2rpx(14);
- font-size: px2rpx(14);
- width: 100%;
- box-sizing: border-box;
- &:focus {
- border-color: #409eff;
- outline: none;
- box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
- }
- }
- }
- // 动画
- @keyframes popupFadeIn {
- from {
- opacity: 0;
- transform: scale(0.9);
- }
- to {
- opacity: 1;
- transform: scale(1);
- }
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- transform: translateY(px2rpx(10));
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- @keyframes pulse {
- 0% {
- transform: scale(1);
- }
- 50% {
- transform: scale(1.05);
- }
- 100% {
- transform: scale(1);
- }
- }
- @keyframes spin {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
- }
- // 表单错误信息样式
- .uni-forms-item__error {
- font-size: px2rpx(12);
- color: #f56c6c;
- margin-top: px2rpx(4);
- }
- // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
- @media (max-width: 750rpx) {
- .transfer-page {
- .main-content {
- padding: px2rpx(8);
- .box {
- .b-card {
- .card-top {
- padding: px2rpx(12) px2rpx(16);
- .tit {
- font-size: px2rpx(14);
- .iconfont {
- font-size: px2rpx(16);
- }
- }
- }
- }
- }
- }
- .s-btn {
- font-size: px2rpx(14);
- padding: px2rpx(10) px2rpx(16);
- }
- }
- }
- </style>
|