Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
Y
year-end-activitiy
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.foundation.frontend
year-end-activitiy
提交
46411812
提交
46411812
编写于
11月 26, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
抽离头部组件的业务数据
上级
861af338
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
45 行增加
和
30 行删除
+45
-30
index.vue
components/h5header/index.vue
+26
-22
index.vue
pages/index.vue
+19
-8
未找到文件。
components/h5header/index.vue
浏览文件 @
46411812
<
template
>
<
template
>
<header>
<header>
<div
class=
"status"
:class=
"
{'bgfff': isScroll}" :style="{height:
b
arHeight + 'px'}">
</div>
<div
class=
"status"
:class=
"
{'bgfff': isScroll}" :style="{height:
statusB
arHeight + 'px'}">
</div>
<div
class=
"head-wrap"
:class=
"
{'bgfff': isScroll}">
<div
class=
"head-wrap"
:class=
"
{'bgfff': isScroll}">
<img
@
click=
"goBack"
:src=
"leftIcon"
>
<img
@
click=
"goBack"
:src=
"leftIcon"
>
<span
v-if=
"isScroll"
>
云鹊奖
</span>
<span
v-if=
"isScroll"
>
{{
title
}}
</span>
<img
@
click=
"goShare"
:src=
"rightIcon"
>
<img
@
click=
"goShare"
:src=
"rightIcon"
>
</div>
</div>
</header>
</header>
...
@@ -17,27 +17,36 @@
...
@@ -17,27 +17,36 @@
export
default
{
export
default
{
name
:
'h5header'
,
name
:
'h5header'
,
props
:
{
scrollVal
:
{
type
:
Number
,
default
:
0
},
title
:
{
type
:
String
,
default
:
'云鹊医-赋能基层医生'
},
shareObj
:
{
type
:
Object
,
default
:
{}
}
},
data
(){
data
(){
return
{
return
{
leftIcon
:
leftimg1
,
leftIcon
:
leftimg1
,
rightIcon
:
rightimg1
,
rightIcon
:
rightimg1
,
isScroll
:
false
,
isScroll
:
false
,
b
arHeight
:
20
statusB
arHeight
:
20
}
}
},
},
created
(){
mounted
(){
try
{
this
.
$rocNative
.
getStatusBarHeight
().
then
(
res
=>
{
this
.
$rocNative
.
getStatusBarHeight
(
res
=>
{
if
(
this
.
isIOS
){
alert
(
JSON
.
stringify
(
res
))
this
.
statusBarHeight
=
res
.
statusBarHeight
;
})
}
else
{
}
catch
(
err
){}
this
.
statusBarHeight
=
res
.
statusBarHeight
/
window
.
devicePixelRatio
;
}
},
})
props
:
{
scrollVal
:
{
type
:
Number
,
default
:
0
},
},
},
watch
:
{
watch
:
{
scrollVal
(
val
){
scrollVal
(
val
){
...
@@ -57,12 +66,7 @@
...
@@ -57,12 +66,7 @@
this
.
$rocNative
.
goBack
();
this
.
$rocNative
.
goBack
();
},
},
goShare
(){
goShare
(){
this
.
$rocNative
.
shareWechat
({
this
.
$rocNative
.
shareWechat
(
this
.
shareObj
);
shareUrl
:
window
.
location
.
href
,
title1
:
'年终活动-标题'
,
title2
:
'年终活动-文字描述'
,
shareImageUrl
:
'https://test-file.yunqueyi.com/png/2019/11/18/1574046505000_48x48.png'
});
}
}
}
}
}
}
...
...
pages/index.vue
浏览文件 @
46411812
<
template
>
<
template
>
<section
class=
"index-wrap"
>
<section
class=
"index-wrap"
>
<h5header
v-if=
"!isWeb"
:scrollVal=
"scrollVal"
/>
<h5header
v-if=
"!isWeb"
:scrollVal=
"scrollVal"
title=
"云鹊奖"
:shareObj=
"shareObj"
/>
<div
id=
"imgHeight1"
>
<div
id=
"imgHeight1"
>
<img
src=
"../assets/img/img1.png"
/>
<img
src=
"../assets/img/img1.png"
/>
<img
src=
"../assets/img/img2.png"
/>
<img
src=
"../assets/img/img2.png"
/>
...
@@ -75,6 +79,18 @@ export default {
...
@@ -75,6 +79,18 @@ export default {
},
},
components
:
{
components
:
{
h5header
h5header
},
asyncData
(
params
){
return
{
shareObj
:
{
shareUrl
:
'http://'
+
params
.
req
.
host
+
params
.
req
.
originalUrl
,
title1
:
'年终活动-标题'
,
title2
:
'年终活动-文字描述'
,
shareImageUrl
:
'https://test-file.yunqueyi.com/png/2019/11/18/1574046505000_48x48.png'
}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -83,7 +99,7 @@ export default {
...
@@ -83,7 +99,7 @@ export default {
doctorIdCnt
:
''
,
doctorIdCnt
:
''
,
hospitalIdCnt
:
''
,
hospitalIdCnt
:
''
,
scrollVal
:
0
,
scrollVal
:
0
,
isWeb
:
false
isWeb
:
false
,
}
}
},
},
created
(){
created
(){
...
@@ -201,12 +217,7 @@ export default {
...
@@ -201,12 +217,7 @@ export default {
},
},
// 微信分享
// 微信分享
goShare
(){
goShare
(){
this
.
$rocNative
.
shareWechat
({
this
.
$rocNative
.
shareWechat
(
this
.
shareObj
);
shareUrl
:
window
.
location
.
href
,
title1
:
'年终活动-标题'
,
title2
:
'年终活动-文字描述'
,
shareImageUrl
:
'https://test-file.yunqueyi.com/png/2019/11/18/1574046505000_48x48.png'
});
},
},
// 活动规则
// 活动规则
ruleLink
(){
ruleLink
(){
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录