This commit is contained in:
parent
37c2262f80
commit
8d632dd3f8
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dashboard-container">
|
<div class="dashboard-container" v-if="userId === 1">
|
||||||
<el-card v-for="(item, index) in cardData" :key="index" class="stat-card" shadow="hover">
|
<el-card v-for="(item, index) in cardData" :key="index" class="stat-card" shadow="hover">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<h3>
|
<h3>
|
||||||
|
|
@ -12,11 +12,18 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
<Agent v-else />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { UserFilled } from '@element-plus/icons-vue'
|
import { UserFilled } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
|
import { getStorage } from '@/utils/storage'
|
||||||
|
import Agent from '@/views/agent/index.vue'
|
||||||
|
|
||||||
|
//控制id切换页面渲染
|
||||||
|
const userId = getStorage('userInfo')?.id
|
||||||
|
|
||||||
const cardData = [
|
const cardData = [
|
||||||
{ label: '代理总数', value: 100, icon: UserFilled },
|
{ label: '代理总数', value: 100, icon: UserFilled },
|
||||||
{ label: '今日新增代理总数', value: 100, icon: UserFilled },
|
{ label: '今日新增代理总数', value: 100, icon: UserFilled },
|
||||||
|
|
@ -59,7 +66,8 @@ const cardData = [
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
.icon{
|
|
||||||
|
.icon {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ const loginForm = ref({
|
||||||
email: 'test@163.com',
|
email: 'test@163.com',
|
||||||
countryCode: '+86',
|
countryCode: '+86',
|
||||||
phone: '',
|
phone: '',
|
||||||
password: '123456',
|
password: '888888',
|
||||||
code: '123456',
|
code: '123456',
|
||||||
})
|
})
|
||||||
const loginRules = ref<FormRules>({
|
const loginRules = ref<FormRules>({
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ const handleRegister = async () => {
|
||||||
reg_type: activeTab.value === 'email' ? 1 : 2,
|
reg_type: activeTab.value === 'email' ? 1 : 2,
|
||||||
invite_code: registerForm.value.inviteCode,
|
invite_code: registerForm.value.inviteCode,
|
||||||
code: registerForm.value.code,
|
code: registerForm.value.code,
|
||||||
password: md5Encrypt(registerForm.value.password)
|
password: registerForm.value.password
|
||||||
};
|
};
|
||||||
|
|
||||||
// 注册逻辑
|
// 注册逻辑
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue