陶杰
2025-01-19 87a56274d598af9842b593ec972f517161f60707
pages/home/components/home-category.vue
@@ -37,6 +37,25 @@
      },
      methods: {
         init(){
            this.today = this.$util.toDate(new Date())
            this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => {
               var data = res.data
               this.list = []
               var arr = data || []
               for (let i = 0; i < arr.length && i < 10; i++) {
                  this.list.push({
                     id: arr[i].id,
                     name: arr[i].name,
                     url: arr[i].imageUrl
                  })
               }
            })
            this.$http.request('get', '/api/customer/flower/up/stock', {}).then(res => {
               var data = res.data
               this.tj = data || 0
            })
         },
         toList(item) {
            // uni.navigateTo({
            //   url:'/sub_pages/customer/trade/list?categoryId='+item.id