|
|
|
@ -17,7 +17,9 @@ |
|
|
|
<view class="itembox"> |
|
|
|
<span v-for="(item,i) in sceneList" :key="i" @click="navClickHandler(item)"><img :src="item.uploadPath" class="scene-img"></image></span> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="middleContent" v-if="showTitle"> |
|
|
|
<view v-html="content"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="footbox"> |
|
|
|
<tabbar :page="page"></tabbar> |
|
|
|
@ -61,17 +63,24 @@ |
|
|
|
//场景入口 |
|
|
|
sceneList: [], |
|
|
|
x:0, |
|
|
|
y:0 |
|
|
|
showTitle:true, |
|
|
|
y:0, |
|
|
|
content:"" |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState('m_user', ['token']) |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad(options) { |
|
|
|
this.checkLogin(); |
|
|
|
if (this.token != "") { |
|
|
|
this.getSwiperList(); |
|
|
|
this.getLocation(); |
|
|
|
this.getContent(); |
|
|
|
this.timer = setTimeout(() => { |
|
|
|
this.showTitle = false |
|
|
|
clearTimeout(this.timer) |
|
|
|
}, 5000) |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
@ -108,6 +117,18 @@ |
|
|
|
|
|
|
|
// uni.$showMsg('数据请求成功!') |
|
|
|
}, |
|
|
|
async getContent() { |
|
|
|
|
|
|
|
const { |
|
|
|
data: res |
|
|
|
} = await uni.$http.post('/small/project/text/listAll',{type:3}) |
|
|
|
if (!res.success) return uni.$showMsg() |
|
|
|
|
|
|
|
res.data.forEach(item=>{ |
|
|
|
this.content = item.content |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
navClickHandler(item) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpkg/list/list?isOpen='+item.isOpen |
|
|
|
@ -214,6 +235,20 @@ |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
@import url("@/static/base_css.css"); |
|
|
|
.middleContent { |
|
|
|
position: absolute; |
|
|
|
top: 45%; |
|
|
|
left: 50%; |
|
|
|
z-index: 9999; |
|
|
|
-webkit-transform: translate(-50%, -50%); |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
padding: 30rpx; |
|
|
|
width: 400rpx; |
|
|
|
height: 300rpx; |
|
|
|
background-color: #c0b9e1; |
|
|
|
border-radius: 10px; |
|
|
|
opacity: 0.9; |
|
|
|
} |
|
|
|
// .index-background { |
|
|
|
// image { |
|
|
|
// height: 270rpx; |
|
|
|
|