mo 2 rokov pred
rodič
commit
ce8e5afadf

+ 0 - 0
src/school/attendance/index.tsx


+ 15 - 15
src/school/home/index.tsx

@@ -1,15 +1,15 @@
-import { Button } from 'vant'
-import { defineComponent } from 'vue'
-import styles from './index.module.less'
-
-export default defineComponent({
-  name: 'home',
-  render() {
-    return (
-      <>
-        <div class={styles.title}>标题-管理端</div>
-        <Button>首页</Button>
-      </>
-    )
-  }
-})
+import { Button } from 'vant'
+import { defineComponent } from 'vue'
+import styles from './index.module.less'
+
+export default defineComponent({
+  name: 'school-home',
+  render() {
+    return (
+      <>
+        <div class={styles.title}>标题-管理端</div>
+        <Button>首页</Button>
+      </>
+    )
+  }
+})

+ 2 - 2
src/state.ts

@@ -9,7 +9,7 @@ export const state = reactive({
     status: 'init' as status,
     data: {} as any
   },
-  platformType: 'STUDENT' as 'STUDENT' | 'TEACHER' | 'SCHOOL',
+  platformType: 'SCHOOL' as 'STUDENT' | 'TEACHER' | 'SCHOOL',
   clientId: {
     STUDENT: 'jmedu-student',
     TEACHER: 'jmedu-teacher',
@@ -62,4 +62,4 @@ export const openDefaultWebView = (url?: string, callBack?: any) => {
   } else {
     callBack && callBack()
   }
-}
+}

+ 6 - 9
src/student/coupons/index.tsx

@@ -1,4 +1,4 @@
-import { useEventTracking } from '@/helpers/hooks'
+// import { useEventTracking } from '@/helpers/hooks'
 import request from '@/helpers/request'
 import { state } from '@/state'
 import { Tab, Tabs } from 'vant'
@@ -19,16 +19,15 @@ export default defineComponent({
   async mounted() {
     try {
       // 判断是哪个端
-      const url =
-        state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
+      const url = state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
       const res = await request.get(`${url}/couponInfo/statInfo`)
       const result = res.data || []
-      this.couponCount = result.find(result => result.useState === 'USABLE')
-      console.log(result.find(result => result.useState === 'USABLE'))
+      this.couponCount = result.find((result) => result.useState === 'USABLE')
+      console.log(result.find((result) => result.useState === 'USABLE'))
     } catch {
       // TODO: handle
     }
-    useEventTracking('优惠券')
+    // useEventTracking('优惠券')
   },
   render() {
     return (
@@ -36,9 +35,7 @@ export default defineComponent({
         <Tabs color="#2DC7AA" lineWidth={44} sticky>
           <Tab
             title={`可使用${
-              this.couponCount.total > 0
-                ? '(' + this.couponCount.total + '张)'
-                : ''
+              this.couponCount.total > 0 ? '(' + this.couponCount.total + '张)' : ''
             }`}
           >
             <List />

+ 10 - 10
src/student/coupons/list.tsx

@@ -1,5 +1,5 @@
 import ColResult from '@/components/col-result'
-import { useList } from '@/helpers/hooks'
+// import { useList } from '@/helpers/hooks'
 import request from '@/helpers/request'
 import { state } from '@/state'
 import { List } from 'vant'
@@ -37,15 +37,15 @@ export default defineComponent({
   methods: {
     async getList() {
       try {
-        const result = await useList(`${state.platformApi}/couponInfo/page`, {
-          params: this.params,
-          list: this.list,
-          ...this.listState
-        })
-        const { params, list, ...res } = result
-        this.params = params
-        this.list = list
-        this.listState = res
+        //   const result = await useList(`${state.platformApi}/couponInfo/page`, {
+        //     params: this.params,
+        //     list: this.list,
+        //     ...this.listState
+        //   })
+        //   const { params, list, ...res } = result
+        //   this.params = params
+        //   this.list = list
+        //   this.listState = res
       } catch {
         //
       }