roose пре 5 година
родитељ
комит
eff44290af
28 измењених фајлова са 2632 додато и 1175 уклоњено
  1. 17 9
      app.json
  2. 98 68
      pages/answerAfterclass/answerAfterclass.js
  3. 543 118
      pages/evaluationCourse/evaluationCourse.js
  4. 50 19
      pages/evaluationCourse/evaluationCourse.wxml
  5. 49 0
      pages/evaluationCourse/evaluationCourse.wxss
  6. 76 0
      pages/evaluationCourseDetail/evaluationCourseDetail.js
  7. 6 0
      pages/evaluationCourseDetail/evaluationCourseDetail.json
  8. 24 0
      pages/evaluationCourseDetail/evaluationCourseDetail.wxml
  9. 87 0
      pages/evaluationCourseDetail/evaluationCourseDetail.wxss
  10. 722 49
      pages/feedBack/feedBack.js
  11. 51 204
      pages/feedBack/feedBack.wxml
  12. 54 11
      pages/feedBack/feedBack.wxss
  13. 76 0
      pages/feedBackDetail/feedBackDetail.js
  14. 6 0
      pages/feedBackDetail/feedBackDetail.json
  15. 24 0
      pages/feedBackDetail/feedBackDetail.wxml
  16. 87 0
      pages/feedBackDetail/feedBackDetail.wxss
  17. 168 28
      pages/myClass/myClass.js
  18. 2 2
      pages/myClass/myClass.wxml
  19. 145 541
      pages/studentRegistration/studentRegistration.js
  20. 1 2
      pages/studentRegistration/studentRegistration.json
  21. 138 66
      pages/studentRegistration/studentRegistration.wxml
  22. 12 55
      pages/studentRegistration/studentRegistration.wxss
  23. 76 0
      pages/studentRegistrationDeyail/studentRegistrationDeyail.js
  24. 6 0
      pages/studentRegistrationDeyail/studentRegistrationDeyail.json
  25. 24 0
      pages/studentRegistrationDeyail/studentRegistrationDeyail.wxml
  26. 87 0
      pages/studentRegistrationDeyail/studentRegistrationDeyail.wxss
  27. 2 2
      pages/testAnswer/testAnswer.js
  28. 1 1
      pages/testAnswer/testAnswer.wxml

+ 17 - 9
app.json

