diff --git a/mes-ui/uni-app/src/App.vue b/mes-ui/uni-app/src/App.vue index a1be8ffb..1733bfb2 100644 --- a/mes-ui/uni-app/src/App.vue +++ b/mes-ui/uni-app/src/App.vue @@ -1,17 +1,44 @@ diff --git a/mes-ui/uni-app/src/pages/index/styles/category.scss b/mes-ui/uni-app/src/pages/index/styles/category.scss index c3e202b4..2dd55a73 100644 --- a/mes-ui/uni-app/src/pages/index/styles/category.scss +++ b/mes-ui/uni-app/src/pages/index/styles/category.scss @@ -4,6 +4,7 @@ border-radius: 4rpx; display: flex; flex-wrap: wrap; + min-height: 80vh; .module { width: 100%; margin: 10rpx 0; diff --git a/mes-ui/uni-app/src/pages/index/styles/category.wxss b/mes-ui/uni-app/src/pages/index/styles/category.wxss index 5e8d9f90..3010f3b8 100644 --- a/mes-ui/uni-app/src/pages/index/styles/category.wxss +++ b/mes-ui/uni-app/src/pages/index/styles/category.wxss @@ -4,6 +4,7 @@ border-radius: 4rpx; display: flex; flex-wrap: wrap; + min-height: 80vh; } .category .module { diff --git a/mes-ui/uni-app/src/pages/productionReport/components/dataItem.vue b/mes-ui/uni-app/src/pages/productionReport/components/dataItem.vue index ce2968d2..126d6937 100644 --- a/mes-ui/uni-app/src/pages/productionReport/components/dataItem.vue +++ b/mes-ui/uni-app/src/pages/productionReport/components/dataItem.vue @@ -51,7 +51,7 @@ const getListData = async () => { // 数组追加 dataList.value.push(...data.list) // 分页条件 - if (queryParams.pageNo < data.total) { + if (queryParams.pageNo < data.totalPages) { // 页码累加 queryParams.pageNo++ } else { diff --git a/mes-ui/uni-app/src/pages/productionReport/productionReport-detail.vue b/mes-ui/uni-app/src/pages/productionReport/productionReport-detail.vue index 61564a27..3f0c7ef4 100644 --- a/mes-ui/uni-app/src/pages/productionReport/productionReport-detail.vue +++ b/mes-ui/uni-app/src/pages/productionReport/productionReport-detail.vue @@ -318,7 +318,7 @@ const handleStop = async () => { .product-status { width: 140rpx; - border-raduis: 10rpx; + border-radius: 10rpx; text-align: center; padding: 8rpx 12rpx; &.had { diff --git a/mes-ui/uni-app/src/pages/unqualifiedNotification/components/dataItem.vue b/mes-ui/uni-app/src/pages/unqualifiedNotification/components/dataItem.vue index 84e4c8b5..d83766f3 100644 --- a/mes-ui/uni-app/src/pages/unqualifiedNotification/components/dataItem.vue +++ b/mes-ui/uni-app/src/pages/unqualifiedNotification/components/dataItem.vue @@ -56,7 +56,7 @@ const getListData = async () => { // 数组追加 dataList.value.push(...data.list) // 分页条件 - if (queryParams.pageNo < data.total) { + if (queryParams.pageNo < data.totalPages) { // 页码累加 queryParams.pageNo++ } else { diff --git a/mes-ui/uni-app/src/services/appUpdate.ts b/mes-ui/uni-app/src/services/appUpdate.ts new file mode 100644 index 00000000..4e27e662 --- /dev/null +++ b/mes-ui/uni-app/src/services/appUpdate.ts @@ -0,0 +1,16 @@ +/* + * @Author: 王文杰 + * @Date: 2024-01-04 12:54:56 + * @LastEditors: jevononlie 728254585@qq.com + * @LastEditTime: 2024-05-11 09:11:41 + * @FilePath: /app-nx-personal/src/services/home.ts + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ +import { http } from '@/utils/http' + +export const appUpdateApi = () => { + return http({ + method: 'GET', + url: '/biz/app/latest', + }) +} diff --git a/mes-ui/uni-app/src/services/assembleReport.ts b/mes-ui/uni-app/src/services/assembleReport.ts index 164b86f9..233a2674 100644 --- a/mes-ui/uni-app/src/services/assembleReport.ts +++ b/mes-ui/uni-app/src/services/assembleReport.ts @@ -2,7 +2,7 @@ * @Author: 王文杰 * @Date: 2024-01-04 12:54:56 * @LastEditors: jevononlie 728254585@qq.com - * @LastEditTime: 2024-05-10 16:59:03 + * @LastEditTime: 2024-05-11 17:50:07 * @FilePath: /app-nx-personal/src/services/home.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -23,3 +23,11 @@ export const postSubmitAssembleReportApi = (data: Object) => { data, }) } +// 报工记录分页查询 +export const getListAssembleReportApi = (data: Object) => { + return http({ + method: 'GET', + url: '/biz/task-report/page', + data, + }) +} diff --git a/mes-ui/uni-app/src/static/images/login-hd.png b/mes-ui/uni-app/src/static/images/login-hd.png index d4388771..f6e8fe67 100644 Binary files a/mes-ui/uni-app/src/static/images/login-hd.png and b/mes-ui/uni-app/src/static/images/login-hd.png differ diff --git a/mes-ui/uni-app/src/static/images/login.9.png b/mes-ui/uni-app/src/static/images/login.9.png new file mode 100644 index 00000000..b559fc9a Binary files /dev/null and b/mes-ui/uni-app/src/static/images/login.9.png differ diff --git a/mes-ui/uni-app/src/utils/http.ts b/mes-ui/uni-app/src/utils/http.ts index 7007ffcf..b8585ee5 100644 --- a/mes-ui/uni-app/src/utils/http.ts +++ b/mes-ui/uni-app/src/utils/http.ts @@ -13,7 +13,6 @@ import { useLoginStore } from '@/stores/modules/login' import { serviceDomain } from '@/services/constants' const baseURL = serviceDomain + '/admin-api' -const loginStore = useLoginStore() // 添加拦截器 const httpInterceptor = { // 拦截前触发 @@ -32,9 +31,9 @@ const httpInterceptor = { 'tenant-id': 2, } // 4. 添加 token 请求头标识 - + const userStore = useLoginStore() const storage_token = uni.getStorageSync('storage_loginInfo')?.accessToken - const token = loginStore.userInfo?.accessToken || storage_token + const token = userStore.userInfo?.accessToken || storage_token if (token) { options.header.Authorization = token } @@ -69,8 +68,8 @@ function ajaxError(data) { icon: 'none', complete() { if (data.code === 600 || data.code === 601 || data.code === 602) { - const memberStore = useMemberStore() - memberStore.clearProfile() + const loginStore = useLoginStore() + loginStore.clearProfile() uni.reLaunch({ url: '/pages/login/login' }) @@ -82,6 +81,7 @@ function ajaxError(data) { export const http = (options: UniApp.RequestOptions) => { // 1. 返回 Promise 对象 return new Promise>((resolve, reject) => { + const loginStore = useLoginStore() uni.request({ ...options, // 响应成功 diff --git a/mes-ui/uni-app/src/utils/index.ts b/mes-ui/uni-app/src/utils/index.ts index de065d85..54b31612 100644 --- a/mes-ui/uni-app/src/utils/index.ts +++ b/mes-ui/uni-app/src/utils/index.ts @@ -2,7 +2,7 @@ * @Author: 王文杰 * @Date: 2024-01-04 12:54:56 * @LastEditors: jevononlie 728254585@qq.com - * @LastEditTime: 2024-04-07 09:36:33 + * @LastEditTime: 2024-05-11 09:13:18 * @FilePath: /app-nx-personal/src/utils/index.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -30,40 +30,44 @@ export const formatDate = (datePramas: Date, format = 'YYYY-MM-DD HH:mm:ss') => .replace('mm', minutes) .replace('ss', seconds) } +import { serviceDomain } from '@/services/constants' /** * 微信小程序发布后提醒用户更新版本 * * @return {[type]} [return description] */ export const updateManager = () => { - // const updateManager = uni.getUpdateManager() // 小程序版本更新管理器 - // updateManager.onCheckForUpdate((res) => { - // // 检测新版本后的回调 - // if (res.hasUpdate) { - // // 如果有新版本提醒并进行强制升级 - // uni.showModal({ - // content: '新版本已经准备好,是否重启应用?', - // showCancel: false, - // confirmText: '确定', - // success: (res) => { - // if (res.confirm) { - // updateManager.onUpdateReady((res) => { - // // 新版本下载完成的回调 - // updateManager.applyUpdate() // 强制当前小程序应用上新版本并重启 - // }) + const baseURL = serviceDomain + '/admin-api' + // #ifdef MP-WEIXIN + const updateManager = uni.getUpdateManager() // 小程序版本更新管理器 + updateManager.onCheckForUpdate((res) => { + // 检测新版本后的回调 + if (res.hasUpdate) { + // 如果有新版本提醒并进行强制升级 + uni.showModal({ + content: '新版本已经准备好,是否重启应用?', + showCancel: false, + confirmText: '确定', + success: (res) => { + if (res.confirm) { + updateManager.onUpdateReady((res) => { + // 新版本下载完成的回调 + updateManager.applyUpdate() // 强制当前小程序应用上新版本并重启 + }) - // updateManager.onUpdateFailed((res) => { - // // 新版本下载失败的回调 - // // 新版本下载失败,提示用户删除后通过冷启动重新打开 - // uni.showModal({ - // content: '下载失败,请删除当前小程序后重新打开', - // showCancel: false, - // confirmText: '知道了', - // }) - // }) - // } - // }, - // }) - // } - // }) + updateManager.onUpdateFailed((res) => { + // 新版本下载失败的回调 + // 新版本下载失败,提示用户删除后通过冷启动重新打开 + uni.showModal({ + content: '下载失败,请删除当前小程序后重新打开', + showCancel: false, + confirmText: '知道了', + }) + }) + } + }, + }) + } + }) + // #endif }