From 874ae825083ee5576c6e6cacc7cb4bba15c0077a Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Sat, 14 Sep 2024 10:36:53 +0800
Subject: [PATCH] feat: 对接网格单点登录
---
gz-customerSystem/src/views/register/matterDetail/index.jsx | 24 ++++++++++++++----------
gz-customerSystem/src/components/Layout/index.jsx | 14 +++++++-------
gz-customerSystem/src/views/register/handleFeedback/index.jsx | 1 -
gz-customerSystem/src/api/appUrl.js | 4 ++--
4 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/gz-customerSystem/src/api/appUrl.js b/gz-customerSystem/src/api/appUrl.js
index 96074c9..b66a8f2 100644
--- a/gz-customerSystem/src/api/appUrl.js
+++ b/gz-customerSystem/src/api/appUrl.js
@@ -10,11 +10,11 @@
export const debug = {
// web服务
// baseUrl: 'http://gz.hugeinfo.com.cn',
- baseUrl: "http://6vynrg.natappfree.cc",
+ baseUrl: "http://4gg4nv.natappfree.cc",
// baseUrl: 'http://mdqgnh.natappfree.cc',
// 附件服务
- fileUrl: "http://6vynrg.natappfree.cc",
+ fileUrl: "http://4gg4nv.natappfree.cc",
// fileUrl: 'http://gz.hugeinfo.com.cn',
// 文件查看url 后面接附件编号
diff --git a/gz-customerSystem/src/components/Layout/index.jsx b/gz-customerSystem/src/components/Layout/index.jsx
index 92aec73..36eca5f 100644
--- a/gz-customerSystem/src/components/Layout/index.jsx
+++ b/gz-customerSystem/src/components/Layout/index.jsx
@@ -117,20 +117,20 @@
token
})
if (res.type) {
- setGridStatus(true)
- $$.setSessionStorage('gridToken', '')
+ $$.clearSessionStorage();
$$.setSessionStorage('customerSystemToken', res.data?.token);
$$.setLocal('customerSystemUser', res.data || {});
let ctUseroleList = res.data?.ctUseroleList || [];
+ console.log(ctUseroleList);
const roleId = ctUseroleList[0]?.roleId
const roleName = ctUseroleList[0]?.roleName
const roleCode = ctUseroleList[0]?.roleCode
$$.setSessionStorage('role', { roleId: roleId, roleName: roleName });
setRoleActive({ id: roleId, roleName: roleName, powerMap: {} });
- const res = await switchRoleApi({ roleCode: roleCode });
- if (res.type) {
- $$.setSessionStorage('customerSystemToken', res.data);
- navigate('/mediate/visit/visitWorkBench');
+ const result = await switchRoleApi({ roleCode: roleCode });
+ if (result.type) {
+ $$.setSessionStorage('customerSystemToken', result.data);
+ setGridStatus(true)
}
}
}
@@ -207,7 +207,7 @@
getRolePower(roleActive.id, roleActive.roleName);
}
}, [roleActive.id]);
-
+console.log(gridStatus);
return (
<>
<Header
diff --git a/gz-customerSystem/src/views/register/handleFeedback/index.jsx b/gz-customerSystem/src/views/register/handleFeedback/index.jsx
index 64d4905..fd3ac85 100644
--- a/gz-customerSystem/src/views/register/handleFeedback/index.jsx
+++ b/gz-customerSystem/src/views/register/handleFeedback/index.jsx
@@ -141,7 +141,6 @@
const getCaseInfo = async (id) => {
const res = await getCaseInfoApi(id)
if (res.type) {
- console.log(res, 'res')
let caseDes = res.data.caseDes;
let caseClaim = res.data.caseClaim;
setCaseDetailAi(caseDes)
diff --git a/gz-customerSystem/src/views/register/matterDetail/index.jsx b/gz-customerSystem/src/views/register/matterDetail/index.jsx
index 3b5594e..84efe13 100644
--- a/gz-customerSystem/src/views/register/matterDetail/index.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/index.jsx
@@ -29,7 +29,7 @@
const partyList = data.personList.concat(data.agentList)
setInfoData({
...data,
- questionName: data.queProvName === null ? '-' : data.queProvName + '/' + data.queCityName + '/' + data.queAreaName + '/' + data.queRoadName,
+ questionName: data.queProvName === null ? '-' : data.queCityName + '/' + data.queAreaName + '/' + data.queRoadName,
caseType: data.caseTypeFirstName === null ? '-' : data.caseTypeFirstName + '/' + data.caseTypeName
})
setFakeData(partyList.map(item => {
@@ -39,16 +39,20 @@
if (fileInfoList && fileInfoList.length != 0) {
fileInfoList.forEach(item => {
if (item.ownerType == '22_00018-202' || item.ownerType == '22_00018-203') {
- file.push({
- name: item.fileList[0].trueName,
- uid: item.fileList[0].id,
- })
+ item.fileList.forEach(res => {
+ file.push({
+ ...res,
+ uid: res.id,
+ })
+ })
}
if (item.ownerType == '22_00018-204' || item.ownerType == '22_00018-207') {
- file1.push({
- name: item.fileList[0].trueName,
- uid: item.fileList[0].id,
- })
+ item.fileList.forEach(res => {
+ file1.push({
+ ...res,
+ uid: res.id,
+ })
+ })
}
})
}
@@ -57,7 +61,7 @@
file,
file1
}
- }))
+ }) || [])
}
}
--
Gitblit v1.8.0