Преглед изворни кода

0817修改
1.学员登记表增加必填校验
2.直播增加学员被禁言 被解禁操作
3.录播课增加网络状态切换提示

ssfg пре 4 година
родитељ
комит
92051b8d5d
45 измењених фајлова са 1390 додато и 830 уклоњено
  1. 18 1
      app.js
  2. 8 9
      app.json
  3. 3 3
      components/trtc-room/template/1v1/1v1.wxml
  4. 30 32
      components/trtc-room/trtc-room.js
  5. BIN
      images/lmbj.png
  6. BIN
      images/netChange.png
  7. BIN
      images/person7.png
  8. 127 24
      pages/Identity/Identity.js
  9. 15 13
      pages/Identity/Identity.wxml
  10. 19 20
      pages/Identity/Identity.wxss
  11. 0 161
      pages/Identitycopy/Identitycopy.js
  12. 0 4
      pages/Identitycopy/Identitycopy.json
  13. 0 27
      pages/Identitycopy/Identitycopy.wxml
  14. 0 69
      pages/Identitycopy/Identitycopy.wxss
  15. 2 2
      pages/agoClass/agoClass.wxml
  16. 131 61
      pages/dbDetails/dbDetails.js
  17. 16 1
      pages/dbDetails/dbDetails.wxml
  18. 144 19
      pages/dbDetails/dbDetails.wxss
  19. 50 36
      pages/evaluationCourse/evaluationCourse.js
  20. 2 0
      pages/evaluationCourseDetail/evaluationCourseDetail.js
  21. 37 26
      pages/feedBack/feedBack.js
  22. 16 1
      pages/grade/grade.js
  23. 3 3
      pages/grade/grade.wxml
  24. 14 9
      pages/grade/grade.wxss
  25. 59 47
      pages/lastdetail/lastdetail.js
  26. 3 3
      pages/lastdetail/lastdetail.wxml
  27. 12 6
      pages/lastdetail/lastdetail.wxss
  28. 1 0
      pages/lastdetailDetail/lastdetailDetail.js
  29. 0 2
      pages/livePlayback/livePlayback.js
  30. 84 108
      pages/myClass/myClass.js
  31. 45 12
      pages/myInteractions/myInteractions.js
  32. 1 1
      pages/myInteractions/myInteractions.wxml
  33. 1 0
      pages/myInteractions/myInteractions.wxss
  34. 4 4
      pages/myNotice/myNotice.js
  35. 47 2
      pages/onlineClass/onlineClass.js
  36. 86 2
      pages/personInfo/personInfo.js
  37. 1 0
      pages/personInfo/personInfo.wxml
  38. 7 0
      pages/personInfo/personInfo.wxss
  39. 73 37
      pages/studentRegistration/studentRegistration.js
  40. 3 5
      pages/studentRegistration/studentRegistration.wxss
  41. 47 3
      pages/testAnswer/testAnswer.js
  42. 196 63
      pages/zbDetails/zbDetails.js
  43. 10 3
      pages/zbDetails/zbDetails.wxml
  44. 73 9
      pages/zbDetails/zbDetails.wxss
  45. 2 2
      utils/util.js

+ 18 - 1
app.js

@@ -1,5 +1,22 @@
 App({
   globalData: {
     showAnimation: true
-  }
+  },
+  // onLaunch: function () {
+  //   wx.onNetworkStatusChange((res) => {
+  //     console.log(res, "0000000000000")
+  //     if (this.data.networkType == "wifi" && res.networkType != "wifi") {
+  //       this.data.videoContext.pause()
+  //       wx.showModal({
+  //         showCancel: false,
+  //         content: "非wifi网络,是否继续播放",
+  //         success: (res) => {
+  //           if (res.confirm) {
+  //             this.data.videoContext.play()
+  //           }
+  //         }
+  //       })
+  //     }
+  //   })
+  // }
 })

+ 8 - 9
app.json

@@ -1,14 +1,18 @@
 {
   "pages": [
     "pages/welcome/welcome",
-    "pages/Identitycopy/Identitycopy",
-    "pages/Identity/Identity",
     "pages/dbDetails/dbDetails",
+   
+    "pages/dbVideo/dbVideo",
+    "pages/myClass/myClass",
+    "pages/zbDetails/zbDetails",
+    "pages/Identity/Identity",
+    "pages/grade/grade",
+    "pages/livePlayback/livePlayback", 
     "pages/demandCourses/demandCourses",
     "pages/myInteractions/myInteractions",
     "pages/testAnswer/testAnswer",
     "pages/myMission/myMission",
-    "pages/myClass/myClass",
     "pages/studentList/studentList",
     "pages/pyip/pyip",
     "pages/userGuide/userGuide",
@@ -16,7 +20,6 @@
     "pages/schoolIntrouce/schoolIntrouce",
     "pages/InteractiveQA/InteractiveQA",
     "pages/studentRegistration/studentRegistration",
-    "pages/zbDetails/zbDetails",
     "pages/last/last",
     "pages/index/index",
     "pages/personInfo/personInfo",
@@ -30,17 +33,13 @@
     "pages/evaluationCourseDetail/evaluationCourseDetail",
     "pages/historyClass/historyClass",
     "pages/onlineClass/onlineClass",
-    "pages/dbVideo/dbVideo",
     "pages/myNotice/myNotice",
     "pages/exhibitionList/exhibitionList",
     "pages/startClass/startClass",
     "pages/myInteractionsDetais/myInteractionsDetais",
     "pages/myPoints/myPoints",
-  
     "pages/myTraining/myTraining",
-    "pages/agoClass/agoClass",
-    "pages/grade/grade",
-    "pages/livePlayback/livePlayback"
+    "pages/agoClass/agoClass"
   ],
   "window": {
     "backgroundTextStyle": "light",

Разлика између датотеке није приказан због своје велике величине
+ 3 - 3
components/trtc-room/template/1v1/1v1.wxml


+ 30 - 32
components/trtc-room/trtc-room.js

@@ -193,7 +193,6 @@ Component({
           roomID: this.data.config.roomID
         }).then(() => {
           // 进房后开始推送视频或音频
-
           // setTimeout(()=>{
           //   this.publishLocalVideo()
           //   this.publishLocalAudio()
@@ -204,7 +203,6 @@ Component({
         // 获取所有的player 清空 src 重新赋值 验证无效
         // 清空 visibleStreamList 重新赋值, 验证无效
         // 退房重新进房,有效但是成本比较高
-
         // 将标记了 isOnHideAdd 的 stream 的 palyer 销毁并重新渲染
         const streamList = this.data.streamList
         let tempStreamList = []
@@ -255,6 +253,7 @@ Component({
    */
   methods: {
     fullScreen() {
+      console.log(this.data.streamList.length,'我是全屏时player的数量');
       for (let i = 0; i < this.data.streamList.length; i++) {
         console.log(this.data.streamList[i])
         if(this.data.streamList[i].userID=="0"||this.data.streamList[i].userID=="share-userId"){
@@ -450,7 +449,6 @@ Component({
      * @returns {Promise}
      */
     publishLocalVideo() {
-      // 设置 pusher enableCamera
       console.log(TAG_NAME, 'publishLocalVideo 开启摄像头')
       return this._setPusherConfig({
         enableCamera: true
@@ -495,7 +493,7 @@ Component({
      * @returns {Promise}
      */
     subscribeRemoteVideo(params) {
-      console.log(TAG_NAME, 'subscribeRemoteVideo', params)
+      console.log(TAG_NAME, '订阅远端视频 主流 小画面 辅流', params)
       // 设置指定 user streamType 的 muteVideo 为 false
       const config = {
         muteVideo: false,
@@ -507,7 +505,6 @@ Component({
         streamType: streamType,
       })
       stream.muteVideoPrev = false // 用于分页切换时保留player当前的订阅状态
-
       if (params.streamType === 'small' || params.streamType === 'main') {
         if (stream && stream.streamType === 'main') {
           console.log(TAG_NAME, 'subscribeRemoteVideo switch small', stream.src)
@@ -533,7 +530,7 @@ Component({
      * @returns {Promise}
      */
     unsubscribeRemoteVideo(params) {
-      console.log(TAG_NAME, 'unsubscribeRemoteVideo', params)
+      console.log(TAG_NAME, '取消订阅远端视频', params)
       const stream = this.userController.getStream({
         userID: params.userID,
         streamType: params.streamType,
@@ -651,25 +648,25 @@ Component({
      * isVisible:boolean
      * @returns {Promise}
      */
-    // setViewVisible(params) {
-    //   console.log(TAG_NAME, 'setViewVisible', params)
-    //   if (this.data.template !== 'custom') {
-    //     console.warn(`如需使用setViewVisible方法,请初始化时设置template:"custom", 当前 template:"${this.data.template}"`)
-    //   }
-    //   console.info(`不建议使用该方法动态修改样式,避免引起微信小程序渲染问题,建议直接修改 wxml wxss 进行样式定制化`)
-    //   if (this.data.pusher.userID === params.userID) {
-    //     return this._setPusherConfig({
-    //       isVisible: params.isVisible,
-    //     })
-    //   }
-    //   return this._setPlayerConfig({
-    //     userID: params.userID,
-    //     streamType: params.streamType,
-    //     config: {
-    //       isVisible: params.isVisible,
-    //     },
-    //   })
-    // },
+    setViewVisible(params) {
+      console.log(TAG_NAME, '设置指定 player 或者 pusher view 是否可见', params)
+      if (this.data.template !== 'custom') {
+        console.warn(`如需使用setViewVisible方法,请初始化时设置template:"custom", 当前 template:"${this.data.template}"`)
+      }
+      console.info(`不建议使用该方法动态修改样式,避免引起微信小程序渲染问题,建议直接修改 wxml wxss 进行样式定制化`)
+      if (this.data.pusher.userID === params.userID) {
+        return this._setPusherConfig({
+          isVisible: params.isVisible,
+        })
+      }
+      return this._setPlayerConfig({
+        userID: params.userID,
+        streamType: params.streamType,
+        config: {
+          isVisible: params.isVisible,
+        },
+      })
+    },
     /**
      * 设置指定player view的层级
      * @param {Object} params
@@ -1062,7 +1059,7 @@ Component({
      */
     _setPusherConfig(config, skipLog = false) {
       if (!skipLog) {
-        console.log(TAG_NAME, '_setPusherConfig', config, this.data.pusher)
+        console.log(TAG_NAME, '设置推流参数并触发页面渲染更新', config, this.data.pusher)
       }
       return new Promise((resolve, reject) => {
         if (!this.data.pusher) {
@@ -1086,10 +1083,11 @@ Component({
      * @returns {Promise}
      */
     _setPlayerConfig(params) {
+      console.log(params,"000000000000000");
       const userID = params.userID
       const streamType = params.streamType
       const config = params.config
-      console.log(TAG_NAME, '_setPlayerConfig', params)
+      console.log(TAG_NAME, '设置指定 player 属性并触发页面渲染', params)
       return new Promise((resolve, reject) => {
         // 获取指定的userID streamType 的 stream
         const user = this.userController.getUser(userID)
@@ -1378,7 +1376,6 @@ Component({
       })
       // 视频状态 true
       this.userController.on(EVENT.REMOTE_VIDEO_ADD, (event) => {
-        console.log(event, "22222222222222")
         // if (event.data.stream.userID == "0" || event.data.stream.userID == "share-userId") {
         console.log(TAG_NAME, '远端视频可用', event, event.data.stream.userID)
         const stream = event.data.stream
@@ -1634,7 +1631,7 @@ Component({
       this._emitter.emit(EVENT.VIDEO_FULLSCREEN_UPDATE, event)
     },
     _playerNetStatus(event) {
-      // console.log(TAG_NAME, '_playerNetStatus', event)
+      console.log(TAG_NAME, 'player变化了', event)
       // 获取player 视频的宽高
       const stream = this.userController.getStream({
         userID: event.currentTarget.dataset.userid,
@@ -2238,6 +2235,7 @@ Component({
      * @param {Object} event native 事件对象
      */
     _handleSubscribeRemoteVideo(event) {
+      console.log(event,"切换订阅远端视频状态");
       const userID = event.currentTarget.dataset.userID
       const streamType = event.currentTarget.dataset.streamType
       const stream = this.data.streamList.find((item) => {
@@ -2249,6 +2247,7 @@ Component({
           streamType
         })
       } else {
+        console.log("jddddddddddhuiafyefieygf")
         this.unsubscribeRemoteVideo({
           userID,
           streamType
@@ -2301,7 +2300,6 @@ Component({
         panelName: '',
       })
     },
-
     _setPuserProperty(event) {
       console.log(TAG_NAME, '_setPuserProperty', event)
       const key = event.currentTarget.dataset.key
@@ -2332,7 +2330,7 @@ Component({
       this._setPusherConfig(config)
     },
     _setPlayerProperty(event) {
-      console.log(TAG_NAME, '_setPlayerProperty', event)
+      console.log(TAG_NAME, '设置player播放属性', event)
       const userID = event.currentTarget.dataset.userid
       const streamType = event.currentTarget.dataset.streamtype
       const key = event.currentTarget.dataset.key
@@ -2360,7 +2358,7 @@ Component({
           config[key] = value[0]
         }
       }
-      console.log(TAG_NAME, '_setPlayerProperty', config)
+      console.log(TAG_NAME, '设置player播放属性', config)
       this._setPlayerConfig({
         userID,
         streamType,


BIN
images/netChange.png


BIN
images/person7.png


+ 127 - 24
pages/Identity/Identity.js

@@ -8,9 +8,6 @@ Page({
     userName: "",
     phone: "",
     card: "",
-    isInput1: false,
-    isInput2: false,
-    isInput3: false,
     carWin_img: '', //存放照片路径的
     cosPath: "" //腾讯云上传的路径
   },
@@ -26,7 +23,7 @@ Page({
       count: 1,
       sizeType: ['original', 'compressed'],
       sourceType: ['', 'camera'],
-      success:(res)=> {
+      success: (res) => {
         console.log(res)
         let path = res.tempFilePaths[0];
         // tempFilePath可以作为img标签的src属性显示图片
@@ -38,22 +35,22 @@ Page({
     })
   },
   // 提交
-  tj(sessionKey, params) {
+  tj(params, url) {
     wx.request({
       url: app.globalData.publicUrl + '/wx/student/uthentication',
       method: "post",
       data: {
         studentName: params.userName,
         studentCard: params.card,
-        phone: params.phone,
-        sessionKey: sessionKey
+        faceImage: url,
+        sessionKey: this.data.sessionKey
       },
       success: function (res) {
         wx.hideLoading()
         if (res.data.code == 0) {
           wx.showModal({
             showCancel: false,
-            content: "提交成功啦",
+            content: "认证成功啦!",
             success(res) {
               if (res.confirm) {
                 wx.switchTab({
@@ -73,9 +70,10 @@ Page({
   },
   // 表单提交 跳转tj()
   async formSubmit(e) {
+    console.log(e,"我是带过来的值")
     wx.showLoading({
       mask: true,
-      title: '加载中',
+      title: '认证中',
     })
     if (this.data.isRz == 0) {
       const params = e.detail.value
@@ -85,8 +83,109 @@ Page({
         wx.hideLoading()
         return false
       }
-      const sessionKey = await tools.checkSessionAndLogin();
-      this.tj(sessionKey, params);
+      if (this.data.carWin_img == "" || this.data.carWin_img == null) {
+        wx.hideLoading();
+        wx.showModal({
+          title: '请点击上方选择照片或者视频哦',
+          showCancel: false
+        });
+        return false
+      }
+      var Bucket = 'bucketnj1-1254259530';
+      var Region = 'ap-nanjing';
+      var ForcePathStyle = false;
+      var prefix = 'https://' + Bucket + '.cos.' + Region + '.myqcloud.com/';
+      if (ForcePathStyle) {
+        prefix = 'https://cos.' + Region + '.myqcloud.com/' + Bucket + '/';
+      }
+      var stsCache;
+      var getCredentials = function (callback) {
+        if (stsCache && Date.now() / 1000 + 30 < stsCache.expiredTime) {
+          callback(data.credentials);
+          return;
+        }
+        wx.request({
+          method: 'POST',
+          url: app.globalData.publicUrl + '/wx/course/getSts',
+          // dataType: 'json',
+          success: function (result) {
+            var credentials = result.data.credential.credentials;
+            if (credentials) {
+              stsCache = result.data.credential
+            } else {
+              wx.hideLoading();
+              wx.showModal({
+                title: '临时密钥获取失败',
+                content: JSON.stringify(data),
+                showCancel: false
+              });
+            }
+            callback(stsCache && stsCache.credentials);
+          },
+          error: function (err) {
+            wx.hideLoading();
+            wx.showModal({
+              title: '临时密钥获取失败',
+              content: JSON.stringify(err),
+              showCancel: false
+            });
+          }
+        });
+      };
+      // 计算签名
+      var getAuthorization = function (options, callback) {
+        getCredentials(function (credentials) {
+          callback({
+            XCosSecurityToken: credentials.sessionToken,
+            Authorization: COS({
+              SecretId: credentials.tmpSecretId,
+              SecretKey: credentials.tmpSecretKey,
+              Method: options.Method,
+              Pathname: options.Pathname,
+            })
+          });
+        });
+      };
+      // 上传文件
+      var Key = this.data.carWin_img.substr(this.data.carWin_img.lastIndexOf('/') + 1); // 这里指定上传的文件名
+      var signPathname = '/';
+      if (ForcePathStyle) {
+        signPathname = '/' + Bucket + '/';
+      }
+      getAuthorization({
+        Method: 'POST',
+        Pathname: signPathname
+      }, (AuthData) => {
+        var requestTask = wx.uploadFile({
+          url: prefix,
+          name: 'file',
+          filePath: this.data.carWin_img,
+          formData: {
+            'key': "face/" + Key,
+            'success_action_status': 200,
+            'Signature': AuthData.Authorization,
+            'x-cos-security-token': AuthData.XCosSecurityToken,
+            'Content-Type': '',
+          },
+          success: (res) => {
+            console.log(res.header.Location)
+            this.tj(params, res.header.Location)
+          },
+          fail: function () {
+            wx.hideLoading();
+            wx.showModal({
+              title: '上传腾讯云失败',
+              showCancel: false
+            });
+          }
+        });
+        requestTask.onProgressUpdate(function (res) {
+          console.log('进度:', res);
+          if (res.progress == 100) {
+            wx.hideLoading();
+          }
+        });
+      });
     } else {
       wx.hideLoading()
       wx.showModal({
@@ -94,6 +193,7 @@ Page({
         content: "您已经认证过了"
       })
     }
+
   },
   // 如果有就把信息回显出来
   getInformation(sessionKey) {
@@ -102,17 +202,18 @@ Page({
       url: app.globalData.publicUrl + '/wx/student/selStudentSessionKeyEcho',
       method: "post",
       data: {
-        sessionKey: sessionKey
+        sessionKey
       },
       success: (res) => {
+        console.log(res);
         if (res.data.code == 0) {
-          if (res.data.data !== null || res.data.data !== "") {
+          console.log(res)
+          if (res.data.data.studentOpenId != null) {
             this.setData({
               isRz: 1,
               userName: res.data.data.miniName,
-              phone: res.data.data.miniPhone,
+              carWin_img: res.data.data.faceImage,
               card: res.data.data.studentCard,
-              isInput3: true
             })
           }
         }
@@ -121,6 +222,9 @@ Page({
   },
   async onLoad() {
     const sessionKey = await tools.checkSessionAndLogin();
+    this.setData({
+      sessionKey
+    })
     this.getInformation(sessionKey);
     this.initValidate();
   },
@@ -130,25 +234,24 @@ Page({
       userName: {
         required: true
       },
-      phone: {
-        required: true,
-        tel: true,
-      },
+      // phone: {
+      //   required: true,
+      //   tel: true,
+      // },
       card: {
         required: true,
         idcard: true,
       }
     }
-
     // 验证字段的提示信息,若不传则调用默认的信息
     const messages = {
       userName: {
         required: '请输入姓名'
       },
-      phone: {
-        required: '请输入手机号',
-        tel: '请输入正确的手机号',
-      },
+      // phone: {
+      //   required: '请输入手机号',
+      //   tel: '请输入正确的手机号',
+      // },
       card: {
         required: '请输入身份证号码',
         idcard: '请输入正确的身份证号码',

+ 15 - 13
pages/Identity/Identity.wxml

@@ -2,23 +2,25 @@
 	<form bindsubmit="formSubmit">
 		<view class="form_item">
 			<image src='/images/shenfen1.png' mode="aspectFit" class="icon1"></image>
-			<input style='display:inline-block;height:60%;' disabled="{{isInput1}}" placeholder-style='font-size:30rpx;' placeholder='请输入姓名' name='userName' value="{{userName}}"></input>
+			<input style='display:inline-block;height:60%;' placeholder-style='font-size:30rpx;' placeholder='请输入姓名' name='userName' value="{{userName}}"></input>
 		</view>
-		<view class="form_item">
+		<!-- <view class="form_item">
 			<image src='/images/shenfen2.png' mode="aspectFit" class="icon1"></image>
-			<input style='display:inline-block;height:60%;' disabled="{{isInput2}}" placeholder-style='font-size:30rpx;' placeholder='请输入手机号' name='phone' type='number' value="{{phone}}"></input>
-		</view>
+			<input style='display:inline-block;height:60%;' placeholder-style='font-size:30rpx;' placeholder='请输入手机号' name='phone' type='number' value="{{phone}}"></input>
+		</view> -->
 		<view class="form_item">
 			<image src='/images/shenfen4.png' mode="aspectFit" class="icon1"></image>
-			<input style='width:80%;display:inline-block;height:60%;' disabled="{{isInput3}}" placeholder-style='font-size:30rpx;' placeholder='请输入身份证号' name="card" value="{{card}}"></input>
+			<input style='width:80%;display:inline-block;height:60%;' placeholder-style='font-size:30rpx;' placeholder='请输入身份证号' name="card" value="{{card}}"></input>
 		</view>
-		<!-- <view class="pyp_box1">
-			<view class="add_text">上传本人照片</view>
-			<image src="../../images/camera.png" class="xj" wx:if="{{carWin_img==''}}"  bindtap="openCamera"></image>
-			<image src="{{carWin_img}}" class="xj" bindtap="openCamera" wx:if="{{carWin_img!=''}}"></image>
-			<van-button type="primary" block color="#eb3f33" custom-style="width:614rpx;border-radius:10rpx;margin-top:20rpx;" bindtap="submitImgToTxy">提交</van-button>
-			<van-button type="primary" block color="#eb3f33" custom-style="width:614rpx;border-radius:10rpx;margin-top:20rpx;" bindtap="openCamera">重新拍摄</van-button>
-		</view> -->
-		<button class="qrrz" formType="submit">前往认证</button>
+		<view class="pyp_box1">
+			<view class="add_text" wx:if="{{carWin_img==''}}">上传本人照片</view>
+			<image src="../../images/camera.png" class="xj" wx:if="{{carWin_img==''}}" bindtap="openCamera"></image>
+			<image src="{{carWin_img}}" class="xj" style="background-color: #eeeeee;" mode="aspectFit"  bindtap="openCamera" wx:if="{{carWin_img!=''}}"></image>
+			<!-- <view style="display:flex;"> -->
+			<!-- <van-button  plain size="small" block  custom-style="width:250rpx;border-radius:10rpx;margin-top:20rpx;margin-left:70rpx" bindtap="submitImgToTxy">点我确认照片</van-button>
+			<van-button plain size="small" block custom-style="width:250rpx;border-radius:10rpx;margin-top:20rpx;margin-left:30rpx" bindtap="openCamera">重新拍摄</van-button> -->
+			<!-- </view> -->
+		</view>
+		<button class="qrrz" formType="submit" style="width:500rpx">前往认证</button>
 	</form>
 </view>

+ 19 - 20
pages/Identity/Identity.wxss

@@ -1,18 +1,18 @@
-.form_item{
+.form_item {
   width: 600rpx;
   margin-left: 75rpx;
   height: 80rpx;
   display: flex;
-  align-items:center;
-  border-bottom:1px solid #cdcdcd;
+  align-items: center;
+  border-bottom: 1px solid #cdcdcd;
   margin-top: 30rpx;
 }
-.icon1{
+.icon1 {
   width: 43rpx;
   height: 30rpx;
   margin-right: 20rpx;
 }
-.getyzm{
+.getyzm {
   color: #d72f1d;
   font-size: 24rpx;
   font-weight: 900;
@@ -23,38 +23,37 @@
   line-height: 50rpx;
   text-align: center;
 }
-.qrrz{
-  /* width: 659rpx; */
+.qrrz {
   height: 77rpx;
-  /* line-height: 57rpx; */
   margin-left: 95rpx;
   border-radius: 40rpx;
   font-size: 29rpx;
   font-weight: 600;
   color: #fff;
-  background: -webkit-linear-gradient(left,#d7301d,#f99c30);
-  box-shadow: 5px 5px 5px #eea390; 
+  background: -webkit-linear-gradient(left, #d7301d, #f99c30);
+  box-shadow: 5px 5px 5px #eea390;
   margin-bottom: 20rpx;
   text-align: center;
-  margin-top: 200rpx;
+  margin-top: 50rpx;
 }
 .pyp_box1 {
   width: 680rpx;
-  height: 500rpx;
+  /* height: 340rpx; */
   margin-left: 35rpx;
   margin-top: 20rpx;
   background-color: #fff;
   border-radius: 30rpx;
+  position: relative;
 }
 .add_text {
-  margin-left: 260rpx;
-  padding-top: 20rpx;
-  color: #000
+  color: #f9720d;
+  position: absolute;
+  top: 260rpx;
+  left: 225rpx;
 }
-.xj{
-  width: 614rpx;
-  height: 393rpx;
+.xj {
+  width: 500rpx;
+  height: 303rpx;
   margin-top: 20rpx;
-  margin-left: 30rpx;
-  /* border: 1px solid red; */
+  margin-left: 85rpx;
 }

+ 0 - 161
pages/Identitycopy/Identitycopy.js

@@ -1,161 +0,0 @@
-const app = require('../../utils/util.js');
-const tools = require('../../utils/tools.js');
-import WxValidate from '../../utils/WxValidate';
-const COS = require('../../utils/cos.js');
-Page({
-  data: {
-    isRz: 0,
-    userName: "",
-    phone: "",
-    card: "",
-    isInput1: false,
-    isInput2: false,
-    isInput3: false,
-    carWin_img: '', //存放照片路径的
-    cosPath: "" //腾讯云上传的路径
-  },
-  // 错误信息回显
-  showModal(error) {
-    wx.showModal({
-      content: error.msg,
-      showCancel: false,
-    })
-  },
-  openCamera() {
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['', 'camera'],
-      success:(res)=> {
-        console.log(res)
-        let path = res.tempFilePaths[0];
-        // tempFilePath可以作为img标签的src属性显示图片
-        console.log(path)
-        this.setData({
-          carWin_img: path
-        })
-      }
-    })
-  },
-  // 提交
-  tj(sessionKey, params) {
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/student/uthentication',
-      method: "post",
-      data: {
-        studentName: params.userName,
-        studentCard: params.card,
-        phone: params.phone,
-        sessionKey: sessionKey
-      },
-      success: function (res) {
-        wx.hideLoading()
-        if (res.data.code == 0) {
-          wx.showModal({
-            showCancel: false,
-            content: "提交成功啦",
-            success(res) {
-              if (res.confirm) {
-                wx.switchTab({
-                  url: '../index/index'
-                })
-              }
-            }
-          })
-        } else {
-          wx.showModal({
-            showCancel: false,
-            content: res.data.msg
-          })
-        }
-      }
-    })
-  },
-  // 表单提交 跳转tj()
-  async formSubmit(e) {
-    wx.showLoading({
-      mask: true,
-      title: '加载中',
-    })
-    if (this.data.isRz == 0) {
-      const params = e.detail.value
-      if (!this.WxValidate.checkForm(params)) {
-        const error = this.WxValidate.errorList[0]
-        this.showModal(error)
-        wx.hideLoading()
-        return false
-      }
-      const sessionKey = await tools.checkSessionAndLogin();
-      this.tj(sessionKey, params);
-    } else {
-      wx.hideLoading()
-      wx.showModal({
-        showCancel: false,
-        content: "您已经认证过了"
-      })
-    }
-  },
-  // 如果有就把信息回显出来
-  getInformation(sessionKey) {
-    // let _this = this;
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/student/selStudentSessionKeyEcho',
-      method: "post",
-      data: {
-        sessionKey: sessionKey
-      },
-      success: (res) => {
-        if (res.data.code == 0) {
-          if (res.data.data !== null || res.data.data !== "") {
-            this.setData({
-              isRz: 1,
-              userName: res.data.data.miniName,
-              phone: res.data.data.miniPhone,
-              card: res.data.data.studentCard,
-              isInput3: true
-            })
-          }
-        }
-      }
-    })
-  },
-  async onLoad() {
-    const sessionKey = await tools.checkSessionAndLogin();
-    this.getInformation(sessionKey);
-    this.initValidate();
-  },
-  // 验证字段的规则
-  initValidate() {
-    const rules = {
-      userName: {
-        required: true
-      },
-      phone: {
-        required: true,
-        tel: true,
-      },
-      card: {
-        required: true,
-        idcard: true,
-      }
-    }
-
-    // 验证字段的提示信息,若不传则调用默认的信息
-    const messages = {
-      userName: {
-        required: '请输入姓名'
-      },
-      phone: {
-        required: '请输入手机号',
-        tel: '请输入正确的手机号',
-      },
-      card: {
-        required: '请输入身份证号码',
-        idcard: '请输入正确的身份证号码',
-      }
-    }
-
-    // 创建实例对象
-    this.WxValidate = new WxValidate(rules, messages)
-  }
-})

+ 0 - 4
pages/Identitycopy/Identitycopy.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText":"身份认证拷贝",
-  "usingComponents": {}
-}

+ 0 - 27
pages/Identitycopy/Identitycopy.wxml

@@ -1,27 +0,0 @@
-<view class='container'>
-	<form bindsubmit="formSubmit">
-		<view class="form_item">
-			<image src='/images/shenfen1.png' mode="aspectFit" class="icon1"></image>
-			<input style='display:inline-block;height:60%;' disabled="{{isInput1}}" placeholder-style='font-size:30rpx;' placeholder='请输入姓名' name='userName' value="{{userName}}"></input>
-		</view>
-		<!-- <view class="form_item">
-			<image src='/images/shenfen2.png' mode="aspectFit" class="icon1"></image>
-			<input style='display:inline-block;height:60%;' disabled="{{isInput2}}" placeholder-style='font-size:30rpx;' placeholder='请输入手机号' name='phone' type='number' value="{{phone}}"></input>
-		</view> -->
-		<view class="form_item">
-			<image src='/images/shenfen4.png' mode="aspectFit" class="icon1"></image>
-			<input style='width:80%;display:inline-block;height:60%;' disabled="{{isInput3}}" placeholder-style='font-size:30rpx;' placeholder='请输入身份证号' name="card" value="{{card}}"></input>
-		</view>
-		<view class="pyp_box1">
-			
-			<image src="../../images/camera.png" class="xj" wx:if="{{carWin_img==''}}"  bindtap="openCamera"></image>
-			<view class="add_text" wx:if="{{carWin_img==''}}" >点我上传本人照片</view>
-			<image src="{{carWin_img}}" class="xj" bindtap="openCamera" wx:if="{{carWin_img!=''}}"></image>
-			<view style="display:flex;">
-			<van-button   plain size="small" block  custom-style="width:250rpx;border-radius:10rpx;margin-top:20rpx;margin-left:70rpx" bindtap="submitImgToTxy">点我确认照片</van-button>
-			<van-button plain size="small" block custom-style="width:250rpx;border-radius:10rpx;margin-top:20rpx;margin-left:30rpx" bindtap="openCamera">重新拍摄</van-button>
-			</view>
-		</view>
-		<button class="qrrz" formType="submit" style="width:500rpx">前往认证</button>
-	</form>
-</view>

+ 0 - 69
pages/Identitycopy/Identitycopy.wxss

@@ -1,69 +0,0 @@
-.form_item {
-  width: 600rpx;
-  margin-left: 75rpx;
-  height: 80rpx;
-  display: flex;
-  align-items: center;
-  border-bottom: 1px solid #cdcdcd;
-  margin-top: 30rpx;
-}
-
-.icon1 {
-  width: 43rpx;
-  height: 30rpx;
-  margin-right: 20rpx;
-}
-
-.getyzm {
-  color: #d72f1d;
-  font-size: 24rpx;
-  font-weight: 900;
-  /* border: 1px solid #d72f1d; */
-  border-radius: 30rpx;
-  width: 150rpx;
-  height: 50rpx;
-  line-height: 50rpx;
-  text-align: center;
-}
-
-.qrrz {
-  height: 77rpx;
-  margin-left: 95rpx;
-  border-radius: 40rpx;
-  font-size: 29rpx;
-  font-weight: 600;
-  color: #fff;
-  background: -webkit-linear-gradient(left, #d7301d, #f99c30);
-  box-shadow: 5px 5px 5px #eea390;
-  margin-bottom: 20rpx;
-  text-align: center;
-  margin-top: 200rpx;
-  /* border: 1px solid red; */
-}
-
-.pyp_box1 {
-  width: 680rpx;
-  height: 500rpx;
-  margin-left: 35rpx;
-  margin-top: 20rpx;
-  background-color: #fff;
-  border-radius: 30rpx;
-}
-
-.add_text {
-  /* margin-left: 260rpx;
-  padding-top: 20rpx; */
-  color: #f9720d;
-  /* font-weight: 900; */
-  position: absolute;
-  top: 500rpx;
-  left: 255rpx;
-}
-.xj {
-  width: 500rpx;
-  height: 303rpx;
-  margin-top: 20rpx;
-  margin-left: 85rpx;
-
-  /* border: 1px solid red; */
-}

+ 2 - 2
pages/agoClass/agoClass.wxml

@@ -3,8 +3,8 @@
 		<image src="{{item.clasImg}}" mode='aspectFill' class="scimg"></image>
 		<view class="sctext">
 			<view class="t1">{{item.clasName}}</view>
-			<view class="t2">主办:{{item.remark}}</view>
-			<view class="t2">承办:{{item.organizer}}</view>
+			<view class="t2" wx:if="{{item.remark!=null}}">主办:{{item.remark}}</view>
+			<view class="t2" wx:if="{{item.remark!=null}}">承办:{{item.organizer}}</view>
 			<view class="t2">开班时间:{{item.beginDate}} 至 {{item.endDate}}</view>
 		</view>
 	</view>

+ 131 - 61
pages/dbDetails/dbDetails.js

@@ -1,5 +1,6 @@
 const app = require('../../utils/util.js');
 const tools = require('../../utils/tools.js');
+var app1 = getApp();
 Page({
   data: {
     url: '', //播放地址
@@ -14,7 +15,13 @@ Page({
     intervalCtx: null,
     videoContext: null,
     classInfo: {},
-    showWW: false
+    showWW: false,
+    showChange: false,
+    showfullChange:false,
+    networkType: '',
+    isAgree: false, //表示不同意用4G
+    fullScreen:false
+    
   },
   isClass(sessionKey) {
     wx.request({
@@ -77,24 +84,70 @@ Page({
         intervalTime: 0,
         showWW: true
       })
-      // wx.showModal({
-      //   showCancel: false,
-      //   content: "您还在吗,请点击确定继续观看视频哦",
-      //   success(res) {
-      //     if (res.confirm) {
-      //       _this.data.videoContext.play()
-      //     }
-      //   }
-      // })
     }
   },
   // 点击开始播放视频
-  bindplay() {
+  async bindplay() {
+    // this.setData({
+    //   clickTime: this.data.clickTime + 1
+    // })
     this.setData({
       intervalCtx: setInterval(() => {
         this.calculateTime()
       }, 5000)
     })
+    const netStatus = await this.getNetStatus();
+    this.setData({
+      networkType: netStatus
+    })
+    if (netStatus != 'wifi' && !this.data.isAgree) {
+      this.data.videoContext.pause()
+      if(this.data.fullScreen){
+        this.setData({
+          showfullChange: true
+        })
+      }else{
+        this.setData({
+          showChange: true
+        })
+      }
+     
+    }
+    wx.onNetworkStatusChange((res) => {
+      if (this.data.networkType == "wifi" && res.networkType != "wifi" && !this.data.isAgree) {
+        this.data.videoContext.pause()
+        if(this.data.fullScreen){
+          this.setData({
+            showfullChange: true
+          })
+        }else{
+          this.setData({
+            showChange: true
+          })
+        }
+      }
+    })
+  },
+  goclose() {
+    this.setData({
+      showChange: false,
+      showfullChange:false,
+      isAgree: false
+    })
+  },
+  goon() {
+    this.setData({
+      showChange: false,
+      showfullChange:false,
+      isAgree: true
+    })
+    this.data.videoContext.play()
+  },
+  fullScreenChange(e) {
+    console.log(e.detail.fullScreen,"我是切换全屏的状态")
+    this.setData({
+      fullScreen: e.detail.fullScreen
+    })
   },
   startbf() {
     this.setData({
@@ -186,41 +239,13 @@ Page({
   },
   // 修改学习进度
   chechEndStatus: function () {
-    let _this = this;
-    // let currentTime = parseInt(e.detail.currentTime)
-    let isDone = 'studyLog.isDone'
-    this.setData({
-      [isDone]: 1
-    })
-    wx.request({
-      method: "post",
-      url: app.globalData.publicUrl + '/wx/course/updateStudyLog',
-      data: {
-        studyLog: _this.data.studyLog
-      },
-      success: (e) => {
-        wx.showModal({
-          showCancel: false,
-          content: "该录播视频已经看完啦,快去完成其他任务吧!",
-          success(res) {
-            if (res.confirm) {
-              wx.navigateBack({
-                delta: 1
-              })
-            }
-          }
-        })
-      }
-    })
-  },
-  onUnload() {
-    let _this = this;
-    clearInterval(_this.data.intervalCtx)
-    let stydyrecord = _this.data.playVideoDuration;
-    if (stydyrecord == null) {
-      stydyrecord == 0
-    }
-    if (_this.data.studyLog.studyTime > stydyrecord) {
+    if (this.data.classInfo.id != -1) {
+      let _this = this;
+      // let currentTime = parseInt(e.detail.currentTime)
+      let isDone = 'studyLog.isDone'
+      this.setData({
+        [isDone]: 1
+      })
       wx.request({
         method: "post",
         url: app.globalData.publicUrl + '/wx/course/updateStudyLog',
@@ -228,30 +253,75 @@ Page({
           studyLog: _this.data.studyLog
         },
         success: (e) => {
-          console.log(e, "我修改进度成功了")
+          wx.showModal({
+            showCancel: false,
+            content: "该录播视频已经看完啦,快去完成其他任务吧!",
+            success(res) {
+              if (res.confirm) {
+                wx.navigateBack({
+                  delta: 1
+                })
+              }
+            }
+          })
         }
       })
     }
   },
+  onUnload() {
+    let _this = this;
+    clearInterval(_this.data.intervalCtx)
+    if (_this.data.classInfo.id != -1) {
+      let stydyrecord = _this.data.playVideoDuration;
+      if (stydyrecord == null) {
+        stydyrecord == 0
+      }
+      if (_this.data.studyLog.studyTime > stydyrecord) {
+        wx.request({
+          method: "post",
+          url: app.globalData.publicUrl + '/wx/course/updateStudyLog',
+          data: {
+            studyLog: _this.data.studyLog
+          },
+          success: (e) => {
+            console.log(e, "我修改进度成功了")
+          }
+        })
+      }
+    }
+  },
   onHide() {
     let _this = this;
     clearInterval(_this.data.intervalCtx)
-    let stydyrecord = _this.data.playVideoDuration;
-    if (stydyrecord == null) {
-      stydyrecord == 0
+    if (_this.data.classInfo.id != -1) {
+      let stydyrecord = _this.data.playVideoDuration;
+      if (stydyrecord == null) {
+        stydyrecord == 0
+      }
+      if (_this.data.studyLog.studyTime > stydyrecord) {
+        wx.request({
+          method: "post",
+          url: app.globalData.publicUrl + '/wx/course/updateStudyLog',
+          data: {
+            studyLog: _this.data.studyLog
+          },
+          success: (e) => {
+            console.log(e, "我修改进度成功了")
+          }
+        })
+      }
     }
-    if (_this.data.studyLog.studyTime > _this.data.playVideoDuration) {
-      wx.request({
-        method: "post",
-        url: app.globalData.publicUrl + '/wx/course/updateStudyLog',
-        data: {
-          studyLog: _this.data.studyLog
-        },
-        success: (e) => {
-          console.log(e, "我修改进度成功了")
+  },
+  async getNetStatus() {
+    return new Promise((resolve, reject) => {
+      wx.getNetworkType({
+        success: (res) => {
+          console.log(res.networkType, "999999")
+          resolve(res.networkType);
         }
       })
-    }
+    });
+
   },
   async onLoad(options) {
     this.setData({
@@ -262,5 +332,5 @@ Page({
     this.isClass(sessionKey);
     this.getStudyLog(sessionKey);
     this.getdbArr(sessionKey);
-  }
+  },
 })

+ 16 - 1
pages/dbDetails/dbDetails.wxml

@@ -1,5 +1,19 @@
 <view class="home">
-	<video src="{{url}}" initial-time="{{playVideoDuration}}" bindplay="bindplay" bindpause="bindpause" enable-auto-rotation="true" binderror="videoErrorCallback" bindtimeupdate="timeUpdate" show-play-btn="ture" show-mute-btn="true" controls bindended="chechEndStatus" id="myVideo">
+	<video src="{{url}}" initial-time="{{playVideoDuration}}" bindplay="bindplay" bindpause="bindpause" enable-auto-rotation="true" binderror="videoErrorCallback" bindtimeupdate="timeUpdate" bindfullscreenchange="fullScreenChange" show-play-btn="ture" show-mute-btn="true" controls bindended="chechEndStatus" id="myVideo">
+		<cover-view wx:if="{{showChange}}" class="change" catchtouchmove='true'>
+			<cover-image src="../../images/netChange.png" class="change_box"></cover-image>
+			<cover-view class="change_text">您当前为非wifi网络</cover-view>
+			<cover-view class="change_text change_text1">请注意流量消耗哦!</cover-view>
+			<cover-view class="btn1" bindtap="goon">继续观看</cover-view>
+			<cover-view class="btn2" bindtap="goclose">关闭</cover-view>
+		</cover-view>
+		<cover-view wx:if="{{showfullChange}}" class="change1" catchtouchmove='true'>
+			<cover-image src="../../images/netChange.png" class="change_box1"></cover-image>
+			<cover-view class="change_text2">您当前为非wifi网络</cover-view>
+			<cover-view class="change_text2 change_text3">请注意流量消耗哦!</cover-view>
+			<cover-view class="btn3" bindtap="goon">继续观看</cover-view>
+			<cover-view class="btn4" bindtap="goclose">关闭</cover-view>
+		</cover-view>
 	</video>
 	<view class="text_box">
 		<view class="title">{{title}}</view>
@@ -13,4 +27,5 @@
 			学习累了么?不要溜号呦,点我继续学习吧!
 		</view>
 	</view>
+
 </view>

+ 144 - 19
pages/dbDetails/dbDetails.wxss

@@ -1,50 +1,175 @@
-#myVideo{
+#myVideo {
   width: 100%;
 }
-.text_box{
-width: 90%;
-margin-left: 5%;
+
+.text_box {
+  width: 90%;
+  margin-left: 5%;
 }
-.title{
+
+.title {
   font-size: 32rpx;
   margin-top: 50rpx;
 }
-.bfnum{
-color: #999999;
-font-size: 25rpx;
-margin-top: 10rpx;
-height: 50rpx;
-border-bottom: 1px solid #dbdbdb;
+
+.bfnum {
+  color: #999999;
+  font-size: 25rpx;
+  margin-top: 10rpx;
+  height: 50rpx;
+  border-bottom: 1px solid #dbdbdb;
 }
-.zj{
+
+.zj {
   font-size: 32rpx;
   margin-top: 20rpx;
 }
-.zw{
+
+.zw {
   font-size: 25rpx;
   margin-top: 40rpx;
   line-height: 40rpx;
 }
-.rsww{
+
+.rsww {
   width: 100%;
   height: 100vh;
-  background-color: rgba(0,0,0,0.5);
+  background-color: rgba(0, 0, 0, 0.5);
   position: fixed;
   top: 0;
 }
-.rsimg{
+
+.change {
+  width: 100vw;
+  height: 550rpx;
+  position: absolute;
+  top: 0;
+}
+.change1 {
+  width: 100vw;
+  height: 100vh;
+  position: absolute;
+  right: 0;
+  bottom: 0rpx;
+}
+.change_box {
+  width: 354rpx;
+  height: 365rpx;
+  position: absolute;
+  top: 50rpx;
+  left: 198rpx;
+}
+.change_box1 {
+  width: 354rpx;
+  height: 365rpx;
+  position: absolute;
+  top: 200rpx;
+  left: 38%;
+}
+.change_text {
+  width: 350rpx;
+  position: absolute;
+  top: 120rpx;
+  left: 198rpx;
+  display: block;
+  text-align: center;
+  word-wrap: break-word;
+  word-break: normal;
+  font-size: 26rpx;
+}
+.change_text2 {
+  width: 320rpx;
+  position: absolute;
+  top: 250rpx;
+  left: 39%;
+  display: block;
+  text-align: center;
+  word-wrap: break-word;
+  word-break: normal;
+  font-size: 26rpx; 
+ }
+.change_text1 {
+  top: 160rpx;
+}
+.change_text3 {
+  top: 290rpx;
+}
+.btn1 {
+  width: 200rpx;
+  height: 50rpx;
+  line-height: 50rpx;
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #fff;
+  background-color: #e45824;
+  position: absolute;
+  top: 210rpx;
+  text-align: center;
+  left: 276rpx;
+}
+
+.btn2 {
+  width: 200rpx;
+  height: 57rpx;
+  line-height: 57rpx;
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #fff;
+  background-color: #999999;
+  position: absolute;
+  top: 280rpx;
+  text-align: center;
+  left: 276rpx;
+}
+.btn3 {
+  width: 200rpx;
+  height: 50rpx;
+  line-height: 50rpx;
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #fff;
+  background-color: #e45824;
+  position: absolute;
+  top: 350rpx;
+  text-align: center;
+  left: 44%;
+}
+
+.btn4 {
+  width: 200rpx;
+  height: 57rpx;
+  line-height: 57rpx;
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #fff;
+  background-color: #999999;
+  position: absolute;
+  top: 430rpx;
+  text-align: center;
+  left: 44%;
+}
+.rsimg {
   width: 400rpx;
   height: 429rpx;
   position: absolute;
-  top: 20%;
+  top: 300rpx;
   left: 175rpx;
 }
-.text{
+
+.text {
   width: 180rpx;
   height: 150rpx;
   position: absolute;
-  top: 270rpx;
+  top: 330rpx;
   left: 365rpx;
   font-size: 25rpx;
   line-height: 40rpx;
+}
+
+page {
+  background-color: #f2f2f2;
 }

+ 50 - 36
pages/evaluationCourse/evaluationCourse.js

@@ -187,43 +187,57 @@ Page({
     })
   },
   submitForm() {
-    wx.showLoading({
-      mask: true,
-      title: '加载中',
-    })
-    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) => {
-        wx.hideLoading();
-        if (res.data.code == 0) {
-          wx.showModal({
-            showCancel: false,
-            content: '评价成功',
-            success() {
-              wx.navigateBack({
-                delta: 1
-              })
-            }
-          })
-        } else {
-          wx.showModal({
-            showCancel: false,
-            content: res.data.msg,
-            success() {
-              wx.navigateBack({
-                delta: 1
-              })
-            }
-          })
+
+    let obj = this.data.chooseValue.find(item=>!item.currentAnswer)
+    if(!obj){
+      wx.showLoading({
+        mask: true,
+        title: '加载中',
+      })
+      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("提交上去可");
+        
+          wx.hideLoading();
+          if (res.data.code == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: '评价成功',
+              success() {
+                wx.navigateBack({
+                  delta: 1
+                })
+              }
+            })
+          } else {
+            wx.showModal({
+              showCancel: false,
+              content: res.data.msg,
+              success() {
+                wx.navigateBack({
+                  delta: 1
+                })
+              }
+            })
+          }
         }
-      }
-    })
+      })
+    }else{
+      wx.showModal({
+        showCancel: false,
+        content: '333333',
+        success() {
+        }
+      })
+    }
+  
   },
   timeFormat(date, fmt) {
     let o = {

+ 2 - 0
pages/evaluationCourseDetail/evaluationCourseDetail.js

@@ -14,6 +14,8 @@ Page({
         answersId: answersId
       },
       success: (res) => {
+        console.log(res,"sssssss");
+        
         if (res.data.code == 0) {
           this.setData({
             gridArr: res.data.list

+ 37 - 26
pages/feedBack/feedBack.js

@@ -188,33 +188,44 @@ Page({
     })
   },
   submitForm() {
-    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) => {
-        if (res.data.code == 0) {
-          wx.showModal({
-            showCancel: false,
-            content: '提交成功',
-            success() {
-              wx.navigateBack({
-                delta: 1
-              })
-            }
-          })
-        } else {
-          wx.showModal({
-            showCancel: false,
-            content: res.data.msg
-          })
+    let obj = this.data.chooseValue.find(item=>!item.currentAnswer)
+    if(!obj){
+      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) => {
+          if (res.data.code == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: '提交成功',
+              success() {
+                wx.navigateBack({
+                  delta: 1
+                })
+              }
+            })
+          } else {
+            wx.showModal({
+              showCancel: false,
+              content: res.data.msg
+            })
+          }
         }
-      }
-    })
+      })
+    }else{
+      wx.showModal({
+        showCancel: false,
+        content: '333333',
+        success() {
+        }
+      })
+    }
+  
   },
   formSubmit(e) {
     let arr1 = this.data.zaizhiTime.filter(d => d);

+ 16 - 1
pages/grade/grade.js

@@ -14,8 +14,23 @@ Page({
       },
       success: (res) => {
         if (res.data.code == 0) {
+          console.log(res,"000000")
+         
+         let gridArr =  res.data.list.map(item=>{
+            let json = {};
+            if( item.correctAnswer){
+               json.correctAnswer = item.correctAnswer.split("||").join('')
+            }
+            if( item.currentAnswer){
+              json.currentAnswer = item.currentAnswer.split("||").join('')
+           }
+            json.score = item.score;
+            json.questStem =  item.questStem;
+            json.answerScore =  item.answerScore;
+            return json;
+          })
           this.setData({
-            gridArr: res.data.list
+            gridArr: gridArr
           })
         }
       }

+ 3 - 3
pages/grade/grade.wxml

@@ -16,13 +16,13 @@
 					{{item.questStem}}
 				</view>
 				<view class="daan">
-					正确答案: <view class="zhengquedaan">{{item.correctAnswer}}</view>
+					<view class="wodedaan_text">正确答案:</view> <view class="zhengquedaan">{{item.correctAnswer}}</view>
 				</view>
 				<view class="daan">
-					我的答案: <view class="wodedaan">{{item.currentAnswer}}</view>
+					<view class="wodedaan_text">我的答案:</view> <view class="wodedaan">{{item.currentAnswer}}</view>
 				</view>
 				<view class="daan">
-					分数: <view class="wodedaan">{{item.score}}</view>
+					<view class="wodedaan_text">我的分数:</view> <view class="wodedaan">{{item.score}}</view>
 				</view>
 			</view>
 		</view>

+ 14 - 9
pages/grade/grade.wxss

@@ -16,11 +16,10 @@
   width: 160rpx;
   border-radius: 50%;
   background-color: white;
-   display: flex;
-   flex-direction: column;
-   text-align: center;
+  display: flex;
+  flex-direction: column;
+  text-align: center;
   margin: 0 auto;
-   
 }
 .title{
   font-size: 20rpx;
@@ -39,7 +38,6 @@
   margin: 0 auto;
   margin-top: 18rpx;
   box-shadow:rgba(235,63,51,0.3) 0px 0px 20px;
-  
 }
 .redk {
   height: 33rpx;
@@ -67,6 +65,16 @@
 .daan{
   font-size: 21rpx;
   margin: 20rpx 20rpx 20rpx 0rpx;
+  display: flex;
+  width: 500rpx;
+}
+.wodedaan{
+  display: inline-block;
+  color: #EB3F33;
+  width: 400rpx;
+}
+.wodedaan_text{
+  width: 100rpx;
 }
 .number{
   height: 30rpx;
@@ -80,10 +88,7 @@
   display: inline-block;
   color: #00B627;
 }
-.wodedaan{
-  display: inline-block;
-  color: #EB3F33;
-}
+
 
 page {
   background:#F4F4F4

+ 59 - 47
pages/lastdetail/lastdetail.js

@@ -189,54 +189,65 @@ Page({
     })
   },
   submitForm() {
-    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) => {
-        if (res.data.code == 0) {
-          wx.showModal({
-            showCancel: false,
-            content: '提交成功啦',
-            success() {
-              wx.navigateTo({
-                url: '/pages/last/last',
-              })
-            }
-          })
-        } else {
-          wx.showModal({
-            showCancel: false,
-            content: res.data.msg,
-            success() {
-              wx.navigateBack({
-                delta: 1
-              })
-            }
-          })
+    let obj = this.data.chooseValue.find(item=>!item.currentAnswer)
+    if(!obj){
+      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) => {
+          if (res.data.code == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: '提交成功啦',
+              success() {
+                wx.navigateTo({
+                  url: '/pages/last/last',
+                })
+              }
+            })
+          } else {
+            wx.showModal({
+              showCancel: false,
+              content: res.data.msg,
+              success() {
+                wx.navigateBack({
+                  delta: 1
+                })
+              }
+            })
+          }
+          // if (res.data.msg == "请勿重复提交") {
+          //   wx.showModal({
+          //     showCancel: false,
+          //     content: res.data.msg
+          //   })
+          // } else {
+          //   wx.showModal({
+          //     showCancel: false,
+          //     content: "提交成功",
+          //     success() {
+          //       wx.navigateTo({
+          //         url: '/pages/last/last',
+          //       })
+          //     }
+          //   })
+          // }
         }
-        // if (res.data.msg == "请勿重复提交") {
-        //   wx.showModal({
-        //     showCancel: false,
-        //     content: res.data.msg
-        //   })
-        // } else {
-        //   wx.showModal({
-        //     showCancel: false,
-        //     content: "提交成功",
-        //     success() {
-        //       wx.navigateTo({
-        //         url: '/pages/last/last',
-        //       })
-        //     }
-        //   })
-        // }
-      }
-    })
+      })
+    }else{
+      wx.showModal({
+        showCancel: false,
+        content: '333333',
+        success() {
+        }
+      })
+    }
+   
   },
   formSubmit(e) {
     let arr1 = this.data.zaizhiTime.filter(d => d);
@@ -282,6 +293,7 @@ Page({
 
   },
   async onLoad(options) {
+    const sessionKey = await tools.checkSessionAndLogin();
     wx.setStorageSync('answersId', options.answersId);
     this.setData({
       sessionKey: sessionKey,

+ 3 - 3
pages/lastdetail/lastdetail.wxml

@@ -21,9 +21,9 @@
 			</view>
 		<view class='fwb' wx:if="{{ item.QuestType == 0}}">
 			<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;  position: relative; top: 8rpx; "> </image>
+				<view class="xingbie tebie">{{item.QuestStem}}</view>
 			</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}}">
@@ -72,6 +72,6 @@
 			</view>
 		</view>
 		<view style="margin-top: 100rpx;margin-bottom:100rpx">
-			<van-button   round bindtap="submitForm">提交</van-button>
+			<van-button   round bindtap="submitForm">提交表单</van-button>
 		</view>
 </view>

+ 12 - 6
pages/lastdetail/lastdetail.wxss

@@ -8,14 +8,17 @@ van-button {
   text-align: center;
   margin: 0 60rpx;
 }
+
 .van-button--default {
   background: linear-gradient(90deg, rgba(215, 47, 29, 1), rgba(249, 157, 48, 1)) !important;
   color: white !important;
 
 }
+
 .van-field__input {
   background: #F4F4F4 !important;
 }
+
 button:not([size='mini']) {
   width: 550rpx !important;
 }
@@ -56,6 +59,7 @@ button:not([size='mini']) {
   display: flex;
   font-size: 28rpx;
   margin-top: 40rpx;
+  flex-direction: column;
 }
 
 
@@ -84,8 +88,7 @@ button:not([size='mini']) {
 .weui-input {
   margin-left: 20rpx;
   background: #F4F4F4;
-  width: 474rpx;
-
+  /* width: 474rpx; */
 }
 
 .weui-input input {
@@ -100,13 +103,15 @@ button:not([size='mini']) {
 
 .xingbie {
   margin-left: 10rpx;
-  width: 130rpx;
-  line-height: 60rpx;
+  width: 90%;
+  display: inline-block;
+
 }
 
 .red-image {
-  vertical-align: text-bottom;
   margin-top: 10rpx;
+  display: flex;
+ 
 }
 
 input {
@@ -125,6 +130,7 @@ textarea {
   width: 100%;
   height: 194rpx;
   margin-top: 20rpx;
+
 }
 
 .fwt {
@@ -154,7 +160,7 @@ textarea {
 .checkboxbox {
   background: linear-gradient(90deg, rgba(215, 47, 29, 1), rgba(249, 157, 48, 1)) !important;
   color: white !important;
- 
+
 }
 
 .my-choosebox {

+ 1 - 0
pages/lastdetailDetail/lastdetailDetail.js

@@ -1,4 +1,5 @@
 const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
 Page({
   data: {
     gridArr: [],

+ 0 - 2
pages/livePlayback/livePlayback.js

@@ -1,6 +1,5 @@
 // pages/livePlayback/livePlayback.js
 Page({
-
   /**
    * 页面的初始数据
    */
@@ -9,7 +8,6 @@ Page({
     title:"",
     message:""
   },
-
   /**
    * 生命周期函数--监听页面加载
    */

+ 84 - 108
pages/myClass/myClass.js

@@ -155,6 +155,7 @@ Page({
       },
       success: (res) => {
         if (res.data.code == 0) {
+          console.log(res)
           this.setData({
             studentName: res.data.data.studentName,
           })
@@ -215,8 +216,8 @@ Page({
       method: "post",
       data: {
         sessionKey: sessionKey,
-        isSee: 1,
-        isNotice: 0
+        isSee: 1
+        // isNotice: 0
       },
       success: (res) => {
         if (res.data.code == 0) {
@@ -370,6 +371,17 @@ Page({
           wx.navigateTo({
             url: '../zbDetails/zbDetails?id=' + id
           })
+        } else if (e.currentTarget.dataset.item.isActive == -1) {
+          if(courseUrl==null||courseUrl==""){
+            wx.showModal({
+              showCancel: false,
+              content: "直播回放还未上传噢"
+            })
+          }else{
+            wx.navigateTo({
+              url: '../livePlayback/livePlayback?courseName=' + courseName + '&courseUrl=' + courseUrl + '&courseInfo=' + courseInfo
+            })
+          }
         } else {
           wx.showModal({
             showCancel: false,
@@ -383,6 +395,7 @@ Page({
         })
       }
     } else {
+      console.log(this.data.istask)
       if (!this.data.istask) {
         wx.showModal({
           showCancel: false,
@@ -408,12 +421,19 @@ Page({
       if (e.currentTarget.dataset.item.isLive == 1) {
         if (e.currentTarget.dataset.item.isActive == 1) {
           wx.navigateTo({
-            url: '../zbDetails/zbDetails?url=' + id
+            url: '../zbDetails/zbDetails?id=' + id
           })
         } else if (e.currentTarget.dataset.item.isActive == -1) {
-          wx.navigateTo({
-            url: '../livePlayback/livePlayback?courseName=' + courseName + '&courseUrl=' + courseUrl + '&courseInfo=' + courseInfo
-          })
+          if(courseUrl==null||courseUrl==""){
+            wx.showModal({
+              showCancel: false,
+              content: "直播回放还未上传噢"
+            })
+          }else{
+            wx.navigateTo({
+              url: '../livePlayback/livePlayback?courseName=' + courseName + '&courseUrl=' + courseUrl + '&courseInfo=' + courseInfo
+            })
+          }
         } else {
           wx.showModal({
             showCancel: false,
@@ -453,33 +473,7 @@ Page({
   // 去考试
   gokhAnswer(e) {
     if (this.data.classInfo.id == -1) {
-      wx.request({
-        url: app.globalData.publicUrl + '/wx/exam/examList',
-        method: "post",
-        data: {
-          sessionKey: this.data.sessionKey,
-          courseId: e.currentTarget.dataset.item.id,
-          clasId: this.data.classInfo.id
-        },
-        success: (res) => {
-          if (res.data.code == 0) {
-            if (res.data.list.length == 0) {
-              wx.showModal({
-                showCancel: false,
-                content: '老师还未出考试题哦'
-              })
-            } else {
-              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 {
-                  this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
-                }
-              }
-            }
-          }
-        }
-      })
+      this.examination(e.currentTarget.dataset.item.id);
     } else {
       if (!this.data.istask) {
         wx.showModal({
@@ -510,66 +504,44 @@ Page({
         })
         return false
       } else {
-        wx.request({
-          url: app.globalData.publicUrl + '/wx/exam/examList',
-          method: "post",
-          data: {
-            sessionKey: this.data.sessionKey,
-            courseId: e.currentTarget.dataset.item.id,
-            clasId: this.data.classInfo.id
-          },
-          success: (res) => {
-            if (res.data.code == 0) {
-              if (res.data.list.length == 0) {
-                wx.showModal({
-                  showCancel: false,
-                  content: '老师还未出考试题哦'
-                })
+        this.examination(e.currentTarget.dataset.item.id);
+      }
+    }
+  },
+  // 考试方法单拿出来
+  examination(id) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/examList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        courseId: id,
+        clasId: this.data.classInfo.id
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          if (res.data.list.length == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: '老师还未出考试题哦'
+            })
+          } else {
+            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 {
-                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 {
-                    this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
-                  }
-                }
+                this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'answerAfterclass');
               }
             }
           }
-        })
+        }
       }
-    }
+    })
   },
   //去评价
   gopjClass(e) {
     if (this.data.classInfo.id == -1) {
-      wx.request({
-        url: app.globalData.publicUrl + '/wx/exam/quesExamList',
-        method: "post",
-        data: {
-          sessionKey: this.data.sessionKey,
-          courseId: e.currentTarget.dataset.item.id,
-          clasId: this.data.classInfo.id
-        },
-        success: (res) => {
-          if (res.data.code == 0) {
-            if (res.data.list.length == 0) {
-              wx.showModal({
-                showCancel: false,
-                content: '老师还未出评价模板哦'
-              })
-            } else {
-              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, 'evaluationCourse');
-                } else {
-                  this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'evaluationCourse');
-                }
-              }
-            }
-          }
-        }
-      })
+      this.evaluate(e.currentTarget.dataset.item.id)
     } else {
       if (!this.data.istask) {
         wx.showModal({
@@ -600,35 +572,39 @@ Page({
         })
         return false
       } else {
-        wx.request({
-          url: app.globalData.publicUrl + '/wx/exam/quesExamList',
-          method: "post",
-          data: {
-            sessionKey: this.data.sessionKey,
-            courseId: e.currentTarget.dataset.item.id,
-            clasId: this.data.classInfo.id
-          },
-          success: (res) => {
-            if (res.data.code == 0) {
-              if (res.data.list.length == 0) {
-                wx.showModal({
-                  showCancel: false,
-                  content: '老师还未出评价模板哦'
-                })
+        this.evaluate(e.currentTarget.dataset.item.id)
+      }
+    }
+  },
+  // 评价方法单拿出来
+  evaluate(id) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/exam/quesExamList',
+      method: "post",
+      data: {
+        sessionKey: this.data.sessionKey,
+        courseId: id,
+        clasId: this.data.classInfo.id
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          if (res.data.list.length == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: '老师还未出评价模板哦'
+            })
+          } else {
+            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, 'evaluationCourse');
               } else {
-                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, 'evaluationCourse');
-                  } else {
-                    this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'evaluationCourse');
-                  }
-                }
+                this.beginKao(res.data.list[0].id, res.data.list[0].paperId, this.data.sessionKey, 'evaluationCourse');
               }
             }
           }
-        })
+        }
       }
-    }
+    })
   },
   // 查看详情成绩
   gockcj(e) {

+ 45 - 12
pages/myInteractions/myInteractions.js

@@ -67,11 +67,48 @@ Page({
     }
 
   },
+  // 禁止input框输入表情
+  regStrFn(str) {
+    // 转换一下编码
+    let reg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n])|(\s)/g,
+      indexArr = reg.exec(str);
+    if (str.match(reg)) {
+      str = str.replace(reg, '');
+    }
+    let obj = {
+      val: str,
+      index: indexArr
+    }
+    return obj
+  },
+  bindinput(e) {
+    // let name = 'form.' + e.target.dataset.name
+    let val = e.detail.value,
+      pos = e.detail.cursor;
+    let reg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n])|(\s)/g
+    if (!reg.test(val)) {
+      return
+    }
+    let obj = this.regStrFn(val)
+    if (pos != -1 && obj.index) {
+      //计算光标的位置
+      pos = obj.index.index
+    }
+    return {
+      value: obj.val,
+      cursor: pos
+    }
+  },
   // 提交内容
   async bindFormSubmit(e) {
+    wx.showLoading({
+      mask: true,
+      title: '加载中',
+    })
     let input_val = e.detail.value.textarea;
     const sessionKey = await tools.checkSessionAndLogin();
     if (input_val == "" || input_val == undefined) {
+      wx.hideLoading();
       wx.showToast({
         title: '反馈不能为空',
         icon: 'none',
@@ -79,10 +116,6 @@ Page({
       })
       return false;
     }
-    wx.showLoading({
-      mask: true,
-      title: '加载中',
-    })
     wx.request({
       url: app.globalData.publicUrl + '/wx/board/add',
       method: "post",
@@ -91,8 +124,8 @@ Page({
         sessionKey: sessionKey
       },
       success: (res) => {
-        wx.hideLoading()
         if (res.data.code == 0) {
+          wx.hideLoading()
           wx.showModal({
             showCancel: false,
             content: "提交成功",
@@ -104,13 +137,13 @@ Page({
               }
             }
           })
-        } 
-        // else {
-        //   wx.showModal({
-        //     showCancel: false,
-        //     content: res.data.msg
-        //   })
-        // }
+        } else {
+          wx.hideLoading()
+          wx.showModal({
+            showCancel: false,
+            content: "提交失败了哦"
+          })
+        }
       }
     })
   }

+ 1 - 1
pages/myInteractions/myInteractions.wxml

@@ -11,7 +11,7 @@
 	</view>
 	<view class="textarea_box" hidden="{{isshow1}}">
 		<form bindsubmit="bindFormSubmit">
-			<textarea value="{{mytip}}" name="textarea" placeholder="请详细填写你的问题,老师会及时给你的提问做出解答!" auto-focus maxlength="-1" style="height:700rpx;width:630rpx;background-color:#f2f2f2;border-radius:20rpx;padding:30rpx" />
+			<textarea bindinput="bindinput" value="{{mytip}}" name="textarea" placeholder="请详细填写你的问题,老师会及时给你的提问做出解答!" auto-focus maxlength="-1" style="height:700rpx;width:630rpx;background-color:#f2f2f2;border-radius:20rpx;padding:30rpx" />
 			<button form-type="submit" type="button" class="submit_btn"> 提交 </button>
     </form>
     </view> 

+ 1 - 0
pages/myInteractions/myInteractions.wxss

@@ -55,6 +55,7 @@
   margin-left: 5%;
   margin-top: 50rpx;
   font-size: 28rpx;
+  margin-bottom: 100rpx;
 }
 
 .tip {

+ 4 - 4
pages/myNotice/myNotice.js

@@ -14,8 +14,8 @@ Page({
       method: "post",
       data: {
         sessionKey: sessionKey,
-        isSee: 1,
-        isNotice: 0
+        isSee: 1
+        // isNotice: 0
       },
       success: (res) => {
         if (res.data.code == 0) {
@@ -49,8 +49,8 @@ Page({
       method: "post",
       data: {
         sessionKey: sessionKey,
-        isSee: 0,
-        isNotice: 0
+        isSee: 0
+        // isNotice: 0
       },
       success: (res) => {
         if (res.data.code == 0) {

+ 47 - 2
pages/onlineClass/onlineClass.js

@@ -39,8 +39,53 @@ Page({
       }
     })
   },
-  async onLoad() {
+  isClass(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/student/selMyClas',
+      method: "post",
+      data: {
+        sessionKey
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          this.setData({
+            classId: res.data.data.id
+          })
+          this.getArr(sessionKey)
+        } else {
+          if (res.data.msg == "运行时异常:学员不可同时存在两个班级中。") {
+            wx.showModal({
+              content: "学员不可同时存在多个班级中哦",
+              showCancel: false,
+              success(res) {
+                if (res.confirm) {
+                  wx.switchTab({
+                    url: '../index/index'
+                  })
+                }
+              }
+            })
+            return false;
+          } else {
+            wx.showModal({
+              content: "您当前还没有正在开放的班级!",
+              showCancel: false,
+              success(res) {
+                if (res.confirm) {
+                  wx.switchTab({
+                    url: '../index/index'
+                  })
+                }
+              }
+            })
+            return false;
+          }
+        }
+      }
+    })
+  },
+  async onShow() {
     const sessionKey = await tools.checkSessionAndLogin();
-    this.getArr(sessionKey);
+    this.isClass(sessionKey);
   }
 })

+ 86 - 2
pages/personInfo/personInfo.js

@@ -1,5 +1,8 @@
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
 Page({
   data: {
+    isRz: true,
     dataArr: [{
         img: "/images/person1.png",
         name: "我的培训",
@@ -31,12 +34,93 @@ Page({
         name: "使用指南",
         subname: "",
         url: '/pages/userGuide/userGuide'
+      },
+      {
+        img: "/images/person7.png",
+        name: "退出登录",
+        subname: ""
       }
     ]
   },
-  goTurn(e) {
+  async goTurn(e) {
+    let _this = this;
+    if (e.currentTarget.dataset.index != 6) {
+      wx.navigateTo({
+        url: this.data.dataArr[e.currentTarget.dataset.index].url,
+      })
+    } else {
+      wx.showLoading({
+        mask: true,
+        title: '退出中',
+      })
+      const sessionKey = await tools.checkSessionAndLogin();
+      wx.request({
+        url: app.globalData.publicUrl + '/wx/student/mini-info',
+        method: "DELETE",
+        data: {
+          sessionKey
+        },
+        success: (res) => {
+          wx.hideLoading();
+          if (res.data.code == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: "退出登录成功!",
+              success(res) {
+                console.log(res)
+                if (res.confirm) {
+                  console.log("dianji")
+                  _this.setData({
+                    isRz: true
+                  })
+                }
+              }
+            })
+          } else {
+            wx.showModal({
+              content: "您已处于未登录状态啦",
+              showCancel: false
+            })
+          }
+        },
+        fail: (res) => {
+          wx.hideLoading();
+          console.log(res)
+          wx.showModal({
+            content: "退出登录失败",
+            showCancel: false
+          })
+        }
+      })
+    }
+  },
+  getInformation(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/student/selStudentSessionKeyEcho',
+      method: "post",
+      data: {
+        sessionKey
+      },
+      success: (res) => {
+        console.log(res);
+        if (res.data.code == 0) {
+          console.log(res)
+          if (res.data.data.studentOpenId != null) {
+            this.setData({
+              isRz: false
+            })
+          }
+        }
+      }
+    })
+  },
+  goRz() {
     wx.navigateTo({
-      url: this.data.dataArr[e.currentTarget.dataset.index].url,
+      url: '/pages/Identity/Identity'
     })
+  },
+  async onShow() {
+    const sessionKey = await tools.checkSessionAndLogin();
+    this.getInformation(sessionKey);
   }
 })

+ 1 - 0
pages/personInfo/personInfo.wxml

@@ -6,6 +6,7 @@
 		<view class="nc">
 			<open-data type="userNickName" lang="zh_CN"></open-data>.你好
 		</view>
+		<view class="t1" bindtap="goRz" wx:if="{{isRz}}">未认证</view>
 	</view>
 	<view class="top-content">
 		<view class="content" bindtap="goTurn" wx:for="{{dataArr}}" wx:for-index="idx" wx:for-item="item" data-index="{{idx}}" wx:key="idx">

+ 7 - 0
pages/personInfo/personInfo.wxss

@@ -52,4 +52,11 @@ page {
 }
 .right-bpx {
   margin-left: 40rpx;
+}
+.t1{
+  font-size:28rpx;
+  margin-top: 100rpx;
+  margin-left: 100rpx;
+  color: #eb3f33;
+  font-weight: 900;
 }

+ 73 - 37
pages/studentRegistration/studentRegistration.js

@@ -2,12 +2,19 @@ const tools = require('../../utils/tools.js');
 const app = require('../../utils/util.js');
 Page({
   data: {
-    kaihutext:'请选择',
-    kaihuList:[
-      {   name:'高中'},
-      {   name:'大专'},
-      {   name:'本科'},
-      {   name:'硕士'},
+    kaihutext: '请选择',
+    kaihuList: [{
+        name: '高中'
+      },
+      {
+        name: '大专'
+      },
+      {
+        name: '本科'
+      },
+      {
+        name: '硕士'
+      },
     ],
     nameIsTrue: false, //名字是否填写
     cultureIsTrue: false, //文化是否填写
@@ -89,6 +96,7 @@ Page({
     return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
   },
   kaihuListChange: function (e) {
+    console.log(e, "8888888888888")
     this.setData({
       kaihuindex: e.detail.value,
       kaihutext: '',
@@ -175,7 +183,6 @@ Page({
         workIsTrue: false
       })
     }
-
     if (!e.detail.value.culture) {
       this.setData({
         cultureIsTrue: true
@@ -242,34 +249,62 @@ Page({
         peixunshijianTrue: false
       })
     }
+    e.detail.value.culture = this.data.kaihuList[this.data.kaihuindex].name;
     e.detail.value.tenure = this.data.tenure;
     e.detail.value.sessionKey = this.data.sessionKey;
     let aa = e.detail.value
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/student/upStudent',
-      method: "post",
-      data: {
-        studentDept: aa.studentDept,
-        culture: aa.culture,
-        school: aa.school,
-        studentDuty: aa.studentDuty,
-        tenure: aa.tenure,
-        studentPhone: aa.studentPhone,
-        sessionKey: this.data.sessionKey,
-        mcajor: aa.mcajor,
-      },
-      success: () => {
-        wx.showModal({
-          showCancel: false,
-          content: '提交成功',
-          success() {
-            wx.navigateBack({
-              delta: 1
-            })
-          }
-        })
-      }
-    })
+    console.log(aa, "00000000")
+    if (aa.culture && aa.mcajor && aa.school && aa.studentDuty && aa.tenure && aa.studentDept) {
+      wx.request({
+        url: app.globalData.publicUrl + '/wx/student/upStudent',
+        method: "post",
+        data: {
+          studentDept: aa.studentDept,
+          culture: aa.culture,
+          school: aa.school,
+          studentDuty: aa.studentDuty,
+          tenure: aa.tenure,
+          studentPhone: aa.studentPhone,
+          sessionKey: this.data.sessionKey,
+          mcajor: aa.mcajor,
+        },
+        success: () => {
+          console.log("提交成功");
+          wx.showModal({
+            showCancel: false,
+            content: '提交成功',
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
+          })
+        },
+        fail: (res) => {
+          console.log(res)
+          wx.showModal({
+            showCancel: false,
+            content: '提交失败',
+            success() {
+              wx.navigateBack({
+                delta: 1
+              })
+            }
+          })
+        }
+      })
+    } else {
+      wx.showModal({
+        showCancel: false,
+        content: '请补全信息',
+        success() {
+
+        }
+      })
+    }
+
+
+
 
   },
 
@@ -308,6 +343,7 @@ Page({
         sessionKey: sessionKey,
       },
       success: (res) => {
+        // console.log(rs)
         if (res.data.code == 0) {
           this.data.parameter.forEach(item => {
             if (item.value == res.data.data.studentSex) {
@@ -318,11 +354,11 @@ Page({
             info: res.data.data,
             parameter: this.data.parameter,
             studentDept: res.data.data.studentDept,
-            studentDuty:res.data.data.studentDuty,
-            kaihutext:res.data.data.culture,
-            major:res.data.data.major,
-            tenure:res.data.data.tenure,
-            studentPhone:res.data.data.studentPhone,
+            studentDuty: res.data.data.studentDuty,
+            kaihutext: res.data.data.culture,
+            major: res.data.data.major,
+            tenure: res.data.data.tenure,
+            studentPhone: res.data.data.studentPhone,
           })
         }
       }

+ 3 - 5
pages/studentRegistration/studentRegistration.wxss

@@ -88,16 +88,14 @@ button:not([size='mini']) {
   margin-left: 20rpx;
   background: #F4F4F4;
   width: 474rpx;
+  height: 60rpx;
 }
 .weui-input input{
   height: 60rpx;
 }
 .van-icon-circle {
   color: #EE0A24;
-  /* margin-top: 30rpx; */
-
 }
-
 .xingbie {
   margin-left: 10rpx;
   width: 130rpx;
@@ -128,6 +126,6 @@ radio {
  
 }
 .aaa{
-  padding: 10rpx 0;
-  color: #808080;
+  color: black;
+  line-height: 60rpx;
 }

+ 47 - 3
pages/testAnswer/testAnswer.js

@@ -8,7 +8,6 @@ Page({
   },
   startAnswer(e) {
     console.log(e);
-    
     let id = e.currentTarget.dataset.idx;
     let paperId = e.currentTarget.dataset.paperid;
     let answersId = e.currentTarget.dataset.answersid;
@@ -76,7 +75,6 @@ Page({
       },
       success: (res) => {
         console.log(res,"ssdsdsads");
-        
         if (res.data.code == 0 && res.data.list.length != 0) {
           this.setData({
             dataArr: res.data.list
@@ -103,11 +101,57 @@ Page({
       }
     })
   },
+  isClass(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/student/selMyClas',
+      method: "post",
+      data: {
+        sessionKey
+      },
+      success: (res) => {
+        if (res.data.code == 0) {
+          this.setData({
+            classId: res.data.data.id
+          })
+          this.getMycourse(sessionKey)
+        } else {
+          if (res.data.msg == "运行时异常:学员不可同时存在两个班级中。") {
+            wx.showModal({
+              content: "学员不可同时存在多个班级中哦",
+              showCancel: false,
+              success(res) {
+                if (res.confirm) {
+                  wx.switchTab({
+                    url: '../index/index'
+                  })
+                }
+              }
+            })
+            return false;
+          } else {
+            wx.showModal({
+              content: "您当前还没有正在开放的班级!",
+              showCancel: false,
+              success(res) {
+                if (res.confirm) {
+                  wx.switchTab({
+                    url: '../index/index'
+                  })
+                }
+              }
+            })
+            return false;
+          }
+        }
+      }
+    })
+  },
   async onShow() {
     const sessionKey = await tools.checkSessionAndLogin();
     this.setData({
       sessionKey: sessionKey
     })
-    this.getMycourse(sessionKey);
+    
+    this.isClass(sessionKey);
   },
 })

+ 196 - 63
pages/zbDetails/zbDetails.js

@@ -14,7 +14,10 @@ Page({
     currentGroup: null,
     chatContent: [],
     inputValue: '',
+    second: 5,
+    showmodal: false,
     bottom: "", //滑到底状态 防止弹出消息不跳到最后一条
+    talkStatus: true, //初始值为true
     onSdkReady: function (event) {
       let _this = this;
       console.log(event, "im准备好了")
@@ -36,6 +39,7 @@ Page({
                 _this.setData({
                   currentGroup: imResponse.data.group
                 })
+                _this.getjyList(imResponse.data.group)
                 console.log(_this.data.currentGroup, "加群成功") // 加入的群组资料
                 break;
               case TIM.TYPES.JOIN_STATUS_ALREADY_IN_GROUP: // 已经在群中
@@ -48,7 +52,6 @@ Page({
             console.warn('申请加群失败的相关信息', imError); // 申请加群失败的相关信息
           });
         } else {
-          console.log(imResponse.data.groupList, _this.data.roomIdandcourseId, "888888888888888888")
           for (let i = 0; i < imResponse.data.groupList.length; i++) {
             if (imResponse.data.groupList[i].groupID == _this.data.roomIdandcourseId) {
               // console.log(imResponse.data.groupList[i])
@@ -57,7 +60,7 @@ Page({
               _this.setData({
                 currentGroup: imResponse.data.groupList[i]
               })
-              console.log(_this.data.currentGroup, "0000000000000000")
+              _this.getjyList(imResponse.data.groupList[i])
             }
             if (_this.data.currentGroup == null) {
               let promise = _this.data.tim.joinGroup({
@@ -79,6 +82,7 @@ Page({
                 _this.setData({
                   currentGroup: imResponse.data.group
                 })
+                _this.getjyList(imResponse.data.group)
                 console.log(_this.data.currentGroup, "0000000000000000")
               }).catch(function (imError) {
                 console.warn('申请加群失败的相关信息', imError); // 申请加群失败的相关信息
@@ -86,14 +90,12 @@ Page({
             }
           }
         }
-        // if (imResponse.data.groupList.length == 0 || this.data.currentGroup.length == 0) 
-        // }
       }).catch(function (imError) {
         console.log(imError, "获取群组列表失败的相关信息"); // 获取群组列表失败的相关信息
       });
       //修改成员名字
-      let promise1 = this.data.tim.updateMyProfile({
-        nick: this.data.miniName
+      let promise1 = _this.data.tim.updateMyProfile({
+        nick: _this.data.miniName
       });
       promise1.then(function (imResponse) {
         console.log(imResponse.data, "更新资料成功"); // 群组列表
@@ -103,7 +105,7 @@ Page({
     },
     onSdkRecived: function (event) {
       let _this = this;
-      console.log(event.data, _this.data.currentGroup.groupID, "我收到消息了")
+      console.log(event.data[0].payload.data,"我收到消息了")
       if (event.data[0].conversationType == "GROUP" && event.data[0].to == _this.data.currentGroup.groupID) {
         console.log("我找到这个会话了", _this.data.chatContent)
         if (_this.data.chatContent.length > 0) { // 表示不是第一次填数据,可以使用push
@@ -122,7 +124,6 @@ Page({
           })
         }
       }
-      console.log(_this.data.chatContent, "2222222222222222222222222")
       if (event.data[0].payload.data == "stopLive") {
         wx.showModal({
           content: "当前直播结束了!",
@@ -144,83 +145,216 @@ Page({
         _this.trtcRoomContext.unpublishLocalVideo();
         _this.trtcRoomContext.unpublishLocalAudio();
       }
+      if (event.data[0].payload.data == "readyPutLocalStream") {
+        _this.setData({
+          showmodal: true
+        })
+        _this.countdown()
+      }
+      if (event.data[0].payload.data == "stopTalk") {
+        _this.setData({
+          talkStatus: false
+        })
+        wx.showToast({
+          title: '您被老师禁言啦', //提示文字
+          duration: 3000, //显示时长
+          mask: true, //是否显示透明蒙层,防止触摸穿透,默认:false  
+          icon: 'none' //图标,支持"success"、"loading"  
+        })
+      }
+      if (event.data[0].payload.data == "keepTalk") {
+        _this.setData({
+          talkStatus: true
+        })
+        wx.showToast({
+          title: '您的禁言被解除了,可以正常发言啦', //提示文字
+          duration: 3000, //显示时长
+          mask: true, //是否显示透明蒙层,防止触摸穿透,默认:false  
+          icon: 'none' //图标,支持"success"、"loading"  
+        })
+      }
+      // if (event.data[0].payload.data == "stopTalkList") {
+      //   console.log(event.data[0].payload, "1111111111")
+      //   if (event.data[0].payload.description == "false") {
+      //     _this.setData({
+      //       talkStatus: false
+      //     })
+      //     wx.showToast({
+      //       title: '您被老师禁言啦', //提示文字
+      //       duration: 3000, //显示时长
+      //       mask: true, //是否显示透明蒙层,防止触摸穿透,默认:false  
+      //       icon: 'none' //图标,支持"success"、"loading"  
+      //     })
+      //   }
+      // }
+    }
+  },
+  answer() {
+    this.setData({
+      showmodal: false,
+      second: 5
+    });
+    clearTimeout(this.data.timer);
+    let _this = this;
+    let message = _this.data.tim.createCustomMessage({
+      to: "teacher-" + _this.data.currentGroup.groupID,
+      conversationType: TIM.TYPES.CONV_C2C,
+      payload: {
+        data: 'yesStudentPutHand'
+      }
+    });
+    let promise = _this.data.tim.sendMessage(message);
+    promise.then(function (imResponse) {
+      console.log(imResponse, "我给老师发消息说我同意啦");
+    }).catch(function (imError) {
+      console.warn('我给老师发消息说我同意失败啦', imError);
+    });
+  },
+  refuse() {
+    this.setData({
+      showmodal: false,
+      second: 5
+    });
+    clearTimeout(this.data.timer);
+    let _this = this;
+    let message = _this.data.tim.createCustomMessage({
+      to: "teacher-" + _this.data.currentGroup.groupID,
+      conversationType: TIM.TYPES.CONV_C2C,
+      payload: {
+        data: 'notStudentPutHand'
+      }
+    });
+    let promise = _this.data.tim.sendMessage(message);
+    promise.then(function (imResponse) {
+      console.log(imResponse, "我给老师发消息说我不同意");
+    }).catch(function (imError) {
+      console.warn('我给老师发消息说我不同意失败啦', imError);
+    });
+  },
+  countdown() {
+    var second = this.data.second
+    if (second == 0) {
+      this.refuse();
+      return;
     }
+    this.setData({
+      timer: setTimeout(() => {
+        this.setData({
+          second: second - 1
+        });
+        this.countdown();
+      }, 1000)
+    })
   },
   // 举手
   handsup() {
-    console.log(this.data.currentGroup)
+    console.log(this.data.currentGroup, "0000000000")
+    if (this.data.talkStatus) {
+      let message = this.data.tim.createCustomMessage({
+        to: "teacher-" + this.data.currentGroup.groupID,
+        conversationType: TIM.TYPES.CONV_C2C,
+        payload: {
+          data: 'studentPutHand'
+        }
+      });
+      let promise = this.data.tim.sendMessage(message);
+      promise.then(function (imResponse) {
+        console.log(imResponse);
+        wx.showToast({
+          title: '举手成功',
+          icon: 'success',
+          duration: 2000,
+          mask: true
+        })
+      }).catch(function (imError) {
+        console.warn('sendMessage error:', imError);
+      });
+    } else {
+      wx.showToast({
+        title: '您被老师禁言啦', //提示文字
+        duration: 3000, //显示时长
+        mask: true, //是否显示透明蒙层,防止触摸穿透,默认:false  
+        icon: 'none' //图标,支持"success"、"loading"  
+      })
+    }
+  },
+  //发送禁言列表消息
+  getjyList(e) {
     let message = this.data.tim.createCustomMessage({
-      to: "teacher-" + this.data.currentGroup.groupID,
+      to: "teacher-" + e.groupID,
       conversationType: TIM.TYPES.CONV_C2C,
       payload: {
-        data: 'studentPutHand'
+        data: 'getStopTalkList'
       }
     });
     let promise = this.data.tim.sendMessage(message);
     promise.then(function (imResponse) {
-      console.log(imResponse);
-      wx.showToast({
-        title: '举手成功',
-        icon: 'success',
-        duration: 2000,
-        mask: true
-      })
+      console.log("成功", imResponse);
     }).catch(function (imError) {
       console.warn('sendMessage error:', imError);
     });
   },
   // 发消息
   sendMessage() {
-    if (this.data.inputValue == null || this.data.inputValue == "") {
-      wx.showModal({
-        content: "不可以发送空消息哦!",
-        showCancel: false
-      })
-      return false
-    }
-    console.log(this.data.currentGroup)
-    let message = this.data.tim.createTextMessage({
-      to: this.data.currentGroup.groupID,
-      conversationType: TIM.TYPES.CONV_GROUP,
-      priority: TIM.TYPES.MSG_PRIORITY_NORMAL,
-      payload: {
-        text: this.data.inputValue
-      }
-    });
-    let promise = this.data.tim.sendMessage(message);
-    promise.then((imResponse) => {
-      console.log(imResponse, "发送成功");
-      if (this.data.chatContent.length > 0) { // 表示不是第一次填数据,可以使用push
-        console.log("表示不是第一次填数据,可以使用push", this.data.chatContent)
-        const chatContent = this.data.chatContent
-        chatContent.push({
-          nick: this.data.miniName,
-          payload: {
-            text: this.data.inputValue
-          }
-        })
-        this.setData({
-          chatContent: chatContent,
-          bottom: 'scrollBottom'
+    if (this.data.talkStatus) {
+      if (this.data.inputValue == null || this.data.inputValue == "") {
+        wx.showModal({
+          content: "不可以发送空消息哦!",
+          showCancel: false
         })
-      } else { // 表示第一次填数据
-        console.log("表示第一次填数据", this.data.chatContent)
-        this.setData({
-          chatContent: [{
+        return false
+      }
+      console.log(this.data.currentGroup)
+      let message = this.data.tim.createTextMessage({
+        to: this.data.currentGroup.groupID,
+        conversationType: TIM.TYPES.CONV_GROUP,
+        priority: TIM.TYPES.MSG_PRIORITY_NORMAL,
+        payload: {
+          text: this.data.inputValue
+        }
+      });
+      let promise = this.data.tim.sendMessage(message);
+      promise.then((imResponse) => {
+        console.log(imResponse, "发送成功");
+        if (this.data.chatContent.length > 0) { // 表示不是第一次填数据,可以使用push
+          console.log("表示不是第一次填数据,可以使用push", this.data.chatContent)
+          const chatContent = this.data.chatContent
+          chatContent.push({
             nick: this.data.miniName,
             payload: {
               text: this.data.inputValue
             }
-          }],
-          bottom: 'scrollBottom'
+          })
+          this.setData({
+            chatContent: chatContent,
+            bottom: 'scrollBottom'
+          })
+        } else { // 表示第一次填数据
+          console.log("表示第一次填数据", this.data.chatContent)
+          this.setData({
+            chatContent: [{
+              nick: this.data.miniName,
+              payload: {
+                text: this.data.inputValue
+              }
+            }],
+            bottom: 'scrollBottom'
+          })
+        }
+        this.setData({
+          inputValue: ''
         })
-      }
-      this.setData({
-        inputValue: ''
+      }).catch(function (imError) {
+        console.warn('发送失败', imError);
+      });
+    } else {
+      wx.showToast({
+        title: '您被老师禁言啦', //提示文字
+        duration: 3000, //显示时长
+        mask: true, //是否显示透明蒙层,防止触摸穿透,默认:false  
+        icon: 'none' //图标,支持"success"、"loading"  
       })
-    }).catch(function (imError) {
-      console.warn('发送失败', imError);
-    });
+    }
   },
   bindKeyInput: function (e) {
     this.setData({
@@ -237,7 +371,6 @@ Page({
     this.data.tim.on(TIM.EVENT.SDK_READY, this.data.onSdkReady, this);
     this.data.tim.on(TIM.EVENT.MESSAGE_RECEIVED, this.data.onSdkRecived, this);
     const sig = await getusersig.genTestUserSig(this.data.rtcConfig.userID, this.data.rtcConfig.sdkAppID, "f1ca85809aed35d82d8bb76612787e38dada5d0a6f233662777b42bdb7eb880b")
-    console.log(sig, "ppppppppppppppppppppp")
     let promise = this.data.tim.login({
       userID: this.data.rtcConfig.userID,
       userSig: sig.userSig
@@ -321,12 +454,12 @@ Page({
     })
   },
   onLoad(options) {
+    console.log(options, "99999");
     this.setData({
       roomIdandcourseId: options.id
     })
   },
   async onShow() {
-    // console.log("我onShow了")
     const sessionKey = await tools.checkSessionAndLogin();
     const information = await tools.request('/wx/student/selStudentSessionKeyEcho', {
       sessionKey

+ 10 - 3
pages/zbDetails/zbDetails.wxml

@@ -13,10 +13,17 @@
 				</scroll-view>
 			</view>
 			<view class="puthands_box">
-				<input class="weui-input" bindinput="bindKeyInput" placeholder="请输入您的问题" style="height:60rpx" placeholder-style="color:#000" value="{{inputValue}}" />
-				<view class="send" bindtap="sendMessage">发送</view>
-				<view class="send" bindtap="handsup">举手</view>
+				<input disabled='{{!talkStatus}}' class="weui-input" bindinput="bindKeyInput" placeholder="请输入您的问题" style="height:60rpx" placeholder-style="color:#000" value="{{inputValue}}" />
+				<view class="{{talkStatus?'send':'nosend'}}" bindtap="sendMessage">发送</view>
+				<view class="{{talkStatus?'send':'nosend'}}" bindtap="handsup">举手</view>
 			</view>
 		</view>
+		<view class="modol" wx:if="{{showmodal}}">
+			<image src="../../images/lmbj.png" class="lm"></image>
+			<view class="t1">老师向你发起连麦申请</view>
+			<view class="t2"><text class="t3">{{second}}</text>秒之后自动关闭</view>
+			<button class="t4" style="width:300rpx" bindtap="answer">接听</button>
+			<button class="t5" style="width:300rpx" bindtap="refuse">关闭</button>
+		</view>
 	</view>
 </view>

+ 73 - 9
pages/zbDetails/zbDetails.wxss

@@ -72,7 +72,19 @@ page {
   line-height: 60rpx;
   margin-left: 20rpx;
 }
-
+.nosend {
+  width: 90rpx;
+  height: 60rpx;
+  margin-top: 10rpx;
+  background-color: #666666;
+  border-radius: 20rpx;
+  float: left;
+  font-size: 25rpx;
+  color: #fff;
+  text-align: center;
+  line-height: 60rpx;
+  margin-left: 20rpx;
+}
 .push_box {
   width: 200rpx;
   height: 200rpx;
@@ -82,12 +94,64 @@ page {
   /* border: 1px solid red; */
   z-index: 99999;
 }
-
-/* .allpush_box {
-  width: 200rpx;
-  height: 200rpx;
+.modol{
+  width: 750rpx;
+  height: 100vh;
+  position: fixed;
+  top: 0;
+  background-color: rgba(0,0,0,0.3);
+  z-index: 100;
+}
+.lm{
+  width: 455rpx;
+  height: 563rpx;
   position: absolute;
-  left: 0;
-  bottom: -300rpx;
-  z-index: 99999;
-} */
+  top: 200rpx;
+  left: 150rpx;
+}
+.t1{
+  position: absolute;
+  top: 400rpx;
+  left: 230rpx;
+  color: #000;
+  font-size: 28rpx; 
+  font-weight: 900;
+}
+.t2{
+  position: absolute;
+  top: 450rpx;
+  left: 280rpx;
+  color: #999999;
+  font-size: 25rpx; 
+  font-weight: 900;
+}
+.t3{
+  color: #eb3f33;
+}
+.t4{
+  height: 67rpx;
+  /* margin-left: 95rpx; */
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #fff;
+  background: -webkit-linear-gradient(left, #d7301d, #f99c30);
+  /* margin-bottom: 20rpx; */
+  text-align: center;
+  /* margin-top: 100rpx; */
+  position: absolute;
+  top: 520rpx;
+  left: 230rpx;
+}
+.t5{
+  height: 67rpx;
+  border-radius: 40rpx;
+  font-size: 29rpx;
+  font-weight: 600;
+  color: #666666;
+  background: #e0e1e3;
+  text-align: center;
+  position: absolute;
+  top: 600rpx;
+  left: 230rpx;
+}

+ 2 - 2
utils/util.js

@@ -1,6 +1,6 @@
 const globalData = {
-  // publicUrl: 'https://sqdx.jiaxintech.com'//测试地址
-  publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
+  publicUrl: 'https://sqdx.jiaxintech.com'//测试地址
+  // publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
   // publicUrl:'http://10.16.10.139'//ly
   // publicUrl:'http://10.16.4.19:80'//hyb
   // publicUrl:'http://10.16.4.26:80'//zxq