Sfoglia il codice sorgente

mod:增加请求loading

weieryang 3 anni fa
parent
commit
95707c4084

+ 7 - 1
anyangWebAPP/pages/myTask/workOrderList/workOrderList.vue

19
 			<uni-list>
19
 			<uni-list>
20
 				<!-- to 属性携带参数跳转详情页面-->
20
 				<!-- to 属性携带参数跳转详情页面-->
21
 				<uni-list-item direction="column" link v-for="(item, index) in listData" :key="index"
21
 				<uni-list-item direction="column" link v-for="(item, index) in listData" :key="index"
22
-					:to="'/pages/myTask/workOrderList/workOrderDetail/workOrderDetail?wid='+item.F_WorkOrderId>
22
+					:to="'/pages/myTask/workOrderList/workOrderDetail/workOrderDetail?wid='+item.F_WorkOrderId">
23
 					<!-- 通过header插槽定义列表的标题 -->
23
 					<!-- 通过header插槽定义列表的标题 -->
24
 					<template v-slot:header>
24
 					<template v-slot:header>
25
 						<view class="uni-title">{{item.F_ComTitle}}</view>
25
 						<view class="uni-title">{{item.F_ComTitle}}</view>
179
 						},
179
 						},
180
 					}
180
 					}
181
 				}
181
 				}
182
+				
183
+				uni.showLoading({
184
+					title: '加载中'
185
+				});
182
 
186
 
183
 				let url = this.urlData.url
187
 				let url = this.urlData.url
184
 				this.$http
188
 				this.$http
185
 					.get(url, params)
189
 					.get(url, params)
186
 					.then((response) => {
190
 					.then((response) => {
187
 						if (response.state.toLowerCase() === "success") {
191
 						if (response.state.toLowerCase() === "success") {
192
+							uni.hideLoading();
188
 							let data = response.rows
193
 							let data = response.rows
189
 							uni.stopPullDownRefresh();
194
 							uni.stopPullDownRefresh();
190
 							this.listData = this.listData.concat(data)
195
 							this.listData = this.listData.concat(data)
198
 					})
203
 					})
199
 					.catch((e) => {
204
 					.catch((e) => {
200
 						console.log(e)
205
 						console.log(e)
206
+						uni.hideLoading();
201
 					})
207
 					})
202
 			},
208
 			},
203
 			workOrderIdClick(value) {
209
 			workOrderIdClick(value) {