Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
e68fa07b
提交
e68fa07b
编写于
1月 21, 2019
作者:
杨广俊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
format
上级
816853b3
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
185 行增加
和
180 行删除
+185
-180
activity.vue
src/views/activity/activity.vue
+185
-180
未找到文件。
src/views/activity/activity.vue
浏览文件 @
e68fa07b
...
...
@@ -6,183 +6,189 @@
<section
class=
"activity-box"
>
<div
class=
"activity-count"
>
共
{{
list
.
length
}}
个活动
</div>
<div
class=
"activity-list"
>
<div
class=
"activity-item"
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"goToPage(item)"
>
<img
v-lazy=
"item.imageUrl"
class=
"img"
:key=
"item.imageUrl"
/>
<div
class=
"activity-item"
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"goToPage(item)"
>
<img
v-lazy=
"item.imageUrl"
class=
"img"
:key=
"item.imageUrl"
>
<!--
<div
class=
"time"
>
活动时间:9月3日-9月9日
</div>
-->
</div>
<div
class=
"no-show"
v-if=
"list.length.length == 0"
>
暂无数据
</div>
<div
class=
"no-show"
v-if=
"list.length.length == 0"
>
暂无数据
</div>
</div>
<BackTop
v-if=
"isShowBackTop"
:burialPoint=
"pointStyle"
></BackTop>
</section>
</section>
</
template
>
<
script
>
import
TopNav
from
'../../components/teacher/topNav'
;
import
BackTop
from
'../../components/teacher/backTop'
;
import
{
activity_action
}
from
'../../utils/buryingPoint'
;
import
{
deepCopy
}
from
'../../utils'
;
import
TopNav
from
"../../components/teacher/topNav"
;
import
BackTop
from
"../../components/teacher/backTop"
;
import
{
activity_action
}
from
"../../utils/buryingPoint"
;
import
{
deepCopy
}
from
"../../utils"
;
export
default
{
data
()
{
data
()
{
return
{
backMethod
:
'native'
,
tittle
:
''
,
backMethod
:
"native"
,
tittle
:
""
,
list
:
[],
bgColor
:
'#fff'
,
navTitle
:
' 专项合作'
,
bgColor
:
"#fff"
,
navTitle
:
" 专项合作"
,
isBorder
:
true
,
isNavFix
:
true
,
id
:
1
,
tabName
:
'活动'
,
tabName
:
"活动"
,
tabList
:
[],
isShowBackTop
:
false
,
pointStyle
:
'activity'
,
pointStyle
:
"activity"
,
token
:
null
}
};
},
components
:{
components
:
{
TopNav
,
BackTop
},
created
(){
created
()
{
let
_this
=
this
;
this
.
id
=
this
.
$route
.
query
.
categoryId
||
1
this
.
navTitle
=
this
.
id
==
1
?
'专项合作'
:
'活动掠影'
window
.
__getUserInfo
=
function
(
parm
)
{
_this
.
token
=
parm
.
userToken
_this
.
getTabData
()
}
window
.
addEventListener
(
'scroll'
,
this
.
scrollFun
);
if
(
window
.
__isWeb
)
{
this
.
getTabData
()
this
.
id
=
this
.
$route
.
query
.
categoryId
||
1
;
this
.
navTitle
=
this
.
id
==
1
?
"专项合作"
:
"活动掠影"
;
window
.
__getUserInfo
=
function
(
parm
)
{
_this
.
token
=
parm
.
userToken
;
_this
.
getTabData
();
};
window
.
addEventListener
(
"scroll"
,
this
.
scrollFun
);
if
(
window
.
__isWeb
)
{
this
.
getTabData
();
}
this
.
getUserInfo
()
this
.
getUserInfo
();
},
mounted
(){
},
beforeDestroyed
(){
window
.
removeEventListener
(
'scroll'
,
this
.
scrollFun
)
},
mounted
()
{},
methods
:{
beforeDestroyed
()
{
window
.
removeEventListener
(
"scroll"
,
this
.
scrollFun
);
},
methods
:
{
//获取版本号
getUserInfo
()
{
getUserInfo
()
{
rocNative
.
getUserInfo
({
__funcName
:
'__getUserInfo'
})
__funcName
:
"__getUserInfo"
});
},
scrollFun
()
{
scrollFun
()
{
let
scrollTop
=
document
.
documentElement
.
scrollTop
;
this
.
isShowBackTop
=
scrollTop
>
0
?
true
:
false
;
},
goToPage
(
itemData
){
let
paramList
=
deepCopy
(
this
.
setEventByModuleCode
(
itemData
))
let
isStrokeUrl
=
paramList
[
0
]
&&
paramList
[
0
][
'value'
]
&&
paramList
[
0
][
'value'
].
indexOf
(
'stroke.js'
)
!==
-
1
let
strokeUrl
=
''
if
(
isStrokeUrl
)
{
strokeUrl
=
paramList
[
0
][
'value'
]
+
'&token='
+
this
.
token
paramList
[
0
][
'value'
]
=
strokeUrl
goToPage
(
itemData
)
{
let
paramList
=
deepCopy
(
this
.
setEventByModuleCode
(
itemData
));
let
isStrokeUrl
=
paramList
[
0
]
&&
paramList
[
0
][
"value"
]
&&
paramList
[
0
][
"value"
].
indexOf
(
"stroke.js"
)
!==
-
1
;
let
strokeUrl
=
""
;
if
(
isStrokeUrl
)
{
strokeUrl
=
paramList
[
0
][
"value"
]
+
"&token="
+
this
.
token
;
paramList
[
0
][
"value"
]
=
strokeUrl
;
}
rocNative
.
dispatchEventByModuleCode
({
modeCode
:
itemData
.
appModuleInfo
.
code
,
jsonString
:
paramList
})
});
this
.
appBuryingPointEntrust
({
...
activity_action
,
labelId
:
itemData
.
id
,
functionCode
:
this
.
id
==
1
?
'c_project'
:
'f_activity'
,
actionCode
:
this
.
id
==
1
?
'c_project_tab'
:
'c_activity_tab'
,
functionCode
:
this
.
id
==
1
?
"c_project"
:
"f_activity"
,
actionCode
:
this
.
id
==
1
?
"c_project_tab"
:
"c_activity_tab"
,
labelValue
:
itemData
.
title
,
createdTime
:
new
Date
().
getTime
()
})
});
},
// 埋点
appBuryingPointEntrust
(
val
)
{
rocNative
.
appBuryingPointEntrust
(
val
)
rocNative
.
appBuryingPointEntrust
(
val
);
},
//查询tab
getTabData
()
{
getTabData
()
{
let
_this
=
this
,
parm
=
{
id
:
_this
.
id
||
1
,
setEntry
:
'headers'
,
token
:
_this
.
token
,
}
_this
.
GET
(
'contents/contentList/tabById'
,
parm
).
then
(
function
(
res
)
{
if
(
res
.
code
===
'000000'
)
{
_this
.
navTitle
=
res
.
data
.
name
||
''
;
_this
.
tabName
=
_this
.
tabList
[
0
]
||
''
;
setEntry
:
"headers"
,
token
:
_this
.
token
};
_this
.
GET
(
"contents/contentList/tabById"
,
parm
).
then
(
function
(
res
)
{
if
(
res
.
code
===
"000000"
)
{
_this
.
navTitle
=
res
.
data
.
name
||
""
;
_this
.
tabName
=
_this
.
tabList
[
0
]
||
""
;
// if(_this.tabList.length>0){
// _this.tabName = _this.tabList[0] || '';
// }
_this
.
getData
();
}
else
{
}
else
{
//alert(res.message)
}
})
});
},
//查询内容
getData
()
{
getData
()
{
let
_this
=
this
,
parm
=
{
id
:
_this
.
id
,
tabName
:
_this
.
tabName
,
setEntry
:
'headers'
,
tabName
:
_this
.
tabName
,
setEntry
:
"headers"
,
token
:
_this
.
token
}
};
// if(_this.tabName != ''){
// parm.tabName = _this.tabName
// }
_this
.
GET
(
'contents/contentList/contentById'
,
parm
).
then
(
function
(
res
)
{
if
(
res
.
code
===
'000000'
){
_this
.
list
=
res
.
data
.
contentList
&&
res
.
data
.
contentList
.
contentList
||
[];
_this
.
GET
(
"contents/contentList/contentById"
,
parm
).
then
(
function
(
res
)
{
if
(
res
.
code
===
"000000"
)
{
_this
.
list
=
(
res
.
data
.
contentList
&&
res
.
data
.
contentList
.
contentList
)
||
[];
}
})
});
}
},
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'../../style/mixin'
;
.activity-box
{
@import
"../../style/mixin"
;
.activity-box
{
padding
:
px2rem
(
15px
);
background
:
#fff
;
}
.no-show
{
}
.no-show
{
font-size
:
px2rem
(
15px
);
color
:
#999
;
text-align
:
center
;
}
.activity-count
{
}
.activity-count
{
color
:
#999
;
font-size
:
px2rem
(
15px
);
padding-bottom
:
px2rem
(
15px
);
}
.activity-item
{
}
.activity-item
{
// position: relative;
width
:
px2rem
(
345px
);
max-height
:
px2rem
(
170px
);
margin-bottom
:
px2rem
(
10px
)
;
margin-bottom
:
px2rem
(
10px
);
// box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15);
display
:
block
;
overflow
:
hidden
;
.img
{
.img
{
width
:
100%
;
max-height
:
100%
;
}
.time
{
.time
{
position
:
absolute
;
color
:
#fff
;
color
:
#fff
;
height
:
px2rem
(
25px
);
line-height
:
px2rem
(
25px
);
background
:
RGBA
(
0
,
0
,
0
,
0
.1
);
...
...
@@ -194,6 +200,5 @@ export default {
font-size
:
px2rem
(
14px
);
padding-left
:
px2rem
(
5px
);
}
}
}
</
style
>
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录