Commit 6bd67311e2ac1334d485585f84ad42a68d8b1b01

Authored by vking
1 parent 4cc53365

taocan

1 <!--components/2.0/taocan/card.wxml--> 1 <!--components/2.0/taocan/card.wxml-->
2 <view class="view flex margin-bottom-lg card"> 2 <view class="view flex margin-bottom-lg card">
3 - <view class="view thumb"></view> 3 + <view class="view thumb" style="background-image: url('{{detail.main_url}}?imageView2/2/w/320')"></view>
4 <view class="view margin-left"> 4 <view class="view margin-left">
5 - <view class="view text-bold txt-36-h">111</view> 5 + <view class="view text-bold txt-36-h">{{detail.name}}</view>
6 <view class="view bg-white flex text-gray txt-28-h" style="margin-bottom:6rpx;margin-top: 6rpx;"> 6 <view class="view bg-white flex text-gray txt-28-h" style="margin-bottom:6rpx;margin-top: 6rpx;">
7 - <view class="view margin-right">123</view>  
8 - <view class="view margin-right">123</view>  
9 - <view class="view margin-right">123</view> 7 + <view class="view margin-right" wx:for="{{detail.services}}" wx:key="*this">
  8 + {{item}}
  9 + </view>
10 </view> 10 </view>
11 <view class="view flex align-end text-gray"> 11 <view class="view flex align-end text-gray">
12 <view class="text-orange txt-28-h" style="margin-bottom: 4rpx;">¥</view> 12 <view class="text-orange txt-28-h" style="margin-bottom: 4rpx;">¥</view>
13 - <view class="text-orange txt-40-h margin-right-sm text-bold">123</view> 13 + <view class="text-orange txt-40-h margin-right-sm text-bold">{{detail.sale_price}}</view>
14 <view class="huaxian flex align-end"> 14 <view class="huaxian flex align-end">
15 <view class="txt-20-h" style="margin-bottom: 8rpx;">¥</view> 15 <view class="txt-20-h" style="margin-bottom: 8rpx;">¥</view>
16 - <view class="txt-28-h" style="margin-bottom: 4rpx;">123</view> 16 + <view class="txt-28-h" style="margin-bottom: 4rpx;">{{detail.market_price}}</view>
17 </view> 17 </view>
18 </view> 18 </view>
19 <view class="view flex text-orange align-end" style="margin-top: 2rpx;"> 19 <view class="view flex text-orange align-end" style="margin-top: 2rpx;">
20 <view class="view tag" style="margin-bottom: 6rpx;"></view> 20 <view class="view tag" style="margin-bottom: 6rpx;"></view>
21 - <view class="view margin-left-xs txt-24-h">8折</view> 21 + <view class="view margin-left-xs txt-24-h">{{(detail.discount*10)}}折</view>
22 </view> 22 </view>
23 </view> 23 </view>
24 <navigator url="/pages/taocan/index?sid={{detail.sid}}&pid={{detail.id}}" hover-class="navigator-hover"> 24 <navigator url="/pages/taocan/index?sid={{detail.sid}}&pid={{detail.id}}" hover-class="navigator-hover">
@@ -3,13 +3,14 @@ @@ -3,13 +3,14 @@
3 .thumb{ 3 .thumb{
4 width: 200rpx; 4 width: 200rpx;
5 height: 200rpx; 5 height: 200rpx;
6 - background: #F6B3B3;  
7 border-radius: 10rpx; 6 border-radius: 10rpx;
  7 + background-position: center center;
  8 + background-size: cover;
8 } 9 }
9 .tag{ 10 .tag{
10 width: 22rpx; 11 width: 22rpx;
11 height: 22rpx; 12 height: 22rpx;
12 - background: #FF7A00; 13 + background-image: url("http://nosqn.colorcun.com/taocan/1%20%281%29.png");
13 } 14 }
14 .huaxian{ 15 .huaxian{
15 position: relative; 16 position: relative;
1 // components/2.0/taocan/lists.js 1 // components/2.0/taocan/lists.js
  2 +import App from '../../../utils/api'
2 Component({ 3 Component({
3 /** 4 /**
4 * 组件的属性列表 5 * 组件的属性列表
5 */ 6 */
6 properties: { 7 properties: {
7 - 8 + sid:String,
8 }, 9 },
9 10
10 /** 11 /**
@@ -12,8 +13,11 @@ Component({ @@ -12,8 +13,11 @@ Component({
12 */ 13 */
13 data: { 14 data: {
14 rowLimit:3, 15 rowLimit:3,
  16 + list:[],
  17 + },
  18 + attached(){
  19 + this.getList()
15 }, 20 },
16 -  
17 /** 21 /**
18 * 组件的方法列表 22 * 组件的方法列表
19 */ 23 */
@@ -23,5 +27,17 @@ Component({ @@ -23,5 +27,17 @@ Component({
23 rowLimit:this.data.rowLimit==3?9999:3, 27 rowLimit:this.data.rowLimit==3?9999:3,
24 }) 28 })
25 }, 29 },
  30 + getList(){
  31 + App.Foodset.GetFoodsetList({sid:this.data.sid}).then(res=>{
  32 + let lists=res.data
  33 + lists.forEach(r=>{
  34 + r.services=r.service.split(',')
  35 + r.sid=this.data.sid
  36 + })
  37 + this.setData({
  38 + lists:lists,
  39 + })
  40 + })
  41 + },
26 } 42 }
27 }) 43 })
1 <!--components/2.0/taocan/lists.wxml--> 1 <!--components/2.0/taocan/lists.wxml-->
2 <view class="view padding-lg bg-white padding-bottom-sm"> 2 <view class="view padding-lg bg-white padding-bottom-sm">
3 <view class="view text-bold text-xxl margin-bottom">超值套餐</view> 3 <view class="view text-bold text-xxl margin-bottom">超值套餐</view>
4 - <block wx:for="{{5}}" wx:key="lists"> 4 + <block wx:for="{{lists}}" wx:key="lists">
5 <card detail="{{item}}" wx:if="{{index<rowLimit}}"></card> 5 <card detail="{{item}}" wx:if="{{index<rowLimit}}"></card>
6 </block> 6 </block>
7 </view> 7 </view>
@@ -7,9 +7,9 @@ @@ -7,9 +7,9 @@
7 .taocan-more .icon{ 7 .taocan-more .icon{
8 width: 22rpx; 8 width: 22rpx;
9 height: 12rpx; 9 height: 12rpx;
10 - background-color: #8dc63f; 10 + background-image: url("http://nosqn.colorcun.com/taocan/1%20%285%29.png");
11 11
12 } 12 }
13 .taocan-more.opened .icon{ 13 .taocan-more.opened .icon{
14 - background-color: #3f8dc6; 14 + background-image: url("http://nosqn.colorcun.com/taocan/1%20%286%29.png");
15 } 15 }
@@ -21,6 +21,8 @@ @@ -21,6 +21,8 @@
21 height: 200rpx; 21 height: 200rpx;
22 background: #D8D8D8; 22 background: #D8D8D8;
23 border-radius: 10rpx; 23 border-radius: 10rpx;
  24 + background-position: center center;
  25 + background-size: cover;
