diff --git a/pages/category/category.js b/pages/category/category.js index fae5920..c6b7bd2 100644 --- a/pages/category/category.js +++ b/pages/category/category.js @@ -15,7 +15,7 @@ Page({ title: '巴爷供销社 - ' + params.type, categoryType: params.type }) - product.getCategories(params.type, function(result) { + product.getCategories(params.typeId, function(result) { var data = getApp().store.sync(result.data) that.setData({items: data}) wx.setStorage({ diff --git a/pages/index/index.js b/pages/index/index.js index 3d7e731..0382040 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -24,7 +24,7 @@ Page({ catchTapCategory: function (e) { wx.navigateTo({ - url: `../category/category?type=${e.currentTarget.dataset.type}` + url: `../category/category?type=${e.currentTarget.dataset.type}&typeId=${e.currentTarget.dataset.typeid}` }) }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index a49cbbe..87ebfef 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -11,7 +11,7 @@ - + {{item.name}}