Commit 2873f1ef authored by 英思-陈欢's avatar 英思-陈欢

增加loading

parent 611ffd12
...@@ -103,4 +103,10 @@ ...@@ -103,4 +103,10 @@
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
} }
.loading-icon {
display: block;
margin: 0 auto;
width: 26px;
height: 26px;
}
</style> </style>
<template> <template>
<view class="container"> <view class="container">
<view class="content"> <view class="content">
<view class="list"> <view class="list" v-if="detail">
<view class="list-item u-flex u-flex-between u-flex-items-center"> <view class="list-item u-flex u-flex-between u-flex-items-center">
<text>个人账户支付</text> <text>个人账户支付</text>
<view class="u-flex u-flex-center u-flex-items-center"> <view class="u-flex u-flex-center u-flex-items-center">
...@@ -93,10 +93,11 @@ ...@@ -93,10 +93,11 @@
data() { data() {
return { return {
form: {} as any, form: {} as any,
detail: {} as any, detail: null as any,
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -117,6 +118,7 @@ ...@@ -117,6 +118,7 @@
} }
}) })
} }
xma.hideLoading()
}) })
}, },
}, },
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -58,10 +59,12 @@ ...@@ -58,10 +59,12 @@
getAreaName, getAreaName,
form: null as any, form: null as any,
list: [], list: [],
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -85,11 +88,14 @@ ...@@ -85,11 +88,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</template> </template>
...@@ -99,11 +100,13 @@ ...@@ -99,11 +100,13 @@
getAreaName, getAreaName,
form: {} as any, form: {} as any,
list: [], list: [],
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -131,11 +134,14 @@ ...@@ -131,11 +134,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -165,6 +166,7 @@ ...@@ -165,6 +166,7 @@
}) })
this.list = res; this.list = res;
} }
xma.hideLoading()
}) })
}, },
}, },
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -31,10 +32,12 @@ ...@@ -31,10 +32,12 @@
return { return {
form: null as any, form: null as any,
list: [], list: [],
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -58,11 +61,14 @@ ...@@ -58,11 +61,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -91,10 +92,12 @@ ...@@ -91,10 +92,12 @@
getAreaName, getAreaName,
form: null as any, form: null as any,
list: [], list: [],
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -122,11 +125,14 @@ ...@@ -122,11 +125,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -54,10 +55,12 @@ ...@@ -54,10 +55,12 @@
getAreaName, getAreaName,
form: {} as any, form: {} as any,
list: [], list: [],
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -81,11 +84,14 @@ ...@@ -81,11 +84,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
<template> <template>
<view class="container"> <view class="container">
<view class="content"> <view class="content">
<view class="list"> <view class="list" v-if="detail">
<view class="list-item u-flex u-flex-between u-flex-items-center"> <view class="list-item u-flex u-flex-between u-flex-items-center">
<text>身份证件类型</text> <text>身份证件类型</text>
<view class="u-flex u-flex-center u-flex-items-center"> <view class="u-flex u-flex-center u-flex-items-center">
...@@ -53,10 +53,11 @@ ...@@ -53,10 +53,11 @@
return { return {
getKeyValue, getKeyValue,
form: {} as any, form: {} as any,
detail: {} as any, detail: null as any,
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getDetail(); this.getDetail();
}, },
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
} }
}) })
} }
xma.hideLoading()
}) })
}, },
}, },
......
<template> <template>
<view class="container"> <view class="container" v-if="detail">
<view class="header"> <view class="header">
<view class="info u-flex"> <view class="info u-flex">
<image src=""></image> <image src=""></image>
...@@ -102,10 +102,11 @@ ...@@ -102,10 +102,11 @@
return { return {
getKeyValue, getKeyValue,
form: {} as any, form: {} as any,
detail: {} as any, detail: null as any,
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getDetail(); this.getDetail();
}, },
...@@ -126,6 +127,7 @@ ...@@ -126,6 +127,7 @@
} }
}) })
} }
xma.hideLoading()
}) })
}, },
}, },
......
<template> <template>
<view class="container"> <view class="container">
<view class="content"> <view class="content">
<view class="list"> <view class="list" v-if="detail">
<!-- <view class="name list-item u-flex u-flex-items-center"> <!-- <view class="name list-item u-flex u-flex-items-center">
<image src="@/static/images/tax.png"></image> <image src="@/static/images/tax.png"></image>
<text>9009900000000</text> <text>9009900000000</text>
...@@ -97,10 +97,11 @@ export default Vue.extend({ ...@@ -97,10 +97,11 @@ export default Vue.extend({
data() { data() {
return { return {
form: {} as any, form: {} as any,
detail: {} as any, detail: null as any,
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList() this.getList()
}, },
...@@ -121,6 +122,7 @@ export default Vue.extend({ ...@@ -121,6 +122,7 @@ export default Vue.extend({
} }
}) })
} }
xma.hideLoading()
}) })
} }
}, },
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -65,10 +66,12 @@ ...@@ -65,10 +66,12 @@
getKeyValue, getKeyValue,
form: {} as any, form: {} as any,
list: [], list: [],
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -100,11 +103,14 @@ ...@@ -100,11 +103,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
<template> <template>
<view class="container"> <view class="container">
<view class="content"> <view class="content" v-if="detail">
<view class="list"> <view class="list">
<view class="name list-item u-flex u-flex-between u-flex-items-center"> <view class="name list-item u-flex u-flex-between u-flex-items-center">
<text>基本信息</text> <text>基本信息</text>
...@@ -170,10 +170,11 @@ ...@@ -170,10 +170,11 @@
return { return {
getKeyValue, getKeyValue,
form: {} as any, form: {} as any,
detail: {} as any, detail: null as any,
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getDetail(); this.getDetail();
}, },
...@@ -194,6 +195,7 @@ ...@@ -194,6 +195,7 @@
} }
}) })
} }
xma.hideLoading()
}) })
} }
}, },
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
</view> </view>
</view> </view>
</view> </view>
<image src="@/static/images/loading.gif" class="loading-icon" v-if="showLoading"></image>
</view> </view>
</view> </view>
</template> </template>
...@@ -54,10 +55,12 @@ ...@@ -54,10 +55,12 @@
getKeyValue, getKeyValue,
form: null as any, form: null as any,
list: [] as any, list: [] as any,
total: 0 total: 0,
showLoading: false
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getList(); this.getList();
}, },
...@@ -87,11 +90,14 @@ ...@@ -87,11 +90,14 @@
this.list = res.list; this.list = res.list;
} }
this.total = res.totalCount; this.total = res.totalCount;
xma.hideLoading()
this.showLoading = false
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if (this.total > this.list.length) { if (this.total > this.list.length) {
this.showLoading = true
this.form.pageNum += 1; this.form.pageNum += 1;
this.getList('loadmore'); this.getList('loadmore');
} }
......
<template> <template>
<view class="container"> <view class="container">
<view class="content"> <view class="content" v-if="detail">
<view class="list"> <view class="list">
<view class="name list-item u-flex u-flex-between u-flex-items-center"> <view class="name list-item u-flex u-flex-between u-flex-items-center">
<text>基本信息</text> <text>基本信息</text>
...@@ -124,10 +124,11 @@ ...@@ -124,10 +124,11 @@
data() { data() {
return { return {
form: {} as any, form: {} as any,
detail: {} as any, detail: null as any,
} }
}, },
onLoad(options: any) { onLoad(options: any) {
xma.showLoading({ title: '加载中'})
this.form = JSON.parse(options.form) this.form = JSON.parse(options.form)
this.getDetail(); this.getDetail();
}, },
...@@ -148,6 +149,7 @@ ...@@ -148,6 +149,7 @@
} }
}) })
} }
xma.hideLoading()
}) })
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment