Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
share-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
share-show-h5
Commits
97e5ed62
提交
97e5ed62
authored
9月 15, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
43b5bfd4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
50 行增加
和
18 行删除
+50
-18
details.vue
src/pages/list/details.vue
+21
-12
index.vue
src/pages/list/index.vue
+6
-2
index.vue
src/pages/login/index.vue
+21
-3
routes.js
src/router/routes.js
+2
-1
没有找到文件。
src/pages/list/details.vue
浏览文件 @
97e5ed62
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
<top-title
:title=
"detailData.name"
></top-title>
<top-title
:title=
"detailData.name"
></top-title>
</div>
</div>
<ul
class=
"img-scroll"
>
<ul
class=
"img-scroll"
>
<li><img
:src=
"detailData.poster_url"
alt=
""
></li>
<template
v-for=
"(item, index) in JSON.parse(detailData.poster_url)"
>
<li
:key=
"index"
><img
:src=
"item.file_url"
alt=
""
></li>
</
template
>
</ul>
</ul>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"live-state"
>
<div
class=
"live-state"
>
...
@@ -73,26 +75,33 @@ export default {
...
@@ -73,26 +75,33 @@ export default {
methods
:
{
methods
:
{
joinActivity
(
status
)
{
joinActivity
(
status
)
{
if
(
parseInt
(
status
)
===
2
)
{
if
(
parseInt
(
status
)
===
2
)
{
let
url
=
this
.
liveData
.
code
.
viewUrl
console
.
log
(
this
.
liveData
)
action
.
Login
.
getUserInfo
().
then
((
res
)
=>
{
window
.
location
.
href
=
this
.
liveData
.
view_url
if
(
res
.
code
===
0
)
{
// let url = this.liveData.code.viewUrl
const
user
=
res
.
data
// action.Login.getUserInfo().then((res) => {
url
+=
`&autoLogin=true&viewername=
${
user
.
username
}
&viewertoken=
${
this
.
liveData
.
play_pass
}
`
// if (res.code === 0) {
window
.
location
.
href
=
url
// const user = res.data
}
// url += `&autoLogin=true&viewername=${user.username}&viewertoken=${this.liveData.play_pass}`
})
// window.location.href = url
// }
// })
}
}
},
},
getDetail
()
{
getDetail
()
{
action
.
List
.
getLiveDetail
(
this
.
$route
.
query
.
id
).
then
((
res
)
=>
{
const
id
=
this
.
$route
.
query
.
id
||
this
.
$route
.
query
.
activity_id
action
.
List
.
getLiveDetail
(
id
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
detailData
=
res
.
data
.
activity_info
this
.
detailData
=
res
.
data
.
activity_info
this
.
liveData
=
res
.
data
.
cc_room_info
this
.
liveData
=
res
.
data
.
live_info
}
else
{
this
.
$router
.
push
({
path
:
'/index'
})
}
}
})
})
},
},
getDate
(
timestamp
)
{
getDate
(
timestamp
)
{
const
time
=
new
Date
(
parseInt
(
timestamp
))
const
time
=
new
Date
(
parseInt
(
timestamp
*
1000
))
const
year
=
time
.
getFullYear
()
const
year
=
time
.
getFullYear
()
const
month
=
(
time
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)
const
month
=
(
time
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)
const
date
=
(
time
.
getDate
()).
toString
().
padStart
(
2
,
'0'
)
const
date
=
(
time
.
getDate
()).
toString
().
padStart
(
2
,
'0'
)
...
...
src/pages/list/index.vue
浏览文件 @
97e5ed62
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<ul>
<ul>
<template
v-for=
"(item, index) in listData"
>
<template
v-for=
"(item, index) in listData"
>
<li
:key=
"index"
@
click=
"goDetail(item.id)"
>
<li
:key=
"index"
@
click=
"goDetail(item.id)"
>
<img
:src=
"
item.poster_url
"
alt=
""
>
<img
:src=
"
getImg(item.poster_url)
"
alt=
""
>
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"card-tit"
>
{{
item
.
name
}}
</div>
<div
class=
"card-tit"
>
{{
item
.
name
}}
</div>
<div
class=
"state"
>
<div
class=
"state"
>
...
@@ -75,7 +75,7 @@ export default {
...
@@ -75,7 +75,7 @@ export default {
})
})
},
},
getDate
(
timestamp
)
{
getDate
(
timestamp
)
{
const
time
=
new
Date
(
parseInt
(
timestamp
))
const
time
=
new
Date
(
parseInt
(
timestamp
*
1000
))
const
year
=
time
.
getFullYear
()
const
year
=
time
.
getFullYear
()
const
month
=
(
time
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)
const
month
=
(
time
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)
const
date
=
(
time
.
getDate
()).
toString
().
padStart
(
2
,
'0'
)
const
date
=
(
time
.
getDate
()).
toString
().
padStart
(
2
,
'0'
)
...
@@ -91,6 +91,10 @@ export default {
...
@@ -91,6 +91,10 @@ export default {
id
:
id
id
:
id
}
}
})
})
},
getImg
(
data
)
{
const
img
=
JSON
.
parse
(
data
)[
0
].
file_url
return
img
}
}
}
}
}
}
...
...
src/pages/login/index.vue
浏览文件 @
97e5ed62
...
@@ -99,20 +99,38 @@ export default {
...
@@ -99,20 +99,38 @@ export default {
return
false
return
false
}
}
}
}
const
urlParam
=
{
}
if
(
this
.
$route
.
query
.
activity_id
)
{
urlParam
.
activity_id
=
this
.
$route
.
query
.
activity_id
urlParam
.
source
=
this
.
$route
.
query
.
source
this
.
form
.
accountLogin2
.
activity_id
=
this
.
$route
.
query
.
activity_id
this
.
form
.
accountLogin2
.
source
=
this
.
$route
.
query
.
source
this
.
form
.
accountLogin1
.
activity_id
=
this
.
$route
.
query
.
activity_id
this
.
form
.
accountLogin1
.
source
=
this
.
$route
.
query
.
source
}
console
.
log
(
this
.
$route
.
query
.
activity_id
)
action
.
Login
.
login
(
this
.
loginType
?
this
.
form
.
accountLogin2
:
this
.
form
.
accountLogin1
).
then
((
res
)
=>
{
action
.
Login
.
login
(
this
.
loginType
?
this
.
form
.
accountLogin2
:
this
.
form
.
accountLogin1
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/index'
path
:
'/details'
,
query
:
urlParam
}
)
}
)
}
}
Toast
(
res
.
msg
)
Toast
(
res
.
msg
)
}
)
}
)
}
,
}
,
isLogin
()
{
isLogin
()
{
action
.
Login
.
login
({
action
:
3
}
).
then
((
res
)
=>
{
const
param
=
{
action
:
3
}
if
(
this
.
$route
.
query
.
activity_id
)
{
param
.
activity_id
=
this
.
$route
.
query
.
activity_id
param
.
source
=
this
.
$route
.
query
.
source
}
action
.
Login
.
login
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
===
5004
)
{
if
(
res
.
code
===
5004
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/
index
'
path
:
'/
details
'
}
)
}
)
// 跳转
// 跳转
}
}
...
...
src/router/routes.js
浏览文件 @
97e5ed62
...
@@ -4,7 +4,8 @@ export default [
...
@@ -4,7 +4,8 @@ export default [
/* 如果所有页面都没找到 - 指向 */
/* 如果所有页面都没找到 - 指向 */
{
path
:
'*'
,
component
:
()
=>
import
(
'@/components/errorPages/404.vue'
)
},
{
path
:
'*'
,
component
:
()
=>
import
(
'@/components/errorPages/404.vue'
)
},
/* 登录页面 */
/* 登录页面 */
{
path
:
'/login'
,
{
path
:
'/login'
,
name
:
'login'
,
name
:
'login'
,
component
:
()
=>
import
(
'../pages/login/index.vue'
)
component
:
()
=>
import
(
'../pages/login/index.vue'
)
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论