|
|
@@ -1,176 +0,0 @@
|
|
|
-<template>
|
|
|
- <app-view class="mine">
|
|
|
- <template #header>
|
|
|
- <app-navbar :title="$t('mine.title')" :show-back-button="false" @ready="onReady" />
|
|
|
- </template>
|
|
|
- <div ref="headerRef" class="mine-header">
|
|
|
- <div class="mine-header__wrapper">
|
|
|
- <div class="profile">
|
|
|
- <div class="profile-user">
|
|
|
- <div class="profile-user__avatar" @click="routerTo('user-avatar')">
|
|
|
- <img class="g-image--avatar" :src="userStore.userAvatar" />
|
|
|
- </div>
|
|
|
- <div class="profile-user__info">
|
|
|
- <div class="top">
|
|
|
- <span>{{ userStore.customerName }}</span>
|
|
|
- <Icon name="checked" color="var(--van-tag-success-color)"
|
|
|
- v-if="authStatus === AuthStatus.Certified" />
|
|
|
- <Icon name="warning" color="var(--van-tag-warning-color)" v-else />
|
|
|
- </div>
|
|
|
- <div class="bottom">{{ loginStore.loginId }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="profile-account">
|
|
|
- <div class="profile-account-first">
|
|
|
- <span>{{ $t('account.account') }}</span>
|
|
|
- <span class="status">{{ $t('mine.normal') }}</span>
|
|
|
- </div>
|
|
|
- <span>{{ currentAccount.accountid ?? 0 }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="bank">
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>{{ $t('mine.balance') }}</span>
|
|
|
- <span>{{ currentAccount.currentbalance?.toFixed(2) }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('mine.netWorth') }}</span>
|
|
|
- <span>{{ currentAccount.hazardValue?.toFixed(2) }}</span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>{{ $t('mine.freezeMargin') }}</span>
|
|
|
- <span>{{ currentAccount.freezeMargin?.toFixed(2) }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('mine.usedMargin') }}</span>
|
|
|
- <span>{{ currentAccount.usedmargin?.toFixed(2) }}</span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>{{ $t('mine.availableFunds') }}</span>
|
|
|
- <span>{{ currentAccount.avaiableMoney?.toFixed(2) }}</span>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>{{ $t('mine.riskRate') }}</span>
|
|
|
- <span :class="currentAccount.hazardRatioColor">
|
|
|
- {{ parsePercent(currentAccount.hazardRatio) }}
|
|
|
- </span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="button">
|
|
|
- <Button type="danger" size="small" round @click="doInOutMoney('0')">{{ $t('mine.cashin') }}</Button>
|
|
|
- <Button size="small" round @click="doInOutMoney('1')">{{ $t('mine.cashout') }}</Button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <app-block class="mine-iconbar">
|
|
|
- <ul>
|
|
|
- <li @click="routerTo('order-position')">
|
|
|
- <Iconfont label-direction="bottom" icon="g-icon-position--line">{{ $t('mine.myposition') }}</Iconfont>
|
|
|
- </li>
|
|
|
- <li @click="routerTo('order-list')">
|
|
|
- <Iconfont label-direction="bottom" icon="g-icon-order--line">{{ $t('mine.myorder') }}</Iconfont>
|
|
|
- </li>
|
|
|
- <li @click="routerTo('order-delivery')">
|
|
|
- <Iconfont label-direction="bottom" icon="g-icon-delivery--line">{{ $t('mine.delivery') }}</Iconfont>
|
|
|
- </li>
|
|
|
- <li @click="routerTo('points-account')">
|
|
|
- <Iconfont label-direction="bottom" icon="g-icon-swap--line">积分信息</Iconfont>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </app-block>
|
|
|
- <app-block class="g-navmenu">
|
|
|
- <CellGroup>
|
|
|
- <Cell is-link :to="{ name: 'bank-capital' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-capital">{{ $t('mine.fundsinfo') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'account-authresult' }" v-if="authStatus === AuthStatus.Submitted">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-certification">实名认证</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'account-certification' }" v-else-if="authStatus !== AuthStatus.Certified">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-certification">实名认证</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified && canBankSign">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-sign">签约账户</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'account-protocol' }"
|
|
|
- v-if="signRecords.length && userStore.userType != 2 && authStatus === AuthStatus.Certified">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-order--line">合同签署</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'mine-profile' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-profile">{{ $t('mine.personalinformation') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'rules-zcxy' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-zcxy">{{ $t('rules.zcxy') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'rules-yszc' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-yszc">{{ $t('rules.yszc') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'rules-fwrx' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-fwrx">{{ $t('rules.fwrx') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'mine-setting' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-setting">{{ $t('mine.settings') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- <Cell is-link :to="{ name: 'rules-gywm' }">
|
|
|
- <template #title>
|
|
|
- <Iconfont icon="g-icon-gywm">{{ $t('mine.aboutus') }}</Iconfont>
|
|
|
- </template>
|
|
|
- </Cell>
|
|
|
- </CellGroup>
|
|
|
- </app-block>
|
|
|
- <div class="mine-footer">
|
|
|
- <Button class="button-logout" type="danger" size="small" round @click="userLogout">{{ $t('common.logout') }}</Button>
|
|
|
- </div>
|
|
|
- </app-view>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script lang="ts" setup>
|
|
|
-import { Cell, CellGroup, Button, Icon } from 'vant'
|
|
|
-import { parsePercent } from '@/filters'
|
|
|
-import { AuthStatus } from '@/constants/account'
|
|
|
-import Iconfont from '@/components/base/iconfont/index.vue'
|
|
|
-import { useSetup } from '../../../sbyj/views/mine/composables'
|
|
|
-
|
|
|
-const {
|
|
|
- loginStore,
|
|
|
- userStore,
|
|
|
- authStatus,
|
|
|
- currentAccount,
|
|
|
- signRecords,
|
|
|
- canBankSign,
|
|
|
- userLogout,
|
|
|
- onReady,
|
|
|
- routerTo,
|
|
|
- doInOutMoney
|
|
|
-} = useSetup()
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less">
|
|
|
-@import '@mobile/views/mine/index.less';
|
|
|
-</style>
|