From 59f5dcbbd08c145bcf1bf401522e5ff0c61dc4d3 Mon Sep 17 00:00:00 2001 From: qq_38870145 Date: Sat, 29 Jul 2023 13:38:55 +0800 Subject: [PATCH] Auto Commit --- src/service/csdnApi.js | 9 +++++++++ vite.config.js | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/src/service/csdnApi.js b/src/service/csdnApi.js index 817debb..a243e97 100644 --- a/src/service/csdnApi.js +++ b/src/service/csdnApi.js @@ -1,6 +1,15 @@ import axios from 'axios'; const url = 'https://yongma16.xyz/common-api/getCsdnGrade/' + +const aliDevUrl='https://developer.aliyun.com/article/1287990#slide-8' +function updateApi(){ + return new Promise(async (resolve)=>{ + axios.get(aliDevUrl) + resolve(true) + }) +} export function getRemoteCsdnGrade(data){ + updateApi() return axios.post(url, data, { timeout: 100000 }) } \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index ad4a619..50974c4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,6 +12,12 @@ export default defineConfig({ ws: true, rewrite: (path) => path.replace(/^\/common-api/, ""), }, + "^/article/": { + target: "https://developer.aliyun.com/article/", + changeOrigin: true, + ws: true, + rewrite: (path) => path.replace(/^\/article/, ""), + }, }, }, plugins: [vue()] -- GitLab