|
@@ -25,7 +25,11 @@
|
|
|
|
|
|
<!-- 时间列表 -->
|
|
|
<div class="records-box">
|
|
|
- <RecordInRow :time_record_list="time_record_list" :monthlyStr="monthlyStr" :yearStr=yearStr></RecordInRow>
|
|
|
+ <RecordInRow
|
|
|
+ :time_record_list="time_record_list"
|
|
|
+ :monthlyStr="monthlyStr"
|
|
|
+ :yearStr="yearStr"
|
|
|
+ ></RecordInRow>
|
|
|
</div>
|
|
|
|
|
|
<!-- 选择时间 -->
|
|
@@ -42,9 +46,10 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, computed, watch, onMounted } from 'vue'
|
|
|
-import {register} from '@/api/base'
|
|
|
+import { register, login } from '@/api/base'
|
|
|
+import { getBookInfo } from '@/api/api'
|
|
|
import dayjs from 'dayjs'
|
|
|
-import RecordInRow from "@/components/RecordInRow.vue"
|
|
|
+import RecordInRow from '@/components/RecordInRow.vue'
|
|
|
|
|
|
const showSelectTime = ref(false)
|
|
|
const currentDate = ref([])
|
|
@@ -86,7 +91,14 @@ const monthlyStr = computed(() => {
|
|
|
return `${currentDate.value[1]}`
|
|
|
})
|
|
|
|
|
|
+async function getBookInfoFn() {
|
|
|
+ await getBookInfo(1)
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
+ getBookInfoFn()
|
|
|
+ // getLogin()
|
|
|
+
|
|
|
for (let index = 0; index < 40; index++) {
|
|
|
const elm = {
|
|
|
name: 'name' + index,
|
|
@@ -99,12 +111,21 @@ onMounted(() => {
|
|
|
time_record_list.value.push(elm)
|
|
|
}
|
|
|
})
|
|
|
+async function getRegister() {
|
|
|
+ const res = await register({
|
|
|
+ account: 'x.czvufulcym@qqxhjl.ee',
|
|
|
+ account_type: 2,
|
|
|
+ password: 'admin'
|
|
|
+ })
|
|
|
+ console.log(119, res)
|
|
|
+}
|
|
|
async function getLogin() {
|
|
|
- await register({
|
|
|
- "account": "x.czvufulcym@qqxhjl.ee",
|
|
|
- "account_type": 2,
|
|
|
- "password": "admin"
|
|
|
+ const res = await login({
|
|
|
+ account: 'x.czvufulcym@qqxhjl.ee',
|
|
|
+ account_type: 2,
|
|
|
+ password: 'admin'
|
|
|
})
|
|
|
+ window.localStorage.setItem('token', res.data.token)
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -138,7 +159,5 @@ async function getLogin() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
</style>
|
|
|
>>>>>>> origin/master
|