29 lines
741 B
JavaScript
29 lines
741 B
JavaScript
// const baseUrl = "http://test.marketapi.1688sup.com"; //测试
|
|
// const baseUrl = "http://pre.marketapi.1688sup.com" //镜像
|
|
const baseUrl = "https://marketapi.1688sup.com" //正式
|
|
|
|
//api全局封装
|
|
const req = (method_type, url, params) => {
|
|
const http = uni.request({
|
|
url,
|
|
method: method_type,
|
|
data: params
|
|
})
|
|
return http.then((res) => res[1].data).catch((err) => {})
|
|
}
|
|
|
|
//获取订单详情
|
|
export const getInfo = (parmas) => {
|
|
return req("post", baseUrl + "/wechat/cash/orderInfo", parmas)
|
|
}
|
|
|
|
//领取红包
|
|
export const receiveRed = (parmas) => {
|
|
return req("post", baseUrl + "/wechat/cash/receive", parmas)
|
|
}
|
|
|
|
// 是否升级
|
|
export const upgrade = () => {
|
|
return req("get", baseUrl + "/conf/apiStatus")
|
|
}
|