显示详情

wechat_user_type
Ge Hao 8 years ago
parent 8b15e49672
commit 76000a08cd
  1. 5
      pages/category/category.js
  2. 7
      pages/show_product/show_product.js

@ -43,6 +43,10 @@ Page({
bindTapProduct: function(e) {
var that = this
wx.navigateTo({
url: `../show_product/show_product?id=${e.currentTarget.dataset.id}&type=${this.data.categoryType}`
})
/*
// 管到屏蔽
if (this.data.categoryType === '管到') {
wx.showModal({
@ -96,5 +100,6 @@ Page({
icon: 'success',
duration: 1000
})
*/
}
})

@ -26,7 +26,12 @@ Page({
} catch (e) {
}
var allProducts = wx.getStorageSync('products')
var allProducts
if (params.type) {
allProducts = wx.getStorageSync(`cate_${params.type}`)
} else {
allProducts = wx.getStorageSync('products')
}
var id = params.id
var product = allProducts.filter(function(i){
return i.id === id

Loading…
Cancel
Save