Commit b7458a52 by 李嘉林

原生个人资料页

parent da4a4bb1
...@@ -86,7 +86,8 @@ ...@@ -86,7 +86,8 @@
v-if="userMsg.mobilephone" v-if="userMsg.mobilephone"
@click="toUpdateBindPhone" @click="toUpdateBindPhone"
> >
{{ correctTel(userMsg.mobilephone) ? userMsg.mobilephone : "未认证" }} <!-- {{ correctTel(userMsg.mobilephone) ? userMsg.mobilephone : "未认证" }} -->
{{mobilephone}}
<van-icon name="arrow" /> <van-icon name="arrow" />
</div> </div>
</div> </div>
...@@ -128,6 +129,7 @@ import index from "@/api/index"; ...@@ -128,6 +129,7 @@ import index from "@/api/index";
import { DFSImg } from "@/utils/index"; import { DFSImg } from "@/utils/index";
import { themeColor } from "../../utils/mayi.js"; import { themeColor } from "../../utils/mayi.js";
import { formatTime } from "@/utils/index"; import { formatTime } from "@/utils/index";
const app = getApp()
export default { export default {
name: "userInfo", name: "userInfo",
data() { data() {
...@@ -157,6 +159,11 @@ export default { ...@@ -157,6 +159,11 @@ export default {
ossConfig: {}, ossConfig: {},
}; };
}, },
computed: {
mobilephone() {
return this.correctTel(this.userMsg.mobilephone) ? this.userMsg.mobilephone : "未认证";
}
},
onLoad() { onLoad() {
console.log("onLoad-----------------"); console.log("onLoad-----------------");
if (themeColor["--main-color"] != "#ffffff") { if (themeColor["--main-color"] != "#ffffff") {
...@@ -166,23 +173,24 @@ export default { ...@@ -166,23 +173,24 @@ export default {
this.themeColor = res; this.themeColor = res;
}; };
} }
},
onShow() {
this.getUserMsg(); this.getUserMsg();
}, },
methods: { methods: {
toUpdateBindPhone() { toUpdateBindPhone() {
let _this = this;
if (this.correctTel(this.userMsg.mobilephone)) { if (this.correctTel(this.userMsg.mobilephone)) {
this.$router.push( app.$themeToLink({
"/personalCenter/updateBindPhone?mobilephone=" + type: 1,
this.userMsg.mobilephone link: `/personalCenter/updateBindPhone?mobilephone=${_this.userMsg.mobilephone}`,
); })
} else { } else {
console.log(this.$store.state.userInfo, "-------------------135"); console.log(this.$store.state.userInfo, "-------------------135");
this.$router.push({ app.$themeToLink({
path: "/login/wxRegister", type: 1,
query: { link: `/login/wxRegister?openId=${_this.$store.state.userInfo.wxMiniOpenId}`,
openId: this.$store.state.userInfo.wxMiniOpenId, })
},
});
} }
}, },
click() { click() {
...@@ -258,6 +266,7 @@ export default { ...@@ -258,6 +266,7 @@ export default {
icon: "success", icon: "success",
duration: 2000, duration: 2000,
}); });
wx.setStorageSync("reloadTabbarPage",1)
} else { } else {
wx.showToast({ wx.showToast({
title: res.data.msg, title: res.data.msg,
......
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