|
...
|
...
|
@@ -10,16 +10,16 @@ Page({ |
|
|
|
data: {
|
|
|
|
hasSellerBook:false,
|
|
|
|
},
|
|
|
|
enter_params:'',
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
|
|
|
App.Reserve.SellerForOpenid({openid:getApp().openid}).then(res=>{
|
|
|
|
this.enter_params=res.data;
|
|
|
|
this.setData({
|
|
|
|
hasSellerBook:res.data,
|
|
|
|
})
|
|
|
|
if(res.data && res.data.seller_id) {
|
|
|
|
this.setData({
|
|
|
|
hasSellerBook: res.data,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
...
|
...
|
@@ -52,9 +52,25 @@ Page({ |
|
|
|
},
|
|
|
|
|
|
|
|
gotoSellerBook(){
|
|
|
|
util.cache('islove','book');
|
|
|
|
wx.reLaunch({
|
|
|
|
url:util.http_build_query(this.enter_params,'/pages/book/b_index')
|
|
|
|
util.loading()
|
|
|
|
App.Reserve.SellerForOpenid({openid:getApp().openid}).then(res=>{
|
|
|
|
util.loading('clear');
|
|
|
|
if(res.data && res.data.seller_id){
|
|
|
|
this.setData({
|
|
|
|
hasSellerBook:res.data,
|
|
|
|
})
|
|
|
|
util.cache('islove','book');
|
|
|
|
wx.reLaunch({
|
|
|
|
url:util.http_build_query(res.data,'/pages/book/b_index')
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
this.setData({
|
|
|
|
hasSellerBook:false,
|
|
|
|
})
|
|
|
|
util.toast('已不是商家','none')
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|