Commit 4d520284 by 高淑倩

modify: 领卡逻辑_手机号码

parent 4f0e91a3
......@@ -263,7 +263,6 @@ function getUserInfoByBtn(userInfo) {
return Promise.all([Promise.resolve(userInfo), Promise.resolve(res)])
}).then((res) => {
logger.log(' wx _userInfo success res --->', res)
wx.setStorageSync('_wechatInfo', res[0])
wx.setStorageSync('_userInfo', res[0].userInfo)
wx.showLoading({
title: '正在加载...',
......
......@@ -140,12 +140,12 @@ class WXService extends Http {
wx.setStorageSync('token', '')
const app = getApp()
var _this = this
let wechatInfo = wx.getStorageSync('_wechatInfo')
let accreditUserInfo = wx.getStorageSync('_accreditUserInfo')
_this.login().then(result=>{
if(result.code){
_this.post(`/member/minaLogin`, {
code: result.code,
wechatInfo,
wechatInfo: accreditUserInfo,
brandId: app.globalData.brandId,
}).then(response=>{
let dataResp = response.data.data
......@@ -516,33 +516,18 @@ class WXService extends Http {
openCard() {
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
return new Promise((resolve, reject) => {
// const app = this.getApp()
const {memberActivateStatus} = baseUserInfo
// const memberActivateStatus = wx.getStorageSync('memberActivateStatus')
if(memberActivateStatus) {
if (baseUserInfo && baseUserInfo.member && baseUserInfo.member.mobile) {
resolve(baseUserInfo)
} else {
console.log('开卡', baseUserInfo)
} else if (!baseUserInfo || !baseUserInfo.member || !baseUserInfo.member.mobile) {
console.log('去开卡')
return this.navigateToMiniProgram({
biz: baseUserInfo.biz,
encrypt_card_id: baseUserInfo.encryptCardId,
outer_str: baseUserInfo.outerStr
})
} else {
reject({ state: 0 })
}
// if (baseUserInfo && baseUserInfo.isMember === '1') {
// resolve(baseUserInfo)
// } else if (!baseUserInfo || baseUserInfo.isMember === '0') {
// return this.navigateToMiniProgram({
// biz: baseUserInfo.biz,
// encrypt_card_id: baseUserInfo.encryptCardId,
// outer_str: baseUserInfo.outerStr
// })
// } else {
// reject({ state: 0 })
// }
})
}
......
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