first commit
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
var utils_request = require("../../utils/request.js");
|
||||
const getZhouList = () => {
|
||||
return utils_request.request("/api/zhou-yis?sort=index&pagination[pageSize]=64", {
|
||||
method: "GET"
|
||||
});
|
||||
};
|
||||
const getZhouDetail = ({
|
||||
id,
|
||||
name
|
||||
}) => {
|
||||
if (id) {
|
||||
return utils_request.request(`/api/zhou-yis/${id}`, {
|
||||
method: "GET"
|
||||
});
|
||||
}
|
||||
if (name) {
|
||||
return utils_request.request(`/api/zhou-yis?filters[name]=${name}`, {
|
||||
method: "GET"
|
||||
});
|
||||
}
|
||||
};
|
||||
const \u83B7\u53D6\u6613\u7ECF\u723B\u8F9E = (name, \u52A8\u723B\u540D\u79F0) => {
|
||||
return utils_request.request(`/api/zhou-yis?filters[name]=${name}`, {
|
||||
method: "GET"
|
||||
}).then(
|
||||
(res) => res.data[0]
|
||||
).then((res) => {
|
||||
let str = res.desc.split("\n\n");
|
||||
let index = str.findIndex((item) => item.includes(\u52A8\u723B\u540D\u79F0));
|
||||
return str[index] + "\n" + str[index + 1];
|
||||
});
|
||||
};
|
||||
exports.getZhouDetail = getZhouDetail;
|
||||
exports.getZhouList = getZhouList;
|
||||
exports["\u83B7\u53D6\u6613\u7ECF\u723B\u8F9E"] = \u83B7\u53D6\u6613\u7ECF\u723B\u8F9E;
|
||||
Reference in New Issue
Block a user