Showing
10 changed files
with
17 additions
and
10 deletions
| @@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
| 2 | <image src="{{item.image ? item.image : 'http://nosqn.colorcun.com/empty.jpg'}}" class="food-image bg-gray" mode="aspectFill" lazy-load></image> | 2 | <image src="{{item.image ? item.image : 'http://nosqn.colorcun.com/empty.jpg'}}" class="food-image bg-gray" mode="aspectFill" lazy-load></image> |
| 3 | <view class="food-info flex-vtb"> | 3 | <view class="food-info flex-vtb"> |
| 4 | <view class="smooth"> | 4 | <view class="smooth"> |
| 5 | - <view class="font-more font-bold font32r black-font" style="width:320rpx;margin-bottom: 6rpx;">{{item.name}}</view> | ||
| 6 | - <view class="gray-font font24r font-more-two" wx:if="{{item.desc}}" style="width:320rpx;">{{item.desc}}</view> | 5 | + <view class="font-more-two font-bold font32r black-font" style="width:320rpx;margin-bottom: 6rpx;">{{item.name}}</view> |
| 6 | + <!-- <view class="gray-font font24r font-more" wx:if="{{item.desc}}" style="width:320rpx;">{{item.desc}}</view> --> | ||
| 7 | </view> | 7 | </view> |
| 8 | - <view class="flex-lr"> | 8 | + <view class="flex-lr" style="width: 100%;"> |
| 9 | <view class="food-price flex-ll"> | 9 | <view class="food-price flex-ll"> |
| 10 | <view class="red-pink-font font24r" style="margin-right:12rpx;">¥<text class="font36r font-bold">{{item.member_price && item.member_price!=0 ? item.member_price : item.price}}</text></view> | 10 | <view class="red-pink-font font24r" style="margin-right:12rpx;">¥<text class="font36r font-bold">{{item.member_price && item.member_price!=0 ? item.member_price : item.price}}</text></view> |
| 11 | <view class="gray-light-font font20r" style="text-decoration: line-through;" wx:if="{{item.member_price && item.member_price!=0}}">¥<text class="font28r">{{item.price}}</text></view> | 11 | <view class="gray-light-font font20r" style="text-decoration: line-through;" wx:if="{{item.member_price && item.member_price!=0}}">¥<text class="font28r">{{item.price}}</text></view> |
| @@ -11,6 +11,7 @@ Component({ | @@ -11,6 +11,7 @@ Component({ | ||
| 11 | attached(){ | 11 | attached(){ |
| 12 | console.log('uuuuu',this.data.seller) | 12 | console.log('uuuuu',this.data.seller) |
| 13 | this.getsellerconfig(); | 13 | this.getsellerconfig(); |
| 14 | + this.gettotal(); | ||
| 14 | }, | 15 | }, |
| 15 | observers: { | 16 | observers: { |
| 16 | 'refresh': function(newrefresh){ | 17 | 'refresh': function(newrefresh){ |
| 1 | <view style="overflow:hidden;"> | 1 | <view style="overflow:hidden;"> |
| 2 | <nav backgroundColor="#199095" color="#ffffff">添加菜品</nav> | 2 | <nav backgroundColor="#199095" color="#ffffff">添加菜品</nav> |
| 3 | <view class="bg_white content" style="height:{{scrollHeight}}px"> | 3 | <view class="bg_white content" style="height:{{scrollHeight}}px"> |
| 4 | - <input class="content1 black-font smooth font36r" bindinput="cooknameInput" type="text" value="{{cook_name}}" placeholder="点这里,输入菜品名称" data-key="total" placeholder-style="color:#999;font-size:36rpx;font-weight:bold;" placeholder-class="smooth" maxlength="10" style="min-height:40rpx;"/> | 4 | + <input class="content1 black-font smooth font36r" bindinput="cooknameInput" type="text" value="{{cook_name}}" placeholder="点这里,输入菜品名称" data-key="total" placeholder-style="color:#999;font-size:36rpx;font-weight:bold;" placeholder-class="smooth" maxlength="20" style="min-height:40rpx;"/> |
| 5 | </view> | 5 | </view> |
| 6 | <view class="bg1"></view> | 6 | <view class="bg1"></view> |
| 7 | <block wx:if="{{reminderInfo}}"> | 7 | <block wx:if="{{reminderInfo}}"> |
| @@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
| 22 | </block> | 22 | </block> |
| 23 | <view style="width:100%;padding:0 45rpx;padding-top:75rpx;padding-bottom:20rpx;box-sizing:border-box;background:#fff;"> | 23 | <view style="width:100%;padding:0 45rpx;padding-top:75rpx;padding-bottom:20rpx;box-sizing:border-box;background:#fff;"> |
| 24 | <view class="menu-title-top flex-lr"> | 24 | <view class="menu-title-top flex-lr"> |
| 25 | - <view class="black-font font44r smooth" stylw="width:80%;"><input type="text" value="{{name}}" placeholder="请输入菜品名" placeholder-style="color:#999;" placeholder-class="smooth font34r" style="width:100%;font-weight:bold;height:64rpx;line-height:64rpx;" name="name" bindinput="changeName" maxlength="10" bindblur="getinfo"/></view> | 25 | + <view class="black-font font44r smooth" stylw="width:80%;"><input type="text" value="{{name}}" placeholder="请输入菜品名" placeholder-style="color:#999;" placeholder-class="smooth font34r" style="width:100%;font-weight:bold;height:64rpx;line-height:64rpx;" name="name" bindinput="changeName" maxlength="20" bindblur="getinfo"/></view> |
| 26 | <switchLiu definecheked="{{status}}" id="switch" bind:changecookstatus="cookswitch"></switchLiu> | 26 | <switchLiu definecheked="{{status}}" id="switch" bind:changecookstatus="cookswitch"></switchLiu> |
| 27 | </view> | 27 | </view> |
| 28 | <view class="flex-vr" style="margin-top:10rpx;align-items:flex-end;"> | 28 | <view class="flex-vr" style="margin-top:10rpx;align-items:flex-end;"> |
| @@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
| 84 | <view class="order-food-single flex-lr smooth" style="align-items: flex-start;" wx:if="{{hasmore ? index<3 : index<cartlist.length}}"> | 84 | <view class="order-food-single flex-lr smooth" style="align-items: flex-start;" wx:if="{{hasmore ? index<3 : index<cartlist.length}}"> |
| 85 | <view class="flex-ll"> | 85 | <view class="flex-ll"> |
| 86 | <image class="food-image bg-gray" src="{{item.cookimage ? item.cookimage : 'http://nosqn.colorcun.com/empty.jpg'}}" mode="aspectFill"></image> | 86 | <image class="food-image bg-gray" src="{{item.cookimage ? item.cookimage : 'http://nosqn.colorcun.com/empty.jpg'}}" mode="aspectFill"></image> |
| 87 | - <view class=""> | 87 | + <view class="" style="width:360rpx;"> |
| 88 | <view class="black-font font32r font-bold">{{item.cookname}}</view> | 88 | <view class="black-font font32r font-bold">{{item.cookname}}</view> |
| 89 | <view class="gray-font font28r" wx:if="{{item.spec_name || item.practice_name}}">{{item.spec_name ? item.spec_name : ''}}{{item.practice_name && item.spec_name ? ',' : ''}}{{item.practice_name ? item.practice_name : ''}}</view> | 89 | <view class="gray-font font28r" wx:if="{{item.spec_name || item.practice_name}}">{{item.spec_name ? item.spec_name : ''}}{{item.practice_name && item.spec_name ? ',' : ''}}{{item.practice_name ? item.practice_name : ''}}</view> |
| 90 | <view class="gray-font font28r">x {{item.count}}</view> | 90 | <view class="gray-font font28r">x {{item.count}}</view> |
| @@ -170,6 +170,7 @@ Page({ | @@ -170,6 +170,7 @@ Page({ | ||
| 170 | }) | 170 | }) |
| 171 | }, | 171 | }, |
| 172 | refreshprice(){ | 172 | refreshprice(){ |
| 173 | + console.log('rrrr') | ||
| 173 | this.setData({ | 174 | this.setData({ |
| 174 | refresh:true | 175 | refresh:true |
| 175 | }) | 176 | }) |
| @@ -180,6 +181,7 @@ Page({ | @@ -180,6 +181,7 @@ Page({ | ||
| 180 | reduceitem:this.data.cooklist[e.detail.classidx].cookbookList[0][e.detail.cookidx] | 181 | reduceitem:this.data.cooklist[e.detail.classidx].cookbookList[0][e.detail.cookidx] |
| 181 | }) | 182 | }) |
| 182 | this.selectComponent('#rmodal').showrmodal(); | 183 | this.selectComponent('#rmodal').showrmodal(); |
| 184 | + // this.refreshprice(); | ||
| 183 | }, | 185 | }, |
| 184 | showspec(e){ | 186 | showspec(e){ |
| 185 | console.log(e,'showspec',this.selectComponent('#spec')); | 187 | console.log(e,'showspec',this.selectComponent('#spec')); |
| @@ -187,6 +189,7 @@ Page({ | @@ -187,6 +189,7 @@ Page({ | ||
| 187 | additem:this.data.cooklist[e.detail.classidx].cookbookList[0][e.detail.cookidx] | 189 | additem:this.data.cooklist[e.detail.classidx].cookbookList[0][e.detail.cookidx] |
| 188 | }) | 190 | }) |
| 189 | this.selectComponent('#spec').show(); | 191 | this.selectComponent('#spec').show(); |
| 192 | + // this.refreshprice(); | ||
| 190 | }, | 193 | }, |
| 191 | tellfood(e){ | 194 | tellfood(e){ |
| 192 | console.log(e,'actfood') | 195 | console.log(e,'actfood') |
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | <view class="order-food-single flex-lr smooth" style="align-items: flex-start;" wx:if="{{hasmore ? index<3 : index<cartlist.length}}"> | 38 | <view class="order-food-single flex-lr smooth" style="align-items: flex-start;" wx:if="{{hasmore ? index<3 : index<cartlist.length}}"> |
| 39 | <view class="flex-ll"> | 39 | <view class="flex-ll"> |
| 40 | <image class="food-image bg-gray" src="{{item.cookimage ? item.cookimage : 'http://nosqn.colorcun.com/empty.jpg'}}" mode="aspectFill"></image> | 40 | <image class="food-image bg-gray" src="{{item.cookimage ? item.cookimage : 'http://nosqn.colorcun.com/empty.jpg'}}" mode="aspectFill"></image> |
| 41 | - <view class=""> | 41 | + <view class="" style="width:360rpx;"> |
| 42 | <view class="black-font font32r font-bold">{{item.cookname}}</view> | 42 | <view class="black-font font32r font-bold">{{item.cookname}}</view> |
| 43 | <view class="gray-font font28r" wx:if="{{item.spec_name || item.practice_name}}">{{item.spec_name ? item.spec_name : ''}}{{item.practice_name && item.spec_name ? ',' : ''}}{{item.practice_name ? item.practice_name : ''}}</view> | 43 | <view class="gray-font font28r" wx:if="{{item.spec_name || item.practice_name}}">{{item.spec_name ? item.spec_name : ''}}{{item.practice_name && item.spec_name ? ',' : ''}}{{item.practice_name ? item.practice_name : ''}}</view> |
| 44 | <view class="gray-font font28r">x {{item.count}}</view> | 44 | <view class="gray-font font28r">x {{item.count}}</view> |
| @@ -187,9 +187,9 @@ Page({ | @@ -187,9 +187,9 @@ Page({ | ||
| 187 | this.onShow(); | 187 | this.onShow(); |
| 188 | }, | 188 | }, |
| 189 | getlist(page){ | 189 | getlist(page){ |
| 190 | - App.Orders.GetOrderListByOpenid({openid:util.cache('openid'),page:page,size:10,sellerid:util.cache('sellerid'),status:this.data.statusidx+1}).then((json)=>{ | 190 | + App.Orders.GetOrderBySellerid({openid:util.cache('openid'),page:page,size:10,sellerid:util.cache('sellerid'),status:this.data.statusidx+1}).then((json)=>{ |
| 191 | console.log(json) | 191 | console.log(json) |
| 192 | - if(json.ret==200){ | 192 | + if(json.ret==200 && json.data){ |
| 193 | json.data.forEach((v,i)=>{ | 193 | json.data.forEach((v,i)=>{ |
| 194 | v.showdate=util.unixtoTime(v.cdate,'YYYY/MM/DD HH:II'); | 194 | v.showdate=util.unixtoTime(v.cdate,'YYYY/MM/DD HH:II'); |
| 195 | v.sdate=util.unixtoTime(v.sd_time.split('-')[0],'YYYY/MM/DD HH:II') | 195 | v.sdate=util.unixtoTime(v.sd_time.split('-')[0],'YYYY/MM/DD HH:II') |
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | "minifyWXSS": true | 37 | "minifyWXSS": true |
| 38 | }, | 38 | }, |
| 39 | "compileType": "miniprogram", | 39 | "compileType": "miniprogram", |
| 40 | - "libVersion": "2.14.4", | 40 | + "libVersion": "2.0.9", |
| 41 | "appid": "wx418f1d7cdeda26c1", | 41 | "appid": "wx418f1d7cdeda26c1", |
| 42 | "projectname": "%E8%87%AA%E8%90%A5%E5%A4%96%E5%8D%96", | 42 | "projectname": "%E8%87%AA%E8%90%A5%E5%A4%96%E5%8D%96", |
| 43 | "simulatorType": "wechat", | 43 | "simulatorType": "wechat", |
| @@ -121,6 +121,9 @@ export default { | @@ -121,6 +121,9 @@ export default { | ||
| 121 | 'App.Orders.SetOrderById':null, | 121 | 'App.Orders.SetOrderById':null, |
| 122 | 122 | ||
| 123 | 123 | ||
| 124 | + 'App.Orders.GetOrderBySellerid':null, | ||
| 125 | + | ||
| 126 | + | ||
| 124 | //清空购物车 | 127 | //清空购物车 |
| 125 | 'App.Orders.ClearCar':null, | 128 | 'App.Orders.ClearCar':null, |
| 126 | 129 |
-
Please register or login to post a comment