Browse Source

no message

qiuruirong 1 year ago
parent
commit
613e2c6c61
28 changed files with 378 additions and 137 deletions
  1. 127 0
      README.md
  2. 1 1
      pages/live/play.nvue
  3. 6 0
      uni_modules/equnphp-streaming/components/equnphp-streaming.js
  4. 125 20
      uni_modules/equnphp-streaming/components/live-chat/live-chat.nvue
  5. 9 2
      uni_modules/equnphp-streaming/components/live-goods/live-goods.nvue
  6. 12 3
      uni_modules/equnphp-streaming/components/live-play/live-play.nvue
  7. 12 4
      uni_modules/equnphp-streaming/components/live-push/live-push.nvue
  8. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  9. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/live/play.js.map
  10. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/live/push.js.map
  11. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.js.map
  12. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-goods/live-goods.js.map
  13. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-play/live-play.js.map
  14. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-push/live-push.js.map
  15. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/popup/popup.js.map
  16. 0 0
      unpackage/dist/dev/app-plus/app-service.js
  17. 21 41
      unpackage/dist/dev/app-plus/pages/live/play.js
  18. 21 41
      unpackage/dist/dev/app-plus/pages/live/push.js
  19. 1 1
      unpackage/dist/dev/mp-weixin/project.config.json
  20. 2 1
      unpackage/dist/dev/mp-weixin/project.private.config.json
  21. 13 11
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.js
  22. 0 0
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.wxml
  23. 2 1
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.wxss
  24. 3 0
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-goods/live-goods.js
  25. 3 2
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-goods/live-goods.wxss
  26. 9 5
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-play/live-play.js
  27. 0 0
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-play/live-play.wxml
  28. 11 4
      unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-push/live-push.js

+ 127 - 0
README.md

@@ -0,0 +1,127 @@
+### 项目初始化
+```shell
+npm init -y
+npm install crypto-js --save
+npm install hashids --save
+```
+
+### 项目设置
+
+引入uni_modules包
+manifest.json app插件配置腾讯直播插件
+
+
+### 直播端接入
+```html
+<template>
+	<view>
+		<RY-TencentLive-Pusher class="live" ref="livePusher" v-bind:style="{ width: playerWidth, height: playerHeight,background: '#252e37' }"></RY-TencentLive-Pusher>
+		<live-push ref="livePush" @goDetail="goDetail" @buyGoods="buyGoods" @shearRoom="shearRoom">
+			<template v-slot:goodsDetail>
+				<view  style="width: 100%;height: 300px;background-color: darkcyan;margin-bottom: 10px;border-radius: 20rpx 20rpx 0 0;">
+					商品详情
+				</view>
+			</template>
+		</live-push>
+	</view>
+</template>
+```
+```javascript ### 直播端接入
+import stream from '@/uni_modules/equnphp-streaming/components/equnphp-streaming.js';
+export default {
+	data() {
+		return {
+			playerWidth:uni.getSystemInfoSync().windowWidth,
+			playerHeight:uni.getSystemInfoSync().windowHeight
+		}
+	},
+	onLoad(option) {
+		let self = this 
+		this.$nextTick(function() {
+			// 直播初始化
+			stream.init({
+				liveId: option.live_id,
+				userId: option.user_id,
+				nickName: option.nick_name,
+				livePusher: self.$refs.livePusher,
+				playerWidth: self.playerWidth,
+				playerHeight: self.playerHeight,
+				liveType: 'push'
+			});
+		})
+	},
+	methods:{
+		// 商品详情
+		goDetail(data) {
+			console.log("商品详情",data)
+		},
+		// 去抢购
+		buyGoods(data) {
+			console.log("去抢购",data)
+		},
+		// 分享
+		shearRoom(data){
+			console.log("分享",data)
+		}
+	}
+}
+```
+
+
+### 播放端接入
+```html
+<template>
+	<view>
+		<!-- #ifdef APP-PLUS -->
+		<RY-TencentLive-Player class="live" ref="livePlayer" v-bind:style="{ width: playerWidth, height: playerHeight, background: '#252e37' }"></RY-TencentLive-Player>
+		<!-- #endif -->
+		<live-play ref="livePlay" @goDetail="goDetail" @buyGoods="buyGoods">
+			<template v-slot:goodsDetail>
+				<view  style="width: 100%;height: 300px;background-color: darkcyan;margin-bottom: 10px;border-radius: 20rpx 20rpx 0 0;">
+					商品详情
+				</view>
+			</template>
+		</live-play>
+	</view>
+</template>
+```
+
+
+
+```javascript ### 播放端接入
+import stream from '@/uni_modules/equnphp-streaming/components/equnphp-streaming.js';
+export default {
+	data() {
+		return {
+			playerWidth:uni.getSystemInfoSync().windowWidth,
+			playerHeight:uni.getSystemInfoSync().windowHeight
+		}
+	},
+	onLoad(option) {
+		let self = this
+		this.$nextTick(function() {
+			// 直播初始化
+			stream.init({
+				liveId: option.live_id,
+				merId: option.merId,
+				userId: option.user_id,
+				nickName: option.nick_name,
+				livePlayer: self.$refs.livePlayer,
+				playerWidth: self.playerWidth,
+				playerHeight: self.playerHeight,
+				liveType: 'play'
+			});
+		})
+	},
+	methods:{
+		// 商品详情
+		goDetail(data) {
+			console.log("商品详情",data)
+		},
+		// 去抢购
+		buyGoods(data) {
+			console.log("去抢购",data)
+		}
+	}
+}
+```

+ 1 - 1
pages/live/play.nvue

@@ -31,7 +31,7 @@ export default {
 				merId: option.merId,
 				userId: option.user_id,
 				nickName: option.nick_name,
-				livePlayer: this.$refs.livePlayer,
+				livePlayer: self.$refs.livePlayer,
 				playerWidth: self.playerWidth,
 				playerHeight: self.playerHeight,
 				liveType: 'play'

+ 6 - 0
uni_modules/equnphp-streaming/components/equnphp-streaming.js

@@ -638,9 +638,14 @@ function connectSocket() {
 	socket = uni.connectSocket({
 		url: wsUrl + "?token=" + uni.getStorageSync("UserToken"),
 		success() {
+			// #ifdef APP-PLUS || H5
+			initEventListeners();
+			// #endif
+			// #ifdef MP-WEIXIN
 			setTimeout(function(){
 				initEventListeners();
 			},1000)
+			// #endif
 		}
 	});
 }
@@ -860,6 +865,7 @@ async function req(method, url, params) {
 			url: urls,
 			data: params,
 			async: false,
+			sslVerify: false,//验证ssl证书
 			header: header,
 			success(res) {
 				resolve(res.data);

+ 125 - 20
uni_modules/equnphp-streaming/components/live-chat/live-chat.nvue

@@ -1,19 +1,20 @@
 <template>
 	<view>
 		<view class="live-chat" :style="{bottom:showToolBox?'-1000px':''}">
-			<view class="bottomTextBgView" :class="hasGoods?'dietime':''" v-if="buyGoodsInfo.product_name">
-				<view class="bottomTextView">
-					<text style="font-size: 24rpx;color: #fff;">{{buyGoodsInfo.user_name}}</text>
-					<text style="font-size: 24rpx;color: #8fe9f4;padding: 0 10rpx;">购买了</text>
-					<text style="font-size: 24rpx;color: #fff;">{{buyGoodsInfo.product_name}}</text>
+			<view :class="hasGoods?'dietime':''" v-if="buyGoodsInfo.product_name">
+				<view :class="hasPush?'chat-boxs':'chat-box'">
+					<view style="align-items: flex-start">
+						<view  class="user-chat">
+							<rich-text :nodes="richGoods(buyGoodsInfo)"></rich-text>
+						</view>
+					</view>
 				</view>
 			</view>
 			<!-- 评论互动区 -->
 			<scroll-view scroll-y="true" enhanced :show-scrollbar="false" :scroll-with-animation="true" :class="hasPush?'chat-boxs':'chat-box'" :scroll-top="scrollTop">
 				<view style="align-items: flex-start" id="chat-box">
-					<view v-for="(item,index) in userMessage" :key="index" class="user-chat" v-if="index<maxChatText">
-						<rich-text :nodes="richNodes(item)" style="background:transparent"></rich-text>
-						<!-- <view v-html="item.content"></view> -->
+					<view v-for="(item,index) in userMessage" class="user-chat" :key="index" v-if="index<maxChatText">
+						<rich-text :nodes="richNodes(item)"></rich-text>
 					</view>
 				</view>
 			</scroll-view>
@@ -21,7 +22,7 @@
 			<view class="push-goods" v-if="hasPush">
 				<image :src="goodsInfo.product_img" mode="" class="goods-img"></image>
 				<text class="goods-name">{{goodsInfo.product_name}}</text>
-				<view class="goods-price" @click="buyGoods">
+				<view class="goods-price" @click="buyGoods(goodsInfo)">
 					<image src="@/uni_modules/equnphp-streaming/static/buy-bg.png" mode="" class="buy-bg"></image>
 					<view class="price-box">
 						<text style="font-size: 20rpx;color: #fff;">¥</text>
@@ -165,7 +166,7 @@
 			// 点击发评论
 			sendBind(){
 				this.focus = true;
-				// #ifdef APP-PLUS
+				// #ifdef APP-PLUS || H5
 				this.$refs.messageInput.focus();
 				// #endif
 				// #ifdef MP-WEIXIN
@@ -175,7 +176,7 @@
 			// input失焦事件
 			blur(){
 				this.focus = false;
-				// #ifdef APP-PLUS
+				// #ifdef APP-PLUS || H5
 				this.$refs.messageInput.blur();
 				// #endif
 				// #ifdef MP-WEIXIN
@@ -194,7 +195,77 @@
 				}
 				stream.sendChat(this.mySend);
 			},
-			
+			// #ifdef MP-WEIXIN
+			richNodes(item) {
+				return [
+					{
+						name: 'span',
+						attrs: {
+							style: 'color: #8fe9f4;fontSize:30rpx'
+						},
+						children: [
+							{
+								type: 'text',
+								text: item.content == '进入直播间' ? item.nickname : item.nickname + ':'
+							}
+						]
+					},
+					{
+						name: 'span',
+						attrs: {
+							style: 'color: #ffffff;fontSize:30rpx'
+						},
+						children: [
+							{
+								type: 'text',
+								text: item.content
+							}
+						]
+					}
+				]
+			},
+			richGoods(info){
+				return [
+					{
+						name: 'span',
+						attrs: {
+							style: 'color: #fff;fontSize:24rpx'
+						},
+						children: [
+							{
+								type: 'text',
+								text: info.user_name
+							}
+						]
+					},
+					{
+						name: 'span',
+						attrs: {
+							style: 'color: #8fe9f4;fontSize:24rpx;padding:0 10rpx;'
+						},
+						children: [
+							{
+								type: 'text',
+								text: '购买了'
+							}
+						]
+					},
+					{
+						name: 'span',
+						attrs: {
+							style: 'color: #fff;fontSize:24rpx'
+						},
+						children: [
+							{
+								type: 'text',
+								text: info.product_name
+							}
+						]
+					}
+				]
+			},
+			// #endif
+			// #ifdef APP-PLUS || H5
 			// 将评论转rich-text
 			richNodes(item){
 				return [{
@@ -216,7 +287,34 @@
 					]
 				}]
 			},
-			
+			richGoods(info){
+				return [{
+					children: [
+						{
+							type: 'text',
+							attrs: {
+								style: 'color: #fff;fontSize:24rpx'
+							},
+							text: info.user_name
+						},
+						{
+							type: 'text',
+							attrs: {
+								style: 'color: #8fe9f4;fontSize:24rpx;padding: 0 10rpx;'
+							},
+							text: '购买了' 
+						},
+						{
+							type: 'text',
+							attrs: {
+								style: 'color: #ffffff;fontSize:24rpx'
+							},
+							text: info.product_name
+						}
+					]
+				}]
+			},
+			// #endif
 			// 获取评论区高度
 			scrollChat(){
 				//利用了$nextTick,dom完成后才运行的函数
@@ -225,12 +323,12 @@
 						uni.createSelectorQuery().in(this).select('#chat-box').boundingClientRect((res)=>{
 							let top = res.height-175;
 							if(top>0){
-								this.scrollTop=top;
+								this.scrollTop = top;
 							}
 						}).exec()
 					})
 				}else{
-					// #ifdef APP-PLUS
+					// #ifdef APP-PLUS || H5
 					this.$nextTick(()=>{
 						uni.createSelectorQuery().select('#chat-box').boundingClientRect(data => {
 							if(data.height>0){
@@ -263,8 +361,8 @@
 			},
 			
 			// 去抢购
-			buyGoods(){
-				this.$emit('buy')
+			buyGoods(goodsInfo){
+				this.$emit('buy',goodsInfo)
 			}
 		}
 	}
@@ -283,10 +381,10 @@
 		transform: all 0.5s ease;
 	}
 	.bottomTextBgView {
-		overflow: hidden;
+		/* overflow: hidden;
 		display: flex;
 		flex-direction: row;
-		margin-left: 30rpx;
+		margin-left: 30rpx; */
 	}
 	.bottomTextView {
 		display: flex;
@@ -294,7 +392,12 @@
 		border-radius: 200px;
 		padding: 20rpx;
 		align-items: center;
+		/* #ifdef APP-PLUS */
 		background-color: rgba(0,0,0,0.45);
+		/* #endif */
+		/* #ifdef MP-WEIXIN */
+		background-color: rgba(255,255,255,0.45);
+		/* #endif */
 	}
 	.bottomText {
 		padding: 5rpx 10rpx;
@@ -316,6 +419,9 @@
 		width: 510rpx;
 		max-height: 500rpx;
 		padding: 22rpx 30rpx;
+		/* #ifdef MP-WEIXIN */
+		margin-bottom: 40rpx;
+		/* #endif */
 	}
 	/* #ifndef APP-NVUE */
 	::-webkit-scrollbar{
@@ -373,7 +479,6 @@
 		/* #endif */
 		/* #ifdef MP-WEIXIN */
 		background-color: rgba(255,255,255,0.4);
-		color: red;
 		/* #endif */
 		border-radius: 60rpx;
 		padding: 16rpx 32rpx;

+ 9 - 2
uni_modules/equnphp-streaming/components/live-goods/live-goods.nvue

@@ -108,10 +108,12 @@
 			
 		},
 		methods: {
+			// 关闭商品列表
 			hideGoods(){
 				this.$emit('hideGoods')
 				this.page = 1;
 				this.liveGoods = [];
+				uni.hideLoading();
 			},
 			// 关闭商品详情
 			hideDetail(){
@@ -140,6 +142,7 @@
 			// 		this.categoryList.unshift(categoryall)
 			// 	})
 			// },
+			// 获取商品列表
 			getGoods(){
 				this.page = 1;
 				this.liveGoods = [];
@@ -168,6 +171,7 @@
 					}
 				})
 			},
+			// 加载更多
 			getMore(){
 				let page = Math.ceil( this.total / this.page_size )
 				if(this.page >= page) return this.nomore = true;
@@ -273,7 +277,7 @@
 		position: fixed;
 		bottom: 0;
 		left: 0;
-		z-index: 101;
+		z-index: 9998;
 		.goods-list-box{
 			background-color: #fff;
 			overflow: hidden;
@@ -336,6 +340,9 @@
 						width: 188rpx;
 						height: 188rpx;
 						border-radius: 14rpx;
+						/* #ifdef MP-WEIXIN */
+						display: table;
+						/* #endif */
 					}
 					.tag-num{
 						width: 69rpx;
@@ -446,7 +453,7 @@
 		position: fixed;
 		top: 0;
 		left: 0;
-		z-index: 500;
+		z-index: 9999;
 	}
 	.goods-detail{
 		width: 750rpx;

+ 12 - 3
uni_modules/equnphp-streaming/components/live-play/live-play.nvue

@@ -4,7 +4,7 @@
 		<!-- #ifdef MP-WEIXIN -->
 		<live-player src="rtmp://slbtest.stream.yaoyuankj.top/live/bjQWE35wRnd0" mode="RTC" autoplay bindstatechange="statechange" binderror="error" :style="{ width: playerWidth + 'px', height: playerHeight + 'px', background: 'red' }" />
 		<!-- #endif -->
-		<!-- #ifdef APP-PLUS -->
+		<!-- #ifdef APP-PLUS || H5 -->
 		<view class="close-box" :style="{top:statusBarHeight+'px'}" @click="back">
 			<image src="@/uni_modules/equnphp-streaming/static/icon-end.png" mode="" class="icon-end"></image>
 		</view>
@@ -15,7 +15,12 @@
 		</view>
 		<!-- #endif -->
 		<!-- 直播间标题 -->
+		<!-- #ifdef APP-PLUS || H5 -->
 		<view class="live-title" :style="{top:statusBarHeight + 10 +'px'}">
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<view class="live-title" :style="{top:statusBarHeight - 10 +'px'}">
+		<!-- #endif -->
 			<view class="live-header">
 				<image :src="liveInfo.avatar_url?liveInfo.avatar_url:''" mode="" class="live-avatar"></image>
 			</view>
@@ -128,9 +133,11 @@
 		destroyed() {
 			stream.outStream();
 			stream.closeSocket();
+			// #ifdef APP-PLUS
 			setTimeout(function(){
 				stream.stopPlay();
 			},500)
+			// #endif
 		},
 		methods: {
 			// 返回
@@ -143,15 +150,17 @@
 				this.$refs.liveGoods.getGoods();
 				// this.$emit('cart');
 			},
+			// 关闭商品详情
 			hideGoods(){
 				this.showGoods = false;
 			},
-			// 详情
+			// 点击详情
 			goDetail(data){
 				this.$emit('goDetail',data);
 			},
-			// 去抢购
+			// 点击去抢购
 			buyGoods(data){
+				// this.$refs.liveGoods.showDetail = true
 				this.$emit('buyGoods',data);
 			},
 			// 关注与取关

+ 12 - 4
uni_modules/equnphp-streaming/components/live-push/live-push.nvue

@@ -95,6 +95,7 @@
 				}
 			})
 			this.$nextTick(function(){
+				// stream.updateRoom(28)
 				stream.streamDetail().then(res=>{
 					if(res.code == 200){
 						self.roomStatus = res.data.status;
@@ -135,20 +136,21 @@
 					}
 				})
 			},
-			// 购物车事件
+			// 点击购物车事件
 			cart(){
 				this.showGoods = true;
 				this.$refs.liveGoods.getGoods();
 				// this.$emit('cart');
 			},
+			// 关闭商品详情
 			hideGoods(){
 				this.showGoods = false;
 			},
-			// 详情
+			// 点击详情
 			goDetail(data){
 				this.$emit('goDetail',data);
 			},
-			// 去抢购
+			// 点击去抢购
 			buyGoods(data){
 				this.$emit('buyGoods',data);
 			},
@@ -160,6 +162,7 @@
 			shearRoom(){
 				this.$emit('shearRoom',this.roomData);
 			},
+			// 更改直播状态
 			changePushStatus(){
 				if(this.roomStatus == 0){
 					uni.showToast({
@@ -189,6 +192,7 @@
 				this.showGoods = true
 				this.$emit('cart')
 			},
+			// 确认结束直播
 			onConfirm() {
 				// 点击确定按钮后的逻辑
 				this.isPopupVisible = false;
@@ -201,10 +205,11 @@
 					uni.navigateBack()
 				}
 			},
+			// 点击取消
 			onCancel() {
-			  // 点击取消按钮后的逻辑
 			  this.isPopupVisible = false;
 			},
+			// 开始直播
 			startPush() {
 				var self = this;
 				// stream.updateRoom(28)
@@ -258,6 +263,7 @@
 					})
 				},600)
 			},
+			// 停止直播
 			stopPush() {
 				stream.isPushing().then(ret =>{
 					if(ret.isPushing){
@@ -271,6 +277,7 @@
 					}
 				})
 			},
+			// 停止
 			stop(){
 				let that = this;
 				stream.stopStream().then(res=>{
@@ -286,6 +293,7 @@
 					}
 				})
 			},
+			// 切换摄像头
 			switchCamera(){
 				stream.switchCamera();
 			}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/live/play.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/live/push.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-goods/live-goods.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-play/live-play.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/live-push/live-push.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/equnphp-streaming/components/popup/popup.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 21 - 41
unpackage/dist/dev/app-plus/pages/live/play.js


File diff suppressed because it is too large
+ 21 - 41
unpackage/dist/dev/app-plus/pages/live/push.js


+ 1 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -19,7 +19,7 @@
     "condition": false
   },
   "compileType": "miniprogram",
-  "libVersion": "3.2.4",
+  "libVersion": "",
   "appid": "wxec51302d108656d6",
   "projectname": "TXlive",
   "condition": {},

+ 2 - 1
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -3,5 +3,6 @@
   "projectname": "TXlive",
   "setting": {
     "compileHotReLoad": true
-  }
+  },
+  "libVersion": "3.3.0"
 }

+ 13 - 11
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.js

@@ -197,7 +197,6 @@ var _app = __webpack_require__(/*! ../../config/app */ 83);
 //
 //
 //
-//
 var _default = {
   props: {
     platform: {},
@@ -331,20 +330,23 @@ var _default = {
       }
       _equnphpStreaming.default.sendChat(this.mySend);
     },
-    // 将评论转rich-text
     richNodes: function richNodes(item) {
       return [{
+        name: 'span',
+        attrs: {
+          style: 'color: #8fe9f4;fontSize:30rpx'
+        },
         children: [{
           type: 'text',
-          attrs: {
-            style: 'color: #8fe9f4;fontSize:30rpx'
-          },
           text: item.content == '进入直播间' ? item.nickname : item.nickname + ':'
-        }, {
+        }]
+      }, {
+        name: 'span',
+        attrs: {
+          style: 'color: #ffffff;fontSize:30rpx'
+        },
+        children: [{
           type: 'text',
-          attrs: {
-            style: 'color: #ffffff;fontSize:30rpx'
-          },
           text: item.content
         }]
       }];
@@ -382,8 +384,8 @@ var _default = {
       this.$emit('cart');
     },
     // 去抢购
-    buyGoods: function buyGoods() {
-      this.$emit('buy');
+    buyGoods: function buyGoods(goodsInfo) {
+      this.$emit('buy', goodsInfo);
     }
   }
 };

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.wxml


+ 2 - 1
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-chat/live-chat.wxss

@@ -45,6 +45,8 @@
 	width: 510rpx;
 	max-height: 500rpx;
 	padding: 22rpx 30rpx;
+
+	margin-bottom: 40rpx;
 }
 ::-webkit-scrollbar{
 	display:none;
@@ -100,7 +102,6 @@
 
 
 	background-color: rgba(255,255,255,0.4);
-	color: red;
 
 	border-radius: 60rpx;
 	padding: 16rpx 32rpx;

+ 3 - 0
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-goods/live-goods.js

@@ -252,6 +252,7 @@ var _default = {
   },
   mounted: function mounted() {},
   methods: {
+    // 关闭商品列表
     hideGoods: function hideGoods() {
       this.$emit('hideGoods');
       this.page = 1;
@@ -284,6 +285,7 @@ var _default = {
     // 		this.categoryList.unshift(categoryall)
     // 	})
     // },
+    // 获取商品列表
     getGoods: function getGoods() {
       this.page = 1;
       this.liveGoods = [];
@@ -312,6 +314,7 @@ var _default = {
         }
       });
     },
+    // 加载更多
     getMore: function getMore() {
       var page = Math.ceil(this.total / this.page_size);
       if (this.page >= page) return this.nomore = true;

+ 3 - 2
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-goods/live-goods.wxss

@@ -92,7 +92,7 @@
   position: fixed;
   bottom: 0;
   left: 0;
-  z-index: 101;
+  z-index: 9998;
 }
 .good-list .goods-list-box.data-v-10610608 {
   background-color: #fff;
@@ -159,6 +159,7 @@
   width: 188rpx;
   height: 188rpx;
   border-radius: 14rpx;
+  display: table;
 }
 .good-list .goods-list-box .goods-item .goods-img .tag-num.data-v-10610608 {
   width: 69rpx;
@@ -265,7 +266,7 @@
   position: fixed;
   top: 0;
   left: 0;
-  z-index: 500;
+  z-index: 9999;
 }
 .goods-detail.data-v-10610608 {
   width: 750rpx;

+ 9 - 5
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-play/live-play.js

@@ -196,6 +196,11 @@ var _app = __webpack_require__(/*! ../../config/app */ 83);
 //
 //
 //
+//
+//
+//
+//
+//
 var liveChat = function liveChat() {
   __webpack_require__.e(/*! require.ensure | uni_modules/equnphp-streaming/components/live-chat/live-chat */ "uni_modules/equnphp-streaming/components/live-chat/live-chat").then((function () {
     return resolve(__webpack_require__(/*! ../live-chat/live-chat.nvue */ 115));
@@ -296,9 +301,6 @@ var _default = {
   destroyed: function destroyed() {
     _equnphpStreaming.default.outStream();
     _equnphpStreaming.default.closeSocket();
-    setTimeout(function () {
-      _equnphpStreaming.default.stopPlay();
-    }, 500);
   },
   methods: {
     // 返回
@@ -311,15 +313,17 @@ var _default = {
       this.$refs.liveGoods.getGoods();
       // this.$emit('cart');
     },
+    // 关闭商品详情
     hideGoods: function hideGoods() {
       this.showGoods = false;
     },
-    // 详情
+    // 点击详情
     goDetail: function goDetail(data) {
       this.$emit('goDetail', data);
     },
-    // 去抢购
+    // 点击去抢购
     buyGoods: function buyGoods(data) {
+      // this.$refs.liveGoods.showDetail = true
       this.$emit('buyGoods', data);
     },
     // 关注与取关

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-play/live-play.wxml


+ 11 - 4
unpackage/dist/dev/mp-weixin/uni_modules/equnphp-streaming/components/live-push/live-push.js

@@ -308,20 +308,21 @@ var _default = {
         }
       });
     },
-    // 购物车事件
+    // 点击购物车事件
     cart: function cart() {
       this.showGoods = true;
       this.$refs.liveGoods.getGoods();
       // this.$emit('cart');
     },
+    // 关闭商品详情
     hideGoods: function hideGoods() {
       this.showGoods = false;
     },
-    // 详情
+    // 点击详情
     goDetail: function goDetail(data) {
       this.$emit('goDetail', data);
     },
-    // 去抢购
+    // 点击去抢购
     buyGoods: function buyGoods(data) {
       this.$emit('buyGoods', data);
     },
@@ -333,6 +334,7 @@ var _default = {
     shearRoom: function shearRoom() {
       this.$emit('shearRoom', this.roomData);
     },
+    // 更改直播状态
     changePushStatus: function changePushStatus() {
       if (this.roomStatus == 0) {
         uni.showToast({
@@ -362,6 +364,7 @@ var _default = {
       this.showGoods = true;
       this.$emit('cart');
     },
+    // 确认结束直播
     onConfirm: function onConfirm() {
       // 点击确定按钮后的逻辑
       this.isPopupVisible = false;
@@ -374,10 +377,11 @@ var _default = {
         uni.navigateBack();
       }
     },
+    // 点击取消
     onCancel: function onCancel() {
-      // 点击取消按钮后的逻辑
       this.isPopupVisible = false;
     },
+    // 开始直播
     startPush: function startPush() {
       var _this2 = this;
       var self = this;
@@ -432,6 +436,7 @@ var _default = {
         });
       }, 600);
     },
+    // 停止直播
     stopPush: function stopPush() {
       var _this3 = this;
       _equnphpStreaming.default.isPushing().then(function (ret) {
@@ -446,6 +451,7 @@ var _default = {
         }
       });
     },
+    // 停止
     stop: function stop() {
       var that = this;
       _equnphpStreaming.default.stopStream().then(function (res) {
@@ -461,6 +467,7 @@ var _default = {
         }
       });
     },
+    // 切换摄像头
     switchCamera: function switchCamera() {
       _equnphpStreaming.default.switchCamera();
     }

Some files were not shown because too many files changed in this diff