| | |
| | | mounted() { |
| | | this.init(); |
| | | this._freshing = false; |
| | | |
| | | this.restoreData(); |
| | | // 获取分类 by lyzflash |
| | | this.getCategory(); |
| | | /*获取订单列表*/ |
| | | this.getData(); |
| | | }, |
| | | onLoad(option) { |
| | | let self = this; |
| | | if( option.category_id){ |
| | | self.category.forEach(function(index,item){ |
| | | if(item.category_id==option.category_id){ |
| | | self.tabChange(index) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | /*初始化*/ |
| | |
| | | page: page || 1, |
| | | list_rows: list_rows, |
| | | sortType: self.type_active, |
| | | supplier_type: 10, |
| | | name: self.keyWord, |
| | | category_id: self.category_id // 分类id by lyzflash |
| | | }, (res) => { |
| | |
| | | /*获取分类*/ |
| | | getCategory() { |
| | | let self = this; |
| | | self._post('supplier.index/category', {}, (res) => { |
| | | self._post('supplier.index/category', {category_type:10}, (res) => { |
| | | self.category = res.data.category; |
| | | }) |
| | | }, |
| | |
| | | |
| | | //跳转店铺首页 |
| | | goto_shop(shop_supplier_id) { |
| | | uni.setStorageSync('shop_supplier_id',shop_supplier_id) |
| | | this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id); |
| | | }, |
| | | //跳转商品页面 |