|
@@ -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..................................");
|