mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
pref: 删除无用代码
This commit is contained in:
parent
1c01c5cdf5
commit
60caeb0920
@ -138,8 +138,6 @@ const weather = ref({
|
|||||||
|
|
||||||
const getWeather = () => {
|
const getWeather = () => {
|
||||||
getAll({ location: userStore.userinfo.location }).then((resp) => {
|
getAll({ location: userStore.userinfo.location }).then((resp) => {
|
||||||
console.log(resp)
|
|
||||||
|
|
||||||
if (resp.data.now) {
|
if (resp.data.now) {
|
||||||
if (resp.data.now.iconValue === '#wt-qing') {
|
if (resp.data.now.iconValue === '#wt-qing') {
|
||||||
let nowHours = new Date().getHours()
|
let nowHours = new Date().getHours()
|
||||||
|
@ -156,7 +156,6 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="排序">
|
<el-form-item label="排序">
|
||||||
<el-input-number v-model="docForm.sort" style="width: 106px" />
|
<el-input-number v-model="docForm.sort" style="width: 106px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -222,7 +221,7 @@
|
|||||||
import { ref, nextTick, inject, computed, watch, Ref } from 'vue'
|
import { ref, nextTick, inject, computed, watch, Ref } from 'vue'
|
||||||
import { ElInput, ElMessageBox, FormInstance } from 'element-plus'
|
import { ElInput, ElMessageBox, FormInstance } from 'element-plus'
|
||||||
import type { FormRules } from 'element-plus'
|
import type { FormRules } from 'element-plus'
|
||||||
import { Document, Picture } from '@element-plus/icons-vue'
|
import { Document } from '@element-plus/icons-vue'
|
||||||
import { provideKeyDocTree, getCDocsByPid, getDocById, checkLevel } from '@renderer/views/doc/doc'
|
import { provideKeyDocTree, getCDocsByPid, getDocById, checkLevel } from '@renderer/views/doc/doc'
|
||||||
import { useUserStore } from '@renderer/stores/user'
|
import { useUserStore } from '@renderer/stores/user'
|
||||||
import {
|
import {
|
||||||
|
@ -190,7 +190,6 @@ const renderChart = () => {
|
|||||||
userStore.userinfo.userParams.WEB_ARTICLE_URL + params.data.artId
|
userStore.userinfo.userParams.WEB_ARTICLE_URL + params.data.artId
|
||||||
}</a></div>`
|
}</a></div>`
|
||||||
}
|
}
|
||||||
console.log(params.data)
|
|
||||||
let type = ''
|
let type = ''
|
||||||
if (params.data.artType === 11) {
|
if (params.data.artType === 11) {
|
||||||
type = `<div>类型: 内部文章</div>`
|
type = `<div>类型: 内部文章</div>`
|
||||||
|
@ -536,8 +536,6 @@ const articleDownload = () => {
|
|||||||
const articleDownloadHtml = () => {
|
const articleDownloadHtml = () => {
|
||||||
articleDownloadHtmlApi({ id: curDoc.value.i }).then((resp) => {
|
articleDownloadHtmlApi({ id: curDoc.value.i }).then((resp) => {
|
||||||
let filename: string = resp.headers.get('content-disposition')
|
let filename: string = resp.headers.get('content-disposition')
|
||||||
console.log(decodeURI(filename))
|
|
||||||
|
|
||||||
let filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
|
let filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
|
||||||
let matches = filenameRegex.exec(filename)
|
let matches = filenameRegex.exec(filename)
|
||||||
if (matches != null && matches[1]) {
|
if (matches != null && matches[1]) {
|
||||||
|
@ -234,7 +234,6 @@ const showTryUse = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const helpMeLogin = () => {
|
const helpMeLogin = () => {
|
||||||
console.log(SYSTEM.TRY_USE)
|
|
||||||
formLogin.value = SYSTEM.TRY_USE
|
formLogin.value = SYSTEM.TRY_USE
|
||||||
handleServerUrl()
|
handleServerUrl()
|
||||||
isShowTryUse.value = false
|
isShowTryUse.value = false
|
||||||
|
@ -114,7 +114,6 @@ const curUser = ref<Userinfo>(DEFAULT_USER_INFO)
|
|||||||
const getUserInfo = () => {
|
const getUserInfo = () => {
|
||||||
userinfoAdminApi({ id: props.id }).then((resp) => {
|
userinfoAdminApi({ id: props.id }).then((resp) => {
|
||||||
curUser.value = resp.data
|
curUser.value = resp.data
|
||||||
console.log(curUser.value)
|
|
||||||
})
|
})
|
||||||
articleWordsUserApi({ id: props.id }).then((resp) => {
|
articleWordsUserApi({ id: props.id }).then((resp) => {
|
||||||
articleStat.value = resp.data
|
articleStat.value = resp.data
|
||||||
|
@ -47,9 +47,7 @@ const del = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
isLoading.value = true
|
isLoading.value = true
|
||||||
console.log(props.ids)
|
|
||||||
pictureDelBatchApi({ ids: Array.from(props.ids), ignoreCheck: props.ignoreCheck }).then((resp: R<PictureDelBatchRes>) => {
|
pictureDelBatchApi({ ids: Array.from(props.ids), ignoreCheck: props.ignoreCheck }).then((resp: R<PictureDelBatchRes>) => {
|
||||||
console.log(resp.data)
|
|
||||||
if (props.ignoreCheck) {
|
if (props.ignoreCheck) {
|
||||||
delResult.value.msg = `${resp.data?.success} 个文件成功删除。 \n${resp.data?.fault} 个文件删除失败。`
|
delResult.value.msg = `${resp.data?.success} 个文件成功删除。 \n${resp.data?.fault} 个文件删除失败。`
|
||||||
} else {
|
} else {
|
||||||
|
@ -13,7 +13,6 @@ const { auth } = storeToRefs(userStore)
|
|||||||
* @param password
|
* @param password
|
||||||
*/
|
*/
|
||||||
export const login = async (username: string, password: string) => {
|
export const login = async (username: string, password: string) => {
|
||||||
console.log(userStore.auth)
|
|
||||||
auth.value = { token: '', status: AuthStatus.Loging }
|
auth.value = { token: '', status: AuthStatus.Loging }
|
||||||
await loginApi({ username: username, password: password, clientId: 'blossom', grantType: 'password' })
|
await loginApi({ username: username, password: password, clientId: 'blossom', grantType: 'password' })
|
||||||
.then((resp: any) => {
|
.then((resp: any) => {
|
||||||
|
@ -85,7 +85,6 @@ export const useUserStore = defineStore('userStore', {
|
|||||||
async getUserinfoOpen() {
|
async getUserinfoOpen() {
|
||||||
await userinfoOpenApi().then((resp) => {
|
await userinfoOpenApi().then((resp) => {
|
||||||
this.userinfo = resp.data
|
this.userinfo = resp.data
|
||||||
console.log(this.userinfo)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,6 @@ const fontSize = ref<number>(Local.get(FONT_SIZE_KEY) || 0.9)
|
|||||||
|
|
||||||
const increase = () => {
|
const increase = () => {
|
||||||
fontSize.value += 0.1
|
fontSize.value += 0.1
|
||||||
console.log(1)
|
|
||||||
Local.set(FONT_SIZE_KEY, fontSize.value)
|
Local.set(FONT_SIZE_KEY, fontSize.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import ChartHeatmap from './ChartHeatmap.vue'
|
|||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
const links = () => {
|
const links = () => {
|
||||||
console.log(userStore.links)
|
|
||||||
if (isNotBlank(userStore.links)) {
|
if (isNotBlank(userStore.links)) {
|
||||||
return JSON.parse(userStore.links)
|
return JSON.parse(userStore.links)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user