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

Function _getSubcategory

pages/category/category.js:54–66  ·  view source on GitHub ↗
(currentIndex)

Source from the content-addressed store, hash-verified

52 })
53 },
54 _getSubcategory(currentIndex) {
55 // 1.获取对应的maitkey
56 const maitkey = this.data.categories[currentIndex].maitKey;
57
58 // 2.请求的数据
59 getSubcategory(maitkey).then(res => {
60 const tempCategoryData = this.data.categoryData;
61 tempCategoryData[currentIndex].subcategories = res.data.list;
62 this.setData({
63 categoryData: tempCategoryData
64 })
65 })
66 },
67 _getCategoryDetail(currentIndex) {
68 // 1.获取对应的miniWallKey
69 const miniWallKey = this.data.categories[currentIndex].miniWallkey;

Callers

nothing calls this directly

Calls 1

getSubcategoryFunction · 0.90

Tested by

no test coverage detected