Commit 55e3f3d02df5439870520e4afb5a23251ef80d2b
1 parent
eef86833
样式调整、toast组件添加、解决提前点餐分享菜品更换提示显示不全问题
Showing
9 changed files
with
197 additions
and
125 deletions
miniprogram/components/toast/index.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + options: { | ||
| 3 | + multipleSlots: true // 在组件定义时的选项中启用多slot支持 | ||
| 4 | + }, | ||
| 5 | + /** | ||
| 6 | + * 组件的属性列表 | ||
| 7 | + */ | ||
| 8 | + properties: { | ||
| 9 | + toastText: { // 属性名 | ||
| 10 | + type: String, | ||
| 11 | + value: '内容' | ||
| 12 | + } | ||
| 13 | + }, | ||
| 14 | + /** | ||
| 15 | + * 组件的初始数据 | ||
| 16 | + */ | ||
| 17 | + data: { | ||
| 18 | + toastShow: false, | ||
| 19 | + }, | ||
| 20 | + /** | ||
| 21 | + * 组件的方法列表 | ||
| 22 | + */ | ||
| 23 | + methods: { | ||
| 24 | + showToast(text, time) { | ||
| 25 | + this.setData({ | ||
| 26 | + toastShow: !this.data.toastShow, | ||
| 27 | + toastText: text | ||
| 28 | + }) | ||
| 29 | + var that = this | ||
| 30 | + if (!time) { | ||
| 31 | + time = 8000 | ||
| 32 | + } | ||
| 33 | + setTimeout(function () { | ||
| 34 | + that.setData({ | ||
| 35 | + toastShow: !that.data.toastShow | ||
| 36 | + }) | ||
| 37 | + }, time) | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | +}) |
miniprogram/components/toast/index.json
0 → 100644
miniprogram/components/toast/index.wxml
0 → 100644
miniprogram/components/toast/index.wxss
0 → 100644
| 1 | +.wx_toast_container { | ||
| 2 | + position: fixed; | ||
| 3 | + top: 0; | ||
| 4 | + right: 0; | ||
| 5 | + left: 0; | ||
| 6 | + bottom: 0; | ||
| 7 | + display: flex; | ||
| 8 | + justify-content: center; | ||
| 9 | + align-items: center; | ||
| 10 | + z-index: 1000; | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +.wx_toast_text { | ||
| 14 | + background: rgba(0, 0, 0, 0.95); | ||
| 15 | + color: white; | ||
| 16 | + text-align: center; | ||
| 17 | + font-size: 34rpx; | ||
| 18 | + padding: 34rpx 50rpx; | ||
| 19 | + border-radius: 20rpx; | ||
| 20 | + max-width: 70%; | ||
| 21 | + min-width: 35%; | ||
| 22 | + box-sizing: border-box; | ||
| 23 | + line-height: 120%; | ||
| 24 | +} |
| 1 | <!--pack-cookbook/pages/cart_new.wxml--> | 1 | <!--pack-cookbook/pages/cart_new.wxml--> |
| 2 | -<view style="background: rgba({{themeColor}});height: 100%;"> | 2 | +<view class="page" style="background: rgba({{themeColor}});"> |
| 3 | <nav backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName||'提交订单'}}</nav> | 3 | <nav 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}});"> |
| 5 | <view class="info" style="color: rgba({{textColor}});"> | 5 | <view class="info" style="color: rgba({{textColor}});"> |
| 1 | <!--pack-cookbook/pages/index_new.wxml--> | 1 | <!--pack-cookbook/pages/index_new.wxml--> |
| 2 | -<nav backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName||'提前点菜'}}</nav> | ||
| 3 | -<loading wx:if="{{isloading}}">数据加载中</loading> | ||
| 4 | -<scroll-view style="background: rgba({{themeColor}});" class="content" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true"> | ||
| 5 | - <block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs"> | ||
| 6 | - <view class="dishWrap" id="{{ 'inToView'+item.id}}"> | ||
| 7 | - <view class="heand flex-vc flex-cc"> | ||
| 8 | - <view class="style_round flex-vc flex-cc"> | ||
| 9 | - <view class="round"></view> | ||
| 10 | - <view class="line"></view> | ||
| 11 | - </view> | ||
| 12 | - <view class="title" style="color:rgba({{navColor}})">{{item.class_name}}</view> | ||
| 13 | - <view class="style_round flex-vc flex-cc"> | ||
| 14 | - <view class="line"></view> | ||
| 15 | - <view class="round"></view> | 2 | +<view class="page" style="background: rgba({{themeColor}});"> |
| 3 | + <nav backgroundColor="rgba({{themeColor}})" color="rgba({{navColor}})">{{options.sellerName||'提前点菜'}}</nav> | ||
| 4 | + <loading wx:if="{{isloading}}">数据加载中</loading> | ||
| 5 | + <scroll-view style="background: rgba({{themeColor}});" class="content" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true"> | ||
| 6 | + <block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs"> | ||
| 7 | + <view class="dishWrap" id="{{ 'inToView'+item.id}}"> | ||
| 8 | + <view class="heand flex-vc flex-cc"> | ||
| 9 | + <view class="style_round flex-vc flex-cc"> | ||
| 10 | + <view class="round"></view> | ||
| 11 | + <view class="line"></view> | ||
| 12 | + </view> | ||
| 13 | + <view class="title" style="color:rgba({{navColor}})">{{item.class_name}}</view> | ||
| 14 | + <view class="style_round flex-vc flex-cc"> | ||
| 15 | + <view class="line"></view> | ||
| 16 | + <view class="round"></view> | ||
| 17 | + </view> | ||
| 16 | </view> | 18 | </view> |
| 17 | - </view> | ||
| 18 | - <block wx:for="{{item.cookbooklist[0]}}" wx:key="id" wx:for-index="index"> | ||
| 19 | - <!-- name_type 1左侧,2右侧,3顶部分开 image_type 1大图,2小图 --> | ||
| 20 | - <view wx:if="{{item.image_type=='1'}}" class="oneBox" data-idx="{{item.image_type}}" data-nameType="{{item.name_type}}"> | ||
| 21 | - <block wx:if="{{item.name_type!='3'}}"> | ||
| 22 | - <view class="dishItem {{item.name_type=='2'?'typeB':''}}"> | ||
| 23 | - <view class="dishLeft dishTexts" style="color:rgba({{textColor}})"> | ||
| 24 | - {{item.name}} | ||
| 25 | - </view> | ||
| 26 | - <view class="dishTexts dishRight" style="color:rgba({{textColor}})"> | ||
| 27 | - <text wx:if="{{item.taste}}" class="texts">味型:{{item.taste}}</text> | ||
| 28 | - <text wx:if="{{item.cooks}}">烹调:{{item.cooks}}</text> | ||
| 29 | - </view> | ||
| 30 | - </view> | ||
| 31 | - <view wx:if="{{item.specArr.length>0}}" class="norms {{item.name_type=='2'?'normsB':''}}" style="color:rgba({{navColor}})"> | ||
| 32 | - <view wx:for="{{item.specArr}}" wx:key="id"> | ||
| 33 | - {{item.str}} | ||
| 34 | - {{item.member_str}} | ||
| 35 | - </view> | ||
| 36 | - </view> | ||
| 37 | - <view wx:else class="norms {{item.name_type=='2'?'normsB':''}}"> | ||
| 38 | - {{'¥'+item.price+'/'+item.unit}} | ||
| 39 | - {{item.member_price?'会员 ¥'+item.member_price+'/'+item.unit:''}} | ||
| 40 | - </view> | ||
| 41 | - </block> | ||
| 42 | - <view wx:else class="names"> | ||
| 43 | - <view class="dishItem flex-lr"> | ||
| 44 | - <view class="dishLeft dishTexts" style="color:rgba({{textColor}})"> | ||
| 45 | - {{item.name}} | 19 | + <block wx:for="{{item.cookbooklist[0]}}" wx:key="id" wx:for-index="index"> |
| 20 | + <!-- name_type 1左侧,2右侧,3顶部分开 image_type 1大图,2小图 --> | ||
| 21 | + <view wx:if="{{item.image_type=='1'}}" class="oneBox" data-idx="{{item.image_type}}" data-nameType="{{item.name_type}}"> | ||
| 22 | + <block wx:if="{{item.name_type!='3'}}"> | ||
| 23 | + <view class="dishItem {{item.name_type=='2'?'typeB':''}}"> | ||
| 24 | + <view class="dishLeft dishTexts" style="color:rgba({{textColor}})"> | ||
| 25 | + {{item.name}} | ||
| 26 | + </view> | ||
| 27 | + <view class="dishTexts dishRight" style="color:rgba({{textColor}})"> | ||
| 28 | + <text wx:if="{{item.taste}}" class="texts">味型:{{item.taste}}</text> | ||
| 29 | + <text wx:if="{{item.cooks}}">烹调:{{item.cooks}}</text> | ||
| 30 | + </view> | ||
| 46 | </view> | 31 | </view> |
| 47 | - <view wx:if="{{item.specArr.length>0}}" style="color:rgba({{textColor}})" class="norms {{item.name_type=='2'?'normsB':''}}" style="color:rgba({{navColor}})"> | 32 | + <view wx:if="{{item.specArr.length>0}}" class="norms {{item.name_type=='2'?'normsB':''}}" style="color:rgba({{navColor}})"> |
| 48 | <view wx:for="{{item.specArr}}" wx:key="id"> | 33 | <view wx:for="{{item.specArr}}" wx:key="id"> |
| 49 | {{item.str}} | 34 | {{item.str}} |
| 50 | {{item.member_str}} | 35 | {{item.member_str}} |
| 51 | </view> | 36 | </view> |
| 52 | </view> | 37 | </view> |
| 53 | - <view wx:else class="norms {{item.name_type=='2'?'normsB':''}}" style="color:rgba({{textColor}})"> | 38 | + <view wx:else class="norms {{item.name_type=='2'?'normsB':''}}"> |
| 54 | {{'¥'+item.price+'/'+item.unit}} | 39 | {{'¥'+item.price+'/'+item.unit}} |
| 55 | {{item.member_price?'会员 ¥'+item.member_price+'/'+item.unit:''}} | 40 | {{item.member_price?'会员 ¥'+item.member_price+'/'+item.unit:''}} |
| 56 | </view> | 41 | </view> |
| 57 | - </view> | ||
| 58 | - <view class="dishTexts dishRight bottom" style="color:rgba({{textColor}})"> | ||
| 59 | - <text wx:if="{{item.taste}}" class="texts">味型:{{item.taste}}</text> | ||
| 60 | - <text wx:if="{{item.cooks}}">烹调:{{item.cooks}}</text> | ||
| 61 | - </view> | ||
| 62 | - </view> | ||
| 63 | - <view class="imgOneBox"> | ||
| 64 | - <image wx:if="{{item.image}}" catch:tap="preview" style="height: {{item.imageHeight>height?height+'px':item.imageHeight+'px'}};width: {{item.imageHeight>height?'':item.imageHeight==height?'100%':'100%'}}" mode="{{(item.imageHeight>height || item.imageHeight==height)?'aspectFit':''}}" src="{{item.image}}" bindload="imageLoad" data-item="{{item}}" data-index="{{index}}" data-indexs="{{indexs}}" /> | ||
| 65 | - </view> | ||
| 66 | - <view class="greens" wx:if="{{item.desc}}"> | ||
| 67 | - <view class="news" style="color:rgba({{textColor}})">{{item.desc}}</view> | ||
| 68 | - </view> | ||
| 69 | - <view wx:for="{{item.norms}}" wx:key="id" wx:for-index="normsIndex" class="algorithmImg flex-lr calculate"> | ||
| 70 | - <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG697.png':'https://qn.colorcun.com/Line2.png'}}" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" /> | ||
| 71 | - <view class="box flex-cc"> | ||
| 72 | - <view class="num flex-cc"> | ||
| 73 | - {{item.count}}<view wx:if="{{item.specs || item.unit}}" style="color:rgba({{textColor}})">{{item.specs?item.specs:item.unit}}</view> | 42 | + </block> |
| 43 | + <view wx:else class="names"> | ||
| 44 | + <view class="dishItem flex-lr"> | ||
| 45 | + <view class="dishLeft dishTexts" style="color:rgba({{textColor}})"> | ||
| 46 | + {{item.name}} | ||
| 47 | + </view> | ||
| 48 | + <view wx:if="{{item.specArr.length>0}}" style="color:rgba({{textColor}})" class="norms {{item.name_type=='2'?'normsB':''}}" style="color:rgba({{navColor}})"> | ||
| 49 | + <view wx:for="{{item.specArr}}" wx:key="id"> | ||
| 50 | + {{item.str}} | ||
| 51 | + {{item.member_str}} | ||
| 52 | + </view> | ||
| 53 | + </view> | ||
| 54 | + <view wx:else class="norms {{item.name_type=='2'?'normsB':''}}" style="color:rgba({{textColor}})"> | ||
| 55 | + {{'¥'+item.price+'/'+item.unit}} | ||
| 56 | + {{item.member_price?'会员 ¥'+item.member_price+'/'+item.unit:''}} | ||
| 57 | + </view> | ||
| 74 | </view> | 58 | </view> |
| 75 | - <view class="practice" wx:if="{{item.name}}" style="color:rgba({{textColor}})">{{item.name}}</view> | ||
| 76 | - </view> | ||
| 77 | - <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 78 | - </view> | ||
| 79 | - <view wx:if="{{(item.specArr.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr imgbox"> | ||
| 80 | - <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" class="imgs" mode="aspectFill" bindtap="addition" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 81 | - </view> | ||
| 82 | - </view> | ||
| 83 | - <view wx:else class="twoBox" data-idx="{{item.image_type}}"> | ||
| 84 | - <view class="{{item.boderNone?'borderNone twoItem':'twoItem'}}"> | ||
| 85 | - <view class="twoTitle" style="color:rgba({{textColor}})">{{item.name}}</view> | ||
| 86 | - <view class="twoInfo dishTexts" wx:if="{{item.taste}}" style="color:rgba({{textColor}})"> | ||
| 87 | - <text wx:if="{{item.taste}}" class="texts">味型:{{item.taste}}</text> | ||
| 88 | - <text wx:if="{{item.cooks}}">烹调:{{item.cooks}}</text> | ||
| 89 | - </view> | ||
| 90 | - <view wx:if="{{item.specArr.length>0}}" class="twoInfo twoSingle" style="color:rgba({{textColor}})"> | ||
| 91 | - <view wx:for="{{item.specArr}}" wx:key="id"> | ||
| 92 | - {{item.str}} | ||
| 93 | - {{item.member_str}} | 59 | + <view class="dishTexts dishRight bottom" style="color:rgba({{textColor}})"> |
| 60 | + <text wx:if="{{item.taste}}" class="texts">味型:{{item.taste}}</text> | ||
| 61 | + <text wx:if="{{item.cooks}}">烹调:{{item.cooks}}</text> | ||
| 94 | </view> | 62 | </view> |
| 95 | </view> | 63 | </view> |
| 96 | - <view wx:else class="twoInfo twoSingle"> | ||
| 97 | - {{item.price?'¥'+item.price+'/'+item.unit:''}} | ||
| 98 | - {{item.member_price?'会员 ¥'+item.member_price+'/'+item.unit:''}} | 64 | + <view class="imgOneBox"> |
| 65 | + <image wx:if="{{item.image}}" catch:tap="preview" style="height: {{item.imageHeight>height?height+'px':item.imageHeight+'px'}};width: {{item.imageHeight>height?'':item.imageHeight==height?'100%':'100%'}}" mode="{{(item.imageHeight>height || item.imageHeight==height)?'aspectFit':''}}" src="{{item.image}}" bindload="imageLoad" data-item="{{item}}" data-index="{{index}}" data-indexs="{{indexs}}" /> | ||
| 99 | </view> | 66 | </view> |
| 100 | - <image wx:if="{{item.image}}" catch:tap="preview" style="height: {{item.imageHeight>height2?height2+'px':item.imageHeight+'px'}};width: {{item.imageHeight>height2?height2+'px':item.imageHeight==height2?'100%':'100%'}}" mode="{{(item.imageHeight>height2 || item.imageHeight==height2)?'aspectFit':'aspectFill'}}" src="{{item.image}}" bindload="imageLoad" data-item="{{item}}" data-index="{{index}}" data-indexs="{{indexs}}" /> | ||
| 101 | <view class="greens" wx:if="{{item.desc}}"> | 67 | <view class="greens" wx:if="{{item.desc}}"> |
| 102 | <view class="news" style="color:rgba({{textColor}})">{{item.desc}}</view> | 68 | <view class="news" style="color:rgba({{textColor}})">{{item.desc}}</view> |
| 103 | </view> | 69 | </view> |
| 104 | - <view wx:for="{{item.norms}}" wx:key="unit" wx:for-index="normsIndex" class="algorithmImg flex-lr calculate"> | ||
| 105 | - <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG697.png':'https://qn.colorcun.com/Line2.png'}}" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 70 | + <view wx:for="{{item.norms}}" wx:key="id" wx:for-index="normsIndex" class="algorithmImg flex-lr calculate"> |
| 71 | + <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG697.png':'https://qn.colorcun.com/Line2.png'}}" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" /> | ||
| 106 | <view class="box flex-cc"> | 72 | <view class="box flex-cc"> |
| 107 | <view class="num flex-cc"> | 73 | <view class="num flex-cc"> |
| 108 | - {{item.count}}<view wx:if="{{item.name}}" style="color:rgba({{textColor}})">{{item.name}}</view> | 74 | + {{item.count}}<view wx:if="{{item.specs || item.unit}}" style="color:rgba({{textColor}})">{{item.specs?item.specs:item.unit}}</view> |
| 109 | </view> | 75 | </view> |
| 110 | - <view class="practice" wx:if="{{item.specs || item.unit}}" style="color:rgba({{textColor}})">{{item.specs?item.specs:item.unit}}</view> | 76 | + <view class="practice" wx:if="{{item.name}}" style="color:rgba({{textColor}})">{{item.name}}</view> |
| 111 | </view> | 77 | </view> |
| 112 | <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 78 | <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> |
| 113 | </view> | 79 | </view> |
| 114 | - <view wx:if="{{(item.spec.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr imgbox"> | ||
| 115 | - <image wx:if="{{item.id}}" src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" class="imgs" mode="aspectFill" bindtap="addition" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | 80 | + <view wx:if="{{(item.specArr.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr imgbox"> |
| 81 | + <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" class="imgs" mode="aspectFill" bindtap="addition" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 116 | </view> | 82 | </view> |
| 117 | </view> | 83 | </view> |
| 118 | - </view> | ||
| 119 | - </block> | ||
| 120 | - </view> | ||
| 121 | - </block> | ||
| 122 | -</scroll-view> | ||
| 123 | -<view class="fixedBox flex-lr" style="background: rgba({{themeColor}});"> | ||
| 124 | - <view class="left flex-cmc" bindtap="showClassifyModal"> | ||
| 125 | - <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG700.png':'https://qn.colorcun.com/s1.png'}}" mode="" /> | ||
| 126 | - <view class="fixedName" style="color:rgba({{textColor}})"> | ||
| 127 | - 菜品分类 | 84 | + <view wx:else class="twoBox" data-idx="{{item.image_type}}"> |
| 85 | + <view class="{{item.boderNone?'borderNone twoItem':'twoItem'}}"> | ||
| 86 | + <view class="twoTitle" style="color:rgba({{textColor}})">{{item.name}}</view> | ||
| 87 | + <view class="twoInfo dishTexts" wx:if="{{item.taste}}" style="color:rgba({{textColor}})"> | ||
| 88 | + <text wx:if="{{item.taste}}" class="texts">味型:{{item.taste}}</text> | ||
| 89 | + <text wx:if="{{item.cooks}}">烹调:{{item.cooks}}</text> | ||
| 90 | + </view> | ||
| 91 | + <view wx:if="{{item.specArr.length>0}}" class="twoInfo twoSingle" style="color:rgba({{textColor}})"> | ||
| 92 | + <view wx:for="{{item.specArr}}" wx:key="id"> | ||
| 93 | + {{item.str}} | ||
| 94 | + {{item.member_str}} | ||
| 95 | + </view> | ||
| 96 | + </view> | ||
| 97 | + <view wx:else class="twoInfo twoSingle"> | ||
| 98 | + {{item.price?'¥'+item.price+'/'+item.unit:''}} | ||
| 99 | + {{item.member_price?'会员 ¥'+item.member_price+'/'+item.unit:''}} | ||
| 100 | + </view> | ||
| 101 | + <image wx:if="{{item.image}}" catch:tap="preview" style="height: {{item.imageHeight>height2?height2+'px':item.imageHeight+'px'}};width: {{item.imageHeight>height2?height2+'px':item.imageHeight==height2?'100%':'100%'}}" mode="{{(item.imageHeight>height2 || item.imageHeight==height2)?'aspectFit':'aspectFill'}}" src="{{item.image}}" bindload="imageLoad" data-item="{{item}}" data-index="{{index}}" data-indexs="{{indexs}}" /> | ||
| 102 | + <view class="greens" wx:if="{{item.desc}}"> | ||
| 103 | + <view class="news" style="color:rgba({{textColor}})">{{item.desc}}</view> | ||
| 104 | + </view> | ||
| 105 | + <view wx:for="{{item.norms}}" wx:key="unit" wx:for-index="normsIndex" class="algorithmImg flex-lr calculate"> | ||
| 106 | + <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG697.png':'https://qn.colorcun.com/Line2.png'}}" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 107 | + <view class="box flex-cc"> | ||
| 108 | + <view class="num flex-cc"> | ||
| 109 | + {{item.count}}<view wx:if="{{item.name}}" style="color:rgba({{textColor}})">{{item.name}}</view> | ||
| 110 | + </view> | ||
| 111 | + <view class="practice" wx:if="{{item.specs || item.unit}}" style="color:rgba({{textColor}})">{{item.specs?item.specs:item.unit}}</view> | ||
| 112 | + </view> | ||
| 113 | + <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" mode="aspectFill" class="imgs" data-type="0" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 114 | + </view> | ||
| 115 | + <view wx:if="{{(item.spec.length>1 || item.practice.length>1) || item.norms.length=='0'}}" class="algorithmImg flex-rr imgbox"> | ||
| 116 | + <image wx:if="{{item.id}}" src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG696.png':'https://qn.colorcun.com/Line1.png'}}" class="imgs" mode="aspectFill" bindtap="addition" data-type="1" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" /> | ||
| 117 | + </view> | ||
| 118 | + </view> | ||
| 119 | + </view> | ||
| 120 | + </block> | ||
| 121 | + </view> | ||
| 122 | + </block> | ||
| 123 | + </scroll-view> | ||
| 124 | + <view class="fixedBox flex-lr" style="background: rgba({{themeColor}});"> | ||
| 125 | + <view class="left flex-cmc" bindtap="showClassifyModal"> | ||
| 126 | + <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG700.png':'https://qn.colorcun.com/s1.png'}}" mode="" /> | ||
| 127 | + <view class="fixedName" style="color:rgba({{textColor}})"> | ||
| 128 | + 菜品分类 | ||
| 129 | + </view> | ||
| 128 | </view> | 130 | </view> |
| 131 | + <userinfo class="right flex-cmc" style="color:rgba({{textColor}})" binduserinfo="gotoShoppingCart"> | ||
| 132 | + <view class="rightBox"> | ||
| 133 | + <image src="{{themeColor!='251,246,241,1'?'https://qn.colorcun.com/WechatIMG701.png':'https://qn.colorcun.com/s2.png'}}" mode="" /> | ||
| 134 | + <view class="num" wx:if="{{orderItemCount*1>0}}">{{orderItemCount}}</view> | ||
| 135 | + </view> | ||
| 136 | + <view class="fixedName" style="color:rgba({{textColor}})"> | ||
| 137 | + 已选菜品 | ||
| 138 | + </view> | ||
| 139 | + </userinfo> | ||
| 129 | </view> | 140 | </view> |
| 130 | - <userinfo class="right flex-cmc" style="color:rgba({{textColor}})" binduserinfo="gotoShoppingCart"> | ||
| 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="" /> | ||
| 133 | - <view class="num" wx:if="{{orderItemCount*1>0}}">{{orderItemCount}}</view> | ||
| 134 | - </view> | ||
| 135 | - <view class="fixedName" style="color:rgba({{textColor}})"> | ||
| 136 | - 已选菜品 | ||
| 137 | - </view> | ||
| 138 | - </userinfo> | ||
| 139 | </view> | 141 | </view> |
| 140 | <my-modal id="checkModal" height="410px" fadeStyle="center"> | 142 | <my-modal id="checkModal" height="410px" fadeStyle="center"> |
| 141 | <view slot="modalContent" class="normsModel"> | 143 | <view slot="modalContent" class="normsModel"> |
| @@ -23,6 +23,7 @@ Page({ | @@ -23,6 +23,7 @@ Page({ | ||
| 23 | height:wx.getSystemInfoSync().windowWidth*1, | 23 | height:wx.getSystemInfoSync().windowWidth*1, |
| 24 | is_show_price:'', | 24 | is_show_price:'', |
| 25 | }, | 25 | }, |
| 26 | + myToast :'', | ||
| 26 | imageLoad(e) { | 27 | imageLoad(e) { |
| 27 | const index = e.currentTarget.dataset['index']; | 28 | const index = e.currentTarget.dataset['index']; |
| 28 | const indexs = e.currentTarget.dataset['indexs']; | 29 | const indexs = e.currentTarget.dataset['indexs']; |
| @@ -84,6 +85,12 @@ Page({ | @@ -84,6 +85,12 @@ Page({ | ||
| 84 | this.getCheckCookList() | 85 | this.getCheckCookList() |
| 85 | } | 86 | } |
| 86 | }, | 87 | }, |
| 88 | + /** | ||
| 89 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 90 | + */ | ||
| 91 | + onReady() { | ||
| 92 | + this.myToast = this.selectComponent("#myToast") | ||
| 93 | + }, | ||
| 87 | getCookbooklist(cookbooklist){ | 94 | getCookbooklist(cookbooklist){ |
| 88 | cookbooklist.forEach(i => { | 95 | cookbooklist.forEach(i => { |
| 89 | i.cookbooklist.forEach(j => { | 96 | i.cookbooklist.forEach(j => { |
| @@ -410,11 +417,7 @@ Page({ | @@ -410,11 +417,7 @@ Page({ | ||
| 410 | }, | 417 | }, |
| 411 | // 菜品更换 | 418 | // 菜品更换 |
| 412 | continueOrdering() { | 419 | continueOrdering() { |
| 413 | - wx.showToast({ | ||
| 414 | - title: '您的订单已经下达给商家,如果需要改菜需和商家确认,以免产生误解。', | ||
| 415 | - icon: 'none', | ||
| 416 | - duration: 3000 | ||
| 417 | - }) | 420 | + this.myToast.showToast('您的订单已经下达给商家,如果需要改菜需和商家确认,以免产生误解。',3000) |
| 418 | }, | 421 | }, |
| 419 | // 点击了解更多会员优惠政策 | 422 | // 点击了解更多会员优惠政策 |
| 420 | gotoFavourableList() { | 423 | gotoFavourableList() { |
| @@ -533,12 +536,6 @@ Page({ | @@ -533,12 +536,6 @@ Page({ | ||
| 533 | imageUrl: 'http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148571.jpg', | 536 | imageUrl: 'http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148571.jpg', |
| 534 | } | 537 | } |
| 535 | }, | 538 | }, |
| 536 | - /** | ||
| 537 | - * 生命周期函数--监听页面初次渲染完成 | ||
| 538 | - */ | ||
| 539 | - onReady() { | ||
| 540 | - | ||
| 541 | - }, | ||
| 542 | 539 | ||
| 543 | /** | 540 | /** |
| 544 | * 生命周期函数--监听页面显示 | 541 | * 生命周期函数--监听页面显示 |
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | "navigationBarBackgroundColor": "#4d4e50", | 3 | "navigationBarBackgroundColor": "#4d4e50", |
| 4 | "navigationBarTextStyle": "white", | 4 | "navigationBarTextStyle": "white", |
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | - "nav": "/components/nav/nav" | 6 | + "nav": "/components/nav/nav", |
| 7 | + "toast": "/components/toast/index" | ||
| 7 | } | 8 | } |
| 8 | } | 9 | } |
| 1 | <!--pack-cookbook/pages/success_new.wxml--> | 1 | <!--pack-cookbook/pages/success_new.wxml--> |
| 2 | -<view style="background: rgba({{themeColor}});"> | 2 | +<view class="page" 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}});height: 100%;"> | 4 | + <scroll-view class="main" style="background: rgba({{themeColor}});"> |
| 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> |
| @@ -164,4 +164,5 @@ | @@ -164,4 +164,5 @@ | ||
| 164 | <button wx:if="{{options.hasSuccess==1 && options.type=='1'}}" class="font32r continue flex-cc" style="background: rgba({{themeColor}});color: rgba({{textColor}});" bindtap="continueOrdering">菜品更换</button> | 164 | <button wx:if="{{options.hasSuccess==1 && options.type=='1'}}" class="font32r continue flex-cc" style="background: rgba({{themeColor}});color: rgba({{textColor}});" bindtap="continueOrdering">菜品更换</button> |
| 165 | <button wx:if="{{options.hasSuccess==1}}" class="font32r determine flex-cc {{options.type=='2'?'onebtns':''}}" open-type="share">分享菜单</button> | 165 | <button wx:if="{{options.hasSuccess==1}}" class="font32r determine flex-cc {{options.type=='2'?'onebtns':''}}" open-type="share">分享菜单</button> |
| 166 | </view> | 166 | </view> |
| 167 | + <toast id="myToast"></toast> | ||
| 167 | </view> | 168 | </view> |
-
Please register or login to post a comment