This commit is contained in:
李远 2026-03-20 13:05:00 +08:00
parent 37c2262f80
commit 8d632dd3f8
3 changed files with 12 additions and 4 deletions

View File

@ -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;
} }
} }

View File

@ -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>({

View File

@ -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
}; };
// //