Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b7b08af8
authored
Dec 01, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.2.0_1210' of
http://192.168.3.233:8090/glsx/scrm-wx-merchant-ac…
…tivity into v3.2.0_1210
2 parents
54b2ec54
c1662c6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
6 deletions
src/components/LiveBox.vue
src/components/TIM/Im.vue
src/components/TIM/im.js
src/components/LiveBox.vue
View file @
b7b08af
...
@@ -138,7 +138,7 @@ export default {
...
@@ -138,7 +138,7 @@ export default {
// console.log('====', { result });
// console.log('====', { result });
this
.
player
.
ready
(()
=>
{
// 设置播放器初始化完成后的回调
this
.
player
.
ready
(()
=>
{
// 设置播放器初始化完成后的回调
this
.
fixHls
()
this
.
fixHls
()
const
src
=
this
.
LiveProps
[
this
.
liveDetail
.
status
].
isLive
?
this
.
liveDetail
.
p
layPath
:
(
this
.
liveDetail
.
liveBroadcastRecordingFileList
||
[])[
0
]?.
videoUrl
const
src
=
this
.
LiveProps
[
this
.
liveDetail
.
status
].
isLive
?
this
.
liveDetail
.
p
ullWebRtcUrl
:
(
this
.
liveDetail
.
liveBroadcastRecordingFileList
||
[])[
0
]?.
videoUrl
this
.
player
.
src
(
src
)
this
.
player
.
src
(
src
)
this
.
player
.
poster
()
this
.
player
.
poster
()
this
.
player
.
play
()
// 播放视频
this
.
player
.
play
()
// 播放视频
...
...
src/components/TIM/Im.vue
View file @
b7b08af
...
@@ -90,9 +90,10 @@ export default {
...
@@ -90,9 +90,10 @@ export default {
},
},
getUserSig
()
{
getUserSig
()
{
const
userInfo
=
util
.
getUserInfo
()
const
userInfo
=
util
.
getUserInfo
()
// userId = this.userInfo.openid || this.userInfo.uuid
const
userId
=
userInfo
.
openid
||
userInfo
.
uuid
const
userId
=
userInfo
.
nickName
||
userInfo
.
userName
// const userId = userInfo.nickName || userInfo.userName
shopmallApi
.
getLiveSig
({
userId
:
userId
}).
then
(
res
=>
{
const
params
=
this
.
getLocalStorage
(
'wx_scrm_link_params'
)
||
{}
shopmallApi
.
getLiveSig
({
userId
:
userId
,
sourceShopId
:
params
.
merchantId
||
''
,
visitSource
:
'H5-众筹'
}).
then
(
res
=>
{
this
.
userSig
=
res
.
userSig
this
.
userSig
=
res
.
userSig
this
.
initTim
()
this
.
initTim
()
})
})
...
@@ -100,7 +101,7 @@ export default {
...
@@ -100,7 +101,7 @@ export default {
initTim
()
{
initTim
()
{
const
userInfo
=
util
.
getUserInfo
()
const
userInfo
=
util
.
getUserInfo
()
const
imOptions
=
{
const
imOptions
=
{
userID
:
userInfo
.
nickName
||
userInfo
.
userName
,
userID
:
userInfo
.
openid
||
userInfo
.
uuid
,
userSig
:
this
.
userSig
,
userSig
:
this
.
userSig
,
groupID
:
this
.
liveDetail
.
imGroupId
,
groupID
:
this
.
liveDetail
.
imGroupId
,
SDKAppID
:
this
.
liveDetail
.
imSdkAppId
,
SDKAppID
:
this
.
liveDetail
.
imSdkAppId
,
...
@@ -110,6 +111,7 @@ export default {
...
@@ -110,6 +111,7 @@ export default {
timObj
=
new
IM
(
imOptions
)
timObj
=
new
IM
(
imOptions
)
timObj
.
join
(
imOptions
).
then
(
res
=>
{
timObj
.
join
(
imOptions
).
then
(
res
=>
{
// console.log('login-------')
// console.log('login-------')
timObj
.
updateMyProfile
({
nick
:
userInfo
.
nickName
})
})
})
},
},
// 收到消息触发
// 收到消息触发
...
@@ -126,7 +128,7 @@ export default {
...
@@ -126,7 +128,7 @@ export default {
// 群成员发送消息
// 群成员发送消息
// let eleData = JSON.parse()
// let eleData = JSON.parse()
let
eleData
=
{
let
eleData
=
{
userName
:
item
.
from
,
userName
:
item
.
nick
,
content
:
item
.
payload
.
text
content
:
item
.
payload
.
text
}
}
// 获取群聊消息,消息上屏
// 获取群聊消息,消息上屏
...
...
src/components/TIM/im.js
View file @
b7b08af
...
@@ -67,6 +67,19 @@ export default class IM {
...
@@ -67,6 +67,19 @@ export default class IM {
.
catch
(
reject
)
.
catch
(
reject
)
})
})
}
}
/** 更新用户标配信息
* nick,avatar,gender,selfSignature,allowType
*/
updateMyProfile
(
obj
)
{
let
promise
=
this
.
tim
.
updateMyProfile
(
obj
)
promise
.
then
(
function
(
imResponse
)
{
console
.
log
(
imResponse
.
data
)
// 更新资料成功
})
.
catch
(
function
(
imError
)
{
console
.
warn
(
'updateMyProfile error:'
,
imError
)
// 更新资料失败的相关信息
})
}
/**
/**
* 加入群聊
* 加入群聊
* @returns Promise
* @returns Promise
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment