更新个人中心
This commit is contained in:
parent
d62ef9084e
commit
dcbe6c4037
|
|
@ -5,7 +5,7 @@ VITE_BUILD_MODE = 'dev'
|
|||
VITE_API_URL = '/proxyApi'
|
||||
|
||||
# 开发环境接口地址
|
||||
VITE_proxyTarget = 'http://10.40.92.66:9205' #盛旭
|
||||
# VITE_proxyTarget = 'http://10.40.92.66:9205' #盛旭
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9200' # 赵福海
|
||||
VITE_proxyTarget = 'http://10.40.92.185:9200' # 赵福海
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const useStore = defineStore('main', {
|
|||
{
|
||||
// 自定义存储的 key,默认是 store.$id
|
||||
key: 'main',
|
||||
storage: localStorage, //缓存模式 可选 localStorage sessionStorage
|
||||
storage: sessionStorage, //缓存模式 可选 localStorage sessionStorage
|
||||
// state 中的字段名,按组打包储存
|
||||
paths: ['token'] //需要缓存的字段 与 state中相关联
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,16 +11,16 @@
|
|||
})
|
||||
|
||||
const handlerLogin = async () => {
|
||||
// const res: any = await loginApi(loginForm.value)
|
||||
// console.log(res, '登录成功**')
|
||||
// if (res.code === 200) {
|
||||
// ElMessage({
|
||||
// showClose: true,
|
||||
// message: '登录成功',
|
||||
// type: 'success'
|
||||
// })
|
||||
// }
|
||||
// userStore.setToken(res.data.access_token)
|
||||
const res: any = await loginApi(loginForm.value)
|
||||
console.log(res, '登录成功**')
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: '登录成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
userStore.setToken(res.data.access_token)
|
||||
// 跳转登录页面
|
||||
router.push('/')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
import Navmenu from 'components/Navmenu/index.vue'
|
||||
import { useStore } from 'store/main'
|
||||
const userStore = useStore()
|
||||
onMounted(() => {
|
||||
console.log(userStore.token, '****')
|
||||
})
|
||||
onMounted(() => {})
|
||||
|
||||
const leftNavList = [
|
||||
{
|
||||
|
|
@ -246,13 +244,13 @@
|
|||
</div>
|
||||
|
||||
<ul class="equip-pic">
|
||||
<li>
|
||||
<li @click="$router.push('equipDetail/5')" style="cursor: pointer">
|
||||
<EquipCard />
|
||||
</li>
|
||||
<li>
|
||||
<li @click="$router.push('equipDetail/5')" style="cursor: pointer">
|
||||
<EquipCard />
|
||||
</li>
|
||||
<li>
|
||||
<li @click="$router.push('equipDetail/5')" style="cursor: pointer">
|
||||
<EquipCard />
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
<script setup lang="ts">
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import EnterpriseCertification from '../../EnterpriseCertification.vue'
|
||||
import { el } from 'element-plus/es/locale'
|
||||
// 旧手机号码
|
||||
const oldPhoneNumber = ref('15336652321')
|
||||
// 修改新手机号码的数据源
|
||||
const editForm = ref({
|
||||
v_phone: '13522222'
|
||||
const editForm = reactive({
|
||||
v_phone: ''
|
||||
})
|
||||
|
||||
const editPhoneFormRules = reactive({
|
||||
v_phone: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入新手机号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const editPhoneFormRef: any = ref()
|
||||
// 修改手机号码弹框显示隐藏
|
||||
const editDialogTableVisible = ref(false)
|
||||
|
||||
|
|
@ -19,8 +32,12 @@
|
|||
}
|
||||
// 修改弹框确定
|
||||
const submitEditPhone = () => {
|
||||
console.log('确定修改')
|
||||
editDialogTableVisible.value = false
|
||||
editPhoneFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
editDialogTableVisible.value = false
|
||||
} else {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改弹框关闭
|
||||
const closeEditBtn = () => {
|
||||
|
|
@ -129,15 +146,20 @@
|
|||
|
||||
<!-- 修改手机号码弹框 -->
|
||||
<el-dialog v-model="editDialogTableVisible" title="修改手机号码" width="30%">
|
||||
<el-form :model="editForm">
|
||||
<el-form-item label="原手机号码">
|
||||
<el-form
|
||||
:model="editForm"
|
||||
ref="editPhoneFormRef"
|
||||
:rules="editPhoneFormRules"
|
||||
status-icon
|
||||
label-width="120px">
|
||||
<el-form-item label="原手机号码" prop="old_phone">
|
||||
<el-input
|
||||
v-model="oldPhoneNumber"
|
||||
autocomplete="off"
|
||||
disabled
|
||||
style="width: 220px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="新手机号码">
|
||||
<el-form-item label="新手机号码" prop="v_phone">
|
||||
<el-input
|
||||
v-model="editForm.v_phone"
|
||||
autocomplete="off"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,22 @@
|
|||
const pageSize = 20
|
||||
const pageNumber = 1
|
||||
const total: any = 20
|
||||
|
||||
const addSubAccountForm = reactive({
|
||||
subAccount: ''
|
||||
})
|
||||
|
||||
const addSubAccountFormRef: any = ref()
|
||||
|
||||
const addSubAccountFormRules: any = reactive({
|
||||
subAccount: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入子账号',
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
// 获取数据列表
|
||||
const getList = () => {
|
||||
console.log('获取数据列表***')
|
||||
|
|
@ -40,6 +56,16 @@
|
|||
console.log('新增')
|
||||
addSubAccountdialogVisible.value = true
|
||||
}
|
||||
|
||||
// 新增弹框的确定按钮
|
||||
const handlerSubmit = () => {
|
||||
addSubAccountFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
addSubAccountdialogVisible.value = false
|
||||
} else {
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -78,14 +104,20 @@
|
|||
|
||||
<!-- 新增子账号弹框 -->
|
||||
<el-dialog v-model="addSubAccountdialogVisible" title="新增子账号" width="30%">
|
||||
<el-form>
|
||||
<el-form-item label="手机号">
|
||||
<el-input autocomplete="off" />
|
||||
<el-form
|
||||
:model="addSubAccountForm"
|
||||
ref="addSubAccountFormRef"
|
||||
:rules="addSubAccountFormRules">
|
||||
<el-form-item label="手机号" prop="subAccount">
|
||||
<el-input
|
||||
autocomplete="off"
|
||||
v-model.trim="addSubAccountForm.subAccount"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addSubAccountdialogVisible = false">确 定</el-button>
|
||||
<el-button @click="handlerSubmit">确 定</el-button>
|
||||
<el-button type="primary" @click="addSubAccountdialogVisible = false">
|
||||
取 消
|
||||
</el-button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue