Commit d6a95277 by 高淑倩

plus_重新登陆更新缓存

parent 661ecb83
......@@ -33,12 +33,12 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { amount,status } = this.options
const { amount, status } = this.options
console.log('this.options', status)
this.setData({
amount,
status
},()=> {
}, () => {
// 当前用户是否关注公众号
this.getMemberSubscribe()
this.loginUpdateStroage() //登录更新plus缓存
......@@ -49,30 +49,31 @@ wxService.page({
title: status == 'S' ? '支付成功' : '支付失败'
})
},
loginUpdateStroage(){
loginUpdateStroage() {
const code = wx.getStorageSync('_loginCode')
const wechatInfo = wx.getStorageSync('_wechatInfo')
wxService.post(`/member/minaLogin`, {
code,
wechatInfo,
brandId: app.globalData.brandId,
wxService.login().then((res) => {
wxService.post(`/member/minaLogin`, {
code:res.code,
wechatInfo,
brandId: app.globalData.brandId,
})
})
},
toPlus() {
wxService.post(`/merchant/modelPage/mainSetting/page?brandId=${app.globalData.brandId}&isMain=3&type=2`).then(res => {
const { result, data } = res.data
if (result == 0){
if (result == 0) {
wxService.router(`/subPackage/page/pages/subPage/subPage?pageId=${data.page.pageId}`)
}
})
},
getMemberSubscribe(){
getMemberSubscribe() {
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
const { openid } = baseUserInfo.member
wxService.post(`/member/subscribe?openid=${openid}`).then(res => {
const { result, data } = res.data
if (result == 0){
if (result == 0) {
// 0 未关注 1 已关注
this.setData({
isSubscribe: data == 0 ? false : true
......
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