From 81c2f774340f605474e3547df4e2a49d86d5266f Mon Sep 17 00:00:00 2001 From: MJ Date: Wed, 6 Aug 2025 23:44:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=89=8B=E5=8A=A8=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=AD=A9=E5=AD=90=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 11 +- pnpm-lock.yaml | 9 +- src/api/modules/bindDevice.ts | 24 +-- src/components/Tabbar/index.vue | 4 +- src/components/mjui/mj-dialog/mj-dialog.vue | 69 +++++++ src/components/mjui/mj-empty/mj-empty.vue | 2 +- src/components/mjui/mj-page/mj-page.vue | 12 +- src/pages.json | 6 - src/pages/academicReport/index.vue | 26 +-- src/pages/applicationManagement/index.vue | 28 +-- .../home/DesktopPreview/historyScreenShot.vue | 55 +++-- src/pages/home/LockScreen/index.vue | 36 ++-- src/pages/home/index.vue | 168 ++++++++++------ src/pages/mine/aboutMine.vue | 190 +++++++++--------- src/pages/mine/bindApply/index.vue | 84 ++++---- src/pages/mine/details/bindPatriarch.vue | 93 +++++---- src/pages/mine/index.vue | 27 +-- src/pages/mine/patriarchCard.vue | 32 +-- src/store/badge.ts | 26 +++ src/store/bindApply.ts | 12 +- src/utils/hud.ts | 22 +- 21 files changed, 544 insertions(+), 392 deletions(-) create mode 100644 src/components/mjui/mj-dialog/mj-dialog.vue create mode 100644 src/store/badge.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 24402b9..39be7d4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -48,5 +48,14 @@ "src/uni_modules/uni-search-bar/components/uni-search-bar/i18n", "src/uni_modules/z-paging/components/z-paging/i18n" ], - "cSpell.words": ["iconfont", "persistedstate", "pinia", "VITE", "Wechat", "Weixin", "xuexiaole"] + "cSpell.words": [ + "dcloudio", + "iconfont", + "persistedstate", + "pinia", + "VITE", + "Wechat", + "Weixin", + "xuexiaole" + ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 156886d..ab3dc09 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1926,6 +1926,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + address@1.2.2: resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} engines: {node: '>= 10.0.0'} @@ -7435,6 +7440,8 @@ snapshots: acorn@8.11.3: {} + acorn@8.15.0: {} + address@1.2.2: {} agent-base@6.0.2: @@ -9309,7 +9316,7 @@ snapshots: jsdom@16.7.0: dependencies: abab: 2.0.6 - acorn: 8.11.3 + acorn: 8.15.0 acorn-globals: 6.0.0 cssom: 0.4.4 cssstyle: 2.3.0 diff --git a/src/api/modules/bindDevice.ts b/src/api/modules/bindDevice.ts index d977476..f742b09 100644 --- a/src/api/modules/bindDevice.ts +++ b/src/api/modules/bindDevice.ts @@ -1,50 +1,50 @@ -import { http } from '../request/request'; +import { http } from '../request/request' /** * 当前登录用户的绑定信息 * @param params 请求参数 */ -export const getCurInfo = async (params: any) => - await http.get('/parentBind/curInfo', params); +export const getCurInfo = async (params: any) => await http.get('/parentBind/curInfo', params) /** * 家长绑定管理员 * @param data 请求参数 */ -export const parentBindAdmin = async (data: any) => - await http.post('/parentBind/admin', data); +export const parentBindAdmin = async (data: any) => await http.post('/parentBind/admin', data) /** * 家长申请绑定 * @param data 请求参数 */ -export const parentBindApply = async (data: any) => - await http.post('/parentBind/apply', data); +export const parentBindApply = async (data: any) => await http.post('/parentBind/apply', data) + +// 手动输入账号绑定孩子 +export const manualBindApi = async (childAcc: any) => + await http.postForm('/parentBind/familyTeacherBindAcc', { childAcc }) /** * -设备当前管理员信息 * @param params 请求参数 */ -export const adminInfo = async (params: any) => - await http.get('/parentBind/adminInfo', params); +export const adminInfo = async (params: any) => await http.get('/parentBind/adminInfo', params) /** * -家长申请绑定信息 * @param params 请求参数 */ export const applyInfo = async (params: any) => - await http.get('/parentBind/apply/info', params); + await http.get('/parentBind/apply/info', params) /** * 管理员审批 * @param data 请求参数 */ export const adminApproval = async (data: any) => - await http.post('/parentBind/admin/approval', data); + await http.post('/parentBind/admin/approval', data) /** * 时间管控保存 * @param data 请求参数 */ export const deviceTimeControl = async (data: any) => - await http.post('/deviceTimeControl', data); + await http.post('/deviceTimeControl', data) diff --git a/src/components/Tabbar/index.vue b/src/components/Tabbar/index.vue index 0fb8c8f..d6425ad 100644 --- a/src/components/Tabbar/index.vue +++ b/src/components/Tabbar/index.vue @@ -50,8 +50,8 @@ function switchTab(item, index) { onMounted(async () => { currentIndex.value = props.selectedIndex // 家长 - await getApplyBindInfoList() - notice.value = db.get('applyBindMsg') + notice.value = await getApplyBindInfoList() + list.value = [ { pagePath: '/pages/home/index', diff --git a/src/components/mjui/mj-dialog/mj-dialog.vue b/src/components/mjui/mj-dialog/mj-dialog.vue new file mode 100644 index 0000000..a140d43 --- /dev/null +++ b/src/components/mjui/mj-dialog/mj-dialog.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/src/components/mjui/mj-empty/mj-empty.vue b/src/components/mjui/mj-empty/mj-empty.vue index 20300f1..961db7d 100644 --- a/src/components/mjui/mj-empty/mj-empty.vue +++ b/src/components/mjui/mj-empty/mj-empty.vue @@ -3,7 +3,7 @@ defineOptions({ name: 'mj-empty' }) diff --git a/src/pages/mine/aboutMine.vue b/src/pages/mine/aboutMine.vue index 2d24f8a..aa1e5bd 100644 --- a/src/pages/mine/aboutMine.vue +++ b/src/pages/mine/aboutMine.vue @@ -1,143 +1,140 @@