|
|
|
@ -1,5 +1,5 @@ |
|
|
|
import { config, getUserInfo } from "../../api/user" |
|
|
|
import { zconfig, loginToken, getBaseInfo, getPopupInfo } from "../../api/ztb" |
|
|
|
import { zconfig, loginToken, getBaseInfo, getPopupInfo, hasGetMemberInfo } from "../../api/ztb" |
|
|
|
import { pconfig } from "../../api/payment" |
|
|
|
import { mconfig } from "../../api/moment" |
|
|
|
const util = require('../../utils/util') |
|
|
|
@ -92,12 +92,24 @@ Page({ |
|
|
|
defaultIndex: function () { |
|
|
|
this.data.inited = true |
|
|
|
this.locationing() |
|
|
|
// this.onResume()
|
|
|
|
if (this.data.path && '/pages/index/index' != this.data.path) { |
|
|
|
util.navigateTo(this.data.path) |
|
|
|
} |
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
this.setData({ landInfo: {otherType: 10, picUrl: '/assets/popup/eighty-member.png'} }) |
|
|
|
} else { |
|
|
|
hasGetMemberInfo().then(result => { |
|
|
|
if (!result.data && !this.data.landInfo) { |
|
|
|
if(app.globalData.userInfo.isVIP){ |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/eighty-member.png'} }) |
|
|
|
} else { |
|
|
|
this.setData({ landInfo: {otherType: 11, picUrl: '/assets/popup/serve-member.png'} }) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
getPopupInfo().then(result => { |
|
|
|
if (result.data) { |
|
|
|
if (result.data && !this.data.landInfo) { |
|
|
|
this.setData({ landInfo: result.data }) |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -271,11 +283,16 @@ Page({ |
|
|
|
} |
|
|
|
}, |
|
|
|
onImageClick: function () { |
|
|
|
if (this.data.landInfo.redirectInfo.targetView == 'showH5') { |
|
|
|
if(this.data.landInfo.otherType == 10){ |
|
|
|
// 进行会员领取的操作
|
|
|
|
util.navigateTo('/pages/login/index') |
|
|
|
} else if(this.data.landInfo.otherType == 11){ |
|
|
|
// 进行会员领取的操作
|
|
|
|
} 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) |
|
|
|
return |
|
|
|
} else { |
|
|
|
util.navigateTarget(this.data.landInfo.redirectInfo) |
|
|
|
} |
|
|
|
util.navigateTarget(this.data.landInfo.redirectInfo) |
|
|
|
this.setData({ visible: false, landInfo: null }) |
|
|
|
}, |
|
|
|
toRule: function () { |
|
|
|
|