Commit c9b20e22f3b6a10d934ba0d119f519ce466f6fd6
1 parent
f36b6159
分类默认显示没有设置的时候,默认为0优化
Showing
1 changed file
with
4 additions
and
0 deletions
pages/goods/categoryList/categoryList.js
... | ... | @@ -90,6 +90,10 @@ Page({ |
90 | 90 | var switch_list_data = data.switch_list; |
91 | 91 | var switch_list = JSON.parse(switch_list_data); |
92 | 92 | var is_newsgoodstype = switch_list.is_newsgoodstype; |
93 | + if (is_newsgoodstype==undefined) | |
94 | + { | |
95 | + is_newsgoodstype=0; | |
96 | + } | |
93 | 97 | that.setData({ is_used_share :is_newsgoodstype}); |
94 | 98 | if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } |
95 | 99 | if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } | ... | ... |