mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
improve layout
This commit is contained in:
@@ -7,7 +7,7 @@ import { useUser } from '@/api/user'
|
|||||||
import RegisterAndLogin from '@/components/RegisterAndLogin.vue'
|
import RegisterAndLogin from '@/components/RegisterAndLogin.vue'
|
||||||
import { FETCH_API } from '@/data/constants'
|
import { FETCH_API } from '@/data/constants'
|
||||||
import { useAuthStore } from '@/store/useAuthStore'
|
import { useAuthStore } from '@/store/useAuthStore'
|
||||||
import { CalendarClock24Filled, Wallet24Filled } from '@vicons/fluent'
|
import { BookCoins20Filled, CalendarClock24Filled, Wallet24Filled } from '@vicons/fluent'
|
||||||
import { Chatbox, Home, Moon, MusicalNote, Sunny } from '@vicons/ionicons5'
|
import { Chatbox, Home, Moon, MusicalNote, Sunny } from '@vicons/ionicons5'
|
||||||
import { useElementSize, useStorage } from '@vueuse/core'
|
import { useElementSize, useStorage } from '@vueuse/core'
|
||||||
import {
|
import {
|
||||||
@@ -158,7 +158,7 @@ onMounted(async () => {
|
|||||||
),
|
),
|
||||||
show: (userInfo.value?.extra?.enableFunctions.indexOf(FunctionTypes.Point) ?? -1) > -1,
|
show: (userInfo.value?.extra?.enableFunctions.indexOf(FunctionTypes.Point) ?? -1) > -1,
|
||||||
key: 'user-goods',
|
key: 'user-goods',
|
||||||
icon: renderIcon(Wallet24Filled),
|
icon: renderIcon(BookCoins20Filled),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
await RequestBiliUserData()
|
await RequestBiliUserData()
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ onMounted(() => {})
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NFlex style="width: 100%">
|
<NFlex>
|
||||||
<NAlert type="info" style="min-width: 400px">
|
<NAlert type="info" style="min-width: 400px">
|
||||||
启用
|
启用
|
||||||
<NButton text type="primary" tag="a" href="https://www.yuque.com/megghy/dez70g/ohulp2torghlqqn8" target="_blank">
|
<NButton text type="primary" tag="a" href="https://www.yuque.com/megghy/dez70g/ohulp2torghlqqn8" target="_blank">
|
||||||
@@ -374,10 +374,10 @@ onMounted(() => {})
|
|||||||
, 否则将无法记录各种事件
|
, 否则将无法记录各种事件
|
||||||
</NText>
|
</NText>
|
||||||
</NAlert>
|
</NAlert>
|
||||||
<EventFetcherStatusCard style="flex: 1" />
|
<EventFetcherStatusCard />
|
||||||
</NFlex>
|
</NFlex>
|
||||||
<br />
|
<br />
|
||||||
<NAlert type="success"> 此功能将于 3月11日 官方启用 OpenId 后正式上线 </NAlert>
|
<NAlert type="success" style="max-width: 400px"> 此功能将于 3月11日 官方启用 OpenId 后正式上线 </NAlert>
|
||||||
<NDivider />
|
<NDivider />
|
||||||
<NTabs animated v-model:value="hash">
|
<NTabs animated v-model:value="hash">
|
||||||
<NTabPane name="goods" tab="礼物">
|
<NTabPane name="goods" tab="礼物">
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import { ResponsePointHisrotyModel, ResponsePointOrder2OwnerModel, ResponsePointUserModel } from '@/api/api-models'
|
||||||
ResponsePointHisrotyModel,
|
|
||||||
ResponsePointOrder2OwnerModel,
|
|
||||||
ResponsePointUserModel,
|
|
||||||
} from '@/api/api-models'
|
|
||||||
import { QueryGetAPI } from '@/api/query'
|
import { QueryGetAPI } from '@/api/query'
|
||||||
import PointHistoryCard from '@/components/manage/PointHistoryCard.vue'
|
import PointHistoryCard from '@/components/manage/PointHistoryCard.vue'
|
||||||
import { POINT_API_URL } from '@/data/constants'
|
import { POINT_API_URL } from '@/data/constants'
|
||||||
@@ -126,7 +122,9 @@ async function givePoint() {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
pointHistory.value = await getPointHistory()
|
pointHistory.value = await getPointHistory()
|
||||||
orders.value = await getOrders()
|
if (props.user.info?.id) {
|
||||||
|
orders.value = await getOrders()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -162,7 +160,9 @@ onMounted(async () => {
|
|||||||
<NFlex>
|
<NFlex>
|
||||||
<NTooltip :disabled="user.isAuthed">
|
<NTooltip :disabled="user.isAuthed">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<NButton type="primary" @click="showAddPointModal = true" :disabled="!user.isAuthed" size="small"> 给予积分 </NButton>
|
<NButton type="primary" @click="showAddPointModal = true" :disabled="!user.isAuthed" size="small">
|
||||||
|
给予积分
|
||||||
|
</NButton>
|
||||||
</template>
|
</template>
|
||||||
<NText> 未认证用户无法给予积分 </NText>
|
<NText> 未认证用户无法给予积分 </NText>
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
@@ -185,7 +185,13 @@ onMounted(async () => {
|
|||||||
<NModal v-model:show="showAddPointModal" preset="card" style="width: 500px; max-width: 90vw; height: auto">
|
<NModal v-model:show="showAddPointModal" preset="card" style="width: 500px; max-width: 90vw; height: auto">
|
||||||
<template #header> 给予积分 </template>
|
<template #header> 给予积分 </template>
|
||||||
<NFlex vertical>
|
<NFlex vertical>
|
||||||
<NInputNumber v-model:value="addPointCount" type="number" placeholder="请输入积分数量" min="0" style="max-width: 120px" />
|
<NInputNumber
|
||||||
|
v-model:value="addPointCount"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入积分数量"
|
||||||
|
min="0"
|
||||||
|
style="max-width: 120px"
|
||||||
|
/>
|
||||||
<NInput placeholder="请输入备注" v-model:value="addPointReason" :maxlength="100" show-count clearable />
|
<NInput placeholder="请输入备注" v-model:value="addPointReason" :maxlength="100" show-count clearable />
|
||||||
<NButton type="primary" @click="givePoint" :loading="isLoading"> 给予 </NButton>
|
<NButton type="primary" @click="givePoint" :loading="isLoading"> 给予 </NButton>
|
||||||
</NFlex>
|
</NFlex>
|
||||||
|
|||||||
Reference in New Issue
Block a user