You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.6 KiB

4 years ago
<template>
<view>
4 years ago
<view class="listActivity">
4 years ago
<view class="activityBox" v-for="(item,index) in list" :key="index" @click="openInfo(item)">
4 years ago
<view class="activityBox-top">
4 years ago
<image :src='item.cover_upload.url' style="width: 100%;height: 333rpx;"></image>
4 years ago
<view class="book-status">
4 years ago
{{item.status==0?"已结束":"活动进行中"}}
4 years ago
</view>
<view class="book-num">
4 years ago
<text class="book-num-y"> {{item.orders_count}} </text>
4 years ago
<text>人已报名</text>
</view>
4 years ago
</view>
4 years ago
<view class="activityBox-content flex-col">
<view class="activityBox-row">
4 years ago
<text class="activityBox-title">{{item.name}}</text>
4 years ago
</view>
<view class="activityBox-row flex-row justify-between">
<view class="tag tag_green">
4 years ago
<text>{{item.target_name}}</text>
4 years ago
</view>
<view class="activityBox-btn tag">
<text>立即报名</text>
</view>
</view>
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
4 years ago
<text>活动时间{{item.start_time}}-{{item.end_time.substring(11,item.end_time.length)}}</text>
4 years ago
</view>
<view class="activityBox-row">
<text class="icon-huodongfangshi iconfont"></text>
4 years ago
<text>活动方式{{item.area_name}}</text>
4 years ago
</view>
<view class="activityBox-row">
<text class="icon-huodong iconfont"></text>
4 years ago
<text>活动地址{{item.address}}</text>
4 years ago
</view>
<view class="activityBox-row">
<text class="icon-renshu iconfont"></text>
4 years ago
<text>人数限制{{item.total==0?'不限':item.total}}</text>
4 years ago
</view>
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离11.3km</text>
<view class="tomap">
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
</view>
</view>
4 years ago
</view>
</view>
4 years ago
</view>
4 years ago
</view>
</template>
<script>
export default {
data() {
return {
4 years ago
showInfo: true,
4 years ago
list: [],
4 years ago
}
4 years ago
},
onLoad() {
this.loadActivity()
4 years ago
},
methods: {
4 years ago
openInfo(obj) {
4 years ago
uni.navigateTo({
4 years ago
url: "info?id="+obj.id+"&latitude="+obj.latitude+"&longitude="+obj.longitude
4 years ago
})
4 years ago
},
loadActivity(){
var that = this;
this.util.request({
api: '/api/mobile/activity/index',
utilSuccess: function(res) {
that.list = res.data;
},
utilFail: function(res) {
}
})
4 years ago
}
4 years ago
}
}
</script>
<style>
4 years ago
@import url("@/static/css/activitybox.css");
4 years ago
page {
background-color: #f7f6f4;
}
4 years ago
</style>