Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e0e714f2
authored
Oct 12, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加加载动画
1 parent
5e74ee83
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
10 deletions
login/index/components/Box/Box.js
login/index/index.js
login/loading/loading.js
login/loading/loading.json
login/loading/loading.scss
login/loading/loading.wxml
login/index/components/Box/Box.js
View file @
e0e714f
...
@@ -229,7 +229,6 @@ Component({
...
@@ -229,7 +229,6 @@ Component({
/**页面初始化 */
/**页面初始化 */
async
init
()
{
async
init
()
{
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
=
wx
.
$router
.
getPageInstance
()
wx
.
$api
.
showLoading
()
try
{
try
{
const
{
const
{
data
,
data
,
...
...
login/index/index.js
View file @
e0e714f
...
@@ -25,7 +25,6 @@ Page({
...
@@ -25,7 +25,6 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
wx
.
$api
.
showLoading
()
wx
.
hideHomeButton
({
wx
.
hideHomeButton
({
success
:
res
=>
{
success
:
res
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
...
login/loading/loading.js
View file @
e0e714f
...
@@ -33,14 +33,12 @@ Page({
...
@@ -33,14 +33,12 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
wx
.
$api
.
showLoading
()
const
sessionId
=
getSessionId
(),
const
sessionId
=
getSessionId
(),
{
{
url
,
url
,
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
}
=
this
.
options
}
=
this
.
options
wx
.
nextTick
(()
=>
{
wx
.
nextTick
(()
=>
{
wx
.
hideLoading
()
let
path
=
'pages.index'
,
let
path
=
'pages.index'
,
obj
=
{}
obj
=
{}
if
(
targetPath
)
obj
.
targetPath
=
targetPath
if
(
targetPath
)
obj
.
targetPath
=
targetPath
...
...
login/loading/loading.json
View file @
e0e714f
{
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationStyle"
:
"custom"
}
}
\ No newline at end of file
\ No newline at end of file
login/loading/loading.scss
View file @
e0e714f
.layout
{
.layout
{
width
:
100vw
;
width
:
100vw
;
height
:
100vh
;
height
:
100vh
;
display
:
grid
;
display
:
grid
;
place-items
:
center
;
place-items
:
center
;
.icon
{
width
:
480rpx
;
.loading
{
height
:
480rpx
;
height
:
48rpx
;
view
{
width
:
16rpx
;
height
:
100%
;
display
:
inline-block
;
background-color
:
#0052d9
;
animation
:
stretchdelay
1
.2s
infinite
ease-in-out
;
margin
:
0
4rpx
;
&
:nth-child
(
2
)
{
animation-delay
:
-1
.1s
;
}
&
:nth-child
(
3
)
{
animation-delay
:
-1s
;
}
&
:nth-child
(
4
)
{
animation-delay
:
-.9s
;
}
}
}
}
@keyframes
stretchdelay
{
0
%
,
100
%
,
40
%
{
transform
:
scaley
(
.33
);
}
20
%
{
transform
:
scaley
(
1
);
}
}
}
}
\ No newline at end of file
\ No newline at end of file
login/loading/loading.wxml
View file @
e0e714f
<view class="layout">
<view class="layout">
<!-- <image class="icon" src="https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/COVER_LIVE.gif"></image> -->
<view class="loading">
<block wx:for="{{4}}" wx:key="index">
<view></view>
</block>
</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment