lsc 2 years ago
parent
commit
27b91884ad
4 changed files with 658 additions and 232 deletions
  1. 2 0
      package.json
  2. 232 0
      src/components/pages/audioDemo.vue
  3. 220 36
      src/components/pages/components/worksDetail2.vue
  4. 204 196
      src/router/index.js

+ 2 - 0
package.json

@@ -19,8 +19,10 @@
     "hevue-img-preview": "^5.0.3",
     "html-docx-js": "^0.3.1",
     "jquery": "^3.6.0",
+    "js-audio-recorder": "^1.0.7",
     "js-pinyin": "^0.1.9",
     "jsmind": "^0.4.8",
+    "lamejs": "^1.2.1",
     "qs": "^6.10.1",
     "v-viewer": "^1.6.4",
     "vant": "^2.12.10",

+ 232 - 0
src/components/pages/audioDemo.vue

@@ -0,0 +1,232 @@
+<template>
+  <div class="home" style="margin: 1vw">
+    <Button type="success" @click="getPermission()" style="margin: 1vw"
+      >获取麦克风权限</Button
+    >
+    <br />
+    <Button type="info" @click="startRecorder()" style="margin: 1vw"
+      >开始录音</Button
+    >
+    <Button type="info" @click="resumeRecorder()" style="margin: 1vw"
+      >继续录音</Button
+    >
+    <Button type="info" @click="pauseRecorder()" style="margin: 1vw"
+      >暂停录音</Button
+    >
+    <Button type="info" @click="stopRecorder()" style="margin: 1vw"
+      >结束录音</Button
+    >
+    <br />
+    <Button type="success" @click="playRecorder()" style="margin: 1vw"
+      >录音播放</Button
+    >
+    <Button type="success" @click="pausePlayRecorder()" style="margin: 1vw"
+      >暂停录音播放</Button
+    >
+    <Button type="success" @click="resumePlayRecorder()" style="margin: 1vw"
+      >恢复录音播放</Button
+    >
+    <Button type="success" @click="stopPlayRecorder()" style="margin: 1vw"
+      >停止录音播放</Button
+    >
+    <br />
+    <Button type="info" @click="getRecorder()" style="margin: 1vw"
+      >获取录音信息</Button
+    >
+    <Button type="info" @click="downPCM()" style="margin: 1vw">下载PCM</Button>
+    <Button type="info" @click="downWAV()" style="margin: 1vw">下载WAV</Button>
+    <Button type="info" @click="getMp3Data()" style="margin: 1vw"
+      >下载MP3</Button
+    >
+    <br />
+    <Button type="error" @click="destroyRecorder()" style="margin: 1vw"
+      >销毁录音</Button
+    >
+  </div>
+</template>
+
+ 
+<script>
+import Recorder from "js-audio-recorder";
+
+const lamejs = require("lamejs");
+
+const recorder = new Recorder({
+  sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
+  sampleRate: 48000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
+  numChannels: 1, // 声道,支持 1 或 2, 默认是1
+  // compiling: false,(0.x版本中生效,1.x增加中) // 是否边录边转换,默认是false
+});
+
+// 绑定事件-打印的是当前录音数据
+
+recorder.onprogress = function (params) {
+  // console.log('--------------START---------------')
+  // console.log('录音时长(秒)', params.duration);
+  // console.log('录音大小(字节)', params.fileSize);
+  // console.log('录音音量百分比(%)', params.vol);
+  // console.log('当前录音的总数据([DataView, DataView...])', params.data);
+  // console.log('--------------END---------------')
+};
+
+export default {
+  name: "home",
+  methods: {
+    /**
+     * 录音的具体操作功能
+     * */
+
+    // 开始录音
+    startRecorder() {
+      recorder.start().then(
+        () => {
+        },
+        (error) => {
+          // 出错了
+          console.log(`${error.name} : ${error.message}`);
+        }
+      );
+    },
+
+    // 继续录音
+    resumeRecorder() {
+      recorder.resume();
+    },
+    // 暂停录音
+    pauseRecorder() {
+      recorder.pause();
+    },
+    // 结束录音
+    stopRecorder() {
+      recorder.stop();
+    },
+
+    // 录音播放
+    playRecorder() {
+      recorder.play();
+    },
+
+    // 暂停录音播放
+    pausePlayRecorder() {
+      recorder.pausePlay();
+    },
+
+    // 恢复录音播放
+    resumePlayRecorder() {
+      recorder.resumePlay();
+    },
+
+    // 停止录音播放
+    stopPlayRecorder() {
+      recorder.stopPlay();
+    },
+
+    // 销毁录音
+    destroyRecorder() {
+      recorder.destroy();
+      //   .then(function () {
+      // recorder = null;
+      //   });
+    },
+
+    /**
+     * 获取录音文件
+     * */
+
+    getRecorder() {
+      let toltime = recorder.duration; //录音总时长
+      let fileSize = recorder.fileSize; //录音总大小
+      //录音结束,获取取录音数据
+      let PCMBlob = recorder.getPCMBlob(); //获取 PCM 数据
+      let wav = recorder.getWAVBlob(); //获取 WAV 数据
+      let channel = recorder.getChannelData(); //获取左声道和右声道音频数据
+      console.log(toltime);
+    //   debugger;
+    },
+
+    /**
+     * 下载录音文件
+     * */
+
+    //下载pcm
+
+    downPCM() {
+      //这里传参进去的时文件名
+      recorder.downloadPCM("新文件");
+    },
+
+    //下载wav
+
+    downWAV() {
+      //这里传参进去的时文件名
+      recorder.downloadWAV("新文件");
+    },
+
+    /**
+     * 获取麦克风权限
+     * */
+
+    getPermission() {
+      Recorder.getPermission().then(
+        () => {
+          this.$Message.success("获取权限成功");
+        },
+        (error) => {
+          console.log(`${error.name} : ${error.message}`);
+        }
+      );
+    },
+
+    /**
+     * 文件格式转换 wav-map3
+     * */
+
+    getMp3Data() {
+      const mp3Blob = this.convertToMp3(recorder.getWAV());
+      recorder.download(mp3Blob, "recorder", "mp3");
+    },
+
+    convertToMp3(wavDataView) {
+      // 获取wav头信息
+      const wav = lamejs.WavHeader.readHeader(wavDataView); // 此处其实可以不用去读wav头信息,毕竟有对应的config配置
+      const { channels, sampleRate } = wav;
+      const mp3enc = new lamejs.Mp3Encoder(channels, sampleRate, 128);
+      // 获取左右通道数据
+      const result = recorder.getChannelData();
+      const buffer = [];
+      const leftData =
+        result.left &&
+        new Int16Array(result.left.buffer, 0, result.left.byteLength / 2);
+      const rightData =
+        result.right &&
+        new Int16Array(result.right.buffer, 0, result.right.byteLength / 2);
+      const remaining = leftData.length + (rightData ? rightData.length : 0);
+      const maxSamples = 1152;
+      for (let i = 0; i < remaining; i += maxSamples) {
+        const left = leftData.subarray(i, i + maxSamples);
+        let right = null;
+        let mp3buf = null;
+        if (channels === 2) {
+          right = rightData.subarray(i, i + maxSamples);
+          mp3buf = mp3enc.encodeBuffer(left, right);
+        } else {
+          mp3buf = mp3enc.encodeBuffer(left);
+        }
+        if (mp3buf.length > 0) {
+          buffer.push(mp3buf);
+        }
+      }
+
+      const enc = mp3enc.flush();
+      if (enc.length > 0) {
+        buffer.push(enc);
+      }
+      return new Blob(buffer, { type: "audio/mp3" });
+    },
+  },
+};
+</script>
+
+ 
+<style  scoped>
+</style>

+ 220 - 36
src/components/pages/components/worksDetail2.vue

@@ -40,7 +40,11 @@
               :value="item.userid"
             ></el-option>
           </el-select>
-          <el-select v-model="chooseDy" placeholder="请选择阶段" @change="searchWork1">
+          <el-select
+            v-model="chooseDy"
+            placeholder="请选择阶段"
+            @change="searchWork1"
+          >
             <el-option label="所有阶段" value></el-option>
             <el-option
               v-for="(item, index) in dyList"
@@ -49,7 +53,11 @@
               :value="item.id"
             ></el-option>
           </el-select>
-          <el-select v-model="chooseTask" placeholder="请选择任务" @change="searchWork2">
+          <el-select
+            v-model="chooseTask"
+            placeholder="请选择任务"
+            @change="searchWork2"
+          >
             <el-option label="所有任务" value></el-option>
             <el-option
               v-for="(item, index) in dyList[chooseDy]
@@ -77,30 +85,62 @@
           :row-class-name="tableRowClassName"
           stripe
         >
-          <el-table-column prop="sName" label="姓名" min-width="15" align="center"></el-table-column>
-          <el-table-column prop="class" label="班级" min-width="20" align="center">
+          <el-table-column
+            prop="sName"
+            label="姓名"
+            min-width="15"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            prop="class"
+            label="班级"
+            min-width="20"
+            align="center"
+          >
             <template slot-scope="scope">
               <div>{{ scope.row.class ? scope.row.class : "暂无班级" }}</div>
             </template>
           </el-table-column>
