Commit c05728a72cb6123eed499cc3e6bedadbfa91ac98

Authored by yiren
1 parent 8c41cce9

提前点餐

<!--pack-cookbook/pages/cart_new.wxml-->
<view style="background: rgba({{themeColor}});">
<view style="background: rgba({{themeColor}});height: 100%;">
<nav backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName||'提交订单'}}</nav>
<scroll-view class="main" style="background: rgba({{themeColor}});">
<view class="info" style="color: rgba({{textColor}});">
... ...
... ... @@ -18,7 +18,7 @@
.texts_right {
font-weight: 500;
width: 50%;
width: 60%;
text-align: right;
}
... ...
... ... @@ -240,7 +240,8 @@ Page({
cookbookObj.hasSuccess='1'
cookbookObj.sellerName=res.data.seller.sellername;
cookbookObj.oid=res.data.id;
wx.redirectTo({
console.log('跳转到下单页携带参数',{...cookbookObj});
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`,
})
return false;
... ...
... ... @@ -47,18 +47,21 @@ Page({
},
// 获取备注信息
initOrder(){
App.Advance.CreateOrder({
rid: this.data.options.rid,
App.Advance.GetOrderInfo({
identity: this.data.options.identity,
status: '0,1',
openid: getApp().openid,
orderid: this.data.options.oid,
}).then(res => {
console.log(res.data.remark);
this.setData({
notes:res.data.remark
notes:res.data?res.data[0].remark:''
})
})
},
// 在已点餐页点击返回
navEvent(){
wx.redirectTo({
url: `/pages/customer/detail_owner?id=${this.data.options.rid}`,
})
},
// 过滤数据
formatCookList(list) {
// 获取所有的规格
... ...
<!--pack-cookbook/pages/success_new.wxml-->
<view style="background: rgba({{themeColor}});">
<nav backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName}}</nav>
<view style="background: rgba({{themeColor}});height: 100%;">
<nav back="none" bindNavEvent="navEvent" backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName}}</nav>
<scroll-view class="main" style="background: rgba({{themeColor}});">
<view class="box">
<view class="info" style="color: rgba({{textColor}});">
... ...
... ... @@ -62,7 +62,12 @@ Page({
}
})
},
//返回我的订单页面
navEvent(){
wx.redirectTo({
url: '/pages/me/list',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -221,13 +226,18 @@ Page({
},
cookbook() {
if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) {
wx.navigateTo({
url: util.http_build_query({
rid: this.id,
oid: this.data.detail.order.id,
identity: 1
}, '/pack-cookbook/pages/success_new')
});
let cookbookObj = {
rid: this.id,
oid: this.data.detail.order.id,
sellerName:this.detail.seller.sellername,
sid:this.detail.seller.id,
identity: '1',
hasSuccess:'1',
}
console.log('跳转到下单页携带参数',{...cookbookObj});
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`,
})
} else {
App.Advance.CreateOrder({
rid: this.id,
... ... @@ -241,8 +251,9 @@ Page({
rid: this.id,
oid: res.data.id,
identity: 1,
sid: res.data.sellerid
}, '/pack-cookbook/pages/index_news')
sid:this.detail.sid,
sellerName: this.detail.seller.sellername,
}, '/pack-cookbook/pages/index_new')
});
})
}
... ...
<!--pages/customer/detail_owner.wxml-->
<nav hasHome>订座详情</nav>
<nav back="none" bindNavEvent="navEvent">订座详情</nav>
<page loading="{{loading}}">
<view class="view flex justify-start subscribe-tips align-center" wx:if="{{!subscribeHide && (detail.hasRunning || detail.status==0)}}">
<view class="view flex-treble flex align-center">
... ...
... ... @@ -206,15 +206,17 @@ Page({
},
cookbook() {
if (this.data.detail.order && this.data.detail.order.cookbooklist.length > 0) {
let cookbookObj = {
rid: this.id,
oid: this.data.detail.order.id,
sellerName: this.data.seller.name,
sid: this.data.seller.sid,
identity: '1',
hasSuccess:'1',
}
wx.navigateTo({
url: util.http_build_query({
rid: this.id,
oid: this.data.detail.order.id,
sellerName: this.data.seller.name,
sid: this.data.seller.sid,
identity: '1',
}, '/pack-cookbook/pages/success_new')
});
url: `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`,
})
} else {
App.Advance.CreateOrder({
rid: this.id,
... ...
... ... @@ -695,4 +695,11 @@ export default {
'App.Cookbook.GetCookbookByClass':{
openid:'openid'
},
// 获取提前点餐订单详情
'App.Advance.GetOrderInfo':{
openid:'openid'
},
}
\ No newline at end of file
... ...