Browse Source

领取会员

featrue/v4.5
xpz2018 4 years ago
parent
commit
51d599b38b
2 changed files with 3 additions and 10 deletions
  1. BIN
      assets/popup/no-zige.png
  2. 13
      pages/index/index.js

BIN
assets/popup/no-zige.png

Before After
Width: 560  |  Height: 762  |  Size: 32 KiB Width: 560  |  Height: 762  |  Size: 34 KiB

13
pages/index/index.js

@ -1,5 +1,5 @@
import { config, getUserInfo } from "../../api/user"
import { zconfig, loginToken, getBaseInfo, getPopupInfo, hasGetMemberInfo, receiveMember } from "../../api/ztb"
import { zconfig, loginToken, getBaseInfo, getPopupInfo, receiveMember } from "../../api/ztb"
import { pconfig } from "../../api/payment"
import { mconfig } from "../../api/moment"
const util = require('../../utils/util')
@ -98,7 +98,7 @@ Page({
if(!app.globalData.userInfo){
this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/send-member.png'} })
} else {
hasGetMemberInfo().then(result => {
receiveMember().then(result => {
if (result.data && result.data.hasGetMember && !this.data.landInfo) {
if(result.data.type === 1){
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} })
@ -289,14 +289,7 @@ Page({
if(this.data.landInfo.otherType == 10){
util.navigateTo('/pages/login/index')
} else if(this.data.landInfo.otherType == 11){
wx.showLoading({ title: '领取中', mask: true })
receiveMember().then(res => {
wx.hideLoading()
util.showToast('会员领取成功')
}).catch(err => {
wx.hideLoading()
util.showToast('领取会员失败,请下次登录重新领取')
})
util.navigateTo('/pages/ztbvip/index')
} else if (this.data.landInfo.redirectInfo.targetView == 'showH5') {
util.navigateTo('/pages/html/html/index?link=' + this.data.landInfo.redirectInfo.params.id + '?title=' + this.data.landInfo.title)
} else {

Loading…
Cancel
Save