改变为数字参数

wechat_user_type
Ge Hao 7 years ago
parent 5e251575f5
commit 6e780af3c6
  1. 2
      pages/category/category.js
  2. 2
      pages/index/index.js
  3. 2
      pages/index/index.wxml

@ -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({

@ -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}`
})
},

@ -11,7 +11,7 @@
<view class="navs">
<block wx:for-items="{{navs}}" wx:key="name">
<view class="nav-item" catchtap="catchTapCategory" data-type="{{item.typeId}}">
<view class="nav-item" catchtap="catchTapCategory" data-type="{{item.name}}" data-typeid="{{item.typeId}}">
<image src="{{item.icon}}" class="nav-image"/>
<text>{{item.name}}</text>
</view>

Loading…
Cancel
Save