diff --git a/pages/category/category.js b/pages/category/category.js index 802fc6c..42338ad 100644 --- a/pages/category/category.js +++ b/pages/category/category.js @@ -2,15 +2,14 @@ const product = require('../../utils/product.js') Page({ data: { - title: '', items: [] }, onLoad: function(params) { var that = this - this.setData({ - title: '巴爷供销社 - ' + params.type - }) + var title = '巴爷供销社 - ' + params.type + wx.setNavigationBarTitle({ title: title }) + product.getCategories(params.type, function(result) { var data = getApp().store.sync(result.data) that.setData({items: data}) @@ -26,7 +25,6 @@ Page({ }, onReady() { - wx.setNavigationBarTitle({ title: this.data.title }) }, bindTapProduct: function(e) { diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index 727b3af..e515abc 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -8,7 +8,7 @@ 巴爷资产 - 查看全部资产》 +