From 9c3961f513cb548c129dd911c1eb92ec21bb703c Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 18 Mar 2024 15:01:38 +0800
Subject: [PATCH] fix: 分享详情页打开未登录跳转
---
pages/actionChange/workOrderDetails/index.vue | 93 ++++++++++++++++++++++++++++------------------
1 files changed, 57 insertions(+), 36 deletions(-)
diff --git a/pages/actionChange/workOrderDetails/index.vue b/pages/actionChange/workOrderDetails/index.vue
index fec6ade..8db8670 100644
--- a/pages/actionChange/workOrderDetails/index.vue
+++ b/pages/actionChange/workOrderDetails/index.vue
@@ -1,5 +1,9 @@
<template>
<view class="mainContent">
+ <u-sticky>
+ <u-alert v-if="basicInfor.invalidReason" :title="`���������:${basicInfor.invalidReason}`" type="warning"
+ :description="description"></u-alert>
+ </u-sticky>
<basicInfor :basic-infor="basicInfor" v-if="basicInfor.unitId" />
<rectificationInfor ref="rectificationInfor" :basic-infor="basicInfor"
v-if="!(pageState === 'view' && basicInfor.state === 20)&&isShow" />
@@ -55,43 +59,60 @@
async mounted() {
await this.$onLaunched
//������������������
- this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null')
+ this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || null)
console.log('������������������������', this.userInfor)
- if (this.option.type === 'share' && this.userInfor) {
- let params = {
- allocationNum: this.basicInfor.allocationNum,
- userId: this.userInfor.userId
- }
- this.$http.httpGet('/allocationApp/authority', params).then(res => {
- console.log('������������������', res)
- if (res.data.code === 3) {
- uni.showModal({
- content: '���������������������������������������������',
- showCancel: false,
- confirmText: '������',
- success: res => {
- if (res.confirm) {
- uni.reLaunch({
- url: '/pages/index/index',
- })
- }
- },
- })
- } else if (res.data.code === 1) {
- // ������������
- this.basicInfor.pageState = 'edit'
- this.basicInfor.stateName = res.data.name
- this.getData()
- } else if (res.data.code === 2) {
- // ���������
- this.basicInfor.pageState = 'view'
- this.basicInfor.stateName = res.data.name
- this.getData()
+ if (this.option.type === 'share') {
+ if (this.userInfor) {
+ let params = {
+ allocationNum: this.basicInfor.allocationNum,
+ userId: this.userInfor.userId
}
- }).catch(errors => {
- console.log('���������������������', errors)
- console.log('���������������������params', params)
- })
+ this.$http.httpGet('/allocationApp/authority', params).then(res => {
+ console.log('������������������', res)
+ if (res.data.code === 3) {
+ uni.showModal({
+ content: '���������������������������������������������',
+ showCancel: false,
+ confirmText: '������',
+ success: res => {
+ if (res.confirm) {
+ uni.reLaunch({
+ url: '/pages/index/index',
+ })
+ }
+ },
+ })
+ } else if (res.data.code === 1) {
+ // ������������
+ this.basicInfor.pageState = 'edit'
+ this.basicInfor.stateName = res.data.name
+ this.getData()
+ } else if (res.data.code === 2) {
+ // ���������
+ this.basicInfor.pageState = 'view'
+ this.basicInfor.stateName = res.data.name
+ this.getData()
+ }
+ }).catch(errors => {
+ console.log('���������������������', errors)
+ console.log('���������������������params', params)
+ })
+ } else {
+ uni.showModal({
+ title: '���������',
+ content: '������������������������������������������',
+ showCancel: false,
+ confirmText: '������',
+ success: res => {
+ if (res.confirm) {
+ uni.reLaunch({
+ url: '/pages/login/login',
+ })
+ }
+ },
+ })
+ this.$isResolve()
+ }
} else {
this.isShow = true
this.getData()
@@ -108,7 +129,7 @@
}
console.log('this.basicInfor123', this.basicInfor)
let time = this.basicInfor.time.slice(5)
- this.share.title = `${this.basicInfor.escalationUnitName}-${time}������������`
+ this.share.title = `${this.basicInfor.unitName}-${time}������������`
this.show = false
this.isShow = true
})
--
Gitblit v1.8.0