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 | 87 ++++++++++++++++++++++++++-----------------
1 files changed, 52 insertions(+), 35 deletions(-)
diff --git a/pages/actionChange/workOrderDetails/index.vue b/pages/actionChange/workOrderDetails/index.vue
index 6071eca..8db8670 100644
--- a/pages/actionChange/workOrderDetails/index.vue
+++ b/pages/actionChange/workOrderDetails/index.vue
@@ -59,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()
--
Gitblit v1.8.0