forked from Gitlink/forgeplus-react
用户登录之后绑定cookie名称以及创客详情中完善主体信息跳转到8001环境
This commit is contained in:
parent
8440825284
commit
7f44d0e115
|
|
@ -310,7 +310,7 @@ function RegisterList({ showNotification }) {
|
|||
showUploadList: true,
|
||||
withCredentials: true,
|
||||
headers: {
|
||||
Authorization: cookie.load('autologin_forge_military') || sessionStorage.osredmToken,
|
||||
Authorization: cookie.load('autologin_trustie') || sessionStorage.osredmToken,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { notification} from 'antd';
|
|||
import axios from 'axios';
|
||||
import cookie from 'react-cookies';
|
||||
|
||||
export const TokenKey = 'autologin_forge_military';
|
||||
export const TokenKey = 'autologin_trustie';
|
||||
export default function javaFetch(actionUrl){
|
||||
if (window.location.href.indexOf('localhost') < 0) {
|
||||
axios.defaults.withCredentials = true;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ for (const item of applyStatusAllArr) {
|
|||
|
||||
|
||||
export default Form.create()(
|
||||
forwardRef(({ match, current_user, form, history, showNotification }, ref) => {
|
||||
forwardRef((props, ref) => {
|
||||
const { match, current_user, form, history, showNotification, mygetHelmetapi } = props;
|
||||
const id = match.params.taskId;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
|
||||
|
|
@ -363,7 +364,7 @@ export default Form.create()(
|
|||
}
|
||||
|
||||
function goUserProfiles() {
|
||||
window.open(`/users/${current_user.login}/profiles`);
|
||||
window.open(mygetHelmetapi && mygetHelmetapi.main_web_site_url+`/users/${current_user.login}/profiles`);
|
||||
}
|
||||
|
||||
function backPublicEnd(makePublicAt, makePublicDays) {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class NewHeader extends Component {
|
|||
}
|
||||
onLogout = () => {
|
||||
const url = `/accounts/logout.json`
|
||||
this.delCookie("autologin_forge_military")
|
||||
this.delCookie("autologin_trustie")
|
||||
axios.get(url, {
|
||||
}).then((response) => {
|
||||
if (response.data.status === 1) {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class NewHeader extends Component {
|
|||
};
|
||||
onLogout = () => {
|
||||
const url = `/accounts/logout.json`;
|
||||
this.delCookie("autologin_forge_military");
|
||||
this.delCookie("autologin_trustie");
|
||||
axios.get(url, {}).then((response) => {
|
||||
if (response.data.status === 1) {
|
||||
this.setState({
|
||||
|
|
|
|||
Loading…
Reference in New Issue