bug修复
This commit is contained in:
parent
02cccce830
commit
fee3d8f842
|
|
@ -208,11 +208,10 @@ const toggleForm = () => {
|
|||
|
||||
const type = ref(1)
|
||||
|
||||
const userId = uni.getStorageSync('id')
|
||||
const userId = ref(uni.getStorageSync('id') || '')
|
||||
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
|
||||
|
|
@ -224,7 +223,11 @@ onLoad(async(options) => {
|
|||
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({
|
||||
ticket: ticket,
|
||||
sysType: 1,
|
||||
|
|
@ -234,26 +237,27 @@ onLoad(async(options) => {
|
|||
// 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:[])
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('登录或获取用户信息失败:', error)
|
||||
uni.showToast({ title: '登录失败,请重试', icon: 'none' })
|
||||
} finally {
|
||||
isLoaded.value = true // 标记加载完成
|
||||
|
||||
// setTimeout(() => {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/picking/details',
|
||||
// })
|
||||
// }, 500)
|
||||
}
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
if (isLoaded.value) {
|
||||
console.log(queryParams.value)
|
||||
// getCodeDetailData(queryParams.value.id,queryParams.value.publishTask,queryParams.value.typeId)//获取详情
|
||||
getReviewInfo(queryParams.value.id)
|
||||
fetchAuditInfo()
|
||||
}
|
||||
})
|
||||
// 获取详情列表
|
||||
const getReviewInfo = async (id) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue