File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
docs/tutorial/07-project/01-best-practice
i18n/zh-CN/docusaurus-plugin-content-docs
current/tutorial/07-project/01-best-practice
version-v2/tutorial/07-best-practice
versioned_docs/version-v2/tutorial/07-best-practice Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const userAlova = createAlova({
5656 baseURL: ' https://api-user.alovajs.org' ,
5757 statesHook: VueHook,
5858 requestAdapter: adapterFetch (),
59- async responded (method ) {
59+ async beforeRequest (method ) {
6060 method .config .headers .token = ' user token' ;
6161 }
6262});
@@ -66,7 +66,7 @@ export const orderAlova = createAlova({
6666 baseURL: ' https://api-order.alovajs.org' ,
6767 statesHook: VueHook,
6868 requestAdapter: adapterFetch (),
69- async responded (method ) {
69+ async beforeRequest (method ) {
7070 method .config .headers .token = ' order token' ;
7171 }
7272});
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const userAlova = createAlova({
5656 baseURL: ' https://api-user.alovajs.org' ,
5757 statesHook: VueHook,
5858 requestAdapter: adapterFetch (),
59- async responded (method ) {
59+ async beforeRequest (method ) {
6060 method .config .headers .token = ' user token' ;
6161 }
6262});
@@ -66,7 +66,7 @@ export const orderAlova = createAlova({
6666 baseURL: ' https://api-order.alovajs.org' ,
6767 statesHook: VueHook,
6868 requestAdapter: adapterFetch (),
69- async responded (method ) {
69+ async beforeRequest (method ) {
7070 method .config .headers .token = ' order token' ;
7171 }
7272});
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const userAlova = createAlova({
5656 baseURL: ' https://api-user.alovajs.org' ,
5757 statesHook: VueHook,
5858 requestAdapter: GlobalFetch (),
59- async responded (method ) {
59+ async beforeRequest (method ) {
6060 method .config .headers .token = ' user token' ;
6161 }
6262});
@@ -66,7 +66,7 @@ export const orderAlova = createAlova({
6666 baseURL: ' https://api-order.alovajs.org' ,
6767 statesHook: VueHook,
6868 requestAdapter: GlobalFetch (),
69- async responded (method ) {
69+ async beforeRequest (method ) {
7070 method .config .headers .token = ' order token' ;
7171 }
7272});
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const userAlova = createAlova({
5656 baseURL: ' https://api-user.alovajs.org' ,
5757 statesHook: VueHook,
5858 requestAdapter: GlobalFetch (),
59- async responded (method ) {
59+ async beforeRequest (method ) {
6060 method .config .headers .token = ' user token' ;
6161 }
6262});
@@ -66,7 +66,7 @@ export const orderAlova = createAlova({
6666 baseURL: ' https://api-order.alovajs.org' ,
6767 statesHook: VueHook,
6868 requestAdapter: GlobalFetch (),
69- async responded (method ) {
69+ async beforeRequest (method ) {
7070 method .config .headers .token = ' order token' ;
7171 }
7272});
You can’t perform that action at this time.
0 commit comments