From 9119223c80d6c69f2fcdd468d749555da0b57994 Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Fri, 4 Aug 2023 09:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=83=A8=E9=97=A8=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 ++-- src/pages/manage/depAdmin/depAdmin.tsx | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 692d973..3bfcb50 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -TARO_APP_API=https://yjx.dev.yaojiankang.top -#TARO_APP_API=https://playedu.yaojiankang.top +#TARO_APP_API=https://yjx.dev.yaojiankang.top +TARO_APP_API=https://playedu.yaojiankang.top TARO_APP_LGOIN=true diff --git a/src/pages/manage/depAdmin/depAdmin.tsx b/src/pages/manage/depAdmin/depAdmin.tsx index 1c5b055..afd5fcb 100644 --- a/src/pages/manage/depAdmin/depAdmin.tsx +++ b/src/pages/manage/depAdmin/depAdmin.tsx @@ -8,6 +8,7 @@ import PopPut from "@/components/popPut/popPut"; import folder from '@/static/img/folder.png' import {getCurrentInstance} from "@tarojs/runtime"; import ShowModel from "@/components/showModel/showModel"; +import Empty from "@/components/empty/empty"; const DepAdmin: FC = () => { @@ -71,7 +72,7 @@ const DepAdmin: FC = () => { Taro.navigateTo({url: `/pages/manage/depCur/depCur?id=${item.id}`}) break case 1: - Taro.navigateTo({url: `/pages/manage/depAdmin/depAdmin?dep_id=${item.id}&name=${item.name}&id=${item.id}`}) + Taro.navigateTo({url: `/pages/manage/depAdmin/depAdmin?dep_id=${item.id}&name=${encodeURI(item.name)}&id=${item.id}`}) break case 2: showPop(item) @@ -186,17 +187,19 @@ const DepAdmin: FC = () => { } } - Taro.useDidShow(getData) + // Taro.useDidShow() useEffect(() => { + getData() Taro.setNavigationBarTitle({ - title: params.name ?? '部门管理' + title: decodeURI(params.name) || '部门管理' }) - }) + }, []) return ( <> + {manages.map(d => { content={['学员', '管理员', '超级管理员'][d.role_type]} />)} + {!manages.length && !users.length && } + 添加学员