diff --git a/App.vue b/App.vue
index e014cf5..4f68a13 100644
--- a/App.vue
+++ b/App.vue
@@ -471,7 +471,7 @@ export default {
},
};
-function checkUpdate() {
+function checkUpdate(forceCheck = false) {
const localVersion = plus.runtime.version;
const localWgtVersion = uni.getStorageSync('wgtVersion') || localVersion;
uni.request({
@@ -483,11 +483,19 @@ function checkUpdate() {
const currentVersion = compareVersion(localWgtVersion, localVersion) > 0 ? localWgtVersion : localVersion;
console.log('本地基座版本:', localVersion, '本地wgt版本:', localWgtVersion, '当前对比版本:', currentVersion, '远程版本:', remoteVersion);
if (compareVersion(remoteVersion, currentVersion) > 0) {
+ // 检查是否已忽略当前版本(除非强制检查)
+ const ignoredVersion = uni.getStorageSync('ignoredVersion');
+ if (!forceCheck && ignoredVersion === remoteVersion) {
+ console.log('用户已选择忽略此版本:', remoteVersion);
+ return;
+ }
+
uni.showModal({
title: '发现新版本',
content: `检测到新版本(${remoteVersion}),是否立即下载并更新?`,
confirmText: '立即更新',
cancelText: '暂不更新',
+ showCancel: true,
success: (modalRes) => {
if (modalRes.confirm) {
uni.showLoading({title: '正在下载更新包...'});
@@ -520,6 +528,20 @@ function checkUpdate() {
uni.showToast({title: '下载失败'});
}
});
+ } else {
+ // 用户选择暂不更新,询问是否忽略此版本
+ uni.showModal({
+ title: '忽略更新',
+ content: `是否忽略版本 ${remoteVersion}?忽略后下次启动时将不再提示此版本更新。`,
+ confirmText: '忽略此版本',
+ cancelText: '下次提醒',
+ success: (ignoreRes) => {
+ if (ignoreRes.confirm) {
+ uni.setStorageSync('ignoredVersion', remoteVersion);
+ uni.showToast({title: '已忽略此版本更新'});
+ }
+ }
+ });
}
}
});
@@ -550,6 +572,29 @@ function compareVersion(v1, v2) {
}
return 0;
}
+
+// 更新管理工具函数
+function clearIgnoredVersion() {
+ uni.removeStorageSync('ignoredVersion');
+ console.log('已清除忽略的版本设置');
+}
+
+function getIgnoredVersion() {
+ return uni.getStorageSync('ignoredVersion');
+}
+
+function setIgnoredVersion(version) {
+ uni.setStorageSync('ignoredVersion', version);
+ console.log('已设置忽略版本:', version);
+}
+
+// 导出更新管理函数供其他页面使用
+uni.$updateManager = {
+ checkUpdate: (forceCheck = false) => checkUpdate(forceCheck),
+ clearIgnoredVersion,
+ getIgnoredVersion,
+ setIgnoredVersion
+};
\ No newline at end of file
diff --git a/components/ReportDetail/index.vue b/components/ReportDetail/index.vue
new file mode 100644
index 0000000..ac312c4
--- /dev/null
+++ b/components/ReportDetail/index.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/profile/index/index.vue b/pages/profile/index/index.vue
index b2847f0..a148115 100644
--- a/pages/profile/index/index.vue
+++ b/pages/profile/index/index.vue
@@ -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;
+ }
+ }
+ });
+ },
},
};
diff --git a/pages/workbench/reportWork/reportWork.vue b/pages/workbench/reportWork/reportWork.vue
index 789fed5..c0dd73b 100644
--- a/pages/workbench/reportWork/reportWork.vue
+++ b/pages/workbench/reportWork/reportWork.vue
@@ -1,55 +1,58 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- ⭐
- {{ item.projectName }}
-
- {{ item.projectNum }}
-
- {{ item.nickName }}
- ({{ item.deptName }})
-
- {{ item.workPlace }}
-
-
-
- {{ formatDate(item.createTime) }}
-
-
-
-
+
+
+
+ 全部报工
+
+
+ 我的报工
+
-
-
+
+
+
+
+
+
+
+
+
+ 暂无报工数据
+
+
+
+
+
+
+
@@ -119,24 +122,44 @@
+
+
+