perf: 优化分享界面的自定义网盘logo

This commit is contained in:
jmal 2022-09-01 21:52:50 +08:00
parent d7127e7e34
commit 1392e8d6e4
3 changed files with 4 additions and 12 deletions

View File

@ -3,17 +3,12 @@ import store from './store'
import NProgress from 'nprogress' // 进度条
import 'nprogress/nprogress.css' // 进度条样式
import { getToken } from '@/utils/auth' // 认证获取token
import {setFavicon} from '@/utils/logo'
import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress配置
const whiteList = ['/login','/s','/s/','/s_m','/s_m/'] // 白名单
window.onload = function() {
setFavicon()
}
router.beforeEach(async(to, from, next) => {
// 开始进度条
NProgress.start()

View File

@ -1,6 +1,5 @@
import Cookies from 'js-cookie'
import fileConfig from "@/utils/file-config";
import getPageTitle from "@/utils/get-page-title";
const titleKey = 'netdisk-name'

View File

@ -227,7 +227,7 @@
<script>
import { mapGetters } from 'vuex'
import { strlen, substring10, formatTime, formatSize } from '@/utils/number'
import { formatTime, formatSize } from '@/utils/number'
import Bus from '@/assets/js/bus'
import api from '@/api/file-api'
import BreadcrumbFilePath from "@/components/Breadcrumb/BreadcrumbFilePath";
@ -407,12 +407,9 @@
// 加载布局
if(this.$route.query.vmode){
this.vmode = this.$route.query.vmode
if(this.vmode === 'list'){
this.grid = false
}else{
this.grid = true
}
this.grid = this.vmode !== 'list';
}
},
destroyed() {
window.removeEventListener('popstate', this.goBack, false)
@ -579,6 +576,7 @@
if (this.sharer.netdiskLogo) {
this.netdiskLogo = this.sharer.netdiskLogo
}
this.$store.dispatch('user/setLogo', {netdiskName: this.netdiskName, netdiskLogo: this.netdiskLogo})
})
}
this.loadClientHeight()