加载提示及细节优化
parent
b78b3f03f3
commit
b1be73e000
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 1 加载中 -->
|
||||
<view v-if="propStatus == 1" class="no-data-box no-data-loading">
|
||||
<text>加载中...</text>
|
||||
<view v-if="propStatus == 1" class="no-data-box no-data-loading loading-animation">
|
||||
<text>{{title}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 2 处理错误 -->
|
||||
<view v-else-if="propStatus == 2" class="no-data-box">
|
||||
<image :src="static_dir+'error.png'" mode="widthFix"></image>
|
||||
<view class="no-data-tips">{{propMsg || '处理错误'}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 0 默认没有数据 -->
|
||||
<view v-else-if="propStatus == 0" class="no-data-box">
|
||||
<image :src="static_dir+'empty.png'" mode="widthFix"></image>
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
data() {
|
||||
return {
|
||||
static_dir: '/static/images/common/',
|
||||
title: app.globalData.get_application_title(),
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
|
|
@ -55,5 +56,33 @@
|
|||
}
|
||||
.no-data-loading text {
|
||||
color: #999;
|
||||
}
|
||||
.loading-animation {
|
||||
background: #e7e7e7 -webkit-linear-gradient(left,#c6c6c6 0%, #c6c6c6 90%) no-repeat 0 0;
|
||||
background-size: 20% 100%;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
font-size: 80rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.loading-animation {
|
||||
-webkit-animation: loading-animation 2s linear infinite;
|
||||
animation: loading-animation 2s linear infinite;
|
||||
}
|
||||
@-webkit-keyframes loading-animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
}
|
||||
@keyframes loading-animation {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -812,9 +812,11 @@
|
|||
|
||||
// 获取数据
|
||||
init() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
if(this.load_status == 0) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
}
|
||||
this.setData({
|
||||
data_list_loding_status: 1
|
||||
});
|
||||
|
|
@ -825,7 +827,9 @@
|
|||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.stopPullDownRefresh();
|
||||
uni.hideLoading();
|
||||
if(this.load_status == 0) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var goods = data.goods;
|
||||
|
|
@ -911,7 +915,9 @@
|
|||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
uni.hideLoading();
|
||||
if(this.load_status == 0) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.msg
|
||||
data_list_loding_msg: res.data.msg
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@
|
|||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.msg
|
||||
data_list_loding_msg: res.data.msg
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -223,12 +223,11 @@
|
|||
z-index: 5;
|
||||
}
|
||||
.cart-content {
|
||||
left: auto;
|
||||
bottom: 130rpx;
|
||||
left: 20rpx;
|
||||
bottom: calc(130rpx + env(safe-area-inset-bottom));
|
||||
width: calc(100% - 40rpx);
|
||||
z-index: 6;
|
||||
max-width: calc(800px - 40rpx);
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.cart-content .cart-list {
|
||||
max-height: 60vh;
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@
|
|||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.msg,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
is_to_login: 0
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
|
||||
<view class="bottom-fixed padding-main">
|
||||
<view class="bottom-line-exclude oh">
|
||||
<button class="bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">保存</button>
|
||||
<button class="bg-main br-main cr-white round text-size-sm" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@
|
|||
<view class="bottom-line-exclude oh">
|
||||
<block v-if="common_user_address_platform_import_list.length > 0 && common_user_address_platform_import_list.indexOf(client_value) != -1">
|
||||
<view class="submit-list">
|
||||
<button class="bg-main br-main cr-white round text-size dis-inline-block fl" type="default" hover-class="none" @tap="address_add_event">添加新地址</button>
|
||||
<button class="bg-main-pair br-main-pair cr-white round text-size dis-inline-block fr" type="default" hover-class="none" @tap="choose_system_address_event">导入系统地址</button>
|
||||
<button class="bg-main br-main cr-white round text-size-sm dis-inline-block fl" type="default" hover-class="none" @tap="address_add_event">添加新地址</button>
|
||||
<button class="bg-main-pair br-main-pair cr-white round text-size-sm dis-inline-block fr" type="default" hover-class="none" @tap="choose_system_address_event">导入系统地址</button>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<button class="bg-main br-main cr-white round text-size wh-auto" type="default" hover-class="none" @tap="address_add_event">添加新地址</button>
|
||||
<button class="bg-main br-main cr-white round text-size-sm wh-auto" type="default" hover-class="none" @tap="address_add_event">添加新地址</button>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue