Browse Source

作业对接

zhangshuling 4 years atrás
parent
commit
dbf7170637

+ 5 - 7
pages/schedule/schedule.js

@@ -93,15 +93,9 @@ Page({
   onShareAppMessage: function () {
 
   },
-  selectDate: function (d) {
-    console.log('selectDate ' + d)
-  },
-  callSelectDate: function (d) {
-    let v = d.detail.dateString;
+  selectDate: function (v) {
     let vd = new Date(v);
     let week = this.data.weekMap[vd.getDay()];
-
-
     let list = this.data.eventList.filter(o => {
       return o.attenceDate == v;
     });
@@ -110,5 +104,9 @@ Page({
       o.et = o.endTime.substring(11, 16);
     })
     this.setData({ 'date': v, 'week': week, 'dateList': list });
+  },
+  callSelectDate: function (d) {
+    let v = d.detail.dateString;
+    this.selectDate(v);
   }
 })

+ 70 - 17
pages/task/task.js

@@ -1,29 +1,39 @@
 // pages/task/task.js
+const app = getApp()
+const util = require("../../utils/util")
+const urlDef = require("../../utils/urls")
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    switchTitle:['待提交','已提交'],
-    doName:"做作业"
+    curStu: null,
+    switchTitle: ['待提交', '已提交'],
+    doName: "做作业",
+    beginDate: null,
+    endDate: null,
+    status: 0,
   },
 
-  changeIndex:function(e){
-   if(e.detail == 0){
-    this.setData({
-      doName: '做作业'
-    })
-   } else {
-    this.setData({
-      doName: '查看详情'
-    })
-   }
+  changeIndex: function (e) {
+    if (e.detail == 0) {
+      this.setData({ 'status': 0 })
+      this.setData({
+        doName: '做作业'
+      })
+    } else {
+      this.setData({ 'status': 1 })
+      this.setData({
+        doName: '查看详情'
+      })
+    }
+    this.queryList()
   },
 
-  doTask:function(){
+  doTask: function (e) {
     wx.navigateTo({
-      url: '/pages/taskDetail/taskDetail?type='+this.data.curIndex,
+      url: '/pages/taskDetail/taskDetail?id=' + e.currentTarget.dataset.id,
     })
   },
 
@@ -31,21 +41,29 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+    // let bd = options.beginDate
+    // let ed = options.endDate
+    let bd = '2020-01-01'
+    let ed = '2021-01-01'
+    if (bd && ed) {
+      this.setData({ 'beginDate': bd, 'endDate': ed })
+    } else {
+      let today = util.curTime().substring(0, 10).replace(/\//g, '-')
+      this.setData({ 'beginDate': today.substring(0, 8) + '01', 'endDate': today })
+    }
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
-
+    this.queryList()
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
   },
 
   /**
@@ -81,5 +99,40 @@ Page({
    */
   onShareAppMessage: function () {
 
+  },
+  queryList: function () {
+    const urls = urlDef.urls;
+    let stu = wx.getStorageSync('student');
+    if (stu) {
+      this.setData('curStu', stu);
+      util.apiPost(urls.my_homework, { 'q.beginDate': this.data.beginDate, 'q.endDate': this.data.endDate, 'q.studentId': stu.studentId, 'q.status': this.data.status }).then(rs => {
+        rs.map(o => {
+          if (o.beginTime) {
+            o.beginTime = o.beginTime.substring(11, 16)
+          }
+          if (o.endTime) {
+            o.endTime = o.endTime.substring(11, 16)
+          }
+          if (o.completedTime) {
+            o.completedTime = o.completedTime.substring(0, 10)
+          }
+          if (o.homeworkContent) {
+            o.homeworkContent = this.parseContent(o.homeworkContent)
+          }
+        })
+        this.setData({ 'list': rs })
+      })
+    }
+  },
+  parseContent(content) {
+    let contents = null
+    try {
+      contents = JSON.parse(content)
+      content = contents.content
+    } catch (e) {
+      contents = {}
+      console.log(JSON.stringify(e))
+    }
+    return content
   }
 })

+ 7 - 7
pages/task/task.wxml

@@ -11,13 +11,13 @@
   <!-- 作业列表 -->
   <view class="task-view">
     <view class="task-list">
-      <view class="task-box" wx:for="{{3}}" wx:key="index">
-        <view class="task-title">2021-02-21 课后作业</view>
-        <view class="do-time" wx:if="{{curIndex == 1}}">2021-02-22</view>
-        <view class="task-class">小鹏钢琴课</view>
-        <view class="task-time">09:00 ~ 11:00</view>
-        <view class="task-desc">测试数据测试数据测试数据测试数据测试数据</view>
-        <view class="do-task" bindtap="doTask">{{doName}}</view>
+      <view class="task-box" wx:for="{{list}}" wx:key="index">
+        <view class="task-title">{{item.title}}</view>
+        <view class="do-time" wx:if="{{item.status != 0}}">{{item.completedTime}}</view>
+        <view class="task-class">{{item.classesName}}</view>
+        <view class="task-time">{{item.beginTime}} ~ {{item.endTime}}</view>
+        <view class="task-desc">{{item.homeworkContent}}</view>
+        <view class="do-task" bindtap="doTask" data-id="{{item.id}}">{{doName}}</view>
       </view>
     </view>
   </view>

+ 215 - 57
pages/taskDetail/taskDetail.js

@@ -1,100 +1,97 @@
 // pages/taskDetail/taskDetail.js
+const app = getApp()
+const util = require("../../utils/util")
+const urlDef = require("../../utils/urls")
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    curStu: null,
+    homeworkId: null,
     curVideo: '',
     videoFlag: 0,
-    imgList:[
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-      'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg'
-    ],
     videoContext: '',
-    videoList:[
-      {
-        img: 'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-        url: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
-      },
-      {
-        img: 'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-        url: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
-      },
-      {
-        img: 'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-        url: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
-      },
-      {
-        img: 'https://file.schoolwisdoms.com/image/26cf1980-5b25-4c2e-af7f-376677d76033.jpg',
-        url: 'http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
-      }
-    ],
-    audioList:[
-      'https://gm-sycdn.kuwo.cn/2256fce37c86b5bc25065d780f769260/60347b85/resource/n2/73/81/1062648582.mp3',
-      'https://gm-sycdn.kuwo.cn/2256fce37c86b5bc25065d780f769260/60347b85/resource/n2/73/81/1062648582.mp3',
-    ],
     curAudio: '',
     curAudioIndex: -1,
     audioPause: 0,
-    doTaskFlag: false
+    doTaskFlag: false,
+    entity: null,
+    teacherFace: '/images/head.png',
   },
 
-  bindfullscreenchange:function(){
-    if(this.data.videoFlag == 0){
+  bindfullscreenchange: function () {
+    if (this.data.videoFlag == 0) {
       this.setData({
-        videoFlag : 1
+        videoFlag: 1
       })
     } else {
       this.setData({
-        videoFlag : 0,
-        curVideo : ""
+        videoFlag: 0,
+        curVideo: ""
       })
     }
   },
 
-  videoShow:function(e){
+  videoShow: function (e) {
     this.setData({
       curVideo: e.currentTarget.dataset.url
     })
-    
+
     this.videoContext.requestFullScreen({	// 设置全屏时视频的方向,不指定则根据宽高比自动判断。
-			direction: 90						// 屏幕逆时针90度
-		});
+      direction: 90						// 屏幕逆时针90度
+    });
   },
 
-  showImg:function(e){
-    // var list = e.currentTarget.dataset.url
+  showImg: function (e) {
+    var list = [];
+    this.data.entity.images.map(o => {
+      list.push(o.url);
+    });
+
     wx.previewImage({
-      urls: this.data.imgList,
+      urls: list
     })
   },
-
-  audioShow:function(e){
-    if(this.data.audioPause == 0 && this.data.curAudioIndex != e.currentTarget.dataset.index){//播放语音,切换
+  showDoneImg: function (e) {
+    var list = [];
+    this.data.entity.done.images.map(o => {
+      list.push(o.url);
+    });
+    wx.previewImage({
+      urls: list
+    })
+  },
+  showMarkImg: function (e) {
+    var list = [];
+    this.data.entity.mark.images.map(o => {
+      list.push(o.url);
+    });
+    wx.previewImage({
+      urls: list
+    })
+  },
+  audioShow: function (e) {
+    if (this.data.audioPause == 0 && this.data.curAudioIndex != e.currentTarget.dataset.index) {//播放语音,切换
       this.setData({
         curAudio: ""
       })
       this.setData({
         curAudioIndex: e.currentTarget.dataset.index,
         curAudio: e.currentTarget.dataset.url,
-       
+
+      })
+      this.audioContext.play()
+      this.setData({
+        audioPause: 0
       })
+    } else if (this.data.audioPause == 1 && this.data.curAudioIndex == e.currentTarget.dataset.index) {//暂停后恢复播放
       this.audioContext.play()
       this.setData({
         audioPause: 0
       })
-    } else if(this.data.audioPause == 1 && this.data.curAudioIndex == e.currentTarget.dataset.index) {//暂停后恢复播放
-        this.audioContext.play()
-        this.setData({
-          audioPause: 0
-        })
-    } else if(this.data.audioPause == 0 && this.data.curAudioIndex == e.currentTarget.dataset.index){//暂停播放
+    } else if (this.data.audioPause == 0 && this.data.curAudioIndex == e.currentTarget.dataset.index) {//暂停播放
       this.audioContext.pause()
       this.setData({
         audioPause: 1
@@ -102,7 +99,7 @@ Page({
     }
   },
 
-  bindended:function(){
+  bindended: function () {
     this.setData({
       audioPause: 0,
       curAudioIndex: -1,
@@ -110,7 +107,7 @@ Page({
     })
   },
 
-  bindpause:function(){
+  bindpause: function () {
     this.setData({
       audioPause: 1
     })
@@ -120,14 +117,18 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    let id = options.id;
+    this.setData({ homeworkId: id });
     this.audioContext = wx.createAudioContext('audio-play')
     this.videoContext = wx.createVideoContext('play-video');// 	创建 video 上下文 VideoContext 对象。
     const type = options.type
-    if(type == 0){
+    if (type == 0) {
       this.setData({
         doTaskFlag: true
       })
     }
+
+    this.loadHomework()
   },
 
   /**
@@ -177,5 +178,162 @@ Page({
    */
   onShareAppMessage: function () {
 
+  },
+  loadHomework: function () {
+    const urls = urlDef.urls;
+    let stu = wx.getStorageSync('student');
+    if (stu) {
+      const body = { 'q.homeworkId': this.data.homeworkId, 'q.studentId': stu.studentId }
+      // 接收作业(第一次查看有效)
+      util.apiPost(urls.homework_receive, body).then((rs) => {
+        console.log('接收作业')
+      })
+      util.apiPost(urls.my_homework, body).then((rs) => {
+        let o = rs[0];
+
+        // 解析内容
+        let workContents;
+        try {
+          workContents = JSON.parse(o.homeworkContent);
+        } catch (e) {
+          workContents = {
+            content: o.homeworkContent,
+            images: [],
+            records: [],
+            videos: []
+          };
+          console.error(e);
+        }
+        o.homeworkContent = workContents.content;
+        if (o.receiveDate) {
+          o.receiveDate = o.receiveDate.substring(0, 16).replace('T', ' ')
+        }
+        o.images = workContents.images == null ? [] : workContents.images;
+        o.images.forEach(rs => {
+          rs.url = urls.oss_file + 'image/' + rs.url
+        });
+
+        o.records = workContents.records == null ? [] : workContents.records;
+        o.records.forEach(rs => {
+          rs.url = urls.oss_file + 'file/' + rs.url
+        });
+
+        o.videos = workContents.videos == null ? [] : workContents.videos;
+        o.videos.forEach(v => {
+          util.apiPost(urls.video_loadInfo + v.url).then((rs) => {
+            v.imgUrl = rs.img
+            v.playUrl = rs.url
+            this.reloadVideo(v)
+          });
+        });
+
+
+        // 完成情况
+        let doneContents;
+        try {
+          doneContents = o.content ? JSON.parse(o.content) : {};
+        } catch (e) {
+          doneContents = {
+            images: [],
+            records: [],
+            videos: [],
+            content: ''
+          };
+          console.error(e);
+        }
+        o.done = doneContents;
+        o.done.images = doneContents.images == null ? [] : doneContents.images;
+        o.done.images.forEach(rs => {
+          rs.url = urls.oss_file + 'image/' + rs.url
+        });
+
+        o.done.records = doneContents.records == null ? [] : doneContents.records;
+        o.done.records.forEach(rs => {
+          rs.url = urls.oss_file + 'file/' + rs.url
+        });
+
+        o.done.videos = doneContents.videos == null ? [] : doneContents.videos;
+        o.done.videos.forEach(v => {
+          util.apiPost(urls.video_loadInfo + v.url).then((rs) => {
+            v.imgUrl = rs.img
+            v.playUrl = rs.url
+            this.reloadDoneVideo(v)
+          });
+        });
+        // 批阅情况
+        let markContents;
+        try {
+          markContents = o.markResult ? JSON.parse(o.markResult) : {};
+        } catch (e) {
+          markContents = {
+            images: [],
+            records: [],
+            videos: [],
+            content: ''
+          };
+          console.error(e);
+        }
+        o.mark = markContents;
+        o.mark.score = o.markScore ? o.markScore : 0
+        o.mark.images = markContents.images == null ? [] : markContents.images;
+        o.mark.images.forEach(rs => {
+          rs.url = urls.oss_file + 'image/' + rs.url
+        });
+
+        o.mark.records = markContents.records == null ? [] : markContents.records;
+        o.mark.records.forEach(rs => {
+          rs.url = urls.oss_file + 'file/' + rs.url
+        });
+
+        o.mark.videos = markContents.videos == null ? [] : markContents.videos;
+        o.mark.videos.forEach(v => {
+          util.apiPost(urls.video_loadInfo + v.url).then((rs) => {
+            v.imgUrl = rs.img
+            v.playUrl = rs.url
+            this.reloadMarkVideo(v)
+          });
+        });
+
+        this.setData({ entity: o })
+        util.apiPost(urls.get_user_head + '&q.personId=' + rs[0].teacherId).then((fs) => {
+          if (fs && fs.length > 0) {
+            this.setData({ teacherFace: urls.oss_file + 'image/' + fs[0] })
+          }
+        });
+      })
+    }
+  },
+  reloadVideo: function (t) {
+    let o = this.data.entity
+    let vs = o.videos
+    vs.map(v => {
+      if (t.url == v.url) {
+        v.imgUrl = t.imgUrl
+        v.playUrl = t.playUrl
+      }
+    })
+    this.setData({ entity: o })
+  },
+  reloadDoneVideo: function (t) {
+    let o = this.data.entity
+    let vs = o.done.videos
+    vs.map(v => {
+      if (t.url == v.url) {
+        v.imgUrl = t.imgUrl
+        v.playUrl = t.playUrl
+      }
+    })
+    this.setData({ entity: o })
+  },
+  reloadMarkVideo: function (t) {
+    let o = this.data.entity
+    let vs = o.mark.videos
+    vs.map(v => {
+      if (t.url == v.url) {
+        v.imgUrl = t.imgUrl
+        v.playUrl = t.playUrl
+      }
+    })
+    this.setData({ entity: o })
   }
 })

+ 49 - 16
pages/taskDetail/taskDetail.wxml

@@ -2,34 +2,31 @@
 
   <!-- 作业内容 -->
   <view class="task-head">
-    <view class="task-title">2021-02-21 课后作业</view>
-    <view class="task-time">2021-02-21 16:00</view>
+    <view class="task-title">{{entity.title}}</view>
+    <view class="task-time">{{entity.receiveDate}}</view>
   </view>
 
   <view class="task-teacher">
     <view class="taskImg">
-      <image src="/images/head.png"></image>
-    </view>
-    <view class="teacher-name">张老师:</view>
-    <view class="contact-teacher">
-      联系老师
+      <image src="{{teacherFace}}"></image>
     </view>
+    <view class="teacher-name">授课教师: {{entity.teacherName}}</view>
   </view>
 
   <view class="task-desc">
-  这是一条测试数据这是一条测试数据这是一条测试数据这是一条测试数据这是一条测试数据这是一条测试数据这是一条测试数据这是一条测试数据这是一条测试数据
+   {{entity.homeworkContent}}
   </view>
 
   <view class="task-content">
     <view class="title">图片</view>
     <view class="img-list">
-      <image src="{{item}}" mode="aspectFill" wx:for="{{imgList}}" wx:key="index" bindtap="showImg" data-url="{{item}}" ></image>
+      <image src="{{item.url}}" mode="aspectFill" wx:for="{{entity.images}}" wx:key="index" bindtap="showImg" data-url="{{item.url}}" ></image>
     </view>
 
     <view class="title">视频</view>
     <view class="video-list">
-      <view wx:for="{{videoList}}" wx:key="index" class="video-img-view" data-url="{{item.url}}" bindtap="videoShow">
-        <image class="videoImg" src="{{item.img}}" mode="aspectFill"  ></image>
+      <view wx:for="{{entity.videos}}" wx:key="index" class="video-img-view" data-url="{{item.playUrl}}" bindtap="videoShow">
+        <image class="videoImg" src="{{item.imgUrl}}" mode="aspectFill"  ></image>
         <image class="playImg" src="/images/play.png"></image>
       </view>
     </view>
@@ -37,7 +34,7 @@
 
     <view class="title">语音</view>
     <view class="audio-list">
-      <image bindtap="audioShow" src="{{index == curAudioIndex ? '/images/cur-audio.png' : '/images/audio.png'}}" class="{{index == curAudioIndex ? 'curAudioStyle' : ''}}" wx:for="{{audioList}}"  wx:key="index" data-index="{{index}}" data-url="{{item}}"></image>
+      <image bindtap="audioShow" src="{{index == curAudioIndex ? '/images/cur-audio.png' : '/images/audio.png'}}" class="{{index == curAudioIndex ? 'curAudioStyle' : ''}}" wx:for="{{entity.records}}"  wx:key="index" data-index="{{index}}" data-url="{{item.url}}"></image>
     </view>
     <audio id="audio-play" bindpause="bindpause" bindended="bindended" src="{{curAudio}}"></audio>
 
@@ -48,15 +45,51 @@
  <view class="done-view" wx:if="{{!doTaskFlag}}">
   <view class="done-title">作业完成情况</view>
   <view class="task-content">
+      <view class="task-desc">
+    {{entity.done.content}}
+    </view>
+    <view class="title">图片</view>
+    <view class="img-list">
+      <image src="{{item.url}}" mode="aspectFill" wx:for="{{entity.done.images}}" wx:key="index" bindtap="showDoneImg" data-url="{{item.url}}" ></image>
+    </view>
+
+    <view class="title">视频</view>
+    <view class="video-list">
+      <view wx:for="{{entity.done.videos}}" wx:key="index" class="video-img-view" data-url="{{item.playUrl}}" bindtap="videoShow">
+        <image class="videoImg" src="{{item.imgUrl}}" mode="aspectFill"  ></image>
+        <image class="playImg" src="/images/play.png"></image>
+      </view>
+    </view>
+    <video id="play-video" bindfullscreenchange="bindfullscreenchange" wx:if="{{curVideo != ''}}" autoplay="true" src="{{curVideo}}" controls="true" downloadlist></video>
+
+    <view class="title">语音</view>
+    <view class="audio-list">
+      <image bindtap="audioShow" src="{{index == curAudioIndex ? '/images/cur-audio.png' : '/images/audio.png'}}" class="{{index == curAudioIndex ? 'curAudioStyle' : ''}}" wx:for="{{entity.done.records}}"  wx:key="index" data-index="{{index}}" data-url="{{item.url}}"></image>
+    </view>
+    <audio id="audio-play" bindpause="bindpause" bindended="bindended" src="{{curAudio}}"></audio>
+
+  </view>
+ </view>
+  <!-- end -->
+
+
+   <!-- 作业批改情况 -->
+ <view class="done-view" wx:if="{{!doTaskFlag}}">
+  <view class="done-title">作业批阅情况</view>
+  <view class="task-content">
+    <view class="title">得分: {{entity.mark.score}}</view>
+    <view class="task-desc">
+    {{entity.mark.content}}
+    </view>
     <view class="title">图片</view>
     <view class="img-list">
-      <image src="{{item}}" mode="aspectFill" wx:for="{{imgList}}" wx:key="index" bindtap="showImg" data-url="{{item}}" ></image>
+      <image src="{{item.url}}" mode="aspectFill" wx:for="{{entity.mark.images}}" wx:key="index" bindtap="showMarkImg" data-url="{{item.url}}" ></image>
     </view>
 
     <view class="title">视频</view>
     <view class="video-list">
-      <view wx:for="{{videoList}}" wx:key="index" class="video-img-view" data-url="{{item.url}}" bindtap="videoShow">
-        <image class="videoImg" src="{{item.img}}" mode="aspectFill"  ></image>
+      <view wx:for="{{entity.mark.videos}}" wx:key="index" class="video-img-view" data-url="{{item.playUrl}}" bindtap="videoShow">
+        <image class="videoImg" src="{{item.imgUrl}}" mode="aspectFill"  ></image>
         <image class="playImg" src="/images/play.png"></image>
       </view>
     </view>
@@ -64,7 +97,7 @@
 
     <view class="title">语音</view>
     <view class="audio-list">
-      <image bindtap="audioShow" src="{{index == curAudioIndex ? '/images/cur-audio.png' : '/images/audio.png'}}" class="{{index == curAudioIndex ? 'curAudioStyle' : ''}}" wx:for="{{audioList}}"  wx:key="index" data-index="{{index}}" data-url="{{item}}"></image>
+      <image bindtap="audioShow" src="{{index == curAudioIndex ? '/images/cur-audio.png' : '/images/audio.png'}}" class="{{index == curAudioIndex ? 'curAudioStyle' : ''}}" wx:for="{{entity.mark.records}}"  wx:key="index" data-index="{{index}}" data-url="{{item.url}}"></image>
     </view>
     <audio id="audio-play" bindpause="bindpause" bindended="bindended" src="{{curAudio}}"></audio>
 

+ 1 - 0
pages/taskDetail/taskDetail.wxss

@@ -44,6 +44,7 @@
 .taskImg image {
   height: 100%;
   width: 100%;
+  border-radius: 50%;
 }
 
 .contact-teacher {