MCPcopy Create free account
hub / github.com/coderwhy/HYMiniMall / menuClick

Function menuClick

pages/category/category.js:90–102  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

88 })
89 },
90 menuClick(e) {
91 // 1.改变当前的currentIndex
92 const currentIndex = e.detail.currentIndex;
93 this.setData({
94 currentIndex
95 })
96
97 // 2.请求对应currentIndex的数据
98 this._getSubcategory(currentIndex);
99
100 // 3.请求对应的currentIndex的详情数据
101 this._getCategoryDetail(currentIndex)
102 }
103})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected