Compare commits
10 Commits
3f2a50f86d
...
e1e795b5dc
Author | SHA1 | Date | |
---|---|---|---|
e1e795b5dc | |||
91f56bd170 | |||
9d5e3733a2 | |||
5418e0ddd5 | |||
1659399f53 | |||
2d7d88891c | |||
605fd531c1 | |||
50d0c797ef | |||
b6776739c7 | |||
7d7bae9a77 |
@ -5,6 +5,9 @@ let route = useRoute()
|
||||
// const handleSelect = (key: string, keyPath: string[]) => {
|
||||
// console.log(key, keyPath)
|
||||
// }
|
||||
|
||||
const HotArray = await $fetch("https://data.zziyu.cn/hot/webs")
|
||||
// console.log(HotArray)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -21,8 +24,9 @@ let route = useRoute()
|
||||
<el-sub-menu index="/data/all">
|
||||
<template #title>数据收集</template>
|
||||
<el-menu-item index="/data/all">总览</el-menu-item>
|
||||
<el-menu-item index="/data/bilibili">bilibili</el-menu-item>
|
||||
<el-menu-item index="/data/baidu">baidu</el-menu-item>
|
||||
<el-menu-item v-for="(item,index) in HotArray" :key="index" :index="'/data/'+item">{{item}}</el-menu-item>
|
||||
<!-- <el-menu-item index="/data/bilibili">bilibili</el-menu-item>-->
|
||||
<!-- <el-menu-item index="/data/baidu">baidu</el-menu-item>-->
|
||||
</el-sub-menu>
|
||||
<el-sub-menu index="/tools">
|
||||
<template #title>工具</template>
|
||||
|
@ -6,6 +6,7 @@ let {api} = await $fetch('/api/data/all')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Title>热搜 {{route.params.WebName}} </Title>
|
||||
这是 {{route.params.WebName}} 数据展示
|
||||
</template>
|
||||
|
||||
|
@ -1,18 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
const HotArray = await $fetch("https://data.zziyu.cn/hot/webs")
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Title>网站地图</Title>
|
||||
<div style="display: flex;justify-content: center;flex-direction: column;align-items: center">
|
||||
<NuxtLink to="/">主页</NuxtLink>
|
||||
<NuxtLink to="/data/all">数据收集</NuxtLink>
|
||||
<NuxtLink to="/data/bilibili">数据收集Bilibili</NuxtLink>
|
||||
<NuxtLink to="/data/baidu">数据收集百度</NuxtLink>
|
||||
<NuxtLink to="/data/all">数据收集所有</NuxtLink>
|
||||
<!-- <NuxtLink to="/data/bilibili">数据收集Bilibili</NuxtLink>-->
|
||||
<!-- <NuxtLink to="/data/baidu">数据收集百度</NuxtLink>-->
|
||||
<NuxtLink v-for="(item,index) in HotArray" :to="'/data/'+item" :key="index">数据收集 {{item}}</NuxtLink>
|
||||
<NuxtLink to="/">主页</NuxtLink>
|
||||
<NuxtLink to="/tools/qqazk/">笔顺码字典首页</NuxtLink>
|
||||
<NuxtLink to="/tools/qqazk/about">笔顺码字典关于</NuxtLink>
|
||||
<NuxtLink to="/tools/qqazk/search?words=&method=bsmf">所有笔顺码</NuxtLink>
|
||||
<NuxtLink to="/map/qqazk">所有笔顺码</NuxtLink>
|
||||
</div>
|
||||
</template>
|
||||
|
30
pages/map/qqazk.vue
Normal file
30
pages/map/qqazk.vue
Normal file
@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {Action} from "element-plus";
|
||||
|
||||
const dataRaw = await $fetch(`/api/tools/qqazk/search?words=&method=hz`)
|
||||
if (dataRaw.haveMess){
|
||||
ElMessageBox.alert(dataRaw.message,"获取资源错误",{
|
||||
confirmButtonText: '确认',
|
||||
callback:(action:Action)=>{
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
let arr = dataRaw.data
|
||||
|
||||
// console.log(arr)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Title>网站地图-所有笔顺码</Title>
|
||||
<NuxtLink v-for="value in arr" :to="'/tools/qqazk/details/'+value.id">
|
||||
{{value.hz}}
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
a {
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
@ -1,4 +1,4 @@
|
||||
import {readFile} from "fs";
|
||||
import {readFile, readFileSync} from "fs";
|
||||
|
||||
interface Word{
|
||||
bsm:string
|
||||
@ -11,12 +11,18 @@ interface Ret{
|
||||
message:string
|
||||
haveMess:boolean
|
||||
}
|
||||
let words:Word[]
|
||||
readFile("./word.json",'utf-8',(err, data)=>{
|
||||
if (err)console.error(err)
|
||||
words=JSON.parse(data)
|
||||
})
|
||||
let words:Word[] = []
|
||||
const loadWords = ()=>{
|
||||
const wordRaw = readFileSync('./word.json','utf-8')
|
||||
words = JSON.parse(wordRaw)
|
||||
for (let i = 0; i< words.length ; i++){
|
||||
words[i].id =i;
|
||||
}
|
||||
}
|
||||
export default defineEventHandler((event):Ret=>{
|
||||
if (words.length===0){
|
||||
loadWords()
|
||||
}
|
||||
const query = getQuery(event)
|
||||
if (query.id=="错误"){
|
||||
return {
|
||||
@ -25,6 +31,7 @@ export default defineEventHandler((event):Ret=>{
|
||||
haveMess:true
|
||||
}
|
||||
}
|
||||
// @ts-ignore
|
||||
if (query.id>=words.length){
|
||||
return {
|
||||
data:words[0],
|
||||
@ -32,7 +39,9 @@ export default defineEventHandler((event):Ret=>{
|
||||
haveMess:true
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
// @ts-ignore
|
||||
data:words[query.id],
|
||||
message:"",
|
||||
haveMess:false
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {readFile} from "fs";
|
||||
import {readFile, readFileSync} from "fs";
|
||||
import path from "path";
|
||||
interface Word{
|
||||
bsm:string
|
||||
@ -11,17 +11,23 @@ interface Ret{
|
||||
message:string
|
||||
haveMess:boolean
|
||||
}
|
||||
let words:Word[]
|
||||
readFile("./word.json",'utf-8',(err, data)=>{
|
||||
if (err)console.error(err)
|
||||
words = JSON.parse(data)
|
||||
let words:Word[] = []
|
||||
|
||||
const loadWords = ()=>{
|
||||
const wordRaw = readFileSync('./word.json','utf-8')
|
||||
words = JSON.parse(wordRaw)
|
||||
for (let i = 0; i< words.length ; i++){
|
||||
words[i].id=i
|
||||
words[i].id =i;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default defineEventHandler((event):Ret=>{
|
||||
if (words.length===0){
|
||||
loadWords()
|
||||
}
|
||||
const retWords:Word[] = []
|
||||
const query = getQuery(event)
|
||||
// @ts-ignore
|
||||
if (query.words=="错误"||query.method=="错误"||!(query.method=="bsmf"||query.method=="bsmc"||query.method=="hz")||query.words.length>20){
|
||||
return {
|
||||
data:[],
|
||||
|
Loading…
Reference in New Issue
Block a user