24 } 26 }
25 .label{ 27 .label{
26 width: 100rpx; 28 width: 100rpx;
@@ -606,7 +606,7 @@ @@ -606,7 +606,7 @@
606 { 606 {
607 "name": "pages/reserve/detail", 607 "name": "pages/reserve/detail",
608 "pathName": "pages/reserve/detail", 608 "pathName": "pages/reserve/detail",
609 - "query": "id=1&_activeTab=reserve&_date=2020-02-16&_pnum=6", 609 + "query": "id=1001&_activeTab=reserve&_date=2020-02-16&_pnum=6",
610 "scene": null 610 "scene": null
611 }, 611 },
612 { 612 {
@@ -724,7 +724,7 @@ @@ -724,7 +724,7 @@
724 { 724 {
725 "name": "pages/taocan/index", 725 "name": "pages/taocan/index",
726 "pathName": "pages/taocan/index", 726 "pathName": "pages/taocan/index",
727 - "query": "sid=1&pid=1", 727 + "query": "sid=1001&pid=3",
728 "scene": null 728 "scene": null
729 }, 729 },
730 { 730 {
@@ -496,6 +496,9 @@ export default { @@ -496,6 +496,9 @@ export default {
496 openid:'openid', 496 openid:'openid',
497 silence: false, 497 silence: false,
498 }, 498 },
  499 + //获取商家菜品套餐列列表
  500 + 'App.Foodset.GetFoodsetList':null,
  501 +
499 //获取商家优惠对接人信息 502 //获取商家优惠对接人信息
500 'App.Customer.GetSellerPreferentialDocking':null, 503 'App.Customer.GetSellerPreferentialDocking':null,
501 //接单人,获得商家设置的接单人列表 504 //接单人,获得商家设置的接单人列表