|
@@ -88,7 +88,7 @@ Page({
|
|
|
wx.setStorageSync('lbt_session_time', Date.now())
|
|
wx.setStorageSync('lbt_session_time', Date.now())
|
|
|
wx.setStorageSync('lbt_token_key', res.data.token)
|
|
wx.setStorageSync('lbt_token_key', res.data.token)
|
|
|
console.log('nowtoken',res.data.token);
|
|
console.log('nowtoken',res.data.token);
|
|
|
- if(res.data.wx_user){
|
|
|
|
|
|
|
+ if(res.data.wx_user && res.data.wx_user.full_head != ''){
|
|
|
var userInfo = res.data.wx_user;
|
|
var userInfo = res.data.wx_user;
|
|
|
|
|
|
|
|
that.setData({
|
|
that.setData({
|
|
@@ -100,8 +100,8 @@ Page({
|
|
|
that.getmerchant()
|
|
that.getmerchant()
|
|
|
}
|
|
}
|
|
|
//checkwxhead---start
|
|
//checkwxhead---start
|
|
|
- console.log('that.data.checkhead',that.data.checkhead);
|
|
|
|
|
- if(res.data.wx_user.full_head == '' && that.data.checkhead){
|
|
|
|
|
|
|
+ // console.log('that.data.checkhead',that.data.checkhead);
|
|
|
|
|
+ if(res.data.wx_user.full_head == '' ){
|
|
|
that.setData({
|
|
that.setData({
|
|
|
checkhead: false
|
|
checkhead: false
|
|
|
})
|
|
})
|
|
@@ -224,32 +224,49 @@ Page({
|
|
|
console.log('tap')
|
|
console.log('tap')
|
|
|
var that = this
|
|
var that = this
|
|
|
|
|
|
|
|
- wx.getUserProfile({
|
|
|
|
|
- desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- userInfo: res.userInfo,
|
|
|
|
|
- hasUserInfo: true
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // wx.getUserProfile({
|
|
|
|
|
+ // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
|
|
+ // success: (res) => {
|
|
|
|
|
+ // this.setData({
|
|
|
|
|
+ // userInfo: res.userInfo,
|
|
|
|
|
+ // hasUserInfo: true
|
|
|
|
|
+ // })
|
|
|
|
|
|
|
|
- var channel_id = 0;
|
|
|
|
|
- invite = wx.getStorageSync('invite');
|
|
|
|
|
- if (channel && Number(channel.parent_id) > 0) {
|
|
|
|
|
- channel_id = Number(channel.parent_id)
|
|
|
|
|
- }
|
|
|
|
|
- var that = this
|
|
|
|
|
- console.log('res',res);
|
|
|
|
|
- if (res.errMsg === "getUserProfile:ok") {
|
|
|
|
|
- wx.showLoading({
|
|
|
|
|
- title: '加载中'
|
|
|
|
|
- })
|
|
|
|
|
- res['wxlogincode'] = that.data.wxlogincode;
|
|
|
|
|
- _request.sendInfo(res, channel_id, invite, that)
|
|
|
|
|
|
|
+ // var channel_id = 0;
|
|
|
|
|
+ // invite = wx.getStorageSync('invite');
|
|
|
|
|
+ // if (channel && Number(channel.parent_id) > 0) {
|
|
|
|
|
+ // channel_id = Number(channel.parent_id)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // var that = this
|
|
|
|
|
+ // console.log('res',res);
|
|
|
|
|
+ // if (res.errMsg === "getUserProfile:ok") {
|
|
|
|
|
+ // wx.showLoading({
|
|
|
|
|
+ // title: '加载中'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // res['wxlogincode'] = that.data.wxlogincode;
|
|
|
|
|
+ // _request.sendInfo(res, channel_id, invite, that)
|
|
|
|
|
|
|
|
- that.onShow();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // that.onShow();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ wx.getUserProfile({
|
|
|
|
|
+ desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
|
|
|
|
+ success: function(res3) {
|
|
|
|
|
+ console.log('userinfo',res3)
|
|
|
|
|
+ var url = 'xcx/save_wx_user/info'
|
|
|
|
|
+ var params = {
|
|
|
|
|
+ userinfo: JSON.stringify(res3.userInfo)
|
|
|
|
|
+ }
|
|
|
|
|
+ var success = function (res4) {
|
|
|
|
|
+ console.log('authorize',res4)
|
|
|
|
|
+ that.onShow()
|
|
|
|
|
+ }
|
|
|
|
|
+ _request.$post(url, params, success)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
getVersion: function (val) {
|
|
getVersion: function (val) {
|
|
|
// this.check()
|
|
// this.check()
|
|
@@ -268,7 +285,11 @@ Page({
|
|
|
})
|
|
})
|
|
|
console.log('untel',res.data.user.tel)
|
|
console.log('untel',res.data.user.tel)
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(res.data.wx_user.full_head == ''){
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ userInfo: 'nologin'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
if(that.data.userInfo != 'nologin' && res.data.user.tel == '' && that.data.bindTelfirst == 0){
|
|
if(that.data.userInfo != 'nologin' && res.data.user.tel == '' && that.data.bindTelfirst == 0){
|
|
|
that.setData({
|
|
that.setData({
|
|
|
bindTelfirst:1
|
|
bindTelfirst:1
|