diff --git a/.env b/.env
index 8b13789..6ca11ae 100644
--- a/.env
+++ b/.env
@@ -1 +1,3 @@
+VITE_APP_VERSION_CODE = 100
+VITE_APP_VERSION = 1.0.0
diff --git a/src/pages.json b/src/pages.json
index ca9774b..9ce25e4 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -75,6 +75,18 @@
"navigationBarTitleText": "个人信息"
}
},
+ {
+ "path": "pages/notfound/index",
+ "style": {
+ "enablePullDownRefresh": false,
+ "onReachBottomDistance": 100,
+ "navigationBarTitleText": "错误页",
+ "app-plus": {
+ "contentAdjust": false,
+ "bounce": "none"
+ }
+ }
+ },
{
"path": "pages/upgrade/index",
"style": {
@@ -85,7 +97,7 @@
"background": "transparent",
"titleNView": false,
"scrollIndicator": false,
-
+
"popGesture": "none",
"animationType": "fade-in",
"animationDuration": 200
diff --git a/src/pages/mine/components/op-item.vue b/src/pages/mine/components/op-item.vue
index 55cc7a1..ac8cbfc 100644
--- a/src/pages/mine/components/op-item.vue
+++ b/src/pages/mine/components/op-item.vue
@@ -1,6 +1,6 @@
-
+
{{ data.title }}
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index be3d8b3..5ee259d 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -62,7 +62,7 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/setting/index.vue b/src/pages/setting/index.vue
index 7f98e9c..10f9c61 100644
--- a/src/pages/setting/index.vue
+++ b/src/pages/setting/index.vue
@@ -56,8 +56,8 @@ import checkUpdate from '@/pages/upgrade/check-update'
const modalRef = ref(null)
const userStore = useUserStore()
-const sysInfo = sys()
-const varsion = computed(() => sysInfo.appVersion)
+// const sysInfo = sys()
+const varsion = computed(() => import.meta.env.VITE_APP_VERSION)
const goPath = (url) => {
uni.navigateTo({
url,
diff --git a/src/pages/upgrade/call-check-version.js b/src/pages/upgrade/call-check-version.js
index cff5d29..322da5a 100644
--- a/src/pages/upgrade/call-check-version.js
+++ b/src/pages/upgrade/call-check-version.js
@@ -11,14 +11,11 @@ export default function () {
if (widgetInfo.version) {
let data = {
- action: 'checkVersion',
- appid: appId,
appVersion: appVersion,
wgtVersion: widgetInfo.version
};
http.get('/latest-app-versions').then(resData => {
- console.log(resData);
-
+
// _id : string
// appid : string
// name : string
@@ -41,8 +38,9 @@ export default function () {
// min_uni_version : string | null // 升级 wgt 的最低 uni-app 版本
const info = resData[systemInfo.platform];
+ const appVersionCode = import.meta.env.VITE_APP_VERSION_CODE;
let resInfo = null
- if (info == null || systemInfo.appVersionCode >= info?.version) {
+ if (info == null || appVersionCode >= info?.version) {
resInfo = {
code: 0
}
diff --git a/src/static/images/task.svg b/src/static/images/task.svg
index 73c67e5..fb282d6 100644
--- a/src/static/images/task.svg
+++ b/src/static/images/task.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/static/images/user.svg b/src/static/images/user.svg
index dc5f070..4d33fd7 100644
--- a/src/static/images/user.svg
+++ b/src/static/images/user.svg
@@ -1 +1,15 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/utils/request.js b/src/utils/request.js
index 2ac0425..8511d9c 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -11,7 +11,8 @@ http.setConfig((config) => {
config.header = Object.assign({
Accept: 'application/json',
'app-cli-os': systemInfo.platform,
- 'app-cli-version': systemInfo.appVersionCode
+ // 'app-cli-version': systemInfo.appVersionCode
+ 'app-cli-version': import.meta.env.VITE_APP_VERSION_CODE
}, config.header);
/* 设置全局配置 */
config.validateStatus = (statusCode) => {
@@ -58,6 +59,11 @@ http.interceptors.response.use(async (response) => {
url: '/pages/login/index'
})
return Promise.reject(response)
+ } else if (statusCode === 404) {
+ uni.redirectTo({
+ url: `/pages/notfound/index?msg=${data.message}`,
+ })
+ return Promise.reject(response)
}
uni.showToast({
title: data.message || '服务器错误',
@@ -77,7 +83,7 @@ http.interceptors.response.use(async (response) => {
}
return response.data;
}, (error) => {
- console.log(error);
+
uni.showToast({
title: error.errMsg,
icon: 'none'