Files
sgxt_web/src/api/spl.js

101 lines
2.0 KiB
JavaScript
Raw Normal View History

2025-08-16 16:54:03 +08:00
import request from "@/utils/request";
import axios from "axios";
import qs from 'qs'; // 或者使用 URLSearchParams
const api = "/bpm";
// 解析数据
export function ParsingText(data, fun) {
axios({
method: 'post',
url: '/chat/completions',
data: data,
headers: { 'Authorization': 'Bearer sk-064b5c53131c4046883b718f2b31c050' }
}).then((res) => {
fun(res)
})
}
//get 请求
export const splFlvGet = (params = {}, url) => {
return request({
url: url,
method: "get",
params
});
};
//get 请求
export const splGet = (params = {}, url) => {
return request({
url: api + url,
method: "get",
params
});
};
//post 请求
export const splPost = (data = {}, url) => {
return request({
url: api + url,
method: "post",
data
});
};
//put 请求
export const splPut = (data = {}, url) => {
return request({
url: api + url,
method: "put",
data
});
};
//put 请求
export const splDelete = (data = {}, url) => {
return request({
url: api + url,
method: "delete",
data
});
};
export const submitProcess = (data) => {
return request({
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
url: api + '/process/createProcess',
method: 'post',
data: qs.stringify(data)
});
};
export const queryProcessNode = (data) => {
return request({
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
url: api + '/process/queryProcessNode',
method: 'post',
data: qs.stringify(data)
});
};
export const queryProcessNodeLog = (data) => {
return request({
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
url: api + '/process/queryProcessNodeLog',
method: 'post',
data: qs.stringify(data)
});
};
export const queryProcess = (data) => {
return request({
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
url: api + '/process/queryProcess',
method: 'post',
data: qs.stringify(data)
});
};