Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
a70adcc7
提交
a70adcc7
authored
12月 11, 2025
作者:
e
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 修复登录页报复和弹框文字不居中的问题
上级
f0caf954
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
146 行增加
和
138 行删除
+146
-138
login.vue
src/pages/login/login.vue
+12
-4
splash.vue
src/pages/splash/splash.vue
+134
-134
没有找到文件。
src/pages/login/login.vue
浏览文件 @
a70adcc7
...
...
@@ -206,10 +206,6 @@
}
onHide
(()
=>
{
loop
&&
clearInterval
(
loop
)
loop
=
null
direction
=
'right'
count
.
value
=
0
model
.
show
=
false
})
...
...
@@ -456,6 +452,18 @@
width
:
650
rpx
;
}
.fui-descr
{
letter-spacing
:
1
rpx
;
padding
:
50
rpx
;
font-size
:
24
rpx
;
color
:
#b2b2b2
;
padding-top
:
12
rpx
;
padding-bottom
:
48
rpx
;
::v-deep(.fui-text__content)
{
text-indent
:
0
!important
;
}
}
.form
{
position
:
absolute
;
...
...
src/pages/splash/splash.vue
浏览文件 @
a70adcc7
<
script
setup
lang=
"ts"
>
import
{
ref
,
onMounted
,
onUnmounted
}
from
'vue'
;
import
{
getQueryByType
}
from
'/@/api/model/dict'
;
const
mediaUrl
=
ref
(
""
);
const
seconds
=
ref
(
4
);
let
timer
=
null
;
onLoad
(()
=>
{
getServiceItems
()
}
)
onMounted
(()
=>
{
countdown
();
});
onUnmounted
(()
=>
{
clearTimerInterval
()
});
function
clearTimerInterval
(){
clearInterval
(
timer
);
}
function
getServiceItems
()
{
getQueryByType
({
type
:
2
}).
then
((
res
)
=>
{
mediaUrl
.
value
=
res
[
0
].
mediaUrl
;
})
}
function
countdown
()
{
timer
=
setInterval
(()
=>
{
if
(
seconds
.
value
>
0
)
{
seconds
.
value
-=
1
;
console
.
log
(
seconds
.
value
)
}
else
{
clearTimerInterval
()
navigateToLogin
();
}
},
1000
);
}
function
navigateToLogin
()
{
uni
.
redirectTo
({
url
:
'/pages/login/login'
});
// import { onMounted, onUnmounted, ref } from 'vue'
import
{
getQueryByType
}
from
'/@/api/model/dict'
const
mediaUrl
=
ref
(
''
)
const
seconds
=
ref
(
4
)
let
timer
=
null
onLoad
(()
=>
{
getServiceItems
(
)
})
onMounted
(()
=>
{
countdown
()
})
onUnmounted
(()
=>
{
clearTimerInterval
()
})
function
clearTimerInterval
()
{
clearInterval
(
timer
)
}
function
getServiceItems
()
{
getQueryByType
({
type
:
2
}).
then
((
res
)
=>
{
mediaUrl
.
value
=
res
[
0
].
mediaUrl
})
}
function
countdown
()
{
timer
=
setInterval
(()
=>
{
if
(
seconds
.
value
>
0
)
{
seconds
.
value
-=
1
}
else
{
clearTimerInterval
()
navigateToLogin
()
}
},
1000
)
}
function
navigateToLogin
()
{
uni
.
redirectTo
({
url
:
'/pages/login/login'
,
})
}
</
script
>
<
template
>
<view
class=
"container"
>
<image
class=
"splash_bg"
:src=
"mediaUrl"
mode=
"aspectFill"
></image
>
<!--
<view
class=
"middle_logo_content"
>
<view
class=
"container"
>
<image
class=
"splash_bg"
:src=
"mediaUrl"
mode=
"aspectFill"
/
>
<!--
<view
class=
"middle_logo_content"
>
<view
class=
"logo_view"
>
<image
class=
"splash_logo"
src=
"/static/images/home/icon.png"
/>
</view>
...
...
@@ -50,102 +50,102 @@
<image
class=
"server_text_bg"
src=
"/static/images/splash/server_text.png"
></image>
<image
class=
"outline_bg"
src=
"/static/images/splash/outline.png"
></image>
</view>
-->
<view
class=
"countdown_view"
>
<image
class=
"shadow_img"
src=
"/static/images/splash/shadow.png"
/>
<view
class=
"countdown_val"
><text>
{{
seconds
}}
s
</text></view>
</view>
<view
class=
"under_btn_view"
>
<fui-button
height=
"80rpx"
background=
"linear-gradient(233.81deg, rgba(92, 181, 110, 1) 0%, rgba(100, 214, 62, 1) 100%)"
size=
"28rpx"
radius=
"40rpx"
text=
"立即体验"
@
click=
"navigateToLogin"
/>
</view>
</view>
</
template
>
<view
class=
"countdown_view"
>
<image
class=
"shadow_img"
src=
"/static/images/splash/shadow.png"
/>
<view
class=
"countdown_val"
><text>
{{
seconds
}}
s
</text></view
>
</view>
<view
class=
"under_btn_view"
>
<fui-button
height=
"80rpx"
background=
"linear-gradient(233.81deg, rgba(92, 181, 110, 1) 0%, rgba(100, 214, 62, 1) 100%)"
size=
"28rpx"
radius=
"40rpx"
text=
"立即体验"
@
click=
"navigateToLogin"
/>
</view>
</view>
</
template
>
<
style
lang=
"less"
scoped
>
.container
{
height
:
100vh
;
width
:
750
rpx
;
position
:
relative
;
.splash_bg
{
width
:
100%
;
height
:
100vh
;
}
.middle_logo_content
{
position
:
absolute
;
top
:
250
rpx
;
left
:
0
rpx
;
right
:
0
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.logo_view{
width
:
136
rpx
;
height
:
136
rpx
;
border-radius
:
24
rpx
;
background-color
:
#fff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.splash_logo{
width
:
110
rpx
;
height
:
110
rpx
;
}
}
.logo_text_bg
{
margin-top
:
32
rpx
;
width
:
192
rpx
;
height
:
64
rpx
;
}
.server_text_bg
{
width
:
528
rpx
;
height
:
116
rpx
;
}
.outline_bg
{
margin-top
:
-36
rpx
;
width
:
464
rpx
;
height
:
54
rpx
;
}
}
.countdown_view
{
position
:
absolute
;
left
:
612
rpx
;
top
:
118
rpx
;
width
:
108
rpx
;
height
:
52
rpx
;
.shadow_img{
width
:
108
rpx
;
height
:
52
rpx
;
}
.countdown_val
{
width
:
108
rpx
;
height
:
52
rpx
;
position
:
absolute
;
left
:
0
rpx
;
top
:
0
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
26
rpx
;
color
:
#fff
;
font-weight
:
400
;
}
}
.under_btn_view
{
width
:
650
rpx
;
position
:
absolute
;
bottom
:
52
rpx
;
left
:
50
rpx
;
}
}
.container
{
height
:
100vh
;
width
:
750
rpx
;
position
:
relative
;
.splash_bg
{
width
:
100%
;
height
:
100vh
;
}
.middle_logo_content
{
position
:
absolute
;
top
:
250
rpx
;
left
:
0
rpx
;
right
:
0
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.logo_view
{
width
:
136
rpx
;
height
:
136
rpx
;
border-radius
:
24
rpx
;
background-color
:
#fff
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.splash_logo
{
width
:
110
rpx
;
height
:
110
rpx
;
}
}
.logo_text_bg
{
margin-top
:
32
rpx
;
width
:
192
rpx
;
height
:
64
rpx
;
}
.server_text_bg
{
width
:
528
rpx
;
height
:
116
rpx
;
}
.outline_bg
{
margin-top
:
-36
rpx
;
width
:
464
rpx
;
height
:
54
rpx
;
}
}
.countdown_view
{
position
:
absolute
;
left
:
612
rpx
;
top
:
118
rpx
;
width
:
108
rpx
;
height
:
52
rpx
;
.shadow_img
{
width
:
108
rpx
;
height
:
52
rpx
;
}
.countdown_val
{
width
:
108
rpx
;
height
:
52
rpx
;
position
:
absolute
;
left
:
0
rpx
;
top
:
0
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
26
rpx
;
color
:
#fff
;
font-weight
:
400
;
}
}
.under_btn_view
{
width
:
650
rpx
;
position
:
absolute
;
bottom
:
52
rpx
;
left
:
50
rpx
;
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论