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

Function _getMultiData

pages/home/home.js:106–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104 this._getProductData(SELL);
105 },
106 _getMultiData() {
107 getMultiData().then(res => {
108 // 1.取出轮播所有的数据
109 const banners = res.data.banner.list.map(item => {
110 return item.image
111 })
112
113 // 2.设置数据
114 this.setData({
115 banners: banners,
116 recommends: res.data.recommend.list
117 })
118 })
119 },
120 _getProductData(type) {
121 // 1.获取数据对应的页码
122 const page = this.data.goods[type].page;

Callers

nothing calls this directly

Calls 1

getMultiDataFunction · 0.90

Tested by

no test coverage detected