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

      

  • 相关阅读:
    UVA 10305 Ordering Tasks(拓扑排序)
    UVA 1152 4 Values whose Sum is 0(中途相遇法)
    UVA 1103 Ancient Messages
    HDU 2141 Can you find it?
    POJ 2456 Aggressive cows(二分+贪心)
    Tallest Cow【模拟】
    Tallest Cow【模拟】
    激光炸弹【模拟】
    激光炸弹【模拟】
    激光炸弹【模拟】
  • 原文地址:https://www.cnblogs.com/daifuchao/p/13707602.html
Copyright © 2011-2022 走看看