直播修改
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<live-pusher id='livePusher' ref="livePusher" class="livePusher" :url="url"
|
||||
mode="SD" :muted="true" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2"
|
||||
mode="SD" :muted="false" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2"
|
||||
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
|
||||
:style="{'height':height + 'px'}"
|
||||
></live-pusher>
|
||||
@@ -166,7 +166,7 @@
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const RongIMLib = require('../../static/rongyun.js');
|
||||
const RongIMLib = require('../../static/rongyun.js');
|
||||
export default {
|
||||
data: {
|
||||
fil: true,
|
||||
@@ -195,28 +195,29 @@ const RongIMLib = require('../../static/rongyun.js');
|
||||
this.url = a.url.replace("*","&")
|
||||
let that = this
|
||||
const token = uni.getStorageSync('token');
|
||||
uni.request({
|
||||
url:"https://dmmall.sdbairui.com//storeapi/Streaming/liveStreamList",
|
||||
method:"POST",
|
||||
headers:{
|
||||
'Authorization' : 'Bearer' + " " + token
|
||||
},
|
||||
success(res){
|
||||
console.log(res)
|
||||
that.list= res.data.data
|
||||
}
|
||||
})
|
||||
uni.request({
|
||||
url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
||||
method:"POST",
|
||||
headers:{
|
||||
'Authorization' : 'Bearer' + " " + token
|
||||
},
|
||||
success(res){
|
||||
console.log(res.data.data.memberInfo)
|
||||
that.info = res.data.data.memberInfo
|
||||
}
|
||||
})
|
||||
console.log('Bearer' + " " + token)
|
||||
// uni.request({
|
||||
// url:"https://dmmall.sdbairui.com/storeapi/Streaming/liveStreamList",
|
||||
// method:"POST",
|
||||
// headers:{
|
||||
// 'Authorization' : 'Bearer' + " " + token
|
||||
// },
|
||||
// success(res){
|
||||
// console.log(res)
|
||||
// that.list= res.data.data
|
||||
// }
|
||||
// })
|
||||
// uni.request({
|
||||
// url:"https://dmmall.sdbairui.com/storeapi/member/memberInfo",
|
||||
// method:"POST",
|
||||
// headers:{
|
||||
// 'Authorization' : 'Bearer' + " " + token
|
||||
// },
|
||||
// success(res){
|
||||
// console.log(res.data.data.memberInfo)
|
||||
// that.info = res.data.data.memberInfo
|
||||
// }
|
||||
// })
|
||||
var config = {
|
||||
appkey: 'mgb7ka1',
|
||||
debug:true
|
||||
@@ -244,19 +245,22 @@ const RongIMLib = require('../../static/rongyun.js');
|
||||
var user = {
|
||||
token: uni.getStorageSync('rongyun')
|
||||
};
|
||||
console.log(user,123)
|
||||
im.connect(user).then(function(user) {
|
||||
console.log('链接成功, 链接用户 id 为: ', user.id);
|
||||
}).catch(function(error) {
|
||||
console.log('链接失败: ', error.code, error.msg);
|
||||
console.log('链接失败: ', error.code, error);
|
||||
});
|
||||
var chatRoom = im.ChatRoom.get({
|
||||
id: a.id
|
||||
});
|
||||
})
|
||||
chatRoom.join({
|
||||
count: 20 // 进入后, 自动拉取 20 条聊天室最新消息
|
||||
}).then(function() {
|
||||
console.log('加入聊天室成功');
|
||||
});
|
||||
}).catch((err)=>{
|
||||
console.log(err,262)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
statechange(e) {
|
||||
|
||||
Reference in New Issue
Block a user