工单bug修复
This commit is contained in:
parent
fee3d8f842
commit
bab932cdbe
|
|
@ -216,49 +216,56 @@ onLoad(async(options) => {
|
|||
queryParams.value = JSON.parse(options.params)
|
||||
auditingParams.value.taskId = queryParams.value.taskId
|
||||
type.value = queryParams.value.type
|
||||
}else{ //工单跳转
|
||||
// 直接执行后续操作
|
||||
initPageData();
|
||||
} else { //工单跳转
|
||||
const urlParams = new URLSearchParams(origin);
|
||||
queryParams.value.taskId = urlParams.get('taskId');
|
||||
queryParams.value.id = urlParams.get('id');
|
||||
auditingParams.value.taskId =urlParams.get('taskId')
|
||||
auditingParams.value.taskId = urlParams.get('taskId')
|
||||
const ticketMatch = origin.match(/ticket=([^&]*)/);
|
||||
const ticket = ticketMatch ? ticketMatch[1] : '';
|
||||
// uni.showModal({
|
||||
// title: '当前页面路径',
|
||||
// content: ticket,
|
||||
// showCancel: false
|
||||
// })
|
||||
|
||||
try {
|
||||
const { data: result } = await iwsLoginAPI({
|
||||
ticket: ticket,
|
||||
sysType: 1,
|
||||
})
|
||||
// 1. 获取 token 并存储
|
||||
memberStore.setToken(result.access_token)
|
||||
// 2 . 获取用户信息并存储
|
||||
// 1. 获取token并存储
|
||||
await memberStore.setToken(result.access_token)
|
||||
// 2. 获取用户信息并存储
|
||||
const res = await getUserInfoAPI()
|
||||
memberStore.setUserInfo(res.user)
|
||||
// uni.showToast({ title: '登录成功!', icon: 'none' })
|
||||
// uni.setStorageSync('username', loginForm.username)
|
||||
// uni.setStorageSync('password', loginForm.password)
|
||||
|
||||
uni.setStorageSync('id', res.user.userId)
|
||||
userId.value = res.user.userId
|
||||
uni.setStorageSync('deptName', res.user?.dept?.deptName)
|
||||
uni.setStorageSync('urlPermissions',res.urlPermissions?res.urlPermissions:[])
|
||||
|
||||
// setTimeout(() => {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/picking/details',
|
||||
// })
|
||||
// }, 500)
|
||||
uni.setStorageSync('urlPermissions', res.urlPermissions ? res.urlPermissions : [])
|
||||
|
||||
// 登录完成后执行后续操作
|
||||
initPageData();
|
||||
} catch (error) {
|
||||
console.error('登录失败:', error)
|
||||
uni.showToast({ title: '登录失败,请重试', icon: 'none' })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
console.log(queryParams.value)
|
||||
// getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
const initPageData = () => {
|
||||
console.log(queryParams.value)
|
||||
getReviewInfo(queryParams.value.id)
|
||||
fetchAuditInfo()
|
||||
})
|
||||
}
|
||||
|
||||
// 移除onShow中的重复逻辑,或保留作为刷新时的处理
|
||||
onShow(() => {
|
||||
// 可以留空或处理页面重新显示时的逻辑
|
||||
})
|
||||
// onShow(() => {
|
||||
// console.log(queryParams.value)
|
||||
// // getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
// getReviewInfo(queryParams.value.id)
|
||||
// fetchAuditInfo()
|
||||
// })
|
||||
// 获取详情列表
|
||||
const getReviewInfo = async (id) => {
|
||||
console.log("yyyyyyyyyy",id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue