提交 a860853f 编写于 作者: H hdx

ad: 暂时对微信小程序使用条件编译

上级 678b355c
<template>
<view>
<page-head title="信息流广告"></page-head>
<ad adpid="1111111111" style="width: 100%;" @load="loadFun" @error="errorFun"></ad>
<page-head title="信息流广告"></page-head>
<!-- #ifndef MP -->
<ad adpid="1111111111" style="width: 100%;" @load="loadFun" @error="errorFun"></ad>
<!-- #endif -->
<!-- #ifdef MP -->
<view class="uni-center">微信小程序平台暂不支持测试广告位,需要开通uni-ad后可测试</view>
<!-- #endif -->
<view v-if="tips" class="uni-center">信息流广告加载失败,请退出当前页面重试。</view>
<button @click="pushList">列表-信息流</button>
</view>
......
<template>
<list-view @scrolltolower="onScrollTolower" style="flex:1" show-scrollbar=false>
<list-item v-for="index in listcount" :type="(index != 0 && index%10 == 6) ? 0:1">
<ad v-if="index != 0 && index%10 == 6" adpid="1111111111" @load="onAdLoad" @error="onAdError" @close="onAdClose"></ad>
<list-item v-for="index in listcount" :type="(index != 0 && index%10 == 6) ? 0:1">
<!-- #ifndef MP -->
<ad v-if="index != 0 && index%10 == 6" adpid="1111111111" @load="onAdLoad" @error="onAdError" @close="onAdClose"></ad>
<!-- #endif -->
<!-- #ifdef MP -->
<view class="uni-center">微信小程序平台暂不支持测试广告位,需要开通uni-ad后可测试</view>
<!-- #endif -->
<text v-if="index == 0 || index%10 != 6" style="width: 100%; height: 200px;background-color: aquamarine;margin-top: 10px;">这是一条占位的信息{{index}}</text>
</list-item>
</list-view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册