Cordova项目怎样获取项目版本号
修改版本号
cordova项目下的config.xml中的最上面的widget标签中的version=”1.0.0”中修改
获取版本号
if (platform == 'iOS') {
cordova.getAppVersion.getVersionNumber().then(function (version) {
console.log("本地版本:" + version);
_this.version='v'+version;
})
}
if (platform == 'Android') {
cordova.getAppVersion.getVersionNumber().then(function (version) {
console.log("本地版本:" + version);
_this.version='v'+version;
})
}
还没有评论,来说两句吧...