@@ -1,31 +1,39 @@
 {
   "pages": [
-    "pages/welcome/welcome",
+ 
+    "pages/myClass/myClass",
+    "pages/studentRegistration/studentRegistration",
+   
+    "pages/evaluationCourse/evaluationCourse",
+  
+    "pages/studentRegistrationDeyail/studentRegistrationDeyail",
+    "pages/feedBack/feedBack",
     "pages/index/index",
+    "pages/testAnswer/testAnswer",
+    "pages/answerAfterclass/answerAfterclass",
+    "pages/feedBackDetail/feedBackDetail",
+    "pages/evaluationCourseDetail/evaluationCourseDetail",
+    "pages/welcome/welcome",
     "pages/onlineClass/onlineClass",
     "pages/dbDetails/dbDetails",
     "pages/dbVideo/dbVideo",
     "pages/zbDetails/zbDetails",
     "pages/myNotice/myNotice",
-    "pages/myClass/myClass",
     "pages/myInteractions/myInteractions",
     "pages/myMission/myMission",
     "pages/exhibitionList/exhibitionList",
     "pages/startClass/startClass",
     "pages/demandCourses/demandCourses",
-    
     "pages/personInfo/personInfo",
-    "pages/testAnswer/testAnswer",
     "pages/myInteractionsDetais/myInteractionsDetais",
     "pages/myPoints/myPoints",
-    "pages/evaluationCourse/evaluationCourse",
+    
     "pages/Identity/Identity",
     "pages/myTraining/myTraining",
     "pages/agoClass/agoClass",
-    "pages/feedBack/feedBack",
-    "pages/studentRegistration/studentRegistration",
-    "pages/grade/grade",
-    "pages/answerAfterclass/answerAfterclass"
+    
+    "pages/grade/grade"
+  
     
   ],
   "window": {

+ 98 - 68
pages/answerAfterclass/answerAfterclass.js

@@ -67,9 +67,9 @@ Page({
       questionList: this.data.questionList
     })
 
-    wx.setStorageSync('questionList'+wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('titleINDEX'+wx.getStorageSync('answersId'), this.data.index);
-    wx.setStorageSync('chooseValue'+wx.getStorageSync('answersId'), this.data.chooseValue);
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('titleINDEX' + wx.getStorageSync('answersId'), this.data.index);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
 
   },
   /*
@@ -97,13 +97,13 @@ Page({
     this.setData({
       questionList: this.data.questionList
     })
-    console.log(this.data.questionList,"7878787878");
-    
-    wx.setStorageSync('questionList'+wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('titleINDEX'+wx.getStorageSync('answersId'), this.data.index);
-    wx.setStorageSync('chooseValue'+wx.getStorageSync('answersId'), this.data.chooseValue);
+    console.log(this.data.questionList, "7878787878");
+
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('titleINDEX' + wx.getStorageSync('answersId'), this.data.index);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+
 
-  
 
   },
   /*
@@ -120,9 +120,9 @@ Page({
     this.setData({
       questionList: this.data.questionList
     })
-    wx.setStorageSync('questionList'+wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('titleINDEX'+wx.getStorageSync('answersId'), this.data.index);
-    wx.setStorageSync('chooseValue'+wx.getStorageSync('answersId'), this.data.chooseValue);
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('titleINDEX' + wx.getStorageSync('answersId'), this.data.index);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
 
   },
   /*
@@ -135,12 +135,12 @@ Page({
       this.setData({
         index: this.data.index + 1
       })
-      wx.setStorageSync('titleINDEX'+wx.getStorageSync('answersId'), this.data.index);
+      wx.setStorageSync('titleINDEX' + wx.getStorageSync('answersId'), this.data.index);
     } else {
       console.log(this.data.chooseValue);
-      if (wx.getStorageSync('chooseValue'+this.data.answersId)) {
+      if (wx.getStorageSync('chooseValue' + this.data.answersId)) {
         this.setData({
-          chooseValue: wx.getStorageSync('chooseValue'+this.data.answersId)
+          chooseValue: wx.getStorageSync('chooseValue' + this.data.answersId)
         })
       }
       this.submitAll(this.data.chooseValue);
@@ -150,7 +150,7 @@ Page({
     this.setData({
       index: this.data.index - 1
     })
-    wx.setStorageSync('titleINDEX'+wx.getStorageSync('answersId'), this.data.index);
+    wx.setStorageSync('titleINDEX' + wx.getStorageSync('answersId'), this.data.index);
     console.log(this.data.chooseValue, "88888888888888888888888888");
     console.log(this.data.chooseValue[this.data.index]);
 
@@ -205,60 +205,89 @@ 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..................................");
+    // //const sessionKey = await tools.checkSessionAndLogin();
+    // console.log("onload..................................");
+    // wx.setStorageSync('answersId', options.answersId);
+    // console.log(options.answersId,"传值的缓冲answersId");
+    // console.log(wx.getStorageSync('answersId'),"1111111111111111111");
+
+    // const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
+    // this.setData({
+    //   sessionKey: sessionKey,
+    //   paperId:options.paperId,
+    //   answersId:options.answersId,
+    //   id:options.id,
+    // })
+    // console.log(wx.getStorageSync('answersId'),"onload中  的 answeid");
+
+    // //....................  
+    // console.log(wx.getStorageSync('questionList'+wx.getStorageSync('answersId')),"111111111111111111111");
+    // if (wx.getStorageSync('questionList'+wx.getStorageSync('answersId'))) {
+    //   this.setData({
+    //     questionList: wx.getStorageSync('questionList'+wx.getStorageSync('answersId')),
+    //     index: wx.getStorageSync('titleINDEX'+wx.getStorageSync('answersId')),
+    //     answersId: wx.getStorageSync('answersId'+wx.getStorageSync('answersId')),
+    //     chooseValue:wx.getStorageSync('chooseValue'+wx.getStorageSync('answersId')),
+    //   })
+    //   console.log("onload  有缓存");
+    //   console.log(this.data.questionList,"onload  有缓存的数据");
+    // } else {
+    //   console.log("onload  没有缓存");
+
+    //   this.allShi(options.id, options.paperId, sessionKey);
+    // }
+    // //....................
+
+    const sessionKey = await tools.checkSessionAndLogin();
+    //const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
+    console.log("onloading.....................");
     wx.setStorageSync('answersId', options.answersId);
-    console.log(options.answersId,"传值的缓冲answersId");
-    console.log(wx.getStorageSync('answersId'),"1111111111111111111");
-    
-    const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
     this.setData({
       sessionKey: sessionKey,
-      paperId:options.paperId,
-      answersId:options.answersId,
-      id:options.id,
+      paperId: options.paperId,
+      answersId: options.answersId,
+      id: options.id,
     })
-    console.log(wx.getStorageSync('answersId'),"onload中  的 answeid");
-    
-    //....................  
-    console.log(wx.getStorageSync('questionList'+wx.getStorageSync('answersId')),"111111111111111111111");
-    if (wx.getStorageSync('questionList'+wx.getStorageSync('answersId'))) {
+    console.log(options.answersId, "00000000000000000000000000");
+    console.log(wx.getStorageSync('answersId'), "1111111111111");
+    if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
+      console.log("缓村了锕");
+      const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
       this.setData({
-        questionList: wx.getStorageSync('questionList'+wx.getStorageSync('answersId')),
-        index: wx.getStorageSync('titleINDEX'+wx.getStorageSync('answersId')),
-        answersId: wx.getStorageSync('answersId'+wx.getStorageSync('answersId')),
-        chooseValue:wx.getStorageSync('chooseValue'+wx.getStorageSync('answersId')),
+        questionList: questionList,
+        answersId: wx.getStorageSync('answersId'),
+        chooseValue: wx.getStorageSync('chooseValue' + wx.getStorageSync('answersId')),
+        index: wx.getStorageSync('titleINDEX' + wx.getStorageSync('answersId')),
       })
-      console.log("onload  有缓存");
-      console.log(this.data.questionList,"onload  有缓存的数据");
-    } else {
-      console.log("onload  没有缓存");
-      
+      console.log(this.data.questionList, "show 缓存的数据");
+    }else{
+      console.log("无缓存");
       this.allShi(options.id, options.paperId, sessionKey);
     }
-    //....................
+    
+
   },
- 
+
   allShi(id, paperId, sessionKey) {
     wx.request({
       url: app.globalData.publicUrl + '/wx/paper/detail',
@@ -295,7 +324,7 @@ Page({
         this.setData({
           questionList: jsonArr
         })
-        wx.setStorageSync('questionList'+wx.getStorageSync('answersId'), this.data.questionList);
+        wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
       }
     })
   },
@@ -311,26 +340,27 @@ Page({
       },
       success: (res) => {
         console.log(res);
-        if(res.data.msg=='请勿重复提交'){
+        if (res.data.msg == '请勿重复提交') {
           wx.showModal({
             showCancel: false,
-            content: '当前老师批阅中,'+res.data.msg,
+            content: '当前老师批阅中,' + res.data.msg,
             success(res) {}
           })
-        }else{
+        } else {
           if (res.data.code == 0) {
             console.log(res, "为我么我们微妙"); // 提交答案是后
             // this.setData({
             //   answersId: res.data.answersId
             // })
             // this.allShi(id, paperId, sessionKey);
-            wx.navigateTo({
-              url: '/pages/testAnswer/testAnswer',
+            wx.switchTab({
+              url: '/pages/myClass/myClass',
             })
+           
           }
         }
-  
-     
+
+
       }
     })
   }

+ 543 - 118
pages/evaluationCourse/evaluationCourse.js

@@ -1,146 +1,571 @@
-//logs.js
-// const util = require('../../utils/util.js')
-// const app = require('../../utils/util.js');
+//index.js
+//获取应用实例    studentRegistration
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
 Page({
   data: {
-    showSelect: false, //多选的问题
-    manyi: [{
-      id: 1,
-      name: '不满意'
-    }, {
-      id: 2,
-      name: '一般'
-    }, {
-      id: 3,
-      name: '满意'
-    }],
-    checkboxArr: [{
-        checked: false,
-        id: "1",
-        name: "通俗易懂",
-      },
-      {
-        checked: false,
-        id: "2",
-        name: "准点时间",
-      },
-      {
-        checked: false,
-        id: "3",
-        name: "礼貌友好",
-      },
-      {
-        checked: false,
-        id: "4",
-        name: "携带工具",
-      },
-      {
-        checked: false,
-        id: "5",
-        name: "认真",
-      },
-      {
-        checked: false,
-        id: "6",
-        name: "很专心",
-      },
-      {
-        checked: false,
-        id: "7",
-        name: "积极向上",
-      },
-      {
-        checked: false,
-        id: "8",
-        name: "完成服务培训标准",
-      },
+    nameIsTrue: false, //名字是否填写
+    cultureIsTrue: false, //文化是否填写
+    graduationIsTrue: false, //毕业学校
+    majorIsTrue: false, //所有专业
+    postIsTrue: false, //现任职务
+    renzhishijianIsTrue: false,
+    phoneIsTrue: false, //电话
+    peixunshijianTrue: false, // 培训时间
+    nameMessage: '',
+    zaizhiTime: [], //在线时间
+    peixunTime: '', //培训时间
+    headmasterText: [], // 
+    names: [],
+    timeIndex: '',
+    chooseValue: [], // 选择的答案序列
+    radio: '1',
+    renzhiDate: '',
+    postshow: [],
+    postshow1: false,
+    errorIsTrue: false,
+    currentDate: new Date().getTime(),
+    currentDate1: new Date().getTime(),
+    minDate: new Date().getTime,
+    formatter(type, value) {
+      if (type === 'year') {
+        return `${value}年`;
+      } else if (type === 'month') {
+        return `${value}月`;
+      }
+      return value;
+    },
+    questionList: [
+      // {
+      //   "QuestType": "6",
+      //   "Id": 11,
+      //   name: 'ccccc',
+      //   QuestStem: '时间选择',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "5",
+      //   "Id": 11,
+      //   name: 'dddd',
+      //   QuestStem: '姓名输入',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "6",
+      //   "Id": 11,
+      //   name: 'username111',
+      //   QuestStem: '时间2',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "5",
+      //   "Id": 11,
+      //   name: 'address',
+      //   QuestStem: '姓名输入',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "0",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '美国'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: 'true'
+      //     },
+      //     {
+      //       value: 'BRA',
+      //       name: '巴西'
+      //     },
+      //     {
+      //       value: 'JPN',
+      //       name: '日本'
+      //     },
+      //     {
+      //       value: 'ENG',
+      //       name: '英国'
+      //     },
+      //     {
+      //       value: 'FRA',
+      //       name: '法国'
+      //     },
+      //   ],
+      //   "Id": 36,
+      //   name: 'sex',
+      //   QuestStem: '性别单选'
+      // },
+      // {
+      //   "QuestType": "0",
+      //   "QuestChoice": [{
+      //       value: '男',
+      //       name: '男',
+      //       checked: false,
+      //     },
+      //     {
+      //       value: '女',
+      //       name: '女',
+      //       checked: false,
+      //     },
+      //   ],
+      //   "Id": 36,
+      //   name: 'sex111',
+      //   QuestStem: '性别单选2222'
+      // },
+      // {
+      //   "QuestType": "1",
+      //   "QuestAnswer": "equals ()||\nhashCode()||",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '美国'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //     {
+      //       value: 'FRA',
+      //       name: '法国'
+      //     }
+      //   ],
+      //   "Id": 38,
+      //   name: 'alls',
+      //   QuestStem: '多选'
+      // },
+
+      // {
+      //   "QuestType": "2",
+      //   "QuestStem": "1+1=2",
+      //   "QuestAnswer": "是",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '是'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //   ],
+      //   "Id": 42,
+      //   name: 'lllll',
+      //   QuestStem: '判断1'
+      // },
+      // {
+      //   "QuestType": "2",
+      //   "QuestStem": "1+1=2",
+      //   "QuestAnswer": "是",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '是'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //   ],
+      //   "Id": 42,
+      //   name: 'lllll',
+      //   QuestStem: '判断2'
+      // },
+      // {
+      //   "QuestType": "2",
+      //   "QuestStem": "1+1=2",
+      //   "QuestAnswer": "是",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '是'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //   ],
+      //   "Id": 42,
+      //   name: 'lllll',
+      //   QuestStem: '判断3'
+      // },
+      // {
+      //   "QuestType": "3",
+      //   "QuestStem": "世纪大厦的萨科技的哈市(解答)",
+      //   "QuestAnswer": "",
+      //   "QuestChoice": "",
+      //   "Id": 39,
+      //   name: 'textarea',
+      // },
     ],
-    remarks: [],
-    arr: [],
+    answersId: '', // 提交答案用到
+    sessionKey: '',
+    paperId: '',
+    answersId: '',
+    id: '',
+    status: ''
+  },
+  onChange(event) {
+    this.setData({
+      radio: event.detail,
+    });
+  },
+  radioChange(e) {
+    console.log(e);
+    const items = this.data.questionList[e.currentTarget.dataset.index].QuestChoice
+    for (let i = 0, len = items.length; i < len; ++i) {
+      items[i].checked = items[i].value === e.detail.value
+    }
+    let json = {};
+    json.currentAnswer = e.detail.value;
+    json.id = e.currentTarget.dataset.idx;
+    json.questType = e.currentTarget.dataset.questtypes;
+    this.data.chooseValue[e.currentTarget.dataset.index] = json;
+    this.setData({
+      questionList: this.data.questionList
+    })
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+    console.log(this.data.questionList);
+  },
+  checkboxChange(e) {
+    const items = this.data.questionList[e.currentTarget.dataset.index].QuestChoice
+    const values = e.detail.value
+    for (let i = 0, lenI = items.length; i < lenI; ++i) {
+      items[i].checked = false
+      for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
+        if (items[i].value === values[j]) {
+          items[i].checked = true
+          break
+        }
+      }
+    }
+    let json = {};
+    let aa = e.detail.value.join("||")
+    json.currentAnswer = aa;
+    json.id = e.currentTarget.dataset.idx;
+    json.questType = e.currentTarget.dataset.questtypes;
+    this.data.chooseValue[e.currentTarget.dataset.index] = json;
+    this.setData({
+      questionList: this.data.questionList
+    })
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+  },
+  bindTextAreaBlur(e) {
+    console.log(e, "hhhhh");
+    console.log(e.detail.value);
+    let json = {};
+    json.currentAnswer = e.detail.value;
+    json.id = e.currentTarget.dataset.idx;
+    json.questType = e.currentTarget.dataset.questtypes;
+    this.data.chooseValue[e.currentTarget.dataset.index] = json;
+    this.data.questionList[e.currentTarget.dataset.index].QuestAnswer = e.detail.value;
+    this.setData({
+      questionList: this.data.questionList
+    })
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+  },
+  share() {
+    this.setData({
+      show: true
+    });
+  },
+  onClose() {
+    this.setData({
+      ['postshow[' + this.data.timeIndex + ']']: false,
+    });
+  },
+  onClose1() {
+    console.log("11111111111111");
+    this.setData({
+      postshow1: false
+    });
+  },
+  onInput(event) {
+    console.log(event, "8888888");
+
+    console.log("点击了");
+    this.setData({
+      currentDate: event.detail,
+    });
+  },
+  onInput1(event) {
+    console.log("000");
+    this.setData({
+      currentDate1: event.detail,
+    });
+  },
+
+  formatDate(date) {
+    date = new Date(date);
+    return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
   },
-  parameterTap(e) {
+
+  share1(e) {
+    console.log(e);
+    console.log(e.currentTarget.dataset.index);
+    console.log(e.currentTarget.dataset.names, "8520852085208520");
+    console.log(this.data.postshow[e.currentTarget.dataset.index]);
+    this.data.postshow[e.currentTarget.dataset.index] = true;
+    this.data.names[e.currentTarget.dataset.index] = e.currentTarget.dataset.names;
+    this.setData({
+      postshow: this.data.postshow,
+      timeIndex: e.currentTarget.dataset.index
+    })
+    console.log(this.data.postshow, "打印下锕啊啊啊啊锕锕锕");
+  },
+  share() {
+    this.setData({
+      postshow1: true
+    });
+  },
+  formatDate(date) {
+    date = new Date(date);
+    return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
+  },
+  onConfirm(event) {
+    console.log(event, "1111111");
+    let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
+    let json = {};
+    json.currentAnswer = timeValue;
+    json.id = event.currentTarget.dataset.idx;
+    json.questType = event.currentTarget.dataset.questtypes;
+    let aa = this.data.chooseValue[event.currentTarget.dataset.index] = json;
+    this.data.questionList[event.currentTarget.dataset.index].QuestAnswer = timeValue;
+    this.setData({
+      questionList: this.data.questionList,
+      ['chooseValue[' + event.currentTarget.dataset.index + ']']: aa,
+      ['postshow[' + this.data.timeIndex + ']']: false,
+      ['headmasterText[' + this.data.timeIndex + ']']: '',
+    });
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+    console.log(this.data.chooseValue, "确定后的值锕");
+    console.log(this.data.questionList, "789789798789");
+  },
+  onConfirm1(event) {
+    console.log(event, "0000");
+    let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
+    this.setData({
+      peixunTime: timeValue,
+      postshow1: false,
+      peixunText: ''
+    });
+  },
+  parameterTap: function (e) { //e是获取e.currentTarget.dataset.id所以是必备的,跟前端的data-id获取的方式差不多
     let that = this
     let this_checked = e.currentTarget.dataset.id
-    let parameterList = this.data.manyi
+    let parameterList = this.data.parameter //获取Json数组
     for (let i = 0; i < parameterList.length; i++) {
       if (parameterList[i].id == this_checked) {
-        parameterList[i].checked = true;
+        parameterList[i].checked = true; //当前点击的位置为true即选中
       } else {
-        parameterList[i].checked = false;
+        parameterList[i].checked = false; //其他的位置为false
       }
     }
     that.setData({
-      manyi: parameterList
+      parameter: parameterList
     })
   },
-  // checkboxChange(e) {
-  //   console.log('checkbox发生change事件,携带value值为:', e.detail.value)
+  // submitForm() {
+  //   //let arr1 = this.data.chooseValue.filter(d => d);
+  //   //console.log(arr1,"打印下提交");
+  //   console.log(this.data.chooseValue, "打印下提交");
+  //   let isTrue = false;
+  //   this.data.chooseValue.forEach(item => {
+  //     console.log(item, "123123");
+  //     if (item.currentAnswer) {
+  //       isTrue = true;
 
-  //   const items = this.data.checkboxArr
-  //   const values = e.detail.value
-  //   this.setData({
-  //     remarks: values
+  //     } else {
+  //       wx.showModal({
+  //         showCancel: false,
+  //         content: item.QuestStem + "不能为空",
+  //         success(res) {}
+  //       })
+  //     }
   //   })
-  //   for (let i = 0, lenI = items.length; i < lenI; ++i) {
-  //     items[i].checked = false
-
-  //     for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
-  //       if (items[i].name === values[j]) {
-  //         items[i].checked = true
-  //         this.setData({
-  //           showSelect:true
-  //         })
-  //         console.log(this.data.showSelect, "55555");
-
-  //         break
+  //   if (isTrue) {
+  //     console.log("提交了");
+  //     wx.request({
+  //       url: app.globalData.publicUrl + '/wx/paper/commit',
+  //       method: "post",
+  //       data: {
+  //         sessionKey: this.data.sessionKey,
+  //         currentAnswerTemp: this.data.chooseValue,
+  //         answersId: wx.getStorageSync('answersId')
+  //       },
+  //       success: (res) => {
+  //         console.log(res);
   //       }
-  //     }
+  //     })
   //   }
-  //   this.setData({
-  //     items
-  //   })
   // },
-  checkboxChange: function (event) {
-    console.log(event, "000000000000000000000");
-
-    for (let i = 0; i < this.data.checkboxArr.length; i++) {
-      if (event.currentTarget.id == this.data.checkboxArr[i].id) {
-        if (this.data.checkboxArr[i].checked == true) {
-          this.data.arr.pop(this.data.checkboxArr[i].name);
-          console.log("8588888888888888");
-          this.data.checkboxArr[i].checked = false;
-          let checkboxArr = this.data.checkboxArr;
-          this.setData({
-            checkboxArr,
-            remarks: this.data.arr
+  submitForm() {
+    console.log(this.data.chooseValue, "打印下提交");
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/paper/commit',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        currentAnswerTemp: this.data.chooseValue,
+        answersId: wx.getStorageSync('answersId')
+      },
+      success: (res) => {
+        console.log(res);
+        if(res.data.msg == "请勿重复提交"){
+          wx.showModal({
+            showCancel: false,
+            content: res.data.msg,
+            success(res) {}
+          })
+        }else{
+          wx.switchTab({
+            url: '/pages/myClass/myClass',
           })
-        } else {
-          this.data.arr.push(this.data.checkboxArr[i].name);
-          this.data.checkboxArr[i].checked = true;
-          let checkboxArr = this.data.checkboxArr;
-          this.setData({
-              checkboxArr,
-              remarks: this.data.arr
-            }),
-            console.log(this.data.remarks, "333333333333333333");
-
         }
+      
       }
+    })
+    // let isTrue = false;
+    // this.data.chooseValue.forEach(item => {
+    //   console.log(item, "123123");
+    //   if (item.currentAnswer) {
+    //     isTrue = true;
+    //   } else {
+    //     wx.showModal({
+    //       showCancel: false,
+    //       content: item.QuestStem + "不能为空",
+    //       success(res) {}
+    //     })
+    //   }
+    // })
+    // if (isTrue) {
+    //   console.log("提交了");
+    //   wx.request({
+    //     url: app.globalData.publicUrl + '/wx/paper/commit',
+    //     method: "post",
+    //     data: {
+    //       sessionKey: this.data.sessionKey,
+    //       currentAnswerTemp: this.data.chooseValue,
+    //       answersId: wx.getStorageSync('answersId')
+    //     },
+    //     success: (res) => {
+    //       console.log(res);
+    //       if(res.data.msg == "请勿重复提交"){
+    //         wx.showModal({
+    //           showCancel: false,
+    //           content: res.data.msg,
+    //           success(res) {}
+    //         })
+    //       }else{
+    //         wx.navigateTo({
+    //           url: '/pages/myClass/myClass',
+    //         })
+    //       }
+        
+    //     }
+    //   })
+    // }
+
+
+  },
+  timeFormat(date, fmt) {
+    let o = {
+      "M+": date.getMonth() + 1, //月份   
+      "d+": date.getDate(), //日
+      "h+": date.getHours(), //小时   
+      "m+": date.getMinutes(), //分   
+      "s+": date.getSeconds(), //秒   
+      "q+": Math.floor((date.getMonth() + 3) / 3), //季度   
+      "S": date.getMilliseconds() //毫秒   
+    };
+    if (/(y+)/.test(fmt))
+      fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (let k in o)
+      if (new RegExp("(" + k + ")").test(fmt))
+        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+    return fmt;
+
+  },
+  onReady: function () {},
+  async onLoad (options) {
+    //const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
+    console.log("onloading.....................");
+   
+    const sessionKey = await tools.checkSessionAndLogin();
+    console.log(sessionKey,"对接下");
+    
+    wx.setStorageSync('answersId', options.answersId);
+    this.setData({
+      sessionKey: sessionKey,
+      paperId: options.paperId,
+      answersId: options.answersId,
+      id: options.id,
+    })
+    if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
+      console.log("缓村了锕");
+      const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
+      this.setData({
+        questionList: questionList,
+        answersId: wx.getStorageSync('answersId' + wx.getStorageSync('answersId')),
+        chooseValue: wx.getStorageSync('chooseValue' + wx.getStorageSync('answersId')),
+      })
+      console.log(this.data.questionList, "show 缓存的数据");
+    } else {
+      console.log("无缓存");
+      this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
     }
+
   },
-  formSubmit(e) {
-    console.log("提交评价");
-    console.log(this.data.remarks);
-    let pingjia = ''
-    this.data.manyi.forEach(item => {
-      if (item.checked) {
-        pingjia = item.name;
+  allShi(id, paperId, sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/paper/detail',
+      method: "post",
+      data: {
+        sessionKey: sessionKey,
+        id: id,
+        paperId: paperId
+      },
+      success: (res) => {
+        let jsonArr = JSON.parse(res.data.paperContent).map(item => {
+          let json = {};
+          json.QuestType = item.QuestType;
+          json.Id = item.Id;
+          json.QuestAnswer = item.QuestAnswer;
+          json.QuestStem = item.QuestStem;
+          if (item.QuestType == '1' || item.QuestType == '0') {
+            let arr = item.QuestChoice.split('||');
+            let arrJson = arr.map(item => {
+              let json1 = {};
+              json1.name = item;
+              json1.value = item;
+              json1.checked = false;
+              return json1
+            });
+            json.QuestChoice = arrJson;
+          }
+          return json;
+        })
+        //  答案锕 
+        let chooceArr = jsonArr.map(item => {
+          let json = {};
+          json.currentAnswer = '';
+          json.questType = '';
+          json.id = item.Id;
+          json.QuestStem = item.QuestStem;
+          return json
+        })
+        this.setData({
+          questionList: jsonArr,
+          chooseValue: chooceArr
+        })
+        console.log(this.data.questionList, "00000");
+        wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+        wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
       }
     })
-    console.log(pingjia,"11111");
-    
   },
-  onLoad: function () {
-
-  }
 })

+ 50 - 19
pages/evaluationCourse/evaluationCourse.wxml

@@ -1,30 +1,61 @@
 <view class='container'>
-		<view class="box">
-			<van-divider contentPosition="center" customStyle="color: #666666; border-color: #b9b9b9; font-size: 25rpx;">您对此次课程满意么?</van-divider>
-			<view class='parameter-wrap'>
-				<block wx:for="{{manyi}}" wx:key="manyi">
-					<text class='manyi-info {{item.checked?"checked_parameter":""}}' name="" data-id='{{item.id}}' bindtap='parameterTap'>{{item.name}}</text>
-				</block>
+	<view class="box">
+		<van-divider contentPosition="center" customStyle="color: #666666; border-color: #b9b9b9; font-size: 25rpx;">您对此次课程满意么?</van-divider>
+		<!-- <view class='parameter-wrap'>
+			<block wx:for="{{manyi}}" wx:key="manyi">
+				<text class='manyi-info {{item.checked?"checked_parameter":""}}' name="" data-id='{{item.id}}' bindtap='parameterTap'>{{item.name}}</text>
+			</block>
+		</view> -->
+		<view wx:for="{{questionList}}">
+			<view class='fwb' wx:if="{{ item.QuestType == 0}}">
+				<view class='weui-input' style=" background: white">
+					<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="radioChange">
+						<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
+							<radio value="{{ item.value }}" />{{item.name}}
+						</label>
+					</radio-group>
+					<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+				</view>
+			</view>
+			<view class='fwb' wx:if="{{ item.QuestType == 1}}">
+				<view class="xingbie">{{item.QuestStem}}</view>
+				<view class='weui-input' style=" background: white">
+					<checkbox-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="checkboxChange">
+						<label class="checkbox   my-choosebox1 {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
+							<checkbox value="{{ item.value }}" />{{item.name}}
+						</label>
+					</checkbox-group>
+					<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+				</view>
+			</view>
+			<view class='fwb' wx:if="{{ item.QuestType == 3}}">
+				<view class="xingbie">{{item.QuestStem}}</view>
+				<view class='weui-input'>
+					<textarea value="{{item.QuestAnswer}}" name="{{item.name}}" data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx='{{item.Id}}' bindinput='bindTextAreaBlur' placeholder="请输入" maxlength='500' />
+					<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+				</view>
 			</view>
 		</view>
-		<!-- <view class="box" style="background:rgba(244,244,244,1);margin-top:80rpx;margin-bottom:50rpx">
+	</view>
+
+	<!-- <view class="box" style="background:rgba(244,244,244,1);margin-top:80rpx;margin-bottom:50rpx">
 		<checkbox-group bindchange="checkboxChange" name="orientation" class="group">
 			<label class="rzqxList" wx:key="unique" wx:for="{{checkboxArr}}" wx:for-item="item">
 				<checkbox value="{{item.code}}" checked="{{item.checked}}" />{{item.name}}
 			</label>
 		</checkbox-group>
 	</view> -->
-		<view class="box11" style="background:rgba(244,244,244,1);margin-top:80rpx;margin-bottom:50rpx">
-			<block wx:for="{{checkboxArr}}" wx:key="id">
-				<view class="rzqxList {{item.checked?'xuanzhongbox':''}} ">
-					<view catchtap='checkboxChange' id="{{item.id}}">
-						{{item.name}}
-					</view>
+	<!-- <view class="box11" style="background:rgba(244,244,244,1);margin-top:80rpx;margin-bottom:50rpx">
+		<block wx:for="{{checkboxArr}}" wx:key="id">
+			<view class="rzqxList {{item.checked?'xuanzhongbox':''}} ">
+				<view catchtap='checkboxChange' id="{{item.id}}">
+					{{item.name}}
 				</view>
-			</block>
-		</view>
-		<textarea placeholder-style="font-size:26rpx;" class="view_textarea" value="{{remarks}}" name="remarks" bindblur="bindTextAreaBlur" placeholder="还想说点啥?写在这里吧!">
-    </textarea>
-		<button class="mini-btn" bindtap="formSubmit">提交评价</button>
-	
+			</view>
+		</block>
+	</view>
+	<textarea placeholder-style="font-size:26rpx;" class="view_textarea" value="{{remarks}}" name="remarks" bindblur="bindTextAreaBlur" placeholder="还想说点啥?写在这里吧!">
+    </textarea> -->
+	<button class="mini-btn" bindtap="submitForm">提交评价</button>
+
 </view>

+ 49 - 0
pages/evaluationCourse/evaluationCourse.wxss

@@ -72,3 +72,52 @@ button:not([size='mini']) {
 .rzqxList:nth-child(5){
   margin-left: 30rpx;
 }
+
+
+
+.weui-input radio {
+  display: none;
+
+}
+
+.weui-input checkbox {
+  display: none;
+}
+
+.my-choosebox {
+  color: rgba(51, 51, 51, 1);
+  width: 200rpx;
+  line-height: 100rpx;
+  border:2rpx solid rgba(211,211,211,1);
+  padding: 20rpx 50rpx;
+  margin: 20rpx;
+  border-radius: 10rpx;
+
+}
+.checkboxbox {
+  background: linear-gradient(90deg, rgba(215, 47, 29, 1), rgba(249, 157, 48, 1)) !important;
+  color: white !important;
+ 
+}
+
+
+textarea {
+  background: rgba(244, 244, 244, 1);
+  border-radius: 10px;
+  border: 1rpx solid rgba(244, 244, 244, 1);
+  width: 100%;
+  height: 194rpx;
+  margin-top: 20rpx;
+}
+.xingbie {
+  font-size: 28rpx;
+}
+.my-choosebox1 {
+  color: rgba(51, 51, 51, 1);
+  width: 100rpx;
+  line-height: 100rpx;
+  border:2rpx solid rgba(211,211,211,1);
+  padding: 5rpx 10rpx;
+  margin: 20rpx;
+  border-radius: 10rpx;
+}

+ 76 - 0
pages/evaluationCourseDetail/evaluationCourseDetail.js

@@ -0,0 +1,76 @@
+//index.js
+//获取应用实例
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
+Page({
+  data: {
+    // 课程轮播
+    "bnrUrl": [{
+      "url": "/images/banner2.jpg",
+      "name": "二期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }, {
+      "url": "/images/banner1.jpg",
+      "name": "三期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }, {
+      "url": "/images/banner2.jpg",
+      "name": "四期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }],
+    gridArr: [
+      // {
+      //   "num": "1",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+      // {
+      //   "num": "2",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化、同年检',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+      // {
+      //   "num": "3",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化、同年检',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+    ],
+
+  },
+  chengji(sessionKey, answersId) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/answer/detail',
+      method: "post",
+      data: {
+        sessionKey: sessionKey,
+        answersId: answersId
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res, "suoyoude");
+          this.setData({
+            gridArr:res.data.list
+          })
+          console.log(this.data.gridArr);
+        }
+      }
+    })
+  },
+  onReady: function () {},
+  async onLoad(options) {
+    console.log(options.answersId);
+    console.log("onload..................................");
+    let answersId = options.answersId;
+    const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
+    //const sessionKey = await tools.checkSessionAndLogin();  
+    this.chengji(sessionKey, answersId);
+
+  },
+
+})

+ 6 - 0
pages/evaluationCourseDetail/evaluationCourseDetail.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText":"我的评价",
+  "navigationBarBackgroundColor": "#eb3f33",
+  "navigationBarTextStyle": "white"
+}

+ 24 - 0
pages/evaluationCourseDetail/evaluationCourseDetail.wxml

@@ -0,0 +1,24 @@
+<view class="home">
+	<view class="box">
+		<view class="redk"></view>我的评价
+		<view class="cuoti-box" wx:for="{{gridArr}}">
+			<view class="number">
+				{{index+1}}
+			</view>
+			<view class="wenti">
+				<view style=" margin-right: 20rpx;">
+					{{item.questStem}} :{{item.currentAnswer}}
+				</view>
+				<!-- <view class="daan">
+					正确答案: <view class="zhengquedaan">{{item.correctAnswer}}</view>
+				</view> -->
+				<!-- <view class="daan">
+					我的答案: <view class="wodedaan">{{item.currentAnswer}}</view>
+				</view>
+				<view class="daan">
+					分数: <view class="wodedaan">{{item.score}}</view>
+				</view> -->
+			</view>
+		</view>
+	</view>
+</view>

+ 87 - 0
pages/evaluationCourseDetail/evaluationCourseDetail.wxss

@@ -0,0 +1,87 @@
+
+.box {
+  margin: 0 40rpx;
+  background-color: white;
+  border-radius: 20rpx;
+  padding-top: 30rpx;
+  font-size: 26rpx;
+  padding-bottom: 20rpx;
+}
+.yuan{
+  height: 160rpx;
+  width: 160rpx;
+  border-radius: 50%;
+  background-color: white;
+   display: flex;
+   flex-direction: column;
+   text-align: center;
+  margin: 0 auto;
+   
+}
+.title{
+  font-size: 20rpx;
+  color: white;
+}
+.fen{
+  font-size: 50rpx;
+  color: white;
+  margin-top: 10rpx;
+}
+.nei{
+  height: 123rpx;
+  width: 123rpx;
+  background-color: #EB3F33;
+  border-radius: 50%;
+  margin: 0 auto;
+  margin-top: 18rpx;
+  box-shadow:rgba(235,63,51,0.3) 0px 0px 20px;
+  
+}
+.redk {
+  height: 33rpx;
+  width: 8rpx;
+  background-color: #eb3f33;
+  border-radius: 5rpx;
+  margin-right: 10rpx;
+  margin-left: 40rpx;
+  float: left;
+}
+.cuoti-box{
+  background:rgba(172,213,152,0.2);
+  border-radius:7rpx;
+  display: flex;
+  margin: 40rpx;
+  padding-top: 10rpx;
+  padding-left: 10rpx;
+}
+.wenti{
+  text-align: justify;
+  font-size: 25rpx;
+  margin-left: 20rpx;
+  width: 620rpx;
+}
+.daan{
+  font-size: 21rpx;
+  margin: 20rpx 20rpx 20rpx 0rpx;
+}
+.number{
+  height: 30rpx;
+  line-height: 30rpx;
+  width: 34rpx;
+  border-radius: 34rpx;
+  border: 1rpx solid black;
+  text-align: center;
+}
+.zhengquedaan{
+  display: inline-block;
+  color: #00B627;
+}
+.wodedaan{
+  display: inline-block;
+  color: #EB3F33;
+}
+
+page {
+  background:#F4F4F4
+  
+}

+ 722 - 49
pages/feedBack/feedBack.js

@@ -1,79 +1,752 @@
 //index.js
 //获取应用实例
 const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
 Page({
   data: {
     nameIsTrue: false, //名字是否填写
     cultureIsTrue: false, //文化是否填写
-    classList: [{
-        id: '1',
-        name: '班级1'
-      },
-      {
-        id: '2',
-        name: '班级2'
-      },
-    ],
-    classText: '请选择培训班次',
-    classIndex: null,
+    graduationIsTrue: false, //毕业学校
+    majorIsTrue: false, //所有专业
+    postIsTrue: false, //现任职务
+    renzhishijianIsTrue: false,
+    phoneIsTrue: false, //电话
+    peixunshijianTrue: false, // 培训时间
+    nameMessage: '',
+    zaizhiTime: [], //在线时间
+    peixunTime: '', //培训时间
+    headmasterText: [], // 
+    names: [],
+    timeIndex: '',
+    chooseValue: [], // 选择的答案序列
+    radio: '1',
+    renzhiDate: '',
+    postshow: [],
+    postshow1: false,
+    errorIsTrue: false,
+    currentDate: new Date().getTime(),
+    currentDate1: new Date().getTime(),
+    minDate: new Date().getTime,
+    formatter(type, value) {
+      if (type === 'year') {
+        return `${value}年`;
+      } else if (type === 'month') {
+        return `${value}月`;
+      }
+      return value;
+    },
+    questionList: [
+      // {
+      //   "QuestType": "6",
+      //   "Id": 11,
+      //   name: 'ccccc',
+      //   QuestStem: '时间选择',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "5",
+      //   "Id": 11,
+      //   name: 'dddd',
+      //   QuestStem: '姓名输入',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "6",
+      //   "Id": 11,
+      //   name: 'username111',
+      //   QuestStem: '时间2',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "5",
+      //   "Id": 11,
+      //   name: 'address',
+      //   QuestStem: '姓名输入',
+      //   QuestAnswer: ''
+      // },
+      // {
+      //   "QuestType": "0",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '美国'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: 'true'
+      //     },
+      //     {
+      //       value: 'BRA',
+      //       name: '巴西'
+      //     },
+      //     {
+      //       value: 'JPN',
+      //       name: '日本'
+      //     },
+      //     {
+      //       value: 'ENG',
+      //       name: '英国'
+      //     },
+      //     {
+      //       value: 'FRA',
+      //       name: '法国'
+      //     },
+      //   ],
+      //   "Id": 36,
+      //   name: 'sex',
+      //   QuestStem: '性别单选'
+      // },
+      // {
+      //   "QuestType": "0",
+      //   "QuestChoice": [{
+      //       value: '男',
+      //       name: '男',
+      //       checked: false,
+      //     },
+      //     {
+      //       value: '女',
+      //       name: '女',
+      //       checked: false,
+      //     },
+      //   ],
+      //   "Id": 36,
+      //   name: 'sex111',
+      //   QuestStem: '性别单选2222'
+      // },
+      // {
+      //   "QuestType": "1",
+      //   "QuestAnswer": "equals ()||\nhashCode()||",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '美国'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //     {
+      //       value: 'FRA',
+      //       name: '法国'
+      //     }
+      //   ],
+      //   "Id": 38,
+      //   name: 'alls',
+      //   QuestStem: '多选'
+      // },
 
-    headmasterList: [{
-        id: '1',
-        name: '班主任1'
-      },
-      {
-        id: '2',
-        name: '班主任2'
-      },
-    ],
-    headmasterText: '请选择班主任',
-    headmasterIndex: null,
+      // {
+      //   "QuestType": "2",
+      //   "QuestStem": "1+1=2",
+      //   "QuestAnswer": "是",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '是'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //   ],
+      //   "Id": 42,
+      //   name: 'lllll',
+      //   QuestStem: '判断1'
+      // },
+      // {
+      //   "QuestType": "2",
+      //   "QuestStem": "1+1=2",
+      //   "QuestAnswer": "是",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '是'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //   ],
+      //   "Id": 42,
+      //   name: 'lllll',
+      //   QuestStem: '判断2'
+      // },
+      // {
+      //   "QuestType": "2",
+      //   "QuestStem": "1+1=2",
+      //   "QuestAnswer": "是",
+      //   "QuestChoice": [{
+      //       value: 'USA',
+      //       name: '是'
+      //     },
+      //     {
+      //       value: 'CHN',
+      //       name: '中国',
+      //       checked: false
+      //     },
+      //   ],
+      //   "Id": 42,
+      //   name: 'lllll',
+      //   QuestStem: '判断3'
+      // },
+      // {
+      //   "QuestType": "3",
+      //   "QuestStem": "世纪大厦的萨科技的哈市(解答)",
+      //   "QuestAnswer": "",
+      //   "QuestChoice": "",
+      //   "Id": 39,
+      //   name: 'textarea',
+      // },
 
-    oldPostList: [{
-        id: '1',
-        name: '原职务1'
-      },
-      {
-        id: '2',
-        name: '原职务2'
-      },
     ],
-    oldPostText: '请选择原职务',
-    oldPostIndex: null,
+    answersId: '', // 提交答案用到
+    sessionKey: '',
+    paperId: '',
+    answersId: '',
+    id: '',
+    status: ''
+  },
+  onChange(event) {
+    this.setData({
+      radio: event.detail,
+    });
+  },
+  radioChange(e) {
+    console.log(e);
+    const items = this.data.questionList[e.currentTarget.dataset.index].QuestChoice
+    for (let i = 0, len = items.length; i < len; ++i) {
+      items[i].checked = items[i].value === e.detail.value
+    }
+
+    let json = {};
+    json.currentAnswer = e.detail.value;
+    json.id = e.currentTarget.dataset.idx;
+    json.questType = e.currentTarget.dataset.questtypes;
+    this.data.chooseValue[e.currentTarget.dataset.index] = json;
+    this.setData({
+      questionList: this.data.questionList
+    })
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+    console.log(this.data.questionList);
+
+    // this.data.questionList[this.data.index].checked = e.detail.value;
+
+    // this.setData({
+    //   questionList: this.data.questionList
+    // })
+    // const items = this.data.items
+    // for (let i = 0, len = items.length; i < len; ++i) {
+    //   items[i].checked = items[i].value === e.detail.value
+    // }
+
+    // this.setData({
+    //   items
+    // })
   },
-  // 班级
-  classChange: function (e) {
-    console.log("0000", e.detail.value);
+  checkboxChange(e) {
+    const items = this.data.questionList[e.currentTarget.dataset.index].QuestChoice
+    const values = e.detail.value
+    for (let i = 0, lenI = items.length; i < lenI; ++i) {
+      items[i].checked = false
+      for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
+        if (items[i].value === values[j]) {
+          items[i].checked = true
+          break
+        }
+      }
+    }
+    let json = {};
+    let aa = e.detail.value.join("||")
+    json.currentAnswer = aa;
+    json.id = e.currentTarget.dataset.idx;
+    json.questType = e.currentTarget.dataset.questtypes;
+    this.data.chooseValue[e.currentTarget.dataset.index] = json;
     this.setData({
-      classIndex: e.detail.value,
-      classText: '',
+      questionList: this.data.questionList
     })
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
   },
-  // 班主任
-  headmasterChange: function (e) {
-    console.log("0000", e.detail.value);
+  bindTextAreaBlur(e) {
+    console.log(e, "hhhhh");
+    console.log(e.detail.value);
+    let json = {};
+    json.currentAnswer = e.detail.value;
+    json.id = e.currentTarget.dataset.idx;
+    json.questType = e.currentTarget.dataset.questtypes;
+    this.data.chooseValue[e.currentTarget.dataset.index] = json;
+    this.data.questionList[e.currentTarget.dataset.index].QuestAnswer = e.detail.value;
+    this.setData({
+      questionList: this.data.questionList
+    })
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+  },
+  share() {
+    this.setData({
+      show: true
+    });
+  },
+  onClose() {
+    this.setData({
+      ['postshow[' + this.data.timeIndex + ']']: false,
+    });
+  },
+  onClose1() {
+    console.log("11111111111111");
+    this.setData({
+      postshow1: false
+    });
+  },
+  onInput(event) {
+    console.log(event, "8888888");
+
+    console.log("点击了");
+    this.setData({
+      currentDate: event.detail,
+    });
+  },
+  onInput1(event) {
+    console.log("000");
+    this.setData({
+      currentDate1: event.detail,
+    });
+  },
+
+  formatDate(date) {
+    date = new Date(date);
+    return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
+  },
+
+  share1(e) {
+    console.log(e);
+    console.log(e.currentTarget.dataset.index);
+    console.log(e.currentTarget.dataset.names, "8520852085208520");
+    console.log(this.data.postshow[e.currentTarget.dataset.index]);
+    this.data.postshow[e.currentTarget.dataset.index] = true;
+    this.data.names[e.currentTarget.dataset.index] = e.currentTarget.dataset.names;
     this.setData({
-      headmasterIndex: e.detail.value,
-      headmasterText: '',
+      postshow: this.data.postshow,
+      timeIndex: e.currentTarget.dataset.index
     })
+    console.log(this.data.postshow, "打印下锕啊啊啊啊锕锕锕");
+
+    // this.setData({
+    //   postshow: true
+    // });
+  },
+  share() {
+    this.setData({
+      postshow1: true
+    });
   },
+  formatDate(date) {
+    date = new Date(date);
+    return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
+  },
+  onConfirm(event) {
+    console.log(event, "1111111");
+    let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
+    let json = {};
+    json.currentAnswer = timeValue;
+    json.id = event.currentTarget.dataset.idx;
+    json.questType = event.currentTarget.dataset.questtypes;
+    let aa = this.data.chooseValue[event.currentTarget.dataset.index] = json;
+    this.data.questionList[event.currentTarget.dataset.index].QuestAnswer = timeValue;
+    this.setData({
+      questionList: this.data.questionList,
+      ['chooseValue[' + event.currentTarget.dataset.index + ']']: aa,
+      ['postshow[' + this.data.timeIndex + ']']: false,
+      ['headmasterText[' + this.data.timeIndex + ']']: '',
+    });
+    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+    console.log(this.data.chooseValue, "确定后的值锕");
+    console.log(this.data.questionList, "789789798789");
 
-  // 原职务
-  oldPostChange: function (e) {
-    console.log("0000", e.detail.value);
+
+  },
+  onConfirm1(event) {
+    console.log(event, "0000");
+    let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
     this.setData({
-      oldPostIndex: e.detail.value,
-      oldPostText: '',
+      peixunTime: timeValue,
+      postshow1: false,
+      peixunText: ''
+    });
+  },
+  parameterTap: function (e) { //e是获取e.currentTarget.dataset.id所以是必备的,跟前端的data-id获取的方式差不多
+    let that = this
+    let this_checked = e.currentTarget.dataset.id
+    let parameterList = this.data.parameter //获取Json数组
+    for (let i = 0; i < parameterList.length; i++) {
+      if (parameterList[i].id == this_checked) {
+        parameterList[i].checked = true; //当前点击的位置为true即选中
+      } else {
+        parameterList[i].checked = false; //其他的位置为false
+      }
+    }
+    that.setData({
+      parameter: parameterList
     })
   },
+  submitForm() {
+    //let arr1 = this.data.chooseValue.filter(d => d);
+    //console.log(arr1,"打印下提交");
+    console.log(this.data.chooseValue, "打印下提交");
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/paper/commit',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        currentAnswerTemp: this.data.chooseValue,
+        answersId: wx.getStorageSync('answersId')
+      },
+      success: (res) => {
+        console.log(res);
+        if (res.data.msg == "请勿重复提交") {
+          wx.showModal({
+            showCancel: false,
+            content: res.data.msg,
+            success(res) {}
+          })
+        } else {
+          wx.switchTab({
+            url: '/pages/myClass/myClass',
+          })
+        }
+
+      }
+    })
+
+
+    let isTrue = false;
+    // this.data.chooseValue.forEach(item => {
+    //   console.log(item, "123123");
+    //   if (item.currentAnswer) {
+    //     isTrue = true;
+
+    //   } else {
+    //     wx.showModal({
+    //       showCancel: false,
+    //       content: item.QuestStem + "不能为空",
+    //       success(res) {}
+    //     })
+    //   }
+    // })
+    // if (isTrue) {
+    //   console.log("提交了");
+    //   wx.request({
+    //     url: app.globalData.publicUrl + '/wx/paper/commit',
+    //     method: "post",
+    //     data: {
+    //       sessionKey: this.data.sessionKey,
+    //       currentAnswerTemp: this.data.chooseValue,
+    //       answersId: wx.getStorageSync('answersId')
+    //     },
+    //     success: (res) => {
+    //       console.log(res);
+    //       if(res.data.msg == "请勿重复提交"){
+    //         wx.showModal({
+    //           showCancel: false,
+    //           content: res.data.msg,
+    //           success(res) {}
+    //         })
+    //       }else{
+    //         wx.navigateTo({
+    //           url: '/pages/myClass/myClass',
+    //         })
+    //       }
+
+    //     }
+    //   })
+    // }
+
+
+  },
+  formSubmit(e) {
+    console.log(e.detail.value, "000000000000000");
+    let arr1 = this.data.zaizhiTime.filter(d => d);
+    let arr = this.data.names.filter(d => d);
+    var activeSubjectsArr = [];
+    for (var i = 0; i < arr.length; i++) {
+      var activeSubjectsObject = {};
+      for (var j = 0; j < arr1.length; j++) {
+        if (i == j) {
+          activeSubjectsObject[arr[i]] = arr1[j];
+          activeSubjectsArr.push(activeSubjectsObject);
+        }
+      }
+    }
+    console.log(activeSubjectsArr, "7777777");
+    let count = 0;
+    let data = {};
+    for (let a in e.detail.value) {
+      count += 1;
+      if (count = 1) {
+        data[a] = e.detail.value[a]
+      }
+    }
+    activeSubjectsArr.forEach(item => {
+      Object.assign(data, item)
+    })
+    console.log(data, "888888888888888888888888");
+    // Object.keys(data).forEach(function (key) {
+    //   if (!data[key]) {
+    //     wx.showModal({
+    //       showCancel: false,
+    //       content: key + "不能为空"
+    //     })
+    //     return;
+    //   }
+
+    // });
+    // if (!e.detail.value.username) {
+    //   this.setData({
+    //     nameIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     nameIsTrue: false
+    //   })
+    // }
+    // let sex = '';
+    // if (this.data.parameter[0].checked) {
+    //   sex = this.data.parameter[0].name
+    //   this.setData({
+    //     errorIsTrue: false
+    //   })
+    // } else if (this.data.parameter[1].checked) {
+    //   sex = this.data.parameter[1].name
+    //   this.setData({
+    //     errorIsTrue: false
+    //   })
+    // } else {
+    //   this.setData({
+    //     errorIsTrue: true
+    //   })
+    // }
+
+    // if (!e.detail.value.work) {
+    //   this.setData({
+    //     workIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     workIsTrue: false
+    //   })
+    // }
+
+    // if (!e.detail.value.culture) {
+    //   this.setData({
+    //     cultureIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     cultureIsTrue: false
+    //   })
+    // }
 
+    // if (!e.detail.value.graduation) {
+    //   this.setData({
+    //     graduationIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     graduationIsTrue: false
+    //   })
+    // }
 
+    // if (!e.detail.value.major) {
+    //   this.setData({
+    //     majorIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     majorIsTrue: false
+    //   })
+    // }
 
+    // if (!e.detail.value.post) {
+    //   this.setData({
+    //     postIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     postIsTrue: false
+    //   })
+    // }
+    // if (!e.detail.value.phone) {
+    //   this.setData({
+    //     phoneIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     phoneIsTrue: false
+    //   })
+    // }
+    // if (!this.data.zaizhiTime) {
+    //   this.setData({
+    //     renzhishijianIsTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     renzhishijianIsTrue: false
+    //   })
+    // }
+    // if (!this.data.peixunTime) {
+    //   this.setData({
+    //     peixunshijianTrue: true
+    //   })
+    // } else {
+    //   this.setData({
+    //     peixunshijianTrue: false
+    //   })
+    // }
 
-  formSubmit(e) {},
+    // console.log(this.data.zaizhiTime, "在职时间000");
+    // console.log(this.data.peixunTime, "培训时间000");
+    // console.log(sex, "性别的");
+    // e.detail.value.zaizhiTime = this.data.zaizhiTime;
+    // e.detail.value.peixunTime = this.data.peixunTime;
+    // e.detail.value.sex = sex;
+    // console.log(e.detail.value, "我是合并后的锕");
+
+
+
+  },
+  timeFormat(date, fmt) {
+    let o = {
+      "M+": date.getMonth() + 1, //月份   
+      "d+": date.getDate(), //日
+      "h+": date.getHours(), //小时   
+      "m+": date.getMinutes(), //分   
+      "s+": date.getSeconds(), //秒   
+      "q+": Math.floor((date.getMonth() + 3) / 3), //季度   
+      "S": date.getMilliseconds() //毫秒   
+    };
+    if (/(y+)/.test(fmt))
+      fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (let k in o)
+      if (new RegExp("(" + k + ")").test(fmt))
+        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+    return fmt;
+
+  },
   onReady: function () {},
-  onLoad: function () {
+  async onLoad(options) {
+    const sessionKey = await tools.checkSessionAndLogin();
+    console.log(sessionKey, "111");
+
+    //const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
+    console.log("onloading.....................");
+    // let chooceArr = this.data.questionList.map(item => {
+    //   let json = {};
+    //   json.currentAnswer = '';
+    //   json.questType = '';
+    //   json.id = item.Id;
+    //   json.QuestStem = item.QuestStem;
+    //   return json
+    // })
+    // console.log(chooceArr);
+    // this.setData({
+    //   chooseValue: chooceArr
+    // })
+    console.log(options.answersId, "00000000000000000000000000");
+    console.log(options, "11111");
+    wx.setStorageSync('answersId', options.answersId);
+    this.setData({
+      sessionKey: sessionKey,
+      paperId: options.paperId,
+      answersId: options.answersId,
+      id: options.id,
+    })
+    if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
+      console.log("缓村了锕");
+      const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
+      this.setData({
+        questionList: questionList,
+        answersId: wx.getStorageSync('answersId' + wx.getStorageSync('answersId')),
+        chooseValue: wx.getStorageSync('chooseValue' + wx.getStorageSync('answersId')),
+      })
+      console.log(this.data.questionList, "show 缓存的数据");
+    } else {
+      console.log("无缓存");
+      this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
+    }
 
+    // if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
+    //   console.log("缓村了锕");
+    //   const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
+    //   this.setData({
+    //     questionList: questionList,
+    //     answersId: wx.getStorageSync('answersId' + wx.getStorageSync('answersId')),
+    //     chooseValue: wx.getStorageSync('chooseValue' + wx.getStorageSync('answersId')),
+    //   })
+    //   console.log(this.data.questionList, "show 缓存的数据");
+    // } else {
+    //   console.log("无缓存");
+    //   this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
+    // }
   },
+  allShi(id, paperId, sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/paper/detail',
+      method: "post",
+      data: {
+        sessionKey: sessionKey,
+        id: id,
+        paperId: paperId
+      },
+      success: (res) => {
+        let jsonArr = JSON.parse(res.data.paperContent).map(item => {
+          let json = {};
+          json.QuestType = item.QuestType;
+          json.Id = item.Id;
+          json.QuestAnswer = item.QuestAnswer;
+          json.QuestStem = item.QuestStem;
+          // if (item.QuestChoice) {
+          //   let arr = item.QuestChoice.split('||');
+          //   json.QuestChoice = arr;
+          // }
+          if (item.QuestType == '1' || item.QuestType == '0') {
+            let arr = item.QuestChoice.split('||');
+            let arrJson = arr.map(item => {
+              let json1 = {};
+              json1.name = item;
+              json1.value = item;
+              json1.checked = false;
+              return json1
+            });
+            json.QuestChoice = arrJson;
+          }
+          return json;
+        })
 
+        // for(let i = 0 ; i<jsonArr.length; i++){
+        //    let json = {};
+        //    json.currentAnswer = '';
+        //    json.questType = '';
+        //    json.id = '';
+        // }
+        //  答案锕 
+        let chooceArr = jsonArr.map(item => {
+          let json = {};
+          json.currentAnswer = '';
+          json.questType = '';
+          json.id = item.Id;
+          json.QuestStem = item.QuestStem;
+          return json
+        })
+        this.setData({
+          questionList: jsonArr,
+          chooseValue: chooceArr
+        })
+        console.log(this.data.questionList, "00000");
+        wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
+        wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+      }
+    })
+  },
 })

+ 51 - 204
pages/feedBack/feedBack.wxml

@@ -1,242 +1,89 @@
 <view class="home">
-	<form bindsubmit="formSubmit">
-		<!-- <van-cell-group> -->
-		<view class='fwb'>
+	<view wx:for="{{questionList}}">
+		<view class='fwb' wx:if="{{ item.QuestType == 3}}">
 			<view class="red-image">
 				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
 			</view>
-			<view class="xingbie">姓名</view>
+			<view class="xingbie">{{item.QuestStem}}</view>
 			<view class='weui-input'>
-				<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" placeholder-style="font-size:25rpx" />
-				<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
+				<input name="{{item.name}}" value="{{item.QuestAnswer}}" data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx='{{item.Id}}' bindinput='bindTextAreaBlur' placeholder="请输入" />
+				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
 			</view>
 		</view>
-		<view class='fwb'>
+		<view class='fwb' wx:if="{{ item.QuestType == 0}}">
 			<view class="red-image">
 				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
 			</view>
-			<view class="xingbie">培训班次</view>
-			<view class='weui-input'>
-				<picker bindchange="classChange" name="ensure_id" value="{{classList[classIndex].id}}" range-key="{{'name'}}" range="{{classList}}">
-					<view class="picker">
-						{{classList[classIndex].name}} <text style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx"  >{{classText}}</text>
-					</view>
-				</picker>
-				<!-- <input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
-			</view>
-
-		</view>
-
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">班主任</view>
-			<view class='weui-input'>
-				<picker bindchange="headmasterChange" name="headmaster_id" value="{{headmasterList[classIndex].id}}" range-key="{{'name'}}" range="{{headmasterList}}">
-					<view class="picker">
-						{{headmasterList[headmasterIndex].name}} <text style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx" >{{headmasterText}}</text>
-					</view>
-				</picker>
-				<!-- <input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
-			</view>
-
-		</view>
-
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">工作单位</view>
-			<view class='weui-input'>
-				<input class="" name="username" value="{{ username }}" placeholder="请输入工作单位" />
-				<view class="{{nameIsTrue?'error':'noerror'}}">请输入工作单位</view>
+			<view class="xingbie">{{item.QuestStem}}</view>
+			<view class='weui-input' style=" background: white">
+				<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="radioChange">
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
+						<radio value="{{ item.value }}" />{{item.name}}
+					</label>
+				</radio-group>
+				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
 			</view>
 		</view>
 
-		<view class='fwb'>
+		<view class='fwb' wx:if="{{ item.QuestType == 1}}">
 			<view class="red-image">
 				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
 			</view>
-			<view class="xingbie">现职务</view>
-			<view class='weui-input'>
-				<input class="" name="username" value="{{ username }}" placeholder="请输入现职务" />
-				<view class="{{nameIsTrue?'error':'noerror'}}">请输入现职务</view>
+			<view class="xingbie">{{item.QuestStem}}</view>
+			<view class='weui-input' style=" background: white">
+				<checkbox-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="checkboxChange">
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
+						<checkbox value="{{ item.value }}" />{{item.name}}
+					</label>
+				</checkbox-group>
+				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
 			</view>
 		</view>
 
-		<view class='fwb'>
+		<view class='fwb' wx:if="{{ item.QuestType == 2}}">
 			<view class="red-image">
 				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
 			</view>
-			<view class="xingbie">现任职务</view>
-			<view class='weui-input'>
-				<input class="" name="username" value="{{ username }}" placeholder="请输入现任职务" />
-				<view class="{{nameIsTrue?'error':'noerror'}}">请输入现任职务</view>
+			<view class="xingbie">{{item.QuestStem}}</view>
+			<view class='weui-input' style=" background: white">
+				<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="radioChange">
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
+						<radio value="{{ item.value }}" />{{item.name}}
+					</label>
+				</radio-group>
+				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
 			</view>
 		</view>
-
-		<view class='fwb'>
+		<view class='fwt' wx:if="{{ item.QuestStem.length > 10}}">
 			<view class="red-image">
 				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
 			</view>
-			<view class="xingbie">原职务</view>
-			<view class='weui-input'>
-				<picker bindchange="oldPostChange" name="oldPost_id" value="{{oldPostList[oldPostIndex].id}}" range-key="{{'name'}}" range="{{oldPostList}}">
-					<view class="picker">
-						{{oldPostList[oldPostIndex].name}} <text  style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx" >{{oldPostText}}</text>
-					</view>
-				</picker>
-				<!-- <input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
-			</view>
-
-		</view>
-
-
-		<view class='fwt'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class=" xingbie moreTitle">您参加培训后工作职职务有变动吗?</view>
-			<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-		</view>
-		<textarea placeholder="请输入" maxlength='500' />
-
-		<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+			<view class="flex-flex">
+				<view class=" xingbie moreTitle">{{item.QuestStem}}</view>
+				<textarea value="{{item.QuestAnswer}}" name="{{item.name}}" data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx='{{item.Id}}' bindinput='bindTextAreaBlur' placeholder="请输入" maxlength='500' />
 				</view>
-				<view class=" xingbie moreTitle">您是否将学到的一些工作方法运用到工作中?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
 			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
 
-			<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">培训的课程是否帮助您解决了工作中出现的问题? (如果有请举例是哪类问题)</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-			<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">结合您现有的工作,您觉得哪类课程对于您实际工作有 所帮助?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
 
-			<view class='fwt'>
+				<view class='fwb' wx:if="{{ item.QuestType == 6}}"> 
 				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx;"> </image>
 				</view>
-				<view class=" xingbie moreTitle">您觉得我们在课程设置上有哪些需要改进的?(调整或者增加哪个方面的专项培训)?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-
-			<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				<view class="xingbie">{{item.QuestStem}}</view>
+				<view class='weui-input' style="font-size: 26rpx;  line-height: 56rpx;"  data-index = '{{index}}' data-names='{{item.name}}'  catchtap="share1" name="{{item.name}}">
+					<!-- QuestAnswer   chooseValue[index].currentAnswer -->
+			{{questionList[index].QuestAnswer}}<view wx:if='{{!questionList[index].QuestAnswer}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx" >请选择</view>
+					<!-- <view class="{{renzhishijianIsTrue?'error':'noerror'}}">请输入任职时间</view> -->
 				</view>
-				<view class=" xingbie moreTitle">您觉得培训周期多长时间为最佳?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
+				 <cover-view>
+					<van-popup  show="{{ postshow[index] }}" position="bottom" custom-style="height: 50%;">
+					<van-datetime-picker  data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx = '{{item.Id}}'  bind:confirm="onConfirm" bind:cancel='onClose'  type="date" value="{{ currentDate }}" bind:input="onInput" min-date="{{ minDate }}" formatter="{{ formatter }}" />
+				</van-popup>
+					 </cover-view>
 			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
 
-
-					<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">主题党日活动您有什么建议?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-			
-					<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">您对学院的服务有哪些建议和看法?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-			<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">您对学院的管理有哪些建议和看法?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-			<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">您本年度取得了什么成绩或荣誉方便跟我们分享一下吗?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-			<view class='fwt'>
-				<view class="red-image">
-					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-				</view>
-				<view class=" xingbie moreTitle">您希望我们对您提供哪些帮助(如:跟踪辅导、转达诉 求、提出一些工作的建议、体制改革、社区打造等)?</view>
-				<!-- <view class='weui-input'>
-					<input class="" name="username" value="{{ username }}" placeholder="请输入姓名" />
-					<view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view>
-				</view> -->
-			</view>
-			<textarea placeholder="请输入"  maxlength='500' />
-
-			<!-- </van-cell-group> -->
-
-		<!-- <button formType="submit">提交表单</button> -->
-		<view style="  margin-top: 100rpx;margin-bottom: 100rpx;">
-			<van-button round formType="submit">提交表单</van-button>
 		</view>
-
-	</form>
+		<view style="margin-top: 100rpx;margin-bottom:100rpx">
+			<van-button   round bindtap="submitForm">提交表单</van-button>
+		</view>
 </view>

+ 54 - 11
pages/feedBack/feedBack.wxss

@@ -1,6 +1,6 @@
 .home {
-  margin: 40rpx 40rpx 0 40rpx;
-
+  margin: 0 40rpx;
+  margin-top: 40rpx;
 }
 
 van-button {
@@ -21,8 +21,6 @@ van-button {
 
 button:not([size='mini']) {
   width: 550rpx !important;
-  /* margin-left: auto;
-  margin-right: auto; */
 }
 
 .van-radio__icon--round {
@@ -68,10 +66,13 @@ button:not([size='mini']) {
 .error {
   font-size: 24rpx;
   color: #EE0A24;
+  background: white;
+
 }
 
 .noerror {
   display: none !important;
+
 }
 
 .time {
@@ -87,6 +88,7 @@ button:not([size='mini']) {
   margin-left: 20rpx;
   background: #F4F4F4;
   width: 474rpx;
+
 }
 
 .weui-input input {
@@ -95,27 +97,28 @@ button:not([size='mini']) {
 
 .van-icon-circle {
   color: #EE0A24;
+  /* margin-top: 30rpx; */
 
 }
 
 .xingbie {
   margin-left: 10rpx;
   width: 130rpx;
+  line-height: 60rpx;
 }
 
 .red-image {
   vertical-align: text-bottom;
+  margin-top: 10rpx;
 }
 
-.moreTitle {
-  width: 100%;
-
+input {
+  height: 40rpx;
 }
 
-.fwt {
-  display: flex;
-  font-size: 28rpx;
-  margin-top: 40rpx;
+.moreTitle {
+  width: 600rpx;
+
 }
 
 textarea {
@@ -125,4 +128,44 @@ textarea {
   width: 100%;
   height: 194rpx;
   margin-top: 20rpx;
+}
+
+.fwt {
+  display: flex;
+  font-size: 28rpx;
+  margin-top: 40rpx;
+}
+
+.flex-flex {
+  display: flex;
+  flex-direction: column;
+}
+
+.big-vover {
+  z-index: 999;
+}
+
+.weui-input radio {
+  display: none;
+
+}
+
+.weui-input checkbox {
+  display: none;
+}
+
+.checkboxbox {
+  background: linear-gradient(90deg, rgba(215, 47, 29, 1), rgba(249, 157, 48, 1)) !important;
+  color: white !important;
+ 
+}
+
+.my-choosebox {
+  color: rgba(51, 51, 51, 1);
+  width: 200rpx;
+  padding: 10rpx 80rpx;
+  background: #FFF0ED;
+  margin: 10rpx;
+  line-height: 80rpx;
+  border-radius: 10rpx;
 }

+ 76 - 0
pages/feedBackDetail/feedBackDetail.js

@@ -0,0 +1,76 @@
+//index.js
+//获取应用实例
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
+Page({
+  data: {
+    // 课程轮播
+    "bnrUrl": [{
+      "url": "/images/banner2.jpg",
+      "name": "二期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }, {
+      "url": "/images/banner1.jpg",
+      "name": "三期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }, {
+      "url": "/images/banner2.jpg",
+      "name": "四期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }],
+    gridArr: [
+      // {
+      //   "num": "1",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+      // {
+      //   "num": "2",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化、同年检',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+      // {
+      //   "num": "3",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化、同年检',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+    ],
+
+  },
+  chengji(sessionKey, answersId) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/answer/detail',
+      method: "post",
+      data: {
+        sessionKey: sessionKey,
+        answersId: answersId
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res, "suoyoude");
+          this.setData({
+            gridArr:res.data.list
+          })
+          console.log(this.data.gridArr);
+        }
+      }
+    })
+  },
+  onReady: function () {},
+  async onLoad(options) {
+    console.log(options.answersId);
+    console.log("onload..................................");
+    let answersId = options.answersId;
+    const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
+    //const sessionKey = await tools.checkSessionAndLogin();  
+    this.chengji(sessionKey, answersId);
+
+  },
+
+})

+ 6 - 0
pages/feedBackDetail/feedBackDetail.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText":"综合反馈",
+  "navigationBarBackgroundColor": "#eb3f33",
+  "navigationBarTextStyle": "white"
+}

+ 24 - 0
pages/feedBackDetail/feedBackDetail.wxml

@@ -0,0 +1,24 @@
+<view class="home">
+	<view class="box">
+		<view class="redk"></view>综合反馈
+		<view class="cuoti-box" wx:for="{{gridArr}}">
+			<view class="number">
+				{{index+1}}
+			</view>
+			<view class="wenti">
+				<view style=" margin-right: 20rpx;">
+					{{item.questStem}} :{{item.currentAnswer}}
+				</view>
+				<!-- <view class="daan">
+					正确答案: <view class="zhengquedaan">{{item.correctAnswer}}</view>
+				</view> -->
+				<!-- <view class="daan">
+					我的答案: <view class="wodedaan">{{item.currentAnswer}}</view>
+				</view>
+				<view class="daan">
+					分数: <view class="wodedaan">{{item.score}}</view>
+				</view> -->
+			</view>
+		</view>
+	</view>
+</view>

+ 87 - 0
pages/feedBackDetail/feedBackDetail.wxss

@@ -0,0 +1,87 @@
+
+.box {
+  margin: 0 40rpx;
+  background-color: white;
+  border-radius: 20rpx;
+  padding-top: 30rpx;
+  font-size: 26rpx;
+  padding-bottom: 20rpx;
+}
+.yuan{
+  height: 160rpx;
+  width: 160rpx;
+  border-radius: 50%;
+  background-color: white;
+   display: flex;
+   flex-direction: column;
+   text-align: center;
+  margin: 0 auto;
+   
+}
+.title{
+  font-size: 20rpx;
+  color: white;
+}
+.fen{
+  font-size: 50rpx;
+  color: white;
+  margin-top: 10rpx;
+}
+.nei{
+  height: 123rpx;
+  width: 123rpx;
+  background-color: #EB3F33;
+  border-radius: 50%;
+  margin: 0 auto;
+  margin-top: 18rpx;
+  box-shadow:rgba(235,63,51,0.3) 0px 0px 20px;
+  
+}
+.redk {
+  height: 33rpx;
+  width: 8rpx;
+  background-color: #eb3f33;
+  border-radius: 5rpx;
+  margin-right: 10rpx;
+  margin-left: 40rpx;
+  float: left;
+}
+.cuoti-box{
+  background:rgba(172,213,152,0.2);
+  border-radius:7rpx;
+  display: flex;
+  margin: 40rpx;
+  padding-top: 10rpx;
+  padding-left: 10rpx;
+}
+.wenti{
+  text-align: justify;
+  font-size: 25rpx;
+  margin-left: 20rpx;
+  width: 620rpx;
+}
+.daan{
+  font-size: 21rpx;
+  margin: 20rpx 20rpx 20rpx 0rpx;
+}
+.number{
+  height: 30rpx;
+  line-height: 30rpx;
+  width: 34rpx;
+  border-radius: 34rpx;
+  border: 1rpx solid black;
+  text-align: center;
+}
+.zhengquedaan{
+  display: inline-block;
+  color: #00B627;
+}
+.wodedaan{
+  display: inline-block;
+  color: #EB3F33;
+}
+
+page {
+  background:#F4F4F4
+  
+}

+ 168 - 28
pages/myClass/myClass.js

@@ -10,7 +10,8 @@ Page({
     classInfo: {},
     kcArr: [],
     sfmArr: [],
-    studentName: ""
+    studentName: "",
+    status: '', //状态
   },
   // 更多
   listToggle: function () {
@@ -74,15 +75,77 @@ Page({
       url: '../myActive/myActive'
     })
   },
-  gokhAnswer() {
-    wx.navigateTo({
-      url: '../answerAfterclass/answerAfterclass'
+  // 随堂考试
+  // gokhAnswer() {
+  //   wx.navigateTo({
+  //     url: '../answerAfterclass/answerAfterclass'
+  //   })
+  // },
+  gokhAnswer(e) {
+    console.log(e.currentTarget.dataset.courseid, "00");
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/examList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        courseId: e.currentTarget.dataset.courseid,
+        clasId: this.data.classInfo.id
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data);
+          //let answersId =  res.data.list[0].answersId ;
+          if (res.data.list[0]) {
+            if (res.data.list[0].answersId) {
+              this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'answerAfterclass');
+            } else {
+              console.log('777777');
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
+            }
+          }
+        }
+      }
     })
+    // wx.navigateTo({
+    //   url: '../evaluationCourse/evaluationCourse'
+    // })
   },
-  gopjClass() {
-    wx.navigateTo({
-      url: '../evaluationCourse/evaluationCourse'
+  //w我的班级去评价
+  gopjClass(e) {
+    console.log(e.currentTarget.dataset.courseid, "00");
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        questSub: '3',
+        courseId: e.currentTarget.dataset.courseid,
+        clasId: this.data.classInfo.id
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data);
+          //let answersId =  res.data.list[0].answersId ;
+          if (res.data.list[0]) {
+            if (res.data.list[0].answersId) {
+              if (res.data.list[0].status == '1') {
+                wx.navigateTo({
+                  url: '/pages/evaluationCourseDetail/evaluationCourseDetail?answersId=' + res.data.list[0].answersId,
+                })
+              } else {
+                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'evaluationCourse');
+              }
+            } else {
+              console.log('777777');
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'evaluationCourse');
+            }
+          }
+        }
+      }
     })
+    // wx.navigateTo({
+    //   url: '../evaluationCourse/evaluationCourse'
+    // })
   },
   goMyPoints() {
     // wx.showModal({
@@ -114,11 +177,41 @@ Page({
       showzs: false
     });
   },
