diff --git a/src/api/parent.ts b/src/api/parent.ts index d351169..b7bfd47 100644 --- a/src/api/parent.ts +++ b/src/api/parent.ts @@ -23,6 +23,8 @@ export interface ParentBindChildStudent { export interface ParentBindChildItem { id?: number; + adminFlag?: number; + leadFlag?: number; bindFlag?: number; bindTime?: string; identityType?: number; @@ -90,6 +92,14 @@ export const manualBindChild = (childAcc: string) => data: `childAcc=${encodeURIComponent(childAcc.trim())}`, }); +/** 解绑家长与孩子 */ +export const unbindParentChild = (data: { parentId: string | number; childId: string | number }) => + request({ + url: '/parentBindChild/unBound', + method: 'POST', + data, + }); + export interface WrongKpointRatioItem { errorCount?: number; kpointId?: number; @@ -337,3 +347,34 @@ export const parentBindApply = (params: { data: { childDto, deviceDto }, }); }; + +export interface ParentBindApplyItem { + id?: string | number; + createTime?: string; + initiatingUserPhone?: string; + initiatingUserAvatar?: string; + childUserName?: string; + childUserAvatar?: string; + simSerialNumber?: string; + identityType?: number; + [key: string]: any; +} + +/** 当前家长待处理绑定申请 */ +export const getParentBindApplies = () => + request({ + url: '/parentBind/applyInfoList', + method: 'GET', + }); + +/** 管理员审批绑定申请 */ +export const approveParentBindApply = (data: { + id: string | number; + approvalFlag: boolean; + leadFlag?: number; +}) => + request({ + url: '/parentBind/admin/approval', + method: 'POST', + data, + }); diff --git a/src/pages/parent/home/index.vue b/src/pages/parent/home/index.vue index ff0ca1e..d534da9 100644 --- a/src/pages/parent/home/index.vue +++ b/src/pages/parent/home/index.vue @@ -52,13 +52,13 @@ --> - + @@ -71,7 +71,7 @@ import { useParentStore } from '@/state/modules/parent'; import { useUserStore } from '@/state/modules/user'; import ParentCard from '../components/ParentCard.vue'; import ParentPage from '../components/ParentPage.vue'; -import type { GradeBand, SubjectTrend } from '../utils/data'; +import { quickActions, type GradeBand, type QuickAction, type SubjectTrend } from '../utils/data'; const DEFAULT_AVATAR = 'https://xxl-1313840333.cos.ap-guangzhou.myqcloud.com/urm/logo.png'; @@ -175,6 +175,25 @@ const trendLabel = (item: SubjectTrend) => { }; return item.status ? map[item.status] : ''; }; + +const showComingSoon = (name: string) => { + uni.showToast({ + title: `${name}建设中`, + icon: 'none', + }); +}; + +const handleQuickAction = (item: QuickAction) => { + if (item.title === '学情追踪') { + uni.navigateTo({ url: '/pages/parent/analysis/index' }); + return; + } + if (item.title === '错题练习') { + uni.navigateTo({ url: '/pages/wrong/index' }); + return; + } + showComingSoon(item.title); +};