Initial commit: MSH System\n\n- msh_single_uniapp: Vue 2 + UniApp 前端(微信小程序/H5/App/支付宝小程序)\n- msh_crmeb_22: Spring Boot 2.2 后端(C端API/管理端/业务逻辑)\n- models-integration: AI服务集成(Coze/KieAI/腾讯ASR)\n- docs: 产品文档与设计稿
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2024 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;
|
||||
527
msh_single_uniapp/pages/users/components/verifition/verify.vue
Normal file
527
msh_single_uniapp/pages/users/components/verifition/verify.vue
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user