Commit 963044f0 by 李嘉林

加log

parent d3783440
......@@ -117,8 +117,9 @@ export default {
})
},
onLoad(options) {
log.info(options,'----------------------login-options')
log.info(options,'----------------------login-onload-options')
login.getShopUserProtocol().then(res => {
log.info('获取用户协议',res)
if(res.data.code == '200') {
this.content = res.data.data;
}
......@@ -157,6 +158,7 @@ export default {
this.logoUrl = wx.getStorageSync("logoUrl");
if (!(this.shopName && this.logoUrl)) {
shop.getShopInfo().then(res => {
log.info('获取商城信息',res)
if (res.data.code == 200) {
this.shopName = res.data.data.shopName;
this.logoUrl = process.env.IMG_DOMAIN + res.data.data.logoUrl;
......@@ -176,15 +178,18 @@ export default {
init() {
let _this = this;
return new Promise((resolve, reject) => {
login
.miniLogin({ code: this.code,
let query = {
code: this.code,
spokesmanRelId : '',
spokesmanGroupId : '',
spokesmanShopId : '',
nickname: _this.wxUserInfo.nickName,
headImgUrl: _this.wxUserInfo.avatarUrl
})
};
login
.miniLogin(query)
.then(res => {
log.info('/wx/mini_login',query,res)
if (res.data.code == 200) {
resolve(res);
} else {
......@@ -197,9 +202,9 @@ export default {
});
},
addRecord(flag) {
log.info(wx.getStorageSync('attractingCustomerChannelId'))
log.info(this.openid)
log.info(99999)
log.info('attractingCustomerChannelId',wx.getStorageSync('attractingCustomerChannelId'))
log.info('openid',this.openid)
log.info('addRecord',flag)
//埋点引客渠道
if(wx.getStorageSync('attractingCustomerChannelId')) {
indexApi.addRecord(
......@@ -211,6 +216,7 @@ export default {
newRegisterFlag: flag?1:0,//1是新注册用户
}
).then(ele=>{
log.info('addRecord',res)
if (ele.data.data) {
wx.setStorageSync('attractingCustomerChannelId','')
}
......@@ -218,6 +224,7 @@ export default {
}
},
getUserProfile() {
log.info('点击了微信一键登录');
let _this = this;
if(this.content&&!this.checked) {
wx.showToast({
......@@ -236,6 +243,7 @@ export default {
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (e) => {
_this.wxUserInfo = e.userInfo;
log.info('获取wx.getUserProfile用户信息',_this.wxUserInfo);
this.init()
.then(res => {
//存入openid
......@@ -302,6 +310,7 @@ export default {
});
},
fail: (e) => {
log.info('wx.getUserProfile-fail',e)
wx.hideLoading()
}
})
......@@ -320,6 +329,7 @@ export default {
login
.checkUnionid({ unionId: this.unionId, openId: this.openid })
.then(res => {
log.info('checkUnionid',res)
wx.hideLoading();
if (res.data.code == 200) {
if (res.data.data.isHaveUnion == "true") {
......@@ -469,11 +479,11 @@ export default {
query.spokesmanShopId = this.$store.state.spokesmanShopId;
}
log.info(query, "query");
login
.bindUser(query)
.then(res => {
//绑定成功
log.info('bindUser',query,res)
if (res.data.code == 200) {
wx.setStorageSync(this.$store.state.mixid+'articleId',false)
this.NEED_CERTIFIED = res.data.data.NEED_CERTIFIED;
......@@ -513,6 +523,7 @@ export default {
});
},
handbindHandle() {
log.info('点击手动绑定手机号')
log.info(this.queryOptions,'---------------options')
const query = {
openId: this.openid,
......@@ -526,7 +537,7 @@ export default {
param: this.queryOptions.param,
back: this.queryOptions.back,
};
log.info(query,'-------------------519')
log.info(query,'handbindHandle-query')
log.info( serialize(query),'------------------- serialize(query)')
if(wx.getStorageSync(this.$store.state.mixid+'storeId')) {
query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId')
......@@ -546,6 +557,7 @@ export default {
// wx.reLaunch({
// url : '/pages/home/main'
// })
log.info('点击暂不登录')
wx.navigateBack({
delta: 1
});
......
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