Browse Source

删除无用代码

reghao 3 weeks ago
parent
commit
ea4ab83bfe

+ 1 - 88
src/api/account.js

@@ -1,49 +1,10 @@
 import { get, post } from '@/utils/request'
 
 const accountApi = {
-  checkUsernameApi: '/api/user/account/check/username',
-  selectUsernameApi: '/api/user/account/select/username',
-  checkEmailApi: '/api/user/account/check/email',
-  verifyCodeApi: '/api/auth/code/verify',
-  captchaCodeApi: '/api/auth/code/captcha',
   pubkeyApi: '/api/auth/code/pubkey',
-  registerApi: '/api/auth/create',
-  forgotApi: '/api/auth/forgot',
   loginApi: '/api/auth/signin',
   logoutApi: '/api/auth/signout',
-  getRegistryStatusApi: '/api/auth/registry',
-  resetPasswordApi: '/api/account/user/reset',
-  accountMyVipApi: '/api/user/vip/my',
-  accountVipPlanApi: '/api/user/vip/plan',
-  accountVipApi: '/api/user/vip/buy',
-  oauthAppApi: '/api/account/oauth/create',
-  loginRecordApi: '/api/account/record/list',
-  signOutApi: '/api/account/deactivate',
-  updateAvatarApi: '/api/file/avatar/update'
-}
-
-export function isUsernameExist(username) {
-  return get(accountApi.checkUsernameApi + '?username=' + username)
-}
-
-export function selectUsername(username) {
-  return post(accountApi.selectUsernameApi + '/' + username)
-}
-
-export function isEmailExist(email) {
-  return get(accountApi.checkEmailApi + '/' + email)
-}
-
-export function register(userRegistry) {
-  return post(accountApi.registerApi, userRegistry)
-}
-
-export function forgot(userRegistry) {
-  return post(accountApi.forgotApi, userRegistry)
-}
-
-export function resetPassword(resetPasswordData) {
-  return post(accountApi.resetPasswordApi, resetPasswordData)
+  loginRecordApi: '/api/account/record/list'
 }
 
 // 获取公钥
@@ -51,16 +12,6 @@ export function getPubkey(channel) {
   return get(accountApi.pubkeyApi + '?channel=' + channel)
 }
 
