From 53aa4f85a0e61123b296ef4bccf6683dcdec13e3 Mon Sep 17 00:00:00 2001
From: admin <>
Date: Wed, 18 Sep 2024 14:29:19 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=E6=9B=B4=E6=96=B0=E6=9C=BA=E5=88=B6=20=E5=B7=B2?=
=?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=A2=9E=E5=8A=A0=E6=98=BE=E7=A4=BA=E4=BE=9B?=
=?UTF-8?q?=E5=BA=94=E5=95=86=E5=90=8D=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pagesApp/receiveSpl.vue | 20 +++++-----
src/pagesReceive/components/detail.vue | 6 +++
src/store/modules/member.ts | 51 +++++++++++++++++++++-----
3 files changed, 58 insertions(+), 19 deletions(-)
diff --git a/src/pagesApp/receiveSpl.vue b/src/pagesApp/receiveSpl.vue
index c5b233d..8e3c6db 100644
--- a/src/pagesApp/receiveSpl.vue
+++ b/src/pagesApp/receiveSpl.vue
@@ -534,16 +534,16 @@ const handleSelect = (key: string, v: any) => {
}
};
// 产品信息
-ReceiveProductApi.getAllReProducts().then((res) => {
- if (res.code === 200) {
- contrlModalParams.product.list = _.map(
- res.data as any,
- function (item: any) {
- return { name: item.reProductsName, ...item };
- }
- );
- }
-});
+// ReceiveProductApi.getAllReProducts().then((res) => {
+// if (res.code === 200) {
+// contrlModalParams.product.list = _.map(
+// res.data as any,
+// function (item: any) {
+// return { name: item.reProductsName, ...item };
+// }
+// );
+// }
+// });
// 设备信息
DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then((res) => {
if (res.code === 200) {
diff --git a/src/pagesReceive/components/detail.vue b/src/pagesReceive/components/detail.vue
index 9428615..4afe467 100644
--- a/src/pagesReceive/components/detail.vue
+++ b/src/pagesReceive/components/detail.vue
@@ -4,6 +4,7 @@
{{ currentOrder.deviceName || "-" }}
+ {{ currentOrder.userName }}
@@ -271,6 +272,11 @@ if (props.currentOrder) {
font-weight: 400;
font-size: 26rpx;
color: #000000;
+ > view {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ }
.btn {
border-radius: 24rpx;
border: 1px solid #00dcee;
diff --git a/src/store/modules/member.ts b/src/store/modules/member.ts
index 0aa8276..59733a7 100644
--- a/src/store/modules/member.ts
+++ b/src/store/modules/member.ts
@@ -17,16 +17,50 @@ export const useMemberStore = defineStore(
menusNameList: [],
err: null,
});
-
- const mechanism = ref({
- mechanismCode: "",
- mechanismName: "",
- });
+
+ const mechanism = ref({
+ mechanismCode: "",
+ mechanismName: "",
+ });
// 保存会员信息,登录时使用
const setProfile = (val: any) => {
profile.value = { ...profile.value, ...val };
profile.value.menusNameList = _.pluck(val.menusList, "name");
+
+ // 判断微信版本是否兼容小程序更新机制API
+ if (uni.canIUse("getUpdateManager")) {
+ const updateManager = uni.getUpdateManager();
+ updateManager.onCheckForUpdate((res) => {
+ if (res.hasUpdate) {
+ updateManager.onUpdateReady(() => {
+ uni.showModal({
+ title: "更新提示",
+ content: "新版本已更新, 是否应用",
+ success: (res) => {
+ if (res.confirm) {
+ updateManager.applyUpdate();
+ }
+ },
+ });
+ });
+ }
+ });
+
+ updateManager.onUpdateFailed((err) => {
+ uni.showModal({
+ title: "新版本更新提示",
+ content: "请删除当前小程序, 到微信搜索小程序, 重新打开",
+ showCancel: false,
+ });
+ });
+ } else {
+ uni.showModal({
+ title: "温馨提示",
+ content: "当前微信版本过低,无法使用该功能,请升级到最新版本后重试",
+ showCancel: false,
+ });
+ }
};
const setErr = (v: any) => {
@@ -44,12 +78,11 @@ export const useMemberStore = defineStore(
menusList: [],
menusNameList: [],
};
-
- mechanism.value.mechanismCode = ""
- mechanism.value.mechanismName = ""
+
+ mechanism.value.mechanismCode = "";
+ mechanism.value.mechanismName = "";
};
-
const setMechanism = (v: { mechanismCode: ""; mechanismName: "" }) => {
mechanism.value = v;
};