MCPcopy Create free account
hub / github.com/CoderOpen/waimai / post

Function post

front/utils/request.js:25–44  ·  view source on GitHub ↗
(url, params, success_cb, failed_cb)

Source from the content-addressed store, hash-verified

23}
24
25function post(url, params, success_cb, failed_cb) {
26
27 helper.toast('loading', '加载中...', 10000)
28
29 uni.request({
30 url: config.HOST + url,
31 data: params,
32 method:"POST",
33 success: (res)=>{
34 success_cb && success_cb(res);
35 },
36 fail:(res) => {
37 console.log('request_fail:url:' + url + ' ; ' + 'errMsg:' + res.errMsg);
38 failed_cb && failed_cb(res);
39 },
40 complete: ()=> {
41 uni.hideToast();
42 }
43 })
44}
45
46function test() {
47 //111.13.100.92

Callers

nothing calls this directly

Calls 1

requestMethod · 0.80

Tested by

no test coverage detected