diff --git a/src/components/menu-copy.vue b/src/components/menu-copy.vue
new file mode 100644
index 0000000000000000000000000000000000000000..e9a2454b1aae6c094bb50cce5f25d95b353e4a1f
--- /dev/null
+++ b/src/components/menu-copy.vue
@@ -0,0 +1,478 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/user/user_info.vue b/src/pages/user/user_info.vue
index 289272c5175b71f99068fdf4231ee9c56f95ee0d..baa4533104807f45771e516fbacb04fccf97eccd 100644
--- a/src/pages/user/user_info.vue
+++ b/src/pages/user/user_info.vue
@@ -58,12 +58,13 @@
升级为开发者
升级为开发者
@@ -184,6 +185,7 @@ export default {
},
data: () => ({
activeName: "0",
+ userId: "",
is_admin: 0,
user_data: {
accountNo: "",
@@ -227,14 +229,15 @@ export default {
this.$api.user.getNowUser().then(response => {
if (response.data.success == 1) {
this.is_admin = response.data.data.is_admin;
- this.getUserInfo(response.data.data.user_id);
+ this.userId = response.data.data.user_id;
+ this.getUserInfo();
} else {
console.log(response.data.errMsg);
}
});
},
getUserInfo(id) {
- this.$api.user.getUserDetail({ id: id }).then(response => {
+ this.$api.user.getUserDetail({ id: this.userId }).then(response => {
if (response.data.success == 1) {
let data = response.data.data;
this.user_data.accountNo = data.user_id;
@@ -298,6 +301,7 @@ export default {
message: "修改个人信息成功",
type: "success"
});
+ this.getUserInfo();
} else {
this.$message({
message: "修改个人信息失败",
@@ -333,6 +337,7 @@ export default {
type: "success"
});
this.diaPassWord = false;
+ this.getUserInfo();
} else {
this.$message({
message: "修改密码失败",
@@ -342,20 +347,36 @@ export default {
});
},
resetKey() {
- this.$api.authority
- .resetUserKey({ user_id: this.user_data.accountNo })
- .then(response => {
- if (response.data.success == 1) {
- this.$message({
- message: "重置密钥成功",
- type: "success"
+ this.$confirm("此操作将重置您的密钥, 是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ cancelButtonClass: "msg_btn_gray",
+ confirmButtonClass: "msg_btn",
+ type: "warning"
+ })
+ .then(() => {
+ this.$api.authority
+ .resetUserKey({ user_id: this.user_data.accountNo })
+ .then(response => {
+ if (response.data.success == 1) {
+ this.$message({
+ message: "重置密钥成功",
+ type: "success"
+ });
+ this.getUserInfo();
+ } else {
+ this.$message({
+ message: "重置密钥失败",
+ type: "error"
+ });
+ }
});
- } else {
- this.$message({
- message: "重置密钥失败",
- type: "error"
- });
- }
+ })
+ .catch(() => {
+ this.$message({
+ type: "info",
+ message: "已取消重置"
+ });
});
},
upLevel() {
@@ -366,6 +387,7 @@ export default {
type: "success"
});
this.couldUp = false;
+ this.getUserInfo();
} else {
this.$message({
message: "申请升级开发者失败",
@@ -458,9 +480,7 @@ export default {
}
.option_btn_gray_dis {
width: 124px;
- background-color: #e3e5ef;
border-radius: 8px;
- color: #0f2683;
}
.info_item {
width: 70%;
@@ -586,4 +606,23 @@ export default {
line-height: 24px;
height: 24px;
}
+.msg_btn {
+ width: 70px;
+ background-color: #495feb;
+ border-radius: 8px;
+ color: #f8f9fd;
+}
+.msg_btn:hover {
+ background-color: #596ffb;
+}
+.msg_btn_gray {
+ width: 70px;
+ background-color: #e3e5ef;
+ border-radius: 8px;
+ color: #0f2683;
+}
+.msg_btn_gray:hover {
+ background-color: #e8eaf4;
+ color: #0f2683;
+}
\ No newline at end of file
diff --git a/src/request/api/general.js b/src/request/api/general.js
index a9c942ead990f4a34aec4c0209083657e9b4a228..648e059b37b23ddce329b48c7f8eeaa64c75a8ad 100644
--- a/src/request/api/general.js
+++ b/src/request/api/general.js
@@ -6,6 +6,9 @@ const general = {
logout(params) {
return axios.get(`/iam/api/logout?ReturnUrl=${encodeURIComponent(params.returnUrl)}`);
},
+ getNowMenu(params) {
+ return axios.get(`/apaas/backmgt/menu/user/menu?teamName=${params.teamName}`);
+ },
}
export default general;