修复协议协议判断错误导致https站点不能连接的问题
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
// prod
|
// prod
|
||||||
let wsPrefix;
|
let wsPrefix;
|
||||||
if (window.location.protocol === 'https') {
|
if (window.location.protocol === 'https:') {
|
||||||
wsPrefix = 'wss:'
|
wsPrefix = 'wss:'
|
||||||
} else {
|
} else {
|
||||||
wsPrefix = 'ws:'
|
wsPrefix = 'ws:'
|
||||||
@ -8,7 +8,7 @@ if (window.location.protocol === 'https') {
|
|||||||
|
|
||||||
export const server = '';
|
export const server = '';
|
||||||
export const wsServer = wsPrefix + window.location.host;
|
export const wsServer = wsPrefix + window.location.host;
|
||||||
export const prefix = window.location.protocol + ':' + window.location.host;
|
export const prefix = window.location.protocol + '//' + window.location.host;
|
||||||
|
|
||||||
// dev
|
// dev
|
||||||
// export const server = '//127.0.0.1:8088';
|
// export const server = '//127.0.0.1:8088';
|
||||||
|
@ -52,7 +52,6 @@ class Dashboard extends Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
session: result['data']
|
session: result['data']
|
||||||
})
|
})
|
||||||
console.log('set session', this.state.session)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user