Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨俊
/
spread_im
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
200b4a72
...
200b4a72eb6b7333a258363ba60a2d6ba031f4a2
authored
2021-05-08 16:14:28 +0800
by
yangjun@hikoon.cn
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加APP下载
1 parent
c85a9793
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
10 deletions
src/assets/icon/iconfont.css
src/components/conversation/conversation-list.vue
src/components/group/group-list.vue
src/index.vue
src/utils/helper.js
src/assets/icon/iconfont.css
View file @
200b4a7
src/components/conversation/conversation-list.vue
View file @
200b4a7
...
...
@@ -4,9 +4,11 @@
<button
title=
"刷新列表"
@
click=
"handleRefresh"
>
<i
class=
"tim-icon-refresh"
></i>
</button>
<!--
<button
title=
"创建会话"
@
click=
"handleAddButtonClick"
>
-->
<!--
<i
class=
"tim-icon-add"
></i>
-->
<!--
</button>
-->
<el-button
icon=
"el-icon-mobile-phone"
:round=
"true"
title=
"下载APP"
@
click=
"handleDownload"
/>
<!--
<button
title=
"创建会话"
@
click=
"handleAddButtonClick"
>
-->
<!--
<i
class=
"tim-icon-add"
></i>
-->
<!--
</button>
-->
</div>
<div
class=
"scroll-container"
>
<conversation-item
...
...
@@ -139,6 +141,9 @@ export default {
.
catch
(()
=>
{
this
.
isCheckouting
=
false
})
},
handleDownload
()
{
window
.
open
(
'https://www.pgyer.com/5CqL'
,
'target'
)
}
}
}
...
...
src/components/group/group-list.vue
View file @
200b4a7
...
...
@@ -59,6 +59,9 @@ export default {
// ElAutocomplete: Autocomplete
},
computed
:
{
isLogin
:
function
()
{
return
this
.
$store
.
state
.
user
.
isLogin
},
groupList
:
function
()
{
return
this
.
$store
.
state
.
group
.
groupList
},
...
...
@@ -68,8 +71,10 @@ export default {
}
})
},
created
()
{
mounted
()
{
if
(
this
.
isLogin
)
{
this
.
fetch
()
}
},
methods
:
{
fetch
()
{
...
...
src/index.vue
View file @
200b4a7
...
...
@@ -68,6 +68,7 @@ export default {
created
()
{
Helper
.
verifyToken
().
then
(
user
=>
this
.
tim
.
login
({
userID
:
user
.
id
,
userSig
:
user
.
sign
})
.
then
(()
=>
{
console
.
log
(
'gooo'
)
this
.
loading
=
false
this
.
$store
.
commit
(
'toggleIsLogin'
,
true
)
this
.
$store
.
commit
(
'startComputeCurrent'
)
...
...
@@ -82,6 +83,7 @@ export default {
// this.$store.commit('showMessage', {type: 'success', message: '登录成功'})
})
.
catch
(
error
=>
{
console
.
log
(
1111
)
this
.
loading
=
false
this
.
$store
.
commit
(
'showMessage'
,
{
message
:
'登录失败:'
+
error
.
message
,
type
:
'error'
})
}))
...
...
src/utils/helper.js
View file @
200b4a7
import
Store
from
'../store/index'
import
request
from
'./request'
export
default
class
Helper
{
...
...
@@ -13,12 +12,11 @@ export default class Helper {
return
this
.
getUrlKey
(
'token'
)
}
/**
*
* @returns {Promise<never>|Promise<{sign, id}>}
*/
static
verifyToken
()
{
const
token
=
this
.
getToken
()
if
(
!
token
)
{
return
Store
.
commit
(
'showMessage'
,
{
type
:
'error'
,
message
:
'非法访问'
})
}
return
request
.
get
(
'auth'
).
then
(
res
=>
{
const
{
esm_id
}
=
res
.
data
return
Promise
.
resolve
({
id
:
esm_id
,
sign
:
window
.
genTestUserSig
(
esm_id
).
userSig
})
...
...
Please
register
or
sign in
to post a comment