diff --git a/package-lock.json b/package-lock.json index e45357786095b8daae86de2768582f8b8daa18b8..484392a1c4cf71cfc377a9176ec186cc9de14a6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4668,29 +4668,6 @@ "safer-buffer": "^2.1.0" } }, - "echarts": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-4.8.0.tgz", - "integrity": "sha512-YwShpug8fWngj/RlgxDaYrLBoD+LsZUArrusjNPHpAF+is+gGe38xx4W848AwWMGoi745t3OXM52JedNrv+F6g==", - "requires": { - "zrender": "4.3.1" - } - }, - "echarts-amap": { - "version": "1.0.0-rc.6", - "resolved": "https://registry.npmjs.org/echarts-amap/-/echarts-amap-1.0.0-rc.6.tgz", - "integrity": "sha1-V4KnTa7lLtRM4/j2JXdWF4PwnhY=" - }, - "echarts-liquidfill": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/echarts-liquidfill/-/echarts-liquidfill-2.0.6.tgz", - "integrity": "sha512-p+AH0O9/BtwXMQQyhjJbMZo+GwRAgWG/DCyK5r27PQzpS0UWrgXu57MyEFc0A8Ub3sRuqEu08BuxwHICBkSWSQ==" - }, - "echarts-wordcloud": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/echarts-wordcloud/-/echarts-wordcloud-1.1.3.tgz", - "integrity": "sha512-Et8D5xEAoYkidmHun+hEH+2lF9dhCt6D0JJ390vlr2r/1zwhhZAbcL01CEvG93QcMcJpSvSPK8vRiGkTbMHRxg==" - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", @@ -7940,11 +7917,6 @@ "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", "dev": true }, - "numerify": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/numerify/-/numerify-1.2.9.tgz", - "integrity": "sha512-X4QzQiytV5ZN3TVLhzbtFzjTarUNnaa1pgNDFqt7u7Nqhxe7FvY2eYrGt4WYHlYXDqgtfC/n/a5nJ2y0LijV8w==" - }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", @@ -11280,11 +11252,6 @@ "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", "dev": true }, - "utils-lite": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/utils-lite/-/utils-lite-0.1.10.tgz", - "integrity": "sha512-jlHvdtI8MyWURF/3u+ufIjf1Cs5WjN6WZl9qO8dEkZsVjaI7X5YMUhaCFzkvB69ljt6fo4Dd7V/Oj2NJOFDFOQ==" - }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", @@ -11297,18 +11264,6 @@ "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", "dev": true }, - "v-charts": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/v-charts/-/v-charts-1.19.0.tgz", - "integrity": "sha512-vm2HBUmxAsXK0ivwce9LytcpqrItDA5JSPLYVxZXtiuoyhcn80XX1/3dPJd/1GqG1OYv3jfBo1s9ra4q8GowqA==", - "requires": { - "echarts-amap": "1.0.0-rc.6", - "echarts-liquidfill": "^2.0.2", - "echarts-wordcloud": "^1.1.3", - "numerify": "1.2.9", - "utils-lite": "0.1.10" - } - }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.3.0.tgz", @@ -11364,11 +11319,6 @@ "resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-7.2.6.tgz", "integrity": "sha512-+eaQXVrAm/LldalI272PpDe3+i4mPis0ORiMYxF6Ae4hyuCh15W8Idet7wPUEs4N4YptgFHGys4UrgNQOMyO6w==" }, - "vue-count-to": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/vue-count-to/-/vue-count-to-1.0.13.tgz", - "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ==" - }, "vue-eslint-parser": { "version": "7.8.0", "resolved": "https://registry.nlark.com/vue-eslint-parser/download/vue-eslint-parser-7.8.0.tgz", @@ -12465,11 +12415,6 @@ "dev": true } } - }, - "zrender": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-4.3.1.tgz", - "integrity": "sha512-CeH2TpJeCdG0TAGYoPSAcFX2ogdug1K7LIn9UO/q9HWqQ54gWhrMAlDP9AwWYMUDhrPe4VeazQ4DW3msD96nUQ==" } } } diff --git a/package.json b/package.json index 67ad6882205e0f00ab27b51b6ed3948e6dbe1f0b..2fdf40ca067de1fb7bb62bcd87c06bbba7e01fc1 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,11 @@ "axios": "^0.21.1", "babel-plugin-import": "^1.13.3", "core-js": "^3.6.5", - "echarts": "^4.8.0", "hls.js": "^1.0.10", "less": "^4.1.2", "less-loader": "^5.0.0", "moment": "^2.29.1", - "v-charts": "^1.19.0", "vue": "^2.6.11", - "vue-count-to": "^1.0.13", "vue-router": "^3.2.0", "vue-slider-component": "^3.2.14", "vuex": "^3.4.0" diff --git a/src/api/admin.js b/src/api/admin.js deleted file mode 100644 index c27006123182389b4b670bcb8464d982547fd0e1..0000000000000000000000000000000000000000 --- a/src/api/admin.js +++ /dev/null @@ -1,116 +0,0 @@ -import request from '@/utils/admin-request'; - -//登录 -export const login = ({ email, password }) => { - return request.post('v1/admin/login', { email, password }); -} - -//添加管理员 -export const addAdmin = ({ name, email, password, authority }) => { - authority = Number(authority); - return request.post('v1/admin/add', { name, email, password, authority }); -} - -//获取管理员列表 -export const getAdminList = (page, page_size) => { - return request.get('v1/admin/list?page=' + page + '&page_size=' + page_size); -} - -//删除管理员 -export const deleteAdmin = (id) => { - return request.post('v1/admin/delete', { id }); -} - -//获取用户列表 -export const getUserList = (page, page_size) => { - return request.get('v1/admin/user/list?page=' + page + '&page_size=' + page_size); -} - -//删除用户 -export const deleteUser = (id) => { - return request.post('v1/admin/user/delete', { id }); -} - -//修改用户 -export const modifyUser = ({ id, name, email, sign }) => { - return request.post('v1/admin/user/modify', { id, name, email, sign }); -} - -//获取视频列表 -export const getVideoList = (page, page_size) => { - return request.get('v1/admin/video/list?page=' + page + '&page_size=' + page_size); -} - -//添加视频 -export const addVideo = ({ title, cover, video, introduction }) => { - return request.post('v1/admin/video/add', { title, cover, video, introduction }); -} - -//删除视频 -export const deleteVideo = (id) => { - return request.post('v1/admin/video/delete', { id }); -} - -//获取公告频列表 -export const getAnnounceList = () => { - return request.get('v1/admin/announce/list'); -} - -//添加公告 -export const addAnnounce = ({ title, content, url }) => { - return request.post('v1/admin/announce/add', { title, content, url }); -} - -//删除公告 -export const deleteAnnounce = (id) => { - return request.post('v1/admin/announce/delete', { id }); -} - -//获取轮播图 -export const getCarousel = () => { - return request.get('v1/admin/carousel'); -} - -//上传轮播图信息 -export const addCarousel = ({ img, url }) => { - return request.post('v1/admin/carousel/upload/info', { img, url }); -} - -//删除轮播图 -export const deleteCarousel = (id) => { - return request.post('v1/admin/carousel/delete', { id }); -} - -//获取审核视频列表 -export const getReviewList = (page, page_size) => { - return request.get('v1/admin/review/list?page=' + page + '&page_size=' + page_size); -} - -export const review = ({ vid, status, remarks }) => { - return request.post('v1/admin/review', { vid, status, remarks }); -} - -//获取网站总体数据 -export const getTotalData = () => { - return request.get('v1/admin/data/total'); -} - -//获取网站近期数据 -export const getRecentData = () => { - return request.get('v1/admin/data'); -} - -//获取意见反馈列表 -export const getOpinionList = (page, page_size) => { - return request.get('v1/admin/opinion/list?page=' + page + '&page_size=' + page_size); -} - -//添加分区 -export const addPartition = ({ content, fid }) => { - return request.post('v1/admin/partition/add', { content, fid }); -} - -//删除分区 -export const deletePartition = (id) => { - return request.post('v1/admin/partition/delete', { id }); -} \ No newline at end of file diff --git a/src/assets/background.png b/src/assets/background.png deleted file mode 100644 index 158a6739d487a9cb29a3989004cb8f8a190e27bf..0000000000000000000000000000000000000000 Binary files a/src/assets/background.png and /dev/null differ diff --git a/src/components/WPlayer/components/control.vue b/src/components/WPlayer/components/control.vue index e402789a378e8a29e76eafa788421f2b5e693dd8..8f40b64e487e6a3408334653132cd9c2356d03c7 100644 --- a/src/components/WPlayer/components/control.vue +++ b/src/components/WPlayer/components/control.vue @@ -206,7 +206,7 @@ export default { }, //处理时间格式 VideoTime(time) { - var m = parseInt((time % 3600) / 60); + var m = parseInt(time / 60); var s = parseInt(time % 60); m = m < 10 ? "0" + m : m; s = s < 10 ? "0" + s : s; diff --git a/src/config.js b/src/config.js index b3588bd5b5f06eb7b364ae308a5807f55ada4e8e..c19d2f3a577c1b173de8e21355627aa833932aee 100644 --- a/src/config.js +++ b/src/config.js @@ -1,6 +1,6 @@ const title = "HI!Danmu"; const url = "http://localhost:9000"; -const mobile = "http://localhost:8080"; +const mobile = "http://localhost:8080/mobile/"; const icp = "icp备案信息"; const config = { diff --git a/src/main.js b/src/main.js index da709b25c5de55916b813d8b25bbdc672c749e4c..9ac60b0a2deb599bd724d02e2a7fb35c1848462c 100644 --- a/src/main.js +++ b/src/main.js @@ -25,7 +25,6 @@ import { notification, Skeleton, Result, - Table, Select, Progress, Timeline @@ -61,7 +60,6 @@ Vue.component(Radio.Group.name, Radio.Group); Vue.component(Radio.Button.name, Radio.Button); Vue.component(Skeleton.name, Skeleton); Vue.component(Result.name, Result); -Vue.component(Table.name, Table); Vue.component(Select.name, Select); Vue.component(Select.Option.name, Select.Option); Vue.component(Progress.name, Progress); @@ -83,7 +81,7 @@ new Vue({ }).$mount('#app') console.log( - `%c 版本号:3.6.5 %c 适用后端版本:3.6.8 %c`, + `%c 版本号:3.7.0 %c 适用后端版本:3.7.0 %c`, 'background:rgb(244,167,89) ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff', 'background:rgb(30,152,255) ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff', 'background:transparent' diff --git a/src/router/admin.js b/src/router/admin.js deleted file mode 100644 index 566b88221a52263964ac341cf7fd34d96ea4c447..0000000000000000000000000000000000000000 --- a/src/router/admin.js +++ /dev/null @@ -1,75 +0,0 @@ -let routes = [ - { - path: '/admin/login', - name: 'AdminLogin', - component: () => - import('../views/admin/Login.vue'), - }, - { - path: '/admin', - name: 'Admin', - meta: { admin: true }, - component: () => - import('../views/admin/AdminHome.vue'), - redirect: '/admin/dashboard', - children: [ - { - path: '/admin/dashboard', - name: 'AdminDashboard', - meta: { admin: true }, - component: () => - import('../views/admin/AdminDashboard.vue'), - }, - { - path: '/admin/info', - name: 'AdminInfo', - component: () => - import('../views/admin/AdminInfo.vue'), - }, - { - path: '/admin/user', - name: 'AdminUser', - component: () => - import('../views/admin/AdminUser.vue'), - }, - { - path: '/admin/video', - name: 'AdminVideo', - component: () => - import('../views/admin/AdminVideo.vue'), - }, - { - path: '/admin/review', - name: 'AdminReview', - component: () => - import('../views/admin/AdminReview.vue'), - }, - { - path: '/admin/announce', - name: 'AdminAnnounce', - component: () => - import('../views/admin/AdminAnnounce.vue'), - }, - { - path: '/admin/carousel', - name: 'AdminCarousel', - component: () => - import('../views/admin/AdminCarousel.vue'), - }, - { - path: '/admin/partition', - name: 'AdminPartition', - component: () => - import('../views/admin/AdminPartition.vue'), - }, - { - path: '/admin/opinion', - name: 'AdminOpinion', - component: () => - import('../views/admin/AdminOpinion.vue'), - }, - ] - }, -]; - -export default routes; \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index d29fd482f02b9fbeb8df5c9047742f4052e4253e..e913dcf0986bf01e472061ea00f3d9b0ad93b78b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,7 +4,6 @@ import Home from '../views/Home.vue'; import storage from "@/utils/stored-data.js"; import userRoutes from "./user.js"; import spaceRoutes from "./space.js"; -import adminRoutes from "./admin.js"; import uploadRoutes from "./upload.js"; Vue.use(VueRouter); @@ -91,7 +90,7 @@ const baseRoutes = [{ } ] -const routes = baseRoutes.concat(userRoutes, spaceRoutes, adminRoutes, uploadRoutes); +const routes = baseRoutes.concat(userRoutes, spaceRoutes, uploadRoutes); const router = new VueRouter({ routes @@ -106,12 +105,6 @@ router.beforeEach((to, from, next) => { } else { router.push({ name: 'Login' }); } - } else if (to.meta.admin) { - if (storage.get('admin')) { - next(); - } else { - router.push({ name: 'AdminLogin' }); - } } else { next(); } diff --git a/src/utils/admin-request.js b/src/utils/admin-request.js deleted file mode 100644 index 15c831fe32927b20abc8d4ab4646a1ec47be4d5d..0000000000000000000000000000000000000000 --- a/src/utils/admin-request.js +++ /dev/null @@ -1,21 +0,0 @@ -import axios from 'axios'; -import config from "../config" -import storage from "@/utils/stored-data.js" - -const AdminURL = config.url + "/api/"; -export const CarouselUrl = AdminURL + "v1/admin/carousel/upload/img" - -const service = axios.create({ - baseURL: AdminURL, - timeout: 5000, - headers: {}, -}); - -service.interceptors.request.use((config) => { - Object.assign(config.headers, { Authorization: `Bearer ${storage.get('admin')}` }); - return config; -}), (error) => { - return Promise.reject(error); -} - -export default service; \ No newline at end of file diff --git a/src/views/VideoList.vue b/src/views/VideoList.vue index dd8b7bab6d76b9a7acca344afc3f559816237d52..e4608db777c5695bd2d8bab8464d8880907d60cb 100644 --- a/src/views/VideoList.vue +++ b/src/views/VideoList.vue @@ -50,19 +50,17 @@ export default { }, methods: { getPartitionList(fid) { - getPartition(fid) - .then((res) => { - if (res.data.code === 2000) { - if (fid === 0) { - this.partitions = res.data.data.partitions; - } else { - this.subpartition = res.data.data.partitions; - } + getPartition(fid).then((res) => { + if (res.data.code === 2000) { + if (fid === 0) { + this.partitions = res.data.data.partitions; + } else { + this.subpartition = res.data.data.partitions; } - }) - .catch((err) => { - this.$message.error(err.response.data.msg); - }); + } + }).catch((err) => { + this.$message.error(err.response.data.msg); + }); }, //设置分区 selectPartition(id) { @@ -93,7 +91,7 @@ export default { this.videoList(); }, videoList() { - getVideoList(this.page, 15, this.pid).then((res) => { + getVideoList(this.page ,15, this.pid).then((res) => { if (res.data.code === 2000) { if (res.data.data.count !== 0) { this.count = res.data.data.count; @@ -112,7 +110,18 @@ export default { this.parent = this.$route.query.parent; this.partition = this.$route.query.partition; this.getPartitionList(0); + if (this.parent != 0) { + this.getPartitionList(this.parent); + if (this.partition == 0) this.pid = this.parent; + else this.pid = this.partition; + } this.videoList(); + // if (this.partition == 0) { + // this.selectPartition(this.parent); + // console.log(111) + // } else { + // this.selectsubartition(this.partition); + // } }, components: { "header-bar": HeaderBar,