diff --git a/app/api/auth/index.js b/app/api/auth/index.js
index b974d76..5187568 100644
--- a/app/api/auth/index.js
+++ b/app/api/auth/index.js
@@ -7,3 +7,17 @@ export async function senCode(data) {
body: data,
})
}
+export async function userLogin(data) {
+ const http = getHttp()
+ return await http('/api/v1/m/user/login', {
+ method: 'POST',
+ body: data,
+ })
+}
+export async function userUpdate(data) {
+ const http = getHttp()
+ return await http('/api/v1/m/user/update', {
+ method: 'POST',
+ body: data,
+ })
+}
\ No newline at end of file
diff --git a/app/api/goods/index.js b/app/api/goods/index.js
new file mode 100644
index 0000000..7f9adea
--- /dev/null
+++ b/app/api/goods/index.js
@@ -0,0 +1,16 @@
+import { getHttp } from '~/api/http.js'
+
+export async function artworkList(data) {
+ const http = getHttp()
+ return await http('/api/v1/m/auction/default/artwork/list', {
+ method: 'POST',
+ body: data,
+ })
+}
+export async function defaultDetail(data) {
+ const http = getHttp()
+ return await http('/api/v1/m/auction/default/detail', {
+ method: 'POST',
+ body: data,
+ })
+}
\ No newline at end of file
diff --git a/app/api/http.js b/app/api/http.js
index d9ec74b..85ca5bd 100644
--- a/app/api/http.js
+++ b/app/api/http.js
@@ -2,6 +2,7 @@
import { useRuntimeConfig } from '#app'
import { ofetch } from 'ofetch'
import {message} from '@/components/x-message/useMessage.js'
+import {authStore} from "@/stores/auth/index.js";
let httpStatusErrorHandler
let http
@@ -12,25 +13,22 @@ export function setupHttp() {
const config = useRuntimeConfig()
const baseURL = config.public.NUXT_PUBLIC_API_BASE
-
+ const {token}= authStore()
http = ofetch.create({
baseURL,
headers: { 'Content-Type': 'application/json' },
async onRequest({ options }) {
- const token = localStorage.getItem('token')
-
options.headers = {
...options.headers,
- ...(token && { Authorization: token }),
+ Authorization:token.value
}
},
async onResponse({ response }) {
if (response._data.status===1){
- message.warning(response._data.msg)
+ message.error(response._data.msg)
}
},
async onResponseError({ response }) {
- console.log('error错误')
const { message } = response._data
if (Array.isArray(message)) {
message.forEach((item) => {
diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue
index 9a047ac..4c058c7 100644
--- a/app/components/AppHeader.vue
+++ b/app/components/AppHeader.vue
@@ -1,6 +1,6 @@
```
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index c20d956..c29e7ce 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -8,6 +8,6 @@
\ No newline at end of file
diff --git a/app/pages/home/components/Cescribe/index.vue b/app/pages/home/components/Cescribe/index.vue
new file mode 100644
index 0000000..20594f0
--- /dev/null
+++ b/app/pages/home/components/Cescribe/index.vue
@@ -0,0 +1,15 @@
+
+
+
+