xiebaomin 1 سال پیش
والد
کامیت
81b6464de6
3فایلهای تغییر یافته به همراه28 افزوده شده و 3 حذف شده
  1. 22 0
      pages/goods/components/procurement-empty.vue
  2. 6 3
      pages/goods/procurement.vue
  3. BIN
      static/procurement/pro-empty.png

+ 22 - 0
pages/goods/components/procurement-empty.vue

@@ -0,0 +1,22 @@
+<template>
+    <view class="empty">
+        <image class="img" src="@/static/procurement/pro-empty.png" mode="aspectFill"></image>
+    </view>
+</template>
+
+<script>
+</script>
+
+<style scoped lang="scss">
+    .empty {
+        width: 100vw;
+        height: 100vh;
+        display: flex;
+        justify-content: center;
+    }
+    .img {
+        width: 386rpx;
+        height: 286rpx;
+        margin-top: 371rpx;
+    }
+</style>

+ 6 - 3
pages/goods/procurement.vue

@@ -93,12 +93,13 @@
                 </form>
             </view>
         </tui-bottom-popup>
-        <view :style="{ marginTop: procurementList.length > 0 ? '0' : '88rpx' }">
+        <view v-if="procurementList.length > 2" :style="{ marginTop: procurementList.length > 0 ? '0' : '88rpx' }">
             <!--加载loadding-->
             <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
             <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
             <!--加载loadding-->
         </view>
+        <proEmpty v-if="procurementList.length === 0"/>
     </view>
 </template>
 
@@ -106,9 +107,11 @@
 import proCard from './components/procurement_card.vue'
 import { mapState } from 'vuex'
 import procurementMixins from './mixins/procurementMixins.js'
+import proEmpty from './components/procurement-empty.vue'
 export default {
     components: {
-        proCard
+        proCard,
+        proEmpty
     },
     mixins: [procurementMixins],
     data() {
@@ -171,7 +174,7 @@ export default {
     },
     computed: {
         // 是否登录
-        ...mapState(['hasLogin', 'userInfo'])
+        ...mapState(['hasLogin'])
     },
     onShow() {
         if(this.hasLogin){

BIN
static/procurement/pro-empty.png