Skip to content

Commit

Permalink
完成小说功能
Browse files Browse the repository at this point in the history
  • Loading branch information
liweiwei committed Dec 27, 2019
1 parent c580f31 commit 0fd16a7
Show file tree
Hide file tree
Showing 9 changed files with 530 additions and 98 deletions.
4 changes: 2 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {

// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
assetsPublicPath: 'http://127.0.0.1:8080/',
proxyTable: {},

// Various Dev Server settings
Expand Down Expand Up @@ -50,7 +50,7 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
assetsPublicPath: 'https://www.qnnnd.cn/',

/**
* Source Maps
Expand Down
53 changes: 36 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/common/request.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import axios from 'axios';

const domainMap = window._global.url;
// const domainMap = {
// server_url : "http://localhost:8089",
// }
// const domainMap = window._global.url;
const domainMap = {
server_url : "https://www.qnnnd.cn/",
}

function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
Expand Down
39 changes: 24 additions & 15 deletions src/components/subviews/TopMenu.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
<template>
<el-menu router=true :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
<el-menu-item index="1">我的笔记</el-menu-item>
<el-menu-item index="2">我的博客</el-menu-item>
<el-submenu index="3">
<template slot="title">小工具</template>
<el-menu-item index="2-1">选项1</el-menu-item>
<el-menu-item index="2-2">选项2</el-menu-item>
<el-menu-item index="2-3">选项3</el-menu-item>
</el-submenu>
<el-menu-item index="2">设置</el-menu-item>
</el-menu>
<el-menu
router="true"
:default-active="activeIndex"
class="el-menu-demo"
mode="horizontal"
@select="handleSelect"
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b"
>
<el-menu-item index="1">我的笔记</el-menu-item>
<el-menu-item index="2">我的博客</el-menu-item>
<el-submenu index="3">
<template slot="title">小工具</template>
<el-menu-item index="2-1">选项1</el-menu-item>
<el-menu-item index="2-2">选项2</el-menu-item>
<el-menu-item index="2-3">选项3</el-menu-item>
<el-menu-item index="2">设置</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
export default {
data() {
return {
activeIndex: '1',
}
activeIndex: "1"
};
},
methods: {
handleSelect(key, keyPath) {
console.log(key, keyPath)
console.log(key, keyPath);
}
}
}
};
</script>
<style>
</style>
109 changes: 68 additions & 41 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,73 @@ Vue.use(Router)
export default new Router({
// mode: 'history',
routes: [{
path: '/',
component: Layout,
redirect: 'myNote',
},
{
path: '*',
redirect: '/index',
hidden: true
},
{
path: '/index',
component: Layout,
redirect: 'myNote'
},
{
path: '',
component: Layout,
children: [{
path: 'myNote',
component: () =>
import('@/views/Mynote')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'myBlog',
component: () =>
import('@/views/MyBlog')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'file',
component: () =>
import('@/views/FileUpload')
}]
}
path: '/',
component: Layout,
redirect: 'novel'
},
{
path: '*',
redirect: '/index',
hidden: true
},
{
path: '/index',
component: Layout,
redirect: 'myNote'
},
{
path: '',
component: Layout,
children: [{
path: 'myNote',
component: () =>
import('@/views/Mynote')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'myBlog',
component: () =>
import('@/views/MyBlog')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'novel',
component: () =>
import('@/views/Novel')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'file',
component: () =>
import('@/views/FileUpload')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'chapter',
component: () =>
import('@/views/chapter')
}]
},
{
path: '',
component: Layout,
children: [{
path: 'catalog',
component: () =>
import('@/views/catalog')
}]
}
]
})
Loading

0 comments on commit 0fd16a7

Please sign in to comment.