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
posted @ 2020-12-10 21:40  残阳曦月  阅读(1979)  评论(0编辑  收藏  举报