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

Function request

service/network.js:6–25  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

4} from './config.js'
5
6function request(options) {
7 wx.showLoading({
8 title: '数据加载中ing',
9 })
10
11 return new Promise((resolve, reject) => {
12 wx.request({
13 url: baseURL + options.url,
14 timeout: timeout,
15 data: options.data,
16 success: function(res) {
17 resolve(res.data)
18 },
19 fail: reject,
20 complete: res => {
21 wx.hideLoading()
22 }
23 })
24 })
25}
26
27export default request;
28

Callers 7

getDetailFunction · 0.85
getRecommendsFunction · 0.85
getMultiDataFunction · 0.85
getProductFunction · 0.85
getCategoryFunction · 0.85
getSubcategoryFunction · 0.85
getCategoryDetailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected