|
@@ -6,8 +6,8 @@
|
|
|
<h3>自定义云数据库</h3>
|
|
<h3>自定义云数据库</h3>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="right">
|
|
<div class="right">
|
|
|
- <img src="../assets/img/user.png" alt="" />
|
|
|
|
|
- <p>{{ userInfo.realName }}</p>
|
|
|
|
|
|
|
+ <img src="../assets/img/user.png" alt="" @click="dialogVisible=true" />
|
|
|
|
|
+ <p @click="dialogVisible=true">{{ userInfo.realName }}</p>
|
|
|
<div class="outLogin" @click="isShow = true">修改密码</div>
|
|
<div class="outLogin" @click="isShow = true">修改密码</div>
|
|
|
<div class="outLogin" @click="outLogin">退出登录</div>
|
|
<div class="outLogin" @click="outLogin">退出登录</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -74,11 +74,22 @@
|
|
|
<el-button type="primary" @click="btnOk">确 定</el-button>
|
|
<el-button type="primary" @click="btnOk">确 定</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+ <!-- 用户信息对话框 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="用户信息"
|
|
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
|
|
+ width="30%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="row">用户key:{{userKey.userKey}}</div>
|
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="dialogVisible = false">关 闭</el-button>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { userUpdatePwd } from "@/utils/api";
|
|
|
|
|
|
|
+import { userUpdatePwd, getUserKey } from "@/utils/api";
|
|
|
import { encodeStr } from "../utils/pass";
|
|
import { encodeStr } from "../utils/pass";
|
|
|
import { Base64 } from "js-base64";
|
|
import { Base64 } from "js-base64";
|
|
|
export default {
|
|
export default {
|
|
@@ -94,6 +105,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
return {
|
|
return {
|
|
|
|
|
+ dialogVisible: false,
|
|
|
|
|
+ userKey:{},
|
|
|
|
|
+
|
|
|
isShow: false,
|
|
isShow: false,
|
|
|
form: {
|
|
form: {
|
|
|
oldPassword: "",
|
|
oldPassword: "",
|
|
@@ -141,6 +155,10 @@ export default {
|
|
|
watch: {},
|
|
watch: {},
|
|
|
//方法集合
|
|
//方法集合
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ async getUserKey() {
|
|
|
|
|
+ let res = await getUserKey(this.userInfo.id);
|
|
|
|
|
+ this.userKey=res.data
|
|
|
|
|
+ },
|
|
|
skip(path) {
|
|
skip(path) {
|
|
|
this.$router.push(path).catch(() => {});
|
|
this.$router.push(path).catch(() => {});
|
|
|
},
|
|
},
|
|
@@ -195,6 +213,7 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
// 获取用户信息
|
|
// 获取用户信息
|
|
|
this.userInfo = JSON.parse(localStorage.getItem("Yun_User"));
|
|
this.userInfo = JSON.parse(localStorage.getItem("Yun_User"));
|
|
|
|
|
+ this.getUserKey()
|
|
|
},
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {},
|
|
mounted() {},
|
|
@@ -233,16 +252,18 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
& > img {
|
|
& > img {
|
|
|
|
|
+ cursor: pointer;
|
|
|
width: 40px;
|
|
width: 40px;
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
}
|
|
}
|
|
|
& > p {
|
|
& > p {
|
|
|
|
|
+ cursor: pointer;
|
|
|
margin: 0 20px 0 5px;
|
|
margin: 0 20px 0 5px;
|
|
|
}
|
|
}
|
|
|
.outLogin {
|
|
.outLogin {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
|
- &:last-child{
|
|
|
|
|
|
|
+ &:last-child {
|
|
|
margin-right: 0;
|
|
margin-right: 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|