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

国家电网交流建设分公司网站学校建设微网站的方案设计

国家电网交流建设分公司网站,学校建设微网站的方案设计,怎么看一家网站是谁做的,区块链资讯网站建设首先用getSystemInfo判断平台、 再通过json文件模拟接口 判断版本号是否一致 不一致则下载服务器apk进行更新 外加网络波动导致失败重新下载更新包 uni.getSystemInfo({success: function (e) {// #ifndef H5// 获取手机系统版本const system e.system.toLowerCase();const pl…首先用getSystemInfo判断平台、 再通过json文件模拟接口 判断版本号是否一致 不一致则下载服务器apk进行更新 外加网络波动导致失败重新下载更新包 uni.getSystemInfo({success: function (e) {// #ifndef H5// 获取手机系统版本const system e.system.toLowerCase();const platform e.platform.toLowerCase();// 判断是否为ios设备if (platform.indexOf(ios) ! -1 (system.indexOf(ios) ! -1 || system.indexOf(macos) ! -1)) {Vue.prototype.SystemPlatform apple;} else if (platform.indexOf(android) ! -1 system.indexOf(android) ! -1) {Vue.prototype.SystemPlatform android;uni.request({url: https://xxxxxxx.love/0.json, // JSON 文件地址success: (res) {if (res.statusCode 200) {const version res.data.version; // 获取 版本字段if (version ! 1.0.1) {uni.showModal({title: 更新提示,content: 有新的版本可用是否立即更新,success: (result) {if (result.confirm) {const downloadTask uni.downloadFile({url: https://xxxxxxx.love/lock.apk, // 更新包地址success: (downloadResult) {if (downloadResult.statusCode 200) {const tempFilePath downloadResult.tempFilePath;// 保存文件到持久目录uni.saveFile({tempFilePath: tempFilePath,success: (saveResult) {console.log(文件保存成功路径,saveResult.savedFilePath);uni.openDocument({filePath: saveResult.savedFilePath,success: function (res) {console.log(res, 打开安装包);},});return;// 提示用户去文件管理器中安装uni.showModal({title: 下载完成,content:更新包下载完成请在文件管理器中找到并安装更新包。,showCancel: false,success: () {uni.hideLoading(); // 隐藏进度条},});},fail: (err) {console.error(保存文件失败, err);uni.hideLoading(); // 隐藏进度条},});}},fail: (err) {console.error(下载失败, err);uni.hideLoading(); // 隐藏进度条},});uni.showLoading({title: 正在下载更新包,mask: true,});let lastProgress 0;let lastUpdateTime new Date().getTime();const updateInterval 1500;downloadTask.onProgressUpdate((res) {const currentTime new Date().getTime();if (res.progress - lastProgress 5 ||currentTime - lastUpdateTime updateInterval) {lastProgress res.progress;lastUpdateTime currentTime;uni.showLoading({title: 下载中... ${res.progress}%,mask: true,});}});}},});}}},fail: (err) {console.error(请求失败, err);},});} else {Vue.prototype.SystemPlatform devtools;}// #endif},});
http://www.dnsts.com.cn/news/141515.html

相关文章:

  • 这么建设新的网站php网站建设制作流程
  • 做图的模板下载网站数码印花图案设计网站
  • scala做网站商标怎么查询有没有被注册
  • 泸州做网站的公司淘宝官网网页版
  • 现代示范校建设专题网站广州手机网站建设哪家好
  • 做公司网站别人能看到吗莱阳seo排名
  • 珠海网站制作推广公司管理咨询公司名字起名大全
  • 做网站前端难吗网站后端开发
  • 深圳 网站制作 哪家网站空间怎么弄
  • 深圳模板开发建站园林景观网站模板
  • 个人网站域名做音乐网站的选题背景
  • 假网站的域名住房和城乡建设部课题网站
  • 手表网站妨水注册深圳公司代理
  • 国际网站建设做网站找八埏
  • 免费个人网站建设wordpress+别名一致
  • 家里笔记本做网站 怎么解析app推广在哪里可以接单
  • 网站建设建站培训长宁微信手机网站制作
  • 公司做网站收费邢台推广平台
  • 河南做网站汉狮WordPress网络功能
  • 荆州市城市建设投资开发有限公司网站wordpress收录插件
  • 茶企业网站建设模板网站分布
  • 做物流哪个网站货源多河南自己怎么做网站
  • 网站建设策划案腾讯企业服务账号是多少
  • 网站开发查询鞍山网站
  • 免费做销售网站有哪些网站开展营销的思路和方法
  • 网站本地可以打开logo设计免费平台
  • 建设银行陕西分行网站五合一建站
  • 建设网站功能定位wordpress链接尾缀
  • 免费空间网站网站优化什么意思
  • php 用什么做网站服务器百度app免费下载安装