zengyicheng 2 years ago
parent
commit
71a9292d87

+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.5f04347dbcc797c3df43d2a80401c1fd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.026c632084ce19e78a6f.js></script><script type=text/javascript src=./static/js/app.5d9c6d1c1ced74931b74.js></script></body></html><script>document.domain = "cocorobo.cn"</script>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.7b564f687655176717ab0e4e4f194f90.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.58e4d5b3fd0c569e76aa.js></script><script type=text/javascript src=./static/js/app.3f543ccf79263f22a3ce.js></script></body></html><script>document.domain = "cocorobo.cn"</script>

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.5f04347dbcc797c3df43d2a80401c1fd.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.7b564f687655176717ab0e4e4f194f90.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.7b564f687655176717ab0e4e4f194f90.css.map


BIN
dist/static/img/noImg.ea53fbc.png


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.3f543ccf79263f22a3ce.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.3f543ccf79263f22a3ce.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.5d9c6d1c1ced74931b74.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.5d9c6d1c1ced74931b74.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.58e4d5b3fd0c569e76aa.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.58e4d5b3fd0c569e76aa.js.map


+ 5 - 0
package-lock.json

@@ -4979,6 +4979,11 @@
       "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
       "dev": true
     },
+    "hevue-img-preview": {
+      "version": "5.0.3",
+      "resolved": "https://registry.npmmirror.com/hevue-img-preview/-/hevue-img-preview-5.0.3.tgz",
+      "integrity": "sha512-JzTudYDM/ECxRd0we+DxZ6/7VoM9GKBCSp2CCMFzI+ha1MuKIq35P96b4V/Funvr5cTzsdiwHf8n35GSwwnJUA=="
+    },
     "hex-color-regex": {
       "version": "1.1.0",
       "resolved": "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz",

+ 1 - 0
package.json

@@ -15,6 +15,7 @@
     "axios": "^0.21.3",
     "echarts": "^5.2.2",
     "element-ui": "^2.15.6",
+    "hevue-img-preview": "^5.0.3",
     "html2canvas": "^1.4.1",
     "vue": "^2.5.2",
     "vue-cookies": "^1.7.4",

BIN
src/assets/icon/works/noImg.png


+ 362 - 49
src/components/study.vue

@@ -281,6 +281,23 @@
                       </div>
                     </div>
                   </div>
+                  <div
+                    class="newNav"
+                    v-show="
+                      file.length &&
+                      file[taskCount] &&
+                      file[taskCount].length > 0
+                    "
+                    v-for="(f, fileIndex) in file[taskCount]"
+                    :key="fileIndex"
+                  >
+                    <div class="vedioNav">附件</div>
+                    <div>
+                      <div class="navText" @click="downFile(f, fileIndex)">
+                        {{ f.name }}
+                      </div>
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -334,7 +351,7 @@
                 "
               >
                 <div class="vedioList hangVedioList">
-                  <div
+                  <!-- <div
                     v-if="
                       vedio.length &&
                       vedio[taskCount] &&
@@ -366,7 +383,7 @@
                       />
                       <div class="vedioName">{{ media.name }}</div>
                     </div>
-                  </div>
+                  </div> -->
                   <div
                     v-show="
                       textList.length &&
@@ -433,6 +450,23 @@
                       </div>
                     </div>
                   </div>
+                  <div
+                    class="newNav"
+                    v-show="
+                      file.length &&
+                      file[taskCount] &&
+                      file[taskCount].length > 0
+                    "
+                    v-for="(f, fileIndex) in file[taskCount]"
+                    :key="fileIndex"
+                  >
+                    <div class="vedioNav">附件</div>
+                    <div>
+                      <div class="navText" @click="downFile(f, fileIndex)">
+                        {{ f.name }}
+                      </div>
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -655,35 +689,126 @@
                       </div>
                     </div>
                   </div>
-                  <!-- <div v-if="tType && tType == 1" class="worksBox">
+                  <div
+                    v-if="tType && tType == 1 && tool.tool.indexOf(16) != -1"
+                    class="worksBox"
+                  >
                     <div class="worksBTitle">作业提交情况</div>
                     <div style="padding-top: 15px; font-size: 18px">
                       作业预览
                     </div>
                     <div class="worksDetailBox">
-                      <div class="works">
+                      <div
+                        class="works"
+                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        :key="wIndex"
+                      >
                         <div class="workImg">
-                          <img src="../assets/icon/works/worksA.png" alt="" />
+                          <img
+                            :src="w.works"
+                            @click="previewImg(w.works)"
+                            alt=""
+                          />
                         </div>
-                        <div class="worksName">姓名:<span>张三</span></div>
-                      </div>
-                      <div class="works">
-                        <div class="workImg">
-                          <img src="../assets/icon/works/worksB.jpg" alt="" />
+                        <div class="worksName">
+                          姓名:<span>{{ w.sName }}</span>
                         </div>
-                        <div class="worksName">姓名:<span>李四</span></div>
                       </div>
-                      <div class="works">
+                    </div>
+                    <div
+                      style="
+                        padding-top: 15px;
+                        padding-bottom: 15px;
+                        border-bottom: 1px solid #eeeeee;
+                        font-size: 18px;
+                      "
+                    >
+                      未提交
+                    </div>
+                    <div class="noWorksS">
+                      <div
+                        v-for="(s, sIndex) in noWorksS[toolIndex]"
+                        :key="sIndex"
+                        class="noWorksName"
+                      >
+                        {{ s.student }}
+                      </div>
+                    </div>
+                  </div>
+                  <div
+                    v-if="tType && tType == 1 && tool.tool.indexOf(4) != -1"
+                    class="worksBox"
+                  >
+                    <div class="worksBTitle">作业提交情况</div>
+                    <div style="padding-top: 15px; font-size: 18px">
+                      作业预览
+                    </div>
+                    <div class="worksDetailBox">
+                      <div
+                        class="works"
+                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        :key="wIndex"
+                      >
+                        <!-- @click="previewImg(w.works)" -->
                         <div class="workImg">
-                          <img src="../assets/icon/works/worksC.jpg" alt="" />
+                          <img
+                            src="../assets/icon/works/noImg.png"
+                            @click="openTools(4, toolIndex, taskCount, w.works)"
+                            alt=""
+                          />
+                        </div>
+                        <div class="worksName">
+                          姓名:<span>{{ w.sName }}</span>
                         </div>
-                        <div class="worksName">姓名:<span>王五</span></div>
                       </div>
-                      <div class="works">
+                    </div>
+                    <div
+                      style="
+                        padding-top: 15px;
+                        padding-bottom: 15px;
+                        border-bottom: 1px solid #eeeeee;
+                        font-size: 18px;
+                      "
+                    >
+                      未提交
+                    </div>
+                    <div class="noWorksS">
+                      <div
+                        v-for="(s, sIndex) in noWorksS[toolIndex]"
+                        :key="sIndex"
+                        class="noWorksName"
+                      >
+                        {{ s.student }}
+                      </div>
+                    </div>
+                  </div>
+                  <div
+                    v-if="tType && tType == 1 && tool.tool.indexOf(15) != -1"
+                    class="worksBox"
+                  >
+                    <div class="worksBTitle">作业提交情况</div>
+                    <div style="padding-top: 15px; font-size: 18px">
+                      作业预览
+                    </div>
+                    <div class="worksDetailBox">
+                      <div
+                        class="works"
+                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        :key="wIndex"
+                      >
+                        <!-- @click="previewImg(w.works)" -->
                         <div class="workImg">
-                          <img src="../assets/icon/works/worksD.jpg" alt="" />
+                          <img
+                            src="../assets/icon/works/noImg.png"
+                            @click="
+                              openTools(15, toolIndex, taskCount, w.works)
+                            "
+                            alt=""
+                          />
+                        </div>
+                        <div class="worksName">
+                          姓名:<span>{{ w.sName }}</span>
                         </div>
-                        <div class="worksName">姓名:<span>赵六</span></div>
                       </div>
                     </div>
                     <div
@@ -697,11 +822,15 @@
                       未提交
                     </div>
                     <div class="noWorksS">
-                      <div v-for="item in 15" :key="item" class="noWorksName">
-                        李赫
+                      <div
+                        v-for="(s, sIndex) in noWorksS[toolIndex]"
+                        :key="sIndex"
+                        class="noWorksName"
+                      >
+                        {{ s.student }}
                       </div>
                     </div>
-                  </div> -->
+                  </div>
                 </div>
                 <!-- <div class="upload_toolBtn" @click="addImg($event)">
                   上传文件
@@ -957,7 +1086,21 @@
                 <div>问卷题目:{{ askJson.askJson[index1].askstitle }}</div>
               </div>
             </div>
-            <div class="a_add_body">
+            <div class="a_add_body" v-if="!isAnswer">
+              <div class="a_add_input">
+                <el-radio-group v-model="radio[index1]">
+                  <el-radio
+                    v-for="(item2, checkIndex) in askJson.askJson[index1]
+                      .checkList"
+                    :key="checkIndex"
+                    :label="checkIndex"
+                    class="redioStyle"
+                    >{{ item2 }}</el-radio
+                  >
+                </el-radio-group>
+              </div>
+            </div>
+            <div class="a_add_body" v-else>
               <div class="a_add_input">
                 <el-radio-group v-model="radio[index1]">
                   <el-radio
@@ -965,6 +1108,7 @@
                       .checkList"
                     :key="checkIndex"
                     :label="checkIndex"
+                    disabled
                     class="redioStyle"
                     >{{ item2 }}</el-radio
                   >
@@ -976,7 +1120,12 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible5 = false">取 消</el-button>
-        <el-button type="primary" @click="addStudentAsk">确 定</el-button>
+        <el-button type="primary" @click="addStudentAsk" v-if="!isAnswer"
+          >确 定</el-button
+        >
+        <el-button type="primary" @click="dialogVisible5 = false" v-else
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
     <el-dialog
@@ -1199,9 +1348,21 @@ export default {
       askList: [],
       answerList: [],
       navList: [],
+      worksStudent: [],
+      noWorksS: [],
+      isWorksS: [],
+      toolindex: 0,
+      workTypeA: false,
+      workTypeB: false,
+      workTypeC: false,
+      isAnswer: false,
+      timer: null,
     };
   },
   methods: {
+    previewImg(url) {
+      this.$hevueImgPreview(url);
+    },
     change(val) {
       console.log(val);
     },
@@ -1239,28 +1400,138 @@ export default {
       el.getElementsByTagName("input")[0].click();
     },
     addCourseWorks(i) {
-      let params = [
-        {
-          uid: this.userid,
-          cid: this.id,
-          stage: this.courseType,
-          task: i,
-          content: this.studyJuri[0].cover[0].url,
-          type: 1,
-        },
-      ];
+      if (this.workTypeA == true) {
+        this.$confirm(
+          "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            let params = [
+              {
+                uid: this.userid,
+                cid: this.id,
+                stage: this.courseType,
+                task: i,
+                tool: this.toolindex,
+                content: this.studyJuri[0].cover[0].url,
+                type: 1,
+              },
+            ];
+            this.ajax
+              .post(this.$store.state.api + "addCourseWorks", params)
+              .then((res) => {
+                this.$message({
+                  message: "提交成功",
+                  type: "success",
+                });
+                this.studyJuri[0].cover = [];
+                this.dialogVisible = false;
+                this.getCourseDetail();
+              })
+              .catch((err) => {
+                this.$message.error("提交失败");
+                console.error(err);
+              });
+          })
+          .catch(() => {});
+      } else {
+        let params = [
+          {
+            uid: this.userid,
+            cid: this.id,
+            stage: this.courseType,
+            task: i,
+            tool: this.toolindex,
+            content: this.studyJuri[0].cover[0].url,
+            type: 1,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "addCourseWorks", params)
+          .then((res) => {
+            this.$message({
+              message: "提交成功",
+              type: "success",
+            });
+            this.studyJuri[0].cover = [];
+            this.dialogVisible = false;
+            this.getCourseDetail();
+          })
+          .catch((err) => {
+            this.$message.error("提交失败");
+            console.error(err);
+          });
+      }
+    },
+    selectWorksStudent() {
+      let params = {
+        oid: this.oid,
+      };
       this.ajax
-        .post(this.$store.state.api + "addCourseWorks", params)
+        .get(this.$store.state.api + "selectWorksStudent", params)
         .then((res) => {
-          this.$message({
-            message: "提交成功",
-            type: "success",
-          });
-          this.studyJuri[0].cover = [];
-          this.dialogVisible = false;
+          var a = res.data[0];
+
+          for (var i = 0; i < this.isWorksS.length; i++) {
+            this.noWorksS[i] = [];
+            if (this.isWorksS[i].length > 0) {
+              var a2 = JSON.parse(JSON.stringify(a));
+              for (var j = 0; j < a.length; j++) {
+                for (var z = 0; z < this.isWorksS[i].length; z++) {
+                  if (this.isWorksS[i][z].sName == a[j].name) {
+                    a2.splice(j, 1);
+                  }
+                }
+              }
+              for (var f = 0; f < a2.length; f++) {
+                this.noWorksS[i].push({ student: a2[f].name });
+              }
+            } else {
+              for (var k = 0; k < a.length; k++) {
+                this.noWorksS[i].push({ student: a[k].name });
+              }
+            }
+          }
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    selectSWorks() {
+      let params = {
+        cid: this.id,
+        s: this.courseType,
+        t: this.taskCount,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSWorks", params)
+        .then((res) => {
+          var a =
+            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose;
+          var b = res.data[0];
+          for (var i = 0; i < a.length; i++) {
+            this.worksStudent[i] = [];
+            this.isWorksS[i] = [];
+            for (var j = 0; j < b.length; j++) {
+              if (i == b[j].tool) {
+                this.worksStudent[i].push({
+                  works: b[j].content,
+                  sName: b[j].name,
+                });
+                this.isWorksS[i].push({ sName: b[j].name });
+              }
+            }
+          }
+
+          this.selectWorksStudent();
         })
         .catch((err) => {
-          this.$message.error("提交失败");
           console.error(err);
         });
     },
@@ -1487,6 +1758,7 @@ export default {
           cid: this.id,
           stage: this.courseType,
           task: this.taskCount,
+          tool: this.toolindex,
           content: JSON.stringify(this.answerList),
           type: 3,
         },
@@ -1634,6 +1906,11 @@ export default {
                 a - 100 + "px";
             }, 500);
           });
+          this.selectSWorks();
+          let _this = this;
+          _this.timer = setInterval(function () {
+            _this.selectSWorks();
+          }, 5000);
         })
         .catch((err) => {
           loading.close();
@@ -1653,8 +1930,6 @@ export default {
           if (res.data[0].length > 0) {
             this.studyJuri = JSON.parse(res.data[0][0].content);
             this.isNoHomeWork = true;
-          } else {
-            console.log("没有作业");
           }
         })
         .catch((err) => {
@@ -1684,8 +1959,10 @@ export default {
     },
     onPlayerPlay() {},
     lookVedio(u) {
-      this.playerOptions.sources[0].src = u;
-      this.playerO = this.playerOptions;
+      // this.playerOptions.sources[0].src = u;
+      var d = JSON.parse(JSON.stringify(this.playerOptions));
+      d.sources[0].src = u;
+      this.playerO[0] = d;
     },
     lookText(i, t) {
       this.text = this.textList[i][t];
@@ -1696,6 +1973,7 @@ export default {
       this.dialogVisible2 = true;
     },
     downFile(f, i) {
+      this.pptImgUrl = "";
       var a = ["PPT", "PPTX", "PDF", "XLSX", "XLS", "DOC", "DOCX"];
       if (
         a.indexOf(
@@ -1723,6 +2001,7 @@ export default {
           cid: this.id,
           stage: this.courseType,
           task: this.taskCount,
+          tool: this.toolindex,
           content: JSON.stringify(this.askList),
           type: 2,
         },
@@ -1854,9 +2133,35 @@ export default {
           console.error(err);
         });
     },
+    openTools(t, i, index, c) {
+      var z = JSON.parse(c);
+      if (t == 4) {
+        this.radio = [];
+        this.isAnswer = false;
+        for (var i = 0; i < z.length; i++) {
+          let a = z[i];
+          let b = a.anwer.split(",");
+          let d = [];
+          for (var j = 0; j < b.length; j++) {
+            d.push(parseInt(b[j]));
+          }
+          this.radio = d;
+          this.askJson = a.askJson;
+        }
+        this.isAnswer = true;
+        this.dialogVisible5 = true;
+      } else if (t == 15) {
+        this.answerQ = "";
+        this.questionAnswer = "";
+        this.answerQ = z[0].answerTitle;
+        this.questionAnswer = z[0].answer;
+        this.answerDialogVisible = true;
+      }
+    },
     addTools(t, i, index) {
       var a = 0;
       // this.taskCount = index;
+      this.toolindex = i;
       if (t == 1) {
         if (this.wbCount > 0) {
           this.updateCount(this.wbCount, t);
@@ -1885,6 +2190,8 @@ export default {
         }
         window.parent.postMessage({ tools: "3" }, "*");
       } else if (t == 4) {
+        this.radio = [];
+        this.isAnswer = false;
         if (this.askCount > 0) {
           this.updateCount(this.askCount, t);
         } else {
@@ -1980,6 +2287,8 @@ export default {
         }
         this.timeDialogVisible = true;
       } else if (t == 15) {
+        this.answerQ = "";
+        this.questionAnswer = "";
         if (this.answerCount > 0) {
           this.updateCount(this.answerCount, t);
         } else {
@@ -2007,7 +2316,6 @@ export default {
         .get(this.$store.state.api + "insertToolsCount", params)
         .then((res) => {
           this.selectCount();
-          console.log(res);
         })
         .catch((err) => {
           console.error(err);
@@ -2026,7 +2334,6 @@ export default {
         .get(this.$store.state.api + "updateToolsCount", params)
         .then((res) => {
           this.selectCount();
-          console.log(res);
         })
         .catch((err) => {
           console.error(err);
@@ -2048,6 +2355,7 @@ export default {
       document.getElementsByClassName("navBox")[0].style.height =
         a - 100 + "px";
     });
+
     setTimeout(() => {
       this.vedioTime = document.getElementsByClassName(
         "vjs-duration-display"
@@ -3062,6 +3370,7 @@ export default {
 .workImg {
   width: 200px;
   height: 140px;
+  cursor: pointer;
 }
 .workImg > img {
   width: 100%;
@@ -3080,11 +3389,15 @@ export default {
 }
 .noWorksName {
   background: #efefef;
-  width: 100px;
-  height: 30px;
+  width: 90px;
+  height: 25px;
   text-align: center;
-  line-height: 30px;
+  line-height: 25px;
   border-radius: 5px;
   margin: 10px 15px 10px 0;
+  white-space: nowrap;
+  overflow: hidden;
+  padding: 5px;
+  text-overflow: ellipsis;
 }
 </style>

+ 2 - 2
src/config/config.js

@@ -9,8 +9,8 @@ const store = new Vuex.Store({
         luyou: 1,
         userInfo: {},
         nCount: 0,
-        api: 'https://pbl.cocorobo.cn/api/pbl/',
-        // api: 'http://localhost:7003/api/pbl/',
+        // api: 'https://pbl.cocorobo.cn/api/pbl/',
+        api: 'http://localhost:7003/api/pbl/',
     },
 
     mutations: {

+ 48 - 45
src/main.js

@@ -13,68 +13,71 @@ const echarts = require('echarts');
 import 'video.js/dist/video-js.css' //videoJs的样式
 import 'vue-video-player/src/custom-theme.css' //vue-video-player的样式
 import VueCookies from 'vue-cookies'
+import hevueImgPreview from 'hevue-img-preview'
 
-Vue.use(VideoPlayer).use(VueCookies)
+Vue.use(VideoPlayer).use(VueCookies).use(hevueImgPreview, {
+    clickMaskCLose: true
+})
 Vue.prototype.$echarts = echarts
 Vue.config.productionTip = false
-Vue.prototype.$store = store;// 将store实例挂在vue原型上
+Vue.prototype.$store = store; // 将store实例挂在vue原型上
 Vue.prototype.ajax = ajax
 Vue.prototype.$message = Message
 Vue.prototype.$loading = Loading
-Vue.prototype.openLoading = function (target) {
-  const loading = this.$loading.service({           // 声明一个loading对象
-    lock: true,                             // 是否锁屏
-    background: 'rgba(255, 255, 255, 0.7)',       // 背景颜色
-    target: target ? target : document.body,                    // 需要遮罩的区域
-    body: true,
-  })
-  return loading;
+Vue.prototype.openLoading = function(target) {
+    const loading = this.$loading.service({ // 声明一个loading对象
+        lock: true, // 是否锁屏
+        background: 'rgba(255, 255, 255, 0.7)', // 背景颜色
+        target: target ? target : document.body, // 需要遮罩的区域
+        body: true,
+    })
+    return loading;
 }
 Vue.prototype.$qs = qs
 
 /* eslint-disable no-new */
 new Vue({
-  el: '#app',
-  router,
-  components: { App },
-  template: '<App/>'
+    el: '#app',
+    router,
+    components: { App },
+    template: '<App/>'
 })
 
 VueCookies.config('30d')
 
 router.beforeEach((to, from, next) => {
-  if (to.meta.title) {
-    document.title = to.meta.title
-  }
-  const requireAuth = to.meta.requireAuth
-  // 判断该路由是否需要登录权限
-  if (requireAuth) {
-    var isLogin = VueCookies.get('tlogin')
-    if (isLogin == "1") {
-      var userinfo = VueCookies.get('studentInfo')
-      store.commit("update", ["isLogin", true]);
+    if (to.meta.title) {
+        document.title = to.meta.title
+    }
+    const requireAuth = to.meta.requireAuth
+        // 判断该路由是否需要登录权限
+    if (requireAuth) {
+        var isLogin = VueCookies.get('tlogin')
+        if (isLogin == "1") {
+            var userinfo = VueCookies.get('studentInfo')
+            store.commit("update", ["isLogin", true]);
 
-      // var info = JSON.parse(window.sessionStorage.getItem("userInfo"))
-      store.commit("update", ["userInfo", userinfo]);
-      store.state.luyou = store.state.luyou + 1
-      store.commit("update", ["luyou", store.state.luyou]);
-      next()
+            // var info = JSON.parse(window.sessionStorage.getItem("userInfo"))
+            store.commit("update", ["userInfo", userinfo]);
+            store.state.luyou = store.state.luyou + 1
+            store.commit("update", ["luyou", store.state.luyou]);
+            next()
+        } else {
+            const loading = Loading.service({
+                background: "rgba(255, 255, 255)",
+                target: document.querySelector("body"),
+            });
+            store.commit("update", ["isLogin", false]);
+            Message({
+                message: '未登录,请登录',
+                type: 'warning'
+            });
+            setTimeout(() => {
+                loading.close();
+                next('/login')
+            }, 2000);
+        }
     } else {
-      const loading = Loading.service({
-        background: "rgba(255, 255, 255)",
-        target: document.querySelector("body"),
-      });
-      store.commit("update", ["isLogin", false]);
-      Message({
-        message: '未登录,请登录',
-        type: 'warning'
-      });
-      setTimeout(() => {
-        loading.close();
-        next('/login')
-      }, 2000);
+        next() // 确保一定要有next()被调用
     }
-  } else {
-    next()  // 确保一定要有next()被调用
-  }
 })

Some files were not shown because too many files changed in this diff