-          <el-table-column prop="course" label="项目" min-width="20" align="center"></el-table-column>
-          <el-table-column prop="course" label="阶段" min-width="20" align="center">
+          <el-table-column
+            prop="course"
+            label="项目"
+            min-width="20"
+            align="center"
+          ></el-table-column>
+          <el-table-column
+            prop="course"
+            label="阶段"
+            min-width="20"
+            align="center"
+          >
             <template slot-scope="scope">
-              <div>{{ dyList.length > 0 ? dyList[scope.row.stage].name : "" }}</div>
+              <div>
+                {{ dyList.length > 0 ? dyList[scope.row.stage].name : "" }}
+              </div>
             </template>
           </el-table-column>
-          <el-table-column prop="course" label="任务" min-width="20" align="center">
+          <el-table-column
+            prop="course"
+            label="任务"
+            min-width="20"
+            align="center"
+          >
             <template slot-scope="scope">
               <div>
                 {{
-                dyList.length > 0
-                ? dyList[scope.row.stage].taskList[scope.row.task].name
-                : ""
+                  dyList.length > 0
+                    ? dyList[scope.row.stage].taskList[scope.row.task].name
+                    : ""
                 }}
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="time" label="时间" width="200px" align="center"></el-table-column>
+          <el-table-column
+            prop="time"
+            label="时间"
+            width="200px"
+            align="center"
+          ></el-table-column>
           <el-table-column label="操作" width="200px">
             <template slot-scope="scope">
               <el-button
@@ -114,7 +154,8 @@
                     scope.row.task
                   )
                 "
-              >查看作业</el-button>
+                >查看作业</el-button
+              >
               <!-- <el-button
                 type="primary"
                 size="small"
@@ -132,7 +173,8 @@
                     scope.row.task
                   )
                 "
-              >导出报告</el-button>
+                >导出报告</el-button
+              >
               <!-- <el-button
                 class="de_button"
                 type="primary"
@@ -155,17 +197,20 @@
               <div class="course_t">
                 <span>
                   {{
-                  "第" + (sInfo.stage + 1) + "阶段 " + dyList[sInfo.stage].name
+                    "第" +
+                    (sInfo.stage + 1) +
+                    "阶段 " +
+                    dyList[sInfo.stage].name
                   }}
                 </span>
                 <!-- <span>{{ "任务"+(sInfo.task + 1)+' ' + dyList[sInfo.stage].taskList[sInfo.task].name }}</span> -->
               </div>
               <span>
                 {{
-                "任务" +
-                (sInfo.task + 1) +
-                " " +
-                dyList[sInfo.stage].taskList[sInfo.task].name
+                  "任务" +
+                  (sInfo.task + 1) +
+                  " " +
+                  dyList[sInfo.stage].taskList[sInfo.task].name
                 }}-{{ sInfo.sName }}
               </span>
               <!-- <span v-if="item.askJson" @click="checkAsk(item.askJson)">查看问卷</span> -->
@@ -173,16 +218,26 @@
             <div class="zyBox">
               <div class="left">
                 <div class="left_top">
-                  <div class="bigImg" v-if="worksDetail.img && worksDetail.img.length">
+                  <div
+                    class="bigImg"
+                    v-if="worksDetail.img && worksDetail.img.length"
+                  >
                     <img :src="worksDetail.img[worksDetail.imgIndex].src" alt />
                   </div>
-                  <div class="thumbnail" v-if="worksDetail.img && worksDetail.img.length">
+                  <div
+                    class="thumbnail"
+                    v-if="worksDetail.img && worksDetail.img.length"
+                  >
                     <div
                       v-for="(item, index) in worksDetail.img"
                       :key="index"
                       :class="worksDetail.imgIndex == index ? 'isClick' : ''"
                     >
