Commit 6d13163d authored by leiqingsong's avatar leiqingsong

Merge branch 'dev_lqs' into 'master'

Dev lqs

See merge request !115
parents 736b1261 8060b785
......@@ -62,17 +62,18 @@ class bridgeToAppFun {
}
navigateBack() {
console.log("返回");
// if (this.userAgent === "android") {
// console.log("an");
try {
const home_url = "https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7";
location.href = home_url;
} catch {
console.log("返回调用失败,都不行");
if (this.userAgent === "android") {
console.log("an");
try {
const home_url =
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7";
location.href = home_url;
} catch {
console.log("返回调用失败,都不行");
}
} else {
jsBridge.callhandler("navigateBack");
}
// } else {
// jsBridge.callhandler("navigateBack");
// }
}
showBottomBar(params) {
console.log("隐藏底部");
......
......@@ -60,7 +60,7 @@ export default {
});
},
onRead(file) {
console.log('读取到图片了', file);
console.log("读取到图片了", file);
const inviteCode = JSON.parse(localStorage.getItem("user")).inviteCode;
if (!inviteCode) {
this.$toast.fail("当前用户没有邀请码");
......
......@@ -3,7 +3,7 @@
<van-cell-group class="group-1">
<van-cell title="用户名" :value="userName" />
<van-cell is-link center title="头像" @click="onModefy">
<img class="avatar-img" :src="avatar" alt="头像" />
<img class="avatar-img" :src="imageBaseUrl + avatar" alt="头像" />
</van-cell>
</van-cell-group>
<van-cell-group>
......@@ -56,6 +56,7 @@ export default {
data() {
return {
userName: "",
imageBaseUrl: "",
headImage: "",
avatar: "",
fileList: [],
......@@ -65,6 +66,7 @@ export default {
};
},
created() {
this.imageBaseUrl = process.env.VUE_APP_BASE_URL;
this.getUser();
},
methods: {
......@@ -73,23 +75,27 @@ export default {
userId: JSON.parse(localStorage.getItem("user")).userId
};
console.log("setting-userId", params);
getUserInfo2(params).then(res => {
if (res.userId) {
localStorage.setItem("user", JSON.stringify(res));
this.$nextTick(() => {
this.userName = res.userId;
this.inviteeCode =
res.beInvitedCode == 1 ? "请填写推荐人邀请码" : res.beInvitedCode;
// this.avatar = process.env.VUE_APP_BASE_URL + res.headImage;
this.avatar = "http://8.131.244.76:81" + res.headImage;
this.headImage = res.headImage;
});
}
}).catch(err => {
if (err.response.status === 502) {
this.$toast('服务在升级,请稍后重试')
}
});
getUserInfo2(params)
.then(res => {
if (res.userId) {
localStorage.setItem("user", JSON.stringify(res));
this.$nextTick(() => {
this.userName = res.userId;
this.inviteeCode =
res.beInvitedCode == 1
? "请填写推荐人邀请码"
: res.beInvitedCode;
this.avatar = res.headImage;
// this.avatar = "http://8.131.244.76:81" + res.headImage;
this.headImage = res.headImage;
});
}
})
.catch(err => {
if (err.response.status === 502) {
this.$toast("服务在升级,请稍后重试");
}
});
},
logout() {
logout()
......@@ -131,17 +137,19 @@ export default {
inviteCode: this.fillCode,
userId: JSON.parse(localStorage.getItem("user")).userId
};
fillInviteCode(params).then(res => {
if (res.code == 0) {
// console.log('成功');
this.inviteeCode = this.fillCode;
} else {
this.$toast.fail(res.message);
}
}).catch(err => {
console.log(err);
this.$toast.fail(err)
});
fillInviteCode(params)
.then(res => {
if (res.code == 0) {
// console.log('成功');
this.inviteeCode = this.fillCode;
} else {
this.$toast.fail(res.message);
}
})
.catch(err => {
console.log(err);
this.$toast.fail(err);
});
},
fillInviterCode() {
if (
......
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