+  // 期末考试
   goQmks() {
-    wx.showModal({
-      showCancel: false,
-      content: "此功能暂时还未开放哦",
-      success(res) {}
+    this.getgoQmks();
+  },
+  // 期末考试接口 、、、、、、
+  getgoQmks() {
+    console.log(this.data.sessionKey);
+    console.log(this.data.classInfo.id);
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/examList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        clasId: this.data.classInfo.id
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data);
+          //let answersId =  res.data.list[0].answersId ;
+          console.log(res.data.list.length);
+          if (res.data.list[0]) {
+            if (res.data.list[0].answersId) {
+              if (res.data.list[0].status == '1') {
+                wx.navigateTo({
+                  url: '/pages/grade/grade?answersId=' + res.data.list[0].answersId,
+                })
+              } else {
+                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'answerAfterclass');
+              }
+            } else {
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
+            }
+          }
+        }
+      }
     })
   },
   // 学员登记表的
@@ -128,15 +221,16 @@ Page({
     //   content: "敬请期待",
     //   success(res) {}
     // })
-    this.getBanner();
-    // wx.navigateTo({
-    //   url: '../studentRegistration/studentRegistration'
-    // })
+    //this.getBanner();
+    wx.navigateTo({
+      url: '../studentRegistration/studentRegistration'
+    })
   },
   // 学员登记表 、、、、、、
   getBanner() {
+    console.log(this.data.sessionKey);
     wx.request({
-      url: app.globalData.publicUrl + '/wx/exam/list',
+      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
       method: "post",
       data: {
         sessionKey: this.data.sessionKey,
@@ -149,22 +243,62 @@ Page({
           console.log(res.data.list.length);
           if (res.data.list[0]) {
             if (res.data.list[0].answersId) {
-              this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId);
+              if (res.data.list[0].status) {
+                wx.navigateTo({
+                  url: '/pages/studentRegistrationDeyail/studentRegistrationDeyail?answersId=' + res.data.list[0].answersId,
+                })
+              } else {
+                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'studentRegistration');
+              }
             } else {
               console.log('777777');
-              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey);
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'studentRegistration');
             }
           }
         }
       }
     })
   },
