ssfg 5 years ago
parent
commit
011000decf

+ 1 - 0
app.json

@@ -76,6 +76,7 @@
     "color": "#a9b7b7",
     "selectedColor": "#eb3f33",
     "borderStyle": "black",
+    "hover-stay-time":2000,
     "list": [
       {
         "pagePath": "pages/index/index",

+ 4 - 5
pages/answerAfterclass/answerAfterclass.js

@@ -12,10 +12,9 @@ Page({
   },
    // 参数点击响应事件
   parameterTap:function(e){//e是获取e.currentTarget.dataset.id所以是必备的,跟前端的data-id获取的方式差不多
-    var that=this
-    var this_checked = e.currentTarget.dataset.id
-    var parameterList = this.data.parameter//获取Json数组
-    for (var i = 0; i < parameterList.length;i++){
+    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即选中
       }
@@ -23,7 +22,7 @@ Page({
         parameterList[i].checked = false;//其他的位置为false
       }
     }
-    that.setData({
+    this.setData({
       parameter: parameterList
     })
   }

+ 6 - 6
pages/dbDetails/dbDetails.js

@@ -67,7 +67,7 @@ Page({
     console.log(this.data.intervalTime, "我是暂停时加的所有数")
   },
   getdbArr(sessionKey) {
-    var _this = this;
+    let _this = this;
     wx.request({
       method: "post",
       url: app.globalData.publicUrl + '/wx/course/selectRecordByCourseId',
@@ -89,7 +89,7 @@ Page({
     })
   },
   getStudyLog(sessionKey) {
-    var _this = this;
+    let _this = this;
     wx.request({
       method: "post",
       url: app.globalData.publicUrl + '/wx/course/getStudyLog',
@@ -123,9 +123,9 @@ Page({
     let aa = 1;
     // let duration = e.detail.duration
     if (_this.data.video_real_time == 0) {
-      var jump_time = parseInt(_this.data.startPlayTime) + parseInt(_this.data.video_real_time)
+      let jump_time = parseInt(_this.data.startPlayTime) + parseInt(_this.data.video_real_time)
     } else {
-      var jump_time = parseInt(_this.data.video_real_time)
+      let jump_time = parseInt(_this.data.video_real_time)
     }
     if (aa == 1) {
       if (currentTime > jump_time && currentTime - jump_time > 3) {
@@ -160,7 +160,7 @@ Page({
     })
   },
   onUnload() {
-    var _this = this;
+    let _this = this;
     clearInterval(_this.data.intervalCtx)
     if (_this.data.startPlayTime < _this.data.studyLog.studyTime) {
       console.log(_this.data.studyLog)
@@ -177,7 +177,7 @@ Page({
     }
   },
   onHide() {
-    var _this = this;
+    let _this = this;
     clearInterval(_this.data.intervalCtx)
     if (_this.data.studyTime < _this.data.studyLog.studyTime) {
       wx.request({

+ 3 - 3
pages/demandCourses/demandCourses.js

@@ -7,13 +7,13 @@ Page({
     sfmArr: []
   },
   goIn(e) {
-    var id = e.currentTarget.dataset.item.id
+    let id = e.currentTarget.dataset.item.id
     wx.navigateTo({
       url: '../dbDetails/dbDetails?id=' + id
     })
   },
   getArr(sessionKey) {
-    // var _this = this;
+    // let _this = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/course/selectRecordBySessionKey',
       method: "post",
@@ -28,7 +28,7 @@ Page({
             lbArr: res.data.list
           })
           let result = [];
-          for (var i = 0; i < res.data.list.length; i++) {
+          for (let i = 0; i < res.data.list.length; i++) {
             result.push({
               courseTime: res.data.list[i].courseTime
             });

+ 7 - 7
pages/evaluationCourse/evaluationCourse.js

@@ -59,10 +59,10 @@ Page({
     arr: [],
   },
   parameterTap(e) {
-    var that = this
-    var this_checked = e.currentTarget.dataset.id
-    var parameterList = this.data.manyi
-    for (var i = 0; i < parameterList.length; i++) {
+    let that = this
+    let this_checked = e.currentTarget.dataset.id
+    let parameterList = this.data.manyi
+    for (let i = 0; i < parameterList.length; i++) {
       if (parameterList[i].id == this_checked) {
         parameterList[i].checked = true;
       } else {
@@ -103,13 +103,13 @@ Page({
   checkboxChange: function (event) {
     console.log(event, "000000000000000000000");
 
-    for (var i = 0; i < this.data.checkboxArr.length; i++) {
+    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;
-          var checkboxArr = this.data.checkboxArr;
+          let checkboxArr = this.data.checkboxArr;
           this.setData({
             checkboxArr,
             remarks: this.data.arr
@@ -117,7 +117,7 @@ Page({
         } else {
           this.data.arr.push(this.data.checkboxArr[i].name);
           this.data.checkboxArr[i].checked = true;
-          var checkboxArr = this.data.checkboxArr;
+          let checkboxArr = this.data.checkboxArr;
           this.setData({
               checkboxArr,
               remarks: this.data.arr

+ 3 - 5
pages/exhibitionList/exhibitionList.js

@@ -10,14 +10,12 @@ Page({
 
   },
   goSeevideo(e) {
-    var id = e.currentTarget.dataset.item.id
+    let id = e.currentTarget.dataset.item.id
     wx.navigateTo({
       url: '/pages/dbVideo/dbVideo?id=' + id,
     })
   },
   onChange(event) {
-    console.log(event)
-    // let _this = this;
     let tag = event.detail.name + 1;
     console.log(tag)
     wx.request({
@@ -32,12 +30,12 @@ Page({
     })
   },
   onLoad: function (options) {
-    var that = this;
+    let that = this;
     that.setData({
       active: Number(options.id)
     })
     // console.log(that.data.active)
-    var _active = that.data.active + 1
+    let _active = that.data.active + 1
     wx.request({
       method: "post",
       url: app.globalData.publicUrl + '/wx/course/listByCourseTag?tag=' + _active,

+ 3 - 4
pages/index/index.js

@@ -162,10 +162,9 @@ Page({
       url: app.globalData.publicUrl + '/wx/course/listCategory',
       method: "post",
       success: (res) => {
-        console.log(res.data.list, "调取请求公开课列表")
-        this.setData({
-          xczsArr: res.data.list
-        })
+          this.setData({
+            xczsArr: res.data.list
+          })
       },
       fail(res) {
         console.log(res, "调取请求公开课失败")

+ 1 - 0
pages/index/index.wxml

@@ -40,6 +40,7 @@
 	<view class="xczs">
 		<view class="zb1" wx:for="{{xczsArr}}" wx:for-index="idx" wx:for-item="item" bindtap="turnDetails" id="{{idx}}" wx:key="idx">
 			<image src='{{item.img}}' mode="widthFix" class="show1"></image>
+			<!-- <van-image fit="fill" width="338rpx" height="260rpx" lazy-load src='{{item.img}}' /> -->
 			<view class="grayblock">
 				<view class="show_text">{{item.name}}</view>
 				<view class="viedoxx">

+ 1 - 1
pages/index/index.wxss

@@ -166,7 +166,7 @@
 
 .show1 {
   width: 338rpx;
-  height: auto;
+  height: 260rpx;
 }
 
 .show_text {

+ 7 - 7
pages/myClass/myClass.js

@@ -22,7 +22,7 @@ Page({
     this.setData({
       show: false
     });
-    var sessionKey = "";
+    let sessionKey = "";
     wx.checkSession({
       success: () => {
         sessionKey = wx.getStorageSync('sessionKey');
@@ -42,7 +42,7 @@ Page({
         wx.login({
           success(res) {
             console.log(res);
-            var code = res.code
+            let code = res.code
             wx.request({
               url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
               method: "get",
@@ -169,7 +169,7 @@ Page({
   },
   // 查询我是否有班&&班级名字
   isClass(sessionKey) {
-    // var _this = this;
+    // let _this = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/student/selMyClas',
       method: "post",
@@ -202,7 +202,7 @@ Page({
   },
   // 协议是否已同意  
   isAgree(sessionKey) {
-    // var _this = this;
+    // let _this = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/student/selStudentSessionKey',
       method: "post",
@@ -230,7 +230,7 @@ Page({
   },
   // 我的通知
   getMynotice(sessionKey) {
-    // var _this = this;
+    // let _this = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/eduNoticeSee/list',
       method: "post",
@@ -259,7 +259,7 @@ Page({
   },
   // // 我的课程
   getMycourse(sessionKey) {
-    // var _this = this;
+    // let _this = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/course/selectBySessionKey',
       method: "post",
@@ -273,7 +273,7 @@ Page({
         });
         let result = [];
         if (res.data.list)
-          for (var i = 0; i < res.data.list.length; i++) {
+          for (let i = 0; i < res.data.list.length; i++) {
             result.push({
               courseTime: res.data.list[i].courseTime
             });

+ 3 - 3
pages/myMission/myMission.js

@@ -116,7 +116,7 @@ Page({
           });
           let result = [];
           if (res.data.list)
-            for (var i = 0; i < res.data.list.length; i++) {
+            for (let i = 0; i < res.data.list.length; i++) {
               result.push({
                 courseTime: res.data.list[i].courseTime
               });
@@ -263,7 +263,7 @@ Page({
               wx.showLoading({
                 title: '保存中...'
               })
-              var imgSrc = this.data.ewmurl;
+              let imgSrc = this.data.ewmurl;
               wx.downloadFile({
                 url: imgSrc,
                 success: function (res) {
@@ -306,7 +306,7 @@ Page({
             }
           })
         } else {
-          var imgSrc = this.data.ewmurl
+          let imgSrc = this.data.ewmurl
           wx.downloadFile({
             url: imgSrc,
             success: function (res) {

+ 9 - 9
pages/studentRegistration/studentRegistration.js

@@ -1,6 +1,6 @@
 //index.js
 //获取应用实例
-const app = require('../../utils/util.js');
+// const app = require('../../utils/util.js');
 Page({
   data: {
     nameIsTrue: false, //名字是否填写
@@ -99,7 +99,7 @@ Page({
   },
   onConfirm(event) {
     console.log(event, "0000");
-    var timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
+    let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
     this.setData({
       zaizhiTime: timeValue,
       postshow :false,
@@ -108,7 +108,7 @@ Page({
   },
   onConfirm1(event) {
     console.log(event, "0000");
-    var timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
+    let timeValue = this.timeFormat(new Date(event.detail), "yyyy-MM-dd");
     this.setData({
       peixunTime: timeValue,
       postshow1 :false,
@@ -116,10 +116,10 @@ Page({
     });
   },
   parameterTap: function (e) { //e是获取e.currentTarget.dataset.id所以是必备的,跟前端的data-id获取的方式差不多
-    var that = this
-    var this_checked = e.currentTarget.dataset.id
-    var parameterList = this.data.parameter //获取Json数组
-    for (var i = 0; i < parameterList.length; i++) {
+    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 {
@@ -249,7 +249,7 @@ Page({
   },
 
   timeFormat(date, fmt) {
-    var o = {
+    let o = {
       "M+": date.getMonth() + 1, //月份   
       "d+": date.getDate(), //日
       "h+": date.getHours(), //小时   
@@ -260,7 +260,7 @@ Page({
     };
     if (/(y+)/.test(fmt))
       fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
-    for (var k in o)
+    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;

+ 2 - 2
pages/zbDetails/zbDetails.js

@@ -48,7 +48,7 @@ Page({
     })
   },
   fullScreen: function() {
-    var fullScreenFlag = this.data.fullScreenFlag;
+    let fullScreenFlag = this.data.fullScreenFlag;
     if (fullScreenFlag) {
       fullScreenFlag = false;
     } else {
@@ -114,7 +114,7 @@ Page({
     })
   },
   socketConnect(sessionKey) {
-    var newSessionkey = encodeURIComponent(sessionKey);
+    let newSessionkey = encodeURIComponent(sessionKey);
     wx.connectSocket({
       url: app.globalData.publicSocketUrl + '/live/socket?sessionkey=' + newSessionkey + "&courseId=" + this.data.id
     })