BUG
This commit is contained in:
parent
6965f789b0
commit
1e52823524
23
src/plugins/tongji/index.ts
Normal file
23
src/plugins/tongji/index.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import router from '@/router'
|
||||
|
||||
// 用于 router push
|
||||
window._hmt = window._hmt || []
|
||||
// HM_ID
|
||||
const HM_ID = import.meta.env.VITE_APP_BAIDU_CODE
|
||||
;(function () {
|
||||
// 有值的时候,才开启
|
||||
if (!HM_ID) {
|
||||
return
|
||||
}
|
||||
const hm = document.createElement('script')
|
||||
hm.src = 'https://hm.baidu.com/hm.js?' + HM_ID
|
||||
const s = document.getElementsByTagName('script')[0]
|
||||
s.parentNode.insertBefore(hm, s)
|
||||
})()
|
||||
|
||||
router.afterEach(function (to) {
|
||||
if (!HM_ID) {
|
||||
return
|
||||
}
|
||||
_hmt.push(['_trackPageview', to.fullPath])
|
||||
})
|
@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="Redis 缓存" url="https://doc.iocoder.cn/redis-cache/" />
|
||||
<doc-alert title="本地缓存" url="https://doc.iocoder.cn/local-cache/" />
|
||||
<el-scrollbar height="calc(100vh - 88px - 40px - 50px)">
|
||||
<el-row>
|
||||
<!-- 基本信息 -->
|
||||
@ -69,7 +67,7 @@ const cache = ref<RedisMonitorInfoVO>()
|
||||
|
||||
// 基本信息
|
||||
const readRedisInfo = async () => {
|
||||
const data = await RedisApi.getCache()
|
||||
const data = await RedisApi.getCacheApi()
|
||||
cache.value = data
|
||||
}
|
||||
|
||||
@ -218,7 +216,7 @@ const initCommandStatsChart = async () => {
|
||||
usedmemoryEchartChika.series[0].data = []
|
||||
// 发起请求
|
||||
try {
|
||||
const data = await RedisApi.getCache()
|
||||
const data = await RedisApi.getCacheApi()
|
||||
cache.value = data
|
||||
// 处理数据
|
||||
const commandStats = [] as any[]
|
||||
@ -236,7 +234,7 @@ const initCommandStatsChart = async () => {
|
||||
}
|
||||
const usedMemoryInstance = async () => {
|
||||
try {
|
||||
const data = await RedisApi.getCache()
|
||||
const data = await RedisApi.getCacheApi()
|
||||
cache.value = data
|
||||
// 仪表盘详情,用于显示数据。
|
||||
usedmemoryEchartChika.series[0].detail = {
|
||||
@ -251,7 +249,7 @@ const usedMemoryInstance = async () => {
|
||||
value: cache.value!.info.used_memory_human,
|
||||
name: '内存消耗'
|
||||
}
|
||||
console.log(cache.value!.info)
|
||||
// console.log(cache.value!.info)
|
||||
usedmemoryEchartChika.tooltip = {
|
||||
formatter: '{b} <br/>{a} : ' + cache.value!.info.used_memory_human
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="自动回复" url="https://doc.iocoder.cn/mp/auto-reply/" />
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<ContentWrap>
|
||||
<el-form class="-mb-15px" :model="queryParams" :inline="true" label-width="68px">
|
||||
|
@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="公众号图文" url="https://doc.iocoder.cn/mp/article/" />
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<ContentWrap>
|
||||
<el-form
|
||||
|
@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="公众号图文" url="https://doc.iocoder.cn/mp/article/" />
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<ContentWrap>
|
||||
<el-form
|
||||
|
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="公众号菜单" url="https://doc.iocoder.cn/mp/menu/" />
|
||||
<!-- 搜索工作栏 -->
|
||||
<ContentWrap>
|
||||
<el-form class="-mb-15px" ref="queryFormRef" :inline="true" label-width="68px">
|
||||
|
@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="公众号标签" url="https://doc.iocoder.cn/mp/tag/" />
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<ContentWrap>
|
||||
<el-form
|
||||
|
@ -1,6 +1,4 @@
|
||||
<template>
|
||||
<doc-alert title="公众号粉丝" url="https://doc.iocoder.cn/mp/user/" />
|
||||
|
||||
<!-- 搜索工作栏 -->
|
||||
<ContentWrap>
|
||||
<el-form
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<doc-alert title="地区 & IP" url="https://doc.iocoder.cn/area-and-ip/" />
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
@ -82,7 +81,7 @@ const message = useMessage() // 消息弹窗
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
const response = await areaApi.getAreaTree()
|
||||
list.value = response.data
|
||||
list.value = response
|
||||
loading.value = false
|
||||
}
|
||||
/** 取消按钮 */
|
||||
@ -113,7 +112,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
console.log('submit!')
|
||||
const response = await areaApi.getAreaByIp(form.value.ip)
|
||||
message.success('查询成功')
|
||||
form.value.result = response.data
|
||||
form.value.result = response
|
||||
} else {
|
||||
console.log('error submit!', fields)
|
||||
}
|
||||
|
@ -350,7 +350,6 @@ const isExternal = (path: string) => {
|
||||
return /^(https?:|mailto:|tel:)/.test(path)
|
||||
}
|
||||
|
||||
|
||||
/** 刷新菜单缓存按钮操作 */
|
||||
const refreshMenu = async () => {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user