|
@@ -127,17 +127,22 @@ Page({ |
|
@@ -127,17 +127,22 @@ Page({ |
|
127
|
return obj;
|
127
|
return obj;
|
|
128
|
},
|
128
|
},
|
|
129
|
cookbook(){
|
129
|
cookbook(){
|
|
130
|
- App.Advance.CreateOrder({
|
|
|
|
131
|
- rid:this.id,
|
|
|
|
132
|
- identity:1,
|
|
|
|
133
|
- status:'0,1'
|
|
|
|
134
|
- }).then(res=>{
|
|
|
|
135
|
- if(res.ret!=200){
|
|
|
|
136
|
- return util.toast(res.msg,'none')
|
|
|
|
137
|
- }
|
130
|
+ if(this.data.detail.order && this.data.detail.order.cookbooklist.length>0){
|
|
138
|
wx.navigateTo({
|
131
|
wx.navigateTo({
|
|
139
|
- url:util.http_build_query({rid:this.id,oid:res.data.id,identity:1},'/pack-cookbook/pages/index')
|
132
|
+ url:util.http_build_query({rid:this.id,oid:res.data.id,identity:1},'/pack-cookbook/pages/success')
|
|
140
|
});
|
133
|
});
|
|
141
|
- })
|
134
|
+ }else{
|
|
|
|
135
|
+ App.Advance.CreateOrder({
|
|
|
|
136
|
+ rid:this.id,
|
|
|
|
137
|
+ }).then(res=>{
|
|
|
|
138
|
+ if(res.ret!=200){
|
|
|
|
139
|
+ return util.toast(res.msg,'none')
|
|
|
|
140
|
+ }
|
|
|
|
141
|
+ wx.navigateTo({
|
|
|
|
142
|
+ url:util.http_build_query({rid:this.id,oid:res.data.id,identity:1},'/pack-cookbook/pages/index')
|
|
|
|
143
|
+ });
|
|
|
|
144
|
+ })
|
|
|
|
145
|
+ }
|
|
|
|
146
|
+
|
|
142
|
},
|
147
|
},
|
|
143
|
}) |
148
|
}) |