-                      <img :src="item.src" alt @click="worksDetail.imgIndex = index" />
+                      <img
+                        :src="item.src"
+                        alt
+                        @click="worksDetail.imgIndex = index"
+                      />
                     </div>
                   </div>
                   <div class="work_nopicture" v-else>暂无上传截图</div>
@@ -194,9 +249,17 @@
                   >{{ "任务"+(sInfo.task + 1)+' ' + dyList[sInfo.stage].taskList[sInfo.task].name }}</div>-->
                   <div class="ask_Answer" v-if="worksDetail.askInfo">
                     <div class="ask_Answer_title">问卷调查</div>
-                    <div class="ask_Answer_content" v-if="!worksDetail.askInfo.length">暂无提交问卷</div>
+                    <div
+                      class="ask_Answer_content"
+                      v-if="!worksDetail.askInfo.length"
+                    >
+                      暂无提交问卷
+                    </div>
                     <div class="ask_body" v-else>
-                      <div v-for="(item, index) in worksDetail.askInfo" :key="index">
+                      <div
+                        v-for="(item, index) in worksDetail.askInfo"
+                        :key="index"
+                      >
                         <span>
                           问卷-
                           {{ item.askTitle }}
@@ -211,8 +274,15 @@
                 </div>
               </div>
               <div style="width: 310px; margin-right: 10px">
-                <div class="sd_score" style="box-sizing: border-box; width: 100%; box-shadow: none">
-                  <div class="score_box" v-for="(item, index) in worksDetail.eList" :key="index">
+                <div
+                  class="sd_score"
+                  style="box-sizing: border-box; width: 100%; box-shadow: none"
+                >
+                  <div
+                    class="score_box"
+                    v-for="(item, index) in worksDetail.eList"
+                    :key="index"
+                  >
                     <el-tooltip
                       class="item"
                       effect="dark"
@@ -221,7 +291,10 @@
                     >
                       <span>{{ item.value }}</span>
                     </el-tooltip>
-                    <el-rate style="min-width: 120px" v-model="worksDetail.rateList[item.value]"></el-rate>
+                    <el-rate
+                      style="min-width: 120px"
+                      v-model="worksDetail.rateList[item.value]"
+                    ></el-rate>
                   </div>
                   <!-- <div class="score_box">
                     <span>意识能力</span>
@@ -260,7 +333,12 @@
               <div class="right">
                 <div class="comment" v-if="worksDetail.answerInfo">
                   <div class="comment_title">问答</div>
-                  <div class="other_Answer" v-if="!worksDetail.answerInfo.length">暂无提交问答</div>
+                  <div
+                    class="other_Answer"
+                    v-if="!worksDetail.answerInfo.length"
+                  >
+                    暂无提交问答
+                  </div>
                   <div class="comment_body" v-else>
                     <div
                       class="answer_body"
@@ -360,7 +438,11 @@
         </div>
         <div class="a_addBox">
           <div style="font-size: 16px; color: #c7c7c7">问卷内容</div>
-          <div class="a_add_box" v-for="(item, index) in askJson.askJson" :key="index">
+          <div
+            class="a_add_box"
+            v-for="(item, index) in askJson.askJson"
+            :key="index"
+          >
             <div class="a_add_head">
               <div style="display: flex">
                 {{ index + 1 + "、" }}
@@ -376,7 +458,8 @@
                     :label="checkIndex1"
                     class="redioStyle"
                     disabled
-                  >{{ item3 }}</el-radio>
+                    >{{ item3 }}</el-radio
+                  >
                 </el-radio-group>
               </div>
             </div>
@@ -384,7 +467,9 @@
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dialogVisible4 = false">关 闭</el-button>
+        <el-button type="primary" @click="dialogVisible4 = false"
+          >关 闭</el-button
+        >
       </span>
     </el-dialog>
   </div>
@@ -530,6 +615,91 @@ export default {
           },
         ],
       },
+      // 雷达图的数据
+      radarOption: {
+        splitNumber: 5,
+        tooltip: {
+          triggerOn: "mousemove",
+          //雷达图的tooltip不会超出div,也可以设置position属性,position定位的tooltip 不会随着鼠标移动而位置变化,不友好
+          confine: true,
+          enterable: true, //鼠标是否可以移动到tooltip区域内
+          backgroundColor: "rgba(255,255,255,0.7)",
+          textStyle: {
+            // 文字样式
+            align: "left",
+          },
+          left: "right",
+          top: "bottom",
+        },
+        radar: {
+          shape: "circle",
+          center: ["50%", "50%"],
+          axisName: {
+            textStyle: {
+              // 文字样式
+              color: "#58a5e6",
+            },
+            formatter: function (value, indicator) {
+              value = value.replace(/\S{3}/g, function (match) {
+                return match + "\n";
+              });
+              // return "{a|" + value + "}";
+              return "";
+            },
+            rich: {
+              a: {
+                fontSize: 12,
+              },
+            },
+          },
+          indicator: [
+            // 雷达图的指示器,用来指定雷达图中的多个变量(维度)
+          ],
+        },
+        // 雷达图背景的颜色,在这儿随便设置了一个颜色,完全不透明度为0,就实现了透明背景
+        splitArea: {
+          show: true,
+          areaStyle: {
+            color: "rgba(255,0,0,0)", // 图表背景的颜色
+          },
+        },
+        splitLine: {
+          show: true,
+          lineStyle: {
+            width: 1,
+            color: "rgba(131,141,158,.1)", // 设置网格的颜色
+          },
+        },
+        series: [
+          {
+            name: "能力图", // tooltip中的标题
+            type: "radar", // 表示是雷达图
+            symbol: "circle", // 拐点的样式,还可以取值'rect','angle'等
+            symbolSize: 8, // 拐点的大小
+            areaStyle: {
+              normal: {
+                width: 1,
+                opacity: 0.2,
+              },
+            },
+            data: [
+              {
+                // 设置各个指标原始值
+                value: [],
+                // 设置区域边框和区域的颜色
+                itemStyle: {
+                  normal: {
+                    color: "#58a5e6",
+                    lineStyle: {
+                      color: "#58a5e6",
+                    },
+                  },
+                },
+              },
+            ],
+          },
+        ],
+      },
       askJson: {},
       dyList: [],
       userAarray: [],
