Commit cbdc1338b6f36b9522d31d121257c6aba8ab0d86

Authored by pengye
1 parent 833d642e

新邀请函包间字段显示问题处理、提前点餐跳转到分享下单页问题处理

... ... @@ -15,7 +15,6 @@ Page({
rid: '',
oid: '', //订单id
sellerDate: '',
region: '',
tableNum: '',
soltName: '',
identity: '',
... ... @@ -26,7 +25,11 @@ Page({
noData: false,
tpls:[],
current: 0,
seller:{},
seller:{
soltName: '',
date: '',
tablesText: '',
},
options:{},
themeColor:'',
textColor:'',
... ... @@ -76,16 +79,12 @@ Page({
openid: getApp().openid,
rid: this.data.options.rid
}).then(res => {
let tables = [], //桌子信息
regions = [], //区域名称
tableNum = 0;
res.data.tables.forEach(t => {
tables.push(t.name);
tableNum += t.table_pnum * 1
if (regions.indexOf('t.rname') == -1) {
regions.push(t.rname);
}
})
let tablesText = '', //桌子信息
tableNum =0;
res.data.tables.forEach((t,i) => {
tableNum+=t.table_pnum*1
tablesText+=t.rname+t.name+(i==(res.data.tables.length-1)?'':'、');
})
let reserev = RS.reserve(res.data)
let dateSmart;
if (res.data.type == 1) {
... ... @@ -102,9 +101,8 @@ Page({
seller: {
soltName: reserev.soltName,
date: dateSmart,
room: tables.join('、'),
region: regions.join('、'),
tableNum,
tablesText
}
})
}).catch(res => {
... ...
... ... @@ -4,11 +4,11 @@
<scroll-view class="main" style="background: rgba({{themeColor}});">
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">就餐时间:</view>
<view class="texts_right font28r">{{seller.date}}</view>
<view class="texts font28r">{{seller.date}}</view>
</view>
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">桌位台号:</view>
<view class="texts_right font28r">{{seller.room}} {{seller.region}}</view>
<view class="texts_right font28r">{{seller.tablesText}}</view>
</view>
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">就餐人数:</view>
... ...
... ... @@ -18,7 +18,11 @@
.texts_right {
font-weight: 500;
width: 60%;
width: 76%;
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: right;
}
... ...
... ... @@ -425,6 +425,7 @@ Page({
},
// 加减处理已点菜的数据
getCookNormsList(cookbooklist) {
let orderItemCount=0
cookbooklist.forEach(i => {
i.cookbooklist[0].forEach(j=>{
if (j.order_xx && j.order_xx.length > 0) {
... ... @@ -452,12 +453,16 @@ Page({
n.price = (list[0] && list[0].price) ? list[0].price : j.price;
n.member_price = (list[0] && list[0].member_price) ? list[0].member_price : j.member_price;
})
orderItemCount+=j.norms.length
} else {
j.norms = []
}
})
});
console.log(cookbooklist);
this.setData({
orderItemCount
})
return cookbooklist
},
// 获取所有分类下所有菜品列表
... ...
... ... @@ -130,7 +130,7 @@
<userinfo class="right flex-cmc" style="color:rgba({{textColor}})" binduserinfo="gotoShoppingCart">
<view class="rightBox">
<image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG701.png':'https://qn.colorcun.com/s2.png'}}" mode="" />
<view class="num" wx:if="{{orderItemCount}}">{{orderItemCount}}</view>
<view class="num" wx:if="{{orderItemCount*1>0}}">{{orderItemCount}}</view>
</view>
<view class="fixedName" style="color:rgba({{textColor}})">
已选菜品
... ...
... ... @@ -435,16 +435,12 @@ Page({
openid: getApp().openid,
rid: this.data.options.rid
}).then(res => {
let tables = [], //桌子信息
regions = [], //区域名称
tableNum = 0;
res.data.tables.forEach(t => {
tables.push(t.name);
tableNum += t.table_pnum * 1
if (regions.indexOf('t.rname') == -1) {
regions.push(t.rname);
}
})
let tablesText = '', //桌子信息
tableNum =0;
res.data.tables.forEach((t,i) => {
tableNum+=t.table_pnum*1
tablesText+=t.rname+t.name+(i==(res.data.tables.length-1)?'':'、');
})
let reserev = RS.reserve(res.data)
let dateSmart;
if (res.data.type == 1) {
... ... @@ -461,9 +457,8 @@ Page({
seller: {
soltName: reserev.soltName,
date: dateSmart,
room: tables.join('、'),
region: regions.join('、'),
tableNum,
tablesText,
}
})
}).catch(res => {
... ...
<!--pack-cookbook/pages/success_new.wxml-->
<view style="background: rgba({{themeColor}});">
<nav back="none" bindNavEvent="navEvent" backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName}}</nav>
<scroll-view class="main" style="background: rgba({{themeColor}});">
<scroll-view class="main" style="background: rgba({{themeColor}});height: 100%;">
<view class="box">
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">就餐时间:</view>
... ... @@ -9,7 +9,7 @@
</view>
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">桌位台号:</view>
<view class="texts_right font28r">{{seller.room}} {{seller.region}}</view>
<view class="texts_right textsTable font28r">{{seller.tablesText}}</view>
</view>
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">就餐人数:</view>
... ...
... ... @@ -123,7 +123,7 @@
width: 100rpx;
height: 100rpx;
top: 20%;
left: 31%;
left: 25%;
}
.determine {
... ... @@ -335,4 +335,11 @@
}
.btns .onebtns{
width: 100%;
}
.textsTable{
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: right;
}
\ No newline at end of file
... ...