|
@@ -1,19 +1,22 @@
|
|
|
<template>
|
|
|
<view class="container" :style="'height: '+windowHeight+'px;'">
|
|
|
<jhlive
|
|
|
- ref="jhlive"
|
|
|
- class="jhlive"
|
|
|
- :sdkAppID="sdkAppID"
|
|
|
- :secretKey="secretKey"
|
|
|
- :userId="userId"
|
|
|
- :roomId="roomId"
|
|
|
- :isAuthor="isAuthor"
|
|
|
- :linkMic="linkMic"
|
|
|
- :avatar="avatar"
|
|
|
- :num="num?'已连接':'等待商家进入'"
|
|
|
- :likes="likes"
|
|
|
- :name="name"
|
|
|
+ ref="jhlive" class="jhlive"
|
|
|
+ :sdkAppID="sdkAppID" :secretKey="secretKey" :userId="userId" :roomId="roomId"
|
|
|
+ :isAuthor="isAuthor" :linkMic="linkMic"
|
|
|
+ :avatar="avatar" :subtitle="num?'已连接':'等待商家进入'" :title="title"
|
|
|
+ :btns="btns" @onBtnClick="onBtnClick"
|
|
|
@onRemoteUser="num=$event.length" />
|
|
|
+ <uni-popup ref="popup" animation type="bottom">
|
|
|
+ <view class="popup-box">
|
|
|
+ <view class="popup-close">
|
|
|
+ <text class="popup-close-text" @click="$refs.popup.close()">收起</text>
|
|
|
+ </view>
|
|
|
+ <scroll-view scroll-y="true" class="good-box">
|
|
|
+
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -26,23 +29,23 @@
|
|
|
components: { jhlive },
|
|
|
data() {
|
|
|
return {
|
|
|
+ windowWidth: 0,
|
|
|
+ windowHeight: 0,
|
|
|
userData: {},
|
|
|
orderId: '',
|
|
|
tenantCode: '',
|
|
|
goodsList: [],
|
|
|
+ liveId: '',
|
|
|
|
|
|
isAuthor: false,
|
|
|
linkMic: true,
|
|
|
sdkAppID:API.sdkAppID,
|
|
|
secretKey:API.secretKey,
|
|
|
- windowWidth: 0,
|
|
|
- windowHeight: 0,
|
|
|
+ btns: [{picture:"../static/images/live-good.png",title:''}],
|
|
|
userId: '',
|
|
|
roomId: '',
|
|
|
- liveId: '',
|
|
|
- num: 0,
|
|
|
- likes: 0,
|
|
|
- name: "",
|
|
|
+ title: "",
|
|
|
+ num: 0,
|
|
|
avatar: "../static/images/loginLogo.png",
|
|
|
}
|
|
|
},
|
|
@@ -63,7 +66,7 @@
|
|
|
tenantCode : this.tenantCode,
|
|
|
orderId: this.orderId
|
|
|
}, 'GET').then(res => {
|
|
|
- this.name = res.data.tenantName;
|
|
|
+ this.title = res.data.tenantName;
|
|
|
this.avatar = res.data.headImg;
|
|
|
this.liveId = res.data.liveId;
|
|
|
this.roomId = res.data.roomId;
|
|
@@ -82,6 +85,11 @@
|
|
|
exitRoom() {
|
|
|
this.$refs.jhlive&&this.$refs.jhlive.exitRoom();
|
|
|
},
|
|
|
+ onBtnClick(index, item) {
|
|
|
+ if(index === 0) {
|
|
|
+ this.$refs.popup.open()
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -99,4 +107,43 @@
|
|
|
width: 750rpx;
|
|
|
flex: 1;
|
|
|
}
|
|
|
+
|
|
|
+.popup-open {
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 15px;
|
|
|
+ right: 15px;
|
|
|
+ background-color: #52A63A;
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50px;
|
|
|
+}
|
|
|
+
|
|
|
+.iconzhibo-shangpin {
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 34px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50px;
|
|
|
+}
|
|
|
+
|
|
|
+.popup-box {
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ width: 750rpx;
|
|
|
+ height: 750rpx;
|
|
|
+ border-top-left-radius: 10px;
|
|
|
+ border-top-right-radius: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.popup-close {
|
|
|
+ padding: 10px;
|
|
|
+ line-height: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.popup-close-text {
|
|
|
+ color: #52A63A;
|
|
|
+ font-size: 15px;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
</style>
|