-  toPath(id, paperId, answersId) {
+  // 综合反馈表 、、、、、、
+  getBanner1() {
+    console.log(this.data.sessionKey,"dayin");
+    console.log(this.data.classInfo.id);
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        questSub: '1',
+        clasId: this.data.classInfo.id
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data,"zonghe");
+          //let answersId =  res.data.list[0].answersId ;
+          console.log(res.data.list.length);
+          if (res.data.list[0]) {
+            if (res.data.list[0].answersId) {
+              if (res.data.list[0].status == '1') {
+                wx.navigateTo({
+                  url: '/pages/feedBackDetail/feedBackDetail?answersId=' + res.data.list[0].answersId,
+                })
+              } else {
+                this.toPath(res.data.list[0].id, res.data.list[0].paperId, res.data.list[0].answersId, 'feedBack');
+              }
+            } else {
+              this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'feedBack');
+            }
+          }
+        }
+      }
+    })
+  },
+  toPath(id, paperId, answersId, address, status) {
     wx.navigateTo({
-      url: '/pages/studentRegistration/studentRegistration?id=' + id + '&paperId=' + paperId + '&answersId=' + answersId,
+      url: '/pages/' + address + '/' + address + '?id=' + id + '&paperId=' + paperId + '&answersId=' + answersId + '&status=' + status,
     })
   },
