YY 2 years ago
parent
commit
d648590f89
2 changed files with 12 additions and 2 deletions
  1. 6 1
      src/stores/allAdmin/channel.ts
  2. 6 1
      src/stores/allAdmin/dock.ts

+ 6 - 1
src/stores/allAdmin/channel.ts

@@ -39,6 +39,10 @@ export const ChannelStore = defineStore('channel', () => {
     const res = await axios.$delete(`${api.url}/${payload}`)
     return res
   }
+  const login = async (payload: any): Promise<IQueryResult> => {
+    const res = await axios.$post(`${api.url}/login`, payload)
+    return res
+  }
   return {
     count,
     doubleCount,
@@ -47,6 +51,7 @@ export const ChannelStore = defineStore('channel', () => {
     fetch,
     create,
     update,
-    del
+    del,
+    login
   }
 })

+ 6 - 1
src/stores/allAdmin/dock.ts

@@ -39,6 +39,10 @@ export const DockStore = defineStore('dock', () => {
     const res = await axios.$delete(`${api.url}/${payload}`)
     return res
   }
+  const login = async (payload: any): Promise<IQueryResult> => {
+    const res = await axios.$post(`${api.url}/login`, payload)
+    return res
+  }
   return {
     count,
     doubleCount,
@@ -47,6 +51,7 @@ export const DockStore = defineStore('dock', () => {
     fetch,
     create,
     update,
-    del
+    del,
+    login
   }
 })