Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-learning-report
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-learning-report
提交
5ded25c2
提交
5ded25c2
编写于
2月 21, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新的导入等
上级
dfa359c6
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
220 行增加
和
13 行删除
+220
-13
common-header-new.vue
components/common/common-header-new.vue
+212
-0
index.vue
pages/index.vue
+6
-11
prolist.vue
pages/prolist.vue
+2
-2
未找到文件。
components/common/common-header-new.vue
0 → 100644
浏览文件 @
5ded25c2
<!-- 通用Navbar -->
<
template
>
<section
:class=
"isFixNavbar ? 'nav-top-new fixed' : 'nav-top-new'"
:style=
"'height:' + navHeight"
>
<div
class=
"nav-part"
:style=
"'background:' + bgColor + ';'
+ 'padding-top:' + paddingTop + ';border-bottom:' + borderStyle"
>
<div
class=
"nav-title"
>
<span
class=
"nav-back"
@
click=
"goBack"
>
<img
v-show=
"isBlack"
src=
"../../assets/images/left-arrow-black.png"
alt=
""
>
<img
v-show=
"!isBlack"
src=
"../../assets/images/left-arrow-black.png"
alt=
""
>
</span>
<span
class=
"nav-title-title"
v-show=
"bgColor!=='none'"
>
{{
title
}}
</span>
<span
v-show=
"isShowShare"
class=
"nav-share"
@
click=
"goShare"
>
<img
src=
"https://pica-pro.oss-cn-shanghai.aliyuncs.com/eagle_plan/courses/Group17_hover%403x.png"
>
</span>
</div>
</div>
</section>
</
template
>
<
script
>
export
default
{
name
:
"common-navbar"
,
data
()
{
return
{
navbarHeight
:
28
,
contentHeight
:
35
,
fontSize
:
37.5
,
content
:
""
,
shareImageUrl
:
"https://file.yunqueyi.com/logo.png?version="
+
new
Date
().
getTime
()
};
},
props
:
{
bgColor
:
{
type
:
String
,
default
:
""
},
title
:
{
type
:
String
,
default
:
"暂无数据"
},
// 是否fix定位
isFixNavbar
:
{
type
:
Boolean
,
default
:
true
},
burialPoint
:
{
default
:
""
,
type
:
String
},
backMethod
:
{
type
:
String
,
default
:
"native"
// inner native
},
isShowShare
:
{
type
:
Boolean
,
default
:
false
},
borderStyle
:
{
type
:
String
,
default
:
"0px solid #e7e7e7"
},
isBlack
:
{
type
:
Boolean
,
default
:
true
}
},
computed
:
{
navHeight
()
{
if
(
this
.
isFixNavbar
)
{
return
'54px'
;
}
else
{
return
(
this
.
navbarHeight
+
this
.
contentHeight
)
/
this
.
fontSize
+
"rem"
;
}
},
paddingTop
()
{
return
this
.
navbarHeight
/
this
.
fontSize
+
"rem"
;
}
},
mounted
()
{
let
htmlDom
=
document
.
getElementsByTagName
(
"html"
)[
0
].
style
.
fontSize
;
this
.
fontSize
=
htmlDom
;
},
methods
:
{
//返回
goBack
()
{
if
(
this
.
$rocNative
.
isWeb
)
{
this
.
$router
.
back
(
-
1
);
}
else
{
this
.
$rocNative
.
goBack
();
}
},
//分享
goShare
()
{
let
url
=
location
.
href
,
_this
=
this
;
rocNative
.
shareWechat
({
type
:
6
,
shareId
:
0
,
shareUrl
:
'shareUrl'
,
title1
:
"this.shareTitle1"
,
title2
:
"this.shareTitle2"
,
shareImageUrl
:
"https://file.yunqueyi.com/logo.png?version="
+
new
Date
().
getTime
()
});
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.back {
position: absolute;
left: 0px;
top: 15px;
z-index: 2010;
display: inline-block;
width: 50px;
height: 60px;
img {
padding: 10px;
width: 20px;
height: 20px;
}
}
.nav-top-new {
position: relative;
z-index: 1000000010;
font-size: 18px;
height: 56px;
// margin-top: 20px;
padding-top: 20px;
background: #fff;
color: #333;
.nav-back {
font-size: 18px;
display: inline-block;
position: absolute;
left: 0px;
top: 0;
z-index: 1000000011;
height: 25px;
width: 55px;
padding-left: 15px;
padding-right: 15px;
}
img {
display: block;
padding-top: 2px;
height: 20px;
width: 20px;
}
.nav-icon {
display: inline-block;
width: 50px;
height: 50px;
svg {
stroke: #000;
fill: #0000ff;
}
}
.nav-share {
position: absolute;
right: 16px;
top: 0;
z-index: 2010;
height: 20px;
width: 20px;
}
.nav-title {
font-size: 18px;
position: relative;
top: 10px;
left: 0;
z-index: 1000000011;
display: inline-block;
width: 100%;
height: 36px;
&-title {
height: 18px;
font-size: 18px;
font-weight: 700;
color: rgba(51, 51, 51, 1);
line-height: 26px;
}
}
.nav-part {
width: 100%;
font-size: 18px;
text-align: center;
padding: 0 0 10px 0;
}
}
.nav-part {
font-size: 18px;
position: fixed;
top: 0;
left: 0;
z-index: 1000000011;
border-bottom: 0px solid #e7e7e7;
background: #fff;
img {
display: block;
padding-top: 2px;
height: 20px;
width: 20px;
}
}
</
style
>
\ No newline at end of file
pages/index.vue
浏览文件 @
5ded25c2
...
...
@@ -349,20 +349,15 @@ export default {
// false
// );
window
.
addEventListener
(
'scroll'
,
()
=>
{
this
.
handleScroll
()
},
false
);
window
.
addEventListener
(
'scroll'
,
()
=>
{
this
.
handleScroll
()
},
false
);
},
methods
:
{
handleScroll
()
{
var
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
// var scrollTop =
// window.pageYOffset ||
// document.documentElement.scrollTop ||
// document.body.scrollTop;
var
scrollTop
=
window
.
scrollY
;
if
(
scrollTop
>
40
)
{
this
.
isScroll
=
true
;
}
else
{
...
...
pages/prolist.vue
浏览文件 @
5ded25c2
...
...
@@ -2,13 +2,13 @@
<!-- 专项合作首页: 我参与的,其它项目 -->
<div
class=
"pro-list-container"
>
<!--
<CommonHeader
:title=
"title"
></CommonHeader>
-->
<CommonHeader
borderStyle=
"1px solid #e7e7e7"
:title=
"title"
></CommonHeader
>
<CommonHeader
New
borderStyle=
"1px solid #e7e7e7"
:title=
"title"
></CommonHeaderNew
>
<CoopListItem
style=
"margin: 10px 0;"
:dataList=
"projectList"
></CoopListItem>
<Loading
v-if=
"showLoading"
/>
</div>
</
template
>
<
script
>
import
CommonHeader
from
"@/components/common/common-header
"
;
import
CommonHeader
New
from
"@/components/common/common-header-new
"
;
import
CoopListItem
from
"@/components/bussiness/coop-list-item"
;
import
Loading
from
"@/components/common/common-loading"
;
import
{
getProjectList
}
from
"@/service"
;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录