zoukankan      html  css  js  c++  java
  • uniapp版本迭代

    app.vue里面写
    onLaunch: function(launch) { let that = this // #ifdef APP-PLUS uni.getSystemInfo({ success(res) { console.log(res) console.log(res.platform) console.log(res.version) that.platform = res.platform that.version = res.version } }); if(this.platform == 'android'){ this.$util.request({//获取轮播 url: '/mobile/index.php?act=index&op=apk_version', method: 'get', data: {}, }).then((res)=> { console.log(res) if(res.error_code == 0 && res.datas.url != ""){ console.log(res.datas.version,"版本号") if(res.datas.version != that.version){ uni.showModal({ title: '版本更新', content: '是否更新到最新版本'+res.datas.version, success: (res2)=> { if (res2.confirm) { // 下载最新的版本 console.log(res.datas.url,"下载链接") that.doUpData(res.datas.url) } else if (res2.cancel) { } } }); } } }) } if(this.platform == 'ios'){ this.$util.request({//获取轮播 url: '/mobile/index.php?act=index&op=ios_version', method: 'get', data: {}, }).then((res)=> { console.log(res,123456) if(res.error_code == 0 && res.datas.url != ""){ console.log(res.datas.version,"版本号") if(res.datas.version != that.version ){ uni.showModal({ title: '版本更新', content: '是否更新到最新版本'+res.datas.version, success: (res2)=> { if (res2.confirm) { // 下载最新的版本 console.log(res.datas.url,"下载链接") that.doUpData(res.datas.url) } else if (res2.cancel) { } } }); } } }) } // #endif },

      

  • 相关阅读:
    python GUI
    Python 博客网站资源
    Python 100 天学习计划
    pycharm基本设置
    MySQL 57安装部署(Zip版)(Windows版)
    nginx在centos下的安装
    仓位计算
    python笔记
    vue(一)--监听事件
    Hibernate(五)--级联
  • 原文地址:https://www.cnblogs.com/daifuchao/p/13707602.html
Copyright © 2011-2022 走看看