feat:v1.4前端更新

This commit is contained in:
超凡
2025-06-24 14:43:09 +08:00
parent 0268aa5033
commit 35fec82e4a
1026 changed files with 118424 additions and 56490 deletions

View File

@@ -0,0 +1,27 @@
/**
* 此处可直接引用自己项目封装好的 axios 配合后端联调
*/
import request from '../utils/axios'; // 组件内部封装的axios
//import request from "@/api/axios.js" //调用项目封装的axios
/**
* 滑块验证
* @param {Object} data
*/
export function ajcaptchaCheck(data) {
return request.post("safety/check", data, {
noAuth: true
});
}
/**
* 滑块信息
* @param {Object} data
*/
export function getAjcaptcha(data) {
return request.post("safety/get", data, {
noAuth: true
});
}

View File

@@ -0,0 +1,70 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
HTTP_REQUEST_URL,
HEADER,
TOKENNAME,
HEADERPARAMS
} from '@/config/app';
import {
toLogin,
checkLogin
} from '@/libs/login';
import store from '@/store';
/**
* 发送请求
*/
function baseRequest(url, method, data, {
noAuth = false,
noVerify = false
}, params) {
let Url = HTTP_REQUEST_URL,
header = HEADER
// if (params != undefined) {
// header = HEADERPARAMS;
// }
if (!noAuth) {
//登录过期自动登录
if (!store.state.app.token && !checkLogin()) {
toLogin();
return Promise.reject({
msg: '未登录'
});
}
}
if (store.state.app.token) header[TOKENNAME] = store.state.app.token;
return new Promise((reslove, reject) => {
uni.request({
url: Url + '/api/public/' + url,
method: method || 'GET',
header: header,
data: data || {},
success: (res) => {
reslove(res.data, res);
},
fail: (msg) => {
reject('请求失败');
}
})
});
}
const request = {};
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
request[method] = (api, data, opt, params) => baseRequest(api, method, data, opt || {}, params)
});
export default request;

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long