quanwei
2 days ago 04102f7237efefa744090ed7c25f7b5d0807b679
mobile/pages/shop/group_buying_list.vue
@@ -141,6 +141,7 @@
            screenWidth: 0,
            currentIndex: 0,
            category_id: '',
            is_category: true,
            store_open: false
         };
      },
@@ -167,8 +168,18 @@
         this.restoreData();
         // 获取分类 by lyzflash
         this.getCategory();
         /*获取订单列表*/
         this.getData();
         if (!this.category_id) {
            /*获取订单列表*/
            this.getData();
         }
      },
      onLoad(option) {
         let self = this;
         self.category_id = option.category_id;
         if (self.category_id) {
            self.is_category = false;
         }
      },
      methods: {
         /*初始化*/
@@ -180,7 +191,6 @@
                  // 计算组件的高度
                  let view = uni.createSelectorQuery().in(self).select('.top-box');
                  view.boundingClientRect(data => {
                     console.log(data)
                     let h = self.phoneHeight - data.height;
                     self.scrollviewHigh = h;
                  }).exec();
@@ -194,7 +204,9 @@
            this.page = 1;
            this.no_more = false;
            this.loading = true;
            this.category_id = 0;
            if (this.is_category) {
               this.category_id = 0;
            }
            this.searchtxt = '';
            this.sortType = '';
            this.sortPrice = 0;
@@ -248,8 +260,23 @@
         /*获取分类*/
         getCategory() {
            let self = this;
            self._post('supplier.index/category', {category_type:20}, (res) => {
            self._post('supplier.index/category', {
               /* category_type: 20 */
            }, (res) => {
               self.category = res.data.category;
               if (self.category_id) {
                  self.calculateWindowWidth();
                  setTimeout(function() {
                     self.calculateItemWidth();
                  }, 100)
                  setTimeout(function() {
                     self.category.forEach(function(item, index) {
                        if (item.category_id == self.category_id) {
                           self.tabChange(index)
                        }
                     })
                  }, 500);
               }
            })
         },
         onRefresh() {
@@ -288,7 +315,7 @@
         //跳转店铺首页
         goto_shop(shop_supplier_id) {
            uni.setStorageSync('shop_supplier_id',shop_supplier_id)
            uni.setStorageSync('shop_supplier_id', shop_supplier_id)
            this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id);
         },
         //跳转商品页面
@@ -718,11 +745,11 @@
      align-items: center;
      justify-content: space-between;
      width: 100%; */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-wrap: break-word;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
      word-wrap: break-word;
   }
   .address-text {