MCPcopy
hub / github.com/coderwhy/HYMiniMall / _getRealCategoryDetail

Function _getRealCategoryDetail

pages/category/category.js:76–89  ·  view source on GitHub ↗
(index, miniWallKey, type)

Source from the content-addressed store, hash-verified

74 // this._getRealCategoryDetail(currentIndex, miniWallKey, 'sell');
75 },
76 _getRealCategoryDetail(index, miniWallKey, type) {
77 getCategoryDetail(miniWallKey, type).then(res => {
78 // 1.获取categoryData
79 const categoryData = this.data.categoryData;
80
81 // 2.修改数据
82 categoryData[index].categoryDetail = res;
83
84 // 3.修改data中的数据
85 this.setData({
86 categoryData: categoryData
87 })
88 })
89 },
90 menuClick(e) {
91 // 1.改变当前的currentIndex
92 const currentIndex = e.detail.currentIndex;

Callers

nothing calls this directly

Calls 1

getCategoryDetailFunction · 0.90

Tested by

no test coverage detected