首页底部图标颜色,getCategory 还是使用新的页面,

因为只能 更新数据,而首页渲染的格式已经定了
wechat_user_type
Ge Hao 8 years ago
parent 297942eba3
commit 30268ecdf4
  1. 2
      app.json
  2. 8
      pages/category/category.js
  3. 0
      pages/category/category.json
  4. 4
      pages/category/category.wxml

@ -16,7 +16,7 @@
},
"tabBar": {
"color": "#dddddd",
"selectedColor": "#3cc51f",
"selectedColor": "#BF8600",
"borderStyle": "white",
"backgroundColor": "#323232",
"list": [{

@ -12,11 +12,15 @@ Page({
})
product.getCategories(params.type).then(function(result) {
var data = getApp().store.sync(result.data)
that.setData({'items': data})
that.setData({items: data})
wx.setStorage({
key:`cate_${params.type}`,
key: `cate_${params.type}`,
data: data
})
}, function(fail) {
var key = `cate_${params.type}`
var data = wx.getStorage(key)
wx.setData({items: data})
})
}
})

@ -1,5 +1,7 @@
<scroll-view scroll-y="true" height="100%">
<block wx:for="{{items}}" wx:for-item="item">
<view class="item" bindtap="bindShowProduct" data-id="{{item.id}}">
<image class="head-img" src="{{item['image-url']}}" mode="aspectFit"></image>
</view>
</block>
</scroll-view>
Loading…
Cancel
Save