├── README.md └── vue-front ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── assets │ ├── images │ │ ├── img2.png │ │ └── userAvatar.png │ └── video │ │ ├── 1.吉尼斯世界纪录里最甜的物质是什么?它究竟有多甜?(Av466923503,P1).mp4 │ │ ├── test.mp4 │ │ └── 新建文本文档.mp4 ├── favicon.ico └── index.html └── src ├── App.vue ├── api ├── axios.js ├── permission.js ├── statisticApi.js └── videoApi.js ├── assets ├── icon │ ├── iconfont.css │ ├── iconfont.js │ ├── iconfont.json │ ├── iconfont.ttf │ ├── iconfont.woff │ └── iconfont.woff2 └── images │ ├── QQ图片20220414140054.jpg │ ├── img1.png │ ├── img111.png │ ├── img2.png │ ├── img3.png │ ├── img4.png │ ├── img444.png │ ├── logo.png │ ├── logo1.png │ ├── pp1.jpg │ ├── pp2.jpg │ ├── pp3.jpg │ ├── pp4.jpg │ ├── video1.png │ ├── video2.png │ ├── video3.png │ ├── video4.png │ ├── video5.png │ ├── video6.png │ ├── video7.png │ └── video8.png ├── components ├── Header.vue ├── headerComponent.vue ├── videoUpload.vue └── videoUpload │ ├── projectFileUpload.vue │ └── uploadFile.vue ├── main.js ├── router └── index.js ├── store ├── index.js └── user.js └── views ├── BlogDetail └── index.vue ├── BlogEdit └── index.vue ├── Blogs └── index.vue ├── LabelPage ├── index.vue └── labelContent.vue ├── LabelPage2 └── index.vue ├── LabelPage3 └── index.vue ├── LabelPage4 └── index.vue ├── LabelPage5 └── index.vue ├── LabelPage6 └── index.vue ├── Layout └── index.vue ├── Login └── index.vue ├── MessagePage ├── index.vue └── messageContent.vue ├── PersonHome ├── index.vue ├── noteContent.vue ├── noteList.vue └── personContent.vue ├── PublicPage └── index.vue ├── RegisterPage └── index.vue ├── SearchPage └── index.vue ├── SpacePage └── index.vue ├── VideoClassify └── index.vue └── VideoPage └── index.vue /README.md: -------------------------------------------------------------------------------- 1 | # video-web 2 | 基于Vue+Springboot+Flask+Pytorch的视频网站,其中业务服务使用Springboot框架,深度学习部分使用Flask封装Pytorch代码接口,方便Vue前端调用 3 | -------------------------------------------------------------------------------- /vue-front/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vue-front/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vueblog-vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "axios": "^0.26.0", 11 | "core-js": "^3.6.5", 12 | "element-ui": "^2.15.6", 13 | "github-markdown-css": "^5.1.0", 14 | "less-loader": "^5.0.0", 15 | "markdown-it": "^12.3.2", 16 | "mavon-editor": "^2.10.4", 17 | "spark-md5": "^3.0.2", 18 | "video.js": "^7.18.1", 19 | "vue": "^2.6.11", 20 | "vue-router": "^3.2.0", 21 | "vue-simple-uploader": "^0.7.6", 22 | "vuex": "^3.4.0" 23 | }, 24 | "devDependencies": { 25 | "@vue/cli-plugin-babel": "~4.5.0", 26 | "@vue/cli-plugin-router": "~4.5.0", 27 | "@vue/cli-plugin-vuex": "~4.5.0", 28 | "@vue/cli-service": "~4.5.0", 29 | "less": "^4.1.2", 30 | "vue-template-compiler": "^2.6.11", 31 | "webpack": "^4.0.0" 32 | }, 33 | "browserslist": [ 34 | "> 1%", 35 | "last 2 versions", 36 | "not dead" 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /vue-front/public/assets/images/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/public/assets/images/img2.png -------------------------------------------------------------------------------- /vue-front/public/assets/images/userAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/public/assets/images/userAvatar.png -------------------------------------------------------------------------------- /vue-front/public/assets/video/1.吉尼斯世界纪录里最甜的物质是什么?它究竟有多甜?(Av466923503,P1).mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/public/assets/video/1.吉尼斯世界纪录里最甜的物质是什么?它究竟有多甜?(Av466923503,P1).mp4 -------------------------------------------------------------------------------- /vue-front/public/assets/video/test.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/public/assets/video/test.mp4 -------------------------------------------------------------------------------- /vue-front/public/assets/video/新建文本文档.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/public/assets/video/新建文本文档.mp4 -------------------------------------------------------------------------------- /vue-front/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/public/favicon.ico -------------------------------------------------------------------------------- /vue-front/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /vue-front/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 17 | -------------------------------------------------------------------------------- /vue-front/src/api/axios.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import Element from 'element-ui' 3 | import store from '../store' 4 | import router from '../router' 5 | 6 | axios.defaults.baseURL = "http://172.22.173.94:8081" 7 | 8 | // 前置拦截 9 | axios.interceptors.request.use(config => { 10 | if (!['/login/login', '/login/register'].includes(config.url)) { 11 | config.headers.token = localStorage.getItem('token') 12 | } 13 | // console.log('config : ', config) 14 | return config 15 | }) 16 | 17 | // 后置拦截 18 | axios.interceptors.response.use(response => { 19 | let res = response.data 20 | 21 | if (res.code === 200) { 22 | return response 23 | } else { 24 | Element.Message.error(response.data.msg, { duration: 1 * 1000 }) 25 | return Promise.reject(response.data.msg) 26 | } 27 | 28 | }, error => { 29 | console.log(error) 30 | if (error.response.data) { 31 | error.message = error.response.data.msg 32 | } 33 | 34 | if (error.response === 401) { 35 | store.commit("REMOVE_INFO") 36 | router.push("/login") 37 | } 38 | 39 | Element.Message.error(error.message, { duration: 1 * 1000 }) 40 | return Promise.reject(error.message) 41 | 42 | }) 43 | 44 | export default axios 45 | -------------------------------------------------------------------------------- /vue-front/src/api/permission.js: -------------------------------------------------------------------------------- 1 | import router from "../router"; 2 | 3 | // 路由判断登录 根据路由配置文件的参数 4 | router.beforeEach((to,from,next) => { 5 | if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限 6 | // const token = localStorage.getItem("token") 7 | // console.log("------------token : " + token) 8 | const userInfo = sessionStorage.getItem("userInfo") 9 | console.log("------------userInfo : " + userInfo) 10 | if(userInfo) { 11 | if(to.path === '/login') { 12 | 13 | } else { 14 | next() 15 | } 16 | } else { 17 | next({ 18 | path: '/login' 19 | }) 20 | } 21 | } else { 22 | next() 23 | } 24 | }) -------------------------------------------------------------------------------- /vue-front/src/api/statisticApi.js: -------------------------------------------------------------------------------- 1 | import axios from './axios' 2 | 3 | const statisticApi = { 4 | insertLike (videoId) { 5 | return axios.get('/statistic/insertLike?videoId=' + (videoId || 0)) 6 | }, 7 | 8 | deleteLike (videoId) { 9 | return axios.get('/statistic/deleteLike?videoId=' + (videoId || 0)) 10 | } 11 | 12 | } 13 | 14 | export default statisticApi 15 | -------------------------------------------------------------------------------- /vue-front/src/api/videoApi.js: -------------------------------------------------------------------------------- 1 | import axios from './axios' 2 | 3 | const videoApi = { 4 | 5 | checkVideoName(fileName) { 6 | return axios.get('/video/upload/nameCheck?fileName=' + (fileName || '')) 7 | }, 8 | 9 | mergeVideo(fileInfo, videoInfo) { 10 | return axios.post('/video/upload/mergeVideo', { fileInfo: fileInfo, videoInfo: videoInfo }) 11 | }, 12 | 13 | getVideoListByLabel(label) { 14 | return axios.post('/video/getVideoListByLabel', { label: label }) 15 | } 16 | 17 | } 18 | 19 | export default videoApi -------------------------------------------------------------------------------- /vue-front/src/assets/icon/iconfont.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "iconfont"; /* Project id 3336397 */ 3 | src: url('iconfont.woff2?t=1650202339785') format('woff2'), 4 | url('iconfont.woff?t=1650202339785') format('woff'), 5 | url('iconfont.ttf?t=1650202339785') format('truetype'); 6 | } 7 | 8 | .icon { 9 | width: 2em; 10 | height: 2em; 11 | vertical-align: -0.15em; 12 | fill: currentColor; 13 | overflow: hidden; 14 | } 15 | 16 | .iconfont { 17 | font-family: "iconfont" !important; 18 | font-size: 16px; 19 | font-style: normal; 20 | -webkit-font-smoothing: antialiased; 21 | -moz-osx-font-smoothing: grayscale; 22 | } 23 | 24 | .icon-shoucang:before { 25 | content: "\e626"; 26 | } 27 | 28 | .icon-shoucang1:before { 29 | content: "\e613"; 30 | } 31 | 32 | .icon-dianzan:before { 33 | content: "\e630"; 34 | } 35 | 36 | .icon-dianzan1:before { 37 | content: "\e632"; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /vue-front/src/assets/icon/iconfont.js: -------------------------------------------------------------------------------- 1 | !function(t){var e,l,c,n,i,o='',a=(a=document.getElementsByTagName("script"))[a.length-1].getAttribute("data-injectcss"),d=function(t,e){e.parentNode.insertBefore(t,e)};if(a&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}function s(){i||(i=!0,c())}function h(){try{n.documentElement.doScroll("left")}catch(t){return void setTimeout(h,50)}s()}e=function(){var t,e=document.createElement("div");e.innerHTML=o,o=null,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?d(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),e()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(c=e,n=t.document,i=!1,h(),n.onreadystatechange=function(){"complete"==n.readyState&&(n.onreadystatechange=null,s())})}(window); -------------------------------------------------------------------------------- /vue-front/src/assets/icon/iconfont.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "3336397", 3 | "name": "no name", 4 | "font_family": "iconfont", 5 | "css_prefix_text": "icon-", 6 | "description": "", 7 | "glyphs": [ 8 | { 9 | "icon_id": "9642297", 10 | "name": "收藏", 11 | "font_class": "shoucang", 12 | "unicode": "e626", 13 | "unicode_decimal": 58918 14 | }, 15 | { 16 | "icon_id": "9855911", 17 | "name": "收藏", 18 | "font_class": "shoucang1", 19 | "unicode": "e613", 20 | "unicode_decimal": 58899 21 | }, 22 | { 23 | "icon_id": "17379586", 24 | "name": "点赞", 25 | "font_class": "dianzan", 26 | "unicode": "e630", 27 | "unicode_decimal": 58928 28 | }, 29 | { 30 | "icon_id": "26308644", 31 | "name": "点赞", 32 | "font_class": "dianzan1", 33 | "unicode": "e632", 34 | "unicode_decimal": 58930 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /vue-front/src/assets/icon/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/icon/iconfont.ttf -------------------------------------------------------------------------------- /vue-front/src/assets/icon/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/icon/iconfont.woff -------------------------------------------------------------------------------- /vue-front/src/assets/icon/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/icon/iconfont.woff2 -------------------------------------------------------------------------------- /vue-front/src/assets/images/QQ图片20220414140054.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/QQ图片20220414140054.jpg -------------------------------------------------------------------------------- /vue-front/src/assets/images/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/img1.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/img111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/img111.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/img2.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/img3.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/img4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/img4.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/img444.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/img444.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/logo.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/logo1.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/pp1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/pp1.jpg -------------------------------------------------------------------------------- /vue-front/src/assets/images/pp2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/pp2.jpg -------------------------------------------------------------------------------- /vue-front/src/assets/images/pp3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/pp3.jpg -------------------------------------------------------------------------------- /vue-front/src/assets/images/pp4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/pp4.jpg -------------------------------------------------------------------------------- /vue-front/src/assets/images/video1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video1.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video2.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video3.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video4.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video5.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video6.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video7.png -------------------------------------------------------------------------------- /vue-front/src/assets/images/video8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guo-admin-lab/video-web/0020d701d467c24d19efa9b32ba6494f5375eed2/vue-front/src/assets/images/video8.png -------------------------------------------------------------------------------- /vue-front/src/components/Header.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 55 | 56 | -------------------------------------------------------------------------------- /vue-front/src/components/headerComponent.vue: -------------------------------------------------------------------------------- 1 | 41 | 42 | 116 | 117 | 124 | -------------------------------------------------------------------------------- /vue-front/src/components/videoUpload.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | -------------------------------------------------------------------------------- /vue-front/src/components/videoUpload/projectFileUpload.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 165 | -------------------------------------------------------------------------------- /vue-front/src/components/videoUpload/uploadFile.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 248 | -------------------------------------------------------------------------------- /vue-front/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store' 5 | import ElementUI from 'element-ui'; 6 | import 'element-ui/lib/theme-chalk/index.css'; 7 | import axios from 'axios' 8 | import "./api/axios" 9 | import "./api/permission" 10 | import mavonEditor from 'mavon-editor' 11 | import 'mavon-editor/dist/css/index.css' 12 | import Video from 'video.js' 13 | import 'video.js/dist/video-js.css' 14 | import uploader from 'vue-simple-uploader' 15 | import "./assets/icon/iconfont.css" 16 | import "./assets/icon/iconfont.js" 17 | 18 | Vue.config.productionTip = false 19 | Vue.prototype.$axios = axios 20 | Vue.prototype.$video = Video 21 | 22 | Vue.use(ElementUI); 23 | Vue.use(mavonEditor); 24 | Vue.use(uploader); 25 | 26 | new Vue({ 27 | router, 28 | store, 29 | render: h => h(App) 30 | }).$mount('#app') 31 | -------------------------------------------------------------------------------- /vue-front/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import Login from '../views/Login' 4 | import BlogDetail from '../views/BlogDetail' 5 | import BlogEdit from '../views/BlogEdit' 6 | import PublicPage from '../views/PublicPage' 7 | import VideoPage from '../views/VideoPage' 8 | import PersonHome from "../views/PersonHome" 9 | import MessagePage from "../views/MessagePage" 10 | import SpacePage from "../views/SpacePage" 11 | import LabelPage2 from "../views/LabelPage2" 12 | import LabelPage3 from "../views/LabelPage3" 13 | import LabelPage4 from "../views/LabelPage4" 14 | import LabelPage5 from "../views/LabelPage5" 15 | import LabelPage6 from "../views/LabelPage6" 16 | import LabelPage from "../views/LabelPage" 17 | import RegisterPage from "../views/RegisterPage" 18 | import VideoClassify from "../views/VideoClassify" 19 | import SearchPage from "../views/SearchPage" 20 | import Layout from "../views/Layout" 21 | 22 | Vue.use(VueRouter) 23 | 24 | const routes = [ 25 | { 26 | path: '/', 27 | name: 'Index', 28 | redirect: { name: 'Login' } 29 | }, 30 | { 31 | path: '/login', 32 | name: 'Login', 33 | component: Login 34 | }, 35 | { 36 | path: '/registerPage', 37 | name: 'RegisterPage', 38 | component: RegisterPage 39 | }, 40 | { 41 | path: '/searchPage', 42 | name: 'SearchPage', 43 | component: SearchPage 44 | }, 45 | { 46 | path: '/layout', 47 | name: 'Layout', 48 | component: Layout, 49 | redirect: '/publicPage', 50 | children: [ 51 | { 52 | path: '/publicPage', 53 | name: 'PublicPage', 54 | component: PublicPage 55 | }, 56 | { 57 | path: '/labelPage', 58 | name: 'LabelPage', 59 | component: LabelPage 60 | }, 61 | { 62 | path: '/labelPage2', 63 | name: 'LabelPage2', 64 | component: LabelPage2 65 | }, 66 | { 67 | path: '/videoClassify', 68 | name: 'VideoClassify', 69 | component: VideoClassify 70 | }, 71 | { 72 | path: '/labelPage3', 73 | name: 'LabelPage3', 74 | component: LabelPage3 75 | }, 76 | { 77 | path: '/labelPage4', 78 | name: 'LabelPage4', 79 | component: LabelPage4 80 | }, 81 | { 82 | path: '/labelPage5', 83 | name: 'LabelPage5', 84 | component: LabelPage5 85 | }, 86 | { 87 | path: '/labelPage6', 88 | name: 'LabelPage6', 89 | component: LabelPage6 90 | }, 91 | { 92 | path: '/videoPage', 93 | name: 'VideoPage', 94 | component: VideoPage 95 | }, 96 | { 97 | path: '/personHome', // 待会要跳转的路径,随便取 98 | name: 'PersonHome', // 加一个名称,有时候可以根据这个跳转,随便取 99 | component: PersonHome // 路由跳转对应的组件,在import导入 100 | }, 101 | { 102 | path: '/messagePage', 103 | name: 'MessagePage', 104 | component: MessagePage 105 | }, 106 | { 107 | path: '/spacePage', 108 | name: 'SpacePage', 109 | component: SpacePage 110 | }, 111 | ] 112 | }, 113 | { 114 | path: '/blogs', 115 | name: 'Blogs', 116 | // 懒加载 117 | component: () => import('../views/Blogs') 118 | }, 119 | { 120 | path: '/blog/add', // 注意放在 path: '/blog/:blogId'之前 121 | name: 'BlogAdd', 122 | meta: { 123 | requireAuth: true 124 | }, 125 | component: BlogEdit 126 | }, 127 | { 128 | path: '/blog/:blogId', 129 | name: 'BlogDetail', 130 | component: BlogDetail 131 | }, 132 | { 133 | path: '/blog/:blogId/edit', 134 | name: 'BlogEdit', 135 | meta: { 136 | requireAuth: true 137 | }, 138 | component: BlogEdit 139 | } 140 | ] 141 | 142 | const router = new VueRouter({ 143 | mode: 'history', 144 | base: process.env.BASE_URL, 145 | routes 146 | }) 147 | 148 | export default router 149 | -------------------------------------------------------------------------------- /vue-front/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import user from './user' 4 | 5 | Vue.use(Vuex) 6 | 7 | export default new Vuex.Store({ 8 | state: { 9 | token: '', 10 | userInfo: JSON.parse(sessionStorage.getItem("userInfo")) 11 | }, 12 | mutations: { 13 | // set 14 | SET_TOKEN: (state, token) => { 15 | state.token = token 16 | localStorage.setItem("token",token) 17 | }, 18 | SET_USERINFO: (state, userInfo) => { 19 | state.userInfo = userInfo 20 | sessionStorage.setItem("userInfo",JSON.stringify(userInfo)) 21 | }, 22 | REMOVE_INFO: (state) => { 23 | state.token = '' 24 | state.userInfo = {} 25 | localStorage.setItem("token",'') 26 | // localStorage.removeItem("token") 27 | sessionStorage.setItem("userInfo",JSON.stringify('')) 28 | // sessionStorage.removeItem("userInfo") 29 | } 30 | }, 31 | getters: { 32 | // get 33 | getUser: state => { 34 | return state.userInfo 35 | } 36 | }, 37 | actions: { 38 | }, 39 | modules: { 40 | user 41 | } 42 | }) 43 | -------------------------------------------------------------------------------- /vue-front/src/store/user.js: -------------------------------------------------------------------------------- 1 | export default { 2 | state: { 3 | userId: '', 4 | avatarAddr: '', 5 | token: '' 6 | }, 7 | mutations: { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /vue-front/src/views/BlogDetail/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 54 | 55 | -------------------------------------------------------------------------------- /vue-front/src/views/BlogEdit/index.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 104 | 105 | -------------------------------------------------------------------------------- /vue-front/src/views/Blogs/index.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 68 | 69 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage/index.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 113 | 114 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage/labelContent.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage2/index.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 111 | 112 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage3/index.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 111 | 112 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage4/index.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 111 | 112 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage5/index.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 111 | 112 | -------------------------------------------------------------------------------- /vue-front/src/views/LabelPage6/index.vue: -------------------------------------------------------------------------------- 1 | 47 | 48 | 111 | 112 | -------------------------------------------------------------------------------- /vue-front/src/views/Layout/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 20 | -------------------------------------------------------------------------------- /vue-front/src/views/Login/index.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 108 | 109 | 135 | -------------------------------------------------------------------------------- /vue-front/src/views/MessagePage/index.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 62 | 63 | -------------------------------------------------------------------------------- /vue-front/src/views/MessagePage/messageContent.vue: -------------------------------------------------------------------------------- 1 | 59 | 60 | 149 | 150 | -------------------------------------------------------------------------------- /vue-front/src/views/PersonHome/index.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 153 | 154 | 175 | -------------------------------------------------------------------------------- /vue-front/src/views/PersonHome/noteContent.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /vue-front/src/views/PersonHome/noteList.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | -------------------------------------------------------------------------------- /vue-front/src/views/PersonHome/personContent.vue: -------------------------------------------------------------------------------- 1 | 225 | 226 | 635 | 644 | 645 | -------------------------------------------------------------------------------- /vue-front/src/views/PublicPage/index.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 145 | 146 | -------------------------------------------------------------------------------- /vue-front/src/views/RegisterPage/index.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 105 | 106 | -------------------------------------------------------------------------------- /vue-front/src/views/SearchPage/index.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 108 | -------------------------------------------------------------------------------- /vue-front/src/views/SpacePage/index.vue: -------------------------------------------------------------------------------- 1 | 91 | 92 | 160 | -------------------------------------------------------------------------------- /vue-front/src/views/VideoClassify/index.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 29 | -------------------------------------------------------------------------------- /vue-front/src/views/VideoPage/index.vue: -------------------------------------------------------------------------------- 1 | 52 | 53 | 238 | 239 | 541 | --------------------------------------------------------------------------------