mod(custom): 优化部分细节

This commit is contained in:
2023-12-17 00:21:12 +08:00
parent b4689e6e34
commit 20786c4a09
4 changed files with 70 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
<template>
<CommonPage show-footer :title="$route.title">
<div flex items-center>
<div flex items-center justify-between>
<div mr-20 flex>
<div>游戏状态</div>
<n-switch
@@ -11,16 +11,18 @@
/>
</div>
<div flex items-center>
<div>开奖记录</div>
<n-button type="primary" @click="openData">预览</n-button>
</div>
<div ml-20 flex items-center>
<div>本局记录</div>
<n-button type="primary" @click="openJl(1)">预览</n-button>
</div>
<div ml-20 flex items-center>
<div>全部记录</div>
<n-button type="primary" @click="openJl(2)">预览</n-button>
<div ml-20 flex items-center>
<div>开奖记录</div>
<n-button type="primary" @click="openData">预览</n-button>
</div>
<div ml-20 flex items-center>
<div>本局记录</div>
<n-button type="primary" @click="openJl(1)">预览</n-button>
</div>
<div ml-20 flex items-center>
<div>全部记录</div>
<n-button type="primary" @click="openJl(2)">预览</n-button>
</div>
</div>
</div>
@@ -37,7 +39,21 @@
本局总下注
<span text-25>{{ totalA || 0 }}</span>
</div>
<div ml-20>
本局总下注
<span text-25>{{ totalA || 0 }}</span>
</div>
</div>
<div>
<div>
<span text-25>{{ data[0]?.Periods || 0 }}</span>
期开奖结果
<span text-20>{{ data[0]?.Name || 0 }}</span>
</div>
</div>
<n-spin size="large" :show="show">
<div flex flex-wrap justify-between>
<n-card
@@ -151,6 +167,14 @@ const val1 = ref(null)
const time = ref(null)
watch(time, (val) => {
if (Number(val) === 0) {
setTimeout(() => {
get_kj_jl()
}, 2500)
}
})
const show = ref(true)
const show1 = ref(true)
@@ -189,6 +213,7 @@ ws1.onmessage = (msg) => {
onMounted(() => {
// get_data()
get_data1()
get_kj_jl()
})
// const get_data = async () => {
@@ -251,9 +276,12 @@ const columns = ref([
},
])
const data = ref([])
const openData = async () => {
const openData = () => {
showModal.value = true
get_kj_jl()
}
const get_kj_jl = async () => {
try {
showModal.value = true
loading.value = true
const res = await api.getKJList()
console.log(res)