...
|
...
|
@@ -421,23 +421,46 @@ Page({ |
|
|
})
|
|
|
} else {
|
|
|
let login_new = wx.getStorageSync('login');
|
|
|
let gh_login = wx.getStorageSync('gh_login');
|
|
|
let loginType = wx.getStorageSync('entrance_type');
|
|
|
if(loginType == 1){
|
|
|
if (login_new == 0) {
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '您还不是会员',
|
|
|
content: '请绑定账户后操作',
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
wx.navigateTo({
|
|
|
url: '/packageA/pages/login/login',
|
|
|
})
|
|
|
} else if (res.cancel) {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
return false
|
|
|
}
|
|
|
}else{
|
|
|
if (gh_login == 0) {
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '请绑定账户后操作',
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
wx.navigateTo({
|
|
|
url: '/packageA/pages/login/login',
|
|
|
})
|
|
|
} else if (res.cancel) {}
|
|
|
} else if (res.cancel) {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let title = this.data.nav_arr[this.data.nav_index].name
|
|
|
let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0
|
|
|
let pid = this.data.nav_arr[this.data.nav_index].id
|
...
|
...
|
@@ -586,7 +609,8 @@ Page({ |
|
|
//获取页面信息
|
|
|
get_info(pid, type) { //type 1为小标题 2为小标题下的小分类
|
|
|
wx.showLoading({
|
|
|
title: '加载中'
|
|
|
title: '加载中',
|
|
|
mask: true
|
|
|
})
|
|
|
let that = this
|
|
|
let url = app.interface.index
|
...
|
...
|
@@ -627,6 +651,7 @@ Page({ |
|
|
good_list(pid, c_index) {
|
|
|
wx.showLoading({
|
|
|
title: '加载中',
|
|
|
mask: true
|
|
|
})
|
|
|
let that = this
|
|
|
let url = app.interface.good_list
|
...
|
...
|
@@ -640,10 +665,15 @@ Page({ |
|
|
params.paynum = that.data.paynum
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
let list = res.msg;
|
|
|
for(let obj of list){
|
|
|
obj.sales = obj.paynum
|
|
|
}
|
|
|
if (that.data.page == 1) {
|
|
|
wx.hideLoading()
|
|
|
|
|
|
that.setData({
|
|
|
shop_arr: res.msg
|
|
|
shop_arr: list
|
|
|
})
|
|
|
} else {
|
|
|
if (res.msg.length == 0) {
|
...
|
...
|
@@ -655,7 +685,7 @@ Page({ |
|
|
setTimeout(() => {
|
|
|
wx.hideLoading()
|
|
|
that.setData({
|
|
|
shop_arr: that.data.shop_arr.concat(res.msg)
|
|
|
shop_arr: that.data.shop_arr.concat(list)
|
|
|
})
|
|
|
}, 1000)
|
|
|
}
|
...
|
...
|
|