|
|
|
|
@ -4,13 +4,14 @@
|
|
|
|
|
<view class="activityBox">
|
|
|
|
|
<view class="activityBox-top">
|
|
|
|
|
<!-- <image src="../../static/img/img_activity.jpg" style="width: 100%;height: 333rpx;"></image> -->
|
|
|
|
|
<swiper autoplay="true" :interval="4000" :duration="1000" :indicator-dots="true"
|
|
|
|
|
indicator-active-color="rgba(255, 255, 255, 0.7)" indicator-color="rgba(239, 149, 37, 1)" :current="topSwiperIndex" @change="topSwiperTab">
|
|
|
|
|
<swiper-item v-for="(item,index) in list.banners" :key="index">
|
|
|
|
|
<view class="swiper-item">
|
|
|
|
|
<image :src="item.upload.url" mode="aspectFill"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</swiper-item>
|
|
|
|
|
<swiper autoplay="true" :interval="4000" :duration="1000" :indicator-dots="true"
|
|
|
|
|
indicator-active-color="rgba(255, 255, 255, 0.7)" indicator-color="rgba(239, 149, 37, 1)"
|
|
|
|
|
:current="topSwiperIndex" @change="topSwiperTab">
|
|
|
|
|
<swiper-item v-for="(item,index) in list.banners" :key="index">
|
|
|
|
|
<view class="swiper-item">
|
|
|
|
|
<image :src="item.upload.url" mode="aspectFill"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</swiper-item>
|
|
|
|
|
</swiper>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="activityBox-content flex-col">
|
|
|
|
|
@ -23,7 +24,7 @@
|
|
|
|
|
|
|
|
|
|
<view class="activityBox-row">
|
|
|
|
|
<text class="icon-shijian iconfont"></text>
|
|
|
|
|
<text>活动时间:{{list.start_time}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
|
|
|
|
|
<text>活动时间:{{list.start_time||""}}-{{list.end_time.substring(11,list.end_time.length)}}</text>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="activityBox-row">
|
|
|
|
|
@ -46,12 +47,12 @@
|
|
|
|
|
<view class="tomap">
|
|
|
|
|
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
|
|
|
|
|
<text v-if="list.status==0">活动已结束</text>
|
|
|
|
|
<text v-if="list.status==1">活动进行中(已报名{{list.orders_count}}人)</text>
|
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
|
|
|
|
|
<text v-if="list.status==0">活动已结束</text>
|
|
|
|
|
<text v-if="list.status==1">活动进行中(已报名{{list.orders_count}}人)</text>
|
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -79,54 +80,54 @@
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
id:"",
|
|
|
|
|
latitude:"",
|
|
|
|
|
longitude:"",
|
|
|
|
|
list:{},
|
|
|
|
|
id: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
longitude: "",
|
|
|
|
|
list: {},
|
|
|
|
|
topSwiperIndex: 0,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options){
|
|
|
|
|
this.id=options.id;
|
|
|
|
|
this.latitude=options.latitude;
|
|
|
|
|
this.longitude=options.longitude;
|
|
|
|
|
this.loadActiveInfo()
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.id = options.id;
|
|
|
|
|
this.latitude = options.latitude;
|
|
|
|
|
this.longitude = options.longitude;
|
|
|
|
|
this.loadActiveInfo()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
tobook(type) {
|
|
|
|
|
tobook(type) {
|
|
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "book?type=" + type + "&activity_id="+this.id
|
|
|
|
|
url: "book?type=" + type + "&activity_id=" + this.id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
loadActiveInfo(){
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/activity/show',
|
|
|
|
|
data:{
|
|
|
|
|
id:that.id,
|
|
|
|
|
latitude:that.latitude,
|
|
|
|
|
longitude:that.longitude
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.list = res;
|
|
|
|
|
wx.setStorage({
|
|
|
|
|
key: 'activityinfo',
|
|
|
|
|
data: res,
|
|
|
|
|
success: ()=> {
|
|
|
|
|
console.log('存储成功');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
topSwiperTab(e) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.topSwiperIndex = Number(e.target.current);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
loadActiveInfo() {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/activity/show',
|
|
|
|
|
data: {
|
|
|
|
|
id: that.id,
|
|
|
|
|
latitude: that.latitude,
|
|
|
|
|
longitude: that.longitude
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.list = res;
|
|
|
|
|
wx.setStorage({
|
|
|
|
|
key: 'activityinfo',
|
|
|
|
|
data: res,
|
|
|
|
|
success: () => {
|
|
|
|
|
console.log('存储成功');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
topSwiperTab(e) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.topSwiperIndex = Number(e.target.current);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
@ -170,12 +171,14 @@
|
|
|
|
|
box-shadow: 2px 3px 10px 0px rgba(107, 94, 77, 0.3);
|
|
|
|
|
padding: 22rpx 25rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
swiper{
|
|
|
|
|
height:333rpx
|
|
|
|
|
}
|
|
|
|
|
swiper image{
|
|
|
|
|
width:100%;
|
|
|
|
|
height:333rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
swiper {
|
|
|
|
|
height: 333rpx
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
swiper image {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 333rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|