diff --git a/src/components/CustomLogin.vue b/src/components/CustomLogin.vue
index dceb389..ffdbe5c 100644
--- a/src/components/CustomLogin.vue
+++ b/src/components/CustomLogin.vue
@@ -12,23 +12,25 @@ const formState = reactive({
const onfinish = async () => {
try {
- const response = await fetch('http://localhost:3000/login', {
- method: 'POST',
- cache: 'default',
- headers: {
- 'Content-Type': 'application/json; charset=utf-8'
- },
- credentials: 'include',
- body: JSON.stringify(formState)
- })
+ // const response = await fetch('http://localhost:3000/login', {
+ // method: 'POST',
+ // cache: 'default',
+ // headers: {
+ // 'Content-Type': 'application/json; charset=utf-8'
+ // },
+ // credentials: 'include',
+ // body: JSON.stringify(formState)
+ // })
- if (response.ok) {
- console.log(`formState.account:${formState.account}`)
- setToken(formState.account)
- await router.push('/')
- } else {
- console.error('Login failed', response.statusText)
- }
+ // if (response.ok) {
+ // console.log(`formState.account:${formState.account}`)
+ // setToken(formState.account)
+ // await router.push('/')
+ // } else {
+ // console.error('Login failed', response.statusText)
+ // }
+ setToken(formState.account)
+ await router.push('/')
} catch (e) {
console.log(e)
}
diff --git a/src/models/LinkCard.js b/src/models/LinkCard.js
new file mode 100644
index 0000000..d76f313
--- /dev/null
+++ b/src/models/LinkCard.js
@@ -0,0 +1,7 @@
+export function createLinkCard(title, content, link) {
+ return {
+ title,
+ content,
+ link
+ }
+}
diff --git a/src/utils/fetchInterceptor.js b/src/utils/fetchInterceptor.js
index 1d53096..1a3afe4 100644
--- a/src/utils/fetchInterceptor.js
+++ b/src/utils/fetchInterceptor.js
@@ -32,6 +32,8 @@ window.fetch = async (input, init = {}) => {
intercepted: 'true'
}
+ console.log(modifiedData)
+
return new Response(JSON.stringify(modifiedData), {
status: response.status,
statusText: response.statusText,
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 32432cb..ba8dcd0 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,42 +1,27 @@
-
+
{{ item.title }}
-
-
+
+
- {{ item.url }}
+ {{ item.link }}
@@ -44,4 +29,17 @@ const modules = [
-
+