This commit is contained in:
张成
2026-03-24 16:07:02 +08:00
commit aa8eaa6ccd
121 changed files with 34042 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
class SysAdServer {
async getAll(param) {
return await window.framework.http.get("/sys_ad/index", param);
}
async add(row) {
return await window.framework.http.post("/sys_ad/add", row);
}
async edit(row) {
return await window.framework.http.post("/sys_ad/edit", row);
}
async del(row) {
return await window.framework.http.post("/sys_ad/del", row);
}
}
const sysAdServer = new SysAdServer();
export default sysAdServer;

View File

@@ -0,0 +1,11 @@
class BizPaymentServer {
async confirmOffline(row) {
return window.framework.http.post("/biz_payment/confirm-offline", row);
}
async confirmLink(row) {
return window.framework.http.post("/biz_payment/confirm-link", row);
}
}
export default new BizPaymentServer();

View File

@@ -0,0 +1,27 @@
class BizPlanServer {
async page(row) {
return window.framework.http.post("/biz_plan/page", row);
}
async add(row) {
return window.framework.http.post("/biz_plan/add", row);
}
async edit(row) {
return window.framework.http.post("/biz_plan/edit", row);
}
async del(row) {
return window.framework.http.post("/biz_plan/del", row);
}
async toggle(row) {
return window.framework.http.post("/biz_plan/toggle", row);
}
async all() {
return window.framework.http.get("/biz_plan/all", {});
}
}
export default new BizPlanServer();

View File

@@ -0,0 +1,27 @@
class BizSubscriptionServer {
async page(row) {
return window.framework.http.post("/biz_subscription/page", row);
}
async byUser(userId) {
return window.framework.http.get("/biz_subscription/by_user", { user_id: userId });
}
async open(row) {
return window.framework.http.post("/biz_subscription/open", row);
}
async upgrade(row) {
return window.framework.http.post("/biz_subscription/upgrade", row);
}
async renew(row) {
return window.framework.http.post("/biz_subscription/renew", row);
}
async cancel(row) {
return window.framework.http.post("/biz_subscription/cancel", row);
}
}
export default new BizSubscriptionServer();

View File

@@ -0,0 +1,15 @@
class BizTokenServer {
async page(row) {
return window.framework.http.post("/biz_token/page", row);
}
async create(row) {
return window.framework.http.post("/biz_token/create", row);
}
async revoke(row) {
return window.framework.http.post("/biz_token/revoke", row);
}
}
export default new BizTokenServer();

View File

@@ -0,0 +1,27 @@
class BizUserServer {
async page(row) {
return window.framework.http.post("/biz_user/page", row);
}
async add(row) {
return window.framework.http.post("/biz_user/add", row);
}
async edit(row) {
return window.framework.http.post("/biz_user/edit", row);
}
async del(row) {
return window.framework.http.post("/biz_user/del", row);
}
async detail(id) {
return window.framework.http.get(`/biz_user/detail?id=${encodeURIComponent(id)}`, {});
}
async disable(row) {
return window.framework.http.post("/biz_user/disable", row);
}
}
export default new BizUserServer();

View File

@@ -0,0 +1,33 @@
import request from '@/libs/http'
export const getList = (params) => {
return request({
url: '/sys_file/page',
method: 'get',
params
})
}
export const add = (data) => {
return request({
url: '/sys_file',
method: 'post',
data
})
}
export const edit = (data) => {
return request({
url: '/sys_file',
method: 'put',
data
})
}
export const del = (params) => {
return request({
url: '/sys_file',
method: 'delete',
params
})
}

View File

@@ -0,0 +1,36 @@
import config from '../../../config/index.js'
/**
* 使用原生 fetch 发送 multipart/form-data不设置 Content-Type由浏览器自动带 boundary
* 确保后端从 ctx.request.files 接收文件
*/
async function uploadOosImgWithFormData(formData) {
const apiUrl = (config.apiUrl || '').replace(/\/$/, '')
const url = `${apiUrl}/sys_file/upload_oos_img`
const headers = {}
if (window.framework && typeof window.framework.getToken === 'function') {
const token = window.framework.getToken()
if (token) headers['Authorization'] = token
}
const response = await fetch(url, { method: 'POST', headers, body: formData })
const data = await response.json().catch(() => ({}))
return data
}
class FileServe {
async upload_oos_img(row) {
if (row instanceof FormData) {
return uploadOosImgWithFormData(row)
}
let res = await window.framework.http.postFormData('/sys_file/upload_oos_img', row)
return res
}
async upload_Img(row) {
let res = await window.framework.http.postFormData("/file/upload_Img", row);
return res;
}
}
const fileServe = new FileServe();
export default fileServe;

View File

@@ -0,0 +1,30 @@
class RolePermissionServer {
async getRoles(callback) {
let res = await window.framework.http.get('/SysRolePermission/Query', {})
return res
}
async getRole(row) {
let res = await window.framework.http.get('/SysRolePermission/QueryByRoleId', row)
return res
}
async add(row) {
let res = await window.framework.http.post('/SysRolePermission/add', row)
return res
}
async edit(row) {
let res = await window.framework.http.post('/SysRolePermission/edit', row)
return res
}
async del(row) {
let res = await window.framework.http.post('/SysRolePermission/del', row)
return res
}
}
const rolePermissionServer = new RolePermissionServer()
export default rolePermissionServer

View File

@@ -0,0 +1,26 @@
class RoleServer {
async list() {
let res = await window.framework.http.get("/sys_role/index", {});
return res;
}
async add(row) {
let res = await window.framework.http.post("/sys_role/add", row);
return res;
}
async edit(row) {
let res = await window.framework.http.post("/sys_role/edit", row);
return res;
}
async del(row) {
let res = await window.framework.http.post("/sys_role/del", row);
return res;
}
}
const roleServer = new RoleServer();
export default roleServer;

View File

@@ -0,0 +1,10 @@
class SysAddress {
async index(param) {
let res = await window.framework.http.get("/sys_address/index", param);
return res;
}
}
const sysAddress = new SysAddress();
export default sysAddress;

View File

@@ -0,0 +1,30 @@
class SysModuleServer {
async all() {
let res = await window.framework.http.get("/sys_menu/all", {});
return res;
}
async list(row) {
let res = await window.framework.http.get("/sys_menu/all", row);
return res;
}
async add(row) {
let res = await window.framework.http.post("/sys_menu/add", row);
return res;
}
async edit(row) {
let res = await window.framework.http.post("/sys_menu/edit", row);
return res;
}
async del(row) {
let res = await window.framework.http.post("/sys_menu/del", row);
return res;
}
}
const sysModuleServer = new SysModuleServer();
export default sysModuleServer;

View File

@@ -0,0 +1,30 @@
class SysLogServe {
async all(param) {
let res = await window.framework.http.get("/sys_log/all", param);
return res;
}
async detail(param) {
let res = await window.framework.http.get("/sys_log/detail", param);
return res;
}
async delete(param) {
let res = await window.framework.http.get("/sys_log/delete", param);
return res;
}
async delete_all(param) {
let res = await window.framework.http.get("/sys_log/delete_all", param);
return res;
}
async operates(param) {
let res = await window.framework.http.get("/sys_log/operates", param);
return res;
}
}
const sys_log_serve = new SysLogServe();
export default sys_log_serve;

View File

@@ -0,0 +1,38 @@
class systemTypeClServer {
async all(param) {
let res= await window.framework.http.get('/sys_project_type/all', param);
return res;
}
async page(row) {
let res= await window.framework.http.post('/sys_project_type/page', row);
return res;
}
async exportCsv(row) {
let res = window.framework.http.fileExport("/sys_project_type/export", row);
return res;
}
async add(row) {
let res= await window.framework.http.post('/sys_project_type/add', row);
return res;
}
async edit(row) {
let res= await window.framework.http.post('/sys_project_type/edit', row);
return res;
}
async del(row) {
let res= await window.framework.http.post('/sys_project_type/del', row);
return res;
}
}
const systemTypeServer = new systemTypeClServer();
export default systemTypeServer;

View File

@@ -0,0 +1,31 @@
class TableServer {
async getAll(callback) {
return await window.framework.http.get('/table/index', {})
}
async add(row, callback) {
return await window.framework.http.post('/table/add', row)
}
async edit(row, callback) {
return await window.framework.http.post('/table/edit', row, function(res) {
callback && callback(res)
})
}
async del(row, callback) {
return await window.framework.http.post('/table/del', row)
}
async autoApi(id) {
return await window.framework.http.get('/template/api', { id: id })
}
async autoDb(id) {
return await window.framework.http.get('/template/autoDb', { id: id })
}
}
const tableServer = new TableServer()
export default tableServer

View File

@@ -0,0 +1,40 @@
class UserServer {
async login(row) {
let res = await window.framework.http.post("/sys_user/login", row);
return res;
}
async all() {
let res = await window.framework.http.get("/sys_user/index", {});
return res;
}
async exportCsv(row) {
let res = window.framework.http.fileExport("/sys_user/export", row);
return res;
}
async authorityMenus() {
let res = await window.framework.http.post("/sys_user/authorityMenus", {});
return res;
}
async add(row) {
let res = await window.framework.http.post("/sys_user/add", row);
return res;
}
async edit(row) {
let res = await window.framework.http.post("/sys_user/edit", row);
return res;
}
async del(row) {
let res = await window.framework.http.post("/sys_user/del", row);
return res;
}
}
const userServer = new UserServer();
export default userServer;