Commit da4a4bb1 by 李嘉林

优化

parent 03befc0a
...@@ -201,16 +201,16 @@ export default { ...@@ -201,16 +201,16 @@ export default {
getUserMsg() { getUserMsg() {
live.getUserInfo().then((res) => { live.getUserInfo().then((res) => {
let result = res.data.data; let result = res.data.data;
this.userMsg = result; this.userMsg = {
this.userMsg.birth = this.userMsg.birth ...result,
? this.userMsg.birth.replace(/\-/g, "/") birth: result.birth ? result.birth.split(" ")[0] : "",
: ""; headPortraitUrl: DFSImg(
this.userMsg.headPortraitUrl = DFSImg( result.headPortraitUrl,
this.userMsg.headPortraitUrl,
400, 400,
400, 400,
1 1
); )
};
console.log(this.userMsg, "--------------userMsg"); console.log(this.userMsg, "--------------userMsg");
}); });
}, },
...@@ -251,7 +251,8 @@ export default { ...@@ -251,7 +251,8 @@ export default {
} }
index.update_info(this.update_info_data).then((res) => { index.update_info(this.update_info_data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.currentTime = this.userMsg.birth; let _this = this;
this.currentTime = new Date(_this.userMsg.birth).getTime();
wx.showToast({ wx.showToast({
title: "保存成功", title: "保存成功",
icon: "success", icon: "success",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment