Jelajahi Sumber

Signed-off-by: liuboyan <632697560@qq.com>
按钮

liuboyan 4 tahun lalu
induk
melakukan
2d43045381
1 mengubah file dengan 31 tambahan dan 4 penghapusan
  1. 31 4
      pagesMedia/liveDetail.vue

+ 31 - 4
pagesMedia/liveDetail.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="container">
 		<trtc-room ref="trtc-component" :config="rtcConfig"> </trtc-room>
-		<view style="position: absolute;bottom: 0px;#000000;color: #FFFFFF;margin: 30px;" @click="changeCamera()">
-			切换摄像头
+		<view class="popup-flip" @click="changeCamera()">
+			<view class="iconfont iconFill"></view>
 		</view>
 		<view class="popup-open" @click="popupShow = true">
 			<view class="iconfont iconzhibo-shangpin"></view>
@@ -111,10 +111,20 @@
 				})
 			})
 		},
+		onUnload() {
+			NET.request(API.creatLive, {
+				liveId: this.liveId,
+				liveStatus: 2
+			}, 'GET').then(res => {}).catch(res => {
+				this.$refs.uTips.show({
+					title: '关闭直播失败',
+					type: 'warning',
+				})
+			})
+		},
 		methods: {
 			//  勾选商品
-			checkGoods(site){
-					debugger
+			checkGoods(site) {
 				site.check = !site.check
 			},
 			//  获取可绑定商品
@@ -330,6 +340,23 @@
 		float: left;
 		position: relative;
 
+		.popup-flip {
+			width: 50px;
+			height: 50px;
+			position: fixed;
+			top: 15px;
+			right: 15px;
+			background: #52A63A;
+			border-radius: 50%;
+			text-align: center;
+			line-height: 50px;
+
+			.iconFill {
+				color: #FFFFFF;
+				font-size: 34px;
+			}
+		}
+
 		.popup-open {
 			width: 50px;
 			height: 50px;