Explorar o código

供货商模拟数据

jiangfeng %!s(int64=5) %!d(string=hai) anos
pai
achega
9a2d6cee7a
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      ghsApp/src/admin/ghs/shop.vue

+ 6 - 1
ghsApp/src/admin/ghs/shop.vue

@@ -37,20 +37,25 @@
 <template>
 	<div class="app-content">
 			<view class="list-box">
-				<view class="flex list" v-for="res in list">
+				<view class="flex list" v-if="list.length>0" v-for="res in list">
 						<image :src="res.img"></image>
 					<view class="list-msg">
 							<view>{{res.name}}</view>
 							<text>累积消费{{res.money}}</text>
 					</view>
 				</view>
+				<block v-else>
+					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+				</block>
 			</view>
 	</div>
 </template>
 
 <script>
 	import { getList } from "@/api/ghs";
+	import AppWrapperEmpty from '@/components/app-wrapper-empty'
 	export default {
+		components: {AppWrapperEmpty,},
 		name: 'ghs-shop',
 		data() {
 			return {