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.
wangzong/pages/adv/index.vue

51 lines
881 B

6 months ago
<template>
<view class="adv">
6 months ago
<!-- <image :src="item" class="picItem" v-for="(item,index) in data" :key="index" mode="aspectFill"></image> -->
<ad adpid="1111111111" @load="onload" @close="onclose" @error="onerror"></ad>
6 months ago
</view>
</template>
<script>
export default{
data(){
return {
6 months ago
// data:[
// '/static/images/adv.png','/static/images/adv.png'
// ]
}
},
methods:{
onload(){
console.log("广告加载完成")
},
onclose(){
console.log("0000")
},
onerror(val){
uni.showToast({
title: val.detail.errMsg,
icon: 'none'
})
setTimeout(()=>{
uni.navigateBack(-1)
},2000)
6 months ago
}
}
}
</script>
<style lang="scss" scoped>
.adv{
min-height: calc(100vh);
background: #F5F5F7;
padding:24rpx;
width:100%;
.picItem{
width:100%;
height: 230rpx;
background: #FFFFFF;
border-radius: 20px;
margin-bottom: 20rpx;
}
}
</style>