版本忽略更新,报工页面优化

This commit is contained in:
砂糖
2025-07-11 10:07:03 +08:00
parent faab5b2bd1
commit 561601910f
6 changed files with 849 additions and 130 deletions

View File

@@ -66,6 +66,11 @@ export default {
idx: 3,
title: "关于我们",
icon: require("static/images/profile_menu_about.png"),
},
{
idx: 4,
title: "应用更新",
icon: require("static/images/profile_menu_about.png"),
},
{
idx: 5,
@@ -73,7 +78,7 @@ export default {
icon: require("static/images/profile_menu_about.png")
},
{
idx: 4,
idx: 6,
title: "退出登录",
icon: require("static/images/profile_menu_logout.png"),
},
@@ -134,6 +139,9 @@ export default {
uni.navigateTo({
url: "/pages/profile/about/index",
});
break;
case 4:
this.showUpdateOptions();
break;
case 5:
uni.createPushMessage({
@@ -147,7 +155,7 @@ export default {
}
});
break;
case 4:
case 6:
uni.showModal({
title: "提示",
content: "确定要退出当前账号吗?",
@@ -169,6 +177,41 @@ export default {
url: `/pages/common/userOrGroupQrCode/index`,
});
},
showUpdateOptions() {
const ignoredVersion = uni.$updateManager.getIgnoredVersion();
let content = '选择更新操作:';
if (ignoredVersion) {
content += `\n当前忽略版本${ignoredVersion}`;
}
uni.showActionSheet({
itemList: ['检查更新', '清除忽略版本', '取消'],
success: (res) => {
switch (res.tapIndex) {
case 0:
// 检查更新(强制检查)
uni.$updateManager.checkUpdate(true);
break;
case 1:
// 清除忽略版本
uni.showModal({
title: '确认操作',
content: '确定要清除忽略的版本设置吗?清除后将重新提示所有版本更新。',
success: (modalRes) => {
if (modalRes.confirm) {
uni.$updateManager.clearIgnoredVersion();
uni.showToast({title: '已清除忽略版本设置'});
}
}
});
break;
case 2:
// 取消
break;
}
}
});
},
},
};
</script>