Showing
6 changed files
with
45 additions
and
40 deletions
| @@ -144,14 +144,13 @@ Page({ | @@ -144,14 +144,13 @@ Page({ | ||
| 144 | url = '/pages/customer/detail_owner_invitation_new?id=' + that.data.opt.detail.oid; | 144 | url = '/pages/customer/detail_owner_invitation_new?id=' + that.data.opt.detail.oid; |
| 145 | } | 145 | } |
| 146 | if (that.data.opt.types == '2') { | 146 | if (that.data.opt.types == '2') { |
| 147 | - let cookbookObj = { | ||
| 148 | - sid: that.data.opt.sid, | ||
| 149 | - sellerName: that.data.opt.sellerName, | ||
| 150 | - oid: that.data.opt.oid, | ||
| 151 | - hasSuccess: '1', | ||
| 152 | - rid: that.data.opt.rid?that.data.opt.rid:'' | ||
| 153 | - } | ||
| 154 | - url = `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`; | 147 | + let data={} |
| 148 | + data.sid=that.data.opt.sid; | ||
| 149 | + data.sellerName=that.data.opt.sellerName; | ||
| 150 | + data.oid=that.data.opt.oid; | ||
| 151 | + data.hasSuccess='1' | ||
| 152 | + data.rid=that.data.opt.rid?that.data.opt.rid:'' | ||
| 153 | + url = `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`; | ||
| 155 | } | 154 | } |
| 156 | if (that.data.opt.types == '3') { | 155 | if (that.data.opt.types == '3') { |
| 157 | url = '/pages/reserve/index'; | 156 | url = '/pages/reserve/index'; |
| @@ -339,14 +338,14 @@ Page({ | @@ -339,14 +338,14 @@ Page({ | ||
| 339 | }) | 338 | }) |
| 340 | } | 339 | } |
| 341 | if (this.data.opt.types == '2') { | 340 | if (this.data.opt.types == '2') { |
| 342 | - let cookbookObj = { | ||
| 343 | - sid: this.data.opt.sid, | ||
| 344 | - sellerName: this.data.opt.sellerName, | ||
| 345 | - oid: this.data.opt.oid, | ||
| 346 | - hasSuccess: '1', | ||
| 347 | - rid: this.data.opt.rid?this.data.opt.rid:'' | ||
| 348 | - } | ||
| 349 | - let url = `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`; | 341 | + let data={} |
| 342 | + data.oid=this.data.opt.oid; | ||
| 343 | + data.sid=this.data.opt.sid; | ||
| 344 | + data.sellerName=this.data.opt.sellerName; | ||
| 345 | + data.hasSuccess='1'; | ||
| 346 | + data.identity='1'; | ||
| 347 | + data.rid=this.data.opt.rid?this.data.opt.rid:'' | ||
| 348 | + let url = `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`; | ||
| 350 | return wx.reLaunch({ | 349 | return wx.reLaunch({ |
| 351 | url | 350 | url |
| 352 | }) | 351 | }) |
| @@ -327,12 +327,12 @@ Page({ | @@ -327,12 +327,12 @@ Page({ | ||
| 327 | // 确认下单 | 327 | // 确认下单 |
| 328 | determineFun() { | 328 | determineFun() { |
| 329 | if (!this.data.noData) { | 329 | if (!this.data.noData) { |
| 330 | - let cookbookObj = { | 330 | + let data = { |
| 331 | ...this.data.options | 331 | ...this.data.options |
| 332 | } | 332 | } |
| 333 | - cookbookObj.hasSuccess = 1 | ||
| 334 | - delete cookbookObj.navColor | ||
| 335 | - delete cookbookObj.themeColor | 333 | + data.hasSuccess = 1 |
| 334 | + delete data.navColor | ||
| 335 | + delete data.themeColor | ||
| 336 | App.Advance.PlaceOrder({ | 336 | App.Advance.PlaceOrder({ |
| 337 | orderid: this.data.options.oid, | 337 | orderid: this.data.options.oid, |
| 338 | rid: this.data.options.rid, | 338 | rid: this.data.options.rid, |
| @@ -340,7 +340,7 @@ Page({ | @@ -340,7 +340,7 @@ Page({ | ||
| 340 | remark:this.data.notes+'' | 340 | remark:this.data.notes+'' |
| 341 | }).then(res => { | 341 | }).then(res => { |
| 342 | wx.navigateTo({ | 342 | wx.navigateTo({ |
| 343 | - url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, | 343 | + url: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}` |
| 344 | }) | 344 | }) |
| 345 | }) | 345 | }) |
| 346 | } | 346 | } |
| @@ -243,15 +243,15 @@ Page({ | @@ -243,15 +243,15 @@ Page({ | ||
| 243 | let orderItemCount = 0; | 243 | let orderItemCount = 0; |
| 244 | res.data.cookbooklist.forEach(cb => { | 244 | res.data.cookbooklist.forEach(cb => { |
| 245 | if (this.data.options.identity == 1 && cb.status > 0) { | 245 | if (this.data.options.identity == 1 && cb.status > 0) { |
| 246 | - let cookbookObj = { | 246 | + let data={ |
| 247 | ...this.data.options | 247 | ...this.data.options |
| 248 | } | 248 | } |
| 249 | - cookbookObj.hasSuccess='1' | ||
| 250 | - cookbookObj.sellerName=res.data.seller.sellername; | ||
| 251 | - cookbookObj.oid=res.data.id; | ||
| 252 | - console.log('跳转到下单页携带参数',{...cookbookObj}); | 249 | + data.hasSuccess='1' |
| 250 | + data.sellerName=res.data.seller.sellername; | ||
| 251 | + data.oid=res.data.id; | ||
| 252 | + console.log('跳转到下单页携带参数',{...data}); | ||
| 253 | wx.navigateTo({ | 253 | wx.navigateTo({ |
| 254 | - url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, | 254 | + url: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`, |
| 255 | }) | 255 | }) |
| 256 | return false; | 256 | return false; |
| 257 | } | 257 | } |
| @@ -33,13 +33,19 @@ Page({ | @@ -33,13 +33,19 @@ Page({ | ||
| 33 | * 生命周期函数--监听页面加载 | 33 | * 生命周期函数--监听页面加载 |
| 34 | */ | 34 | */ |
| 35 | onLoad(options) { | 35 | onLoad(options) { |
| 36 | - let obj = util.determine(options.cookbookObj); | ||
| 37 | this.setData({ | 36 | this.setData({ |
| 38 | - options: obj, | 37 | + options:{ |
| 38 | + rid:options.rid, | ||
| 39 | + oid:options.oid, | ||
| 40 | + sellerName:options.sellerName, | ||
| 41 | + sid:options.sid, | ||
| 42 | + identity:options.identity, | ||
| 43 | + hasSuccess:options.hasSuccess | ||
| 44 | + }, | ||
| 39 | tpls: [TP.tpls(1)], | 45 | tpls: [TP.tpls(1)], |
| 40 | }) | 46 | }) |
| 41 | console.log('options', { | 47 | console.log('options', { |
| 42 | - ...obj | 48 | + ...options |
| 43 | }); | 49 | }); |
| 44 | this.getCheckCookList() | 50 | this.getCheckCookList() |
| 45 | this.getDetail() | 51 | this.getDetail() |
| @@ -437,15 +443,15 @@ Page({ | @@ -437,15 +443,15 @@ Page({ | ||
| 437 | * 用户点击右上角分享 | 443 | * 用户点击右上角分享 |
| 438 | */ | 444 | */ |
| 439 | onShareAppMessage() { | 445 | onShareAppMessage() { |
| 440 | - let cookbookObj = { | 446 | + let data={ |
| 441 | ...this.data.options, | 447 | ...this.data.options, |
| 442 | hasOnlyShow: 1 | 448 | hasOnlyShow: 1 |
| 443 | }; | 449 | }; |
| 444 | - console.log(cookbookObj); | ||
| 445 | - delete cookbookObj.hasSuccess | 450 | + console.log(data); |
| 451 | + delete data.hasSuccess | ||
| 446 | return { | 452 | return { |
| 447 | title: '菜品已点好,快来看看都点了什么~', | 453 | title: '菜品已点好,快来看看都点了什么~', |
| 448 | - path: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, | 454 | + path: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`, |
| 449 | imageUrl: 'http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148571.jpg', | 455 | imageUrl: 'http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148571.jpg', |
| 450 | } | 456 | } |
| 451 | }, | 457 | }, |
| @@ -226,17 +226,17 @@ Page({ | @@ -226,17 +226,17 @@ Page({ | ||
| 226 | }, | 226 | }, |
| 227 | cookbook() { | 227 | cookbook() { |
| 228 | if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) { | 228 | if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) { |
| 229 | - let cookbookObj = { | 229 | + let data = { |
| 230 | rid: this.id, | 230 | rid: this.id, |
| 231 | oid: this.data.detail.order.id, | 231 | oid: this.data.detail.order.id, |
| 232 | sellerName:this.detail.seller.sellername, | 232 | sellerName:this.detail.seller.sellername, |
| 233 | sid:this.detail.seller.id, | 233 | sid:this.detail.seller.id, |
| 234 | identity: '1', | 234 | identity: '1', |
| 235 | hasSuccess:'1', | 235 | hasSuccess:'1', |
| 236 | - } | ||
| 237 | - console.log('跳转到下单页携带参数',{...cookbookObj}); | 236 | + } |
| 237 | + console.log('跳转到下单页携带参数',{...data}); | ||
| 238 | wx.navigateTo({ | 238 | wx.navigateTo({ |
| 239 | - url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, | 239 | + url: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`, |
| 240 | }) | 240 | }) |
| 241 | } else { | 241 | } else { |
| 242 | App.Advance.CreateOrder({ | 242 | App.Advance.CreateOrder({ |
| @@ -206,7 +206,7 @@ Page({ | @@ -206,7 +206,7 @@ Page({ | ||
| 206 | }, | 206 | }, |
| 207 | cookbook() { | 207 | cookbook() { |
| 208 | if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) { | 208 | if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) { |
| 209 | - let cookbookObj = { | 209 | + let data = { |
| 210 | rid: this.id, | 210 | rid: this.id, |
| 211 | oid: this.data.detail.order.id, | 211 | oid: this.data.detail.order.id, |
| 212 | sellerName: this.data.seller.name, | 212 | sellerName: this.data.seller.name, |
| @@ -215,7 +215,7 @@ Page({ | @@ -215,7 +215,7 @@ Page({ | ||
| 215 | hasSuccess:'1', | 215 | hasSuccess:'1', |
| 216 | } | 216 | } |
| 217 | wx.navigateTo({ | 217 | wx.navigateTo({ |
| 218 | - url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, | 218 | + url: `/pack-cookbook/pages/success_new?hasSuccess=${data.hasSuccess}&identity=${data.identity}&oid=${data.oid}&rid=${data.rid}&sellerName=${data.sellerName}&sid=${data.sid}`, |
| 219 | }) | 219 | }) |
| 220 | } else { | 220 | } else { |
| 221 | App.Advance.CreateOrder({ | 221 | App.Advance.CreateOrder({ |
-
Please register or login to post a comment