Commit cbdc1338b6f36b9522d31d121257c6aba8ab0d86

Authored by pengye
1 parent 833d642e

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

@@ -15,7 +15,6 @@ Page({ @@ -15,7 +15,6 @@ Page({
15 rid: '', 15 rid: '',
16 oid: '', //订单id 16 oid: '', //订单id
17 sellerDate: '', 17 sellerDate: '',
18 - region: '',  
19 tableNum: '', 18 tableNum: '',
20 soltName: '', 19 soltName: '',
21 identity: '', 20 identity: '',
@@ -26,7 +25,11 @@ Page({ @@ -26,7 +25,11 @@ Page({
26 noData: false, 25 noData: false,
27 tpls:[], 26 tpls:[],
28 current: 0, 27 current: 0,
29 - seller:{}, 28 + seller:{
  29 + soltName: '',
  30 + date: '',
  31 + tablesText: '',
  32 + },
30 options:{}, 33 options:{},
31 themeColor:'', 34 themeColor:'',
32 textColor:'', 35 textColor:'',
@@ -76,16 +79,12 @@ Page({ @@ -76,16 +79,12 @@ Page({
76 openid: getApp().openid, 79 openid: getApp().openid,
77 rid: this.data.options.rid 80 rid: this.data.options.rid
78 }).then(res => { 81 }).then(res => {
79 - let tables = [], //桌子信息  
80 - regions = [], //区域名称  
81 - tableNum = 0;  
82 - res.data.tables.forEach(t => {  
83 - tables.push(t.name);  
84 - tableNum += t.table_pnum * 1  
85 - if (regions.indexOf('t.rname') == -1) {  
86 - regions.push(t.rname);  
87 - }  
88 - }) 82 + let tablesText = '', //桌子信息
  83 + tableNum =0;
  84 + res.data.tables.forEach((t,i) => {
  85 + tableNum+=t.table_pnum*1
  86 + tablesText+=t.rname+t.name+(i==(res.data.tables.length-1)?'':'、');
  87 + })
89 let reserev = RS.reserve(res.data) 88 let reserev = RS.reserve(res.data)
90 let dateSmart; 89 let dateSmart;
91 if (res.data.type == 1) { 90 if (res.data.type == 1) {
@@ -102,9 +101,8 @@ Page({ @@ -102,9 +101,8 @@ Page({
102 seller: { 101 seller: {
103 soltName: reserev.soltName, 102 soltName: reserev.soltName,
104 date: dateSmart, 103 date: dateSmart,
105 - room: tables.join('、'),  
106 - region: regions.join('、'),  
107 tableNum, 104 tableNum,
  105 + tablesText
108 } 106 }
109 }) 107 })
110 }).catch(res => { 108 }).catch(res => {
@@ -4,11 +4,11 @@ @@ -4,11 +4,11 @@
4 <scroll-view class="main" style="background: rgba({{themeColor}});"> 4 <scroll-view class="main" style="background: rgba({{themeColor}});">
5 <view class="info" style="color: rgba({{textColor}});"> 5 <view class="info" style="color: rgba({{textColor}});">
6 <view class="texts font28r">就餐时间:</view> 6 <view class="texts font28r">就餐时间:</view>
7 - <view class="texts_right font28r">{{seller.date}}</view> 7 + <view class="texts font28r">{{seller.date}}</view>
8 </view> 8 </view>
9 <view class="info" style="color: rgba({{textColor}});"> 9 <view class="info" style="color: rgba({{textColor}});">
10 <view class="texts font28r">桌位台号:</view> 10 <view class="texts font28r">桌位台号:</view>
11 - <view class="texts_right font28r">{{seller.room}} {{seller.region}}</view> 11 + <view class="texts_right font28r">{{seller.tablesText}}</view>
12 </view> 12 </view>
13 <view class="info" style="color: rgba({{textColor}});"> 13 <view class="info" style="color: rgba({{textColor}});">
14 <view class="texts font28r">就餐人数:</view> 14 <view class="texts font28r">就餐人数:</view>
@@ -18,7 +18,11 @@ @@ -18,7 +18,11 @@
18 18
19 .texts_right { 19 .texts_right {
20 font-weight: 500; 20 font-weight: 500;
21 - width: 60%; 21 + width: 76%;
  22 + display: -webkit-box;
  23 + word-break: break-all;
  24 + word-wrap: break-word;
  25 + overflow: hidden;
22 text-align: right; 26 text-align: right;
23 } 27 }
24 28
@@ -425,6 +425,7 @@ Page({ @@ -425,6 +425,7 @@ Page({
425 }, 425 },
426 // 加减处理已点菜的数据 426 // 加减处理已点菜的数据
427 getCookNormsList(cookbooklist) { 427 getCookNormsList(cookbooklist) {
  428 + let orderItemCount=0
428 cookbooklist.forEach(i => { 429 cookbooklist.forEach(i => {
429 i.cookbooklist[0].forEach(j=>{ 430 i.cookbooklist[0].forEach(j=>{
430 if (j.order_xx && j.order_xx.length > 0) { 431 if (j.order_xx && j.order_xx.length > 0) {
@@ -452,12 +453,16 @@ Page({ @@ -452,12 +453,16 @@ Page({
452 n.price = (list[0] && list[0].price) ? list[0].price : j.price; 453 n.price = (list[0] && list[0].price) ? list[0].price : j.price;
453 n.member_price = (list[0] && list[0].member_price) ? list[0].member_price : j.member_price; 454 n.member_price = (list[0] && list[0].member_price) ? list[0].member_price : j.member_price;
454 }) 455 })
  456 + orderItemCount+=j.norms.length
455 } else { 457 } else {
456 j.norms = [] 458 j.norms = []
457 } 459 }
458 }) 460 })
459 }); 461 });
460 console.log(cookbooklist); 462 console.log(cookbooklist);
  463 + this.setData({
  464 + orderItemCount
  465 + })
461 return cookbooklist 466 return cookbooklist
462 }, 467 },
463 // 获取所有分类下所有菜品列表 468 // 获取所有分类下所有菜品列表
@@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
130 <userinfo class="right flex-cmc" style="color:rgba({{textColor}})" binduserinfo="gotoShoppingCart"> 130 <userinfo class="right flex-cmc" style="color:rgba({{textColor}})" binduserinfo="gotoShoppingCart">
131 <view class="rightBox"> 131 <view class="rightBox">
132 <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG701.png':'https://qn.colorcun.com/s2.png'}}" mode="" /> 132 <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG701.png':'https://qn.colorcun.com/s2.png'}}" mode="" />
133 - <view class="num" wx:if="{{orderItemCount}}">{{orderItemCount}}</view> 133 + <view class="num" wx:if="{{orderItemCount*1>0}}">{{orderItemCount}}</view>
134 </view> 134 </view>
135 <view class="fixedName" style="color:rgba({{textColor}})"> 135 <view class="fixedName" style="color:rgba({{textColor}})">
136 已选菜品 136 已选菜品
@@ -435,16 +435,12 @@ Page({ @@ -435,16 +435,12 @@ Page({
435 openid: getApp().openid, 435 openid: getApp().openid,
436 rid: this.data.options.rid 436 rid: this.data.options.rid
437 }).then(res => { 437 }).then(res => {
438 - let tables = [], //桌子信息  
439 - regions = [], //区域名称  
440 - tableNum = 0;  
441 - res.data.tables.forEach(t => {  
442 - tables.push(t.name);  
443 - tableNum += t.table_pnum * 1  
444 - if (regions.indexOf('t.rname') == -1) {  
445 - regions.push(t.rname);  
446 - }  
447 - }) 438 + let tablesText = '', //桌子信息
  439 + tableNum =0;
  440 + res.data.tables.forEach((t,i) => {
  441 + tableNum+=t.table_pnum*1
  442 + tablesText+=t.rname+t.name+(i==(res.data.tables.length-1)?'':'、');
  443 + })
448 let reserev = RS.reserve(res.data) 444 let reserev = RS.reserve(res.data)
449 let dateSmart; 445 let dateSmart;
450 if (res.data.type == 1) { 446 if (res.data.type == 1) {
@@ -461,9 +457,8 @@ Page({ @@ -461,9 +457,8 @@ Page({
461 seller: { 457 seller: {
462 soltName: reserev.soltName, 458 soltName: reserev.soltName,
463 date: dateSmart, 459 date: dateSmart,
464 - room: tables.join('、'),  
465 - region: regions.join('、'),  
466 tableNum, 460 tableNum,
  461 + tablesText,
467 } 462 }
468 }) 463 })
469 }).catch(res => { 464 }).catch(res => {
1 <!--pack-cookbook/pages/success_new.wxml--> 1 <!--pack-cookbook/pages/success_new.wxml-->
2 <view style="background: rgba({{themeColor}});"> 2 <view style="background: rgba({{themeColor}});">
3 <nav back="none" bindNavEvent="navEvent" backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName}}</nav> 3 <nav back="none" bindNavEvent="navEvent" backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName}}</nav>
4 - <scroll-view class="main" style="background: rgba({{themeColor}});"> 4 + <scroll-view class="main" style="background: rgba({{themeColor}});height: 100%;">
5 <view class="box"> 5 <view class="box">
6 <view class="info" style="color: rgba({{textColor}});"> 6 <view class="info" style="color: rgba({{textColor}});">
7 <view class="texts font28r">就餐时间:</view> 7 <view class="texts font28r">就餐时间:</view>
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 </view> 9 </view>
10 <view class="info" style="color: rgba({{textColor}});"> 10 <view class="info" style="color: rgba({{textColor}});">
11 <view class="texts font28r">桌位台号:</view> 11 <view class="texts font28r">桌位台号:</view>
12 - <view class="texts_right font28r">{{seller.room}} {{seller.region}}</view> 12 + <view class="texts_right textsTable font28r">{{seller.tablesText}}</view>
13 </view> 13 </view>
14 <view class="info" style="color: rgba({{textColor}});"> 14 <view class="info" style="color: rgba({{textColor}});">
15 <view class="texts font28r">就餐人数:</view> 15 <view class="texts font28r">就餐人数:</view>
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 width: 100rpx; 123 width: 100rpx;
124 height: 100rpx; 124 height: 100rpx;
125 top: 20%; 125 top: 20%;
126 - left: 31%; 126 + left: 25%;
127 } 127 }
128 128
129 .determine { 129 .determine {
@@ -335,4 +335,11 @@ @@ -335,4 +335,11 @@
335 } 335 }
336 .btns .onebtns{ 336 .btns .onebtns{
337 width: 100%; 337 width: 100%;
  338 +}
  339 +.textsTable{
  340 + display: -webkit-box;
  341 + word-break: break-all;
  342 + word-wrap: break-word;
  343 + overflow: hidden;
  344 + text-align: right;
338 } 345 }