From 7344cb656ec84545a22836d3e9cb4b75fe3538bc Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期二, 24 九月 2024 12:04:13 +0800
Subject: [PATCH] zsrwd

---
 packageBookService/pages/bookServices/detail/components/learnTask/index.js |   55 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/packageBookService/pages/bookServices/detail/components/learnTask/index.js b/packageBookService/pages/bookServices/detail/components/learnTask/index.js
index 0607788..8cf3f61 100644
--- a/packageBookService/pages/bookServices/detail/components/learnTask/index.js
+++ b/packageBookService/pages/bookServices/detail/components/learnTask/index.js
@@ -74,7 +74,6 @@
           disabled: false
         });
       }
-      console.log(options.consumer, 77)
       this.getResourceData()
       this.getLearnTime()
     }
@@ -199,7 +198,6 @@
     })
   },
   getTask(e) {
-    console.log(e)
     let item = e.currentTarget.dataset.item
     this.taskSelect(item)
   },
@@ -231,6 +229,7 @@
       this.setData({
         tasksListData: res.datas,
       });
+
       if (this.data.taskInfo.name) {
         this.taskSelect(this.data.taskInfo)
       }
@@ -276,10 +275,11 @@
           }
         })
       }
+      if (this.data.dataList.length == 0) {
+        this.goDetail(item)
+      }
     }
-    if (this.data.dataList.length == 0) {
-      this.goDetail(item)
-    }
+
   },
   goDetail(item) {
     this.setData({
@@ -312,9 +312,20 @@
         })
       }
       this.setData({
-        dataList: res.datas.cmsDatas[0].datas,
-        taskShow: true,
+
       });
+      if (this.data.name && this.data.school && this.data.class) {
+        this.setData({
+          dataList: res.datas.cmsDatas[0].datas,
+          taskShow: true,
+        })
+      } else {
+        wx.showToast({
+          title: "璇峰厛濉啓涓汉淇℃伅",
+          icon: 'none',
+          duration: 1000
+        })
+      }
     })
   },
   getChildTasksList() {
@@ -340,7 +351,7 @@
             if (content.teacherComment.length > 0) {
               content.teacherComment.forEach((item2) => {
                 if (item.id == item2.childTaskId) {
-                  item.mateEvaluation = [item2]
+                  item.teacherEvaluation = [item2]
                   if (this.data.consumer == 'teacher') {
                     this.setData({
                       evaluated: true
@@ -358,7 +369,6 @@
               content.mateComment.forEach((item3) => {
                 if (item.id == item3.childTaskId) {
                   item.mateEvaluation = [...item.mateEvaluation, item3]
-                  console.log(item.mateEvaluation, 123)
                   if (this.data.consumer == 'classmate') {
                     if (item.mateEvaluation && item.mateEvaluation.length > 0) {
                       let data = item.mateEvaluation.find(
@@ -387,6 +397,23 @@
           dataList: list
         });
       }
+    })
+  },
+
+  // 涓汉淇℃伅濉啓
+  bindTnputBlur(e) {
+    this.setData({
+      name: e.detail.value
+    })
+  },
+  onSchoolInput(e) {
+    this.setData({
+      school: e.detail.value
+    })
+  },
+  bindClassBlur(e) {
+    this.setData({
+      class: e.detail.value
     })
   },
 
@@ -434,7 +461,6 @@
   //鎻愪氦鑷繁濉啓
   inviteBtn() {
     let empty = false
-    console.log(this.data.dataList, 123)
     this.data.dataList.forEach((item) => {
       if (item.introspection == '' || item.completion == '' || item.selfEvaluation == '') {
         empty = true
@@ -494,7 +520,6 @@
   },
   updateSubmit() {
     let evaluate = []
-    console.log(this.data.dataList, 211)
     this.data.dataList.forEach((item) => {
       evaluate.push({
         id: item.id,
@@ -558,10 +583,12 @@
         duration: 1000
       })
       return false
+    } else {
+      wx.showShareMenu({
+        withShareTicket: true
+      });
     }
-    wx.showShareMenu({
-      withShareTicket: true
-    });
+
   },
   submitComment() {
     let mateEvaluationList = []

--
Gitblit v1.9.1