维修员、材料员、库管员强制维护签名

This commit is contained in:
hayu 2025-10-13 18:42:29 +08:00
parent 78bd4f2941
commit 5900668fd9
1 changed files with 45 additions and 3 deletions

View File

@ -95,12 +95,54 @@
<script setup> <script setup>
import { ref,computed } from 'vue' import { ref,computed } from 'vue'
import { onShow,onLoad } from '@dcloudio/uni-app' import { onShow,onLoad } from '@dcloudio/uni-app'
import {getSignatureByUser} from "../../services";
const urlPermissions = ref([]) const urlPermissions = ref([])
const userNeedsSignature = ref(false); //
onShow((options) => {
urlPermissions.value = uni.getStorageSync('urlPermissions') onShow(async () => {
}) urlPermissions.value = uni.getStorageSync('urlPermissions');
//
const res = await checkElectronicSignature(); //
if (res === false) {
userNeedsSignature.value = true;
//
uni.showModal({
title: '提示',
content: '您需要维护电子签名才能操作系统,是否立即维护',
showCancel: false,
success: (result) => {
if (result.confirm) {
//
uni.navigateTo({
url: '/pages/my/signature' //
});
}
}
});
} else {
userNeedsSignature.value = false;
}
});
const checkElectronicSignature = async () => {
try {
const res = await getSignatureByUser()
if (res.msg==="1"){
return true
} else if (res.msg==="0"){
return false
} else {
await uni.showToast({title: '签名获取失败', icon: 'none'})
return true; // true
}
} catch (error) {
console.error('请求失败', error);
await uni.showToast({title: '签名获取失败', icon: 'none'})
return true; // true
}
}
// //
const newInfoList = ref([ const newInfoList = ref([