roose 5 years ago
parent
commit
3c45465dd9

+ 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) {
     // //const sessionKey = await tools.checkSessionAndLogin();
     // 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) {
     // //const sessionKey = await tools.checkSessionAndLogin();
     // console.log("onload..................................");

+ 2 - 0
pages/evaluationCourse/evaluationCourse.js

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