提交 b8a42265 编写于 作者: yma16's avatar yma16

perf:no cdn

上级 17f6dbff
...@@ -20,7 +20,7 @@ const env = ...@@ -20,7 +20,7 @@ const env =
let externalModules = {} let externalModules = {}
//cdn 配置 //cdn 配置
let externalConfig = [] let externalConfig = []
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production' && false) {
//生产环境 //生产环境
externalModules = { externalModules = {
vue: 'Vue', vue: 'Vue',
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
<style> <style>
body { body {
overflow: hidden; overflow: hidden;
background: url("https://yongma16.xyz/staticFile/common/img/blogScene.jpg");
background-position: center center;
background-clip: border-box;
background-repeat: no-repeat;
} }
</style> </style>
<!-- cdn css--> <!-- cdn css-->
......
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
<el-submenu index="1-1"> <el-submenu index="1-1">
<template slot="title" <template slot="title"
>yma16 >yma16
<span v-if="currentUserName">{{ </template
currentUserName
}}</span></template
> >
<el-menu-item index="1-1-1">stay hungry</el-menu-item> <el-menu-item index="1-1-1">stay hungry</el-menu-item>
<a @click="jumpToEcharts"> <a @click="jumpToEcharts">
...@@ -82,6 +80,16 @@ ...@@ -82,6 +80,16 @@
<!-- >&nbsp;&nbsp;在线聊天室</i--> <!-- >&nbsp;&nbsp;在线聊天室</i-->
<!-- >--> <!-- >-->
<div style="float: right; overflow: hidden;display: flex;justify-items: center;align-items:center;word-spacing: 16px;"> <div style="float: right; overflow: hidden;display: flex;justify-items: center;align-items:center;word-spacing: 16px;">
<span style="cursor: pointer; width: 80px" v-if="currentUserName">
<el-popover
trigger="click">
<span @click="loginOut" style="cursor: pointer; height: 16px">注销</span>
<template slot="reference">
<i class="el-icon-user" style="font-weight: 300">{{currentUserName}}</i>
</template>
</el-popover>
</span>
<a href="https://codechina.csdn.net/qq_38870145/myblogvue" <a href="https://codechina.csdn.net/qq_38870145/myblogvue"
><img ><img
src="@/assets/img/code-china.png" src="@/assets/img/code-china.png"
...@@ -93,6 +101,7 @@ ...@@ -93,6 +101,7 @@
src="@/assets/img/github-fill.png" src="@/assets/img/github-fill.png"
style="cursor: pointer; height: 16px" style="cursor: pointer; height: 16px"
/></a> /></a>
</div> </div>
<!-- <a v-on:click="changeNavigate"><i class="el-icon-menu"></i></a> --> <!-- <a v-on:click="changeNavigate"><i class="el-icon-menu"></i></a> -->
...@@ -159,7 +168,7 @@ export default { ...@@ -159,7 +168,7 @@ export default {
currentUserName: function () { currentUserName: function () {
return store.state.user.userInfo && store.state.user.userInfo.name return store.state.user.userInfo && store.state.user.userInfo.name
? store.state.user.userInfo.name ? store.state.user.userInfo.name
: '游客' : ''
} }
}, },
mounted () { mounted () {
...@@ -285,6 +294,10 @@ export default { ...@@ -285,6 +294,10 @@ export default {
.catch((error) => { .catch((error) => {
throw Error(error) throw Error(error)
}) })
},
loginOut () {
localStorage.removeItem('yma16siteUserInfo')
window.location.reload()
} }
} }
} }
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
<div style="width:50%;text-align: center"> <div style="width:50%;text-align: center">
<img src="https://ts2.cn.mm.bing.net/th?id=ODLS.f9daea21-9936-4164-815f-b5209459f3c6&w=32&h=32&qlt=90&pcl=fffffa&o=6&pid=1.2" style="width:10px;line-height: 56px"/> <img src="https://ts2.cn.mm.bing.net/th?id=ODLS.f9daea21-9936-4164-815f-b5209459f3c6&w=32&h=32&qlt=90&pcl=fffffa&o=6&pid=1.2" style="width:10px;line-height: 56px"/>
<el-link type="primary" @click="thirdLogin('azure')" <el-link type="primary" @click="thirdLogin('azure')"
>微软登录(测试中)</el-link >微软登录(alpha)</el-link
> >
</div> </div>
<div style="width:50%;text-align: center"> <div style="width:50%;text-align: center">
<img src="https://sola.gtimg.cn/aoi/sola/20210118201807_hzF9zYwEBj.png" style="width:10px;line-height: 56px"/> <img src="https://sola.gtimg.cn/aoi/sola/20210118201807_hzF9zYwEBj.png" style="width:10px;line-height: 56px"/>
<el-link type="primary" @click="thirdLogin('qq')" <el-link type="primary" @click="thirdLogin('qq')"
>QQ登录(测试中)</el-link >QQ登录(alpha)</el-link
> >
</div> </div>
</div> </div>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</template> </template>
<script> <script>
// import * as echarts from 'echarts/index' import * as echarts from 'echarts/index'
export default { export default {
name: 'EchartWeather', name: 'EchartWeather',
data () { data () {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</template> </template>
<script> <script>
// import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: 'Map', name: 'Map',
......
...@@ -26,7 +26,8 @@ import { ...@@ -26,7 +26,8 @@ import {
Select, Select,
Divider, Divider,
Row, Row,
Col Col,
Popover
} from 'element-ui' } from 'element-ui'
const importElementComponents = (Vue) => { const importElementComponents = (Vue) => {
...@@ -56,6 +57,7 @@ const importElementComponents = (Vue) => { ...@@ -56,6 +57,7 @@ const importElementComponents = (Vue) => {
Vue.use(Pagination) Vue.use(Pagination)
Vue.use(Alert) Vue.use(Alert)
Vue.use(Select) Vue.use(Select)
Vue.use(Popover)
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$notify = Notification Vue.prototype.$notify = Notification
} }
......
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// vue cdn // vue cdn
// import Vue from 'vue' import Vue from 'vue'
// import axios from 'axios' import axios from 'axios'
// import hljs from 'highlight.js' import hljs from 'highlight.js'
// import importElementComponents from './importElement' import importElementComponents from './importElement'
// import importEchartsComponents from './importEchartsComponents' import importEchartsComponents from './importEchartsComponents'
// 样式cnd // 样式cnd
import 'github-markdown-css/github-markdown.css' import 'github-markdown-css/github-markdown.css'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
...@@ -38,7 +38,7 @@ Vue.prototype.$cookies.set('user_session', 'null') ...@@ -38,7 +38,7 @@ Vue.prototype.$cookies.set('user_session', 'null')
// 路由 // 路由
const router = useRouter(Vue, VueRouter) const router = useRouter(Vue, VueRouter)
// 生产环境 // 生产环境
if (env === 'production') { if (env === 'production'&& false) {
try { try {
// 全局引入 // 全局引入
Vue.config.productionTip = false Vue.config.productionTip = false
...@@ -53,11 +53,11 @@ if (env === 'production') { ...@@ -53,11 +53,11 @@ if (env === 'production') {
throw Error(e) throw Error(e)
} }
} else { } else {
// // 按需引入elementui // 按需引入elementui
// importElementComponents(Vue) importElementComponents(Vue)
//
// // 按需引入echarts // 按需引入echarts
// importEchartsComponents(Vue) importEchartsComponents(Vue)
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
......
// import Vue from 'vue' import Vue from 'vue'
// import Vuex from 'vuex' import Vuex from 'vuex'
// import createLogger from '../../../src/plugins/logger' // import createLogger from '../../../src/plugins/logger'
......
...@@ -5,8 +5,8 @@ export default { ...@@ -5,8 +5,8 @@ export default {
state: { state: {
// 用户账号密码 // 用户账号密码
userInfo: { userInfo: {
name: '游客', name: '',
password: null password: ''
} }
}, },
getters: { getters: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册