166 lines
7.1 KiB
HTML
166 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
|
|
<title>Title</title>
|
|
<link rel="stylesheet" href="css/reset.css">
|
|
<link rel="stylesheet" href="css/style.css">
|
|
<script src="js/rem.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="app" v-cloak>
|
|
<div class="area">
|
|
<div class="area-box" :class="{active: page.county == ''}" @click="loadAll">全部</div>
|
|
<div class="area-box" v-for="area in areaList" :class="{active: page.county == area.areaId}" @click="changeArea(area.areaId,area.areaLevel)">{{area.areaName}}</div>
|
|
</div>
|
|
<div class="activity" v-if="activityList && activityList.length > 0">
|
|
<div class="activity-box" v-for="activity in activityList" @click="goDetail(activity.activityLibraryId)">
|
|
<div class="activity-img">
|
|
<img :src="requestUrl + 'culturalactivity/route/file/downloadfile/true/' + activity.activityImage" alt="">
|
|
<div class="status" v-if="activity.activityState == '3'">报名中</div>
|
|
<div class="status" v-if="activity.activityState == '4'">报名人数已满</div>
|
|
<div class="status" v-if="activity.activityState == '5'">停止报名</div>
|
|
<div class="status" v-if="activity.activityState == '6'">进行中</div>
|
|
<div class="status" v-if="activity.activityState == '7'">直接进入</div>
|
|
<div class="status" v-if="activity.activityState == '99'">已结束</div>
|
|
</div>
|
|
<div class="activity-info">
|
|
<h4>{{activity.activityTitle}}</h4>
|
|
<p>{{activity.activityStartTime}}至{{activity.activityEndTime}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="load-more" v-if="haveMore && activityList && activityList.length > 0" @click="loadMore">加载更多</div>
|
|
</div>
|
|
<div class="no-data" v-else>
|
|
<img src="image/no-data.png" alt="">
|
|
</div>
|
|
<div class="bottom-nav">
|
|
<div class="bottom-nav-box" @click="goBottomNav('1')">
|
|
<div class="nav-icon"></div>
|
|
<span>首页</span>
|
|
</div>
|
|
<div class="bottom-nav-box active">
|
|
<div class="nav-icon"></div>
|
|
<span>活动</span>
|
|
</div>
|
|
<div class="bottom-nav-box" @click="goBottomNav('3')">
|
|
<div class="nav-icon"></div>
|
|
<span>场馆</span>
|
|
</div>
|
|
<div class="bottom-nav-box" @click="goBottomNav('4')">
|
|
<div class="nav-icon"></div>
|
|
<span>文化</span>
|
|
</div>
|
|
</div>
|
|
<div class="loading" v-if="isLoading">
|
|
<img src="image/loading.gif" alt="">
|
|
</div>
|
|
</div>
|
|
<script src="js/vue.js"></script>
|
|
<script src="js/jquery-2.1.4.min.js"></script>
|
|
<script src="js/ajax.js"></script>
|
|
<script src="js/layer/layer.js"></script>
|
|
<script>
|
|
var vue = new Vue({
|
|
el:'#app',
|
|
data: {
|
|
requestUrl: 'http://219.159.20.131:8081/',
|
|
areaList: [],
|
|
activityList: [],
|
|
page: {
|
|
page: 1,
|
|
rows: 10,
|
|
newsDirectoriesId: '6b80b810-ab37-455a-ada7-a224b904c3ce',
|
|
county: ''
|
|
},
|
|
haveMore: true,
|
|
isLoading: true
|
|
},
|
|
methods: {
|
|
getAreaList: function () {
|
|
var self = this
|
|
doGetForm(self.requestUrl + 'usercenter/app/dataarea/listareabyparentidrelease/110889', {}, null, function (code, data) {
|
|
self.areaList = data
|
|
})
|
|
},
|
|
changeArea: function (id, lv) {
|
|
if (!this.isLoading) {
|
|
var level = parseInt(lv) + 1
|
|
level = 'area' + level
|
|
this.page.county = id
|
|
this.page[level] = id
|
|
this.page.page = 1
|
|
this.haveMore = true
|
|
this.getActivityList()
|
|
}
|
|
},
|
|
loadAll: function () {
|
|
if (!this.isLoading) {
|
|
this.page = {
|
|
page: 1,
|
|
rows: 10,
|
|
newsDirectoriesId: '6b80b810-ab37-455a-ada7-a224b904c3ce',
|
|
county: ''
|
|
}
|
|
this.haveMore = true
|
|
this.getActivityList()
|
|
}
|
|
},
|
|
getActivityList: function () {
|
|
var self = this
|
|
self.isLoading = true
|
|
doGetForm(self.requestUrl + 'culturalactivity/app/activitylibrary/listpageactivitylibraryfornetrelease', self.page, null, function (code, data) {
|
|
if (self.page.page == '1') {
|
|
self.activityList = data.rows
|
|
if (data.rows.length > 0) {
|
|
self.haveMore = true
|
|
} else {
|
|
self.haveMore = false
|
|
}
|
|
self.isLoading = false
|
|
return
|
|
}
|
|
if (data.rows.length > 0) {
|
|
for (let i = 0; i < data.rows.length; i++) {
|
|
self.activityList.push(data.rows[i])
|
|
}
|
|
self.haveMore = true
|
|
} else {
|
|
self.page.page--
|
|
self.haveMore = false
|
|
layer.msg('暂无更多')
|
|
}
|
|
self.isLoading = false
|
|
})
|
|
},
|
|
loadMore: function () {
|
|
if (!this.isLoading) {
|
|
this.page.page++
|
|
this.getActivityList()
|
|
}
|
|
},
|
|
// 底部导航
|
|
goBottomNav: function (nav) {
|
|
if (nav == '1') {
|
|
window.location.href = 'index.html'
|
|
} else if (nav == '3') {
|
|
window.location.href= 'venue.html'
|
|
} else {
|
|
window.location.href= 'culture.html'
|
|
}
|
|
},
|
|
goDetail: function (id) {
|
|
if (!this.isLoading) {
|
|
window.location.href = 'activity-detail.html?id=' + id
|
|
}
|
|
}
|
|
},
|
|
mounted: function () {
|
|
this.getAreaList()
|
|
this.getActivityList()
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |