...
|
...
|
@@ -50,6 +50,45 @@ Page({ |
|
|
// console.log(this.data.stick)
|
|
|
},
|
|
|
|
|
|
|
|
|
onLoad: function(options) {
|
|
|
console.log( app.globalData.index)
|
|
|
if( app.globalData.index==undefined){
|
|
|
let that = this;
|
|
|
let token=wx.getStorageSync('token');
|
|
|
|
|
|
console.log('woshitoe',token);
|
|
|
if(token!=""){
|
|
|
console.log(9999)
|
|
|
this.getInfoFun()
|
|
|
}
|
|
|
this.get_notice()
|
|
|
this.get_shopnum()
|
|
|
this.getmessagelist();
|
|
|
console.log('998867',this.data.pid)
|
|
|
if(this.data.pid){
|
|
|
this.get_info(this.data.pid, 2);
|
|
|
}else{
|
|
|
this.get_info(0, 1);
|
|
|
}
|
|
|
|
|
|
|
|
|
this.get_banner()
|
|
|
|
|
|
// 获取活动专区
|
|
|
this.getzhuanqulist();
|
|
|
this.getxianshi();
|
|
|
setTimeout(function() {
|
|
|
that.setData({
|
|
|
showtime: true
|
|
|
})
|
|
|
}, 990)
|
|
|
}
|
|
|
//控制显示隐藏
|
|
|
this.ishow()
|
|
|
|
|
|
},
|
|
|
|
|
|
// 获取个人信息
|
|
|
getInfoFun() {
|
|
|
let that= this;
|
...
|
...
|
@@ -83,7 +122,7 @@ Page({ |
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
let login_new=app.globalData.login_new;
|
|
|
let login_new=wx.getStorageSync("login");
|
|
|
if(login_new==0){
|
|
|
// wx.showToast({
|
|
|
// title: '您还不是会员',
|
...
|
...
|
@@ -260,7 +299,7 @@ Page({ |
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
let login_new=app.globalData.login_new;
|
|
|
let login_new=wx.getStorageSync('login');
|
|
|
if(login_new==0){
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
...
|
...
|
@@ -304,7 +343,7 @@ Page({ |
|
|
|
|
|
return false
|
|
|
}
|
|
|
let login_new=app.globalData.login_new;
|
|
|
let login_new=wx.getStorageSync('login');
|
|
|
if(login_new==0){
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
...
|
...
|
@@ -350,7 +389,7 @@ Page({ |
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
let login_new=app.globalData.login_new;
|
|
|
let login_new=wx.getStorageSync('login');
|
|
|
if(login_new==0){
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
...
|
...
|
@@ -403,15 +442,13 @@ Page({ |
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
let login_new=app.globalData.login_new;
|
|
|
let login_new=wx.getStorageSync('login');
|
|
|
if(login_new==0){
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '您还不是会员',
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
|
|
|
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/login/login',
|
|
|
})
|
...
|
...
|
@@ -602,29 +639,7 @@ Page({ |
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function(options) {
|
|
|
|
|
|
let that = this;
|
|
|
let token=wx.getStorageSync('token');
|
|
|
console.log('woshitoe',token)
|
|
|
// if(token!=""){
|
|
|
// this.getInfoFun()
|
|
|
// }
|
|
|
this.get_banner()
|
|
|
|
|
|
// 获取活动专区
|
|
|
this.getzhuanqulist();
|
|
|
this.getxianshi();
|
|
|
setTimeout(function() {
|
|
|
that.setData({
|
|
|
showtime: true
|
|
|
})
|
|
|
}, 990)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
//获取购物车数量
|
|
|
get_shopnum() {
|
|
|
let that = this
|
...
|
...
|
@@ -700,10 +715,9 @@ Page({ |
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function() {
|
|
|
this.setData({
|
|
|
shop_arr:[],
|
|
|
page:1
|
|
|
})
|
|
|
console.log(app.globalData.index)
|
|
|
if(app.globalData.index==0){
|
|
|
app.globalData.index=undefined
|
|
|
let token=wx.getStorageSync('token');
|
|
|
console.log('woshitoe',token)
|
|
|
if(token!=""){
|
...
|
...
|
@@ -721,6 +735,10 @@ Page({ |
|
|
|
|
|
//控制显示隐藏
|
|
|
this.ishow()
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
...
|
...
|
|