@@ -703,12 +873,19 @@ export default {
 
           setTimeout(() => {
             var _ooption = JSON.parse(JSON.stringify(this.ooption));
-            var _option = JSON.parse(JSON.stringify(this.option));
+            // var _option = JSON.parse(JSON.stringify(this.option));
+            var _option = JSON.parse(JSON.stringify(this.radarOption));
+
+            for (var i = 0; i < _ooption.length; i++) {
+              _option.radar.indicator.push({ name: _ooption[i].name, max: 5 });
+              _option.series[0].data[0].value.push(_ooption[i].value);
+            }
+            console.log(_option);
             if (this.chartObj) {
-              _option.series[0].data = _ooption;
+              // _option.series[0].data = _ooption;
               this.chartObj.setOption(_option);
             } else {
-              _option.series[0].data = _ooption;
+              // _option.series[0].data = _ooption;
               this.setChart(_option);
             }
             // this.setChart(this.option);
@@ -882,7 +1059,7 @@ export default {
             type: "success",
           });
           var _ooption = JSON.parse(JSON.stringify(this.ooption));
-          var _option = JSON.parse(JSON.stringify(this.option));
+          // var _option = JSON.parse(JSON.stringify(this.option));
 
           var _rate = this.worksDetail.rateList;
           var _rateList = Object.keys(this.worksDetail.rateList);
@@ -892,8 +1069,15 @@ export default {
             }
           }
 
+          var _option = JSON.parse(JSON.stringify(this.radarOption));
+
+          for (var i = 0; i < _ooption.length; i++) {
+            _option.radar.indicator.push({ name: _ooption[i].name, max: 5 });
+            _option.series[0].data[0].value.push(_ooption[i].value);
+          }
+          console.log(_option);
           if (this.chartObj) {
-            _option.series[0].data = _ooption;
+            // _option.series[0].data = _ooption;
             this.chartObj.setOption(_option);
           } else {
             this.setChart(_ooption);

+ 204 - 196
src/router/index.js

@@ -26,206 +26,214 @@ import GridList from '@/components/pages/GridList'
 import wordList from '@/components/pages/wordList'
 import demoPdf from '@/components/pages/demoPdf'
 import demoPdf2 from '@/components/pages/demoPdf2'
+import audioDemo from '@/components/pages/audioDemo'
 
 Vue.use(Router).use(ElementUI)
 
 export default new Router({
   routes: [{
-      path: '/class',
-      name: 'class',
-      component: classA,
-      meta: {
-        requireAuth: ''
-      }
-    },
-    // {
-    //   path: '/',
-    //   redirect: '/course',
-    // },
-    {
-      path: '/course',
-      component: course,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/course/courseDetail',
-      component: courseDetail,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/course/addCourse',
-      component: addCourse,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/data',
-      name: 'data',
-      component: data,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    }, {
-      path: '/notice',
-      name: 'notice',
-      component: notice,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/student',
-      name: 'student',
-      component: student,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/ask',
-      name: 'ask',
-      component: ask,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/ask/askList',
-      name: 'askList',
-      component: () =>
-        import('@/components/pages/askList'),
-      meta: {}
-    },
-    {
-      path: '/works',
-      name: 'works',
-      component: works,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/worksDetail',
-      name: 'worksDetail',
-      component: worksDetail,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/library',
-      name: 'library',
-      component: library,
-      meta: {
-        requireAuth: '' // 是否需要判断是否登录,这里是需要判断
-      }
-    },
-    {
-      path: '/login',
-      name: 'login',
-      component: login,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/note',
-      name: 'note',
-      component: note,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/Grid',
-      name: 'Grid',
-      component: Grid,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/demo',
-      name: 'demo',
-      component: demo,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/classRoom',
-      name: 'classRoom',
-      component: classRoom,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/liveRoom',
-      name: 'liveRoom',
-      component: liveRoom,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/addPPt',
-      name: 'addPPt',
-      component: addPPt,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/studyLibrary',
-      name: 'studyLibrary',
-      component: studyLibrary,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/evaluation',
-      name: 'evaluation',
-      component: evaluation,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/GridList',
-      name: 'GridList',
-      component: GridList,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
-    {
-      path: '/wordList',
-      name: 'wordList',
-      component: wordList,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    }, {
-      path: '/demoPdf',
-      name: 'demoPdf',
-      component: demoPdf,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    }, {
-      path: '/demoPdf2',
-      name: 'demoPdf2',
-      component: demoPdf2,
-      meta: {
-        requireAuth: '' // 不需要鉴权
-      }
-    },
+    path: '/class',
+    name: 'class',
+    component: classA,
+    meta: {
+      requireAuth: ''
+    }
+  },
+  // {
+  //   path: '/',
+  //   redirect: '/course',
+  // },
+  {
+    path: '/course',
+    component: course,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/course/courseDetail',
+    component: courseDetail,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/course/addCourse',
+    component: addCourse,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/data',
+    name: 'data',
+    component: data,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  }, {
+    path: '/notice',
+    name: 'notice',
+    component: notice,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/student',
+    name: 'student',
+    component: student,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/ask',
+    name: 'ask',
+    component: ask,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/ask/askList',
+    name: 'askList',
+    component: () =>
+      import('@/components/pages/askList'),
+    meta: {}
+  },
+  {
+    path: '/works',
+    name: 'works',
+    component: works,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/worksDetail',
+    name: 'worksDetail',
+    component: worksDetail,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/library',
+    name: 'library',
+    component: library,
+    meta: {
+      requireAuth: '' // 是否需要判断是否登录,这里是需要判断
+    }
+  },
+  {
+    path: '/login',
+    name: 'login',
+    component: login,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/note',
+    name: 'note',
+    component: note,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/Grid',
+    name: 'Grid',
+    component: Grid,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/demo',
+    name: 'demo',
+    component: demo,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/classRoom',
+    name: 'classRoom',
+    component: classRoom,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/liveRoom',
+    name: 'liveRoom',
+    component: liveRoom,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/addPPt',
+    name: 'addPPt',
+    component: addPPt,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/studyLibrary',
+    name: 'studyLibrary',
+    component: studyLibrary,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/evaluation',
+    name: 'evaluation',
+    component: evaluation,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/GridList',
+    name: 'GridList',
+    component: GridList,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
+  {
+    path: '/wordList',
+    name: 'wordList',
+    component: wordList,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  }, {
+    path: '/demoPdf',
+    name: 'demoPdf',
+    component: demoPdf,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  }, {
+    path: '/demoPdf2',
+    name: 'demoPdf2',
+    component: demoPdf2,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  }, {
+    path: '/audioDemo',
+    name: 'audioDemo',
+    component: audioDemo,
+    meta: {
+      requireAuth: '' // 不需要鉴权
+    }
+  },
   ]
 })