Browse Source

bugfix: live

able99 4 years ago
parent
commit
0482aec083
2 changed files with 9 additions and 8 deletions
  1. 8 7
      jhlive/jhlive.nvue
  2. 1 1
      pagesGood/pickVideo.nvue

+ 8 - 7
jhlive/jhlive.nvue

@@ -13,15 +13,15 @@
 		</view>
 		<view class="bottom-message">
 			<!-- 对话信息 -->
-			<view class="jhim-message-box">
+			<view v-if="showIm" class="jhim-message-box">
 			  <view class="jhim-message" v-for="(item, index) in imMsgs.slice(0,5)" :key="index">
 				<text class="jhim-message-text" style="color: #C8C8C8;">{{item.name}}:</text>
 				<text class="jhim-message-text">{{item.text}}</text>
 			  </view>
 			</view>
 			<!-- 下方功能 -->
-			<view v-if="showIm" class="bottom-box">
-				<view v-if="!imStatus" class="jhim-input-box">
+			<view v-if="showIm||btns.length" class="bottom-box">
+				<view v-if="showIm&&!imStatus" class="jhim-input-box">
 				  <image class="jhim-icon" :src="inputIcon"/>
 				  <input 
 					class="jhim-input"
@@ -30,7 +30,8 @@
 					v-model="imInput"
 					confirm-type="send" @confirm="$emit('onImSend', imInput)" />
 				</view>
-				<view v-else class="jhim-logining"><text class="jhim-logining-text">{{imStatus}}</text></view>
+				<view v-if="showIm&&imStatus" class="jhim-logining"><text class="jhim-logining-text">{{imStatus}}</text></view>
+				<view v-if="!showIm" class="jhim-logining"></view>
 				<!-- 按钮 -->
 				<view class="bottom-box-btns">
 					<!-- <view class="" v-if="isAuthor && showBeauty" @click="btnBeautify"> -->
@@ -47,7 +48,7 @@
 						<image class="btns-icon" :src="item.picture"/>
 						<text v-if="item.title" class="btns-text">{{item.title}}</text>
 					</view>
-					<view v-if="isAuthor&&showLike" class="bottom-box-btns-arr" @click="btnLike">
+					<view v-if="showLike" class="bottom-box-btns-arr" @click="btnLike">
 						<image class="btns-icon" :src="likeIcon"/>
 					</view>
 				</view>
@@ -115,10 +116,10 @@
 				type: String
 			}
 		},
-		onLoad() {
+		mounted() {
 			this.init();
 		},
-		onUnload() {
+		unmounted() {
 			this.destroy();
 		},
 		methods: {

+ 1 - 1
pagesGood/pickVideo.nvue

@@ -4,7 +4,7 @@
 			ref="jhlive" class="jhlive" 
 			:sdkAppID="sdkAppID" :secretKey="secretKey" :userId="userId" :roomId="roomId"
 			:isAuthor="isAuthor" :linkMic="linkMic" 
-			:avatar="avatar" :subtitle="num?'已连接':'等待商家进入'" :title="title" 
+			:avatar="avatar" :subtitle="num?'已连接':'等待商家进入'" :title="title||'暂无'" 
 			:btns="btns" @onBtnClick="onBtnClick" 
       @onRemoteUser="num=$event.length" />
       <uni-popup ref="popup" animation type="bottom">