roose 5 년 전
부모
커밋
3c45465dd9
3개의 변경된 파일40개의 추가작업 그리고 38개의 파일을 삭제
  1. 19 19
      pages/answerAfterclass/answerAfterclass.js
  2. 19 19
      pages/answerAfterclasses/answerAfterclasses.js
  3. 2 0
      pages/evaluationCourse/evaluationCourse.js

+ 19 - 19
pages/answerAfterclass/answerAfterclass.js

@@ -205,25 +205,25 @@ Page({
   //   })
   //   })
 
 
   // }
   // }
-  // onShow: function () {
-  //   console.log("show0000000000000000000000000000000000000000000000000000000000000000000000");
-  //   console.log(wx.getStorageSync('answersId'),"onshow  的 answeid");
-  //   // console.log(wx.getStorageSync('questionList'+((wx.getStorageSync('answersId'))),"78978978979877777");
-  //   if (wx.getStorageSync('questionList'+wx.getStorageSync('answersId'))) {
-  //     console.log("缓村了锕");
-  //     const questionList = wx.getStorageSync('questionList'+wx.getStorageSync('answersId'));
-  //     this.setData({
-  //       questionList: questionList,
-  //       index: wx.getStorageSync('titleINDEX'+wx.getStorageSync('answersId')),
-  //       answersId: wx.getStorageSync('answersId'+wx.getStorageSync('answersId')),
-  //       chooseValue:wx.getStorageSync('chooseValue'+wx.getStorageSync('answersId')),
-  //     })
-  //     console.log(this.data.questionList,"show 缓存的数据");
-  //   }else{
-  //     this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
-  //     console.log(this.data.questionList,"show 没有缓存");
-  //   }
-  // },
+  onShow: function () {
+    console.log("show0000000000000000000000000000000000000000000000000000000000000000000000");
+    console.log(wx.getStorageSync('answersId'),"onshow  的 answeid");
+    // console.log(wx.getStorageSync('questionList'+((wx.getStorageSync('answersId'))),"78978978979877777");
+    if (wx.getStorageSync('questionList'+wx.getStorageSync('answersId'))) {
+      console.log("缓村了锕");
+      const questionList = wx.getStorageSync('questionList'+wx.getStorageSync('answersId'));
+      this.setData({
+        questionList: questionList,
+        index: wx.getStorageSync('titleINDEX'+wx.getStorageSync('answersId')),
+        answersId: wx.getStorageSync('answersId'+wx.getStorageSync('answersId')),
+        chooseValue:wx.getStorageSync('chooseValue'+wx.getStorageSync('answersId')),
+      })
+      console.log(this.data.questionList,"show 缓存的数据");
+    }else{
+      this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
+      console.log(this.data.questionList,"show 没有缓存");
+    }
+  },
   async onLoad(options) {
   async onLoad(options) {
     // //const sessionKey = await tools.checkSessionAndLogin();
     // //const sessionKey = await tools.checkSessionAndLogin();
     // console.log("onload..................................");
     // console.log("onload..................................");

+ 19 - 19
pages/answerAfterclasses/answerAfterclasses.js

@@ -205,25 +205,25 @@ Page({
   //   })
   //   })
 
 
   // }
   // }
-  // onShow: function () {
-  //   console.log("show0000000000000000000000000000000000000000000000000000000000000000000000");
-  //   console.log(wx.getStorageSync('answersId'),"onshow  的 answeid");
-  //   // console.log(wx.getStorageSync('questionList'+((wx.getStorageSync('answersId'))),"78978978979877777");
-  //   if (wx.getStorageSync('questionList'+wx.getStorageSync('answersId'))) {
-  //     console.log("缓村了锕");
-  //     const questionList = wx.getStorageSync('questionList'+wx.getStorageSync('answersId'));
-  //     this.setData({
-  //       questionList: questionList,
-  //       index: wx.getStorageSync('titleINDEX'+wx.getStorageSync('answersId')),
-  //       answersId: wx.getStorageSync('answersId'+wx.getStorageSync('answersId')),
-  //       chooseValue:wx.getStorageSync('chooseValue'+wx.getStorageSync('answersId')),
-  //     })
-  //     console.log(this.data.questionList,"show 缓存的数据");
-  //   }else{
-  //     this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
-  //     console.log(this.data.questionList,"show 没有缓存");
-  //   }
-  // },
+  onShow: function () {
+    console.log("show0000000000000000000000000000000000000000000000000000000000000000000000");
+    console.log(wx.getStorageSync('answersId'),"onshow  的 answeid");
+    // console.log(wx.getStorageSync('questionList'+((wx.getStorageSync('answersId'))),"78978978979877777");
+    if (wx.getStorageSync('questionList'+wx.getStorageSync('answersId'))) {
+      console.log("缓村了锕");
+      const questionList = wx.getStorageSync('questionList'+wx.getStorageSync('answersId'));
+      this.setData({
+        questionList: questionList,
+        index: wx.getStorageSync('titleINDEX'+wx.getStorageSync('answersId')),
+        answersId: wx.getStorageSync('answersId'+wx.getStorageSync('answersId')),
+        chooseValue:wx.getStorageSync('chooseValue'+wx.getStorageSync('answersId')),
+      })
+      console.log(this.data.questionList,"show 缓存的数据");
+    }else{
+      this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
+      console.log(this.data.questionList,"show 没有缓存");
+    }
+  },
   async onLoad(options) {
   async onLoad(options) {
     // //const sessionKey = await tools.checkSessionAndLogin();
     // //const sessionKey = await tools.checkSessionAndLogin();
     // console.log("onload..................................");
     // console.log("onload..................................");

+ 2 - 0
pages/evaluationCourse/evaluationCourse.js

@@ -509,6 +509,8 @@ Page({
     console.log(sessionKey,"对接下");
     console.log(sessionKey,"对接下");
     
     
     wx.setStorageSync('answersId', options.answersId);
     wx.setStorageSync('answersId', options.answersId);
+    console.log(options.answersId,"缓存answerid");
+    
     this.setData({
     this.setData({
       sessionKey: sessionKey,
       sessionKey: sessionKey,
       paperId: options.paperId,
       paperId: options.paperId,