This commit is contained in:
parent
1bd7658f45
commit
6d78bd48cf
3
app.json
3
app.json
|
|
@ -13,7 +13,8 @@
|
||||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||||
"t-message": "tdesign-miniprogram/message/message",
|
"t-message": "tdesign-miniprogram/message/message",
|
||||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||||
"t-popup": "tdesign-miniprogram/popup/popup"
|
"t-popup": "tdesign-miniprogram/popup/popup",
|
||||||
|
"t-cell": "tdesign-miniprogram/cell/cell"
|
||||||
},
|
},
|
||||||
"entryPagePath": "pages/form/index",
|
"entryPagePath": "pages/form/index",
|
||||||
"window": {
|
"window": {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
|
||||||
&-back {
|
&-back {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,18 @@
|
||||||
|
|
||||||
&-content {
|
&-content {
|
||||||
padding: 20rpx 0 0 0;
|
padding: 20rpx 0 0 0;
|
||||||
flex-grow: 1;
|
|
||||||
overflow-y: auto;
|
}
|
||||||
|
|
||||||
|
.historical-records {
|
||||||
|
&-title {
|
||||||
|
color: #666;
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-view {
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6,14 +6,30 @@ import { agora } from '../../utils/agora'
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
meetingForm: {
|
meetingForm: {
|
||||||
roomNum: '34351300',
|
roomNum: '',
|
||||||
roomName: '杨杨',
|
roomName: '',
|
||||||
},
|
},
|
||||||
isRecord: false,
|
isRecord: false,
|
||||||
isCamera: false,
|
isCamera: false,
|
||||||
|
historicalList: [],
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
onStop()
|
onStop()
|
||||||
|
const that = this;
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'historicalList',
|
||||||
|
success(res: any) {
|
||||||
|
that.setData({
|
||||||
|
historicalList: res.data
|
||||||
|
})
|
||||||
|
that.setData({
|
||||||
|
meetingForm: {
|
||||||
|
roomNum: res.data[res.data.length - 1].roomNum,
|
||||||
|
roomName: res.data[res.data.length - 1].nickName
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
wx.authorize({
|
wx.authorize({
|
||||||
|
|
@ -77,7 +93,7 @@ Page({
|
||||||
screenShareId: res.data.screenShareId,
|
screenShareId: res.data.screenShareId,
|
||||||
})
|
})
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/meeting/index?roomNum=${this.data.meetingForm.roomNum}`
|
url: `/pages/meeting/index?roomNum=${this.data.meetingForm.roomNum}&nickName=${this.data.meetingForm.roomName}`
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -159,5 +175,15 @@ Page({
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
setForm(e) {
|
||||||
|
const { item } = e.currentTarget.dataset;
|
||||||
|
this.setData({
|
||||||
|
meetingForm: {
|
||||||
|
roomNum: item.roomNum,
|
||||||
|
roomName: item.nickName
|
||||||
|
},
|
||||||
|
})
|
||||||
|
this.joinMeeting()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<!--pages/form/index.wxml-->
|
<!--pages/form/index.wxml-->
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<header-tab title='会议' isBack='{{false}}'></header-tab>
|
<header-tab title='智慧享' isBack='{{false}}'></header-tab>
|
||||||
<view class="form-content">
|
<view class="form-content">
|
||||||
<t-input label="会议号" placeholder="请输入会议号" value="{{meetingForm.roomNum}}" bind:clear="changeMeetingForm" bind:change="changeMeetingForm" clearable data-type='roomNum' />
|
<t-input label="会议号" placeholder="请输入会议号" value="{{meetingForm.roomNum}}" bind:clear="changeMeetingForm" bind:change="changeMeetingForm" clearable data-type='roomNum' />
|
||||||
<t-input label="入会名称" placeholder="请输入入会名称" value="{{meetingForm.roomName}}" bind:clear="changeMeetingForm" bind:change="changeMeetingForm" clearable data-type='roomName' />
|
<t-input label="入会名称" placeholder="请输入入会名称" value="{{meetingForm.roomName}}" bind:clear="changeMeetingForm" bind:change="changeMeetingForm" clearable data-type='roomName' />
|
||||||
|
|
@ -11,5 +11,11 @@
|
||||||
</t-button>
|
</t-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="historical-records" wx:if="{{historicalList.length}}">
|
||||||
|
<text class="historical-records-title">历史记录</text>
|
||||||
|
<view class="historical-records-view">
|
||||||
|
<t-cell title="{{item.roomName}}({{item.nickName}})" hover note="{{item.roomNum}}" arrow wx:for="{{historicalList}}" data-item="{{item}}" wx:key="index" bind:tap="setForm" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<t-message id="t-message" />
|
<t-message id="t-message" />
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
&-fullscreen {
|
&-fullscreen {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 2%;
|
left: 2%;
|
||||||
top: 2%;
|
top: 2%;
|
||||||
color: white;
|
color: white;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
|
||||||
|
|
@ -121,14 +121,41 @@ Page({
|
||||||
channelId: option.roomNum,
|
channelId: option.roomNum,
|
||||||
user: await getStorage('user')
|
user: await getStorage('user')
|
||||||
})
|
})
|
||||||
},
|
|
||||||
async onReady() {
|
|
||||||
await this.joinChannel()
|
await this.joinChannel()
|
||||||
await this.getRoomUser()
|
await this.getRoomUser()
|
||||||
await this.getShowUser()
|
await this.getShowUser()
|
||||||
this.startClientEvent()
|
this.startClientEvent()
|
||||||
this.startSignalr()
|
this.startSignalr()
|
||||||
await this.getRoomInfo()
|
await this.getRoomInfo()
|
||||||
|
const that = this;
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'historicalList',
|
||||||
|
success(res: any) {
|
||||||
|
const list = [...res.data]
|
||||||
|
if (list.length >= 3) {
|
||||||
|
list.splice(0, 1)
|
||||||
|
}
|
||||||
|
list.push({
|
||||||
|
nickName: option.nickName,
|
||||||
|
roomNum: option.roomNum,
|
||||||
|
roomName: that.data.roomInfo.roomName
|
||||||
|
})
|
||||||
|
wx.setStorage({
|
||||||
|
key: "historicalList",
|
||||||
|
data: list
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail() {
|
||||||
|
wx.setStorage({
|
||||||
|
key: "historicalList",
|
||||||
|
data: [{
|
||||||
|
nickName: option.nickName,
|
||||||
|
roomNum: option.roomNum,
|
||||||
|
roomName: that.data.roomInfo.roomName
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
startSignalr() {
|
startSignalr() {
|
||||||
onSignalr(async (item) => {
|
onSignalr(async (item) => {
|
||||||
|
|
@ -447,11 +474,7 @@ Page({
|
||||||
switch (title) {
|
switch (title) {
|
||||||
case '关闭听筒':
|
case '关闭听筒':
|
||||||
case '开启听筒':
|
case '开启听筒':
|
||||||
item.active = !item.active
|
|
||||||
this.setData({
|
|
||||||
muted: !this.data.muted,
|
|
||||||
footerList: footerListTemplate
|
|
||||||
})
|
|
||||||
break;
|
break;
|
||||||
case '解除静音':
|
case '解除静音':
|
||||||
case '静音':
|
case '静音':
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<!--pages/meeting/index.wxml-->
|
<!--pages/meeting/index.wxml-->
|
||||||
<view class="meeting">
|
<view class="meeting">
|
||||||
<header-tab title='会议' backGround='rgb(35,36,38)' iconSize='24' color="white" titleStyle='padding:12rpx 0;' isStatusBarHeight="{{false}}" isBack='{{false}}'></header-tab>
|
<view wx:if="{{!isFullscreen}}">
|
||||||
|
<header-tab title='会议号:{{roomInfo.roomNum}} 会议名称:{{roomInfo.roomName}}' backGround='rgb(35,36,38)' iconSize='24' color="white" titleStyle='padding:12rpx 0;font-size:16rpx' isStatusBarHeight="{{false}}" isBack='{{false}}'></header-tab>
|
||||||
|
</view>
|
||||||
<view class="meeting-content">
|
<view class="meeting-content">
|
||||||
<view class="meeting-content-noAdmin" wx:if="{{isAdmin === 0}}">
|
<view class="meeting-content-noAdmin" wx:if="{{isAdmin === 0}}">
|
||||||
<image class="meeting-content-noAdmin-image" src="/assets/icon8.png" />
|
<image class="meeting-content-noAdmin-image" src="/assets/icon8.png" />
|
||||||
|
|
@ -14,10 +16,10 @@
|
||||||
<t-icon name="fullscreen-2" size="24rpx" data-name="fullscreen-2" wx:else />
|
<t-icon name="fullscreen-2" size="24rpx" data-name="fullscreen-2" wx:else />
|
||||||
</view>
|
</view>
|
||||||
<view class="meeting-content-video-canvas" wx:if="{{currentUser.shareSrc}}">
|
<view class="meeting-content-video-canvas" wx:if="{{currentUser.shareSrc}}">
|
||||||
<live-player id="player" src="{{currentUser.shareSrc}}" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="contain" muted="{{muted}}" />
|
<live-player id="player" src="{{currentUser.shareSrc}}" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="contain" />
|
||||||
</view>
|
</view>
|
||||||
<view class="meeting-content-video-canvas" wx:elif="{{currentUser.src}}">
|
<view class="meeting-content-video-canvas" wx:elif="{{currentUser.src && currentUser.enableCamera}}">
|
||||||
<live-player id="player" src="{{currentUser.src}}" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="fillCrop" muted="{{muted}}" />
|
<live-player id="player" src="{{currentUser.src}}" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="fillCrop" muted="{{currentUser.uid === user.uid}}" />
|
||||||
</view>
|
</view>
|
||||||
<view class="meeting-content-video-user">
|
<view class="meeting-content-video-user">
|
||||||
<view class="meeting-content-video-user-view" style=" background:{{currentUser.roleId === '1' || currentUser.roleId === '3'? '#FDC229' : '#3F51B5' }}">
|
<view class="meeting-content-video-user-view" style=" background:{{currentUser.roleId === '1' || currentUser.roleId === '3'? '#FDC229' : '#3F51B5' }}">
|
||||||
|
|
@ -36,8 +38,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="meeting-content-smallvideo-box-view-canvas" wx:if="{{item.src}}">
|
<view class="meeting-content-smallvideo-box-view-canvas" wx:if="{{item.src}}">
|
||||||
<live-pusher wx:if="{{user.uid === item.uid}}" url="{{item.src}}" mode="RTC" bindstatechange="recorderStateChange" background-mute enable-mic enable-camera max-bitrate="500" min-bitrate="200" autopush enable-agc enable-ans device-position="front" class="meeting-content-smallvideo-box-view-canvas-play" />
|
<live-pusher wx:if="{{user.uid === item.uid}}" url="{{item.src}}" mode="RTC" bindstatechange="recorderStateChange" background-mute enable-mic="{{footerList[1].active}}" enable-camera max-bitrate="500" min-bitrate="200" autopush enable-agc enable-ans device-position="front" class="meeting-content-smallvideo-box-view-canvas-play" face-thinness="{{0.5}}" skin-whiteness="{{0.5}}" skin-smoothness="{{0.5}}" />
|
||||||
<live-player src="{{item.src}}" class="meeting-content-smallvideo-box-view-canvas-play" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="fillCrop" muted="{{muted}}" wx:else />
|
<live-player src="{{item.src}}" class="meeting-content-smallvideo-box-view-canvas-play" mode="RTC" autoplay="true" bindstatechange="playerStateChange" object-fit="fillCrop" wx:else />
|
||||||
</view>
|
</view>
|
||||||
<view class="meeting-content-smallvideo-box-view-user">
|
<view class="meeting-content-smallvideo-box-view-user">
|
||||||
<view class="meeting-content-smallvideo-box-view-user-view" style=" background:{{ item.roleId === '1' || item.roleId === '3' ? '#FDC229' : '#3F51B5' }}">
|
<view class="meeting-content-smallvideo-box-view-user-view" style=" background:{{ item.roleId === '1' || item.roleId === '3' ? '#FDC229' : '#3F51B5' }}">
|
||||||
|
|
@ -75,7 +77,7 @@
|
||||||
<t-popup visible="{{userPopupVisible}}" bind:visible-change="onVisibleChange" placement="right" prevent-scroll-through='{{false}}'>
|
<t-popup visible="{{userPopupVisible}}" bind:visible-change="onVisibleChange" placement="right" prevent-scroll-through='{{false}}'>
|
||||||
<view class="user-popup">
|
<view class="user-popup">
|
||||||
<view class="user-popup-title">
|
<view class="user-popup-title">
|
||||||
聊天
|
成员
|
||||||
</view>
|
</view>
|
||||||
<view class="user-popup-view" wx:for="{{roomUserList}}" data-item="{{item}}" wx:key="index" wx:if="{{item.isRoom}}">
|
<view class="user-popup-view" wx:for="{{roomUserList}}" data-item="{{item}}" wx:key="index" wx:if="{{item.isRoom}}">
|
||||||
<view class="user-popup-view-avatar">
|
<view class="user-popup-view-avatar">
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ export const startSignalr = async (callBack: Function) => {
|
||||||
})
|
})
|
||||||
.build();
|
.build();
|
||||||
connection.start().then(() => {
|
connection.start().then(() => {
|
||||||
|
wx.setStorage({
|
||||||
|
key: "reconnect",
|
||||||
|
data: true
|
||||||
|
})
|
||||||
callBack()
|
callBack()
|
||||||
})
|
})
|
||||||
connection.onclose(() => {
|
connection.onclose(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue