File tree Expand file tree Collapse file tree 5 files changed +27
-10
lines changed Expand file tree Collapse file tree 5 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function toGithub() {
1818<template >
1919 <nav class =" nav space-x-1" >
2020 <Icon @click =" toggleTheme" class =" text-xl text-zinc-400 cursor-pointer hover:text-emerald-900" :icon =" getTheme()" />
21- <a href =' https://github.com/coderbaozi' ><Icon class =" text-xl text-zinc-400 cursor-pointer hover:text-emerald-900" icon =" uil:github" /></a >
21+ <a href =' https://github.com/coderbaozi/bollo-lite ' ><Icon class =" text-xl text-zinc-400 cursor-pointer hover:text-emerald-900" icon =" uil:github" /></a >
2222 </nav >
2323</template >
2424
Original file line number Diff line number Diff line change 1+ import fetcher from "../index"
2+
3+ export async function testRequest ( ) {
4+ return await fetcher . get ( { url :`` } )
5+ }
Original file line number Diff line number Diff line change 11import Request from './request'
22
33// replace ajax lib may be causes a name conflict
4- const fetch = new Request ( {
5- baseURL : '' ,
4+ const fetcher = new Request ( {
5+ // test example
6+ baseURL : 'https://v.api.aa1.cn/api/yiyan/index.php' ,
67 timeout : 3000 ,
78 interceptors : {
89 requestSuccessFn : ( config ) => {
@@ -20,4 +21,4 @@ const fetch = new Request({
2021 }
2122} )
2223
23- export default fetch
24+ export default fetcher
Original file line number Diff line number Diff line change 1+ import { defineStore } from 'pinia'
2+ import { testRequest } from "@/service/__test__/test" ;
3+
4+ const useTestStore = defineStore ( 'test' , {
5+
6+ state : ( ) :any => {
7+ return { testData :null }
8+ } ,
9+
10+ actions :{
11+ async testAction ( ) {
12+ this . testData = await testRequest ( )
13+ }
14+ }
15+ } )
16+
17+ export default useTestStore
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments