This commit is contained in:
iVampireSP.com 2023-12-07 14:43:24 +08:00
parent d6fcf82973
commit 6e99fb5413
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
3 changed files with 22 additions and 23 deletions

View File

@ -1,32 +1,27 @@
<template> <template>
<v-container class="fill-height">
<v-responsive class="align-center text-center fill-height">
<v-btn @click="testrequest">Hi</v-btn> <v-btn @click="testrequest">Hi</v-btn>
<v-text-field label="Label" v-model="token"></v-text-field> <v-text-field label="Label" v-model="token"></v-text-field>
<v-btn @click="settoken">设置</v-btn> <v-btn @click="settoken">设置</v-btn>
</v-responsive>
</v-container>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {library} from '@/plugins/api' import { library } from "@/plugins/api";
import { ref } from 'vue'; import { ref } from "vue";
import { useUserStore } from '@/store/user'; import { useUserStore } from "@/store/user";
const userStore = useUserStore() const userStore = useUserStore();
const token = ref("") const token = ref("");
const settoken = () => { const settoken = () => {
userStore.login("0", token.value) userStore.login("0", token.value);
console.log(userStore.jwt_token) console.log(userStore.jwt_token);
} };
const testrequest = () => { const testrequest = () => {
library.librariesGet(1).then(r => console.log(r)) library.librariesGet(1).then((r) => console.log(r));
} };
// library.libraryLibraryIdDocumentsGet(1,2) // library.libraryLibraryIdDocumentsGet(1,2)
</script> </script>

View File

@ -1,6 +1,10 @@
<template> <template>
<v-main> <v-main>
<v-container>
<v-responsive class="pa-2">
<router-view /> <router-view />
</v-responsive>
</v-container>
</v-main> </v-main>
</template> </template>

View File

@ -1,6 +1,6 @@
<template> <template>
<LoadingComponent v-if="loading"> </LoadingComponent> <LoadingComponent v-if="loading"> </LoadingComponent>
<v-container v-else> <div v-else>
<h1>资料库</h1> <h1>资料库</h1>
<!-- <div> <!-- <div>
@ -60,7 +60,7 @@
</v-list-item> </v-list-item>
</v-list> </v-list>
</v-card> </v-card>
</v-container> </div>
<div class="text-center"> <div class="text-center">
<v-container> <v-container>