添加版本检测

This commit is contained in:
fofolee
2022-03-31 14:37:18 +08:00
parent cf612888fc
commit 17cf743e1f
3 changed files with 53 additions and 0 deletions

View File

@@ -16,6 +16,15 @@ export default defineComponent({
},
methods: {
pluginEnterEvent() {
// 版本检测
const requiredVersion = "2.6.1";
let version = utools.getAppVersion();
if (version < requiredVersion) {
this.$router.push({
path: `/needupdate/${version}-${requiredVersion}`,
});
return;
}
utools.onPluginEnter((enter) => {
localStorage["enterData"] = JSON.stringify(enter);
this.$router.push(enter.code);