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.
 
 
 
 

47 lines
652 B

<template>
<view class="bg" @click="goIndex()">
<image :src="showImg(screenPng)"></image>
</view>
</template>
<script>
export default {
data() {
return {
screenPng: ""
}
},
onLoad() {
},
onReady () {
// 小轮播
this.Post({
type_id: 3,
position: 5,
}, '/api/adv/getAdv').then(res => {
if(res.data && res.data.length>0) {
this.screenPng = res.data[0].head_img
}
});
},
methods: {
goIndex () {
uni.switchTab({
url:"/pages/index/index"
})
},
}
}
</script>
<style lang="scss" scoped>
.bg{
height: 100vh;
image{
width: 100%;
height: 100%;
}
}
</style>