소스 검색

2023-01-11 update

1. 调整axios 携带cookie 以解决升压站跨域问题
moccus 2 년 전
부모
커밋
f2bc1042e7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/views/WindSite/components/boosterstation/BoosterStation.js

+ 1 - 1
src/views/WindSite/components/boosterstation/BoosterStation.js

@@ -2070,7 +2070,7 @@ export class BoosterStation {
 	getDatas(station, action) {
 		var currentStation = this.tags[station]
 		var tags = this.getTags(currentStation);
-
+		axios.defaults.withCredentials = true  //设定携带cookie (默认axios不携带cookie)
 		axios.get(`${config.adapterUrl}ts/latest?keys=${tags}`)
 			.then(msg => {
 				var datas = msg.data;