Commit 26fb8fd0dbce4d32964b386633d615c3df694069

Authored by wangfan
1 parent 394f0e83

快速预定

... ... @@ -78,7 +78,8 @@ Page({
initOrder(){
App.Advance.CreateOrder({
rid: this.data.options.rid,
identity:this.data.options.identity
identity:this.data.options.identity,
status:1,
}).then(res => {
res.data.cdateStr=util.unixtoTime(res.data.cdate,'YYYY-MM-DD')
let cookbooklist={};
... ...
... ... @@ -127,17 +127,22 @@ Page({
return obj;
},
cookbook(){
App.Advance.CreateOrder({
rid:this.id,
identity:1,
status:'0,1'
}).then(res=>{
if(res.ret!=200){
return util.toast(res.msg,'none')
}
if(this.data.detail.order && this.data.detail.order.cookbooklist.length>0){
wx.navigateTo({
url:util.http_build_query({rid:this.id,oid:res.data.id,identity:1},'/pack-cookbook/pages/index')
url:util.http_build_query({rid:this.id,oid:res.data.id,identity:1},'/pack-cookbook/pages/success')
});
})
}else{
App.Advance.CreateOrder({
rid:this.id,
}).then(res=>{
if(res.ret!=200){
return util.toast(res.msg,'none')
}
wx.navigateTo({
url:util.http_build_query({rid:this.id,oid:res.data.id,identity:1},'/pack-cookbook/pages/index')
});
})
}
},
})
\ No newline at end of file
... ...