|
|
@@ -15,7 +15,7 @@ axios.interceptors.request.use((config) => {
|
|
|
//在发送请求之前做某件事
|
|
|
// 确保每个请求都携带cookie
|
|
|
config.withCredentials = true;
|
|
|
-
|
|
|
+
|
|
|
let token = sessionStorage.getItem('access_token') || "" //获取token
|
|
|
if (token != "") {
|
|
|
config.headers = {
|
|
|
@@ -45,12 +45,12 @@ axios.interceptors.request.use((config) => {
|
|
|
} else if (config.url.indexOf('https://dify.cocorobo.cn') != -1) {
|
|
|
if (config.url.indexOf('?key=role') != -1) {
|
|
|
config.headers = {
|
|
|
- Authorization: `Bearer app-TonzLPv7rPG0EtnFKszOWjwt`,
|
|
|
+ Authorization: `Bearer app-CwlZjFy0N3uuf9CN7nY0kEuQ`,
|
|
|
"Content-Type": "application/json"
|
|
|
}
|
|
|
} else if (config.url.indexOf('?key=code') != -1) {
|
|
|
config.headers = {
|
|
|
- Authorization: `Bearer app-zOMxBqyEKoJSvW10e5SS0kgj`,
|
|
|
+ Authorization: `Bearer app-K3Z4CQPVb1YT4B5k8xiacirO`,
|
|
|
"Content-Type": "application/json"
|
|
|
}
|
|
|
}
|