|
@@ -62,7 +62,7 @@
|
|
|
v-if="index > 1 && index % 5 == 0"
|
|
|
ad-type="video"
|
|
|
:ad-intervals="100"
|
|
|
- unit-id="adunit-9b5e62e2a8260b23"
|
|
|
+ unit-id="adunit-173f2958099a2b25"
|
|
|
></ad>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -71,6 +71,7 @@
|
|
|
|
|
|
<script>
|
|
|
import api from "@/api";
|
|
|
+import request from "@/api/request";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -87,9 +88,9 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
touchCountWxAd(e) {
|
|
|
- let that =this
|
|
|
+ let that = this;
|
|
|
this.touchCount = this.touchCount + 1;
|
|
|
- if (this.touchCount % 5 == 0&&this.touchCount!==0) {
|
|
|
+ if (this.touchCount % 5 == 0 && this.touchCount !== 0) {
|
|
|
// 在页面中定义插屏广告
|
|
|
let interstitialAd = null;
|
|
|
// 在页面onLoad回调事件中创建插屏广告实例
|
|
@@ -102,20 +103,23 @@ export default {
|
|
|
});
|
|
|
interstitialAd.onError((err) => {
|
|
|
console.error(err);
|
|
|
- that.touchCount=0
|
|
|
+ that.touchCount = 0;
|
|
|
});
|
|
|
interstitialAd.onClose(() => {
|
|
|
- that.touchCount=0
|
|
|
+ that.touchCount = 0;
|
|
|
});
|
|
|
}
|
|
|
// 在适合的场景显示插屏广告
|
|
|
if (interstitialAd) {
|
|
|
- interstitialAd.show().then(()=>{
|
|
|
- that.touchCount=0
|
|
|
- }).catch((err) => {
|
|
|
- that.touchCount=0
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
+ interstitialAd
|
|
|
+ .show()
|
|
|
+ .then(() => {
|
|
|
+ that.touchCount = 0;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ that.touchCount = 0;
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -132,15 +136,20 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- api.wx
|
|
|
- .wxMaterialList({
|
|
|
+ request({
|
|
|
+ url: "https://nbjk1.zzxcx.net/nbjk-admin/open-api/wx/material/list",
|
|
|
+ method: "GET",
|
|
|
+ headers: {
|
|
|
+ isLogin: "1",
|
|
|
+ },
|
|
|
+ params: {
|
|
|
subject: this.query.subject,
|
|
|
status: 1,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- this.imgList = res.rows;
|
|
|
- // console.log(res)
|
|
|
- });
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ this.imgList = res.rows;
|
|
|
+ // console.log(res)
|
|
|
+ });
|
|
|
},
|
|
|
};
|
|
|
</script>
|