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

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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