1
0

3 Ревизии ec98beff0d ... b78ab25ba3

Автор SHA1 Съобщение Дата
  tiedan b78ab25ba3 fix 测试地址不小心改动了一下 преди 4 години
  tiedan cd3b9497ce feature 我的任务增加折叠按钮 преди 4 години
  tiedan 5eaa707034 fix 修复直播切回看不到的问题 преди 4 години

+ 4 - 1
app.json

@@ -1,9 +1,12 @@
 {
   "pages": [
-  
     "pages/index/index",
     "pages/welcome/welcome",
     
+  
+
+    
+    
     
     
     "pages/myClass/myClass",

+ 1 - 0
components/trtc-room/controller/user-controller.js

@@ -345,6 +345,7 @@ class UserController {
     this.streamList = []
     this.userList = []
     this.userMap.clear()
+    
     return {
       userList: this.userList,
       streamList: this.streamList,

+ 11 - 5
components/trtc-room/model/pusher.js

@@ -20,13 +20,19 @@ class Pusher {
   reset() {
     console.log('Pusher reset', this.pusherContext)
     if (this.pusherContext) {
-      console.log('Pusher pusherContext.stop()')
-      this.pusherContext.stop()
+      // 2020/09/23 安卓端华为小米机型发现,安卓原生返回键,退房失败。
+      // 会触发detached生命周期,调用到该方法,puhserContext.stop()调用不成功,但是清空url后,客户端调用的退房方法就会不生效
+      // 这里做出改动,只有stop调用成功后,才会清空url,保持组件卸载流程的完整性,调用不成功的情况将由微信客户端兜底清除
+      this.pusherContext.stop({
+        success: () => {
+          console.log('Pusher pusherContext.stop()')
+          Object.assign(this, DEFAULT_PUSHER_CONFIG, {
+            isVisible: true,
+          })
+        },
+      })
       this.pusherContext = null
     }
-    Object.assign(this, DEFAULT_PUSHER_CONFIG, {
-      isVisible: true,
-    })
   }
 }
 export default Pusher

+ 6 - 0
pages/myMission/myMission.js

@@ -42,6 +42,12 @@ Page({
     currentId: null,
     currentName: "",
     tva:32,
+    fold:true,
+  },
+  showmore(){
+    this.setData({
+      fold:this.data.fold?false:true
+    })
   },
   // 检查第一个任务 班级二维码是否点击 && 检查第二个任务 学员登记表  &&   第六个任务 领取结业证
   checkTaskList(sessionKey) {

+ 5 - 2
pages/myMission/myMission.wxml

@@ -66,9 +66,9 @@
 			<view class="layout_text2" wx:else>去填写</view>
 		</view>
 	</view>
-	<view class="step">
+	<view class="step" style="padding-bottom:20rpx;">
 		<image src='{{istask3==false?"/images/step_unfinish.png":"/images/step_finish.png"}}' mode='aspectFill' class="finish_img"></image>
-		<view class="sp_bigbox">
+		<view class="sp_bigbox {{fold?'sp_bigbox_fold':''}}">
 			<view class="sp" wx:for="{{kcArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx">
 				<image src='{{item.isDone==0||item.isDone==null?"/images/unfinish.png":"/images/finish.png"}}' mode='aspectFill' class="isfinish"></image>
 				<view class="sp_text">
@@ -90,6 +90,9 @@
 			</view>
 		</view>
 	</view>
+	<view class="step">
+		<view class="sp_showmore" bindtap="showmore">{{fold?'展开所有课程':'折叠课程'}}<van-icon name="arrow-down" wx:if="{{fold}}" /><van-icon wx:if="{{!fold}}" name="arrow-up" /></view>
+	</view>
 	<view class="step" bindtap="goQmks">
 		<image src='{{istask4==false?"/images/step_unfinish.png":"/images/step_finish.png"}}' mode='aspectFill' class="finish_img"></image>
 		<image src='/images/finallytest.png' mode='aspectFill' class="bgimg1 layout"></image>

+ 21 - 4
pages/myMission/myMission.wxss

@@ -1,3 +1,19 @@
+.sp_showmore{
+
+height:74rpx;
+box-shadow: #f2f2f2 0px 0px 15rpx;
+text-align: center;
+
+font-size: 28rpx;
+font-weight: normal;
+width: 620rpx;
+display: flex;
+justify-content: center;
+align-items: center;
+
+  margin-left: 50rpx;
+  color: #999999;
+}
 .nr_box {
   width: 670rpx;
   height: 90vh;
@@ -304,15 +320,16 @@
 
 .sp_bigbox {
   width: 620rpx;
-  height: 590rpx;
-  overflow-y: auto;
+  position: relative;
   margin-left: 50rpx;
-  overflow-y: auto;
   overflow-x: hidden;
   background-color: #fff;
   box-shadow: #f2f2f2 0px 0px 15rpx;
 }
-
+.sp_bigbox_fold{
+  height: 590rpx;
+  overflow-y: auto;
+}
 .sp_bigbox::-webkit-scrollbar {
   background-color: #e5e5e5;
   width: 8rpx;

+ 34 - 2
pages/zbDetails/zbDetails.js

@@ -5,6 +5,7 @@ const COS = require('../../utils/cos-wx-v5.js');
 const util = require('../../utils/util.js');
 Page({
   data: {
+    scrollTop:0,
     rtcConfig: {
       sdkAppID: 1400404379, // 必要参数 开通实时音视频服务创建应用后分配的 sdkAppID
       userID: '', // 必要参数 用户 ID 可以由您的帐号系统指定
@@ -126,6 +127,7 @@ Page({
           //   currentTime: currentTime
           // })
           console.log(chatContent, "我是收到消息的数组")
+         // _this.toViewBottomFun();
           _this.setData({
             chatContent: chatContent,
             bottom: 'scrollBottom'
@@ -490,7 +492,7 @@ Page({
 
 
 
-
+    
 
     this.trtcRoomContext.enterRoom({
       roomID: Number(this.data.roomIdandcourseId) //课程id
@@ -504,7 +506,19 @@ Page({
   //   })
   //   console.log(this.data.roomIdandcourseId)
   // },
-
+  toViewBottomFun: function() {
+    // 设置屏幕自动滚动到最后一条消息处
+    let that = this;
+    wx.createSelectorQuery().select('#chatcon').boundingClientRect(function(rect) {
+      wx.pageScrollTo({
+        scrollTop: rect.height,
+        duration: 100 // 滑动速度
+      })
+      that.setData({
+        scrollTop: rect.height - that.data.scrollTop+100
+      });
+    }).exec();
+  },
   async onShow() {
     let pages = getCurrentPages();
     let currentPage = pages[pages.length - 1];
@@ -608,6 +622,24 @@ Page({
     console.log("zbdetail-onUnload")
     this.trtcRoomContext.unpublishLocalVideo();
     this.trtcRoomContext.unpublishLocalAudio();
+   
+
+    this.trtcRoomContext.unsubscribeRemoteAudio({
+      userID: "0"
+    }).then(() => {
+      console.log("音频取消订阅")
+    })
+
+    // this.trtcRoomContext.unsubscribeRemoteVideo({
+    //   userID: "0"
+    // }).then(() => {
+    //   console.log("视频取消订阅")
+    // })
+
+   
     this.offTim();
+
+
+    
   }
 })

+ 3 - 3
pages/zbDetails/zbDetails.wxml

@@ -4,8 +4,8 @@
 		<view class="area">
 		
 			<view class="chatbox">
-				<scroll-view scroll-y="true" style="width:100%;height:100%" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{bottom}}" scroll-top="{{scrollTop}}">
-					<view style="padding:30rpx">
+				<scroll-view scroll-y="true" style="width:100%;height:100%" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{bottom}}" >
+					<view style="padding:30rpx" id="chatcon">
 						<view wx:for="{{chatContent}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" class="chat_text">
 							<view style="color:rgba(102,102,102);font-size:25rpx">{{item.currentTime}}</view>
 							<text style="color:#eb3f33">{{item.nick}} : </text>{{item.payload.text}}
@@ -13,7 +13,7 @@
 							<!--    <text style="color:#eb3f33;"> {{item.nick}} : </text> <text style="font-weight:500;"> {{item.payload.text}} </text> -->
 						</view>
 					</view>
-					<view id="scrollBottom" style="height:10rpx"></view>
+					<view id="scrollBottom" style="height:100rpx"></view>
 				</scroll-view>
 			</view>
 			<view class="puthands_box">

+ 0 - 5
project.config.json

@@ -44,15 +44,12 @@
   "simulatorPluginLibVersion": {},
   "condition": {
     "search": {
-      "current": -1,
       "list": []
     },
     "conversation": {
-      "current": -1,
       "list": []
     },
     "plugin": {
-      "current": -1,
       "list": []
     },
     "game": {
@@ -60,11 +57,9 @@
       "list": []
     },
     "gamePlugin": {
-      "current": -1,
       "list": []
     },
     "miniprogram": {
-      "current": -1,
       "list": [
         {
           "id": -1,

+ 3 - 3
utils/util.js

@@ -1,9 +1,9 @@
 const globalData = {
-  version:'3.1.5',
+  version:'3.2.0',
 
   imgUrl:'https://edu-mp-img-1254259530.cos.ap-nanjing.myqcloud.com',
-  //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