-  beginKao(id, paperId, sessionKey) {
+  beginKao(id, paperId, sessionKey, address) {
     console.log(paperId, "8888888");
     wx.request({
       url: app.globalData.publicUrl + '/wx/exam/begin',
@@ -178,7 +312,10 @@ Page({
         console.log(res);
         if (res.data.code == 0) {
           console.log(res, "为我么我们微妙"); // 提交答案是后
-          this.toPath(id, paperId, res.data.answersId);
+          this.setData({
+            status: res.data.status
+          })
+          this.toPath(id, paperId, res.data.answersId, address, );
         }
       }
     })
@@ -189,9 +326,10 @@ Page({
     //   content: "敬请期待",
     //   success(res) {}
     // })
-    wx.navigateTo({
-      url: '../feedBack/feedBack'
-    })
+    // wx.navigateTo({
+    //   url: '../feedBack/feedBack'
+    // })
+    this.getBanner1();
   },
   // 跳转直播点播页面
   goStudy(e) {
@@ -367,12 +505,14 @@ Page({
     return `${hoursValue}时${minutesValue}分${secondValue}秒`;
   },
   async onShow() {
-    //const sessionKey = await tools.checkSessionAndLogin();
-    const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
+    const sessionKey = await tools.checkSessionAndLogin();
+    console.log(sessionKey, "000000");
+
+    //const sessionKey = 'BqQROCKCxn7R2NXdQLud9Q==';
     this.setData({
       sessionKey: sessionKey
     })
-    //this.isClass(sessionKey);
+    this.isClass(sessionKey);
     this.getMycourse(sessionKey);
     this.getMynotice(sessionKey);
   }

+ 2 - 2
pages/myClass/myClass.wxml

@@ -43,8 +43,8 @@
 					<view class="start_text" wx:if='{{item.isLive==-1}}'>视频时长: {{sfmArr[idx].courseTime}}</view> -->
 				<view>
 					<image src='/images/startstudy.png' mode='aspectFill' class="an" data-item="{{item}}" bindtap="goStudy"></image>
-					<image src='/images/dtxs.png' mode='aspectFill' class="an" bindtap="gokhAnswer"></image>
-					<image src='/images/pjkc.png' mode='aspectFill' class="an" bindtap="gopjClass"></image>
+					<image src='/images/dtxs.png' data-courseId='{{item.id}}' mode='aspectFill' class="an" bindtap="gokhAnswer"></image>
+					<image src='/images/pjkc.png' data-courseId='{{item.id}}' mode='aspectFill' class="an" bindtap="gopjClass"></image>
 				</view>
 			</view>
 		</view>

+ 145 - 541
pages/studentRegistration/studentRegistration.js

@@ -1,7 +1,8 @@
 //index.js
 //获取应用实例
-const app = require('../../utils/util.js');
+// const app = require('../../utils/util.js');
 const tools = require('../../utils/tools.js');
+const app = require('../../utils/util.js');
 Page({
   data: {
     nameIsTrue: false, //名字是否填写
@@ -13,15 +14,23 @@ Page({
     phoneIsTrue: false, //电话
     peixunshijianTrue: false, // 培训时间
     nameMessage: '',
-    zaizhiTime: [], //在线时间
+    tenure: '', //在线时间
     peixunTime: '', //培训时间
-    headmasterText: [], // 
-    names: [],
-    timeIndex: '',
-    chooseValue: [], // 选择的答案序列
+    headmasterText: '请选择任职时间', // 
+    peixunText: '请选择培训时间',
     radio: '1',
+    username: 'asdsadsad',
+    parameter: [{
+      id: 1,
+      name: '男',
+      checked: true
+    }, {
+      id: 2,
+      name: '女',
+      checked: false
+    }],
     renzhiDate: '',
-    postshow: [],
+    postshow: false,
     postshow1: false,
     errorIsTrue: false,
     currentDate: new Date().getTime(),
@@ -35,260 +44,22 @@ Page({
       }
       return value;
     },
-    questionList: [{
-        "QuestType": "6",
-        "Id": 11,
-        name: 'ccccc',
-        QuestStem: '时间选择',
-        QuestAnswer: ''
-      },
-      {
-        "QuestType": "5",
-        "Id": 11,
-        name: 'dddd',
-        QuestStem: '姓名输入',
-        QuestAnswer: ''
-      },
-      {
-        "QuestType": "6",
-        "Id": 11,
-        name: 'username111',
-        QuestStem: '时间2',
-        QuestAnswer: ''
-      },
-      {
-        "QuestType": "5",
-        "Id": 11,
-        name: 'address',
-        QuestStem: '姓名输入',
-        QuestAnswer: ''
-      },
-      {
-        "QuestType": "0",
-        "QuestChoice": [{
-            value: 'USA',
-            name: '美国'
-          },
-          {
-            value: 'CHN',
-            name: '中国',
-            checked: 'true'
-          },
-          {
-            value: 'BRA',
-            name: '巴西'
-          },
-          {
-            value: 'JPN',
-            name: '日本'
-          },
-          {
-            value: 'ENG',
-            name: '英国'
-          },
-          {
-            value: 'FRA',
-            name: '法国'
-          },
-        ],
-        "Id": 36,
-        name: 'sex',
-        QuestStem: '性别单选'
-      },
-      {
-        "QuestType": "0",
-        "QuestChoice": [{
-            value: '男',
-            name: '男',
-            checked: false,
-          },
-          {
-            value: '女',
-            name: '女',
-            checked: false,
-          },
-        ],
-        "Id": 36,
-        name: 'sex111',
-        QuestStem: '性别单选2222'
-      },
-      {
-        "QuestType": "1",
-        "QuestAnswer": "equals ()||\nhashCode()||",
-        "QuestChoice": [{
-            value: 'USA',
-            name: '美国'
-          },
-          {
-            value: 'CHN',
-            name: '中国',
-            checked: false
-          },
-          {
-            value: 'FRA',
-            name: '法国'
-          }
-        ],
-        "Id": 38,
-        name: 'alls',
-        QuestStem: '多选'
-      },
-
-      {
-        "QuestType": "2",
-        "QuestStem": "1+1=2",
-        "QuestAnswer": "是",
-        "QuestChoice": [{
-            value: 'USA',
-            name: '是'
-          },
-          {
-            value: 'CHN',
-            name: '中国',
-            checked: false
-          },
-        ],
-        "Id": 42,
-        name: 'lllll',
-        QuestStem: '判断1'
-      },
-      {
-        "QuestType": "2",
-        "QuestStem": "1+1=2",
-        "QuestAnswer": "是",
-        "QuestChoice": [{
-            value: 'USA',
-            name: '是'
-          },
-          {
-            value: 'CHN',
-            name: '中国',
-            checked: false
-          },
-        ],
-        "Id": 42,
-        name: 'lllll',
-        QuestStem: '判断2'
-      },
-      {
-        "QuestType": "2",
-        "QuestStem": "1+1=2",
-        "QuestAnswer": "是",
-        "QuestChoice": [{
-            value: 'USA',
-            name: '是'
-          },
-          {
-            value: 'CHN',
-            name: '中国',
-            checked: false
-          },
-        ],
-        "Id": 42,
-        name: 'lllll',
-        QuestStem: '判断3'
-      },
-      {
-        "QuestType": "3",
-        "QuestStem": "世纪大厦的萨科技的哈市(解答)",
-        "QuestAnswer": "",
-        "QuestChoice": "",
-        "Id": 39,
-        name: 'textarea',
-      },
-
-    ],
-    answersId: '', // 提交答案用到
-    sessionKey: '',
-    paperId: '',
-    answersId: '',
-    id: '',
   },
   onChange(event) {
     this.setData({
       radio: event.detail,
     });
   },
-  radioChange(e) {
-    console.log(e);
-    const items = this.data.questionList[e.currentTarget.dataset.index].QuestChoice
-    for (let i = 0, len = items.length; i < len; ++i) {
-      items[i].checked = items[i].value === e.detail.value
-    }
 
-    let json = {};
-    json.currentAnswer = e.detail.value;
-    json.id = e.currentTarget.dataset.idx;
-    json.questType = e.currentTarget.dataset.questtypes;
-    this.data.chooseValue[e.currentTarget.dataset.index] = json;
-    this.setData({
-      questionList: this.data.questionList
-    })
-    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
-    console.log(this.data.questionList);
-
-    // this.data.questionList[this.data.index].checked = e.detail.value;
-
-    // this.setData({
-    //   questionList: this.data.questionList
-    // })
-    // const items = this.data.items
-    // for (let i = 0, len = items.length; i < len; ++i) {
-    //   items[i].checked = items[i].value === e.detail.value
-    // }
-
-    // this.setData({
-    //   items
-    // })
-  },
-  checkboxChange(e) {
-    const items = this.data.questionList[e.currentTarget.dataset.index].QuestChoice
-    const values = e.detail.value
-    for (let i = 0, lenI = items.length; i < lenI; ++i) {
-      items[i].checked = false
-      for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
-        if (items[i].value === values[j]) {
-          items[i].checked = true
-          break
-        }
-      }
-    }
-    let json = {};
-    let aa = e.detail.value.join("||")
-    json.currentAnswer = aa;
-    json.id = e.currentTarget.dataset.idx;
-    json.questType = e.currentTarget.dataset.questtypes;
-    this.data.chooseValue[e.currentTarget.dataset.index] = json;
-    this.setData({
-      questionList: this.data.questionList
-    })
-    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
-  },
-  bindTextAreaBlur(e) {
-    console.log(e, "hhhhh");
-    console.log(e.detail.value);
-    let json = {};
-    json.currentAnswer = e.detail.value;
-    json.id = e.currentTarget.dataset.idx;
-    json.questType = e.currentTarget.dataset.questtypes;
-    this.data.chooseValue[e.currentTarget.dataset.index] = json;
-    this.data.questionList[e.currentTarget.dataset.index].QuestAnswer = e.detail.value;
-    this.setData({
-      questionList: this.data.questionList
-    })
-    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
-  },
   share() {
     this.setData({
       show: true
     });
   },
   onClose() {
+    console.log("11111111111111");
     this.setData({
-      ['postshow[' + this.data.timeIndex + ']']: false,
+      postshow: false
     });
   },
   onClose1() {
@@ -298,9 +69,7 @@ Page({
     });
   },
   onInput(event) {
-    console.log(event, "8888888");
-
-    console.log("点击了");
+    console.log("000");
     this.setData({
       currentDate: event.detail,
     });
@@ -317,22 +86,10 @@ Page({
     return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
   },
 
-  share1(e) {
-    console.log(e);
-    console.log(e.currentTarget.dataset.index);
-    console.log(e.currentTarget.dataset.names, "8520852085208520");
-    console.log(this.data.postshow[e.currentTarget.dataset.index]);
-    this.data.postshow[e.currentTarget.dataset.index] = true;
-    this.data.names[e.currentTarget.dataset.index] = e.currentTarget.dataset.names;
+  share1() {
     this.setData({
-      postshow: this.data.postshow,
-      timeIndex: e.currentTarget.dataset.index
-    })
-    console.log(this.data.postshow, "打印下锕啊啊啊啊锕锕锕");
-
-    // this.setData({
-    //   postshow: true
-    // });
+      postshow: true
+    });
   },
   share() {
     this.setData({
@@ -344,26 +101,13 @@ Page({
     return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
   },
   onConfirm(event) {
-    console.log(event, "1111111");
+    console.log(event, "0000");
     let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
-    let json = {};
-    json.currentAnswer = timeValue;
-    json.id = event.currentTarget.dataset.idx;
-    json.questType = event.currentTarget.dataset.questtypes;
-    let aa = this.data.chooseValue[event.currentTarget.dataset.index] = json;
-    this.data.questionList[event.currentTarget.dataset.index].QuestAnswer = timeValue;
     this.setData({
-      questionList: this.data.questionList,
-      ['chooseValue[' + event.currentTarget.dataset.index + ']']: aa,
-      ['postshow[' + this.data.timeIndex + ']']: false,
-      ['headmasterText[' + this.data.timeIndex + ']']: '',
+      tenure: timeValue,
+      postshow: false,
+      headmasterText: ''
     });
-    wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
-    wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
-    console.log(this.data.chooseValue, "确定后的值锕");
-    console.log( this.data.questionList,"789789798789");
-    
-
   },
   onConfirm1(event) {
     console.log(event, "0000");
@@ -389,190 +133,125 @@ Page({
       parameter: parameterList
     })
   },
-  submitForm() {
-    // let arr1 = this.data.chooseValue.filter(d => d);
-    //console.log(arr1,"打印下提交");
-    console.log(this.data.chooseValue, "打印下提交");
-    this.data.chooseValue.forEach(item => {
-      console.log(item,"123123");
-      
-      if (item.currentAnswer) {
-
-      } else {
-        console.log(item.QuestStem);
-        
-        wx.showModal({
-          showCancel: false,
-          content: item.QuestStem + "不能为空",
-          success(res) {}
-        })
-      }
-    })
 
-    // wx.request({
-    //   url: app.globalData.publicUrl + '/wx/paper/commit',
-    //   method: "post",
-    //   data: {
-    //     sessionKey: this.data.sessionKey,
-    //     currentAnswerTemp: arr1,
-    //     answersId: wx.getStorageSync('answersId')
-    //   },
-    //   success: (res) => {
-    //     console.log(res);
-    //   }
-    // })
-  },
   formSubmit(e) {
     console.log(e.detail.value, "000000000000000");
-    let arr1 = this.data.zaizhiTime.filter(d => d);
-    let arr = this.data.names.filter(d => d);
-    var activeSubjectsArr = [];
-    for (var i = 0; i < arr.length; i++) {
-      var activeSubjectsObject = {};
-      for (var j = 0; j < arr1.length; j++) {
-        if (i == j) {
-          activeSubjectsObject[arr[i]] = arr1[j];
-          activeSubjectsArr.push(activeSubjectsObject);
-        }
-      }
+    if (!e.detail.value.username) {
+      this.setData({
+        nameIsTrue: true
+      })
+    } else {
+      this.setData({
+        nameIsTrue: false
+      })
     }
-    console.log(activeSubjectsArr, "7777777");
-    let count = 0;
-    let data = {};
-    for (let a in e.detail.value) {
-      count += 1;
-      if (count = 1) {
-        data[a] = e.detail.value[a]
-      }
+    let sex = '';
+    if (this.data.parameter[0].checked) {
+      sex = this.data.parameter[0].name
+      this.setData({
+        errorIsTrue: false
+      })
+    } else if (this.data.parameter[1].checked) {
+      sex = this.data.parameter[1].name
+      this.setData({
+        errorIsTrue: false
+      })
+    } else {
+      this.setData({
+        errorIsTrue: true
+      })
     }
-    activeSubjectsArr.forEach(item => {
-      Object.assign(data, item)
-    })
-    console.log(data, "888888888888888888888888");
-    // Object.keys(data).forEach(function (key) {
-    //   if (!data[key]) {
-    //     wx.showModal({
-    //       showCancel: false,
-    //       content: key + "不能为空"
-    //     })
-    //     return;
-    //   }
 
-    // });
-    // if (!e.detail.value.username) {
-    //   this.setData({
-    //     nameIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     nameIsTrue: false
-    //   })
-    // }
-    // let sex = '';
-    // if (this.data.parameter[0].checked) {
-    //   sex = this.data.parameter[0].name
-    //   this.setData({
-    //     errorIsTrue: false
-    //   })
-    // } else if (this.data.parameter[1].checked) {
-    //   sex = this.data.parameter[1].name
-    //   this.setData({
-    //     errorIsTrue: false
-    //   })
-    // } else {
-    //   this.setData({
-    //     errorIsTrue: true
-    //   })
-    // }
-
-    // if (!e.detail.value.work) {
-    //   this.setData({
-    //     workIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     workIsTrue: false
-    //   })
-    // }
+    if (!e.detail.value.work) {
+      this.setData({
+        workIsTrue: true
+      })
+    } else {
+      this.setData({
+        workIsTrue: false
+      })
+    }
 
-    // if (!e.detail.value.culture) {
-    //   this.setData({
-    //     cultureIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     cultureIsTrue: false
-    //   })
-    // }
+    if (!e.detail.value.culture) {
+      this.setData({
+        cultureIsTrue: true
+      })
+    } else {
+      this.setData({
+        cultureIsTrue: false
+      })
+    }
 
-    // if (!e.detail.value.graduation) {
-    //   this.setData({
-    //     graduationIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     graduationIsTrue: false
-    //   })
-    // }
+    if (!e.detail.value.graduation) {
+      this.setData({
+        graduationIsTrue: true
+      })
+    } else {
+      this.setData({
+        graduationIsTrue: false
+      })
+    }
 
-    // if (!e.detail.value.major) {
-    //   this.setData({
-    //     majorIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     majorIsTrue: false
-    //   })
-    // }
+    if (!e.detail.value.major) {
+      this.setData({
+        majorIsTrue: true
+      })
+    } else {
+      this.setData({
+        majorIsTrue: false
+      })
+    }
 
-    // if (!e.detail.value.post) {
-    //   this.setData({
-    //     postIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     postIsTrue: false
-    //   })
-    // }
-    // if (!e.detail.value.phone) {
-    //   this.setData({
-    //     phoneIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     phoneIsTrue: false
-    //   })
-    // }
-    // if (!this.data.zaizhiTime) {
-    //   this.setData({
-    //     renzhishijianIsTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     renzhishijianIsTrue: false
-    //   })
-    // }
-    // if (!this.data.peixunTime) {
-    //   this.setData({
-    //     peixunshijianTrue: true
-    //   })
-    // } else {
-    //   this.setData({
-    //     peixunshijianTrue: false
-    //   })
-    // }
+    if (!e.detail.value.post) {
+      this.setData({
+        postIsTrue: true
+      })
+    } else {
+      this.setData({
+        postIsTrue: false
+      })
+    }
+    if (!e.detail.value.phone) {
+      this.setData({
+        phoneIsTrue: true
+      })
+    } else {
+      this.setData({
+        phoneIsTrue: false
+      })
+    }
+    if (!this.data.tenure) {
+      this.setData({
+        renzhishijianIsTrue: true
+      })
+    } else {
+      this.setData({
+        renzhishijianIsTrue: false
+      })
+    }
+    if (!this.data.peixunTime) {
+      this.setData({
+        peixunshijianTrue: true
+      })
+    } else {
+      this.setData({
+        peixunshijianTrue: false
+      })
+    }
 
-    // console.log(this.data.zaizhiTime, "在职时间000");
-    // console.log(this.data.peixunTime, "培训时间000");
-    // console.log(sex, "性别的");
-    // e.detail.value.zaizhiTime = this.data.zaizhiTime;
-    // e.detail.value.peixunTime = this.data.peixunTime;
-    // e.detail.value.sex = sex;
-    // console.log(e.detail.value, "我是合并后的锕");
+    console.log(this.data.tenure, "在职时间000");
+    console.log(this.data.peixunTime, "培训时间000");
+    console.log(sex, "性别的");
+    e.detail.value.tenure = this.data.tenure;
+    e.detail.value.peixunTime = this.data.peixunTime;
+    e.detail.value.sex = sex;
+    e.detail.value.sessionKey = '00000000';
+    console.log(e.detail.value, "我是合并后的锕");
 
 
 
   },
+
   timeFormat(date, fmt) {
     let o = {
       "M+": date.getMonth() + 1, //月份   
@@ -592,106 +271,31 @@ Page({
 
   },
   onReady: function () {},
-  onLoad: function (options) {
-    //const sessionKey = await tools.checkSessionAndLogin();
-    const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
-    console.log("onloading.....................");
-
-
-    let chooceArr = this.data.questionList.map(item => {
-      let json = {};
-      json.currentAnswer = '';
-      json.questType = '';
-      json.id = item.Id;
-      json.QuestStem = item.QuestStem;
-      return json
-    })
-    console.log(chooceArr);
-    this.setData({
-      chooseValue: chooceArr
-    })
-
-
-    wx.setStorageSync('answersId', options.paperId);
+  async onLoad() {
+    const sessionKey = await tools.checkSessionAndLogin();
+    console.log(sessionKey,"000000");
     this.setData({
-      sessionKey: sessionKey,
-      paperId: options.paperId,
-      answersId: options.answersId,
-      id: options.id,
+      sessionKey: sessionKey
     })
-    if (wx.getStorageSync('questionList' + wx.getStorageSync('answersId'))) {
-      console.log("缓村了锕");
-      const questionList = wx.getStorageSync('questionList' + wx.getStorageSync('answersId'));
-      this.setData({
-        questionList: questionList,
-        answersId: wx.getStorageSync('answersId' + wx.getStorageSync('answersId')),
-        chooseValue: wx.getStorageSync('chooseValue' + wx.getStorageSync('answersId')),
-      })
-      console.log(this.data.questionList, "show 缓存的数据");
-    } else {
-      console.log("无缓存");
-      this.allShi(this.data.id, this.data.paperId, this.data.sessionKey);
-    }
+    this.getBanner(sessionKey);
   },
-  allShi(id, paperId, sessionKey) {
+  getBanner(sessionKey) {
+    console.log(sessionKey, "sessionKey");
     wx.request({
-      url: app.globalData.publicUrl + '/wx/paper/detail',
+      url: app.globalData.publicUrl + '/wx/student/selStudentSessionKeyEcho',
       method: "post",
       data: {
         sessionKey: sessionKey,
-        id: id,
-        paperId: paperId
       },
       success: (res) => {
-        let jsonArr = JSON.parse(res.data.paperContent).map(item => {
-          let json = {};
-          json.QuestType = item.QuestType;
-          json.Id = item.Id;
-          json.QuestAnswer = item.QuestAnswer;
-          json.QuestStem = item.QuestStem;
-          // if (item.QuestChoice) {
-          //   let arr = item.QuestChoice.split('||');
-          //   json.QuestChoice = arr;
-          // }
-          if (item.QuestType == '1' || item.QuestType == '0') {
-            let arr = item.QuestChoice.split('||');
-            let arrJson = arr.map(item => {
-              let json1 = {};
-              json1.name = item;
-              json1.value = item;
-              json1.checked = false;
-              return json1
-            });
-            json.QuestChoice = arrJson;
-          }
-          return json;
-        })
-
-        // for(let i = 0 ; i<jsonArr.length; i++){
-        //    let json = {};
-        //    json.currentAnswer = '';
-        //    json.questType = '';
-        //    json.id = '';
-
-        // }
-
-        //  答案锕 
-        let chooceArr = jsonArr.map(item => {
-          let json = {};
-          json.currentAnswer = '';
-          json.questType = '';
-          json.id = item.Id;
-          json.QuestStem = item.QuestStem;
-          return json
-        })
-        this.setData({
-          questionList: jsonArr,
-          chooseValue: chooceArr
-        })
-        console.log(this.data.questionList, "00000");
-        wx.setStorageSync('questionList' + wx.getStorageSync('answersId'), this.data.questionList);
-        wx.setStorageSync('chooseValue' + wx.getStorageSync('answersId'), this.data.chooseValue);
+        if (res.data.code == 0) {
+          console.log(res, "suoyoude");
+          // this.setData({
+          //   dataArr: res.data.list
+          // })
+        }
       }
     })
   },
+
 })

+ 1 - 2
pages/studentRegistration/studentRegistration.json

@@ -1,5 +1,4 @@
 {
   "usingComponents": {},
-  "navigationBarTitleText":"学员登记表",
-  "text-time": "../../components/text-time/text-time"
+  "navigationBarTitleText":"学员登记表"
 }

+ 138 - 66
pages/studentRegistration/studentRegistration.wxml

@@ -1,89 +1,161 @@
 <view class="home">
-	<view wx:for="{{questionList}}">
-		<view class='fwb' wx:if="{{ item.QuestType == 5}}">
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">{{item.QuestStem}}</view>
-			<view class='weui-input'>
-				<input name="{{item.name}}" value="{{item.QuestAnswer}}" data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx='{{item.Id}}' bindinput='bindTextAreaBlur' placeholder="请输入" />
-				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+	<form bindsubmit="formSubmit">
+			<!-- <van-field name="username" value="{{ username }}" label="姓名" placeholder="请输入姓名" error-message="{{nameMessage}}" /> -->
+			<view class='fwb'>
+				<!-- <van-icon name="circle" /> -->
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">姓名</view>
+				<view class='weui-input'>
+					<input name="username" disabled value="{{ username }}" placeholder="请输入姓名" placeholder-style="font-size:25rpx" />
+					<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+				</view>
 			</view>
-		</view>
-		<view class='fwb' wx:if="{{ item.QuestType == 0}}">
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+			<!-- <van-field
+    value="{{ password }}"
+    label="密码"
+    placeholder="请输入密码"
+    required
+    border="{{ false }}"
+  /> -->
+			<!-- <van-radio-group value="{{ radio }}" bind:change="onChange">
+				<van-radio name="1">单选框 1</van-radio>
+				<van-radio name="2">单选框 2</van-radio>
+			</van-radio-group> -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">性别</view>
+				<!-- <view class='parameter-wrap'>
+					<block wx:for="{{parameter}}" wx:key="parameter">
+						<view class='parameter-info text-over {{item.checked?"checked_parameter":""}}' data-id='{{item.id}}' bindtap='parameterTap'>{{item.name}}</view>
+					</block>
+					<view class="{{errorIsTrue?'error':'noerror'}}">请选择性别</view>
+				</view> -->
+					<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' >
+						<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{parameter}}">
+							<radio value="{{ item.value }}" />{{item.name}}
+						</label>
+					</radio-group>
 			</view>
-			<view class="xingbie">{{item.QuestStem}}</view>
-			<view class='weui-input' style=" background: white">
-				<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="radioChange">
-					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
-						<radio value="{{ item.value }}" />{{item.name}}
-					</label>
-				</radio-group>
-				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+			<!-- <van-field name="gongzuoName" value="{{ gongzuoName }}" label="工作单位" placeholder="请输入工作单位" error-message="{{nameMessage}}" />
+			<van-field name="gongzuoName" value="{{ gongzuoName }}" label="文化程度" placeholder="请输入文化程度" error-message="{{nameMessage}}" />
+			<van-field name="gongzuoName" value="{{ gongzuoName }}" label="毕业学校" placeholder="请输入最后毕业学校" error-message="{{nameMessage}}" />
+			<van-field name="gongzuoName" value="{{ gongzuoName }}" label="所学专业" placeholder="请输入所学专业" error-message="{{nameMessage}}" />
+			<van-field name="gongzuoName" value="{{ gongzuoName }}" label="现任职务" placeholder="请输入现任职务" error-message="{{nameMessage}}" /> -->
+			<!-- <van-cell title="任职时间" value="{{ date }}" bind:click="onDisplay" /> -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">工作单位</view>
+				<view class='weui-input'>
+					<input class="" name="studentDept" value="{{ studentDept }}" placeholder="请输入工作单位" placeholder-style="font-size:25rpx"/>
+					<!-- <view class="{{workIsTrue?'error':'noerror'}}">请输入工作单位</view> -->
+				</view>
 			</view>
-		</view>
 
-		<view class='fwb' wx:if="{{ item.QuestType == 1}}">
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">{{item.QuestStem}}</view>
-			<view class='weui-input' style=" background: white">
-				<checkbox-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="checkboxChange">
-					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
-						<checkbox value="{{ item.value }}" />{{item.name}}
-					</label>
-				</checkbox-group>
-				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">文化程度</view>
+				<view class='weui-input'>
+					<input class="" name="culture" value="{{culture }}" placeholder="请输入文化程度" placeholder-style="font-size:25rpx"/>
+					<!-- <view class="{{ cultureIsTrue?'error':'noerror'}}">请输入文化程度</view> -->
+				</view>
 			</view>
-		</view>
 
-		<view class='fwb' wx:if="{{ item.QuestType == 2}}">
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">{{item.QuestStem}}</view>
-			<view class='weui-input' style=" background: white">
-				<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}' bindchange="radioChange">
-					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:for="{{item.QuestChoice}}">
-						<radio value="{{ item.value }}" />{{item.name}}
-					</label>
-				</radio-group>
-				<!-- <view class="{{nameIsTrue?'error':'noerror'}}">请输入姓名</view> -->
-			</view>
-		</view>
-		<view class='fwt' wx:if="{{ item.QuestType == 3}}">
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">毕业学校</view>
+				<view class='weui-input'>
+					<input class="" name="school" value="{{ school }}" placeholder="请输入毕业学校" placeholder-style="font-size:25rpx"/>
+					<!-- <view class="{{graduationIsTrue?'error':'noerror'}}">请输入毕业学校</view> -->
+				</view>
 			</view>
-			<view class="flex-flex">
-				<view class=" xingbie moreTitle">{{item.QuestStem}}</view>
-				<textarea value="{{item.QuestAnswer}}" name="{{item.name}}" data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx='{{item.Id}}' bindinput='bindTextAreaBlur' placeholder="请输入" maxlength='500' />
+
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">所学专业</view>
+				<view class='weui-input'>
+					<input class="" name="major" value="{{ major }}" placeholder="请输入所学专业" placeholder-style="font-size:25rpx"/>
+					<!-- <view class="{{majorIsTrue?'error':'noerror'}}">请输入所学专业</view> -->
 				</view>
 			</view>
 
 
-				<view class='fwb' wx:if="{{ item.QuestType == 6}}"> 
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">现任职务</view>
+				<view class='weui-input'>
+					<input class="" name="post" value="{{ post }}" placeholder="请输入现任职务" placeholder-style="font-size:25rpx"/>
+					<!-- <view class="{{postIsTrue?'error':'noerror'}}">请输入现任职务</view> -->
+				</view>
+			</view>
+			<view class='fwb'>
 				<view class="red-image">
 					<image src="/images/quan.png" style="width:20rpx;height:20rpx;"> </image>
 				</view>
-				<view class="xingbie">{{item.QuestStem}}</view>
-				<view class='weui-input' style="font-size: 26rpx;  line-height: 56rpx;"  data-index = '{{index}}' data-names='{{item.name}}'  catchtap="share1" name="{{item.name}}">
-					<!-- QuestAnswer   chooseValue[index].currentAnswer -->
-			{{questionList[index].QuestAnswer}}<view wx:if='{{!questionList[index].QuestAnswer}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx" >请选择</view>
+				<view class="xingbie">任职时间</view>
+				<view class='weui-input' style="font-size: 26rpx;  line-height: 56rpx;"  catchtap="share1">
+					{{tenure}}
+					<view  wx:if='{{!tenure}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx" >{{headmasterText}}</view>
 					<!-- <view class="{{renzhishijianIsTrue?'error':'noerror'}}">请输入任职时间</view> -->
 				</view>
-				 <cover-view>
-					<van-popup  show="{{ postshow[index] }}" position="bottom" custom-style="height: 50%;">
-					<van-datetime-picker  data-index='{{index}}' data-questTypes='{{item.QuestType}}' data-idx = '{{item.Id}}'  bind:confirm="onConfirm" bind:cancel='onClose'  type="date" value="{{ currentDate }}" bind:input="onInput" min-date="{{ minDate }}" formatter="{{ formatter }}" />
+				<van-popup show="{{ postshow }}" position="bottom" custom-style="height: 50%;">
+					<van-datetime-picker bind:confirm="onConfirm" bind:cancel='onClose' type="date" value="{{ currentDate }}" bind:input="onInput" min-date="{{ minDate }}" formatter="{{ formatter }}" />
 				</van-popup>
-					 </cover-view>
+			</view>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">联系电话</view>
+				<view class='weui-input'>
+					<input class="" name="studentPhone" value="{{ studentPhone }}" placeholder="请输入联系电话" placeholder-style="font-size:25rpx"/>
+					<!-- <view class="{{phoneIsTrue?'error':'noerror'}}">请输入联系电话</view> -->
+				</view>
 			</view>
 
-		</view>
+			<!-- <view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">培训时间</view>
+				<view class='weui-input' style="font-size: 26rpx;  line-height: 56rpx;" catchtap="share">
+					{{peixunTime}}<view  wx:if='{{!peixunTime}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx">{{peixunText}}</view>
+					<view class="{{peixunshijianTrue?'error':'noerror'}}">请选择培训时间</view>
+				</view>
+				<van-popup show="{{ postshow1 }}" position="bottom" custom-style="height: 50%;">
+					<van-datetime-picker bind:confirm="onConfirm1" bind:cancel='onClose1' type="date" value="{{ currentDate1 }}" bind:input="onInput1" min-date="{{ minDate }}" formatter="{{ formatter }}" />
+				</van-popup>
+			</view> -->
+			<!-- <view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">培训时间</view>
+				<view class='time' catchtap="">
+					请选择培训时间
+				</view>
+			</view> -->
+
+
+
+
+		<!-- <button formType="submit">提交表单</button> -->
 		<view style="margin-top: 100rpx;margin-bottom:100rpx">
-			<van-button round bindtap="submitForm">提交表单</van-button>
+			<van-button round formType="submit">提交表单</van-button>
 		</view>
+
+	</form>
 </view>

+ 12 - 55
pages/studentRegistration/studentRegistration.wxss

@@ -67,12 +67,12 @@ button:not([size='mini']) {
   font-size: 24rpx;
   color: #EE0A24;
   background: white;
-
+  
 }
 
 .noerror {
-  display: none !important;
-
+  display: none!important;
+  
 }
 
 .time {
@@ -88,13 +88,10 @@ button:not([size='mini']) {
   margin-left: 20rpx;
   background: #F4F4F4;
   width: 474rpx;
-
 }
-
-.weui-input input {
+.weui-input input{
   height: 60rpx;
 }
-
 .van-icon-circle {
   color: #EE0A24;
   /* margin-top: 30rpx; */
@@ -106,67 +103,27 @@ button:not([size='mini']) {
   width: 130rpx;
   line-height: 60rpx;
 }
-
 .red-image {
   vertical-align: text-bottom;
   margin-top: 10rpx;
 }
-
 input {
-  height: 40rpx;
-}
-
-.moreTitle {
-  width: 600rpx;
-
-}
-
-textarea {
-  background: rgba(244, 244, 244, 1);
-  border-radius: 10px;
-  border: 1rpx solid rgba(244, 244, 244, 1);
-  width: 100%;
-  height: 194rpx;
-  margin-top: 20rpx;
-}
-
-.fwt {
-  display: flex;
-  font-size: 28rpx;
-  margin-top: 40rpx;
-}
-
-.flex-flex {
-  display: flex;
-  flex-direction: column;
-}
-
-.big-vover {
-  z-index: 999;
-}
-
-.weui-input radio {
-  display: none;
+  height: 40rpx; 
 
 }
-
-.weui-input checkbox {
+radio {
   display: none;
 }
-
-.checkboxbox {
-  background: linear-gradient(90deg, rgba(215, 47, 29, 1), rgba(249, 157, 48, 1)) !important;
-  color: white !important;
- 
-}
-
 .my-choosebox {
   color: rgba(51, 51, 51, 1);
   width: 200rpx;
   padding: 10rpx 80rpx;
   background: #FFF0ED;
-  margin: 10rpx;
-  line-height: 80rpx;
+  margin: 0 10rpx;
   border-radius: 10rpx;
-
+}
+.checkboxbox {
+  background: linear-gradient(90deg, rgba(215, 47, 29, 1), rgba(249, 157, 48, 1)) !important;
+  color: white !important;
+ 
 }

+ 76 - 0
pages/studentRegistrationDeyail/studentRegistrationDeyail.js

@@ -0,0 +1,76 @@
+//index.js
+//获取应用实例
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
+Page({
+  data: {
+    // 课程轮播
+    "bnrUrl": [{
+      "url": "/images/banner2.jpg",
+      "name": "二期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }, {
+      "url": "/images/banner1.jpg",
+      "name": "三期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }, {
+      "url": "/images/banner2.jpg",
+      "name": "四期素质教育培训",
+      "zbf": "xx委员会",
+      "starttime": "2020年6月"
+    }],
+    gridArr: [
+      // {
+      //   "num": "1",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+      // {
+      //   "num": "2",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化、同年检',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+      // {
+      //   "num": "3",
+      //   "qusetion": "深入贯彻习近平总书记关于加大社会组织党建工作 力度的重要批示精神,坚决落实社会组织与社会组 织党组织“五个同步”,五个同步是以下哪一个?",
+      //   'daanTrue': 'B. 同培育、同孵化、同年检',
+      //   'daanFalse': 'A. 同培育、同孵化、同年检、同评估',
+      // },
+    ],
+
+  },
+  chengji(sessionKey, answersId) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/answer/detail',
+      method: "post",
+      data: {
+        sessionKey: sessionKey,
+        answersId: answersId
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res, "suoyoude");
+          this.setData({
+            gridArr:res.data.list
+          })
+          console.log(this.data.gridArr);
+        }
+      }
+    })
+  },
+  onReady: function () {},
+  async onLoad(options) {
+    console.log(options.answersId);
+    console.log("onload..................................");
+    let answersId = options.answersId;
+    const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
+    //const sessionKey = await tools.checkSessionAndLogin();  
+    this.chengji(sessionKey, answersId);
+
+  },
+
+})

+ 6 - 0
pages/studentRegistrationDeyail/studentRegistrationDeyail.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText":"学员登记表",
+  "navigationBarBackgroundColor": "#eb3f33",
+  "navigationBarTextStyle": "white"
+}

+ 24 - 0
pages/studentRegistrationDeyail/studentRegistrationDeyail.wxml

@@ -0,0 +1,24 @@
+<view class="home">
+	<view class="box">
+		<view class="redk"></view>学员登记表
+		<view class="cuoti-box" wx:for="{{gridArr}}">
+			<view class="number">
+				{{index+1}}
+			</view>
+			<view class="wenti">
+				<view style=" margin-right: 20rpx;">
+					{{item.questStem}} :{{item.currentAnswer}}
+				</view>
+				<!-- <view class="daan">
+					正确答案: <view class="zhengquedaan">{{item.correctAnswer}}</view>
+				</view> -->
+				<!-- <view class="daan">
+					我的答案: <view class="wodedaan">{{item.currentAnswer}}</view>
+				</view>
+				<view class="daan">
+					分数: <view class="wodedaan">{{item.score}}</view>
+				</view> -->
+			</view>
+		</view>
+	</view>
+</view>

+ 87 - 0
pages/studentRegistrationDeyail/studentRegistrationDeyail.wxss

@@ -0,0 +1,87 @@
+
+.box {
+  margin: 0 40rpx;
+  background-color: white;
+  border-radius: 20rpx;
+  padding-top: 30rpx;
+  font-size: 26rpx;
+  padding-bottom: 20rpx;
+}
+.yuan{
+  height: 160rpx;
+  width: 160rpx;
+  border-radius: 50%;
+  background-color: white;
+   display: flex;
+   flex-direction: column;
+   text-align: center;
+  margin: 0 auto;
+   
+}
+.title{
+  font-size: 20rpx;
+  color: white;
+}
+.fen{
+  font-size: 50rpx;
+  color: white;
+  margin-top: 10rpx;
+}
+.nei{
+  height: 123rpx;
+  width: 123rpx;
+  background-color: #EB3F33;
+  border-radius: 50%;
+  margin: 0 auto;
+  margin-top: 18rpx;
+  box-shadow:rgba(235,63,51,0.3) 0px 0px 20px;
+  
+}
+.redk {
+  height: 33rpx;
+  width: 8rpx;
+  background-color: #eb3f33;
+  border-radius: 5rpx;
+  margin-right: 10rpx;
+  margin-left: 40rpx;
+  float: left;
+}
+.cuoti-box{
+  background:rgba(172,213,152,0.2);
+  border-radius:7rpx;
+  display: flex;
+  margin: 40rpx;
+  padding-top: 10rpx;
+  padding-left: 10rpx;
+}
+.wenti{
+  text-align: justify;
+  font-size: 25rpx;
+  margin-left: 20rpx;
+  width: 620rpx;
+}
+.daan{
+  font-size: 21rpx;
+  margin: 20rpx 20rpx 20rpx 0rpx;
+}
+.number{
+  height: 30rpx;
+  line-height: 30rpx;
+  width: 34rpx;
+  border-radius: 34rpx;
+  border: 1rpx solid black;
+  text-align: center;
+}
+.zhengquedaan{
+  display: inline-block;
+  color: #00B627;
+}
+.wodedaan{
+  display: inline-block;
+  color: #EB3F33;
+}
+
+page {
+  background:#F4F4F4
+  
+}

+ 2 - 2
pages/testAnswer/testAnswer.js

@@ -125,8 +125,8 @@ Page({
 
   },
   async onLoad() {
-    //const sessionKey = await tools.checkSessionAndLogin();
-    const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
+    const sessionKey = await tools.checkSessionAndLogin();
+    //const sessionKey = 'yoa0rZTt2bAiTVDsiRjysw==';
     this.setData({
       sessionKey: sessionKey
     })

+ 1 - 1
pages/testAnswer/testAnswer.wxml

@@ -1,6 +1,6 @@
 <view class="container">
 	<view class="class_box" wx:for="{{dataArr}}" wx:for-index="idx" wx:for-item="item">
-		<image src="{{item.img}}" mode='aspectFill' class="scimg"></image>
+		<image src="{{item.image}}" mode='aspectFill' class="scimg"></image>
 		<view class="sctext">
 			<view class="t1">{{item.examName}}</view>
 			<!-- {{ times(item.examBegin)}} -->