uniapp--獲取manifest.json信息頁面呈現


uniapp獲取manifest.json的信息到頁面呈現!比如獲取當前版本號呈現到升級頁!應用介紹等信息

獲取方式:

// #ifdef APP-PLUS    //限安卓編譯
    that=this;
   plus.runtime.getProperty(plus.runtime.appid, function(wgtInfo) {
   that.version = wgtInfo.version;  //例子:獲取版本號
    console.log("launchLoadedTime: " + plus.runtime.launchLoadedTime);
    console.log("launcher: " + plus.runtime.launcher);
    console.log("appId: " + wgtInfo.appid);
    console.log("version: " + wgtInfo.version);
    console.log("code: " + wgtInfo.version.code);
    console.log("innerVersion:" + plus.runtime.innerVersion);
    console.log("name: " + wgtInfo.name);
    console.log("description: " + wgtInfo.description);
    console.log("author: " + wgtInfo.author);
    console.log("license: " + wgtInfo.license);
    console.log("licensehref: " + wgtInfo.licensehref);
    console.log("features: " + wgtInfo.features);
   });
   // #endif

參考

1、如何獲取manifest.json里面version的code - DCloud問答
    https://ask.dcloud.net.cn/question/15611
2、manifest.json文檔說明 - DCloud問答
    https://ask.dcloud.net.cn/article/94


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM