ssfg 5 lat temu
rodzic
commit
08c3344f3b

+ 5 - 3
app.json

@@ -1,6 +1,8 @@
 {
   "pages": [
+    "pages/welcome/welcome",
     "pages/index/index",
+    "pages/onlineClass/onlineClass",
     "pages/dbDetails/dbDetails",
     "pages/dbVideo/dbVideo",
     "pages/zbDetails/zbDetails",
@@ -11,7 +13,7 @@
     "pages/exhibitionList/exhibitionList",
     "pages/startClass/startClass",
     "pages/demandCourses/demandCourses",
-    "pages/onlineClass/onlineClass",
+    
     "pages/personInfo/personInfo",
     "pages/testAnswer/testAnswer",
     "pages/myInteractionsDetais/myInteractionsDetais",
@@ -24,8 +26,8 @@
     "pages/studentRegistration/studentRegistration",
     "pages/grade/grade",
     "pages/answerAfterclass/answerAfterclass",
-    "pages/outpage/outpage",
-    "pages/welcome/welcome"
+    "pages/outpage/outpage"
+    
   ],
   "window": {
     "backgroundTextStyle": "light",

BIN
images/gift1.jpg


BIN
images/gift2.jpg


BIN
images/gift3.jpg


BIN
images/gift4.jpg


BIN
images/gift5.jpg


BIN
images/prize.png


BIN
images/scdj1.jpg


BIN
images/scdj2.jpg


BIN
images/scdj3.jpg


BIN
images/scdj4.jpg


BIN
images/zsbj.jpg


+ 69 - 3
pages/dbDetails/dbDetails.js

@@ -10,14 +10,59 @@ Page({
     playTimes: 0,
     id: 0,
     studyLog: {},
+    intervalTime: 0, //隔五分钟清空重新计时
     currentTime: 0,
-    startPlayTime: 0
+    startPlayTime: 0,
+    video_real_time: 0, //实时播放进度
+    initial_time: '', //视频跳转进度 秒
+    intervalCtx: null,
+    videoContext: null
   },
   videoErrorCallback: function (e) {
     console.log('视频错误信息:')
     console.log(e.detail.errMsg)
   },
   onReady: function () {},
+  // 计时
+  calculateTime() {
+    let _this = this;
+    this.setData({
+      intervalTime: _this.data.intervalTime + 5
+    })
+    if (_this.data.intervalTime > 300) {
+      _this.data.videoContext.pause()
+      this.setData({
+        intervalTime: 0
+      })
+      wx.showModal({
+        showCancel: false,
+        content: "您还在吗,请点击确定继续观看视频哦",
+        success(res) {
+          console.log(res, "22222222")
+          if (res.confirm) {
+            _this.data.videoContext.play()
+          }
+        }
+      })
+    }
+    console.log(_this.data.intervalTime, "我是正在加的数")
+  },
+  bindplay() {
+    this.setData({
+      videoContext: wx.createVideoContext('myVideo')
+    })
+    console.log("我点击开始了")
+    let _this = this;
+    _this.setData({
+      intervalCtx: setInterval(function () {
+        _this.calculateTime()
+      }, 5000)
+    })
+  },
+  bindpause() {
+    clearInterval(this.data.intervalCtx)
+    console.log(this.data.intervalTime, "我是暂停时加的所有数")
+  },
   getdbArr(sessionKey) {
     var _this = this;
     wx.request({
@@ -65,13 +110,34 @@ Page({
     })
   },
   timeUpdate: function (e) {
-    // console.log(this.data.studyLog)
+    // console.log(e.detail.duration,"我是视频总长")
     //实时播放进度 秒数
-    let currentTime = parseInt(e.detail.currentTime)
+    let _this = this;
+    let currentTime = parseInt(e.detail.currentTime) //当前播放秒数
     let studyTime = 'studyLog.studyTime'
     this.setData({
       [studyTime]: currentTime
     })
+    let aa = 1;
+    let duration = e.detail.duration
+    if (_this.data.video_real_time == 0) {
+      var jump_time = parseInt(_this.data.startPlayTime) + parseInt(_this.data.video_real_time)
+    } else {
+      var jump_time = parseInt(_this.data.video_real_time)
+    }
+    if (aa == 1) {
+      if (currentTime > jump_time && currentTime - jump_time > 3) {
+        _this.data.videoContextvideoContext.seek(_this.data.video_real_time)
+        wx.showToast({
+          title: '未完整看完该视频,不能快进',
+          icon: 'none',
+          duration: 2000,
+        })
+      }
+    }
+    _this.setData({
+      video_real_time: currentTime, //实时播放进度
+    })
   },
   chechEndStatus: function () {
     let _this = this;

+ 1 - 1
pages/dbDetails/dbDetails.wxml

@@ -1,5 +1,5 @@
 <view class="home">
-	<video id="myVideo" enable-auto-rotation="true" src="{{url}}" show-progress="{{false}}" initial-time="{{startPlayTime}}" binderror="videoErrorCallback" bindtimeupdate="timeUpdate" show-play-btn="ture" show-mute-btn="true" controls bindended="chechEndStatus">
+	<video id="myVideo" bindplay="bindplay" bindpause="bindpause" enable-auto-rotation="true" src="{{url}}" initial-time="{{startPlayTime}}" binderror="videoErrorCallback" bindtimeupdate="timeUpdate" show-play-btn="ture" show-mute-btn="true" controls bindended="chechEndStatus">
 	</video>
 	<view class="text_box">
 		<view class="title">{{title}}</view>

+ 1 - 1
pages/dbVideo/dbVideo.wxml

@@ -1,5 +1,5 @@
 <view class="home">
-	<video id="myVideo" src="{{url}}" binderror="videoErrorCallback" show-play-btn="ture" show-mute-btn="true" controls>
+	<video id="myVideo" enable-play-gesture="true" enable-progress-gesture="false" src="{{url}}" binderror="videoErrorCallback" show-play-btn="ture" show-mute-btn="true" controls>
 	</video>
 	<view class="text_box">
 		<view class="title">{{title}}</view>

+ 14 - 11
pages/demandCourses/demandCourses.wxml

@@ -1,16 +1,5 @@
 <view class="container">
 	<!-- <view class="video_box">
-		<view class="video" wx:for="{{lbArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx">
-			<image src='{{item.courseImg}}' mode='aspectFill' class="spbj"></image>
-			<view class="text1">{{item.courseName}}</view>
-			<view class="text2">
-				<image src='../../images/onlinenum.png' mode='aspectFill' class="onlinenumicon"></image>{{item.playTimes}}人看过
-			</view>
-			<view class="getinroom" bindtap="goIn" data-item="{{item}}">进入课堂
-			</view>
-		</view>
-	</view> -->
-	<view class="video_box">
 		<view class="video" wx:for="{{lbArr}}" wx:for-index="idx" wx:for-item="item" bindtap="turnDetails" id="{{idx}}" wx:key="idx" bindtap="goIn" data-item="{{item}}">
 			<image src='{{item.courseImg}}' mode='aspectFill' class="spbj"></image>
 			<view class="grayblock">
@@ -24,5 +13,19 @@
 	<view wx:if="{{showNull}}">
 		<image src='/images/nodata.png' mode='aspectFill' class="nodata"></image>
 		<view class="nodata_text">暂无数据</view>
+	</view> -->
+	<view class="class_box" wx:for="{{lbArr}}" wx:for-index="idx" wx:for-item="item">
+		<view bindtap="goIn" data-item="{{item}}">
+			<image src="{{item.courseImg}}" mode='aspectFill' class="scimg"></image>
+			<view class="sctext">
+				<view class="t1">{{item.courseName}}</view>
+				<view class="t3">时长:{{sfmArr[idx].courseTime}}</view>
+				<view class="t2">{{item.playTimes}}人看过</view>
+			</view>
+		</view>
+	</view>
+		<view wx:if="{{showNull}}">
+		<image src='/images/nodata.png' mode='aspectFill' class="nodata"></image>
+		<view class="nodata_text">暂无数据</view>
 	</view>
 </view>

+ 56 - 1
pages/demandCourses/demandCourses.wxss

@@ -2,7 +2,7 @@ page {
   background-color: #f2f2f2;
 }
 
-.video_box {
+/* .video_box {
   display: flex;
   width: 750rpx;
   flex-wrap: wrap;
@@ -64,4 +64,59 @@ page {
   left: 310rpx;
   font-size: 30rpx;
   color: #666666;
+} */
+.class_box {
+  width: 710rpx;
+  margin-left: 20rpx;
+  height: 220rpx;
+  /* border: 1px solid red; */
+  margin-top: 20rpx;
+  background-color: #fff;
+  border-radius: 5rpx;
+  box-shadow: inset;
+}
+.scimg {
+  width: 150rpx;
+  height: 141rpx;
+  float: left;
+  margin-top: 40rpx;
+  margin-left: 20rpx;
+  border-radius: 5rpx;
+}
+.sctext {
+  float: right;
+  height: 141rpx;
+  width: 510rpx;
+  margin-top: 20rpx;
+  font-size: 25rpx;
+  /* border: 1px solid red;   */
+}
+.t1 {
+  color: #eb3f33;
+  font-size: 28rpx;
+  margin-top: 10rpx;
+  font-weight: 700;
+}
+.t2 {
+  color: #999999;
+  font-size: 24rpx;
+  margin-top: 10rpx;
+}
+.t3 {
+  font-size: 24rpx;
+  margin-top: 10rpx;
+}
+.nodata {
+  position: absolute;
+  top: 285rpx;
+  left: 205rpx;
+  width: 340rpx;
+  height: 262rpx;
+}
+.nodata_text{
+  position: absolute;
+  top: 550rpx;
+  left: 310rpx;
+  font-size: 30rpx;
+  color: #666666;
 }

+ 1 - 1
pages/exhibitionList/exhibitionList.json

@@ -1,4 +1,4 @@
 {
-  "navigationBarTitleText":"我们的学院",
+  "navigationBarTitleText":"",
   "usingComponents": {}
 }

+ 2 - 2
pages/exhibitionList/exhibitionList.wxml

@@ -45,7 +45,7 @@
 				</view>
 			</view>
 		</van-tab>
-		<van-tab title="特色管理" title-style="font-size:25rpx">
+		<van-tab title="精细管理" title-style="font-size:25rpx">
 			<view class="xczs">
 				<view class="zb1" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
 					<image src='{{item.courseImg}}' mode='aspectFill' class="show1"></image>
@@ -53,7 +53,7 @@
 						<view class="show_text">{{item.courseName}}</view>
 						<view class="viedoxx">
 							<image src='/images/qb.png' mode='aspectFill' class="qb"></image>
-							<view style="color:#e82315;font-size:25rpx;font-weight:500;float:left">特色管理</view>
+							<view style="color:#e82315;font-size:25rpx;font-weight:500;float:left">精细管理</view>
 							<view style="color:#848585;font-size:22rpx;float:right;margin-right:20rpx">{{item.playTimes}}人看过</view>
 						</view>
 					</view>

+ 6 - 7
pages/index/index.js

@@ -23,13 +23,12 @@ Page({
     xczsArr: []
   },
   gomyClass(e) {
-
-    // console.log(e.currentTarget.dataset.item.isActive, "我是测试跳转的")
-    // if (e.currentTarget.dataset.item.isActive == 5) {
-    //   wx.switchTab({
-    //     url: '/pages/myClass/myClass',
-    //   })
-    // }
+    console.log(e.currentTarget.dataset.item.isActive, "我是测试跳转的")
+    if (e.currentTarget.dataset.item.isActive == 5) {
+      wx.switchTab({
+        url: '/pages/myClass/myClass',
+      })
+    }
   },
   // 即将开班
   gostartClass(e) {

+ 3 - 3
pages/index/index.wxml

@@ -1,5 +1,5 @@
 <view class="container">
-<!-- <web-view src="https://www.baidu.com/"></web-view> -->
+	<!-- <web-view src="https://www.baidu.com/"></web-view> -->
 	<!-- <image src='https://bkthnsz2.oss-cn-shenzhen.aliyuncs.com/20200629134722.gif' mode='aspectFill' style="width:750rpx;height:1334rpx" wx:if="{{kjShow}}"></image> -->
 	<!-- <live-pusher id="myLive" url="rtmp://live.spaceships.cn/wxedu/sntalk1?auth_key=1593483956-0-0-927e57bc397d22b01300f1b212e04da3" mode="RTC" autopush="true" enable-camera="true" style="width: 300px; height: 225px;border:1px solid red" /> -->
 	<view class="banner">
@@ -35,14 +35,14 @@
 			<text class="grid_text">{{item.name}}</text>
 		</van-grid-item>
 	</van-grid>
-		<view style="height:15rpx;width:750rpx;background-color:#F2F2F2"></view>
+	<view style="height:15rpx;width:750rpx;background-color:#F2F2F2"></view>
 	<!-- <view class="qy_title">
 		<view class="redk"></view>我们的学院
 		<view class="more" bindtap="xczsMore">查看全部 ></view>
 	</view> -->
 	<view class="xczs">
 		<view class="zb1" wx:for="{{xczsArr}}" wx:for-index="idx" wx:for-item="item" bindtap="turnDetails" id="{{idx}}" wx:key="idx">
-			<image src='{{item.img}}' mode='aspectFill' class="show1"></image>
+			<image src='{{item.img}}' mode="widthFix" class="show1"></image>
 			<view class="grayblock">
 				<view class="show_text">{{item.name}}</view>
 				<view class="viedoxx">

+ 1 - 1
pages/index/index.wxss

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

+ 30 - 24
pages/myClass/myClass.js

@@ -6,8 +6,9 @@ Page({
     show: false,
     SessionKey: "",
     notice: "暂无未读通知",
-    className: '',
-    logoImg: '',
+    // className: '',
+    // logoImg: '',
+    classInfo:{},
     kcArr: [],
     sfmArr: []
   },
@@ -143,24 +144,29 @@ Page({
   },
   // 跳转直播点播页面
   goStudy(e) {
-    let id = e.currentTarget.dataset.item.id
-    if (e.currentTarget.dataset.item.isLive == 1) {
-      if (e.currentTarget.dataset.item.isActive == 1) {
-        wx.navigateTo({
-          url: '../zbDetails/zbDetails?id=' + id
-        })
-      } else {
-        wx.showModal({
-          showCancel: false,
-          content: "直播还未开始哦",
-          success(res) {}
-        })
-      }
-    } else {
-      wx.navigateTo({
-        url: '../dbDetails/dbDetails?id=' + id
-      })
-    }
+    wx.showModal({
+      showCancel: false,
+      content: "您有未完成的学习课程,请先完成学习任务后再进行其他课程学习!",
+      success(res) {}
+    })
+    // let id = e.currentTarget.dataset.item.id
+    // if (e.currentTarget.dataset.item.isLive == 1) {
+    //   if (e.currentTarget.dataset.item.isActive == 1) {
+    //     wx.navigateTo({
+    //       url: '../zbDetails/zbDetails?id=' + id
+    //     })
+    //   } else {
+    //     wx.showModal({
+    //       showCancel: false,
+    //       content: "直播还未开始哦",
+    //       success(res) {}
+    //     })
+    //   }
+    // } else {
+    //   wx.navigateTo({
+    //     url: '../dbDetails/dbDetails?id=' + id
+    //   })
+    // }
   },
   // 查询我是否有班&&班级名字
   isClass(sessionKey) {
@@ -172,12 +178,12 @@ Page({
         sessionKey: sessionKey
       },
       success: function (res) {
-        console.log(res, "我是返回是否有班级")
+        console.log(res.data.data, "我是返回是否有班级")
         if (res.data.code == 0) {
           _this.setData({
-            className: res.data.data.clasName,
-            logoImg: res.data.data.logoImg
+            classInfo: res.data.data
           })
+          _this.isAgree(sessionKey);
         } else {
           wx.showModal({
             content: "您当前还没有开放的班级!",
@@ -205,7 +211,7 @@ Page({
         sessionKey: sessionKey
       },
       success: function (res) {
-        console.log(res.data, "wwwwww")
+        console.log(res, "wwwwww")
         if (res.data.data) {
           if (res.data.data.isAgree == 0) {
             _this.setData({

+ 5 - 5
pages/myClass/myClass.wxml

@@ -18,7 +18,7 @@
 		</van-row>
 	</view>
 	<van-divider contentPosition="center" customStyle="color: #eb3f33; border-color: #eb3f33; font-size: 30rpx;font-weight:900;position:relative">
-		<image src='{{logoImg}}' mode='aspectFill' class="banjihz"></image><text>{{className}}</text>
+		<image src='{{classInfo.logoImg}}' mode='aspectFill' class="banjihz"></image><text>{{classInfo.clasName}}</text>
 	</van-divider>
 	<view class="layout" bindtap="goWrite">
 		<image src='/images/xydj_bj.png' mode='aspectFill' class="bgimg1"></image>
@@ -27,7 +27,7 @@
 	</view>
 	<view class="{{!showMore? 'hiddenmore' : 'showmore'}}">
 		<view class="sp {{idx>2 ? 'none' : ''}}" wx:for="{{kcArr}}" wx:for-index="idx" wx:for-item="item">
-			<image src='{{item.courseImg}}' mode='aspectFill' class="spfm"></image>
+			<image src='{{item.courseImg}}' mode="widthFix" class="spfm"></image>
 			<image src='{{item.isDone==0||item.isDone==null?"/images/unfinish.png":"/images/finish.png"}}' mode='aspectFill' class="isfinish"></image>
 			<view class="sp_text">
 				<view class="fisrt_set">
@@ -69,7 +69,7 @@
 		<view class="layout_text3">去填写</view>
 	</view>
 	<view class="qy_title" bindtap="goMyPoints">
-		<view class="redk"></view>我的积分:0积分
+		<view class="redk"></view>我的积分:80积分
 		<view class="more">></view>
 	</view>
 	<view class="lq">
@@ -80,8 +80,8 @@
 		<view style="position:relative">
 			<!-- <image src='/images/ewm_closebtn.png' mode='aspectFill' class="ewm_close" bindtap="onClose1"></image> -->
 			<image src='/images/zsbj.jpg' mode='aspectFill' class="zsbj"></image>
-			<view class="byzc"> xxx,xxx 班期培训结束,成绩优异,兹授予结业证书,特此证明!</view>
-			<view class="zsdw_text">授予证书单位:XXXXXXXXXXXX</view>
+			<view class="byzc">李欣桐同志于2020年07月07日-2020年07月09日参加学习完成规定培训内容,准予结业,特发此证。</view>
+			<!-- <view class="zsdw_text">授予证书单位:XXXXXXXXXXXX</view> -->
 			<!--<view class="save_btn" bindtap="saveImg">保存二维码</view> -->
 		</view>
 		<!-- <image src='/images/close.png' mode='aspectFill' class="zscloseimg"></image> -->

+ 6 - 7
pages/myClass/myClass.wxss

@@ -124,7 +124,7 @@
 
 .spfm {
   width: 128rpx;
-  height: 128rpx;
+  height: auto;
   /* margin-top: 20rpx; */
   float: left;
   margin-top: 35rpx;
@@ -323,19 +323,18 @@
 }
 
 .zsbj {
-  width: 657rpx;
-  height: 891rpx;
+  width: 600rpx;
+  height: 830rpx;
 }
 
 .byzc {
-  width: 400rpx;
-  /* border: 1px solid red; */
+  width: 480rpx;
   font-size: 30rpx;
   color: #000;
   font-weight: 900;
   position: absolute;
-  top: 340rpx;
-  left: 130rpx;
+  top: 260rpx;
+  left: 60rpx;
   text-indent: 60rpx;
   letter-spacing: 5rpx;
   line-height: 70rpx;

+ 23 - 18
pages/myMission/myMission.js

@@ -74,24 +74,29 @@ Page({
   },
   // 跳转直播点播页面
   goStudy(e) {
-    let id = e.currentTarget.dataset.item.id
-    if (e.currentTarget.dataset.item.isLive == 1) {
-      if (e.currentTarget.dataset.item.isActive == 1) {
-        wx.navigateTo({
-          url: '../zbDetails/zbDetails?id=' + id
-        })
-      } else {
-        wx.showModal({
-          showCancel: false,
-          content: "直播还未开始哦",
-          success(res) {}
-        })
-      }
-    } else {
-      wx.navigateTo({
-        url: '../dbDetails/dbDetails?id=' + id
-      })
-    }
+    wx.showModal({
+      showCancel: false,
+      content: "您有未完成的学习课程,请先完成学习任务后再进行其他课程学习!",
+      success(res) {}
+    })
+    // let id = e.currentTarget.dataset.item.id
+    // if (e.currentTarget.dataset.item.isLive == 1) {
+    //   if (e.currentTarget.dataset.item.isActive == 1) {
+    //     wx.navigateTo({
+    //       url: '../zbDetails/zbDetails?id=' + id
+    //     })
+    //   } else {
+    //     wx.showModal({
+    //       showCancel: false,
+    //       content: "直播还未开始哦",
+    //       success(res) {}
+    //     })
+    //   }
+    // } else {
+    //   wx.navigateTo({
+    //     url: '../dbDetails/dbDetails?id=' + id
+    //   })
+    // }
   },
   getMycourse(sessionKey) {
     var _this = this;

+ 2 - 2
pages/myMission/myMission.wxml

@@ -67,8 +67,8 @@
 		<view style="position:relative">
 			<!-- <image src='/images/ewm_closebtn.png' mode='aspectFill' class="ewm_close" bindtap="onClose1"></image> -->
 			<image src='/images/zsbj.jpg' mode='aspectFill' class="zsbj"></image>
-			<view class="byzc"> xxx,xxx 班期培训结束,成绩优异,兹授予结业证书,特此证明!</view>
-			<view class="zsdw_text">授予证书单位:XXXXXXXXXXXX</view>
+			<view class="byzc">李欣桐同志于2020年07月07日-2020年07月09日参加学习完成规定培训内容,准予结业,特发此证。</view>
+			<!-- <view class="zsdw_text">授予证书单位:XXXXXXXXXXXX</view> -->
 			<!--<view class="save_btn" bindtap="saveImg">保存二维码</view> -->
 		</view>
 		<!-- <image src='/images/close.png' mode='aspectFill' class="zscloseimg"></image> -->

+ 10 - 10
pages/myMission/myMission.wxss

@@ -53,10 +53,10 @@
   font-size: 28rpx;
   color: #999999;
   /* margin-top: 20rpx; */
-  /* font-weight: 900; */
-  /* position: absolute; */
-  /* top: 140rpx; */
-  /* left: 200rpx; */
+  font-weight: 900;
+  position: absolute;
+  top: 170rpx;
+  left: 200rpx;
 }
 
 .save_btn {
@@ -288,19 +288,19 @@
 }
 
 .zsbj {
-  width: 657rpx;
-  height: 891rpx;
+  width: 600rpx;
+  height: 830rpx;
+  border-radius: 20rpx;
 }
 
 .byzc {
-  width: 400rpx;
-  /* border: 1px solid red; */
+  width: 480rpx;
   font-size: 30rpx;
   color: #000;
   font-weight: 900;
   position: absolute;
-  top: 340rpx;
-  left: 130rpx;
+  top: 260rpx;
+  left: 60rpx;
   text-indent: 60rpx;
   letter-spacing: 5rpx;
   line-height: 70rpx;

+ 34 - 16
pages/myPoints/myPoints.wxml

@@ -1,34 +1,52 @@
 <view class="container">
 	<view class="show_box">
 		<image src="/images/redcloud.png" mode='aspectFill' class="cloud_img"></image>
-		<view class="jfnum">0</view>
+		<view class="jfnum">80</view>
 		<view class="jftext">当前可用积分</view>
 	</view>
 	<view class="prize_box">
-		<image src="/images/prize.png" mode='aspectFill' class="prize_img"></image>
+		<image src="/images/gift1.jpg" mode='aspectFill' class="prize_img"></image>
 		<view class="prize_textbox">
-			<view class="text1">2020新款电脑</view>
-			<view class="text2">限量500份</view>
-			<view class="text3">0人已领</view>
-			<view><text class="text4">100积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
+			<view class="text1">定制马克杯</view>
+			<view class="text2">限量100份</view>
+			<!-- <view class="text3">0人已领</view> -->
+			<view><text class="text4">190积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
+		</view>
+	</view>
+	<view class="prize_box">
+		<image src="/images/gift2.jpg" mode='aspectFill' class="prize_img"></image>
+		<view class="prize_textbox">
+			<view class="text1">书籍(可选择)</view>
+			<view class="text2">限量50份</view>
+			<!-- <view class="text3">0人已领</view> -->
+			<view><text class="text4">225积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
+		</view>
+	</view>
+	<view class="prize_box">
+		<image src="/images/gift3.jpg" mode='aspectFill' class="prize_img"></image>
+		<view class="prize_textbox">
+			<view class="text1">定制书签</view>
+			<view class="text2">限量100份</view>
+			<!-- <view class="text3">0人已领</view> -->
+			<view><text class="text4">175积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
 		</view>
 	</view>
 		<view class="prize_box">
-		<image src="/images/prize.png" mode='aspectFill' class="prize_img"></image>
+		<image src="/images/gift4.jpg" mode='aspectFill' class="prize_img"></image>
 		<view class="prize_textbox">
-			<view class="text1">2020新款电脑</view>
-			<view class="text2">限量500份</view>
-			<view class="text3">0人已领</view>
-			<view><text class="text4">500积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
+			<view class="text1">定制雨伞</view>
+			<view class="text2">限量20份</view>
+			<!-- <view class="text3">0人已领</view> -->
+			<view><text class="text4">210积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
 		</view>
 	</view>
 		<view class="prize_box">
-		<image src="/images/prize.png" mode='aspectFill' class="prize_img"></image>
+		<image src="/images/gift5.jpg" mode='aspectFill' class="prize_img"></image>
 		<view class="prize_textbox">
-			<view class="text1">2020新款电脑</view>
-			<view class="text2">限量500份</view>
-			<view class="text3">0人已领</view>
-			<view><text class="text4">500积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
+			<view class="text1">定制钥匙扣</view>
+			<view class="text2">限量200份</view>
+			<!-- <view class="text3">0人已领</view> -->
+			<view><text class="text4">125积分</text><text class="text5" bindtap="dh">立即兑换</text></view>
 		</view>
 	</view>
 </view>

+ 12 - 9
pages/myPoints/myPoints.wxss

@@ -1,7 +1,8 @@
 .show_box{
   width: 100%;
-  height: 350rpx;
+  height: 300rpx;
   position: relative;
+  /* border: 1px solid red; */
 }
 .cloud_img {
   width: 100%;
@@ -27,14 +28,14 @@
   width: 90%;
   margin-left: 5%;
   margin-top: 30rpx;
-  height: 200rpx;
+  height: 260rpx;
   /* border: 1px solid red; */
   display: flex;
 }
 .prize_img{
-  width: 210rpx;
-  height: 123rpx;
-  margin-top: 40rpx;
+  width: 260rpx;
+  height: 260rpx;
+  /* margin-top: 40rpx; */
 }
 .prize_textbox{
   width: 430rpx;
@@ -43,6 +44,8 @@
 }
 .text1{
   font-size: 28rpx;
+  font-weight: 900;
+  margin-top: 30rpx;
 }
 .text2{
   font-size: 24rpx;
@@ -51,25 +54,25 @@
   text-align: center;
   border-radius: 10rpx;
   color: #f54029;
-  margin-top: 15rpx;
+  margin-top: 30rpx;
 }
 .text3{
   font-size: 25rpx;
   color: #cccccc;
-  margin-top: 15rpx;
+  margin-top: 30rpx;
 }
 .text4{
   color: #f54029;
   font-size: 36rpx;
   font-weight: 700;
-  margin-top: 15rpx;
+  margin-top: 30rpx;
   float: left;
 }
 .text5{
   color: #f54029;
   font-size: 26rpx;
   font-weight: 700;
-  margin-top: 15rpx;
+  margin-top: 30rpx;
   float: right;
   /* border: 1px solid red; */
   border-radius: 20rpx;

+ 2 - 2
pages/onlineClass/onlineClass.js

@@ -77,7 +77,7 @@ Page({
               console.log(res);
               var code = res.code
               wx.request({
-                url: app.globalData.publicUrl2 + '/wx/user/wx7e7a46e129d6cd0f/login',
+                url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
                 method: "get",
                 data: {
                   code
@@ -101,7 +101,7 @@ Page({
             console.log(res);
             var code = res.code
             wx.request({
-              url: app.globalData.publicUrl2 + '/wx/user/wx7e7a46e129d6cd0f/login',
+              url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
               method: "get",
               data: {
                 code

+ 15 - 7
pages/onlineClass/onlineClass.wxml

@@ -1,21 +1,29 @@
 <view class="container">
-	<view class="video_box">
+	<!-- <view class="video_box">
 		<view class="video" wx:for="{{zbArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx">
 			<view class="zbz">
 				<image src='../../images/online_icon.png' mode='aspectFill' class="onlineimg"></image>
 				<view class="onlinetext">{{item.isActive==1?"直播中":"待直播"}}</view>
-				<view class="onlinetext" wx:if='{{item.isActive==1}}'> {{item.playTimes}}人</view>
 				<view class="onlinetext" wx:if='{{item.isActive==-1}}'> 开始时间:{{item.courseStart}}</view>
 			</view>
 			<image src='{{item.courseImg}}' mode='aspectFill' class="spbj"></image>
 			<view class="text1">{{item.courseName}}</view>
-			<view class="text2">
-				<image src='../../images/onlinenum.png' mode='aspectFill' class="onlinenumicon"></image>{{item.playTimes}}人在线观看
-			</view>
-			<!-- <view class="text3">{{item.courseInfo}}</view> -->
 			<view class="{{item.isActive==1?'getinroom':'nogetinroom'}}"  bindtap="goIn" data-item="{{item}}">进入课堂
 			</view>
-
+		</view>
+	</view>
+	<view wx:if="{{showNull}}">
+		<image src='/images/nodata.png' mode='aspectFill' class="nodata"></image>
+		<view class="nodata_text">暂无数据</view>
+	</view> -->
+	<view class="class_box" wx:for="{{zbArr}}" wx:for-index="idx" wx:for-item="item">
+		<view bindtap="goIn" data-item="{{item}}">
+			<image src="{{item.courseImg}}" mode='aspectFill' class="scimg"></image>
+			<view class="sctext">
+				<view class="t1">{{item.courseName}}</view>
+				<view class="t3">状态:{{item.isActive==1?"直播中":"待直播"}}</view>
+				<view class="t2">开始时间:{{item.courseStart}}</view>
+			</view>
 		</view>
 	</view>
 	<view wx:if="{{showNull}}">

+ 57 - 3
pages/onlineClass/onlineClass.wxss

@@ -1,7 +1,7 @@
-page {
+ page {
   background-color: #f2f2f2;
 }
-.video_box {
+/*.video_box {
   display: flex;
   width: 750rpx;
   flex-wrap: wrap;
@@ -22,7 +22,6 @@ page {
 }
 .video {
   width: 340rpx;
-  /* height: 470rpx; */
   margin-left: 20rpx;
   position: relative;
   background-color: #fff;
@@ -125,4 +124,59 @@ text-overflow:ellipsis;
   margin-left: 95rpx;
   margin-top: 20rpx;
   margin-bottom: 20rpx;
+} */
+.class_box {
+  width: 710rpx;
+  margin-left: 20rpx;
+  height: 220rpx;
+  /* border: 1px solid red; */
+  margin-top: 20rpx;
+  background-color: #fff;
+  border-radius: 5rpx;
+  box-shadow: inset;
+}
+.scimg {
+  width: 150rpx;
+  height: 141rpx;
+  float: left;
+  margin-top: 40rpx;
+  margin-left: 20rpx;
+  border-radius: 5rpx;
+}
+.sctext {
+  float: right;
+  height: 141rpx;
+  width: 530rpx;
+  margin-top: 30rpx;
+  font-size: 25rpx;
+  /* border: 1px solid red;   */
+}
+.t1 {
+  color: #eb3f33;
+  font-size: 28rpx;
+  margin-top: 0rpx;
+  font-weight: 700;
+}
+.t2 {
+  color: #999999;
+  font-size: 24rpx;
+  margin-top: 10rpx;
+}
+.t3 {
+  font-size: 24rpx;
+  margin-top: 10rpx;
+}
+.nodata {
+  position: absolute;
+  top: 285rpx;
+  left: 205rpx;
+  width: 340rpx;
+  height: 262rpx;
+}
+.nodata_text{
+  position: absolute;
+  top: 550rpx;
+  left: 310rpx;
+  font-size: 30rpx;
+  color: #666666;
 }

+ 7 - 7
pages/testAnswer/testAnswer.js

@@ -5,24 +5,24 @@ Page({
   data: {
     dataArr:[
       {
-        "url": "/images/sc_img.png",
+        "url": "/images/scdj1.jpg",
         "name": "长春市社区工作者线上培训班",
         "zbdw": "李老师",
         "time": "2020年06月23日"
       },{
-        "url": "/images/sc_img.png",
+        "url": "/images/scdj2.jpg",
         "name": "长春市专职党务工作者线上培训班",
-        "zbdw": "老师",
+        "zbdw": "老师",
         "time": "2020年06月26日"
       },{
-        "url": "/images/sc_img.png",
+        "url": "/images/scdj4.jpg",
         "name": "区域党建联盟",
-        "zbdw": "老师",
+        "zbdw": "老师",
         "time": "2020年06月29日"
       },{
-        "url": "/images/sc_img.png",
+        "url": "/images/scdj3.jpg",
         "name": "小区党组织建设",
-        "zbdw": "老师",
+        "zbdw": "老师",
         "time": "2020年06月30日"
       }
     ]

+ 1 - 4
pages/welcome/welcome.js

@@ -1,13 +1,11 @@
 // pages/welcome/welcome.js
 Page({
-
   /**
    * 页面的初始数据
    */
   data: {
     kjShow: true
   },
-
   /**
    * 生命周期函数--监听页面加载
    */
@@ -16,9 +14,8 @@ Page({
       wx.switchTab({
         url: '/pages/index/index'
       })
-    }, 6000)
+    }, 4000)
   },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 1 - 1
pages/welcome/welcome.wxml

@@ -1,3 +1,3 @@
 <view>
-	<image src='https://bkthnsz2.oss-cn-shenzhen.aliyuncs.com/20200629134722.gif' mode='aspectFill' style="width:750rpx;height:1334rpx" wx:if="{{kjShow}}"></image>
+	<image src='https://bkthnsz2.oss-cn-shenzhen.aliyuncs.com/20200704143337.gif' mode='aspectFill' style="width:750rpx;height:1334rpx" wx:if="{{kjShow}}"></image>
 </view>

+ 60 - 14
pages/zbDetails/zbDetails.js

@@ -18,7 +18,10 @@ Page({
     livectx: "",
     spfx: "vertical",
     spfx1: "vertical",
-    isHands: false
+    isHands: false,
+    timeoutObj: null,
+    _timeout: 5000,
+    isCloseStatus: false
   },
   // startBf: function () {
   //   //pullUrl: `rtmp://hnb.spaceships.cn/education/live56?auth_key=1593654178-0-0-30f7fa190656ddb994151d23cf30d3b7`
@@ -61,7 +64,6 @@ Page({
       inputValue: ''
     })
   },
-
   fullScreen: function () {
     var that = this;
     //全屏
@@ -81,6 +83,14 @@ Page({
             spfx: "horizontal",
             spfx1: "horizontal"
           });
+          if (that.data.isHands == true) {
+            that.setData({
+              isHands: false
+            })
+            that.setData({
+              isHands: true
+            })
+          }
           console.log('我要全屏执行了');
         },
         fail: res => {
@@ -129,17 +139,20 @@ Page({
     var newSessionkey = encodeURIComponent(sessionKey);
     wx.connectSocket({
       url: app.globalData.publicSocketUrl + '/live/socket?sessionkey=' + newSessionkey + "&courseId=" + _this.data.id
-      // header:{
-      //   'content-type': 'application/json'
-      // },
-      // protocols: ['protocol1']
     })
     wx.onSocketOpen(function () {
       console.log("我连上啦")
       _this.setData({
         socketOpen: true
       })
-      // _this.sendSocketMessage(hsdushh);
+      // _this.data.timeoutObj = setInterval(() => {
+      //   _this.startHeart(sessionKey)
+      // }, _this.data._timeout)
+      _this.setData({
+        timeoutObj: setInterval(function () {
+          _this.startHeart(sessionKey)
+        }, _this.data._timeout)
+      })
     })
     wx.onSocketError(function () {
       console.log("我连接出错了")
@@ -150,6 +163,10 @@ Page({
     wx.onSocketMessage(function (data) {
       let res = JSON.parse(data.data);
       console.log(res)
+      if (res.msg == "HeartBeat") {
+        // clearInterval(_this.data.timeoutObj);
+        return false;
+      }
       if (res.messageType == "message" || res.messageType == "system") {
         _this.setData({
           chatContent: _this.data.chatContent.concat(res),
@@ -188,6 +205,7 @@ Page({
       }
     })
   },
+  // 发送消息
   sendSocketMessage(msg) {
     if (this.data.socketOpen) {
       wx.sendSocketMessage({
@@ -195,6 +213,29 @@ Page({
       })
     } else {}
   },
+  // 心跳
+  startHeart(sessionKey) {
+    let _this = this;
+    wx.sendSocketMessage({
+      data: "HeartBeat",
+      success(res) {
+        console.log(res, "发送心跳成功")
+      },
+      fail(err) {
+        console.log(err, "发送心跳失败")
+        if (_this.data.isCloseStatus == false) {
+          wx.closeSocket();
+          clearInterval(_this.data.timeoutObj);
+          _this.socketConnect(sessionKey);
+        } else {
+          clearInterval(_this.data.timeoutObj);
+        }
+      }
+    })
+  },
+  // clearDs() {
+  //   clearInterval(this.data.timeoutObj);
+  // },
   onShow() {
     let _this = this;
     wx.checkSession({
@@ -208,7 +249,7 @@ Page({
               console.log(res);
               var code = res.code
               wx.request({
-                url: app.globalData.publicUrl2 + '/wx/user/wx7e7a46e129d6cd0f/login',
+                url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
                 method: "get",
                 data: {
                   code
@@ -232,7 +273,7 @@ Page({
             console.log(res);
             var code = res.code
             wx.request({
-              url: app.globalData.publicUrl2 + '/wx/user/wx7e7a46e129d6cd0f/login',
+              url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
               method: "get",
               data: {
                 code
@@ -249,18 +290,23 @@ Page({
     })
   },
   onHide() {
+    this.setData({
+      isCloseStatus: true
+    })
     if (this.data.socketOpen) {
       wx.closeSocket()
     }
+    clearInterval(this.data.timeoutObj);
   },
   onUnload() {
+    this.setData({
+      isCloseStatus: true
+    })
     if (this.data.socketOpen) {
       wx.closeSocket()
     }
+    clearInterval(this.data.timeoutObj);
   },
-  // onReady() {
-
-  // },
   onLoad: function (options) {
     var _this = this;
     _this.setData({
@@ -279,7 +325,7 @@ Page({
               console.log(res);
               var code = res.code
               wx.request({
-                url: app.globalData.publicUrl2 + '/wx/user/wx7e7a46e129d6cd0f/login',
+                url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
                 method: "get",
                 data: {
                   code
@@ -306,7 +352,7 @@ Page({
             console.log(res);
             var code = res.code
             wx.request({
-              url: app.globalData.publicUrl2 + '/wx/user/wx7e7a46e129d6cd0f/login',
+              url: app.globalData.publicUrl + '/wx/user/wx7e7a46e129d6cd0f/login',
               method: "get",
               data: {
                 code

+ 11 - 8
pages/zbDetails/zbDetails.wxml

@@ -1,18 +1,20 @@
 <view class="home">
-	<view style="width:100%;height:500rpx;">
+	<view class="big_box">
 		<live-player src="{{url}}" id="livectx" orientation="{{spfx}}" mode="live" autoplay bindstatechange="statechange" binderror="error" controls style="width:100%;height:100%">
-			<!-- <cover-view class="exit-full-img">
+			<cover-view class="exit-full-img">
 				<cover-view wx:if="{{fullScreenFlag}}" bindtap="fullScreen">
 					<button plain="false" style="color:#fff">退出全屏</button>
 				</cover-view>
 				<cover-view wx:else bindtap="fullScreen">
 					<button plain="false" style="color:#fff">全屏</button>
 				</cover-view>
-			</cover-view> -->
+			</cover-view>
 		</live-player>
-		<view class="{{fullScreenFlag==false?'push_box':'push_box'}}" wx:if="{{isHands}}">
-			<live-pusher orientation="{{spfx1}}" id="video-livePusher" mirror="false" mode="RTC" autopush url="{{pushUrl}}" bindstatechange="statechange" style="width:100%;height:100%"></live-pusher>
-		</view>
+		<cover-view>
+			<view class="{{fullScreenFlag==false?'push_box':'allpush_box'}}" wx:if="{{isHands}}">
+				<live-pusher orientation="{{spfx1}}" id="video-livePusher" mirror="false" mode="RTC" autopush url="{{pushUrl}}" bindstatechange="statechange" style="width:100%;height:100%"></live-pusher>
+			</view>
+		</cover-view>
 	</view>
 	<view class="text_box">
 		<view class="title">{{title}}</view>
@@ -32,9 +34,10 @@
 	<view class="puthands_box">
 		<view bindtap="hands">
 			<image src='/images/puthands.png' mode='aspectFill' class="handimg"></image>
-			<view style="font-size:30rpx;color:#eb3f33;float:left;line-height:60rpx;margin-right:20rpx">举手</view>
+			<view style="font-size:35rpx;font-weight:900;color:#eb3f33;float:left;line-height:80rpx;margin-right:20rpx">举手</view>
 		</view>
-		<input class="weui-input" bindinput="bindKeyInput" placeholder="请输入的问题" style="height:60rpx" value="{{inputValue}}" />
+		<input class="weui-input" bindinput="bindKeyInput" placeholder="请输入的问题" style="height:60rpx" value="{{inputValue}}" />
 		<view class="send" bindtap="submit">发送</view>
+		<!-- <view class="send" bindtap="clearDs">清除定时器</view> -->
 	</view>
 </view>

+ 25 - 10
pages/zbDetails/zbDetails.wxss

@@ -1,12 +1,25 @@
-.home {
+/* .home {
   width: 100%;
+} */
+page {
+  background-color: #f2f2f2;
+}
+.big_box {
+  width: 750rpx;
+  height: 500rpx;
   /* border: 1px solid red; */
 }
+/* 
+.allbig_box {
+  width: 100%;
+  height: 100vh;
+  border: 1px solid yellow;
+} */
 
 .text_box {
   width: 90%;
   margin-left: 5%;
-  border-bottom: 1px solid #dbdbdb;
+  border-bottom: 1px solid #fff;
 }
 
 .title {
@@ -37,7 +50,7 @@
   margin-top: 20rpx;
   width: 680rpx;
   height: 400rpx;
-  background-color: #f4f4f4;
+  background-color: #fff;
   /* border: 1px solid red; */
   margin-left: 35rpx;
   border-radius: 20rpx;
@@ -49,7 +62,7 @@
 
 .puthands_box {
   margin-top: 20rpx;
-  margin-bottom: 50rpx;
+  padding-bottom: 100rpx;
   margin-left: 35rpx;
   width: 680rpx;
   height: 60rpx;
@@ -58,20 +71,22 @@
 
 .chat_text {
   margin-bottom: 10rpx;
+  font-size: 30rpx;
+  font-weight: 900;
 }
 
 .handimg {
-  width: 60rpx;
-  height: 60rpx;
+  width: 70rpx;
+  height: 70rpx;
   float: left;
 }
 
 .weui-input {
-  /* border: 1px solid red; */
-  width: 400rpx;
+  border: 1px solid red;
+  width: 380rpx;
   height: 40rpx;
   margin-top: 10rpx;
-  background-color: #f4f4f4;
+  background-color: #fff;
   border-radius: 20rpx;
   text-indent: 20rpx;
   font-size: 25rpx;
@@ -108,7 +123,7 @@
   height: 200rpx;
   position: absolute;
   left: 0;
-  bottom: 0;
+  bottom: -300rpx;
   /* border: 1px solid red; */
   z-index: 99999;
 }

+ 4 - 4
utils/util.js

@@ -2,11 +2,11 @@ const globalData = {
   publicUrl: 'https://sqdx.windd.cn',
   publicUrl2: 'https://sqdx.windd.cn',
   publicUrl3: 'https://sqdx.windd.cn',
-  publicSocketUrl: 'wss://sqdx.windd.cn',
-  // publicSocketUrl: 'ws://10.16.10.139:8090',
+  publicSocketUrl: 'wss://sqdx.windd.cn'
   // publicUrl: 'http://10.16.10.139:8090', //luyu
-  // publicUrl2: 'http://10.16.4.19:8090', //huyubo
-  // publicUrl3: 'http://10.16.4.22:8090' //zxq
+  // publicUrl2: 'http://10.16.10.139:8090', //huyubo
+  // publicUrl3: 'http://10.16.10.139:8090', //zxq
+  // publicSocketUrl: 'ws://10.16.10.139:8090'
 };
 module.exports = {
   globalData: globalData,