Browse Source

首页弹窗显示,答题跳转延长

h5_css
yanyan 2 years ago
parent
commit
95ee2911ec
  1. 7
      components/s-video/s-video.vue
  2. 41
      pages/index/index.vue

7
components/s-video/s-video.vue

@ -170,6 +170,11 @@
this.resCheck = true;
this.question = false;
this.innerAudioContext.play();
// this.timer = setTimeout(() => {
// this.showTitle = false
// clearTimeout(this.timer)
// }, 5000)
}
}
},
@ -277,7 +282,7 @@
that.start = false;
that.question = false;
that.auto = true;
}, 300);
}, 2000);
},
getBindJson() {
this.start = true;

41
pages/index/index.vue

@ -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;

Loading…
Cancel
Save