bug修复
This commit is contained in:
parent
02cccce830
commit
fee3d8f842
|
|
@ -208,23 +208,26 @@ const toggleForm = () => {
|
||||||
|
|
||||||
const type = ref(1)
|
const type = ref(1)
|
||||||
|
|
||||||
const userId = uni.getStorageSync('id')
|
const userId = ref(uni.getStorageSync('id') || '')
|
||||||
const origin = window.location.href
|
const origin = window.location.href
|
||||||
const isLoaded = ref(false) // 新增标志位
|
|
||||||
onLoad(async(options) => {
|
|
||||||
try {
|
|
||||||
if (origin.indexOf('params') != -1) {
|
|
||||||
queryParams.value = JSON.parse(options.params)
|
|
||||||
auditingParams.value.taskId = queryParams.value.taskId
|
|
||||||
type.value = queryParams.value.type
|
|
||||||
} else { // 工单跳转
|
|
||||||
const urlParams = new URLSearchParams(origin);
|
|
||||||
queryParams.value.taskId = urlParams.get('taskId');
|
|
||||||
queryParams.value.id = urlParams.get('id');
|
|
||||||
auditingParams.value.taskId = urlParams.get('taskId')
|
|
||||||
const ticketMatch = origin.match(/ticket=([^&]*)/);
|
|
||||||
const ticket = ticketMatch ? ticketMatch[1] : '';
|
|
||||||
|
|
||||||
|
onLoad(async(options) => {
|
||||||
|
if (origin.indexOf('params') != -1) {
|
||||||
|
queryParams.value = JSON.parse(options.params)
|
||||||
|
auditingParams.value.taskId = queryParams.value.taskId
|
||||||
|
type.value = queryParams.value.type
|
||||||
|
}else{ //工单跳转
|
||||||
|
const urlParams = new URLSearchParams(origin);
|
||||||
|
queryParams.value.taskId = urlParams.get('taskId');
|
||||||
|
queryParams.value.id = urlParams.get('id');
|
||||||
|
auditingParams.value.taskId =urlParams.get('taskId')
|
||||||
|
const ticketMatch = origin.match(/ticket=([^&]*)/);
|
||||||
|
const ticket = ticketMatch ? ticketMatch[1] : '';
|
||||||
|
// uni.showModal({
|
||||||
|
// title: '当前页面路径',
|
||||||
|
// content: ticket,
|
||||||
|
// showCancel: false
|
||||||
|
// })
|
||||||
const { data: result } = await iwsLoginAPI({
|
const { data: result } = await iwsLoginAPI({
|
||||||
ticket: ticket,
|
ticket: ticket,
|
||||||
sysType: 1,
|
sysType: 1,
|
||||||
|
|
@ -234,26 +237,27 @@ onLoad(async(options) => {
|
||||||
// 2 . 获取用户信息并存储
|
// 2 . 获取用户信息并存储
|
||||||
const res = await getUserInfoAPI()
|
const res = await getUserInfoAPI()
|
||||||
memberStore.setUserInfo(res.user)
|
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)
|
uni.setStorageSync('id', res.user.userId)
|
||||||
userId.value = res.user.userId
|
userId.value = res.user.userId
|
||||||
uni.setStorageSync('deptName', res.user?.dept?.deptName)
|
uni.setStorageSync('deptName', res.user?.dept?.deptName)
|
||||||
uni.setStorageSync('urlPermissions', res.urlPermissions ? res.urlPermissions : [])
|
uni.setStorageSync('urlPermissions',res.urlPermissions?res.urlPermissions:[])
|
||||||
}
|
|
||||||
} catch (error) {
|
// setTimeout(() => {
|
||||||
console.error('登录或获取用户信息失败:', error)
|
// uni.switchTab({
|
||||||
uni.showToast({ title: '登录失败,请重试', icon: 'none' })
|
// url: '/pages/picking/details',
|
||||||
} finally {
|
// })
|
||||||
isLoaded.value = true // 标记加载完成
|
// }, 500)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
if (isLoaded.value) {
|
console.log(queryParams.value)
|
||||||
console.log(queryParams.value)
|
// getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||||
// getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
getReviewInfo(queryParams.value.id)
|
||||||
getReviewInfo(queryParams.value.id)
|
fetchAuditInfo()
|
||||||
fetchAuditInfo()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
// 获取详情列表
|
// 获取详情列表
|
||||||
const getReviewInfo = async (id) => {
|
const getReviewInfo = async (id) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue