Parcourir la source

init

newStyle
lancer il y a 3 ans
Parent
révision
d0a43f7f97
3 fichiers modifiés avec 29 ajouts et 31 suppressions
  1. +1
    -1
      src/page/index/index.vue
  2. +4
    -4
      src/page/index/top/index.vue
  3. +24
    -26
      src/views/admin/user/info.vue

+ 1
- 1
src/page/index/index.vue Voir le fichier

@@ -95,7 +95,7 @@ export default {
},
openMenu(item = {}) {
this.$store.dispatch("GetMenu", {type: true, id: item.id}).then(data => {
console.log(data,'这里是data');
// console.log(data,'这里是data');
if (data.length !== 0) {
this.$router.$avueRouter.formatRoutes(data, true);
}


+ 4
- 4
src/page/index/top/index.vue Voir le fichier

@@ -107,9 +107,9 @@
content="用户头像"
placement="bottom"
>
<img id="thumbnail" class="top-bar__img" />
<!-- <img id="thumbnail" class="top-bar__img" /> -->
</el-tooltip>
<el-dropdown>
<el-dropdown style="cursor: pointer;">
<span class="el-dropdown-link">
{{ userInfo.username }}
<i class="el-icon-arrow-down el-icon--right" />
@@ -118,9 +118,9 @@
<el-dropdown-item divided>
<router-link to="/">首页</router-link>
</el-dropdown-item>
<!-- <el-dropdown-item divided>
<el-dropdown-item divided>
<router-link to="/info/index">个人信息</router-link>
</el-dropdown-item> -->
</el-dropdown-item>
<el-dropdown-item divided @click.native="$refs.seting.open()"
>界面设置
</el-dropdown-item>


+ 24
- 26
src/views/admin/user/info.vue Voir le fichier

@@ -1,19 +1,3 @@
<!--
- Copyright (c) 2018-2025, lengleng All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- Neither the name of the pig4cloud.com developer nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
- Author: lengleng (wangiegie@gmail.com)
-->

<template>
<div class="app-container calendar-list-container">
@@ -29,7 +13,7 @@
>
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="头像">
<!-- <el-form-item label="头像">
<el-upload
:headers="headers"
:show-file-list="false"
@@ -40,20 +24,20 @@
<img v-if="ruleForm.avatar" id="avatar" :src="avatarUrl" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon" />
</el-upload>
</el-form-item>
</el-form-item> -->
<el-form-item label="用户名" prop="username">
<el-input v-model="ruleForm.username" type="text" disabled />
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="ruleForm.phone" placeholder="验证码登录使用" />
<el-input v-model="ruleForm.phone" disabled placeholder="验证码登录使用" />
</el-form-item>
<!--
<el-form-item label="社交登录" prop="social">
<a href="#" class="icon-weixin1" @click="handleClick('wechat')"></a>|
<a href="#" class="icon-qq" @click="handleClick('tencent')"></a> |
<a href="#" class="icon-gitee-fill-round" @click="handleClick('gitee')"></a> |
<a href="#" class="icon-C" @click="handleClick('osc')"></a>
</el-form-item>
</el-form-item> -->
<el-form-item label="原密码" prop="password">
<el-input v-model="ruleForm.password" type="password" auto-complete="off" />
</el-form-item>
@@ -116,6 +100,7 @@ export default {
newpassword2: "",
avatar: "",
phone: "",
userId:'',
},
rules: {
phone: [{ required: false, validator: validatePhone, trigger: "blur" }],
@@ -155,13 +140,25 @@ export default {
if (!valid) {
return false;
}
editInfo(this.ruleForm).then((response) => {
this.$notify.success("修改成功");
// 修改后注销当前token,重新登录
this.$store.dispatch("LogOut").then(() => {
this.$api.api.resetPassword({
userId:this.ruleForm.userId,
password:this.ruleForm.newpassword1
}).then((res) => {
// console.log(res);

this.$notify.success("修改成功");
this.$store.dispatch("LogOut").then(() => {
location.reload();
});

});
});
// editInfo(this.ruleForm).then((response) => {
// this.$notify.success("修改成功");
// // 修改后注销当前token,重新登录
// this.$store.dispatch("LogOut").then(() => {
// location.reload();
// });
// });
});
},
resetForm() {
@@ -171,6 +168,7 @@ export default {
this.ruleForm.username = this.userInfo.username;
this.ruleForm.phone = this.userInfo.phone;
this.ruleForm.avatar = this.userInfo.avatar;
this.ruleForm.userId = this.userInfo.userId;
handleImg(this.userInfo.avatar, "avatar");
//判断是否选择了租户ID
const TENANT_ID = getStore({ name: "tenantId" });


Chargement…
Annuler
Enregistrer