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