diff --git a/static/package-lock.json b/static/package-lock.json index 21d29d6..248733a 100644 --- a/static/package-lock.json +++ b/static/package-lock.json @@ -11239,9 +11239,9 @@ } }, "vue-loader-v16": { - "version": "npm:vue-loader@16.5.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz", - "integrity": "sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A==", + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", "dev": true, "optional": true, "requires": { @@ -11296,9 +11296,9 @@ "optional": true }, "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", + "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", "dev": true, "optional": true, "requires": { diff --git a/static/public/favicon1.ico b/static/public/favicon1.ico new file mode 100644 index 0000000..ea79ba5 Binary files /dev/null and b/static/public/favicon1.ico differ diff --git a/static/src/router/asideRoute.js b/static/src/router/asideRoute.js new file mode 100644 index 0000000..223cf9a --- /dev/null +++ b/static/src/router/asideRoute.js @@ -0,0 +1,51 @@ +import Positive from '../views/positive/positive.vue' +import Negative from '../views/negative/negative.vue' +import WordCloud from "../views/wordCloud/wordCloud.vue" +import Netease from "../views/netease/netease.vue" +import CommentsType from "../views/commentsType/commentsType.vue" + +const asideRoute = [ + { + path: '/positive', + name: 'Top积极词汇统计', + meta: { + title: 'positive', + // icon: 'fa fa-paper-plane' + }, + component: Positive, + },{ + path: '/negative', + name: 'Top消极词汇统计', + component: Negative, + meta: { + title: 'negative', + // icon: 'fa fa-paper-plane' + }, + },{ + path: '/wordCloud', + name: '词云图分析', + component: WordCloud, + meta: { + title: 'wordCloud', + // icon: 'fa fa-paper-plane' + }, + },{ + path: '/commentsType', + name: '评论类型占比', + component: CommentsType, + meta: { + title: 'commentsType', + // icon: 'fa fa-paper-plane' + }, + },{ + path: '/netease', + name: '网易严选', + component: Netease, + meta: { + title: 'netease', + // icon: 'fa fa-paper-plane' + }, + } +] + +export default asideRoute \ No newline at end of file diff --git a/static/src/router/index.js b/static/src/router/index.js index 58385ba..0ee8efc 100644 --- a/static/src/router/index.js +++ b/static/src/router/index.js @@ -1,6 +1,7 @@ import Vue from 'vue' import VueRouter from 'vue-router' import Login from '../views/login/Login.vue' +import asideRoute from './asideRoute.js' Vue.use(VueRouter) @@ -15,6 +16,15 @@ const routes = [ name: 'Home', component: () => import('../views/home/Home.vue'), }, + { + path: '/about', + name: 'About', + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import(/* webpackChunkName: "about" */ '../views/about/About.vue'), + children: asideRoute + }, ] diff --git a/static/src/views/about/About.vue b/static/src/views/about/About.vue new file mode 100644 index 0000000..b207554 --- /dev/null +++ b/static/src/views/about/About.vue @@ -0,0 +1,166 @@ + + + \ No newline at end of file diff --git a/static/src/views/about/components/appmain.vue b/static/src/views/about/components/appmain.vue new file mode 100644 index 0000000..aa42289 --- /dev/null +++ b/static/src/views/about/components/appmain.vue @@ -0,0 +1,32 @@ + + + \ No newline at end of file diff --git a/static/src/views/about/components/aside.vue b/static/src/views/about/components/aside.vue new file mode 100644 index 0000000..5a50426 --- /dev/null +++ b/static/src/views/about/components/aside.vue @@ -0,0 +1,100 @@ + + + + \ No newline at end of file diff --git a/static/src/views/about/components/breadcrumb.vue b/static/src/views/about/components/breadcrumb.vue new file mode 100644 index 0000000..eb3cbde --- /dev/null +++ b/static/src/views/about/components/breadcrumb.vue @@ -0,0 +1,109 @@ + + + \ No newline at end of file diff --git a/static/src/views/commentsType/commentsType.vue b/static/src/views/commentsType/commentsType.vue new file mode 100644 index 0000000..6d18965 --- /dev/null +++ b/static/src/views/commentsType/commentsType.vue @@ -0,0 +1,80 @@ + + + \ No newline at end of file diff --git a/static/src/views/home/Home.vue b/static/src/views/home/Home.vue index 6cb68f4..5131cd9 100644 --- a/static/src/views/home/Home.vue +++ b/static/src/views/home/Home.vue @@ -36,17 +36,17 @@
Top10积极词汇评分 -
+
-
+
Top10消极词汇评分 -
+
-
+
@@ -57,9 +57,8 @@ import * as info from "../../api/info"; export default { data() { return { - activeIndex: 1, formData: { - url: "", + url: "http://you.163.com/item/detail?id=4028691", }, username: "", chartsData: [], @@ -93,6 +92,7 @@ export default { _this.frequencyChart.resize(); }); this.username = localStorage.getItem("username"); + this.onSubmit(); }, methods: { onSubmit() { @@ -104,7 +104,6 @@ export default { .display(params) .then((res) => { if (res.data.code == 200) { - console.log(res); this.chartsData = res.data.data; let positiveChartData = res.data.data.positive; let negativeChartData = res.data.data.negative; @@ -129,7 +128,6 @@ export default { this.pieChartData.push({name:el,value:pieChartData[el]}) }); - console.log(keys,this.pieChartData) this.drawChart(); } else { this.$message.error("拉取错误!"); @@ -249,6 +247,10 @@ export default { ::v-deep .el-menu.el-menu--horizontal { border: none; } +::v-deep .el-card__body{ + height: 100%; + padding:30px; +} .homePage { margin: 0; padding: 0; @@ -315,4 +317,8 @@ export default { float: left; margin: 10px; } +.chart-size{ + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/static/src/views/login/Login.vue b/static/src/views/login/Login.vue index 1c7cfca..1637aea 100644 --- a/static/src/views/login/Login.vue +++ b/static/src/views/login/Login.vue @@ -189,7 +189,7 @@ export default { }, methods: { submitForm(formName) { - // this.$router.push({ path: "/home" }); + // this.$router.push({ path: "/positive" }); // console.log(formName); this.$refs[formName].validate((valid) => { let params = { @@ -201,10 +201,9 @@ export default { .login(params) .then((res) => { if (res.data.code == 200) { - console.log(res); this.data = res.data.data; localStorage.setItem('username',this.formData.user) - this.$router.push({ path: "/home" }); + this.$router.push({ path: "/positive" }); } else { this.$message.error("用户名或密码错误!"); } @@ -213,7 +212,6 @@ export default { this.$Message.error(err + "!"); }); } else { - console.log("error submit!!"); return false; } }); @@ -236,7 +234,6 @@ export default { .regist(params) .then((res) => { if (res.data.code == 200 && res.data.msg == 'success') { - console.log(res); this.data = res.data.data; this.isRegist = false; setTimeout(()=>{ @@ -250,7 +247,6 @@ export default { this.$Message.error(err + "!"); }); } else { - console.log("error submit!!"); return false; } }); diff --git a/static/src/views/negative/negative.vue b/static/src/views/negative/negative.vue new file mode 100644 index 0000000..f82bbe2 --- /dev/null +++ b/static/src/views/negative/negative.vue @@ -0,0 +1,141 @@ + + + \ No newline at end of file diff --git a/static/src/views/netease/netease.vue b/static/src/views/netease/netease.vue new file mode 100644 index 0000000..b5407e6 --- /dev/null +++ b/static/src/views/netease/netease.vue @@ -0,0 +1,40 @@ + + + \ No newline at end of file diff --git a/static/src/views/positive/positive.vue b/static/src/views/positive/positive.vue new file mode 100644 index 0000000..ef24e90 --- /dev/null +++ b/static/src/views/positive/positive.vue @@ -0,0 +1,141 @@ + + + \ No newline at end of file diff --git a/static/src/views/wordCloud/wordCloud.vue b/static/src/views/wordCloud/wordCloud.vue new file mode 100644 index 0000000..8e2edb2 --- /dev/null +++ b/static/src/views/wordCloud/wordCloud.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file