如何优化保险咨询网站的在线排名以提供免费咨询服务?

摘要:保险咨询免费24小时在线,网站排名优化方法,企业所得税怎么征收比例,上海城隍庙简介概览 uniapp打包的Android项目实现本地swf格式文件的展示,并且能够进行交互 需求分析 1、因为是打包的Androi
保险咨询免费24小时在线,网站排名优化方法,企业所得税怎么征收比例,上海城隍庙简介概览 uniapp打包的Android项目实现本地swf格式文件的展示#xff0c;并且能够进行交互 需求分析 1、因为是打包的Android项目展示本地的swf文件#xff0c;首先需要拿到这个本地的swf文件路径 2、如何在uniapp的vue页面中展示swf#xff0c;因为没有直接展示swf文件的标…概览 uniapp打包的Android项目实现本地swf格式文件的展示并且能够进行交互 需求分析 1、因为是打包的Android项目展示本地的swf文件首先需要拿到这个本地的swf文件路径 2、如何在uniapp的vue页面中展示swf因为没有直接展示swf文件的标签/组件考虑使用web-view组件来进行展示swf文件 3、直接使用web-view组件无法展示swf使用html先展示swf然后把html链接放到web-view中进行展示 4、html中如何展示swf把swf转为html来进行展示这个swf文件使用开源的js实现下载地址https://download.csdn.net/download/ahualong1/89900202 具体实现 1、flashPage.vue页面 templateview :style{height: screenHeight px}!-- titleViewVue :titleNametitleName classVideoTitleViewClass/titleViewVue --web-view :srcurl messagehandlePostMessage/web-view/view /templatescriptimport titleViewVue from ../../components/titleView/titleView.vueimport {uploadStudyTime} from /api/api.jsexport default {components: {titleViewVue},data() {return {titleName: ,//标题SubjectId: ,videoSrc: ,//视频资源本地地址videoHeight: ,videoWidth: 100%,screenHeight: ,startTime: 0,fileUrl: ,url: }},onLoad(option) {this.startTime Date.now()this.screenHeight getApp().globalData.screenHeight;// 定义视频URLthis.titleName option.titleName?option.titleName:this.SubjectId option.SubjectId this.fileUrl option.urlthis.url /static/flash.html?filePath plus.io.convertLocalFileSystemURL(this.fileUrl) titleName this.titleName},onUnload() {if(!getApp().globalData.isGuest){this.uploadSduyTimePage()} },methods: {uploadSduyTimePage(){var upLoadTime {subject_id: this.SubjectId,date: this.$utils.formatDateTime(),time: Date.now() / 1000 - this.startTime / 1000}this.startTime 0const arryUpload []arryUpload[0] upLoadTimeuploadStudyTime({data: arryUpload}).then(res{if(res.data.code 200 res.data.status success){}else{if(uni.getStorageSync(uploadTime)){arryUpload []arryUpload uni.getStorageSync(uploadTime)arryUpload.push(upLoadTime)uni.setStorageSync(uploadTime,arryUpload)}else{arryUpload []arryUpload.push(upLoadTime)uni.setStorageSync(uploadTime,arryUpload)}}})},handlePostMessage(){uni.navigateBack()}}} /scriptstyle/style码中fileUrl 为uni.saveFile()保存到本地的路径直接打开是无法展示的需要使用plus的apiplus.io.convertLocalFileSystemURL(this.fileUrl) 将本地文件系统的URL转换为跨域可以访问的URL 2、flash.html的具体代码 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlnshttp://www.w3.org/1999/xhtml langen xml:langenheadtitleSWFObject 2 dynamic publishing example page/titlemeta http-equivContent-Type contenttext/html; charsetiso-8859-1 /script typetext/javascript srcswf2js.js/script/headbodydiv stylewidth: 100%;height: auto;display: flex;align-items: center;justify-content: space-between;flex-direction: row;padding: 8px;background-color: #87B5F9;img srcleftarrow.png styleheight: 20px; idbackClickId /div styleflex: 1;display: flex;align-items: center;justify-content: center;div idtitleNameId stylecolor: #FFFFFF;font-size: 20px;/div/div/div/body!-- 微信 JS-SDK 如果不需要兼容小程序则无需引用此 JS 文件。 --!-- script typetext/javascript src//res.wx.qq.com/open/js/jweixin-1.6.0.js/script --!-- uni 的 SDK必须引用。 --script typetext/javascript src../hybrid/html/web/uni.webview.js/scriptscript typetext/javascriptdocument.getElementById(backClickId).addEventListener(click, function() {uni.postMessage({data: {back: true}});});window.onload function() {if(location.href.includes(filePath)){swf2js.load(getParameterByName(filePath, ))}if (location.href.includes(titleName)) {document.getElementById(titleNameId).textContent getParameterByName(titleName, );} else {document.getElementById(titleNameId).textContent 模拟训练;}};function getParameterByName(name, url) {if (!url) url location.href;name name.replace(/[\[\]]/g, \\$);var regex new RegExp([?] name (([^#]*)||#|$)),results regex.exec(url);if (!results) return null;if (!results[2]) return ;return decodeURIComponent(results[2].replace(/\/g, ));}/script /html 其中uni.postMessage 是web-view向uniapp.vue传递消息 document.getElementById(backClickId).addEventListener(click, function() {uni.postMessage({data: {back: true}});}); swf2js.load(getParameterByName(filePath, ))为加载本地swf格式的资源代码 需要引入script typetext/javascript srcswf2js.js/script 方法getParameterByName 是获取打开的链接获取参数的方法 运行项目到模拟器或真机进行展示swf就OK了。 可以查看项目中 pages- flashPage-flashPage.vue页面 项目地址https://download.csdn.net/download/ahualong1/89900184 参考开源项目GitCode - 全球开发者的开源社区,开源代码托管平台