lex 2 rokov pred
rodič
commit
7b76d4da5a

+ 53 - 33
README.md

@@ -3,37 +3,43 @@
 This template should help get you started developing mobile applications with Vue3 and Typescript and Vant in Vite.
 
 ## Project setup
+
 ```
 yarn install
 ```
 
 ### Compiles and hot-reloads for development
+
 ```
 yarn start
 ```
 
 ### Compiles and minifies for production
+
 ```
 yarn build
 ```
 
 ### Lints and fixes files (eslint + prettier)
+
 ```
 yarn lint
 ```
 
 ### Generate component(page) templates for development
+
 ```
 yarn generate
 ```
 
 ### Customize configuration
+
 See [Configuration Reference](https://vitejs.dev/config/).
 
 ## Browser adaptation
 
-
 ### 目录结构
+
 ```
 /src/student -- 学生端页面目录
 /src/teacher -- 老师端页面目录
@@ -51,59 +57,73 @@ See [Configuration Reference](https://vitejs.dev/config/).
 ```
 
 ### 公用尺寸
+
 1、所有的图片和视频尺寸统一 3:2
-2、所有的金额四舍五入保留两位小数, 所有的金额保留2位小数,有百分符
+2、所有的金额四舍五入保留两位小数, 所有的金额保留 2 位小数,有百分符
 
 ### native-message api
+
 <!-- 选择文件 -->
+
 postMessage({ api: 'chooseFile', content: {
-  type: 'img' | 'video' | 'file' | 'midi' | 'mp3' | 'xml',
-  max: 1
+type: 'img' | 'video' | 'file' | 'midi' | 'mp3' | 'xml',
+max: 1
 }}, (res) => {
+
   <!-- fileUrl。 如果是视频 firstFrameImg -->
+
 })
 
 <!-- 进入直播间 -->
+
 postMessage({ api: 'joinLiveRoom', content: {
-  roomId: 'xxx',
-	teacherId: 'xxx'
+roomId: 'xxx',
+teacherId: 'xxx'
 })
 
 <!-- 进入群聊天 -->
+
 postMessage({
-  api: 'joinChatGroup',
-  content: {
-    type: 'multi', // single 单人 multi 多人
-    id: item.id
-  }
+api: 'joinChatGroup',
+content: {
+type: 'multi', // single 单人 multi 多人
+id: item.id,
+role: 'STUDENT' || 'TEACHER'
+}
 })
 
 <!-- 拉起支付 -->
+
 postMessage({
-  api: 'paymentOrder',
-  content: {
-    orderNo: this.orderInfo.orderNo,
-    payInfo: `alipays://platformapi/startapp?saId=10000007&qrcode=${res.data.pay_info}`
-  }
+api: 'paymentOrder',
+content: {
+orderNo: this.orderInfo.orderNo,
+payInfo: `alipays://platformapi/startapp?saId=10000007&qrcode=${res.data.pay_info}`
+}
 })
 
 <!-- 原生导航是否显示 -->
+
 postMessage({api:'setBarStatus',content:{status:1}});
 
 <!-- 原生导航返回样式 -->
+
 postMessage({api:'backIconChange',content:{iconStyle:'black'}});
 
 <!-- 获取原生导航高度 -->
+
 postMessage({ api: 'getNavHeight' })
 
 ### 获取某个目录下面的图片对象
+
 export const getAssetsHomeFile = (fileName: string) => {
-  const path = `../images/${fileName}`
-  const modules = import.meta.globEager('../images/*')
-  return modules[path].default
+const path = `../images/${fileName}`
+const modules = import.meta.globEager('../images/\*')
+return modules[path].default
 }
+
 - 需要带上图片后辍
-getAssetsHomeFile('xxx.png')
+  getAssetsHomeFile('xxx.png')
 
 ### Rem Unit (default)
 
@@ -122,10 +142,10 @@ module.exports = {
   plugins: {
     'postcss-pxtorem': {
       rootValue: 37.5,
-      propList: ['*'],
-    },
-  },
-};
+      propList: ['*']
+    }
+  }
+}
 ```
 
 ### Viewport Units
@@ -141,10 +161,10 @@ PostCSS config example:
 module.exports = {
   plugins: {
     'postcss-px-to-viewport': {
-      viewportWidth: 375,
-    },
-  },
-};
+      viewportWidth: 375
+    }
+  }
+}
 ```
 
 ### Custom rootValue
@@ -158,12 +178,12 @@ module.exports = {
     // postcss-pxtorem version >= 5.0.0
     'postcss-pxtorem': {
       rootValue({ file }) {
-        return file.indexOf('vant') !== -1 ? 37.5 : 75;
+        return file.indexOf('vant') !== -1 ? 37.5 : 75
       },
-      propList: ['*'],
-    },
-  },
-};
+      propList: ['*']
+    }
+  }
+}
 ```
 
 ## Recommended IDE Setup

+ 2 - 1
src/student/teacher-dependent/components/single.tsx

@@ -62,7 +62,8 @@ export default defineComponent({
           api: 'joinChatGroup',
           content: {
             type: 'multi', // single 单人 multi 多人
-            id: item.id
+            id: item.id,
+            role: 'STUDENT'
           }
         })
       }

+ 2 - 1
src/student/teacher-dependent/model/teacher-header.tsx

@@ -188,7 +188,8 @@ export default defineComponent({
                       api: 'joinChatGroup',
                       content: {
                         type: 'single', // single 单人 multi 多人
-                        id: this.teacherId
+                        id: this.teacherId,
+                        role: 'STUDENT'
                       }
                     })
                   }}

+ 2 - 1
src/teacher/piano-room/components/course/index.tsx

@@ -57,7 +57,8 @@ export default defineComponent({
         api: 'joinChatGroup',
         content: {
           type: 'multi', // single 单人 multi 多人
-          id: item.imGroupId
+          id: item.imGroupId,
+          role: 'TEACHER'
         }
       })
     },