EP-WachatApp/eaterplanet_ecommerce/moduleA/vip/notice.js

53 lines
1.0 KiB
JavaScript
Raw Normal View History

2023-03-24 11:24:28 +08:00
var app = getApp();
Page({
data: {
},
handlerGobackClick(delta) {
const pages = getCurrentPages();
if (pages.length >= 2) {
wx.navigateBack({
delta: delta
});
} else {
wx.switchTab({
url: '/eaterplanet_ecommerce/pages/index/index'
});
}
},
handlerGohomeClick(url) {
wx.switchTab({
url: '/eaterplanet_ecommerce/pages/index/index'
});
},
onLoad: function (options) {
this.getData();
},
onShow: function () {
},
getData: function () {
wx.showLoading();
var token = wx.getStorageSync('token');
let that = this;
app.util.request({
'url': 'entry/wxapp/user',
'data': {
controller: 'vipcard.get_vipcard_baseinfo',
token: token
},
dataType: 'json',
success: function (res) {
wx.hideLoading();
if (res.data.code == 0) {
let { vipcard_buy_pagenotice } = res.data.data;
that.setData({ vipcard_buy_pagenotice })
}
}
})
}
})