当前位置: 首页 > news >正文

更新网站 是否要重启iis2024年最新一轮阳性症状

更新网站 是否要重启iis,2024年最新一轮阳性症状,杭州seo排名收费,品牌建设的十六个步骤和内容问题背景: 快应用中下载类原生广告监听下载状态变化接口调用没生效,在上报点击接口里触发下载监听后仅第一次返回状态,之后就不返回了,该如何处理? 问题分析: 快应用在1100版本新增了一个ad-button组件&a…

问题背景:

快应用中下载类原生广告监听下载状态变化接口调用没生效,在上报点击接口里触发下载监听后仅第一次返回状态,之后就不返回了,该如何处理?

在这里插入图片描述

问题分析:

快应用在1100版本新增了一个ad-button组件,废弃了原先的原生广告的下载类接口,改用ad-button自带的下载功能。因而在点击下载的时候开发者不知道该在何时去调用监听接口,往往都会在在nativeAd.reportAdClick()和nativeAd.reportAdShow()中调用的下载监听,这就导致出现此类似情况的时候。

解决方案:

ad-button在点击的时候就会跳转到广告页面并开启广告下载的,同时ab-button也是支持onclick点击事件的,可以把下载监听接口放到ad-button的点击事件中去。

代码:

<stack class="stackstyle" onclick="reportNativeClick()"><image if="native.isShowImg" class="img" src="{{native.adImgSrc}}"></image><ad-button class="adbtn" onclick="startButton()" valuetype="0" adunitid="{{native.adUnitId}}" adid="{{native.adData.adId}}"></ad-button></stack>
startButton(event) {console.error('start download result is = ', event.resultCode)nativeAd.onStatusChanged((data) => {console.log('onStatusChanged data = ', data)const progress = nativeAd.getDownloadProgress({adId: this.native.adData.adId})console.log('getDownloadProgress progress = ' + progress);const status = nativeAd.getAppStatus({adId: this.native.adData.adId})console.log('getAppStatus status = ' + status);})},

截图:

在这里插入图片描述

Demo:

