yxk_gk_master/request/api/token.js

20 lines
687 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Request from '../js/index';
export default {
// 获取 模拟token
getMockToken (id) {
// return Request().get('/test/token/get?id=' + id);
return 'b64dae21-0a0a-4078-b545-6d94cb43f01f';
},
// 验证 模拟tokenid为 2460392754 则 successcode 200 否则 fail code 为 401
checkMockToken (token) {
return Request().request({
url: '/test/token/check',
method: 'get',
params: { name: 'xxx' },
header: { token, uid: 'ux' },
count: 0 // 用来记录 每个实例请求的 请求次数(可以用来判断 重新发送请求的次数)
});
}
}