|
|
|
|
@ -39,7 +39,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="shops">
|
|
|
|
|
<!-- <view class="shops">
|
|
|
|
|
<view class="shop">
|
|
|
|
|
<image class="pic" src="../../static/shop-logo.png"></image>
|
|
|
|
|
<view class="infos">
|
|
|
|
|
@ -48,10 +48,34 @@
|
|
|
|
|
<view class="txt" v-if="true">{{info.shop.address}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
<view class="activeinfo">
|
|
|
|
|
<view class="active">
|
|
|
|
|
<u-row gutter="16" class="infos">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
活动关联方:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<view v-for="company in info.companyList">
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
{{company.type_name}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8">
|
|
|
|
|
{{company.name}}
|
|
|
|
|
</u-col>
|
|
|
|
|
</view>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="activeinfo">
|
|
|
|
|
<view class="active">
|
|
|
|
|
<u-row gutter="16">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
活动信息:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
@ -88,6 +112,29 @@
|
|
|
|
|
<u-col span="8" v-if="info.member_sum">
|
|
|
|
|
{{info.member_sum}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
报名信息:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
开始时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.apply_start">
|
|
|
|
|
<view>{{info.apply_start}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
截止时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.apply_end">
|
|
|
|
|
<view>{{info.apply_end}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -151,7 +198,7 @@
|
|
|
|
|
<text>客服</text>
|
|
|
|
|
</button>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="buyBtn" @click="toBuy">立即参加</view>
|
|
|
|
|
<view :class="isOrder?'buyBtn':'noBtn buyBtn'" @click="toBuy">{{isOrderText}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-popup v-model="showPop" mode="bottom" closeable="true">
|
|
|
|
|
|
|
|
|
|
@ -279,6 +326,8 @@
|
|
|
|
|
budget_date: '',
|
|
|
|
|
address: ''
|
|
|
|
|
},
|
|
|
|
|
isOrder:false,
|
|
|
|
|
isOrderText:"",
|
|
|
|
|
rindex: 0,
|
|
|
|
|
hindex: 0,
|
|
|
|
|
openid: "",
|
|
|
|
|
@ -674,12 +723,31 @@
|
|
|
|
|
day = day > 9 ? day : '0' + day;
|
|
|
|
|
return `${year}-${month}-${day}`;
|
|
|
|
|
},
|
|
|
|
|
getNowTime(){
|
|
|
|
|
const date = new Date();
|
|
|
|
|
let year = date.getFullYear();
|
|
|
|
|
let month = date.getMonth() + 1;
|
|
|
|
|
let day = date.getDate();
|
|
|
|
|
let hours = date.getHours()
|
|
|
|
|
let minutes = date.getMinutes()
|
|
|
|
|
let seconds =date.getSeconds()
|
|
|
|
|
month = month > 9 ? month : '0' + month;
|
|
|
|
|
day = day > 9 ? day : '0' + day;
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
|
|
},
|
|
|
|
|
bindDateChange: function(e) {
|
|
|
|
|
this.form.budget_date = e.target.value
|
|
|
|
|
},
|
|
|
|
|
compareDate(d1, d2) {
|
|
|
|
|
let reg = new RegExp('-', 'g')
|
|
|
|
|
return ((new Date(d1.replace(reg, '/'))) > (new Date(d2.replace(reg, '/'))))
|
|
|
|
|
},
|
|
|
|
|
toBuy() {
|
|
|
|
|
if(!this.isOrder){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let user_info = weixin.getUserInfoCache();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (weixin.isNull(user_info.user_info.phone)) {
|
|
|
|
|
this.showPhone = true;
|
|
|
|
|
return false;
|
|
|
|
|
@ -749,6 +817,7 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
loadInfo: function() {
|
|
|
|
|
let that = this
|
|
|
|
|
weixin.request({
|
|
|
|
|
api: '/api/member/active-show/',
|
|
|
|
|
method: 'GET',
|
|
|
|
|
@ -757,7 +826,24 @@
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: r => {
|
|
|
|
|
//r.data.poster = this.baseUrl + r.data.poster;
|
|
|
|
|
if(r.company_ids){
|
|
|
|
|
r.companyList = JSON.parse(r.company_ids)
|
|
|
|
|
}
|
|
|
|
|
this.info = r;
|
|
|
|
|
let apply_end = r.apply_end
|
|
|
|
|
let apply_start = r.apply_start
|
|
|
|
|
let startdate = r.start_date+" "+r.start_time
|
|
|
|
|
let nowtime = that.getNowTime()
|
|
|
|
|
if(that.compareDate(apply_start,nowtime)){
|
|
|
|
|
that.isOrder = false
|
|
|
|
|
that.isOrderText = "报名未开始"
|
|
|
|
|
}else if(that.compareDate(nowtime,apply_end)||that.compareDate(nowtime,startdate)){
|
|
|
|
|
that.isOrder = false
|
|
|
|
|
that.isOrderText = "报名截止"
|
|
|
|
|
}else{
|
|
|
|
|
that.isOrder = true
|
|
|
|
|
that.isOrderText = "立即参加"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: r => {
|
|
|
|
|
console.log(r);
|
|
|
|
|
@ -905,7 +991,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.buyBtn {
|
|
|
|
|
.buyBtn{
|
|
|
|
|
width: 220rpx;
|
|
|
|
|
height: 72rpx;
|
|
|
|
|
background: linear-gradient(90deg, #FF7E95 0%, #FF447B 100%);
|
|
|
|
|
@ -916,6 +1002,9 @@
|
|
|
|
|
line-height: 72rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.noBtn{
|
|
|
|
|
background: linear-gradient(90deg, #ddd 0%, #ddd 100%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|