Commit cfe72829 by 程默

bind修改

parent f7cdbf73
...@@ -10,7 +10,7 @@ console.log(process.env,'-----------------config------') ...@@ -10,7 +10,7 @@ console.log(process.env,'-----------------config------')
}, },
//绑定 //绑定
bindUser(options){ bindUser(options){
return requestGET(`${process.env.OLSHOP_URL}/wx/mini_bind_user`,options) return requestPOST(`${process.env.OLSHOP_URL}/wx/mini_bind_user`,options)
}, },
//check unionid //check unionid
checkUnionid(options){ checkUnionid(options){
......
...@@ -57,7 +57,8 @@ export default { ...@@ -57,7 +57,8 @@ export default {
backParams: "", backParams: "",
isHaveUnion: "", isHaveUnion: "",
unionId: "", unionId: "",
userInfo: "" userInfo: "",
NEED_CERTIFIED:""
}; };
}, },
created() {}, created() {},
...@@ -98,6 +99,7 @@ export default { ...@@ -98,6 +99,7 @@ export default {
//有账号 //有账号
this.isHaveUnion = true; this.isHaveUnion = true;
this.backParams += `&sessionid=${res.data.data.sessionId}`; this.backParams += `&sessionid=${res.data.data.sessionId}`;
this.NEED_CERTIFIED=res.data.data.NEED_CERTIFIED;
wx.setStorage({ wx.setStorage({
key: "sessionid", key: "sessionid",
data: res.data.data.sessionId data: res.data.data.sessionId
...@@ -143,6 +145,7 @@ export default { ...@@ -143,6 +145,7 @@ export default {
if (res.data.code == 200) { if (res.data.code == 200) {
console.log("check", res); console.log("check", res);
if (res.data.data.isHaveUnion == "true") { if (res.data.data.isHaveUnion == "true") {
this.NEED_CERTIFIED=res.data.data.NEED_CERTIFIED;
this.backParams += `&sessionid=${res.data.data.sessionId}`; this.backParams += `&sessionid=${res.data.data.sessionId}`;
wx.setStorage({ wx.setStorage({
key: "sessionid", key: "sessionid",
...@@ -197,11 +200,13 @@ export default { ...@@ -197,11 +200,13 @@ export default {
unionId: this.unionId, unionId: this.unionId,
headImgUrl: this.userInfo.avatarUrl, headImgUrl: this.userInfo.avatarUrl,
gender: this.userInfo.gender, gender: this.userInfo.gender,
nickname: this.userInfo.nickName nickname: this.userInfo.nickName,
otherPhone:0
}) })
.then(res => { .then(res => {
//绑定成功 //绑定成功
if (res.data.code == 200) { if (res.data.code == 200) {
this.NEED_CERTIFIED=res.data.data.NEED_CERTIFIED;
this.backParams += `&sessionid=${res.data.data.sessionId}`; this.backParams += `&sessionid=${res.data.data.sessionId}`;
wx.setStorage({ wx.setStorage({
key: "sessionid", key: "sessionid",
......
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