diff --git a/src/api/base.js b/src/api/base.js new file mode 100644 index 0000000..d2aa226 --- /dev/null +++ b/src/api/base.js @@ -0,0 +1,6 @@ +import request from '@/util/axios' + +export const queryWeath = () => request({ + url: '/weather/v1/?district_id=371122&data_type=all&ak=GUGV9zeuAOeD4MrCwd1MeMkcae15vQ1e', + method: 'get', +}); diff --git a/vue.config.js b/vue.config.js index 6f7493a..b8c2a6c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -24,6 +24,11 @@ module.exports = defineConfig({ '^/gatewayapi': '' } }, + '/weather': { + target: 'https://api.map.baidu.com', + changeOrigin: true, + ws: true, + }, } } });