|
...
|
...
|
@@ -14,27 +14,13 @@ Page({ |
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
seller_id:0,
|
|
|
|
onLoad: function (options) {
|
|
|
|
if(!options.seller_id){
|
|
|
|
let enter_params=util.cache('enter_params');
|
|
|
|
options.seller_id=enter_params.seller_id;
|
|
|
|
}
|
|
|
|
App.Reserve.SmsInfo({seller_id:options.seller_id}).then(res=>{
|
|
|
|
if(res.ret==404){
|
|
|
|
res.data={
|
|
|
|
last_num:100,
|
|
|
|
meals:[
|
|
|
|
{id:1,total:550,price_ave:0.09,price_old:50,price:50,discount:0},
|
|
|
|
{id:2,total:1200,price_ave:0.083,price_old:100,price:100,discount:0},
|
|
|
|
{id:3,total:3650,price_ave:0.082,price_old:328,price:300,discount:9.1},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
seller_id:options.seller_id,
|
|
|
|
sms:res.data,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seller_id=options.seller_id;
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -48,7 +34,22 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
App.Reserve.SmsInfo({seller_id:this.seller_id}).then(res=>{
|
|
|
|
if(res.ret==404){
|
|
|
|
res.data={
|
|
|
|
last_num:100,
|
|
|
|
meals:[
|
|
|
|
{id:1,total:550,price_ave:0.09,price_old:50,price:50,discount:0},
|
|
|
|
{id:2,total:1200,price_ave:0.083,price_old:100,price:100,discount:0},
|
|
|
|
{id:3,total:3650,price_ave:0.082,price_old:328,price:300,discount:9.1},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
seller_id:this.seller_id,
|
|
|
|
sms:res.data,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|