Commit cb4ce841853c8e89914e3e2e48ab579c0c28b6f1

Authored by vking
1 parent fb9717f8

活动入口调整

... ... @@ -56,6 +56,7 @@ Component({
type: Boolean,
value: false,
},
hasNewActivityList:Boolean,//新的活动商家列表
},
/**
... ...
... ... @@ -15,15 +15,30 @@
<view class="isopen_md flex-vc" wx:if="{{hasActivityShort && seller.isopen_md==1}}">在线买单</view>
</view>
<view wx:if="{{hasSlogan && seller.slogan}}" class="slogan">“{{seller.slogan}}”</view>
<view class="text flex-ll" wx:if="{{seller.cate.length>0}}">
<view class="text-item" wx:for="{{seller.cate}}" wx:key="sellercatekey" wx:if="{{index<3}}">{{item.name}}</view>
</view>
<view class="text flex-ll">
<view class="text-item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
<block wx:if="{{hasSuggestion || location.latitude}}">
<view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{hasSuggestion?'距搜索地':'距您'}}{{util.distance(seller.distance_centre||seller.distance)}}</view>
</block>
</view>
<block wx:if="{{hasNewActivityList}}">
<view class="flex-lr hasNewActivityList">
<view class="flex-ll">
<view class="text-item" wx:if="{{seller.cate.length>0}}">{{seller.cate[0].name}}</view>
<block wx:if="{{hasSuggestion || location.latitude}}">
<view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{hasSuggestion?'距搜索地':'距您'}}{{util.distance(seller.distance_centre||seller.distance)}}</view>
</block>
</view>
<view class="number Semibold average">
<block wx:if="{{seller.average>0 && hasAverage}}">¥{{seller.average}}元/人</block>
</view>
</view>
</block>
<block wx:else="">
<view class="text flex-ll" wx:if="{{seller.cate.length>0}}">
<view class="text-item" wx:for="{{seller.cate}}" wx:key="sellercatekey" wx:if="{{index<3}}">{{item.name}}</view>
</view>
<view class="text flex-ll">
<view class="text-item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
<block wx:if="{{hasSuggestion || location.latitude}}">
<view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{hasSuggestion?'距搜索地':'距您'}}{{util.distance(seller.distance_centre||seller.distance)}}</view>
</block>
</view>
</block>
<view wx:if="{{hasStat}}" class="stat">
<stat stat="{{seller.score}}"></stat>
</view>
... ... @@ -57,10 +72,12 @@
</view>
<view wx:if="{{hasActivityRed && se.label_carr.length>0}}" class="activity flex-ll">
<view wx:for="{{se.label_carr}}" class="activity-item flex-vc activity-item-{{item.type}}" wx:key="selleractivitykey">{{item.name}}</view>
<view class="activity-item flex-vc activity-item-0" wx:if="{{hasNewActivityList}}">商家补贴</view>
</view>
</view>
<view class="price flex-lr">
<view class="number Semibold">
<view class="hasNewActivityList-txt" wx:if="{{hasNewActivityList}}">“预订买单最高立减{{seller.optimal_price}}”</view>
<view class="number Semibold" wx:else="">
<block wx:if="{{seller.average>0 && hasAverage}}">¥{{seller.average}}元/人</block>
</view>
<!--
... ...
... ... @@ -269,4 +269,68 @@
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
color:rgba(255,255,255,1);
}
.activity-list{
box-sizing: border-box;
padding: 30rpx;
height: 280rpx;
position: relative;
}
.activity-list .image{
width:190rpx;
height:220rpx;
background:rgba(216,216,216,1);
border-radius:10rpx;
overflow: hidden;
min-width: 190rpx;
}
.activity-list .info{
height:220rpx;
margin-left: 20rpx;
padding: 0;
width: 100%;
overflow: hidden;
}
.activity-list .price{
height: 62rpx;
line-height: 62rpx;
}
.hasNewActivityList{
height:40rpx;
line-height:40rpx;
margin-top: 10rpx;
margin-bottom: 14rpx;
font-size:28rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
}
.hasNewActivityList .text-item{
height:40rpx;
line-height:40rpx;
border-right: 2rpx solid #999999;
height: 24rpx;
line-height: 24rpx;
padding-right: 10rpx;
}
.hasNewActivityList .text-item:last-child{
border-width: 0;
padding-left: 10rpx;
}
.activity-list .average{
height:40rpx;
font-size:28rpx;
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
color:rgba(240,85,34,1);
line-height:40rpx;
}
.hasNewActivityList-txt{
height:34rpx;
font-size:24rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(231,42,38,1);
line-height:34rpx;
}
\ No newline at end of file
... ...
... ... @@ -2,7 +2,8 @@
<view class="discount" style="top:{{statusBarHeightFull+a2lHeight}}px;width:{{hidden?'100rpx':'720rpx'}};" bindtap="gotoDiscount">
<view style="position: relative;height: 100%;">
<image class="discount-img" src="http://nosqn.colorcun.com/reserve/images/%E6%83%A03.png"></image>
<view style="position: relative;" wx:if="{{!hidden}}">
<!--
<view style="position: relative;" wx:if="{{false}}">
<image class="discount-imgmax"
src="http://nosqn.colorcun.com/reserve/images/%E4%BC%98%E6%83%A0%E6%B4%BB%E5%8A%A83.png"></image>
<view class="discount-view">
... ... @@ -10,5 +11,6 @@
<view class="close" catchtap="hide"></view>
</view>
</view>
-->
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -36,8 +36,12 @@
</view>
</view>
</view>
<view class="share-but">
<button class="button-none" open-type="share">分享活动</button>
</view>
<navigator url="/pages/reserve/discount?latitude=39.684670&longitude=118.176300"
wx:if="{{activity}}"
open-type="redirect" hover-class="other-navigator-hover">
<view class="share-but">
查看活动商家
</view>
</navigator>
</view>
</view>
... ...
... ... @@ -10,6 +10,7 @@ Page({
data: {
sellers:[],
hasMore:true,
activity:null,
},
sellers:[],
/**
... ... @@ -142,4 +143,16 @@ Page({
this.location=e.detail
this.GetCollectionSellerList();
},
hasActivityEvent(e){
console.log('hasActivityEvent',e);
App.Task.GetTaskInfo({pos:'home'}).then(res=>{
let activity=res.data.activity
let time=new Date()/1000
if(activity.status==1 && activity.starttime<time && time<activity.endtime){
this.setData({
activity:activity,
})
}
})
}
})
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@
"formids":"/components/formids/formids",
"nav":"/components/nav/nav",
"getpos":"/components/userinfo/getpos",
"sb-tr":"/components/reserve/seller-box-transverse/seller-box"
"sb-tr":"/components/reserve/seller-box-transverse/seller-box",
"hasActivity":"/components/activity/hasActivity"
}
}
\ No newline at end of file
... ...
... ... @@ -2,16 +2,26 @@
<nav>特惠榜</nav>
<view class="pages">
<image class="banner"
src="http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20191120112403.png"></image>
<view class="follow">
<view class="banner">
<image class="banner-image" mode="widthFix"
src="http://nosqn.colorcun.com/activity/a1.png"></image>
<navigator url="/pack-activity/pages/index?id={{activity.id}}"
wx:if="{{activity}}"
open-type="redirect" hover-class="other-navigator-hover">
<view class="banner-image-bottom"></view>
</navigator>
</view>
<view class="follow" style="margin-top: {{activity?96:32}}rpx;">
<view class="biaoyu">先预订再就餐 优惠又安心</view>
<view class="seller" wx:for="{{sellers}}" wx:key="sellers.key"
bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.hasFollow}}">
<sb-tr seller="{{item}}"
hasActivity="{{true}}" hasAverage="{{false}}"
hasSlogan="{{true}}" sellerStyle="noborder noshadow"></sb-tr>
hasActivity="{{false}}" hasAverage="{{true}}"
hasBrand hasActivityRed hasActivityShort hasNewActivityList
hasSlogan="{{false}}" sellerStyle="noborder noshadow activity-list"></sb-tr>
</view>
<view class="flex-vc" wx:if="{{!hasMore}}">没有更多了</view>
</view>
</view>
<getpos bindpos="onpos" id="getpos" hasAllowFail></getpos>
\ No newline at end of file
<getpos bindpos="onpos" id="getpos" hasAllowFail></getpos>
<hasActivity bindevent="hasActivityEvent"></hasActivity>
\ No newline at end of file
... ...
/* pages/reserve/discount.wxss */
page{
background-color: #F5F5F5;
}
.banner{
width: 750rpx;
height: 360rpx;
margin: 0 auto;
position: relative;
}
.banner-image{
width: 100%;
}
.banner-image-bottom{
position: absolute;
bottom: -64rpx;
left:calc(50% - 243rpx);
width:486rpx;
height: 104rpx;
background-image: url("http://nosqn.colorcun.com/activity/a2.png");
background-size: 100% 100%;
}
.pages{
width: 100%;
margin: 0 auto;
color:#fff;
color:#ccc;
font-size: 28rpx;
background:linear-gradient(1deg,rgba(249,142,71,1) 0%,rgba(183,22,26,1) 100%);
box-sizing: border-box;
}
.follow {
padding-bottom: 50rpx;
width: calc(100% - 40rpx);
margin: 0 auto;
margin: 104rpx auto;
}
.follow .seller{
margin-bottom:20rpx;
background-color: #ffffff;
border-radius: 6rpx;
overflow: hidden;
}
.biaoyu{
height:44rpx;
font-size:32rpx;
font-family:PingFangSC-Semibold,PingFang SC;
font-weight:600;
color:rgba(53,53,53,1);
line-height:44rpx;
width: 528rpx;
text-align: center;
margin-left: calc(50% - 264rpx);
position: relative;
margin-bottom: 30rpx;
}
.biaoyu:after,.biaoyu:before{
content:"";
display: block;
position: absolute;
width:52rpx;
height: 20rpx;
left:0;
top:12rpx;
background-image: url("http://nosqn.colorcun.com/activity/al.png");
background-size: 100% 100%;
}
.biaoyu:before{
background-image: url("http://nosqn.colorcun.com/activity/ar.png");
right:0;
left: auto;
}
\ No newline at end of file
... ...
... ... @@ -606,7 +606,7 @@ Page({
}, true)
}, 100)
}
//this.IsSetActivity();
this.IsSetActivity();
})
},
... ...
... ... @@ -11,6 +11,7 @@
"boost":"/components/tips/boost",
"caixi":"/components/reserve/caixi",
"list":"/components/reserve/seller-box-transverse-cview/list",
"activity-enter":"/components/activity/enter"
"activity-enter":"/components/activity/enter",
"activity-tips":"/components/tips/discount"
}
}
\ No newline at end of file
... ...
... ... @@ -143,4 +143,5 @@
bindactive="caixiActive" id="caixi"
></caixi>
<activity-enter hasInHome wx:if="{{hasGetPos}}"></activity-enter>
<boost bindevent="boostEvent" wx:if="{{hasBoost}}"></boost>
\ No newline at end of file
<boost bindevent="boostEvent" wx:if="{{hasBoost}}"></boost>
<activity-tips wx:if="{{hasSetActivity}}" map="{{map}}"></activity-tips>
\ No newline at end of file
... ...