接口
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const config_url = require("./url.js");
|
||||
const request = (option) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.request({
|
||||
url: config_url.URL + option.url,
|
||||
method: option.method,
|
||||
data: option.data,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
...option.headers,
|
||||
"appid": config_url.appid,
|
||||
"Authorization": "Bearer " + common_vendor.index.getStorageSync("token"),
|
||||
"Clientid": common_vendor.index.getStorageSync("client_id")
|
||||
},
|
||||
success(res) {
|
||||
resolve(res.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
exports.request = request;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/http.js.map
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
const URL = "https://notify.gxfs123.com";
|
||||
const appid = "wxabe9cc4db1005fcb";
|
||||
exports.URL = URL;
|
||||
exports.appid = appid;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/url.js.map
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
const config_http = require("./http.js");
|
||||
const login = (data) => {
|
||||
return config_http.request({
|
||||
url: "/app/user/login",
|
||||
method: "get",
|
||||
data
|
||||
});
|
||||
};
|
||||
const getMyIndexInfo = (data) => {
|
||||
return config_http.request({
|
||||
url: "/app/user/userInfo",
|
||||
method: "get",
|
||||
data
|
||||
});
|
||||
};
|
||||
const getOrderList = (data) => {
|
||||
return config_http.request({
|
||||
url: "/app/order/list",
|
||||
method: "get",
|
||||
data,
|
||||
hideLoading: true
|
||||
});
|
||||
};
|
||||
const queryHasOrder = (data) => {
|
||||
return config_http.request({
|
||||
url: `/app/order/getActiveOrder/${data}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
const getDeviceInfo = (deviceNo) => {
|
||||
return config_http.request({
|
||||
url: `/app/device/${deviceNo}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
exports.getDeviceInfo = getDeviceInfo;
|
||||
exports.getMyIndexInfo = getMyIndexInfo;
|
||||
exports.getOrderList = getOrderList;
|
||||
exports.login = login;
|
||||
exports.queryHasOrder = queryHasOrder;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/user.js.map
|
||||
Reference in New Issue
Block a user