From ea506483a1deac69999f082d96e47d4e3421ffe3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Thu, 26 Jun 2025 18:34:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E8=BF=9D=E7=AB=A0bu?=
=?UTF-8?q?g?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/hjm/violation/list.tsx | 16 +++++++-
src/pages/user/components/UserCell.tsx | 55 ++++++++++++++++++--------
src/utils/request.ts | 2 +-
3 files changed, 54 insertions(+), 19 deletions(-)
diff --git a/src/hjm/violation/list.tsx b/src/hjm/violation/list.tsx
index 7ab3e1d..47e72fc 100644
--- a/src/hjm/violation/list.tsx
+++ b/src/hjm/violation/list.tsx
@@ -41,9 +41,21 @@ const List: React.FC = () => {
if (showLoading) setLoading(true)
setRefreshing(true)
- const res = await pageHjmViolation({
+ const where = {
keywords: keywords.trim(),
- })
+ }
+
+ const roleCode = Taro.getStorageSync('RoleCode');
+ if(roleCode == 'kuaidi'){
+ if(Taro.getStorageSync('OrganizationId') == Taro.getStorageSync('OrganizationParentId')){
+ // @ts-ignore
+ where.organizationParentId = Taro.getStorageSync('OrganizationParentId');
+ }else {
+ // @ts-ignore
+ where.organizationId = Taro.getStorageSync('OrganizationId');
+ }
+ }
+ const res = await pageHjmViolation(where)
setList(res?.list || [])
} catch (error) {
diff --git a/src/pages/user/components/UserCell.tsx b/src/pages/user/components/UserCell.tsx
index f0147c8..270d580 100644
--- a/src/pages/user/components/UserCell.tsx
+++ b/src/pages/user/components/UserCell.tsx
@@ -58,22 +58,24 @@ const UserCell = () => {
{
(roleName === 'kuaidi' || roleName == 'zhandian') && (
-
- |
-
- 实名认证审核
-
- }
- align="center"
- extra={}
- onClick={() => {
- navTo('/user/userVerify/admin', true)
- }}
- />
- |
+ <>
+
+
+
+ 实名认证审核
+
+ }
+ align="center"
+ extra={}
+ onClick={() => {
+ navTo('/user/userVerify/admin', true)
+ }}
+ />
+ |
+ >
)
}
{
@@ -156,6 +158,27 @@ const UserCell = () => {
)
}
+ {
+ roleName === 'kuaidi' && (
+
+
+
+ 违章记录
+
+ }
+ align="center"
+ extra={}
+ onClick={() => {
+ navTo('/hjm/violation/list', true)
+ }}
+ />
+ |
+ )
+ }
+
{/**/}
{/* 管理*/}
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 7bbba37..78d155c 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -4,7 +4,7 @@ import {BaseUrl, TenantId} from "@/utils/config";
let baseUrl = BaseUrl
if(process.env.NODE_ENV === 'development'){
- // baseUrl = 'http://localhost:9000/api'
+ baseUrl = 'http://localhost:9000/api'
}
export function request(options:any) {
const token = Taro.getStorageSync('access_token');