feat:v1.4前端更新
This commit is contained in:
27
app/pages/users/components/verifition/api/index.js
Normal file
27
app/pages/users/components/verifition/api/index.js
Normal 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
|
||||
});
|
||||
}
|
||||
70
app/pages/users/components/verifition/utils/axios.js
Normal file
70
app/pages/users/components/verifition/utils/axios.js
Normal 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;
|
||||
527
app/pages/users/components/verifition/verify.vue
Normal file
527
app/pages/users/components/verifition/verify.vue
Normal file
File diff suppressed because one or more lines are too long
559
app/pages/users/components/verifition/verify/verifyPoint.vue
Normal file
559
app/pages/users/components/verifition/verify/verifyPoint.vue
Normal file
File diff suppressed because one or more lines are too long
662
app/pages/users/components/verifition/verify/verifySlider.vue
Normal file
662
app/pages/users/components/verifition/verify/verifySlider.vue
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user