Ver Fonte

fix 首页已读图标修复,直播聊天窗口兼容修复

tiedan há 4 anos atrás
pai
commit
b570d8f201

+ 3 - 1
app.json

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

Diff do ficheiro suprimidas por serem muito extensas
+ 60 - 2
components/trtc-room/template/1v1/1v1.wxml


+ 1 - 1
components/trtc-room/trtc-room.js

@@ -1672,7 +1672,7 @@ Component({
       this._emitter.emit(EVENT.VIDEO_FULLSCREEN_UPDATE, event)
     },
     _playerNetStatus(event) {
-      console.log(TAG_NAME, 'player变化了', event)
+     // console.log(TAG_NAME, 'player变化了', event)
       // 获取player 视频的宽高
       const stream = this.userController.getStream({
         userID: event.currentTarget.dataset.userid,

+ 7 - 7
pages/index/index.js

@@ -41,10 +41,10 @@ Page({
     noticeVis:false,
     vType:["理论阵地","我的学院","特色课程","特色管理"],
     index_tf:[
-      {title:"在线直播",img:app.globalData.imgUrl+"/images/index_icon_video.png",to:"/pages/onlineClass/onlineClass"},
-      {title:"在线录播",img:app.globalData.imgUrl+"/images/index_icon_rec.png",to:"/pages/demandCourses/demandCourses"},
-      {title:"互动答疑",img:app.globalData.imgUrl+"/images/index_icon_dialog.png",to:"/pages/myInteractions/myInteractions"},
-      {title:"测试答卷",img:app.globalData.imgUrl+"/images/index_icon_test.png",to:"/pages/testAnswer/testAnswer"},
+      {title:"在线直播",img:app.globalData.imgUrl+"/images/index_icon_video.png",to:"/pages/onlineClass/onlineClass",isread: true},
+      {title:"在线录播",img:app.globalData.imgUrl+"/images/index_icon_rec.png",to:"/pages/demandCourses/demandCourses",isread: true},
+      {title:"互动答疑",img:app.globalData.imgUrl+"/images/index_icon_dialog.png",to:"/pages/myInteractions/myInteractions",isread: true},
+      {title:"测试答卷",img:app.globalData.imgUrl+"/images/index_icon_test.png",to:"/pages/testAnswer/testAnswer",isread: true},
   ]
   },
   // 轮播点击去上课跳转到我的班级
@@ -196,8 +196,8 @@ Page({
   },
   // 第一个小红点
   getRedPoint1(sessionKey) {
-    let completeStatus1 = `gridArr[${0}].isread`;
-    let completeStatus2 = `gridArr[${1}].isread`;
+    let completeStatus1 = `index_tf[${0}].isread`;
+    let completeStatus2 = `index_tf[${1}].isread`;
     wx.request({
       url: app.globalData.publicUrl + '/wx/course/undoneLogo',
       method: "post",
@@ -220,7 +220,7 @@ Page({
   },
   // 第四个小红点
   getRedPoint4(sessionKey) {
-    let completeStatus = `gridArr[${3}].isread`;
+    let completeStatus = `index_tf[${3}].isread`;
     wx.request({
       url: app.globalData.publicUrl + '/wx/exam/list',
       method: "post",

+ 2 - 0
pages/index/index.wxml

@@ -42,6 +42,8 @@
 		<view wx:for="{{index_tf}}" class="index_tf_block" bindtap="goGrid" wx:key="index" data-id="{{index}}">
 			<van-image width="100rpx" height="100rpx" fit="contain" src="{{item.img}}" />
 			<view class="index_tf_title">{{item.title}}</view>
+			<view wx:if='{{item.isread==false}}' class="index_tf_dot"></view>
+		
 		</view>
 	</view>
 	<!-- <view style="height:15rpx;width:750rpx;background-color:#F2F2F2"></view>

+ 11 - 0
pages/index/index.wxss

@@ -288,10 +288,21 @@ padding:0rpx 30rpx 30rpx 30rpx;
   flex-flow: column nowrap;
   align-items: center;
   justify-content: center;
+  position: relative;
 }
 .index_tf_title{
   font-size: 28rpx;
   color: #666666;
   text-align: center;
   height:40rpx;
+}
+.index_tf_dot{
+  width:10rpx;
+  height:10rpx;
+  background-color:red;
+  border-radius:30rpx;
+  border:1rpx solid red;
+  position:absolute;
+  top:10rpx;
+  right:15rpx;
 }

+ 4 - 3
pages/zbDetails/zbDetails.wxml

@@ -2,11 +2,12 @@
 	<view class="big_box">
 		<trtc-room id="trtcroom" config="{{rtcConfig}}" scene="live" bind:myevent='refuse' bind:myevent1='answer'></trtc-room>
 		<view class="area">
+		
 			<view class="chatbox">
-				<scroll-view scroll-y="true" style="height: 490rpx;width:690rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{bottom}}" scroll-top="{{scrollTop}}">
+				<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">
 						<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>
+							<view style="color:rgba(102,102,102);font-size:25rpx">{{item.currentTime}}</view>
 							<text style="color:#eb3f33">{{item.nick}} : </text>{{item.payload.text}}
 							<!-- <text style="color:#eb3f33;">{{item.nick}}:</text>{{item.payload.text}} -->
 							<!--    <text style="color:#eb3f33;"> {{item.nick}} : </text> <text style="font-weight:500;"> {{item.payload.text}} </text> -->
@@ -16,7 +17,7 @@
 				</scroll-view>
 			</view>
 			<view class="puthands_box">
-				<input disabled='{{!talkStatus}}' class="weui-input" bindinput="bindKeyInput" placeholder="请输入您的问题" style="height:60rpx" placeholder-style="color:#000" value="{{inputValue}}" />
+				<input disabled='{{!talkStatus}}' placeholder-class="input_placeholder" bindinput="bindKeyInput" placeholder="说点什么吧~" class="chat_input_class"  value="{{inputValue}}" />
 				<view class="{{talkStatus?'send':'nosend'}}" bindtap="sendMessage">发送</view>
 				<view class="{{talkStatus?'send':'nosend'}}" bindtap="handsup">举手</view>
 			</view>

+ 49 - 24
pages/zbDetails/zbDetails.wxss

@@ -6,39 +6,47 @@ page {
   height: 100vh;
 }
 .area {
-  width: 700rpx;
-  height: 600rpx;
+  width: 750rpx;
+  height: calc(100vh - 500rpx);
+  background-color: #695e5e;
   /* background-color: rgba(0,0,0,0.1); */
   /* border:1px solid red; */
-  position: absolute;
-  top: 550rpx;
-  left: 25rpx;
-  border-radius: 20rpx;
+  position: fixed;
+  bottom: 0;
   z-index: 99;
 }
 .chatbox {
-  width: 700rpx;
-  height: 500rpx;
+  width: 750rpx;
+  height:calc(100vh - 620rpx);
   /* border-radius: 20rpx; */
   overflow-y: auto;
   font-size: 25rpx;
-  position: absolute;
-  top:0rpx;
+  background-color: #f8f8f8;
   /* border: 1px solid red; */
-  border-top: 1px solid rgba(219,219,219);
-  border-bottom: 1px solid rgba(219,219,219); 
+ 
+ box-sizing: border-box;
+
 }
 .puthands_box {
-  width: 700rpx;
-  height: 80rpx;
-  position: absolute;
+  width: 750rpx;
+  height: 120rpx;
+  position: fixed;
   bottom: 0rpx;
+  background-color: #eeeeee;
+  display: flex;
+  flex-flow: row wrap;
+  justify-content: space-between;
+  align-items: center;
+  box-sizing: border-box;
+  padding: 0 30rpx;
+  border-top: 1rpx solid #eeeeee;
 }
 
 .chat_text {
   font-size: 30rpx;
-  font-weight: 900;
+  font-weight:normal;
   color: #000;
+  padding-bottom:30rpx;
 }
 
 .handimg {
@@ -64,28 +72,28 @@ page {
 .send {
   width: 90rpx;
   height: 60rpx;
-  margin-top: 10rpx;
+
   background-color: #eb3f33;
-  border-radius: 20rpx;
-  float: left;
+  border-radius: 30rpx;
+ 
   font-size: 25rpx;
   color: #fff;
   text-align: center;
   line-height: 60rpx;
-  margin-left: 20rpx;
+
 }
 .nosend {
   width: 90rpx;
   height: 60rpx;
-  margin-top: 10rpx;
+
   background-color: #666666;
-  border-radius: 20rpx;
-  float: left;
+  border-radius: 30rpx;
+
   font-size: 25rpx;
   color: #fff;
   text-align: center;
   line-height: 60rpx;
-  margin-left: 20rpx;
+ 
 }
 .push_box {
   width: 200rpx;
@@ -95,6 +103,7 @@ page {
   top: 300rpx;
   /* border: 1px solid red; */
   z-index: 99999;
+  
 }
 .modol{
   width: 750rpx;
@@ -153,4 +162,20 @@ page {
   position: absolute;
   top: 600rpx;
   left: 230rpx;
+}
+
+.input_placeholder{
+  color: #cccccc;
+  height:80rpx;
+  
+}
+.chat_input_class{
+  width:450rpx;
+  background-color: #ffffff;
+  color:#333333;
+  height: 60rpx;
+  
+  border-radius: 30rpx;
+  padding:0rpx 10rpx;
+
 }

+ 2 - 2
project.config.json

@@ -20,7 +20,7 @@
     "checkSiteMap": true,
     "uploadWithSourceMap": true,
     "useMultiFrameRuntime": false,
-    "useApiHook": false,
+    "useApiHook": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
@@ -33,7 +33,7 @@
     "packNpmRelationList": []
   },
   "compileType": "miniprogram",
-  "libVersion": "2.11.2",
+  "libVersion": "2.13.1",
   "appid": "wx7e7a46e129d6cd0f",
   "projectname": "demo1",
   "debugOptions": {