Commit c3c8b2e8fb69e27132995443cfc0a093f8fc1b0b

Authored by wangfan
1 parent 22097221

c端预定

... ... @@ -10,6 +10,10 @@ Component({
seller:{
type:Object,
value:{},
},
hasStat:{
type:Boolean,
value:false,
}
},
... ...
{
"component": true,
"usingComponents": {
"formids":"/components/formids/formids"
"formids":"/components/formids/formids",
"stat":"/components/stat/stat"
}
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,10 @@
</view>
<view class="info flex-tb">
<view class="name Semibold">{{seller.sellername}}</view>
<view class="text">{{seller.cate[0].name?seller.cate[0].name+' |':''}}距当前位置{{seller.distance}}</view>
<view wx:if="{{hasStat}}" class="stat">
<stat stat="3.0"></stat>
</view>
<view class="text">{{seller.cate[0].name?seller.cate[0].name+' | ':''}}距当前位置{{seller.distance}}</view>
<view class="price flex-lr">
<view class="number Semibold">
<block wx:if="{{seller.average>0}}">¥{{seller.average}}元/人</block>
... ...
... ... @@ -66,4 +66,11 @@
height: 26rpx;
margin-right: 8rpx;
margin-left: 24rpx;
}
.stat{
font-size: 24rpx;
color:#999999;
height: 24rpx;
line-height: 24rpx;
}
\ No newline at end of file
... ...
... ... @@ -5,12 +5,16 @@ Component({
*/
properties: {
stat: {
type: Number,
value:4,
type: String,
value:"4.0",
},
color:{
type:String,
value:'',
},
hasShowText:{
type:Boolean,
value:true,
}
}
,
... ...
<!--components/stat/stat.wxml-->
<view class="stat">
<view class="bg" style="background-color: {{$color}};width: {{(stat/5)*100}}%"></view>
<image src="http://qn.colorcun.com/custom/lite-online/image/%E9%95%82%E7%A9%BA%E6%98%9F%E6%98%9F.png"></image>
<view class="flex-ll">
<view class="stat">
<view class="bg" style="background-color: {{$color}};width: {{(stat/5)*100}}%"></view>
<image src="http://qn.colorcun.com/custom/lite-online/image/%E9%95%82%E7%A9%BA%E6%98%9F%E6%98%9F.png"></image>
</view>
<view class="stat-text" wx:if="{{hasShowText}}">{{stat}} 分</view>
</view>
... ...
/* components/stat/stat.wxss */
@import "../../app.wxss";
.stat{
width: 168rpx;
height: 30rpx;
... ... @@ -23,3 +24,6 @@
top:0;
z-index: 2;
}
.stat-text{
margin-left: 10rpx;
}
... ...
... ... @@ -6,6 +6,6 @@
<view>您还没有收藏任何餐厅哦</view>
</view>
<view class="follow">
<sb-tr seller="{{}}"></sb-tr>
<sb-tr seller="{{}}" hasStat="{{true}}"></sb-tr>
</view>
</view>
... ...
... ... @@ -19,8 +19,7 @@
<view class="name">{{seller.seller_name}}</view>
<view class="ping flex-cc">
<view class="item flex-lr fen">
<stat stat="2"></stat>
<view class="text">4.0分</view>
<stat stat="2.0"></stat>
</view>
<view class="item">西北菜</view>
<view class="item">人均60元</view>
... ...