-// 获取图形验证码
-export function getCaptchaCode(captchaCodeApi) {
-  return get(accountApi.captchaCodeApi)
-}
-
-// 获取短信验证码
-export function getVerifyCode(verifyCode) {
-  return post(accountApi.verifyCodeApi, verifyCode)
-}
-
 // 登入
 export function login(loginData) {
   return post(accountApi.loginApi, loginData)
@@ -70,41 +21,3 @@ export function login(loginData) {
 export function logout() {
   return get(accountApi.logoutApi)
 }
-
-// 获取注册开放状态
-export function getRegistryStatus() {
-  return get(accountApi.getRegistryStatusApi)
-}
-
-export function updateAvatar(userAvatar) {
-  return post(accountApi.updateAvatarApi, userAvatar)
-}
-
-// VIP
-export function getMyVip() {
-  return get(accountApi.accountMyVipApi)
-}
-
-export function getVipPlans() {
-  return get(accountApi.accountVipPlanApi)
-}
-
-export function vip(data) {
-  return post(accountApi.accountVipApi, data)
-}
-
-export function createApp(data) {
-  return post(accountApi.oauthAppApi, data)
-}
-
-export function getOAuthApps() {
-  return get('/api/account/oauth/list')
-}
-
-export function getLoginRecord() {
-  return get(accountApi.loginRecordApi)
-}
-
-export function signOut(loginId) {
-  return post(accountApi.signOutApi + '/' + loginId)
-}

+ 0 - 87
src/api/admin.js

@@ -1,87 +0,0 @@
-import { get, post } from '@/utils/request'
-
-const adminApi = {
-  getAccountRegistryApi: '/api/admin/account/account_registry',
-  setAccountRegistryApi: '/api/admin/account/registry',
-  setAccountCodeApi: '/api/admin/account/code',
-  getUsersApi: '/api/admin/user/list',
-  getChargeReqApi: '/api/admin/user/charge',
-  approveChargeApi: '/api/admin/user/charge/approve',
-  declineChargeApi: '/api/admin/user/charge/decline',
-  getUserAvatarsApi: '/api/admin/user/user/avatar',
-  getVipPlanApi: '/api/admin/user/vip_plan',
-  fileStoreConfigApi: '/api/admin/file/file_store',
-  getNotifyConfigApi: '/api/admin/message/notify/webhook',
-  getAlbumsApi: '/api/admin/content/video/all',
-  getArticlesApi: '/api/admin/content/video/all',
-  getVideosApi: '/api/admin/content/vod/list',
-  getSiteNoticeApi: '/api/admin/content/vod/site_notice'
-}
-
-export function getAccountRegistry() {
-  return get(adminApi.getAccountRegistryApi)
-}
-
-export function setAccountRegistry(payload) {
-  return post(adminApi.setAccountRegistryApi, payload)
-}
-
-export function setAccountCode(payload) {
-  return post(adminApi.setAccountCodeApi, payload)
-}
-
-export function getUserList(nextId) {
-  return get(adminApi.getUsersApi + '?nextId=' + nextId)
-}
-
-export function getChargeReq(pn) {
-  return get(adminApi.getChargeReqApi + '?pn=' + pn)
-}
-
-export function approveCharge(payload) {
-  return post(adminApi.approveChargeApi + '/' + payload)
-}
-
-export function declineCharge(payload) {
-  return post(adminApi.declineChargeApi + '/' + payload)
-}
-
-export function getUserAvatarList() {
-  return get(adminApi.getUserAvatarsApi)
-}
-
-export function getVideoList(nextId) {
-  return get(adminApi.getVideosApi + '?nextId=' + nextId)
-}
-
-export function getAlbumList(nextId) {
-  return get(adminApi.getAlbumsApi + '?nextId=' + nextId)
-}
-
-export function getArticleList(nextId) {
-  return get(adminApi.getArticlesApi + '?nextId=' + nextId)
-}
-
-export function getFileStoreConfig() {
-  return get(adminApi.fileStoreConfigApi)
-}
-
-export function addFileStoreConfig(payload) {
-  return post(adminApi.fileStoreConfigApi, payload)
-}
-
-export function getNotifyConfig() {
-  return get(adminApi.getNotifyConfigApi)
-}
-
-export function getVipPlan() {
-  return get(adminApi.getVipPlanApi)
-}
-
-export function getSiteNotice() {
-  return get(adminApi.getSiteNoticeApi)
-}
-
-export function updateSiteNotice(payload) {
-  return post(adminApi.getSiteNoticeApi, payload)
-}

+ 0 - 33
src/api/chart.js

@@ -1,33 +0,0 @@
-import { get } from '@/utils/request'
-
-const chartApi = {
-  examCountApi: '/api/content/chart/exam/count',
-  examPassRateApi: '/api/content/chart/exam/rate',
-  lineChartDataApi: '/api/content/chart/exam/linechart',
-  videoWatchApi: '/api/content/chart/video/watch',
-  videoWatchRegionApi: '/api/content/chart/video/region'
-}
-
-// *********************************************************************************************************************
-// 考试数据接口
-export function getExamCount() {
-  return get(chartApi.examCountApi)
-}
-
-export function getExamPassRate() {
-  return get(chartApi.examPassRateApi)
-}
-
-export function getLineChartData() {
-  return get(chartApi.lineChartDataApi)
-}
-
-// *********************************************************************************************************************
-// 用户视频观看数据接口
-export function getUserWatch() {
-  return get(chartApi.videoWatchApi)
-}
-
-export function getUserWatchRegion() {
-  return get(chartApi.videoWatchRegionApi)
-}

+ 0 - 33
src/api/search.js

@@ -1,33 +0,0 @@
-import { get } from '@/utils/request'
-
-const searchApi = {
-  keywordSuggestApi: '/api/search/suggest',
-  videoSearchApi: '/api/search/query',
-  hotSearchApi: '/api/search/hot',
-  wenshuSearchApi: '/api/search1/wenshu/query',
-  wenshuDetailApi: '/api/search1/wenshu/detail'
-}
-
-// 关键词建议
-export function keywordSuggest(keyword) {
-  return get(searchApi.keywordSuggestApi + '?keyword=' + keyword)
-}
-
-// 搜索关键词
-export function videoQuery(keyword, pageNumber) {
-  return get(searchApi.videoSearchApi + '?keyword=' + keyword + '&pageNumber=' + pageNumber)
-}
-
-// 热门搜索关键词列表
-export function hotKeyword() {
-  return get(searchApi.hotSearchApi)
-}
-
-// 搜索裁判文书
-export function wenshuQuery(keyword, pageNumber) {
-  return get(searchApi.wenshuSearchApi + '?keyword=' + keyword + '&pn=' + pageNumber)
-}
-
-export function getWenshuDetail(id, keyword) {
-  return get(searchApi.wenshuDetailApi + '?id=' + id + '&keyword=' + keyword)
-}

+ 0 - 71
src/api/user.js

@@ -1,71 +0,0 @@
-import { get, post } from '@/utils/request'
-
-const userApi = {
-  userInfoApi: '/api/user/info',
-  updateProfileApi: '/api/user/profile/update',
-  discoverUserApi: '/api/user/discover',
-  followUserApi: '/api/user/relation/follow',
-  unfollowUserApi: '/api/user/relation/unfollow',
-  checkRelationApi: '/api/user/relation/check',
-  userFollowerApi: '/api/user/relation/follower',
-  userFollowingApi: '/api/user/relation/following',
-  userContactApi: '/api/user/contact/list',
-  searchUserApi: '/api/user/search',
-  unreadMessageApi: '/api/message/user/unread',
-  unreadMessagesApi: '/api/message/user/unread/list',
-  setReadMessageApi: '/api/message/user/detail'
-}
-
-export function getUserInfo(userId) {
-  return get(userApi.userInfoApi + '?userId=' + userId)
-}
-
-export function updateUserProfile(payload) {
-  return post(userApi.updateProfileApi, payload)
-}
-
-export function getUsers() {
-  return get(userApi.discoverUserApi)
-}
-
-// 关注用户
-export function followUser(followingId) {
-  return post(userApi.followUserApi + '/' + followingId)
-}
-
-// 取消关注用户
-export function unfollowUser(followingId) {
-  return post(userApi.unfollowUserApi + '/' + followingId)
-}
-
-export function checkRelation(userId) {
-  return get(userApi.checkRelationApi + '/' + userId)
-}
-
-export function getUserFollower(userId) {
-  return get(userApi.userFollowerApi + '/' + userId)
-}
-
-export function getUserFollowing(userId) {
-  return get(userApi.userFollowingApi + '/' + userId)
-}
-
-export function getUserContact(pn) {
-  return get(userApi.userContactApi + '?pn=' + pn)
-}
-
-export function searchUser(queryForm) {
-  return get(userApi.searchUserApi, queryForm)
-}
-
-export function getUnreadCount() {
-  return get(userApi.unreadMessageApi)
-}
-
-export function getUnreadMessages(page) {
-  return get(userApi.unreadMessagesApi + '?pageNumber=' + page)
-}
-
-export function getMessageDetail(messageId) {
-  return get(userApi.setReadMessageApi + '/' + messageId)
-}

+ 0 - 174
src/api/video.js

@@ -1,174 +0,0 @@
-import { get, post, delete0 } from '@/utils/request'
-
-const videoApi = {
-  videoPostApi: '/api/content/post/video',
-  videoPostApi1: '/api/content/post/video/publish/post',
-  videoFileApi: '/api/content/post/video/publish/file',
-  updateVideoScopeApi: '/api/content/post/video/update/scope',
-  updateVideoStatusApi: '/api/content/post/video/update/status',
-  updateVideoInfoApi: '/api/content/post/video/update/info',
-  updateVideoCoverApi: '/api/content/post/video/update/cover',
-  updateVideoFileApi: '/api/content/post/video/update/file',
-  videoResourceApi: '/api/content/post/video/resource',
-  convertVideoApi: '/api/content/post/video/convert',
-
-  videoCategoryApi: '/api/content/video/categories',
-  categoryVideoApi: '/api/content/video/category',
-  categoryShortVideoApi: '/api/content/video/short',
-  userVideoPostApi: '/api/content/video/user',
-  tagVideoPostApi: '/api/content/video/tag',
-  videoInfoApi: '/api/content/video/detail',
-  videoUrlApi: '/api/content/video/url',
-
-  videoDownloadApi: '/api/content/video/download',
-  cacheBiliApi: '/api/content/video/cache/bili',
-  shortUrlApi: '/api/content/video/share',
-
-  videoRecommendApi: '/api/content/video/recommend',
-  similarVideoApi: '/api/content/video/similar',
-  bannerVideoApi: '/api/content/video/hot',
-  userContentDataApi: '/api/content/userdata',
-  videoTimelineApi: '/api/content/video/timeline'
-}
-
-// *********************************************************************************************************************
-// 添加视频文件
-export function addVideoFile(payload) {
-  return post(videoApi.videoFileApi, payload)
-}
-
-// 添加视频贴
-export function addVideoPost(video) {
-  return post(videoApi.videoPostApi1, video)
-}
-
-// 更新视频可见范围
-export function updateVideoScope(data) {
-  return post(videoApi.updateVideoScopeApi, data)
-}
-
-// 更新视频状态
-export function updateVideoStatus(data) {
-  return post(videoApi.updateVideoStatusApi, data)
-}
-
-// 更新视频信息
-export function updateVideoInfo(data) {
-  return post(videoApi.updateVideoInfoApi, data)
-}
-
-// 更新视频封面
-export function updateVideoCover(data) {
-  return post(videoApi.updateVideoCoverApi, data)
-}
-
-// 更新视频文件
-export function updateVideoFile(data) {
-  return post(videoApi.updateVideoFileApi, data)
-}
-
-// 删除视频贴
-export function deleteVideoPost(videoId) {
-  return delete0(videoApi.videoPostApi + '/' + videoId)
-}
-
-// 获取视频贴列表
-export function getVideoPosts(page) {
-  return get(videoApi.videoPostApi + '?page=' + page)
-}
-
-// 获取视频贴详情
-export function getVideoPost(videoId) {
-  return get(videoApi.videoPostApi + '/' + videoId)
-}
-
-// 获取视频资源
-export function getVideoResource(videoId) {
-  return get(videoApi.videoResourceApi + '/' + videoId)
-}
-
-// 视频转码
-export function convertVideo(videoId) {
-  return post(videoApi.convertVideoApi + '/' + videoId)
-}
-
-// *********************************************************************************************************************
-// 获取视频分类
-export function videoRegion() {
-  return get(videoApi.videoCategoryApi)
-}
-
-export function videoCategories() {
-  return get(videoApi.videoCategoryApi)
-}
-
-// 获取分类视频
-export function categoryVideos(categoryId, page) {
-  return get(videoApi.categoryVideoApi + '?categoryId=' + categoryId + '&page=' + page)
-}
-
-export function getShortVideo() {
-  return get(videoApi.categoryShortVideoApi)
-}
-
-// 获取用户视频
-export function getUserVideos(userId, page) {
-  return get(videoApi.userVideoPostApi + '?userId=' + userId + '&page=' + page)
-}
-
-// 获取相同标签的视频
-export function getTagVideos(tag, page) {
-  return get(videoApi.tagVideoPostApi + '?tag=' + tag + '&page=' + page)
-}
-
-// 获取视频详情
-export function videoInfo(videoId) {
-  return get(videoApi.videoInfoApi + '/' + videoId)
-}
-
-// 获取视频 URL
-export function videoUrl(videoId) {
-  return get(videoApi.videoUrlApi + '/' + videoId)
-}
-
-// *********************************************************************************************************************
-// 下载视频
-export function downloadVideo(videoId) {
-  return get(videoApi.videoDownloadApi + '/' + videoId)
-}
-
-// 缓存 bili 视频
-export function cacheBiliVideo(bvId) {
-  return post(videoApi.cacheBiliApi + '/' + bvId)
-}
-
-// 获取分享视频的短链接
-export function getShortUrl(videoId) {
-  return post(videoApi.shortUrlApi + '/' + videoId)
-}
-
-// ********************************************************************************************************************
-// 获取推荐视频
-export function videoRecommend(nextId) {
-  return get(videoApi.videoRecommendApi + '?nextId=' + nextId)
-}
-
-// 获取相似视频
-export function similarVideo(videoId) {
-  return get(videoApi.similarVideoApi + '?videoId=' + videoId)
-}
-
-// 获取 banner 视频
-export function getBannerVideo() {
-  return get(videoApi.bannerVideoApi)
-}
-
-// 获取用户内容统计
-export function getUserContentData(userId) {
-  return get(videoApi.userContentDataApi + '?userId=' + userId)
-}
-
-// 用户视频时间线
-export function videoTimeline(nextId) {
-  return get(videoApi.videoTimelineApi + '?nextId=' + nextId)
-}

+ 4 - 205
src/assets/js/mixin.js

@@ -1,7 +1,7 @@
 /**
  * 混入对象,抽取Vue中公共的部分
  */
-import { getPubkey, getCaptchaCode, getVerifyCode, login, logout, register, forgot } from '@/api/account'
+import { getPubkey, login, logout } from '@/api/account'
 import { setUserToken, removeAll } from '@/utils/auth'
 import { JSEncrypt } from 'jsencrypt'
 import Vue from 'vue'
@@ -12,48 +12,11 @@ export const userMixin = {
     return {
       pubkey: '',
       pubkeyR: '',
-      captchaCode: '',
       userLogin: {
         principal: null,
-        credential: null,
-        captchaCode: null,
-        loginType: 2,
-        plat: 2
+        credential: null
       },
-      userRegistry: {
-        principal: null,
-        verifyCode: null,
-        credential: null,
-        captchaCode: null,
-        plat: 2
-      },
-      verifyCodeForm: {
-        principal: null,
-        channel: 2
-      },
-      userForgot: {
-        principal: null,
-        verifyCode: null,
-        newCredential: null,
-        captchaCode: null
-      },
-      loginDialog: false,
-      registerDialog: false,
-      dialogVisible: false,
-      dialogVisible2: false,
-      nickname: '', // 用户昵称
-      phone: '', // 电话
-      mobile: '', // 电话
-      username: '', // 电话
-      password: '', // 用户密码
-      repassword: '', // 确认密码
-      avatarurl: '', // 用户头像路径
-      rcode: '', // 注册验证码
-      isLoading: false, // 登入加载效果
-      user: this.$user, // 登入用户对象
-      code: '获取验证码',
-      isBtn: false,
-      imageUrl: require('assets/img/avatar.png')
+      isLoading: false
     }
   },
   methods: {
@@ -62,8 +25,6 @@ export const userMixin = {
         if (resp.code === 0) {
           this.pubkey = resp.data.pubkey
           this.pubkeyR = resp.data.r
-
-          this.getCaptcha()
         } else {
           this.message = resp.msg
           this.showMessage = true
@@ -73,91 +34,11 @@ export const userMixin = {
         this.showMessage = true
       })
     },
-    getCaptcha() {
-      getCaptchaCode().then(resp => {
-        if (resp.code === 0) {
-          this.captchaCode = resp.data
-          this.dialogVisible = true
-        } else {
-          this.message = '获取图形验证码失败, 请重新刷新页面'
-          this.showMessage = true
-        }
-      })
-    },
     encryptPassword(password, pubkey, pubkeyR) {
       var encryptor = new JSEncrypt()
       encryptor.setPublicKey(pubkey)
       return encryptor.encrypt(pubkeyR + password)
     },
-    registerVerifyCode() {
-      if (this.userRegistry.principal === null || this.userRegistry.principal === '') {
-        this.$message.success('请填写邮箱或手机号')
-        return
-      }
-
-      this.verifyCodeForm.channel = 1
-      this.verifyCodeForm.receiver = this.userRegistry.principal
-      this.getVerifyCodeWrapper(this.verifyCodeForm)
-    },
-    loginVerifyCode() {
-      if (this.userLogin.principal === null || this.userLogin.principal === '') {
-        this.$message.success('请填写邮箱或手机号')
-        return
-      }
-
-      this.verifyCodeForm.channel = 2
-      this.verifyCodeForm.receiver = this.userLogin.principal
-      this.getVerifyCodeWrapper(this.verifyCodeForm)
-    },
-    forgotVerifyCode() {
-      if (this.userForgot.principal === null || this.userForgot.principal === '') {
-        this.$message.success('请填写邮箱或手机号')
-        return
-      }
-
-      this.verifyCodeForm.channel = 3
-      this.verifyCodeForm.receiver = this.userRegistry.principal
-      this.getVerifyCodeWrapper(this.verifyCodeForm)
-    },
-    getVerifyCodeWrapper(verifyCodeForm) {
-      this.isBtn = true
-      let time = 60
-      const timeout = setInterval(() => {
-        if (time !== 0) {
-          time--
-          this.code = time + 's后重新获取'
-        } else {
-          this.isBtn = false
-          this.code = '重新获取验证码'
-          clearTimeout(timeout)
-        }
-      }, 1000)
-      getVerifyCode(verifyCodeForm).then(resp => {
-        if (resp.code === 0) {
-          this.$message.success('验证码已发送, 请注意查收')
-        } else {
-          this.$message.warning(resp.msg)
-        }
-      }).catch(error => {
-        this.$message.error(error.message)
-      })
-    },
-    // 昵称校验
-    nickNameBlur() {
-      if (this.nickname.length <= 0) {
-        this.$message.warning('昵称不能为空')
-      }
-    },
-    // 电话校验
-    phoneBlur() {
-      if (!(/^1[3456789]\d{9}$/.test(this.mobile))) {
-        this.$message.warning('电话号码格式有误')
-      }
-    },
-    loginByVerifyCode() {
-      this.userLogin.loginType = 1
-      this.loginBtn()
-    },
     loginBtn() {
       if (this.userLogin.principal === '' || this.userLogin.principal === null) {
         this.$message.warning('帐号不能为空')
@@ -189,10 +70,7 @@ export const userMixin = {
           // this.$router.go(-2)
           this.userLogin = {
             principal: null,
-            credential: null,
-            captchaCode: null,
-            loginType: 2,
-            plat: 1
+            credential: null
           }
         } else {
           // 登入失败
@@ -206,85 +84,6 @@ export const userMixin = {
         this.isLoading = false
       })
     },
-    registerBtn() {
-      if (this.userRegistry.principal === '' || this.userRegistry.principal === null) {
-        this.$message.warning('手机号不能为空')
-        return
-      }
-      if (this.userRegistry.credential === '' || this.userRegistry.credential === null) {
-        this.$message.warning('密码不能为空')
-        return
-      }
-      if (this.userRegistry.verifyCode === '' || this.userRegistry.verifyCode === null) {
-        this.$message.warning('短信验证码不能为空')
-        return
-      }
-      if (this.userRegistry.captchaCode === '' || this.userRegistry.captchaCode === null) {
-        this.$message.warning('图形验证码不能为空')
-        return
-      }
-
-      this.userRegistry.credential = this.encryptPassword(this.userRegistry.credential, this.pubkey, this.pubkeyR)
-      // 显示加载效果
-      this.isLoading = true
-      register(this.userRegistry).then(resp => {
-        if (resp.code === 0) {
-          // 关闭弹窗并刷新页面
-          this.dialogVisible = false
-          this.$message.info('帐号已注册, 稍后会转到登入页面')
-          setInterval(() => {
-            this.$router.push('/login')
-          }, 3000)
-        } else {
-          this.$message.warning(resp.msg)
-        }
-      }).catch(error => {
-        this.$message.error(error.message)
-      }).finally(() => {
-        this.isLoading = false
-      })
-    },
-    forgotBtn() {
-      if (this.userForgot.principal === '' || this.userForgot.principal === null) {
-        this.$message.warning('手机号不能为空')
-        return
-      }
-      if (this.userForgot.newCredential === '' || this.userForgot.newCredential === null) {
-        this.$message.warning('密码不能为空')
-        return
-      }
-      if (this.userForgot.verifyCode === '' || this.userForgot.verifyCode === null) {
-        this.$message.warning('短信验证码不能为空')
-        return
-      }
-      if (this.userForgot.captchaCode === '' || this.userForgot.captchaCode === null) {
-        this.$message.warning('图形验证码不能为空')
-        return
-      }
-
-      this.userForgot.newCredential = this.encryptPassword(this.userForgot.newCredential, this.pubkey, this.pubkeyR)
-      // 显示加载效果
-      this.isLoading = true
-      forgot(this.userForgot).then(resp => {
-        if (resp.code === 0) {
-          // 关闭弹窗并刷新页面
-          this.dialogVisible = false
-          this.$message.info('密码已重置, 请返回登入页面登入帐号')
-        } else {
-          this.$message.warning(resp.msg)
-        }
-      }).catch(error => {
-        this.$message.error(error.message)
-      }).finally(() => {
-        this.isLoading = false
-        this.userForgot = {
-          principal: null,
-          verifyCode: null,
-          newCredential: null,
-          captchaCode: null
-        }
-      })
-    },
     goToHome() {
       this.$router.push('/')
     },

+ 0 - 245
src/views/devops/file/FileList.vue

@@ -1,245 +0,0 @@
-<template>
-  <el-container>
-    <el-header height="220">
-      <h3>我的文件</h3>
-    </el-header>
-    <el-main>
-      <el-table
-        :data="dataList"
-        border
-        height="480"
-        style="width: 100%"
-      >
-        <el-table-column
-          fixed="left"
-          label="No"
-          type="index"
-        />
-        <el-table-column
-          prop="pubDate"
-          label="文件名"
-          width="150"
-        />
-        <el-table-column
-          prop="videoId"
-          label="修改时间"
-          width="120"
-        >
-          <template slot-scope="scope">
-            <router-link target="_blank" :to="`/vod/video/${scope.row.videoId}`">
-              <span>{{ scope.row.videoId }}</span>
-            </router-link>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="description"
-          label="大小"
-          :show-overflow-tooltip="true"
-        >
-          <template slot-scope="scope">
-            <el-tooltip
-              v-if="scope.row.description"
-              :content="scope.row.description"
-              raw-content
-              placement="top-start"
-            >
-              <span v-if="scope.row.description && scope.row.description.length <= 15">
-                {{ scope.row.description }}
-              </span>
-              <span v-if="scope.row.description && scope.row.description.length > 15">
-                {{ scope.row.description.substr(0, 15) + "..." }}
-              </span>
-            </el-tooltip>
-            <span v-else-if="scope.row.description === null">-</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="duration"
-          label="文件类型"
-        />
-        <el-table-column
-          fixed="right"
-          label="操作"
-          width="280"
-        >
-          <template slot-scope="scope">
-            <el-button
-              size="mini"
-              @click="handlePreview(scope.$index, scope.row)"
-            >预览</el-button>
-            <el-button
-              size="mini"
-              @click="handleEdit(scope.$index, scope.row)"
-            >编辑</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-pagination
-        background
-        :small="screenWidth <= 768"
-        layout="prev, pager, next"
-        :page-size="pageSize"
-        :current-page="currentPage"
-        :total="totalSize"
-        @current-change="handleCurrentChange"
-        @prev-click="handleCurrentChange"
-        @next-click="handleCurrentChange"
-      />
-    </el-main>
-
-    <!-- 修改视频可见范围对话框 -->
-    <el-dialog
-      append-to-body
-      :visible.sync="showEditScopeDialog"
-      width="30%"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <span>修改视频可见范围</span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
-        </div>
-        <div class="text item">
-          <el-select v-model="form.scope" placeholder="选择可见范围">
-            <el-option label="本人可见" value="1" />
-            <el-option label="所有人可见" value="2" />
-            <el-option label="VIP 可见" value="3" />
-          </el-select>
-        </div>
-      </el-card>
-    </el-dialog>
-    <!-- 视频预览对话框 -->
-    <el-dialog
-      title="预览视频"
-      append-to-body
-      :visible.sync="showPreviewDialog"
-      :before-close="handleDialogClose"
-      width="70%"
-      center
-    >
-      <template>
-        <video-preview-player :video-prop.sync="videoProp" />
-      </template>
-    </el-dialog>
-  </el-container>
-</template>
-
-<script>
-import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
-import { updateVideoScope, videoInfo } from '@/api/video'
-import { getVideoList } from '@/api/admin'
-
-export default {
-  name: 'VideoPost',
-  components: { VideoPreviewPlayer },
-  data() {
-    return {
-      queryInfo: {
-        scope: null,
-        pn: 1
-      },
-      // 屏幕宽度, 为了控制分页条的大小
-      screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      pageSize: 10,
-      totalSize: 0,
-      dataList: [],
-      nextId: 0,
-      // **********************************************************************
-      videoProp: null,
-      showVideoResourceDialog: false,
-      showEditScopeDialog: false,
-      showPreviewDialog: false,
-      form: {
-        videoId: null,
-        scope: 1
-      },
-      videoResources: [],
-      publishVideoDiaglog: false
-    }
-  },
-  created() {
-    document.title = 'AdminVideoList'
-    this.getData()
-  },
-  methods: {
-    handleCurrentChange(pageNumber) {
-      this.currentPage = pageNumber
-      this.getData()
-      // 回到顶部
-      scrollTo(0, 0)
-    },
-    getData() {
-      this.dataList = []
-      getVideoList(0).then(resp => {
-        if (resp.code === 0) {
-          const respData = resp.data
-          this.dataList = respData.list
-          this.totalSize = respData.totalSize
-        } else {
-          this.$message.error(resp.msg)
-        }
-      })
-    },
-    onRefresh() {
-      this.getData()
-    },
-    handleScope(index, row) {
-      this.form.videoId = row.videoId
-      this.form.scope = '' + row.scope
-      this.showEditScopeDialog = true
-    },
-    handleDialogClose(done) {
-      this.showPreviewDialog = false
-      this.videoProp = {
-        videoId: null,
-        play: false
-      }
-      done()
-    },
-    handlePreview(index, row) {
-      videoInfo(row.videoId).then(res => {
-        if (res.code === 0) {
-          this.showPreviewDialog = true
-          this.videoProp = {
-            videoId: res.data.videoId,
-            play: true
-          }
-        }
-      })
-    },
-    handleEdit(index, row) {
-      const path = '/post/video/edit/' + row.videoId
-      this.$router.push(path)
-    },
-    onUpdateScope() {
-      this.showEditScopeDialog = false
-      updateVideoScope(this.form).then(res => {
-        if (res.code === 0) {
-          this.$notify({
-            title: '提示',
-            message: '视频可见范围已更新',
-            type: 'warning',
-            duration: 3000
-          })
-        }
-      }).catch(error => {
-        this.$notify({
-          title: '提示',
-          message: error.message,
-          type: 'warning',
-          duration: 3000
-        })
-      })
-    },
-    onSelectChange() {
-      this.$message.info(this.queryInfo)
-    },
-    handleClose() {
-    }
-  }
-}
-</script>
-
-<style>
-</style>

+ 0 - 164
src/views/devops/file/ImageFile.vue

@@ -1,164 +0,0 @@
-<template>
-  <el-container>
-    <el-header height="220">
-      <h3>图片列表</h3>
-    </el-header>
-    <el-main>
-    </el-main>
-
-    <!-- 修改视频可见范围对话框 -->
-    <el-dialog
-      append-to-body
-      :visible.sync="showEditScopeDialog"
-      width="30%"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <span>修改视频可见范围</span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
-        </div>
-        <div class="text item">
-          <el-select v-model="form.scope" placeholder="选择可见范围">
-            <el-option label="本人可见" value="1" />
-            <el-option label="所有人可见" value="2" />
-            <el-option label="VIP 可见" value="3" />
-          </el-select>
-        </div>
-      </el-card>
-    </el-dialog>
-    <!-- 视频预览对话框 -->
-    <el-dialog
-      title="预览视频"
-      append-to-body
-      :visible.sync="showPreviewDialog"
-      :before-close="handleDialogClose"
-      width="70%"
-      center
-    >
-      <template>
-        <video-preview-player :video-prop.sync="videoProp" />
-      </template>
-    </el-dialog>
-  </el-container>
-</template>
-
-<script>
-import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
-import { updateVideoScope, videoInfo } from '@/api/video'
-import { getVideoList } from '@/api/admin'
-
-export default {
-  name: 'VideoPost',
-  components: { VideoPreviewPlayer },
-  data() {
-    return {
-      queryInfo: {
-        scope: null,
-        pn: 1
-      },
-      // 屏幕宽度, 为了控制分页条的大小
-      screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      pageSize: 10,
-      totalSize: 0,
-      dataList: [],
-      nextId: 0,
-      // **********************************************************************
-      videoProp: null,
-      showVideoResourceDialog: false,
-      showEditScopeDialog: false,
-      showPreviewDialog: false,
-      form: {
-        videoId: null,
-        scope: 1
-      },
-      videoResources: [],
-      publishVideoDiaglog: false
-    }
-  },
-  created() {
-    document.title = 'AdminVideoList'
-    this.getData()
-  },
-  methods: {
-    handleCurrentChange(pageNumber) {
-      this.currentPage = pageNumber
-      this.getData()
-      // 回到顶部
-      scrollTo(0, 0)
-    },
-    getData() {
-      this.dataList = []
-      getVideoList(0).then(resp => {
-        if (resp.code === 0) {
-          const respData = resp.data
-          this.dataList = respData.list
-          this.totalSize = respData.totalSize
-        } else {
-          this.$message.error(resp.msg)
-        }
-      })
-    },
-    onRefresh() {
-      this.getData()
-    },
-    handleScope(index, row) {
-      this.form.videoId = row.videoId
-      this.form.scope = '' + row.scope
-      this.showEditScopeDialog = true
-    },
-    handleDialogClose(done) {
-      this.showPreviewDialog = false
-      this.videoProp = {
-        videoId: null,
-        play: false
-      }
-      done()
-    },
-    handlePreview(index, row) {
-      videoInfo(row.videoId).then(res => {
-        if (res.code === 0) {
-          this.showPreviewDialog = true
-          this.videoProp = {
-            videoId: res.data.videoId,
-            play: true
-          }
-        }
-      })
-    },
-    handleEdit(index, row) {
-      const path = '/post/video/edit/' + row.videoId
-      this.$router.push(path)
-    },
-    onUpdateScope() {
-      this.showEditScopeDialog = false
-      updateVideoScope(this.form).then(res => {
-        if (res.code === 0) {
-          this.$notify({
-            title: '提示',
-            message: '视频可见范围已更新',
-            type: 'warning',
-            duration: 3000
-          })
-        }
-      }).catch(error => {
-        this.$notify({
-          title: '提示',
-          message: error.message,
-          type: 'warning',
-          duration: 3000
-        })
-      })
-    },
-    onSelectChange() {
-      this.$message.info(this.queryInfo)
-    },
-    handleClose() {
-    }
-  }
-}
-</script>
-
-<style>
-</style>

+ 4 - 145
src/views/devops/sys/AccessLog.vue

@@ -1,161 +1,20 @@
 <template>
-  <el-container>
-    <el-header height="220">
-      <h3>访问日志</h3>
-    </el-header>
-    <el-main>
-    </el-main>
-
-    <!-- 修改视频可见范围对话框 -->
-    <el-dialog
-      append-to-body
-      :visible.sync="showEditScopeDialog"
-      width="30%"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <span>修改视频可见范围</span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
-        </div>
-        <div class="text item">
-          <el-select v-model="form.scope" placeholder="选择可见范围">
-            <el-option label="本人可见" value="1" />
-            <el-option label="所有人可见" value="2" />
-            <el-option label="VIP 可见" value="3" />
-          </el-select>
-        </div>
-      </el-card>
-    </el-dialog>
-    <!-- 视频预览对话框 -->
-    <el-dialog
-      title="预览视频"
-      append-to-body
-      :visible.sync="showPreviewDialog"
-      :before-close="handleDialogClose"
-      width="70%"
-      center
-    >
-      <template>
-        <video-preview-player :video-prop.sync="videoProp" />
-      </template>
-    </el-dialog>
-  </el-container>
+  <div>
+    demo
+  </div>
 </template>
 
 <script>
-import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
-import { updateVideoScope, videoInfo } from '@/api/video'
-import { getVideoList } from '@/api/admin'
 
 export default {
-  name: 'VideoPost',
-  components: { VideoPreviewPlayer },
+  name: 'Demo',
   data() {
     return {
-      queryInfo: {
-        scope: null,
-        pn: 1
-      },
-      // 屏幕宽度, 为了控制分页条的大小
-      screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      pageSize: 10,
-      totalSize: 0,
-      dataList: [],
-      nextId: 0,
-      // **********************************************************************
-      videoProp: null,
-      showVideoResourceDialog: false,
-      showEditScopeDialog: false,
-      showPreviewDialog: false,
-      form: {
-        videoId: null,
-        scope: 1
-      },
-      videoResources: [],
-      publishVideoDiaglog: false
     }
   },
   created() {
-    document.title = 'AdminVideoList'
-    this.getData()
   },
   methods: {
-    handleCurrentChange(pageNumber) {
-      this.currentPage = pageNumber
-      this.getData()
-      // 回到顶部
-      scrollTo(0, 0)
-    },
-    getData() {
-      this.dataList = []
-      getVideoList(0).then(resp => {
-        if (resp.code === 0) {
-          const respData = resp.data
-          this.dataList = respData.list
-          this.totalSize = respData.totalSize
-        } else {
-          this.$message.error(resp.msg)
-        }
-      })
-    },
-    onRefresh() {
-      this.getData()
-    },
-    handleScope(index, row) {
-      this.form.videoId = row.videoId
-      this.form.scope = '' + row.scope
-      this.showEditScopeDialog = true
-    },
-    handleDialogClose(done) {
-      this.showPreviewDialog = false
-      this.videoProp = {
-        videoId: null,
-        play: false
-      }
-      done()
-    },
-    handlePreview(index, row) {
-      videoInfo(row.videoId).then(res => {
-        if (res.code === 0) {
-          this.showPreviewDialog = true
-          this.videoProp = {
-            videoId: res.data.videoId,
-            play: true
-          }
-        }
-      })
-    },
-    handleEdit(index, row) {
-      const path = '/post/video/edit/' + row.videoId
-      this.$router.push(path)
-    },
-    onUpdateScope() {
-      this.showEditScopeDialog = false
-      updateVideoScope(this.form).then(res => {
-        if (res.code === 0) {
-          this.$notify({
-            title: '提示',
-            message: '视频可见范围已更新',
-            type: 'warning',
-            duration: 3000
-          })
-        }
-      }).catch(error => {
-        this.$notify({
-          title: '提示',
-          message: error.message,
-          type: 'warning',
-          duration: 3000
-        })
-      })
-    },
-    onSelectChange() {
-      this.$message.info(this.queryInfo)
-    },
-    handleClose() {
-    }
   }
 }
 </script>

+ 4 - 145
src/views/devops/sys/RealtimeLog.vue

@@ -1,161 +1,20 @@
 <template>
-  <el-container>
-    <el-header height="220">
-      <h3>实时日志</h3>
-    </el-header>
-    <el-main>
-    </el-main>
-
-    <!-- 修改视频可见范围对话框 -->
-    <el-dialog
-      append-to-body
-      :visible.sync="showEditScopeDialog"
-      width="30%"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <span>修改视频可见范围</span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
-        </div>
-        <div class="text item">
-          <el-select v-model="form.scope" placeholder="选择可见范围">
-            <el-option label="本人可见" value="1" />
-            <el-option label="所有人可见" value="2" />
-            <el-option label="VIP 可见" value="3" />
-          </el-select>
-        </div>
-      </el-card>
-    </el-dialog>
-    <!-- 视频预览对话框 -->
-    <el-dialog
-      title="预览视频"
-      append-to-body
-      :visible.sync="showPreviewDialog"
-      :before-close="handleDialogClose"
-      width="70%"
-      center
-    >
-      <template>
-        <video-preview-player :video-prop.sync="videoProp" />
-      </template>
-    </el-dialog>
-  </el-container>
+  <div>
+    demo
+  </div>
 </template>
 
 <script>
-import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
-import { updateVideoScope, videoInfo } from '@/api/video'
-import { getVideoList } from '@/api/admin'
 
 export default {
-  name: 'VideoPost',
-  components: { VideoPreviewPlayer },
+  name: 'Demo',
   data() {
     return {
-      queryInfo: {
-        scope: null,
-        pn: 1
-      },
-      // 屏幕宽度, 为了控制分页条的大小
-      screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      pageSize: 10,
-      totalSize: 0,
-      dataList: [],
-      nextId: 0,
-      // **********************************************************************
-      videoProp: null,
-      showVideoResourceDialog: false,
-      showEditScopeDialog: false,
-      showPreviewDialog: false,
-      form: {
-        videoId: null,
-        scope: 1
-      },
-      videoResources: [],
-      publishVideoDiaglog: false
     }
   },
   created() {
-    document.title = 'AdminVideoList'
-    this.getData()
   },
   methods: {
-    handleCurrentChange(pageNumber) {
-      this.currentPage = pageNumber
-      this.getData()
-      // 回到顶部
-      scrollTo(0, 0)
-    },
-    getData() {
-      this.dataList = []
-      getVideoList(0).then(resp => {
-        if (resp.code === 0) {
-          const respData = resp.data
-          this.dataList = respData.list
-          this.totalSize = respData.totalSize
-        } else {
-          this.$message.error(resp.msg)
-        }
-      })
-    },
-    onRefresh() {
-      this.getData()
-    },
-    handleScope(index, row) {
-      this.form.videoId = row.videoId
-      this.form.scope = '' + row.scope
-      this.showEditScopeDialog = true
-    },
-    handleDialogClose(done) {
-      this.showPreviewDialog = false
-      this.videoProp = {
-        videoId: null,
-        play: false
-      }
-      done()
-    },
-    handlePreview(index, row) {
-      videoInfo(row.videoId).then(res => {
-        if (res.code === 0) {
-          this.showPreviewDialog = true
-          this.videoProp = {
-            videoId: res.data.videoId,
-            play: true
-          }
-        }
-      })
-    },
-    handleEdit(index, row) {
-      const path = '/post/video/edit/' + row.videoId
-      this.$router.push(path)
-    },
-    onUpdateScope() {
-      this.showEditScopeDialog = false
-      updateVideoScope(this.form).then(res => {
-        if (res.code === 0) {
-          this.$notify({
-            title: '提示',
-            message: '视频可见范围已更新',
-            type: 'warning',
-            duration: 3000
-          })
-        }
-      }).catch(error => {
-        this.$notify({
-          title: '提示',
-          message: error.message,
-          type: 'warning',
-          duration: 3000
-        })
-      })
-    },
-    onSelectChange() {
-      this.$message.info(this.queryInfo)
-    },
-    handleClose() {
-    }
   }
 }
 </script>

+ 4 - 145
src/views/devops/sys/RuntimeLog.vue

@@ -1,161 +1,20 @@
 <template>
-  <el-container>
-    <el-header height="220">
-      <h3>运行访问日志</h3>
-    </el-header>
-    <el-main>
-    </el-main>
-
-    <!-- 修改视频可见范围对话框 -->
-    <el-dialog
-      append-to-body
-      :visible.sync="showEditScopeDialog"
-      width="30%"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <span>修改视频可见范围</span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateScope">更新</el-button>
-        </div>
-        <div class="text item">
-          <el-select v-model="form.scope" placeholder="选择可见范围">
-            <el-option label="本人可见" value="1" />
-            <el-option label="所有人可见" value="2" />
-            <el-option label="VIP 可见" value="3" />
-          </el-select>
-        </div>
-      </el-card>
-    </el-dialog>
-    <!-- 视频预览对话框 -->
-    <el-dialog
-      title="预览视频"
-      append-to-body
-      :visible.sync="showPreviewDialog"
-      :before-close="handleDialogClose"
-      width="70%"
-      center
-    >
-      <template>
-        <video-preview-player :video-prop.sync="videoProp" />
-      </template>
-    </el-dialog>
-  </el-container>
+  <div>
+    demo
+  </div>
 </template>
 
 <script>
-import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
-import { updateVideoScope, videoInfo } from '@/api/video'
-import { getVideoList } from '@/api/admin'
 
 export default {
-  name: 'VideoPost',
-  components: { VideoPreviewPlayer },
+  name: 'Demo',
   data() {
     return {
-      queryInfo: {
-        scope: null,
-        pn: 1
-      },
-      // 屏幕宽度, 为了控制分页条的大小
-      screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      pageSize: 10,
-      totalSize: 0,
-      dataList: [],
-      nextId: 0,
-      // **********************************************************************
-      videoProp: null,
-      showVideoResourceDialog: false,
-      showEditScopeDialog: false,
-      showPreviewDialog: false,
-      form: {
-        videoId: null,
-        scope: 1
-      },
-      videoResources: [],
-      publishVideoDiaglog: false
     }
   },
   created() {
-    document.title = 'AdminVideoList'
-    this.getData()
   },
   methods: {
-    handleCurrentChange(pageNumber) {
-      this.currentPage = pageNumber
-      this.getData()
-      // 回到顶部
-      scrollTo(0, 0)
-    },
-    getData() {
-      this.dataList = []
-      getVideoList(0).then(resp => {
-        if (resp.code === 0) {
-          const respData = resp.data
-          this.dataList = respData.list
-          this.totalSize = respData.totalSize
-        } else {
-          this.$message.error(resp.msg)
-        }
-      })
-    },
-    onRefresh() {
-      this.getData()
-    },
-    handleScope(index, row) {
-      this.form.videoId = row.videoId
-      this.form.scope = '' + row.scope
-      this.showEditScopeDialog = true
-    },
-    handleDialogClose(done) {
-      this.showPreviewDialog = false
-      this.videoProp = {
-        videoId: null,
-        play: false
-      }
-      done()
-    },
-    handlePreview(index, row) {
-      videoInfo(row.videoId).then(res => {
-        if (res.code === 0) {
-          this.showPreviewDialog = true
-          this.videoProp = {
-            videoId: res.data.videoId,
-            play: true
-          }
-        }
-      })
-    },
-    handleEdit(index, row) {
-      const path = '/post/video/edit/' + row.videoId
-      this.$router.push(path)
-    },
-    onUpdateScope() {
-      this.showEditScopeDialog = false
-      updateVideoScope(this.form).then(res => {
-        if (res.code === 0) {
-          this.$notify({
-            title: '提示',
-            message: '视频可见范围已更新',
-            type: 'warning',
-            duration: 3000
-          })
-        }
-      }).catch(error => {
-        this.$notify({
-          title: '提示',
-          message: error.message,
-          type: 'warning',
-          duration: 3000
-        })
-      })
-    },
-    onSelectChange() {
-      this.$message.info(this.queryInfo)
-    },
-    handleClose() {
-    }
   }
 }
 </script>