Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
Sign in / Register
Toggle navigation
S
site-uniapp
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
王柯
site-uniapp
Commits
0e39523a
提交
0e39523a
authored
2月 15, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
工作台滑动吸顶
父级
24551d7d
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
69 行增加
和
12 行删除
+69
-12
components/navbar/navbar.vue
+1
-0
components/titleBar/titleBar.vue
+1
-0
pages/gallery/gallery.vue
+42
-7
pages/index/index.vue
+10
-1
pages/mine/mine.vue
+15
-4
没有找到文件。
components/navbar/navbar.vue
View file @
0e39523a
...
...
@@ -70,6 +70,7 @@
<
style
lang=
"scss"
>
.navbar-home
{
.navbar-content
{
position
:
relative
;
top
:
0
;
...
...
components/titleBar/titleBar.vue
View file @
0e39523a
...
...
@@ -73,6 +73,7 @@
margin-bottom
:
16px
;
width
:
100%
;
background
:
linear-gradient
(
138.42deg
,
#59a3fe
0%
,
#1757ff
100%
);
z-index
:
999
;
.navbar-v-navbar
{
display
:
flex
;
...
...
pages/gallery/gallery.vue
View file @
0e39523a
...
...
@@ -35,10 +35,11 @@
<text
class=
"text"
>
本周人气最佳:
{{
mostUsed
.
app_name
||
"暂无"
}}
</text>
</view>
</view>
<
view
class=
"app-content"
:style=
"
{'top':statusBarHeight+250+'px'}"
>
<view
class=
"menu-content
"
>
<
titleBar
title=
"欢迎您访问一点通"
v-if=
"isTitleFix"
></titleBar
>
<view
:class=
"isFix?'sticky-fixed':'menu-content'"
:style=
"
{'top':topValue()+'px'}
">
<v-tabs
:tabs=
"tabs"
:scroll=
"true"
:value=
"current"
@
change=
"tabChange"
></v-tabs>
</view>
<view
class=
"app-content"
:style=
"
{'top':statusBarHeight+280+'px'}">
<view
class=
"app-group-content"
>
<view
class=
"app-group-item"
v-for=
"(item,index) in getMenuApps()"
:key=
"index"
>
<view
class=
"title"
>
{{
item
.
group_name
||
"其他"
}}
</view>
...
...
@@ -94,7 +95,10 @@
},
orgName
:
""
,
mostUsed
:
{},
role
:
"PM"
role
:
"PM"
,
isFix
:
false
,
isTitleFix
:
false
,
scrollTop
:
0
}
},
onLoad
()
{
...
...
@@ -117,8 +121,30 @@
}
this
.
getMostUsed
()
},
onPageScroll
(
e
)
{
//#ifdef H5
this
.
isFix
=
true
// #endif
// #ifndef H5
if
(
e
.
scrollTop
>
50
)
{
this
.
isTitleFix
=
true
}
else
{
this
.
isTitleFix
=
false
}
if
(
this
.
statusBarHeight
+
200
>
e
.
scrollTop
)
{
this
.
isFix
=
false
}
else
{
this
.
scrollTop
=
e
.
scrollTop
this
.
isFix
=
true
}
// #endif
},
methods
:
{
topValue
()
{
return
this
.
isFix
?
(
this
.
statusBarHeight
+
40
)
:
(
this
.
statusBarHeight
+
240
)
},
getMenuApps
()
{
console
.
log
(
"是否吸顶"
,
this
.
isFix
);
var
menuApps
=
this
.
apps
.
find
(
item
=>
item
.
app_menu
==
this
.
current
+
1
)
if
(
menuApps
)
{
return
menuApps
.
list
...
...
@@ -615,16 +641,24 @@
}
.menu-content
{
position
:
absolute
;
width
:
100%
;
}
.sticky-fixed
{
width
:
100%
;
position
:
fixed
;
top
:
0
;
z-index
:
999
;
}
.app-content
{
position
:
absolute
;
display
:
flex
;
padding-bottom
:
85px
;
flex-direction
:
column
;
.menu-content
{
display
:
flex
;
}
.app-group-content
{
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -652,6 +686,7 @@
.item
{
display
:
flex
;
margin-top
:
20
rpx
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
...
...
pages/index/index.vue
View file @
0e39523a
...
...
@@ -567,8 +567,17 @@
if
(
result
.
code
==
0
)
{
getApp
().
globalData
.
userInfo
=
result
.
data
this
.
userInfo
=
result
.
data
// this.title = "欢迎" + this.userInfo.user.user_name + "访问一点通"
this
.
role
=
this
.
userInfo
.
identity
.
code
//如果是项目端 获取当前岗位
//如果是工人 获取工人当前项目
// if (this.role == 'PM') {
// let jobs = this.userInfo.user.job_list
// if (jobs) {
// let currentJob = jobs[0]
// }
// }else{
// }
this
.
project_id
=
uni
.
getStorageSync
(
"project_id"
)
console
.
log
(
"当前组织"
,
this
.
project_id
);
if
(
!
this
.
project_id
)
{
...
...
pages/mine/mine.vue
View file @
0e39523a
...
...
@@ -6,7 +6,8 @@
<view
class=
"info-content"
:style=
"
{top:statusBarHeight+45+'px'}">
<image
src=
"../../static/mine-bg.png"
class=
"image"
></image>
<view
class=
"company"
>
{{
currentJob
.
org_name
||
""
}}
</view>
<view
class=
"name"
>
{{
userInfo
.
user
.
user_name
||
""
}}
{{
currentJob
.
job_name
||
""
}}
</view>
<view
class=
"name"
>
{{
userInfo
.
user
.
user_name
||
""
}}
</view>
<view
class=
"job"
>
{{
currentJob
.
job_name
||
""
}}
</view>
<view
class=
"project"
>
{{
currentJob
.
dept_name
||
""
}}
</view>
<image
src=
"../../static/avatar-def.png"
class=
"avatar"
></image>
</view>
...
...
@@ -250,17 +251,27 @@
font-weight
:
500
;
font-size
:
28
rpx
;
left
:
72
rpx
;
top
:
10
0
rpx
;
top
:
8
0
rpx
;
text-align
:
center
;
color
:
#333
;
}
.name
{
position
:
absolute
;
font-weight
:
600
;
font-size
:
28
rpx
;
left
:
72
rpx
;
top
:
140
rpx
;
text-align
:
center
;
color
:
#333
;
}
.job
{
position
:
absolute
;
font-weight
:
400
;
font-size
:
28
rpx
;
left
:
72
rpx
;
top
:
20
0
rpx
;
top
:
18
0
rpx
;
text-align
:
center
;
color
:
#333
;
}
...
...
@@ -271,7 +282,7 @@
font-size
:
28
rpx
;
width
:
630
rpx
;
left
:
72
rpx
;
top
:
2
4
5
rpx
;
top
:
2
3
5
rpx
;
text-align
:
left
;
color
:
#333
;
display
:
-webkit-box
;
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment