perf: page style
This commit is contained in:
+14
-27
@@ -40,23 +40,23 @@
|
|||||||
<template #title>
|
<template #title>
|
||||||
<div
|
<div
|
||||||
style="display: flex;align-items: center;justify-content:space-between;flex-direction: row;padding: 10px 0;">
|
style="display: flex;align-items: center;justify-content:space-between;flex-direction: row;padding: 10px 0;">
|
||||||
<a-avatar @click="toMine" class="avatar" :size="50">U</a-avatar>
|
<a-avatar class="avatar" :size="55">U</a-avatar>
|
||||||
<div
|
<div style="display: flex;align-items:flex-start;flex-direction: column;margin-left: 10px;font-weight: normal;">
|
||||||
style="display: flex;align-items:flex-start;flex-direction: column;margin: 0 10px;font-weight: normal;">
|
|
||||||
<span>{{ user.email }}</span>
|
<span>{{ user.email }}</span>
|
||||||
<sapn style="font-size: 12px;color: #476FFF;"><crown-two-tone style="font-size:15px;"
|
<a-tag v-if="user.version == 1" color="green"><template #icon><crown-filled /></template>基础版</a-tag>
|
||||||
two-tone-color="#476FFF" /> {{ user.versionText }}</sapn>
|
<a-tag v-if="user.version == 2" color="blue"><template #icon><crown-filled /></template>专业版</a-tag>
|
||||||
|
<a-tag v-if="user.version == 3" color="orange"><template #icon><crown-filled /></template>高级版</a-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div style="display: flex;align-items: center;justify-content:space-between;flex-direction: row;">
|
<div style="display: flex;align-items: center;justify-content: center;flex-direction: row;">
|
||||||
<a-button type="text" style="color: #476FFF;" @click="onDelete">注销账号</a-button>
|
<a-button type="text" style="color: #476FFF;" @click="onDelete">注销账号</a-button>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a-button type="text" @click="onLogout">退出登录</a-button>
|
<a-button type="text" @click="onLogout">退出登录</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<a-avatar @click="popoverVisible = true" class="avatar" :size="28">U</a-avatar>
|
<a-avatar @click="onUserAvatar" class="avatar" :size="28">U</a-avatar>
|
||||||
</a-popover>
|
</a-popover>
|
||||||
</div>
|
</div>
|
||||||
<!-- 注销账号弹出框 -->
|
<!-- 注销账号弹出框 -->
|
||||||
@@ -95,7 +95,7 @@ import { getUserInfo, getVerifyCode, userDelete } from '../api/user';
|
|||||||
import { DashboardOutlined, SmileOutlined, MehOutlined, ShoppingOutlined } from '@ant-design/icons-vue';
|
import { DashboardOutlined, SmileOutlined, MehOutlined, ShoppingOutlined } from '@ant-design/icons-vue';
|
||||||
import { CrownOutlined, MenuUnfoldOutlined, MenuFoldOutlined, QuestionCircleFilled } from '@ant-design/icons-vue';
|
import { CrownOutlined, MenuUnfoldOutlined, MenuFoldOutlined, QuestionCircleFilled } from '@ant-design/icons-vue';
|
||||||
import { SmileFilled, BellFilled } from '@ant-design/icons-vue';
|
import { SmileFilled, BellFilled } from '@ant-design/icons-vue';
|
||||||
import { ExclamationCircleOutlined, CrownTwoTone } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined, CrownFilled } from '@ant-design/icons-vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
SmileFilled,
|
SmileFilled,
|
||||||
BellFilled,
|
BellFilled,
|
||||||
ExclamationCircleOutlined,
|
ExclamationCircleOutlined,
|
||||||
CrownTwoTone,
|
CrownFilled,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
// 菜单选项
|
// 菜单选项
|
||||||
@@ -184,32 +184,19 @@ export default {
|
|||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
userInfo()
|
|
||||||
store.selectedKeys = 'dashboard'
|
store.selectedKeys = 'dashboard'
|
||||||
router.push('dashboard')
|
router.push('dashboard')
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取用户信息
|
// 点击用户头像
|
||||||
const userInfo = () => {
|
const onUserAvatar = () => {
|
||||||
getUserInfo().then((res) => {
|
getUserInfo().then((res) => {
|
||||||
if (res.data.code == 0) {
|
if (res.data.code == 0) {
|
||||||
user.name = res.data.data.name
|
user.name = res.data.data.name
|
||||||
user.email = res.data.data.email
|
user.email = res.data.data.email
|
||||||
switch (res.data.data.version) {
|
user.version = res.data.data.version
|
||||||
case 1:
|
|
||||||
user.versionText = '基础版'
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
user.versionText = '专业版'
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
user.versionText = '高级版'
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
user.versionText = ''
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
popoverVisible = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,7 +271,7 @@ export default {
|
|||||||
loading,
|
loading,
|
||||||
disabled,
|
disabled,
|
||||||
buttonText,
|
buttonText,
|
||||||
userInfo,
|
onUserAvatar,
|
||||||
onDelete,
|
onDelete,
|
||||||
onLogout,
|
onLogout,
|
||||||
onGetCode,
|
onGetCode,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
show-icon /><br />
|
show-icon /><br />
|
||||||
<a-row :gutter="30">
|
<a-row :gutter="30">
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-card :class="version == 1 ? 'selected-free-card' : 'card'" :bordered="false">
|
<a-card :class="activedClass[0]" :bordered="false">
|
||||||
<span class="member-tag" style="color: #33B9FE;">基础版</span>
|
<span class="member-tag" style="color: #33B9FE;">基础版</span>
|
||||||
<h2 class="title">免费
|
<h2 class="title">免费
|
||||||
<check-circle-filled v-if="ver == 1" class="icon" />
|
<check-circle-filled v-if="ver == 1" class="icon" />
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-card :class="version == 2 ? 'selected-card' : 'card'" :bordered="false">
|
<a-card :class="activedClass[1]" :bordered="false">
|
||||||
<span class="member-tag" style="color: #3788FF;">专业版</span>
|
<span class="member-tag" style="color: #3788FF;">专业版</span>
|
||||||
<h2 class="title">按月付费,每月18元</h2>
|
<h2 class="title">按月付费,每月18元</h2>
|
||||||
<div class="content">能力不设限,新功能优先体验</div><br />
|
<div class="content">能力不设限,新功能优先体验</div><br />
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-card :class="version == 3 ? 'selected-card' : 'card'" :bordered="false">
|
<a-card :class="activedClass[2]" :bordered="false">
|
||||||
<span class="member-tag" style="color: #3788FF;">高级版</span>
|
<span class="member-tag" style="color: #3788FF;">高级版</span>
|
||||||
<h2 class="title">按年付费,每年198元</h2>
|
<h2 class="title">按年付费,每年198元</h2>
|
||||||
<div class="content">能力不设限,新功能优先体验</div><br />
|
<div class="content">能力不设限,新功能优先体验</div><br />
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onBeforeMount } from 'vue';
|
import { ref, reactive, onBeforeMount } from 'vue';
|
||||||
import { CheckCircleFilled } from '@ant-design/icons-vue';
|
import { CheckCircleFilled } from '@ant-design/icons-vue';
|
||||||
import { subscribePay, getSubscribeInfo } from '../api/subscribe';
|
import { subscribePay, getSubscribeInfo } from '../api/subscribe';
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
const payUrl = ref()
|
const payUrl = ref()
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
const active = ref(30)
|
const activedClass = reactive(['card', 'card', 'card'])
|
||||||
|
|
||||||
const payResult = ref(false)
|
const payResult = ref(false)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
@@ -110,6 +110,12 @@ export default {
|
|||||||
if (res.data.data.version !== 1) {
|
if (res.data.data.version !== 1) {
|
||||||
disabled.value = true
|
disabled.value = true
|
||||||
}
|
}
|
||||||
|
if (res.data.data.version == 1) {
|
||||||
|
activedClass[0] = 'selected-free-card'
|
||||||
|
}
|
||||||
|
if (res.data.data.version == 2 || res.data.data.version == 3) {
|
||||||
|
activedClass[res.data.data.version-1] = 'selected-card'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -123,7 +129,7 @@ export default {
|
|||||||
disabled,
|
disabled,
|
||||||
payResult,
|
payResult,
|
||||||
title,
|
title,
|
||||||
active,
|
activedClass,
|
||||||
buttonText,
|
buttonText,
|
||||||
isClick,
|
isClick,
|
||||||
subscribeInfo,
|
subscribeInfo,
|
||||||
|
|||||||
Reference in New Issue
Block a user