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 },

      

  • 相关阅读:
    P1030 求先序排列 P1305 新二叉树
    spfa
    Clairewd’s message ekmp
    Cyclic Nacklace hdu3746 kmp 最小循环节
    P1233 木棍加工 dp LIS
    P1052 过河 线性dp 路径压缩
    Best Reward 拓展kmp
    Period kmp
    Substrings kmp
    Count the string kmp
  • 原文地址:https://www.cnblogs.com/daifuchao/p/13707602.html
Copyright © 2011-2022 走看看