Commit 8c41cce90787fef55f5210b2589b45dbe2186b31

Authored by yiren
1 parent b20afeee

提前点餐

@@ -332,7 +332,7 @@ Page({ @@ -332,7 +332,7 @@ Page({
332 rid: this.data.bookInfo.id, 332 rid: this.data.bookInfo.id,
333 oid: this.data.bookInfo.orderid, 333 oid: this.data.bookInfo.orderid,
334 identity: 2 334 identity: 2
335 - }, '/pack-cookbook/pages/success') 335 + }, '/pack-cookbook/pages/success_new')
336 }); 336 });
337 }, 337 },
338 refuseOrder(){ 338 refuseOrder(){
@@ -91,7 +91,7 @@ Page({ @@ -91,7 +91,7 @@ Page({
91 identity:this.data.options.identity, 91 identity:this.data.options.identity,
92 }).then(res=>{ 92 }).then(res=>{
93 wx.redirectTo({ 93 wx.redirectTo({
94 - url: util.http_build_query({...this.data.options,hasSuccess:1},'./success') 94 + url: util.http_build_query({...this.data.options,hasSuccess:1},'./success_new')
95 }) 95 })
96 }) 96 })
97 }, 97 },
@@ -330,11 +330,11 @@ Page({ @@ -330,11 +330,11 @@ Page({
330 ...this.data.options 330 ...this.data.options
331 } 331 }
332 cookbookObj.hasSuccess = 1 332 cookbookObj.hasSuccess = 1
333 - cookbookObj.notes=this.data.notes  
334 App.Advance.PlaceOrder({ 333 App.Advance.PlaceOrder({
335 orderid: this.data.options.oid, 334 orderid: this.data.options.oid,
336 rid: this.data.options.rid, 335 rid: this.data.options.rid,
337 identity: this.data.options.identity, 336 identity: this.data.options.identity,
  337 + remark:this.data.notes+''
338 }).then(res => { 338 }).then(res => {
339 wx.navigateTo({ 339 wx.navigateTo({
340 url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, 340 url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`,
@@ -102,7 +102,7 @@ @@ -102,7 +102,7 @@
102 .btns button { 102 .btns button {
103 width: 50%; 103 width: 50%;
104 box-sizing: border-box; 104 box-sizing: border-box;
105 - color: #BFC4D4; 105 + color: #fff;
106 height: 100%; 106 height: 100%;
107 border-radius: 0; 107 border-radius: 0;
108 } 108 }
@@ -237,6 +237,7 @@ Page({ @@ -237,6 +237,7 @@ Page({
237 let cookbookObj = { 237 let cookbookObj = {
238 ...this.data.options 238 ...this.data.options
239 } 239 }
  240 + cookbookObj.hasSuccess='1'
240 cookbookObj.sellerName=res.data.seller.sellername; 241 cookbookObj.sellerName=res.data.seller.sellername;
241 cookbookObj.oid=res.data.id; 242 cookbookObj.oid=res.data.id;
242 wx.redirectTo({ 243 wx.redirectTo({
@@ -43,6 +43,21 @@ Page({ @@ -43,6 +43,21 @@ Page({
43 }); 43 });
44 this.getCheckCookList() 44 this.getCheckCookList()
45 this.getDetail() 45 this.getDetail()
  46 + this.initOrder()
  47 + },
  48 + // 获取备注信息
  49 + initOrder(){
  50 + App.Advance.CreateOrder({
  51 + rid: this.data.options.rid,
  52 + identity: this.data.options.identity,
  53 + status: '0,1',
  54 + openid: getApp().openid,
  55 + }).then(res => {
  56 + console.log(res.data.remark);
  57 + this.setData({
  58 + notes:res.data.remark
  59 + })
  60 + })
46 }, 61 },
47 // 过滤数据 62 // 过滤数据
48 formatCookList(list) { 63 formatCookList(list) {
@@ -321,6 +336,7 @@ Page({ @@ -321,6 +336,7 @@ Page({
321 url 336 url
322 }) 337 })
323 }, 338 },
  339 + // 获取订单信息
324 getDetail() { 340 getDetail() {
325 App.Reserve.Detail({ 341 App.Reserve.Detail({
326 openid: getApp().openid, 342 openid: getApp().openid,
@@ -364,6 +380,7 @@ Page({ @@ -364,6 +380,7 @@ Page({
364 console.log(res, '详情请求失败'); 380 console.log(res, '详情请求失败');
365 }) 381 })
366 }, 382 },
  383 + // 获取券 充值信息
367 getSellerTemplateConfFun() { 384 getSellerTemplateConfFun() {
368 App.Seller.GetSellerTemplateConf({ 385 App.Seller.GetSellerTemplateConf({
369 sid: this.data.options.sid 386 sid: this.data.options.sid
@@ -420,7 +437,8 @@ Page({ @@ -420,7 +437,8 @@ Page({
420 ...this.data.options, 437 ...this.data.options,
421 hasOnlyShow: 1 438 hasOnlyShow: 1
422 }; 439 };
423 - delete cookbookObj.hasSuccess 440 + console.log(cookbookObj);
  441 + delete cozokbookObj.hasSuccess
424 return { 442 return {
425 title: '菜品已点好,快来看看都点了什么~', 443 title: '菜品已点好,快来看看都点了什么~',
426 path: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`, 444 path: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`,
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 </view> 17 </view>
18 <view class="info" style="color: rgba({{textColor}});"> 18 <view class="info" style="color: rgba({{textColor}});">
19 <view class="texts font28r">备注信息:</view> 19 <view class="texts font28r">备注信息:</view>
20 - <view class="texts font28r">{{options.notes}}</view> 20 + <view class="texts font28r">{{notes?notes:''}}</view>
21 </view> 21 </view>
22 <image class="imgs" src="https://qn.colorcun.com/001.png" mode="" /> 22 <image class="imgs" src="https://qn.colorcun.com/001.png" mode="" />
23 </view> 23 </view>
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 </view> 99 </view>
100 </view> 100 </view>
101 </scroll-view> 101 </scroll-view>
102 - <view class="btns flex-cc"> 102 + <view class="btns flex-cc" wx:if="{{options.hasSuccess==1}}">
103 <button class="font32r continue flex-cc" style="background: rgba({{themeColor}});color: rgba({{textColor}});" bindtap="continueOrdering">菜品更换</button> 103 <button class="font32r continue flex-cc" style="background: rgba({{themeColor}});color: rgba({{textColor}});" bindtap="continueOrdering">菜品更换</button>
104 <button class="font32r determine flex-cc" open-type="share">分享菜单</button> 104 <button class="font32r determine flex-cc" open-type="share">分享菜单</button>
105 </view> 105 </view>
@@ -101,7 +101,7 @@ @@ -101,7 +101,7 @@
101 .btns button { 101 .btns button {
102 width: 50%; 102 width: 50%;
103 box-sizing: border-box; 103 box-sizing: border-box;
104 - color: #BFC4D4; 104 + color: #fff;
105 height: 100%; 105 height: 100%;
106 border-radius: 0; 106 border-radius: 0;
107 } 107 }
@@ -226,7 +226,7 @@ Page({ @@ -226,7 +226,7 @@ Page({
226 rid: this.id, 226 rid: this.id,
227 oid: this.data.detail.order.id, 227 oid: this.data.detail.order.id,
228 identity: 1 228 identity: 1
229 - }, '/pack-cookbook/pages/success') 229 + }, '/pack-cookbook/pages/success_new')
230 }); 230 });
231 } else { 231 } else {
232 App.Advance.CreateOrder({ 232 App.Advance.CreateOrder({
@@ -242,7 +242,7 @@ Page({ @@ -242,7 +242,7 @@ Page({
242 oid: res.data.id, 242 oid: res.data.id,
243 identity: 1, 243 identity: 1,
244 sid: res.data.sellerid 244 sid: res.data.sellerid
245 - }, '/pack-cookbook/pages/index') 245 + }, '/pack-cookbook/pages/index_news')
246 }); 246 });
247 }) 247 })
248 } 248 }
@@ -161,7 +161,7 @@ @@ -161,7 +161,7 @@
161 </view> 161 </view>
162 162
163 <block wx:if="{{seller.seller_config_info.is_display_dish==1}}"> 163 <block wx:if="{{seller.seller_config_info.is_display_dish==1}}">
164 - <navigator url="/pack-cookbook/pages/index?rid=18599&oid=273&identity=1&seeAll={{seller.sellername}}&sid={{seller.id}}" hover-class="navigator-hover"> 164 + <navigator url="/pack-cookbook/pages/index_new?rid=18599&oid=273&identity=1&seeAll={{seller.sellername}}&sid={{seller.id}}" hover-class="navigator-hover">
165 <view class="view padding-lg margin-top-sm bg-white text-black"> 165 <view class="view padding-lg margin-top-sm bg-white text-black">
166 <view class="view flex justify-between align-center"> 166 <view class="view flex justify-between align-center">
167 <view class="view txt-40-h text-bold">查看菜单</view> 167 <view class="view txt-40-h text-bold">查看菜单</view>