perf: 优化分享界面的自定义网盘logo
This commit is contained in:
parent
d7127e7e34
commit
1392e8d6e4
@ -3,17 +3,12 @@ import store from './store'
|
|||||||
import NProgress from 'nprogress' // 进度条
|
import NProgress from 'nprogress' // 进度条
|
||||||
import 'nprogress/nprogress.css' // 进度条样式
|
import 'nprogress/nprogress.css' // 进度条样式
|
||||||
import { getToken } from '@/utils/auth' // 认证获取token
|
import { getToken } from '@/utils/auth' // 认证获取token
|
||||||
import {setFavicon} from '@/utils/logo'
|
|
||||||
import getPageTitle from '@/utils/get-page-title'
|
import getPageTitle from '@/utils/get-page-title'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false }) // NProgress配置
|
NProgress.configure({ showSpinner: false }) // NProgress配置
|
||||||
|
|
||||||
const whiteList = ['/login','/s','/s/','/s_m','/s_m/'] // 白名单
|
const whiteList = ['/login','/s','/s/','/s_m','/s_m/'] // 白名单
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
setFavicon()
|
|
||||||
}
|
|
||||||
|
|
||||||
router.beforeEach(async(to, from, next) => {
|
router.beforeEach(async(to, from, next) => {
|
||||||
// 开始进度条
|
// 开始进度条
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import fileConfig from "@/utils/file-config";
|
import fileConfig from "@/utils/file-config";
|
||||||
import getPageTitle from "@/utils/get-page-title";
|
|
||||||
|
|
||||||
const titleKey = 'netdisk-name'
|
const titleKey = 'netdisk-name'
|
||||||
|
|
||||||
|
|||||||
@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
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 Bus from '@/assets/js/bus'
|
||||||
import api from '@/api/file-api'
|
import api from '@/api/file-api'
|
||||||
import BreadcrumbFilePath from "@/components/Breadcrumb/BreadcrumbFilePath";
|
import BreadcrumbFilePath from "@/components/Breadcrumb/BreadcrumbFilePath";
|
||||||
@ -407,12 +407,9 @@
|
|||||||
// 加载布局
|
// 加载布局
|
||||||
if(this.$route.query.vmode){
|
if(this.$route.query.vmode){
|
||||||
this.vmode = this.$route.query.vmode
|
this.vmode = this.$route.query.vmode
|
||||||
if(this.vmode === 'list'){
|
this.grid = this.vmode !== 'list';
|
||||||
this.grid = false
|
|
||||||
}else{
|
|
||||||
this.grid = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
window.removeEventListener('popstate', this.goBack, false)
|
window.removeEventListener('popstate', this.goBack, false)
|
||||||
@ -579,6 +576,7 @@
|
|||||||
if (this.sharer.netdiskLogo) {
|
if (this.sharer.netdiskLogo) {
|
||||||
this.netdiskLogo = this.sharer.netdiskLogo
|
this.netdiskLogo = this.sharer.netdiskLogo
|
||||||
}
|
}
|
||||||
|
this.$store.dispatch('user/setLogo', {netdiskName: this.netdiskName, netdiskLogo: this.netdiskLogo})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.loadClientHeight()
|
this.loadClientHeight()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user