MCPcopy Create free account
hub / github.com/bailicangdu/react-pxq / getProduction

Method getProduction

src/api/api.js:63–80  ·  view source on GitHub ↗

* 用途:获取商品数据 * @url https://api.cangdu.org/shopro/data/products * 返回http_code为200表示成功 * @method get * @return {promise}

(params = {})

Source from the content-addressed store, hash-verified

61 * @return {promise}
62 */
63 async getProduction(params = {}){
64 try{
65 let result = await this.axios('get', '/shopro/data/products', params);
66 if(result && (result.data instanceof Object) && result.http_code === 200){
67 return result.data.data||[];
68 }else{
69 let err = {
70 tip: '获取商品数据失败',
71 response: result,
72 data: params,
73 url: 'https://api.cangdu.org/shopro/data/products',
74 }
75 throw err;
76 }
77 }catch(err){
78 throw err;
79 }
80 }
81
82 /**
83 * 用途:获取佣金数据

Callers 2

getProDataFunction · 0.80
sFunction · 0.80

Calls 1

axiosMethod · 0.80

Tested by

no test coverage detected