Commit 963044f0 by 李嘉林

加log

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