feat: 增加小程序更新机制 已付款增加显示供应商名称
This commit is contained in:
parent
a2face8d3e
commit
53aa4f85a0
|
@ -534,16 +534,16 @@ const handleSelect = (key: string, v: any) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 产品信息
|
// 产品信息
|
||||||
ReceiveProductApi.getAllReProducts().then((res) => {
|
// ReceiveProductApi.getAllReProducts().then((res) => {
|
||||||
if (res.code === 200) {
|
// if (res.code === 200) {
|
||||||
contrlModalParams.product.list = _.map(
|
// contrlModalParams.product.list = _.map(
|
||||||
res.data as any,
|
// res.data as any,
|
||||||
function (item: any) {
|
// function (item: any) {
|
||||||
return { name: item.reProductsName, ...item };
|
// return { name: item.reProductsName, ...item };
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
// 设备信息
|
// 设备信息
|
||||||
DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then((res) => {
|
DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<view class="base">
|
<view class="base">
|
||||||
<view>
|
<view>
|
||||||
<view class="supplier"> {{ currentOrder.deviceName || "-" }} </view>
|
<view class="supplier"> {{ currentOrder.deviceName || "-" }} </view>
|
||||||
|
<view style="font-weight: bold;">{{ currentOrder.userName }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-box1">
|
<view class="flex-box1">
|
||||||
|
@ -271,6 +272,11 @@ if (props.currentOrder) {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.btn {
|
.btn {
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
border: 1px solid #00dcee;
|
border: 1px solid #00dcee;
|
||||||
|
|
|
@ -27,6 +27,40 @@ export const useMemberStore = defineStore(
|
||||||
const setProfile = (val: any) => {
|
const setProfile = (val: any) => {
|
||||||
profile.value = { ...profile.value, ...val };
|
profile.value = { ...profile.value, ...val };
|
||||||
profile.value.menusNameList = _.pluck(val.menusList, "name");
|
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) => {
|
const setErr = (v: any) => {
|
||||||
|
@ -45,11 +79,10 @@ export const useMemberStore = defineStore(
|
||||||
menusNameList: [],
|
menusNameList: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
mechanism.value.mechanismCode = ""
|
mechanism.value.mechanismCode = "";
|
||||||
mechanism.value.mechanismName = ""
|
mechanism.value.mechanismName = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const setMechanism = (v: { mechanismCode: ""; mechanismName: "" }) => {
|
const setMechanism = (v: { mechanismCode: ""; mechanismName: "" }) => {
|
||||||
mechanism.value = v;
|
mechanism.value = v;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue