MCPcopy
hub / github.com/coderwhy/LearnMiniProgram / _getMultidata

Function _getMultidata

pages/home/home.js:40–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39 // ------------------- 网络请求函数 -------------------------
40 _getMultidata() {
41 getMultiData().then(res => {
42 // 取出轮播图和推荐的数据
43 const banners = res.data.data.banner.list;
44 const recommends = res.data.data.recommend.list;
45
46 // 将banners和recommends放到data中
47 this.setData({
48 banners,
49 recommends
50 })
51 })
52 },
53 _getGoodsData(type) {
54 // 1.获取页码
55 const page = this.data.goods[type].page + 1;

Callers

nothing calls this directly

Calls 1

getMultiDataFunction · 0.90

Tested by

no test coverage detected