hello about
Count: {{ tokenStore.count }}
diff --git a/src/views/home.vue b/src/views/home.vue index 4dbd601..949ab4a 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -33,7 +33,7 @@ const alertDescription = ref(''); const fetchData = async()=>{ try { - const response=await request.get('/wechat/token') + const response=await request.get('/api/product') console.log(response) } catch (error) { alertTitle.value = 'Error'; diff --git a/vite.config.js b/vite.config.js index 9a7c744..890cf4e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,10 +14,10 @@ export default defineConfig({ plugins: [vue()], server:{ proxy:{ - '/api':{ - target: 'https://api.wodeschool.com', + '/apis':{ + target: 'http://w3.myschools.me', changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/,'') + rewrite: (path) => path.replace(/^\/apis/,'') } } }