Commit e0e714f2 by 李伟康

增加加载动画

1 parent 5e74ee83
......@@ -229,7 +229,6 @@ Component({
/**页面初始化 */
async init() {
thisPage = wx.$router.getPageInstance()
wx.$api.showLoading()
try {
const {
data,
......
......@@ -25,7 +25,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$api.showLoading()
wx.hideHomeButton({
success: res => {
wx.hideLoading()
......
......@@ -33,14 +33,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
wx.$api.showLoading()
const sessionId = getSessionId(),
{
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options
wx.nextTick(() => {
wx.hideLoading()
let path = 'pages.index',
obj = {}
if (targetPath) obj.targetPath = targetPath
......
{
"usingComponents": {}
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
.layout{
.layout {
width: 100vw;
height: 100vh;
display: grid;
place-items: center;
.icon{
width: 480rpx;
height: 480rpx;
.loading {
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
<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>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!