Commit 6bd67311e2ac1334d485585f84ad42a68d8b1b01

Authored by vking
1 parent 4cc53365

taocan

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