lilei 4 роки тому
батько
коміт
31660db45f

+ 3 - 3
pages/spotCheckCenter/spotChecking.vue

@@ -29,7 +29,7 @@
 								</view>
 							</view>
 						</view>
-						<u-empty :text="noDataText" img-width="120" v-if="list.length == 0 && status != 'loading'" mode="list"></u-empty>
+						<u-empty style="height: auto;padding-top: 10vh;" :text="noDataText" img-width="120" v-if="list.length == 0 && status != 'loading'" mode="list"></u-empty>
 						<view v-if="index==current" style="padding: 20upx;"><u-loadmore v-if="total > pageSize || status == 'loading'" :status="status" /></view>
 					</scroll-view>
 				</swiper-item>
@@ -155,7 +155,7 @@ export default {
 			};
 			this.status = 'loading';
 			getTaskList(params).then(res => {
-				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				if (res.status == 200) {
 					if (_this.pageNo > 1) {
 						_this.list = _this.list.concat(res.data.list || []);
 					} else {
@@ -165,7 +165,7 @@ export default {
 				} else {
 					_this.list = [];
 					_this.total = 0;
-					_this.noDataText = res.message;
+					_this.noDataText = res.message || '暂无数据';
 				}
 				_this.status = 'loadmore';
 			});

+ 8 - 6
pages/userCenter/personInfo.vue

@@ -24,7 +24,7 @@
 			<view class="content-item">
 				<text>可点检门店</text>
 				<view style="color: #007AFF;" @click="viewStores">
-					{{pageData.userStoreList.length}}个 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
+					{{pageData.userStoreList&&pageData.userStoreList.length}}个 <u-icon name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
 				</view>
 			</view>
 		</view>
@@ -51,11 +51,13 @@
 		// 判断员工性别
 		filters: {
 			filterRoles(val){
-				 let arr = []
-				 val.map(item => {
-					 arr.push(item.name)
-				 })
-				 return arr.join(',')
+				 if(val){
+					let arr = []
+					val.map(item => {
+						arr.push(item.name)
+					})
+					return arr.join(',') 
+				 }
 			}
 		},
 		methods:{