禁止他人登录

master
huan.xu 5 years ago
parent 362c07025f
commit 60f7a4afc3
  1. 2
      src/api/yyyf.js
  2. 2
      src/utils/request.js

@ -2,7 +2,7 @@ import request from '@/utils/request';
import axios from 'axios'; import axios from 'axios';
import Cookie from '@/common/cookie'; import Cookie from '@/common/cookie';
import {getCurrentLanguage, languageCode2BELocalCode} from '@/common/i18n'; import {getCurrentLanguage, languageCode2BELocalCode} from '@/common/i18n';
import {userApi, ethApi} from './app'; import {yyyfApi} from './app';
const Host = yyyfApi + '/'; const Host = yyyfApi + '/';

@ -16,7 +16,7 @@ service.interceptors.request.use(
config => { config => {
// Do something before request is sent // Do something before request is sent
config.headers['X-Requested-Token'] = localStorage.getItem('token') || ''; config.headers['X-Requested-Token'] = localStorage.getItem('token') || '';
config.headers['X-Requested-YyyfToken'] = localStorage.getItem('yyyfToken') || '';
config.headers['locale'] = languageCode2BELocalCode(getCurrentLanguage()); config.headers['locale'] = languageCode2BELocalCode(getCurrentLanguage());
return config; return config;
}, },

Loading…
Cancel
Save