@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<view style="padding: 4%" v-if="list.length>0">
|
||||
<u-swiper :list="list" keyName="img" @click="clickInfo"></u-swiper>
|
||||
</view>
|
||||
<view class="listbox flex-row">
|
||||
<view class="boxitem" @click="tolist(1)">
|
||||
<text class="iconfont icon-xuzhixianxiao"></text>
|
||||
<text>参观须知</text>
|
||||
</view>
|
||||
<view class="boxitem" @click="tolist(2)">
|
||||
<text class="iconfont icon-bus-alt"></text>
|
||||
<text>公共交通</text>
|
||||
</view>
|
||||
<view class="boxitem" @click="tolist(3)">
|
||||
<text class="iconfont icon-tousujianyi"></text>
|
||||
<text>投诉建议</text>
|
||||
</view>
|
||||
<view class="boxitem" @click="tolist(4)">
|
||||
<text class="iconfont icon-changjianwenti"></text>
|
||||
<text>常见问题</text>
|
||||
</view>
|
||||
<view class="boxitem" @click="tolist(5)">
|
||||
<text class="iconfont icon-lianxiwomen"></text>
|
||||
<text>联系我们</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-footer"
|
||||
style="position: fixed;bottom: -60rpx;left: 0;text-align: center;width: 100%;z-index: -1;">
|
||||
<image src="../../static/img/footer_logo.png" class="footer-img"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that = this;
|
||||
wx.getLocation({
|
||||
success(res) {
|
||||
that.latitude = res.latitude;
|
||||
that.longitude = res.longitude;
|
||||
that.loadActivity()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
tolist(type) {
|
||||
if (type == 5) {
|
||||
uni.navigateTo({
|
||||
url: "contact"
|
||||
})
|
||||
} else if (type == 3) {
|
||||
uni.navigateTo({
|
||||
url: "feedback"
|
||||
})
|
||||
} else
|
||||
uni.navigateTo({
|
||||
url: "list?type=" + type
|
||||
})
|
||||
},
|
||||
loadActivity() {
|
||||
var that = this;
|
||||
this.util.request({
|
||||
api: '/api/mobile/activity/index',
|
||||
data: {
|
||||
latitude: that.latitude,
|
||||
longitude: that.longitude,
|
||||
time_type: 2
|
||||
},
|
||||
utilSuccess: function(res) {
|
||||
for (var m of res.data) {
|
||||
m.img = m.cover_upload.url;
|
||||
}
|
||||
that.list = res.data;
|
||||
},
|
||||
utilFail: function(res) {
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
clickInfo(e) {
|
||||
var obj = this.list[e];
|
||||
uni.navigateTo({
|
||||
url: "../activity/info?id=" + obj.id + "&latitude=" + obj.latitude + "&longitude=" + obj
|
||||
.longitude
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #f7f6f4;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 48rpx;
|
||||
color: #dec096;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.footer-img {
|
||||
width: 421rpx;
|
||||
height: 364rpx;
|
||||
}
|
||||
|
||||
.listbox {
|
||||
flex-wrap: wrap;
|
||||
padding: 2%;
|
||||
}
|
||||
|
||||
.boxitem {
|
||||
background: url("@/static/img/nav_bg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 50%;
|
||||
width: 46%;
|
||||
height: 100px;
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 2%;
|
||||
margin-left: 2%;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #351C1B;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 5.1 KiB |