|
...
|
...
|
@@ -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 |
...
|
...
|
|