Commit 091cde4c by chenwq

info报错处理

1 parent 9baa2968
...@@ -133,6 +133,10 @@ Page({ ...@@ -133,6 +133,10 @@ Page({
if (code == 0) { if (code == 0) {
// 获取会员卡信息 // 获取会员卡信息
wx.p.api.equityApi.checkOpenMember({ isTrialCardFlag: 1 }).then(res => { wx.p.api.equityApi.checkOpenMember({ isTrialCardFlag: 1 }).then(res => {
if (res.code == -1 && res.errId == 2008) {
this.showTips(message || '服务不可用')
return
}
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
this.receiveRed(res.data.equityFreeCardId) this.receiveRed(res.data.equityFreeCardId)
} }
...@@ -148,12 +152,12 @@ Page({ ...@@ -148,12 +152,12 @@ Page({
}) })
}, },
receiveRed(equityFreeCardId) { receiveRed(equityFreeCardId) {
let { isOpenMember, nickName ,bindingSource} = this.data let { isOpenMember, nickName, bindingSource } = this.data
let params = { let params = {
equityFreeCardId, equityFreeCardId,
nickName: nickName nickName: nickName
} }
if(bindingSource) params.bindingSource = bindingSource if (bindingSource) params.bindingSource = bindingSource
wx.p.api.equityApi.checkReceiveRed(params).then(res => { wx.p.api.equityApi.checkReceiveRed(params).then(res => {
console.log(res, 'checkReceiveRed---') console.log(res, 'checkReceiveRed---')
let { code, message, data } = res let { code, message, data } = res
...@@ -181,6 +185,10 @@ Page({ ...@@ -181,6 +185,10 @@ Page({
const authStatus = await wx.p.router.intercept(false) const authStatus = await wx.p.router.intercept(false)
if (authStatus) return if (authStatus) return
wx.p.api.equityApi.checkOpenMember({ isTrialCardFlag: 1 }).then(res => { wx.p.api.equityApi.checkOpenMember({ isTrialCardFlag: 1 }).then(res => {
if (res.code == -1 && res.errId == 2008) {
this.showTips(res.message || '服务不可用')
return
}
let flag = false let flag = false
if (res.code == 0 && res.data) { if (res.code == 0 && res.data) {
flag = true flag = true
...@@ -215,10 +223,10 @@ Page({ ...@@ -215,10 +223,10 @@ Page({
async onLoad(options) { async onLoad(options) {
//从调查问卷来 //从调查问卷来
let system = wx.getSystemInfoSync(), let system = wx.getSystemInfoSync(),
bindingSource = '' bindingSource = ''
const authStatus = await wx.p.router.intercept(false) const authStatus = await wx.p.router.intercept(false)
const { merchantId } = wx.p.storage.get('merchant_info') const { merchantId } = wx.p.storage.get('merchant_info')
if(options.bindingSource) bindingSource = options.bindingSource if (options.bindingSource) bindingSource = options.bindingSource
this.setData({ this.setData({
merchantId, merchantId,
bindingSource bindingSource
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!