diff --git a/index.html b/index.html
index ca2aff5..19758e3 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@
-
violin-home-manage
+ violin-home
diff --git a/mock/blogView.ts b/mock/blogView.ts
index e484380..de205ab 100644
--- a/mock/blogView.ts
+++ b/mock/blogView.ts
@@ -25,6 +25,20 @@ export default [
]
}
},
+ {
+ url: '/wiki/api/v1/reader/blog/string',
+ method: 'get',
+ response: () => {
+ return {
+ bid: "1",
+ btId: "2",
+ btName: "3",
+ title: "1.2 java neicun",
+ blog_prex: "5",
+ content: "关键字volatile是java虚拟机提供的最轻量级的同步机制。\n当一个变量被定义为volatile时,它具备两种特性。\n第一种是**可见性**。\n即每次get时,强制刷新。\n一个误解区,字节码就是原子操作,这是不对的,一个字节码指令在解释执行时,如果是编译执行,一条字节码会有可能被转化为若干个本地机器指令。此处,用-XX:+PrintAssembly参数输出反汇编来分析。\n\n第二种是,**有序性**。\n即,禁止指令重排序(Instruction Recorder)优化。\n被volatile修饰的变量,赋值后会多执行一个\"lock addl\"操作,这个操作相当于一个memory barrier(内存屏障),指令重拍时,不能把后面的指令排序到内存屏障前面去,只有一个处理器访问时,不需要内存屏障。\naddl 是一个空操作,(把ESP寄存器的值 + 0),这个操作相当于把缓存中的变量做了一次store和write操作。\nlock iddl指令把修改同步到内存时,意味着所有的之前的操作都已完成,便形成了指令重排序无法穿越内存屏障的效果。\n针对于long和double的类型变量,不通虚拟机是有着不同的实现,此处不做描述。\n",
+ }
+ }
+ },
{
url: '/wiki/api/v1/reader/blog_type',
method: 'get',
diff --git a/mock/calendar.ts b/mock/calendar.ts
index 06a8c4d..e64ef56 100644
--- a/mock/calendar.ts
+++ b/mock/calendar.ts
@@ -7,14 +7,14 @@ export default [
response: () => {
return [
{
- date: '2023-01-09',
+ event_date: '2023-01-09',
title: '春游',
- eventInfo: '春节不觉晓,处处闻啼鸟,夜来风雨声,花落知多少',
+ event_info: '春节不觉晓,处处闻啼鸟,夜来风雨声,花落知多少',
},
{
- date: '2023-01-30',
+ event_date: '2023-01-30',
title: '月底发工资',
- eventInfo: '发了工资少一半,还了信用卡再少一半,试问如何攒下钱,只有两个字:做梦',
+ event_info: '发了工资少一半,还了信用卡再少一半,试问如何攒下钱,只有两个字:做梦',
}
]
}
diff --git a/src/components/layout/Layout.vue b/src/components/layout/Layout.vue
index 9b89b2b..57c2d7c 100644
--- a/src/components/layout/Layout.vue
+++ b/src/components/layout/Layout.vue
@@ -1,10 +1,10 @@
-
-
+
+
-
+
@@ -83,11 +83,13 @@ iniPage()
.el-main {
padding: 16px;
overflow: hidden;
+ height: 100%;
}
.el-aside {
margin-left: -10px;
background: #191a23;
+ position: fixed;
}
.el-footer {
@@ -95,4 +97,15 @@ iniPage()
display: flex;
justify-content: space-around;
}
+
+.main_container {
+ /* height: 100%; */
+}
+
+.homeWrap {
+ position: absolute;
+ top: 0;
+ height: 100%;
+ width: 100%;
+}
diff --git a/src/permission.ts b/src/permission.ts
index 646227a..449efdb 100644
--- a/src/permission.ts
+++ b/src/permission.ts
@@ -4,10 +4,11 @@ import { getToken, getTenant } from './utils/auth'
import { Tenant } from './entity/index'
import { tenantStore } from './store/modules/tenant'
-const whiteList = ['/login', '/register', '/sorryPage']
+const whiteList = ['/login', '/register', '/sorryPage', '/BlogViewer']
let url = window.location.href
router.beforeEach((to, from, next) => {
+ console.log(to.path)
const token = getToken()
@@ -20,13 +21,16 @@ router.beforeEach((to, from, next) => {
const tenant = (JSON.parse(getTenant() as string))
if (url.search("write") != -1) {
next('/BlogEditer')
- } else if (url.search("view") != -1) {
- let bid = Cookies.get('bid')
+ }
+ if (url.search("view") != -1) {
+ let arr = url.split('?')
+ let bid = arr[1].split('=')[1]
router.push({
path: '/BlogViewer',
query: { bid: bid }
})
- } else {
+ }
+ else {
router.push({
path: '/home',
query: tenant
@@ -75,6 +79,7 @@ router.beforeEach((to, from, next) => {
window.open(href, '_self');
})
}
+
if (url.search("sorryPage") != -1) {
router.push({
path: '/sorryPage',
@@ -86,4 +91,5 @@ router.beforeEach((to, from, next) => {
next('/login')
}
}
+
})
\ No newline at end of file
diff --git a/src/view/blog/index.vue b/src/view/blog/index.vue
index 451bd11..151ee8d 100644
--- a/src/view/blog/index.vue
+++ b/src/view/blog/index.vue
@@ -34,8 +34,8 @@
{{ item.title }}
{{
- item.content
-}}
+ item.content
+ }}
重新发布
@@ -91,8 +91,6 @@ const onSubmit = () => {
}
const openBlog = (bid: string) => {
-
- Cookies.set('bid', bid)
const { href } = router.resolve({
path: '/view',
query: {
diff --git a/src/view/blog/mdview.vue b/src/view/blog/mdview.vue
index 02cf1de..33d393c 100644
--- a/src/view/blog/mdview.vue
+++ b/src/view/blog/mdview.vue
@@ -1,4 +1,5 @@
+ {{ title }}
@@ -9,16 +10,19 @@ import { ref } from 'vue';
import { useRoute } from 'vue-router'
import { getBlog } from '../../api/blogView'
let text = ref('')
+let title = ref('')
const route = useRoute()
const params = route.query
const init = () => {
getBlog(params.bid as string).then(response => {
text.value = response.data.content
+ title.value = response.data.title
})
}
init()
\ No newline at end of file