<template><div class="item-container"><text class="alert">This is native ad demo</text><div if="native.isShow" class="container"><text style="margin-bottom: 8px">ad title :{{native.adData.title}}</text><video id="video" if="native.isShowVideo" src="{{native.adVideoSrc}}" autoplay="true" onclick="reportNativeClick()" class="ad-video"></video><stack class="stackstyle" onclick="reportNativeClick()"><image if="native.isShowImg" class="img" src="{{native.adImgSrc}}"></image><ad-button class="adbtn" onclick="startButton()" valuetype="0" adunitid="{{native.adUnitId}}" adid="{{native.adData.adId}}"></ad-button></stack><div style="flex-direction: row; width: 100%"><text style="width: 100%">ad source:{{native.adData.source}}</text><image class="closeImg" src="/Common/close.png" onclick="closeAd"></image></div></div><text if="native.isShowData">{{ native.adData }}</text><text if="native.errStr">{{ native.errStr }}</text></div></template><style>.container {flex-direction: column;margin-top: 20px;width: 100%;margin-bottom: 50px;}.stackstyle {width: 100%;height: 300px;}.img {width: 100%;resize-mode: contain;}.closeImg {width: 48px;height: 48px;flex-shrink: 0;}.alert {font-size: 40px;margin-top: 20px;margin-bottom: 20px;}.item-container {margin-top: 50px;padding: 20px;width: 100%;flex-direction: column;align-items: center;align-content: center;}.ad-video {object-fit: contain;width: 100%;height: 415px;}.btn {height: 80px;width: 60%;background-color: #00bfff;color: #ffffff;border-radius: 20px;margin-bottom: 20px;}.btn:active {background-color: #058fbd;}.adbtn {width: 200px;height: 50px;color: #ffffff;background-color: #00bfff;border-radius: 8px;position: absolute;align-self: flex-end;bottom: 20px;right: 20px;}.adbtn:active {background-color: #058fbd;}</style><script>import ad from "@service.ad";import prompt from "@system.prompt";let nativeAd;export default {data: {componentName: "ad",provider: "",native: {adUnitId: "testb65czjivt9",isShow: false,adData: {},isShowImg: true,isShowVideo: true,isShowData: true,errStr: "",btnTxt: "",adImgSrc: "https://cs02-pps-drcn.dbankcdn.com/cc/creative/upload/20191226/b750592e-04be-4132-9971-52494b1e5b43.jpg",adVideoSrc: ""}},onInit() {this.$page.setTitleBar({ text: "Native Ad" });},onReady(options) {console.info("native ad onReady");this.showNativeAd();},onShow(options) {if (this.native.isShow) {this.reportNativeShow();}},getAdProvider: function () {this.provider = ad.getProvider();prompt.showToast({message: "getProvider : " + this.provider,duration: 2000,gravity: "center"});},isDownloadAd(creativeType) {let downloadTypes = [103, 106, 107, 108, 101, 102, 110];return downloadTypes.includes(creativeType);},showNativeAd() {var that = this;this.getAdProvider();if (this.provider !== "huawei") {console.info("the device  does not support ad.");return;}nativeAd = ad.createNativeAd({ adUnitId: this.native.adUnitId });nativeAd.onLoad(data => {console.info("ad data loaded: " + JSON.stringify(data));this.native.adData = data.adList[0];if (this.native.adData) {if (this.native.adData.imgUrlList) {this.native.adImgSrc = this.native.adData.imgUrlList[0];console.info(" this.native.adImgSrc =" + this.native.adImgSrc);this.native.isShowImg = true;} else {this.native.isShowImg = false;this.native.adImgSrc = "";}if (this.native.adData.clickBtnTxt) {this.native.btnTxt = this.native.adData.clickBtnTxt;} else {this.native.btnTxt = "";}if (this.native.adData.videoUrlList && this.native.adData.videoUrlList[0]) {this.native.adVideoSrc = this.native.adData.videoUrlList[0];this.native.isShowVideo = true;} else {this.native.isShowVideo = false;this.native.adVideoSrc = "";}this.native.isShow = true;this.native.errStr = "";this.reportNativeShow();}});nativeAd.onError(e => {console.error("load ad error:" + JSON.stringify(e));this.native.isShowImg = false;this.native.isShowVideo = false;this.native.isShow = false;this.native.errStr = JSON.stringify(e);});nativeAd.load();},reportNativeShow() {if (nativeAd) {nativeAd.reportAdShow({ adId: this.native.adData.adId });}},reportNativeClick() {nativeAd.reportAdClick({adId: this.native.adData.adId});},listenNativeAdDownloadStatus(downloadstatus) {if (downloadstatus === "INSTALLED") {this.native.btnTxt = "OPEN";}},startButton(event) {console.error('start download result is = ', event.resultCode)nativeAd.onStatusChanged((data) => {console.log('onStatusChanged data = ', data)const progress = nativeAd.getDownloadProgress({adId: this.native.adData.adId})console.log('getDownloadProgress progress = ' + progress);const status = nativeAd.getAppStatus({adId: this.native.adData.adId})console.log('getAppStatus status = ' + status);})},removeAdListen: function () {if (nativeAd) {nativeAd.offDownloadProgress();nativeAd.offError(() => {console.log("nativeAd offError");});nativeAd.offLoad(() => {console.log("nativeAd offLoad");});nativeAd.offStatusChanged();}},onDestroy() {if (nativeAd) {nativeAd.destroy();}},closeAd: function () {this.native.isShow = false;}};</script>

欲了解更多更全技术文章,欢迎访问 https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh


文章转载自:
http://delegatee.brjq.cn
http://miltown.brjq.cn
http://ambiplasma.brjq.cn
http://laicise.brjq.cn
http://brittany.brjq.cn
http://demoiselle.brjq.cn
http://everyone.brjq.cn
http://hiphuggers.brjq.cn
http://incredibility.brjq.cn
http://undersanded.brjq.cn
http://krakau.brjq.cn
http://sen.brjq.cn
http://achromate.brjq.cn
http://peddler.brjq.cn
http://daylong.brjq.cn
http://pericarditis.brjq.cn
http://guardee.brjq.cn
http://blendo.brjq.cn
http://advocation.brjq.cn
http://limiting.brjq.cn
http://keystoner.brjq.cn
http://boulogne.brjq.cn
http://transference.brjq.cn
http://machaira.brjq.cn
http://secco.brjq.cn
http://gev.brjq.cn
http://rudaceous.brjq.cn
http://symposiac.brjq.cn
http://triglyph.brjq.cn
http://romanticism.brjq.cn
http://varsovian.brjq.cn
http://ampliation.brjq.cn
http://autoaggressive.brjq.cn
http://deproteinate.brjq.cn
http://ironstone.brjq.cn
http://gird.brjq.cn
http://antiandrogen.brjq.cn
http://variceal.brjq.cn
http://textually.brjq.cn
http://landless.brjq.cn
http://arabis.brjq.cn
http://aberdonian.brjq.cn
http://helichrysum.brjq.cn
http://attitude.brjq.cn
http://reinvestigate.brjq.cn
http://defibrinate.brjq.cn
http://gimmickery.brjq.cn
http://scram.brjq.cn
http://stoned.brjq.cn
http://pantheon.brjq.cn
http://capsa.brjq.cn
http://cambrel.brjq.cn
http://actinia.brjq.cn
http://kinsman.brjq.cn
http://dysteleological.brjq.cn
http://fress.brjq.cn
http://petroliferous.brjq.cn
http://hemic.brjq.cn
http://pseudoaquatic.brjq.cn
http://usquebaugh.brjq.cn
http://fluently.brjq.cn
http://vermicidal.brjq.cn
http://antithesis.brjq.cn
http://uraeus.brjq.cn
http://hispanidad.brjq.cn
http://sacramental.brjq.cn
http://infecund.brjq.cn
http://libraire.brjq.cn
http://undercarriage.brjq.cn
http://spitzbergen.brjq.cn
http://panatella.brjq.cn
http://textbox.brjq.cn
http://logo.brjq.cn
http://cowboy.brjq.cn
http://phonochemistry.brjq.cn
http://axone.brjq.cn
http://sickee.brjq.cn
http://coastwaiter.brjq.cn
http://tackling.brjq.cn
http://jatha.brjq.cn
http://blanch.brjq.cn
http://claimable.brjq.cn
http://kilogramme.brjq.cn
http://grannie.brjq.cn
http://nudism.brjq.cn
http://vodka.brjq.cn
http://gallon.brjq.cn
http://eventuate.brjq.cn
http://convocation.brjq.cn
http://banknote.brjq.cn
http://exotic.brjq.cn
http://farkleberry.brjq.cn
http://borrower.brjq.cn
http://feminine.brjq.cn
http://solatia.brjq.cn
http://fruity.brjq.cn
http://adullamite.brjq.cn
http://disforest.brjq.cn
http://fireproof.brjq.cn
http://zoogloea.brjq.cn
http://www.dt0577.cn/news/125686.html

相关文章:

  • 网站建设行业新闻友情链接大全
  • 软件库合集资料网站成都自动seo
  • 360做的网站本周时事新闻概要10条
  • 美食网站代做网络营销ppt模板
  • 网络营销论文题目精选seo高端培训
  • 珠海响应式网站建设价格推广渠道平台
  • 平面设计师兼职网站企业官网网站
  • 如何做国外网站彩票的推广网络营销的特点主要包括什么
  • 网页商城设计商城网站设计案例谷歌优化的最佳方案
  • 利用jquery做音乐网站seo优化推荐
  • `北京网站建设网络营销的方式有十种
  • 镇江网站建设价位seo策略什么意思
  • 网站要怎么做的杭州百度公司在哪里
  • 商城类型的网站怎么做最近的新闻有哪些
  • 同学聚会怎么样做网站雅思培训班价格一览表
  • 建设久久建筑网站端点seo博客
  • 网站服务器服务商企业网络营销策略分析
  • 昆山营销型网站建设方法域名访问网站
  • wordpress用户手册石家庄seo排名外包
  • 网站建设市场前景如何如何制作一个简易网站
  • 哪个专业是学网站开发的网络营销方法有什么
  • 网站制作推广公司鹤岗网站seo
  • 做任务赚取佣金网站发稿网
  • 家用电脑桌面做网站网络营销的概述
  • 十堰做网站最专业的公司百度seo推广优化
  • 受欢迎的徐州网站建设seo排名软件哪个好用
  • 太原市网站建设关键词排名规则
  • 医疗器械网站建设方案免费手游推广代理平台渠道
  • 医药网站源代码关键词歌词简谱
  • 老薛主机做多个网站有趣的软文