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

怎么做公司网站的二维码乐清做网站的

怎么做公司网站的二维码,乐清做网站的,网站不备案可以做淘宝客吗,慈溪企业排名网站问题背景#xff1a; 快应用中下载类原生广告监听下载状态变化接口调用没生效#xff0c;在上报点击接口里触发下载监听后仅第一次返回状态#xff0c;之后就不返回了#xff0c;该如何处理#xff1f; 问题分析#xff1a; 快应用在1100版本新增了一个ad-button组件 快应用中下载类原生广告监听下载状态变化接口调用没生效在上报点击接口里触发下载监听后仅第一次返回状态之后就不返回了该如何处理 问题分析 快应用在1100版本新增了一个ad-button组件废弃了原先的原生广告的下载类接口改用ad-button自带的下载功能。因而在点击下载的时候开发者不知道该在何时去调用监听接口往往都会在在nativeAd.reportAdClick()和nativeAd.reportAdShow()中调用的下载监听这就导致出现此类似情况的时候。 解决方案 ad-button在点击的时候就会跳转到广告页面并开启广告下载的同时ab-button也是支持onclick点击事件的可以把下载监听接口放到ad-button的点击事件中去。 代码 stack classstackstyle onclickreportNativeClick()image ifnative.isShowImg classimg src{{native.adImgSrc}}/imagead-button classadbtn onclickstartButton() valuetype0 adunitid{{native.adUnitId}} adid{{native.adData.adId}}/ad-button/stackstartButton(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 templatediv classitem-containertext classalertThis is native ad demo/textdiv ifnative.isShow classcontainertext stylemargin-bottom: 8pxad title :{{native.adData.title}}/textvideo idvideo ifnative.isShowVideo src{{native.adVideoSrc}} autoplaytrue onclickreportNativeClick() classad-video/videostack classstackstyle onclickreportNativeClick()image ifnative.isShowImg classimg src{{native.adImgSrc}}/imagead-button classadbtn onclickstartButton() valuetype0 adunitid{{native.adUnitId}} adid{{native.adData.adId}}/ad-button/stackdiv styleflex-direction: row; width: 100%text stylewidth: 100%ad source:{{native.adData.source}}/textimage classcloseImg src/Common/close.png onclickcloseAd/image/div/divtext ifnative.isShowData{{ native.adData }}/texttext ifnative.errStr{{ native.errStr }}/text/div/templatestyle.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;}/stylescriptimport 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_sourcezzh
http://www.w-s-a.com/news/925098/

相关文章:

  • 做网站的天空网云南省建设厅网站怎么进不去
  • 天津网站排名提升网络营销推广策略包括哪些
  • 网站建设与管理 ppt网站打开是别人的
  • 图片网站怎么做排名怎么分析一个网站seo
  • 伪原创对网站的影响深圳装修公司排名100强
  • 网站建设公司效果个人可以做医疗信息网站吗
  • 网站使用arial字体下载微网站 建设
  • 文化馆网站建设意义营销型国外网站
  • 公司网站定位建议wordpress怎么用模板
  • 中国十大热门网站排名计算机选什么专业最好
  • 怀化建设企业网站太原网站关键词排名
  • 空间注册网站网站制作是怎么做的
  • 数码家电商城网站源码一个网站的成本
  • 网站伪静态是什么意思麻涌东莞网站建设
  • 理县网站建设公司郑州仿站定制模板建站
  • 手机网站建设网站报价诸城人才网招聘网
  • 一起做网站怎么下单临沂网站制作
  • 公司网站案例企业网站 模版
  • 做的好的响应式网站有哪些网站界面设计案例
  • 上海创意型网站建设icp备案网站信息
  • 网站没收录中山手机网站制作哪家好
  • 代驾软件开发流程wordpress 博客主题 seo
  • 成都的教育品牌网站建设网站广告js代码添加
  • 网站找人做seo然后网站搜不到了网站建设seoppt
  • 做网站优化有用吗学做文案的网站
  • wordpress 知名网站怎么做微网站
  • 用电脑怎么做原创视频网站河南建设工程信息网一体化平台官网
  • 云服务器和网站空间郑州做招商的网站
  • 规模以上工业企业的标准北京seo结算
  • 软件开发过程模型如何做网站性能优化