Skip to content

Commit

Permalink
[fix] add toSort in goodsList
Browse files Browse the repository at this point in the history
  • Loading branch information
TeanLee committed Jun 9, 2018
1 parent d85db46 commit 39dd85e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
5 changes: 5 additions & 0 deletions pages/goodsList/goodsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Page({
}
})
},
toSort: function() {
wx.switchTab({
url: "../shopping/shopping"
})
},
addInCart: function(e) {
// console.log(this.data.goods);
const good = this.data.goods[e.currentTarget.id]; // 根据index,判断用户点击了哪个商品加入购物车
Expand Down
2 changes: 1 addition & 1 deletion pages/goodsList/goodsList.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<view class="goodsList__title">
<a class="goodsList__title__text">分类</a>
<view class="goodsList__hd__right right">
<image src="../../assets/icons/sort-search.png" />
<image bindtap="toSort" src="../../assets/icons/shopping-sel.png" />
</view>
</view>
</view>
Expand Down
6 changes: 0 additions & 6 deletions pages/sort/sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ Page({
url: "../goodsList/goodsList"
})
},
toSort: function() {
console.log('shopping');
wx.switchTab({
url: "../shopping/shopping"
})
},

/**
* 生命周期函数--监听页面加载
Expand Down
3 changes: 0 additions & 3 deletions pages/sort/sort.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<view class="sort__hd">
<view class="sort__title">
<a class="sort__title__text">分类</a>
<view class="sort__hd__right right">
<image bindtap="toSort" src="../../assets/icons/shopping-sel.png" />
</view>
</view>
</view>
<view class="sort__bd">
Expand Down

0 comments on commit 39dd85e

Please sign in to comment.