Commit b7458a52 by 李嘉林

原生个人资料页

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