This commit is contained in:
张成
2025-10-09 18:17:41 +08:00
parent 366c18bcea
commit ba61c9e45d
63 changed files with 1133 additions and 295 deletions

View File

@@ -2,19 +2,19 @@ import http from "@/libs/http";
class SysAdServer {
async getAll(param) {
return await http.get("/sys_ad/index", param);
return await window.framework.httpget("/sys_ad/index", param);
}
async add(row) {
return await http.post("/sys_ad/add", row);
return await window.framework.http.post("/sys_ad/add", row);
}
async edit(row) {
return await http.post("/sys_ad/edit", row);
return await window.framework.http.post("/sys_ad/edit", row);
}
async del(row) {
return await http.post("/sys_ad/del", row);
return await window.framework.http.post("/sys_ad/del", row);
}
}
const sysAdServer = new SysAdServer();

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class ai_messagesClServer {
async all(param) {
let res= await http.get('/ai_messages/all', param);
let res= await window.framework.httpget('/ai_messages/all', param);
return res;
}
async page(row) {
let res= await http.post('/ai_messages/page', row);
let res= await window.framework.http.post('/ai_messages/page', row);
return res;
}
@@ -16,17 +16,17 @@ class ai_messagesClServer {
}
async add(row) {
let res= await http.post('/ai_messages/add', row);
let res= await window.framework.http.post('/ai_messages/add', row);
return res;
}
async edit(row) {
let res= await http.post('/ai_messages/edit', row);
let res= await window.framework.http.post('/ai_messages/edit', row);
return res;
}
async del(row) {
let res= await http.post('/ai_messages/del', row);
let res= await window.framework.http.post('/ai_messages/del', row);
return res;
}
}

View File

@@ -0,0 +1,86 @@
/**
* 球赛管理 API
*
* 使用说明:
* 1. 不需要 import http
* 2. 直接使用 window.framework.http 调用接口
* 3. 所有方法返回 Promise
*/
class GamesServer {
/**
* 获取球赛列表(分页)
* @param {Object} params - 查询参数 { page, size, keyword }
* @returns {Promise}
*/
async getPage(params) {
return await window.framework.http.post('/games/page', params)
}
/**
* 获取所有球赛
* @returns {Promise}
*/
async getAll() {
return await window.framework.http.get('/games/all')
}
/**
* 获取球赛详情
* @param {Number|String} id - 球赛ID
* @returns {Promise}
*/
async getDetail(id) {
return await window.framework.http.get(`/games/detail/${id}`)
}
/**
* 创建球赛
* @param {Object} data - 球赛数据
* @returns {Promise}
*/
async create(data) {
return await window.framework.http.post('/games/create', data)
}
/**
* 更新球赛
* @param {Number|String} id - 球赛ID
* @param {Object} data - 球赛数据
* @returns {Promise}
*/
async update(id, data) {
return await window.framework.http.post(`/games/update/${id}`, data)
}
/**
* 删除球赛
* @param {Number|String} id - 球赛ID
* @returns {Promise}
*/
async delete(id) {
return await window.framework.http.post(`/games/delete/${id}`, { id })
}
/**
* 批量删除球赛
* @param {Array} ids - 球赛ID数组
* @returns {Promise}
*/
async batchDelete(ids) {
return await window.framework.http.post('/games/batch_delete', { ids })
}
/**
* 导出数据
* @param {Object} params - 查询参数
* @returns {Promise}
*/
async exportData(params) {
return await window.framework.http.fileExport('/games/export', params)
}
}
// 导出单例
export default new GamesServer()

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class gamesClServer {
async all(param) {
let res= await http.get('/gme_games/all', param);
let res= await window.framework.httpget('/gme_games/all', param);
return res;
}
async page(row) {
let res= await http.post('/gme_games/page', row);
let res= await window.framework.http.post('/gme_games/page', row);
return res;
}
@@ -16,32 +16,32 @@ class gamesClServer {
}
async add(row) {
let res= await http.post('/gme_games/add', row);
let res= await window.framework.http.post('/gme_games/add', row);
return res;
}
async edit(row) {
let res= await http.post('/gme_games/edit', row);
let res= await window.framework.http.post('/gme_games/edit', row);
return res;
}
async del(row) {
let res= await http.post('/gme_games/del', row);
let res= await window.framework.http.post('/gme_games/del', row);
return res;
}
async cancel(row) {
let res = await http.post('/gme_games/cancel', row);
let res = await window.framework.http.post('/gme_games/cancel', row);
return res;
}
async updateStatus(row) {
let res = await http.post('/gme_games/update_status', row);
let res = await window.framework.http.post('/gme_games/update_status', row);
return res;
}
async statistics() {
let res = await http.get('/gme_games/statistics', {});
let res = await window.framework.httpget('/gme_games/statistics', {});
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class paymentOrdersClServer {
async all(param) {
let res= await http.get('/pay_orders/all', param);
let res= await window.framework.httpget('/pay_orders/all', param);
return res;
}
async page(row) {
let res= await http.post('/pay_orders/page', row);
let res= await window.framework.http.post('/pay_orders/page', row);
return res;
}
@@ -18,17 +18,17 @@ class paymentOrdersClServer {
}
async add(row) {
let res= await http.post('/pay_orders/add', row);
let res= await window.framework.http.post('/pay_orders/add', row);
return res;
}
async edit(row) {
let res= await http.post('/pay_orders/edit', row);
let res= await window.framework.http.post('/pay_orders/edit', row);
return res;
}
async del(row) {
let res= await http.post('/pay_orders/del', row);
let res= await window.framework.http.post('/pay_orders/del', row);
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class venuesClServer {
async all(param) {
let res= await http.get('/ven_venues/all', param);
let res= await window.framework.httpget('/ven_venues/all', param);
return res;
}
async page(row) {
let res= await http.post('/ven_venues/page', row);
let res= await window.framework.http.post('/ven_venues/page', row);
return res;
}
@@ -18,17 +18,17 @@ class venuesClServer {
}
async add(row) {
let res= await http.post('/ven_venues/add', row);
let res= await window.framework.http.post('/ven_venues/add', row);
return res;
}
async edit(row) {
let res= await http.post('/ven_venues/edit', row);
let res= await window.framework.http.post('/ven_venues/edit', row);
return res;
}
async del(row) {
let res= await http.post('/ven_venues/del', row);
let res= await window.framework.http.post('/ven_venues/del', row);
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class walletTransactionsClServer {
async all(param) {
let res= await http.get('/wch_wallet_transactions/all', param);
let res= await window.framework.httpget('/wch_wallet_transactions/all', param);
return res;
}
async page(row) {
let res= await http.post('/wch_wallet_transactions/page', row);
let res= await window.framework.http.post('/wch_wallet_transactions/page', row);
return res;
}
@@ -17,17 +17,17 @@ class walletTransactionsClServer {
}
async detail(id) {
let res= await http.get('/wch_wallet_transactions/detail', { id });
let res= await window.framework.httpget('/wch_wallet_transactions/detail', { id });
return res;
}
async edit(row) {
let res= await http.post('/wch_wallet_transactions/edit', row);
let res= await window.framework.http.post('/wch_wallet_transactions/edit', row);
return res;
}
async statistics() {
let res = await http.get('/wch_wallet_transactions/statistics', {});
let res = await window.framework.httpget('/wch_wallet_transactions/statistics', {});
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class walletsClServer {
async all(param) {
let res= await http.get('/wch_wallets/all', param);
let res= await window.framework.httpget('/wch_wallets/all', param);
return res;
}
async page(row) {
let res= await http.post('/wch_wallets/page', row);
let res= await window.framework.http.post('/wch_wallets/page', row);
return res;
}
@@ -17,17 +17,17 @@ class walletsClServer {
}
async edit(row) {
let res= await http.post('/wch_wallets/edit', row);
let res= await window.framework.http.post('/wch_wallets/edit', row);
return res;
}
async adjustBalance(row) {
let res= await http.post('/wch_wallets/adjust_balance', row);
let res= await window.framework.http.post('/wch_wallets/adjust_balance', row);
return res;
}
async statistics() {
let res = await http.get('/wch_wallets/statistics', {});
let res = await window.framework.httpget('/wch_wallets/statistics', {});
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class wch_usersClServer {
async all(param) {
let res= await http.get('/wch_users/all', param);
let res= await window.framework.httpget('/wch_users/all', param);
return res;
}
async page(row) {
let res= await http.post('/wch_users/page', row);
let res= await window.framework.http.post('/wch_users/page', row);
return res;
}
@@ -18,17 +18,17 @@ class wch_usersClServer {
}
async add(row) {
let res= await http.post('/wch_users/add', row);
let res= await window.framework.http.post('/wch_users/add', row);
return res;
}
async edit(row) {
let res= await http.post('/wch_users/edit', row);
let res= await window.framework.http.post('/wch_users/edit', row);
return res;
}
async del(row) {
let res= await http.post('/wch_users/del', row);
let res= await window.framework.http.post('/wch_users/del', row);
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class infoClServer {
async all(param) {
let res= await http.get('/inf_info/all', param);
let res= await window.framework.httpget('/inf_info/all', param);
return res;
}
async page(row) {
let res= await http.post('/inf_info/page', row);
let res= await window.framework.http.post('/inf_info/page', row);
return res;
}
@@ -18,17 +18,17 @@ class infoClServer {
}
async add(row) {
let res= await http.post('/inf_info/add', row);
let res= await window.framework.http.post('/inf_info/add', row);
return res;
}
async edit(row) {
let res= await http.post('/inf_info/edit', row);
let res= await window.framework.http.post('/inf_info/edit', row);
return res;
}
async del(row) {
let res= await http.post('/inf_info/del', row);
let res= await window.framework.http.post('/inf_info/del', row);
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class info_typeClServer {
async all(param) {
let res= await http.get('/inf_info_type/all', param);
let res= await window.framework.httpget('/inf_info_type/all', param);
return res;
}
async page(row) {
let res= await http.post('/inf_info_type/page', row);
let res= await window.framework.http.post('/inf_info_type/page', row);
return res;
}
@@ -18,17 +18,17 @@ class info_typeClServer {
}
async add(row) {
let res= await http.post('/inf_info_type/add', row);
let res= await window.framework.http.post('/inf_info_type/add', row);
return res;
}
async edit(row) {
let res= await http.post('/inf_info_type/edit', row);
let res= await window.framework.http.post('/inf_info_type/edit', row);
return res;
}
async del(row) {
let res= await http.post('/inf_info_type/del', row);
let res= await window.framework.http.post('/inf_info_type/del', row);
return res;
}
}

View File

@@ -2,22 +2,22 @@ import http from "@/libs/http";
class HomeServer {
// 获取订单统计
async getOderCount() {
let res = await http.get("/order/count");
let res = await window.framework.httpget("/order/count");
return res;
}
async getUserCount() {
let res = await http.get("/user/count");
let res = await window.framework.httpget("/user/count");
return res;
}
async getSalesRank() {
let res = await http.get("/index/salesRank");
let res = await window.framework.httpget("/index/salesRank");
return res;
}
async userRecommendRank() {
let res = await http.get("/index/userRecommendRank");
let res = await window.framework.httpget("/index/userRecommendRank");
return res;
}
}

View File

@@ -3,7 +3,7 @@ import http from '@/libs/http'
export default {
// 获取消息通知列表
page: (params) => {
return http.post('/msg_notifications/page', params)
return http.post('/msg_notifications/page', params)
},
// 新增消息通知

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class ntr_questionsClServer {
async all(param) {
let res= await http.get('/ntr_questions/all', param);
let res= await window.framework.httpget('/ntr_questions/all', param);
return res;
}
async page(row) {
let res= await http.post('/ntr_questions/page', row);
let res= await window.framework.http.post('/ntr_questions/page', row);
return res;
}
@@ -16,17 +16,17 @@ class ntr_questionsClServer {
}
async add(row) {
let res= await http.post('/ntr_questions/add', row);
let res= await window.framework.http.post('/ntr_questions/add', row);
return res;
}
async edit(row) {
let res= await http.post('/ntr_questions/edit', row);
let res= await window.framework.http.post('/ntr_questions/edit', row);
return res;
}
async del(row) {
let res= await http.post('/ntr_questions/del', row);
let res= await window.framework.http.post('/ntr_questions/del', row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class ntr_recordsClServer {
async all(param) {
let res= await http.get('/ntr_records/all', param);
let res= await window.framework.httpget('/ntr_records/all', param);
return res;
}
async page(row) {
let res= await http.post('/ntr_records/page', row);
let res= await window.framework.http.post('/ntr_records/page', row);
return res;
}
@@ -16,17 +16,17 @@ class ntr_recordsClServer {
}
async add(row) {
let res= await http.post('/ntr_records/add', row);
let res= await window.framework.http.post('/ntr_records/add', row);
return res;
}
async edit(row) {
let res= await http.post('/ntr_records/edit', row);
let res= await window.framework.http.post('/ntr_records/edit', row);
return res;
}
async del(row) {
let res= await http.post('/ntr_records/del', row);
let res= await window.framework.http.post('/ntr_records/del', row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class transfer_detailsClServer {
async all(param) {
let res= await http.get('/transfer_details/all', param);
let res= await window.framework.httpget('/transfer_details/all', param);
return res;
}
async page(row) {
let res= await http.post('/transfer_details/page', row);
let res= await window.framework.http.post('/transfer_details/page', row);
return res;
}
@@ -16,17 +16,17 @@ class transfer_detailsClServer {
}
async add(row) {
let res= await http.post('/transfer_details/add', row);
let res= await window.framework.http.post('/transfer_details/add', row);
return res;
}
async edit(row) {
let res= await http.post('/transfer_details/edit', row);
let res= await window.framework.http.post('/transfer_details/edit', row);
return res;
}
async del(row) {
let res= await http.post('/transfer_details/del', row);
let res= await window.framework.http.post('/transfer_details/del', row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from "@/libs/http";
class FileServe {
async upload_oos_img(row) {
let res = await http.postFormData("/sys_file/upload_oos_img", row);
let res = await window.framework.http.postFormData("/sys_file/upload_oos_img", row);
return res;
}
async upload_Img(row) {
let res = await http.postFormData("/file/upload_Img", row);
let res = await window.framework.http.postFormData("/file/upload_Img", row);
return res;
}
}

View File

@@ -1,27 +1,27 @@
import http from '@/libs/http'
class RolePermissionServer {
async getRoles(callback) {
let res = await http.get('/SysRolePermission/Query', {})
let res = await window.framework.httpget('/SysRolePermission/Query', {})
return res
}
async getRole(row) {
let res = await http.get('/SysRolePermission/QueryByRoleId', row)
let res = await window.framework.httpget('/SysRolePermission/QueryByRoleId', row)
return res
}
async add(row) {
let res = await http.post('/SysRolePermission/add', row)
let res = await window.framework.http.post('/SysRolePermission/add', row)
return res
}
async edit(row) {
let res = await http.post('/SysRolePermission/edit', row)
let res = await window.framework.http.post('/SysRolePermission/edit', row)
return res
}
async del(row) {
let res = await http.post('/SysRolePermission/del', row)
let res = await window.framework.http.post('/SysRolePermission/del', row)
return res
}
}

View File

@@ -1,23 +1,23 @@
import http from "@/libs/http";
class RoleServer {
async list() {
let res = await http.get("/sys_role/index", {});
let res = await window.framework.httpget("/sys_role/index", {});
return res;
}
async add(row) {
let res = await http.post("/sys_role/add", row);
let res = await window.framework.http.post("/sys_role/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_role/edit", row);
let res = await window.framework.http.post("/sys_role/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_role/del", row);
let res = await window.framework.http.post("/sys_role/del", row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http'
class ShpProfitServer {
async report(param) {
let res = await http.post('/shpProfit/report', param)
let res = await window.framework.http.post('/shpProfit/report', param)
return res
}
async list(param) {
let res = await http.post('/shpProfit/list', param)
let res = await window.framework.http.post('/shpProfit/list', param)
return res
}
}

View File

@@ -1,22 +1,22 @@
import http from '@/libs/http'
class SpecificationServer {
async list() {
let res = await http.post('/specification/list', {})
let res = await window.framework.http.post('/specification/list', {})
return res
}
async add(row) {
let res = await http.post('/specification/add', row)
let res = await window.framework.http.post('/specification/add', row)
return res
}
async edit(row) {
let res = await http.post('/specification/edit', row)
let res = await window.framework.http.post('/specification/edit', row)
return res
}
async del(row) {
let res = await http.post('/specification/del', row)
let res = await window.framework.http.post('/specification/del', row)
return res
}
}

View File

@@ -1,7 +1,7 @@
import http from "@/libs/http";
class SysAddress {
async index(param) {
let res = await http.get("/sys_address/index", param);
let res = await window.framework.httpget("/sys_address/index", param);
return res;
}
}

View File

@@ -1,27 +1,27 @@
import http from "@/libs/http";
class SysModuleServer {
async all() {
let res = await http.get("/sys_menu/all", {});
let res = await window.framework.httpget("/sys_menu/all", {});
return res;
}
async list(row) {
let res = await http.get("/sys_menu/all", row);
let res = await window.framework.httpget("/sys_menu/all", row);
return res;
}
async add(row) {
let res = await http.post("/sys_menu/add", row);
let res = await window.framework.http.post("/sys_menu/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_menu/edit", row);
let res = await window.framework.http.post("/sys_menu/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_menu/del", row);
let res = await window.framework.http.post("/sys_menu/del", row);
return res;
}
}

View File

@@ -1,27 +1,27 @@
import http from "@/libs/http";
class SysLogServe {
async all(param) {
let res = await http.get("/sys_log/all", param);
let res = await window.framework.httpget("/sys_log/all", param);
return res;
}
async detail(param) {
let res = await http.get("/sys_log/detail", param);
let res = await window.framework.httpget("/sys_log/detail", param);
return res;
}
async delete(param) {
let res = await http.get("/sys_log/delete", param);
let res = await window.framework.httpget("/sys_log/delete", param);
return res;
}
async delete_all(param) {
let res = await http.get("/sys_log/delete_all", param);
let res = await window.framework.httpget("/sys_log/delete_all", param);
return res;
}
async operates(param) {
let res = await http.get("/sys_log/operates", param);
let res = await window.framework.httpget("/sys_log/operates", param);
return res;
}
}

View File

@@ -1,13 +1,13 @@
import http from '@/libs/http';
class systemTypeClServer {
async all(param) {
let res= await http.get('/sys_project_type/all', param);
let res= await window.framework.httpget('/sys_project_type/all', param);
return res;
}
async page(row) {
let res= await http.post('/sys_project_type/page', row);
let res= await window.framework.http.post('/sys_project_type/page', row);
return res;
}
@@ -18,17 +18,17 @@ class systemTypeClServer {
}
async add(row) {
let res= await http.post('/sys_project_type/add', row);
let res= await window.framework.http.post('/sys_project_type/add', row);
return res;
}
async edit(row) {
let res= await http.post('/sys_project_type/edit', row);
let res= await window.framework.http.post('/sys_project_type/edit', row);
return res;
}
async del(row) {
let res= await http.post('/sys_project_type/del', row);
let res= await window.framework.http.post('/sys_project_type/del', row);
return res;
}
}

View File

@@ -1,29 +1,29 @@
import http from '@/libs/http'
class TableServer {
async getAll(callback) {
return await http.get('/table/index', {})
return await window.framework.httpget('/table/index', {})
}
async add(row, callback) {
return await http.post('/table/add', row)
return await window.framework.http.post('/table/add', row)
}
async edit(row, callback) {
return await http.post('/table/edit', row, function(res) {
return await window.framework.http.post('/table/edit', row, function(res) {
callback && callback(res)
})
}
async del(row, callback) {
return await http.post('/table/del', row)
return await window.framework.http.post('/table/del', row)
}
async autoApi(id) {
return await http.get('/template/api', { id: id })
return await window.framework.httpget('/template/api', { id: id })
}
async autoDb(id) {
return await http.get('/template/autoDb', { id: id })
return await window.framework.httpget('/template/autoDb', { id: id })
}
}

View File

@@ -1,12 +1,12 @@
import http from "@/libs/http";
class UserServer {
async login(row) {
let res = await http.post("/sys_user/login", row);
let res = await window.framework.http.post("/sys_user/login", row);
return res;
}
async all() {
let res = await http.get("/sys_user/index", {});
let res = await window.framework.httpget("/sys_user/index", {});
return res;
}
@@ -16,22 +16,22 @@ class UserServer {
}
async authorityMenus() {
let res = await http.post("/sys_user/authorityMenus", {});
let res = await window.framework.http.post("/sys_user/authorityMenus", {});
return res;
}
async add(row) {
let res = await http.post("/sys_user/add", row);
let res = await window.framework.http.post("/sys_user/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_user/edit", row);
let res = await window.framework.http.post("/sys_user/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_user/del", row);
let res = await window.framework.http.post("/sys_user/del", row);
return res;
}
}

View File

@@ -1,27 +1,27 @@
import http from "@/libs/http";
class FormFieldServer {
async all(param) {
let res = await http.get("/sys_form_field/all", param);
let res = await window.framework.httpget("/sys_form_field/all", param);
return res;
}
async page(row) {
let res = await http.post("/sys_form_field/page", row);
let res = await window.framework.http.post("/sys_form_field/page", row);
return res;
}
async add(row) {
let res = await http.post("/sys_form_field/add", row);
let res = await window.framework.http.post("/sys_form_field/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_form_field/edit", row);
let res = await window.framework.http.post("/sys_form_field/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_form_field/del", row);
let res = await window.framework.http.post("/sys_form_field/del", row);
return res;
}
}

View File

@@ -1,32 +1,32 @@
import http from "@/libs/http";
class FormServer {
async all(param) {
let res = await http.get("/sys_form/all", param);
let res = await window.framework.httpget("/sys_form/all", param);
return res;
}
async page(row) {
let res = await http.post("/sys_form/page", row);
let res = await window.framework.http.post("/sys_form/page", row);
return res;
}
async generate(row) {
let res = await http.post("/sys_form/generate", row);
let res = await window.framework.http.post("/sys_form/generate", row);
return res;
}
async add(row) {
let res = await http.post("/sys_form/add", row);
let res = await window.framework.http.post("/sys_form/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_form/edit", row);
let res = await window.framework.http.post("/sys_form/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_form/del", row);
let res = await window.framework.http.post("/sys_form/del", row);
return res;
}
}

View File

@@ -2,46 +2,46 @@ import http from "@/libs/http";
class MenuServer {
async list(row) {
let res = await http.get("/sys_menu/index", row);
let res = await window.framework.httpget("/sys_menu/index", row);
return res;
}
async generate(row) {
let res = await http.post("/sys_menu/generate", row);
let res = await window.framework.http.post("/sys_menu/generate", row);
return res;
}
async add(row) {
let res = await http.post("/sys_menu/add", row);
let res = await window.framework.http.post("/sys_menu/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_menu/edit", row);
let res = await window.framework.http.post("/sys_menu/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_menu/del", row);
let res = await window.framework.http.post("/sys_menu/del", row);
return res;
}
async generate(row) {
let res = await http.post("/form/generate", row);
let res = await window.framework.http.post("/form/generate", row);
return res;
}
async generateModel(row) {
let res = await http.post("/model/generate", row);
let res = await window.framework.http.post("/model/generate", row);
return res;
}
async modelAll(row) {
let res = await http.post("/model/all", row);
let res = await window.framework.http.post("/model/all", row);
return res;
}
async modelInterface(row) {
let res = await http.post("/model/interface", row);
let res = await window.framework.http.post("/model/interface", row);
return res;
}
}

View File

@@ -1,29 +1,29 @@
import http from "@/libs/http";
class ModelFieldServer {
async all(row) {
let res = await http.get("/sys_model_field/all", row);
let res = await window.framework.httpget("/sys_model_field/all", row);
return res;
}
async allByKey(row) {
let res = await http.get("/sys_model_field/allByKey", row, {
let res = await window.framework.httpget("/sys_model_field/allByKey", row, {
hideLoad: true
});
return res;
}
async add(row) {
let res = await http.post("/sys_model_field/add", row);
let res = await window.framework.http.post("/sys_model_field/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_model_field/edit", row);
let res = await window.framework.http.post("/sys_model_field/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_model_field/del", row);
let res = await window.framework.http.post("/sys_model_field/del", row);
return res;
}
}

View File

@@ -1,37 +1,37 @@
import http from "@/libs/http";
class ModelServer {
async interface(row) {
let res = await http.post("/sys_model/interface", row);
let res = await window.framework.http.post("/sys_model/interface", row);
return res;
}
async all() {
let res = await http.get("/sys_model/all", {});
let res = await window.framework.httpget("/sys_model/all", {});
return res;
}
async detail(row) {
let res = await http.get("/sys_model/detail", row);
let res = await window.framework.httpget("/sys_model/detail", row);
return res;
}
async regenerate(row) {
let res = await http.post("/sys_model/regenerate", row);
let res = await window.framework.http.post("/sys_model/regenerate", row);
return res;
}
async add(row) {
let res = await http.post("/sys_model/add", row);
let res = await window.framework.http.post("/sys_model/add", row);
return res;
}
async edit(row) {
let res = await http.post("/sys_model/edit", row);
let res = await window.framework.http.post("/sys_model/edit", row);
return res;
}
async del(row) {
let res = await http.post("/sys_model/del", row);
let res = await window.framework.http.post("/sys_model/del", row);
return res;
}
}

View File

@@ -1,27 +1,27 @@
import http from "@/libs/http";
class ParamSetupServer {
async getAll() {
return await http.get("/sys_parameter/index", {});
return await window.framework.httpget("/sys_parameter/index", {});
}
async getOne(key) {
return await http.get("/sys_parameter/key", { key });
return await window.framework.httpget("/sys_parameter/key", { key });
}
async add(row) {
return await http.post("/sys_parameter/add", row);
return await window.framework.http.post("/sys_parameter/add", row);
}
async edit(row) {
return await http.post("/sys_parameter/edit", row);
return await window.framework.http.post("/sys_parameter/edit", row);
}
async setSysConfig(row) {
return await http.post("/sys_parameter/setSysConfig", row);
return await window.framework.http.post("/sys_parameter/setSysConfig", row);
}
async del(row) {
return await http.post("/sys_parameter/del", row);
return await window.framework.http.post("/sys_parameter/del", row);
}
}

View File

@@ -1,26 +1,26 @@
import http from "@/libs/http";
class SysControlTypeServer {
async all(param) {
let res = await http.get("/sys_control_type/all", param);
let res = await window.framework.httpget("/sys_control_type/all", param);
return res;
}
async page(row) {
let res = await http.post("/sys_control_type/page", row);
let res = await window.framework.http.post("/sys_control_type/page", row);
return res;
}
async add(param) {
let res = await http.post("/sys_control_type/add", param);
let res = await window.framework.http.post("/sys_control_type/add", param);
return res;
}
async edit(param) {
let res = await http.post("/sys_control_type/edit", param);
let res = await window.framework.http.post("/sys_control_type/edit", param);
return res;
}
async del(param) {
let res = await http.post("/sys_control_type/del", param);
let res = await window.framework.http.post("/sys_control_type/del", param);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class recommend_blocksClServer {
async all(param) {
let res= await http.get('/recommend_blocks/all', param);
let res= await window.framework.httpget('/recommend_blocks/all', param);
return res;
}
async page(row) {
let res= await http.post('/recommend_blocks/page', row);
let res= await window.framework.http.post('/recommend_blocks/page', row);
return res;
}
@@ -16,17 +16,17 @@ class recommend_blocksClServer {
}
async add(row) {
let res= await http.post('/recommend_blocks/add', row);
let res= await window.framework.http.post('/recommend_blocks/add', row);
return res;
}
async edit(row) {
let res= await http.post('/recommend_blocks/edit', row);
let res= await window.framework.http.post('/recommend_blocks/edit', row);
return res;
}
async del(row) {
let res= await http.post('/recommend_blocks/del', row);
let res= await window.framework.http.post('/recommend_blocks/del', row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class user_followsClServer {
async all(param) {
let res= await http.get('/user_follows/all', param);
let res= await window.framework.httpget('/user_follows/all', param);
return res;
}
async page(row) {
let res= await http.post('/user_follows/page', row);
let res= await window.framework.http.post('/user_follows/page', row);
return res;
}
@@ -16,17 +16,17 @@ class user_followsClServer {
}
async add(row) {
let res= await http.post('/user_follows/add', row);
let res= await window.framework.http.post('/user_follows/add', row);
return res;
}
async edit(row) {
let res= await http.post('/user_follows/edit', row);
let res= await window.framework.http.post('/user_follows/edit', row);
return res;
}
async del(row) {
let res= await http.post('/user_follows/del', row);
let res= await window.framework.http.post('/user_follows/del', row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class user_trackingClServer {
async all(param) {
let res= await http.get('/user_tracking/all', param);
let res= await window.framework.httpget('/user_tracking/all', param);
return res;
}
async page(row) {
let res= await http.post('/user_tracking/page', row);
let res= await window.framework.http.post('/user_tracking/page', row);
return res;
}
@@ -16,17 +16,17 @@ class user_trackingClServer {
}
async add(row) {
let res= await http.post('/user_tracking/add', row);
let res= await window.framework.http.post('/user_tracking/add', row);
return res;
}
async edit(row) {
let res= await http.post('/user_tracking/edit', row);
let res= await window.framework.http.post('/user_tracking/edit', row);
return res;
}
async del(row) {
let res= await http.post('/user_tracking/del', row);
let res= await window.framework.http.post('/user_tracking/del', row);
return res;
}
}

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http';
class wch_citiesClServer {
async all(param) {
let res= await http.get('/wch_cities/all', param);
let res= await window.framework.httpget('/wch_cities/all', param);
return res;
}
async page(row) {
let res= await http.post('/wch_cities/page', row);
let res= await window.framework.http.post('/wch_cities/page', row);
return res;
}
@@ -16,17 +16,17 @@ class wch_citiesClServer {
}
async add(row) {
let res= await http.post('/wch_cities/add', row);
let res= await window.framework.http.post('/wch_cities/add', row);
return res;
}
async edit(row) {
let res= await http.post('/wch_cities/edit', row);
let res= await window.framework.http.post('/wch_cities/edit', row);
return res;
}
async del(row) {
let res= await http.post('/wch_cities/del', row);
let res= await window.framework.http.post('/wch_cities/del', row);
return res;
}
}

View File

@@ -39,10 +39,29 @@ const app = new Vue({
router: AdminFramework.router,
store: AdminFramework.store,
render: h => h('router-view'),
created() {
async created() {
console.log('=== Admin Framework Demo 启动成功 ===')
console.log('框架版本:', AdminFramework.version)
console.log('配置信息:', this.$config)
// 刷新时恢复菜单
const token = this.$store.state.user.token
const authorityMenus = localStorage.getItem('authorityMenus')
if (token && authorityMenus) {
console.log('检测到登录状态,恢复菜单...')
try {
await this.$store.dispatch('user/setAuthorityMenus', {
Main: AdminFramework.Main,
ParentView: AdminFramework.ParentView,
Page404: AdminFramework.Page404,
authorityMenus: authorityMenus
})
console.log('菜单恢复成功')
} catch (error) {
console.error('恢复菜单失败:', error)
}
}
}
})