feat: 增加小程序更新机制 已付款增加显示供应商名称

This commit is contained in:
admin 2024-09-18 14:29:19 +08:00
parent a2face8d3e
commit 53aa4f85a0
3 changed files with 58 additions and 19 deletions

View File

@ -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) {

View File

@ -4,6 +4,7 @@
<view class="base">
<view>
<view class="supplier"> {{ currentOrder.deviceName || "-" }} </view>
<view style="font-weight: bold;">{{ currentOrder.userName }}</view>
</view>
</view>
<view class="flex-box1">
@ -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;

View File

@ -17,16 +17,50 @@ export const useMemberStore = defineStore(
menusNameList: [],
err: null,
});
const mechanism = ref<any>({
mechanismCode: "",
mechanismName: "",
});
const mechanism = ref<any>({
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;
};