瀏覽代碼

更新网盘相关页面

reghao 2 年之前
父節點
當前提交
5f3ff8c9b5

+ 2 - 1
.env.development

@@ -1,7 +1,8 @@
 VUE_APP_SERVER_URL=//api.reghao.cn
 VUE_APP_OSS_URL=//oss.reghao.cn/
-VUE_APP_UPLOAD_VIDEO_CHANNEL=104
+VUE_APP_UPLOAD_VIDEO_CHANNEL=108
 VUE_APP_UPLOAD_COVER_CHANNEL=105
 VUE_APP_UPLOAD_AUDIO_CHANNEL=106
 VUE_APP_UPLOAD_AVATAR_CHANNEL=107
 VUE_APP_UPLOAD_PHOTO_CHANNEL=106
+VUE_APP_UPLOAD_FILE_CHANNEL=103

+ 0 - 1
.env.production

@@ -1,5 +1,4 @@
 VUE_APP_SERVER_URL=//api.reghao.cn
-VUE_APP_OSS_URL=//oss.reghao.cn/
 VUE_APP_UPLOAD_VIDEO_CHANNEL=104
 VUE_APP_UPLOAD_COVER_CHANNEL=105
 VUE_APP_UPLOAD_AUDIO_CHANNEL=106

+ 28 - 31
src/components/upload/EditVideo.vue

@@ -21,7 +21,7 @@
               <el-tooltip class="item" effect="dark" content="点击上传图片" placement="top-end">
                 <el-upload
                   class="avatar-uploader"
-                  :action="actionUrl"
+                  :action="imgOssUrl"
                   :headers="imgHeaders"
                   :data="imgData"
                   :with-credentials="true"
@@ -100,31 +100,17 @@ export default {
   name: 'EditVideo',
   data() {
     return {
-      actionUrl: process.env.VUE_APP_OSS_URL,
       // ****************************************************************************************************************
-      options: {
-        target: process.env.VUE_APP_OSS_URL,
-        chunkSize: 1024 * 1024 * 1024 * 5, // 5GiB
-        fileParameterName: 'file',
-        testChunks: false,
-        query: (file, chunk) => {
-          return {
-            channelId: 2
-          }
-        },
-        headers: {
-          Authorization: ''
-        },
-        withCredentials: true
-      },
+      options: null,
       attrs: {
         accept: 'video/*'
       },
+      imgOssUrl: null,
       imgHeaders: {
         Authorization: ''
       },
       imgData: {
-        channelId: 5
+        channelId: process.env.VUE_APP_UPLOAD_COVER_CHANNEL
       },
       // ****************************************************************************************************************
       coverUrl: null,
@@ -170,12 +156,24 @@ export default {
       })
     })
 
-    getServerInfo(2).then(res => {
+    getServerInfo(process.env.VUE_APP_UPLOAD_VIDEO_CHANNEL).then(res => {
       if (res.code === 0) {
         const resData = res.data
-        this.options.target = resData.ossUrl
-        this.options.chunkSize = resData.maxSize
-        this.options.headers.Authorization = 'Bearer ' + resData.token
+        this.options = {
+          target: resData.ossUrl,
+          chunkSize: resData.maxSize,
+          fileParameterName: 'file',
+          testChunks: false,
+          query: (file, chunk) => {
+            return {
+              channelId: this.form.channelId
+            }
+          },
+          headers: {
+            Authorization: 'Bearer ' + resData.token
+          },
+          withCredentials: false
+        }
       } else {
         this.$notify({
           title: '提示',
@@ -193,9 +191,10 @@ export default {
       })
     })
 
-    getServerInfo(5).then(res => {
+    getServerInfo(this.imgData.channelId).then(res => {
       if (res.code === 0) {
         const resData = res.data
+        this.imgOssUrl = resData.ossUrl
         this.imgHeaders.Authorization = 'Bearer ' + resData.token
       } else {
         this.$notify({
@@ -249,14 +248,12 @@ export default {
       }
     },
     onFileError(rootFile, file, response, chunk) {
-      this.$notify(
-        {
-          title: '提示',
-          message: '文件上传错误',
-          type: 'warning',
-          duration: 3000
-        }
-      )
+      this.$notify({
+        title: '提示',
+        message: '文件上传错误',
+        type: 'warning',
+        duration: 3000
+      })
     },
     // ****************************************************************************************************************
     beforeAvatarUpload(file) {

+ 6 - 1
src/components/upload/PublishAudio.vue

@@ -146,7 +146,12 @@ export default {
       }
     },
     onFileError(rootFile, file, response, chunk) {
-      console.log('文件上传错误')
+      this.$notify({
+        title: '提示',
+        message: '文件上传错误',
+        type: 'warning',
+        duration: 3000
+      })
     },
     // ****************************************************************************************************************
     setTitle(title) {

+ 1 - 3
src/components/upload/PublishFile.vue

@@ -202,11 +202,9 @@ export default {
       }
     },
     onFileError(rootFile, file, response, chunk) {
-      const res = JSON.parse(response)
-      console.log(res.msg)
       this.$notify({
         title: '提示',
-        message: '视频文件上传错误',
+        message: '文件上传错误',
         type: 'warning',
         duration: 3000
       })

+ 3 - 2
src/components/upload/PublishVideo.vue

@@ -185,7 +185,7 @@ export default {
       } else {
         this.$notify({
           title: '提示',
-          message: '获取 OSS 服务器地址失败, 暂时无法上传文件',
+          message: '获取 OSS 服务器地址失败, 暂时无法上传视频文件',
           type: 'error',
           duration: 3000
         })
@@ -263,7 +263,8 @@ export default {
       }
     },
     onFileError(rootFile, file, response, chunk) {
-      const res = JSON.parse(response)
+      console.log(response)
+      // const res = JSON.parse(response)
       this.$notify({
         title: '提示',
         message: '视频文件上传错误',

+ 17 - 3
src/router/index.js

@@ -71,15 +71,23 @@ const PostEditArticle = () => import('components/upload/EditArticle')
 
 // ********************************************************************************************************************
 // 后台主页
+// ********************************************************************************************************************
 const Admin = () => import('views/admin/Admin')
 const SiteConfig = () => import('views/admin/SiteConfig')
 const UserList = () => import('views/admin/UserList')
 const PostList = () => import('views/admin/PostList')
 const DataSource = () => import('views/admin/DataSource')
 
+// ********************************************************************************************************************
+// 网盘主页
+// ********************************************************************************************************************
 const Disk = () => import('views/disk/Disk')
 const FileList = () => import('views/disk/FileList')
 const UploadFile = () => import('views/disk/UploadFile')
+const Share = () => import('views/disk/Share')
+const FileImage = () => import('views/disk/FileImage')
+const FileVideo = () => import('views/disk/FileVideo')
+const FileAudio = () => import('views/disk/FileAudio')
 
 // ********************************************************************************************************************
 // 使用安装路由插件
@@ -344,19 +352,25 @@ const routes = [
       {
         path: '/disk/image',
         name: '图片',
-        component: SiteConfig,
+        component: FileImage,
         meta: { needAuth: true }
       },
       {
         path: '/disk/video',
         name: '视频',
-        component: UserList,
+        component: FileVideo,
         meta: { needAuth: true }
       },
       {
         path: '/disk/audio',
         name: '音频',
-        component: UserList,
+        component: FileAudio,
+        meta: { needAuth: true }
+      },
+      {
+        path: '/disk/share',
+        name: '分享',
+        component: Share,
         meta: { needAuth: true }
       }
     ]

+ 16 - 0
src/views/disk/Disk.vue

@@ -19,6 +19,11 @@
           alt=""
         >
         <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item
+            icon="el-icon-s-home"
+            class="size"
+            @click.native="goToHome"
+          >主页</el-dropdown-item>
           <el-dropdown-item
             icon="el-icon-error"
             class="size"
@@ -38,6 +43,10 @@
             <i class="el-icon-files" />
             <span slot="title">文件</span>
           </el-menu-item>
+          <el-menu-item index="/disk/upload">
+            <i class="el-icon-upload" />
+            <span slot="title">上传</span>
+          </el-menu-item>
           <el-menu-item index="/disk/image">
             <i class="el-icon-picture" />
             <span slot="title">图片</span>
@@ -50,6 +59,10 @@
             <i class="el-icon-headset" />
             <span slot="title">音频</span>
           </el-menu-item>
+          <el-menu-item index="/disk/share">
+            <i class="el-icon-share" />
+            <span slot="title">分享</span>
+          </el-menu-item>
         </el-menu>
       </el-aside>
       <el-main>
@@ -60,9 +73,12 @@
 </template>
 
 <script>
+import { userMixin } from 'assets/js/mixin'
 import { getAuthedUser } from '@/utils/auth'
 
 export default {
+  name: 'Disk',
+  mixins: [userMixin],
   data() {
     return {
       user: null

+ 98 - 0
src/views/disk/FileAudio.vue

@@ -0,0 +1,98 @@
+<template>
+  <el-row>
+    <el-col :md="24" class="movie-list">
+      <div>
+        <el-col v-for="(image, index) in data.images" :key="image.thumbnailUrl" :md="6" :sm="12" :xs="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
+          <el-card :body-style="{ padding: '0px' }" class="card">
+            <div class="imgs">
+              <el-image
+                lazy
+                fit="cover"
+                class="coverImg"
+                :src="image.thumbnailUrl"
+                @click="showImages(index)"
+              />
+            </div>
+            <div style="padding: 14px;">
+                <span>
+                  <i v-if="image.collected" class="el-icon-star-on" @click="collectItem(image)" />
+                  <i v-else class="el-icon-star-off" @click="collectItem(image)" />
+                </span>
+            </div>
+          </el-card>
+        </el-col>
+      </div>
+    </el-col>
+  </el-row>
+</template>
+
+<script>
+import PermissionDeniedCard from '@/components/card/PermissionDeniedCard'
+import { followUser, getUserInfo, unfollowUser } from '@/api/user'
+import { getAlbum } from '@/api/image'
+import { collectItem } from '@/api/collect'
+
+export default {
+  name: 'Share',
+  components: { PermissionDeniedCard },
+  data() {
+    return {
+      // 屏幕宽度, 为了控制分页条的大小
+      screenWidth: document.body.clientWidth,
+      data: {
+        images: []
+      },
+    }
+  },
+  created() {
+    document.title = '我的音频'
+  },
+  mounted() {
+    // 当窗口宽度改变时获取屏幕宽度
+    window.onresize = () => {
+      return () => {
+        window.screenWidth = document.body.clientWidth
+        this.screenWidth = window.screenWidth
+      }
+    }
+  },
+  methods: {
+  }
+}
+</script>
+
+<style scoped>
+/*处于手机屏幕时*/
+@media screen and (max-width: 768px){
+  .movie-list {
+    padding-top: 8px;
+    padding-left: 0.5%;
+    padding-right: 0.5%;
+  }
+
+  .coverImg {
+    height: 120px !important;
+  }
+}
+
+.movie-list {
+  padding-top: 15px;
+  padding-left: 6%;
+  padding-right: 6%;
+}
+
+.coverImg {
+  width: 100%;
+  height: 320px;
+  display: block;
+}
+
+.card {
+  margin-bottom: 20px;
+  transition: all 0.6s; /*所有属性变化在0.6秒内执行动画*/
+}
+
+.imgs {
+  position: relative;
+}
+</style>

+ 25 - 177
src/views/disk/FileImage.vue

@@ -1,75 +1,29 @@
 <template>
-  <div v-if="!permissionDenied">
-    <el-row class="movie-list">
-      <el-col :md="24">
-        <el-card :if="!user" :body-style="{ padding: '0px' }" class="card">
-          <div slot="header" class="clearfix">
-            <el-row>
-              <el-col :md="1">
-                <el-avatar>
-                  <el-image :src="user.avatarUrl" />
-                </el-avatar>
-              </el-col>
-              <el-col :md="23">
-                <router-link target="_blank" :to="`/user/${user.userId}/image`">
-                  <span>{{ user.screenName }}的相册</span>
-                </router-link>
-                <span v-html="'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'" />
-                <el-button
-                  type="danger"
-                  size="mini"
-                  :icon="followButton.icon"
-                  @click="followUser(user.userId)"
-                >
-                  <span>{{ followButton.text }}</span>
-                </el-button>
-                <el-button
-                  type="danger"
-                  size="mini"
-                  icon="el-icon-message"
-                  @click="sendMessage(user.userId)"
-                >
-                  <span>发消息</span>
-                </el-button>
-              </el-col>
-            </el-row>
-            <el-row>
-              <br>
-              <span>{{ data.albumName }}</span>
-            </el-row>
-          </div>
-        </el-card>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :md="24" class="movie-list">
-        <div>
-          <el-col v-for="(image, index) in data.images" :key="image.thumbnailUrl" :md="6" :sm="12" :xs="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
-            <el-card :body-style="{ padding: '0px' }" class="card">
-              <div class="imgs">
-                <el-image
-                  lazy
-                  fit="cover"
-                  class="coverImg"
-                  :src="image.thumbnailUrl"
-                  @click="showImages(index)"
-                />
-              </div>
-              <div style="padding: 14px;">
+  <el-row>
+    <el-col :md="24" class="movie-list">
+      <div>
+        <el-col v-for="(image, index) in data.images" :key="image.thumbnailUrl" :md="6" :sm="12" :xs="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
+          <el-card :body-style="{ padding: '0px' }" class="card">
+            <div class="imgs">
+              <el-image
+                lazy
+                fit="cover"
+                class="coverImg"
+                :src="image.thumbnailUrl"
+                @click="showImages(index)"
+              />
+            </div>
+            <div style="padding: 14px;">
                 <span>
                   <i v-if="image.collected" class="el-icon-star-on" @click="collectItem(image)" />
                   <i v-else class="el-icon-star-off" @click="collectItem(image)" />
                 </span>
-              </div>
-            </el-card>
-          </el-col>
-        </div>
-      </el-col>
-    </el-row>
-  </div>
-  <div v-else>
-    <permission-denied-card :text-object="textObject" />
-  </div>
+            </div>
+          </el-card>
+        </el-col>
+      </div>
+    </el-col>
+  </el-row>
 </template>
 
 <script>
@@ -79,59 +33,19 @@ import { getAlbum } from '@/api/image'
 import { collectItem } from '@/api/collect'
 
 export default {
-  name: 'FileImage',
+  name: 'Share',
   components: { PermissionDeniedCard },
   data() {
     return {
       // 屏幕宽度, 为了控制分页条的大小
       screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      user: null,
-      followButton: {
-        icon: 'el-icon-plus',
-        text: '关注'
+      data: {
+        images: []
       },
-      data: null,
-      dataList: [],
-      permissionDenied: false,
-      textObject: {
-        content: '相册',
-        route: '/image'
-      }
     }
   },
   created() {
-    const albumId = this.$route.params.albumId
-    getAlbum(albumId).then(resp => {
-      if (resp.code === 0) {
-        const respData = resp.data
-        document.title = '相册 - ' + respData.albumName
-
-        this.data = respData
-        this.userId = respData.userId
-        getUserInfo(this.userId).then(resp => {
-          if (resp.code === 0) {
-            this.user = resp.data
-          } else {
-            this.$notify.error({
-              message: resp.msg,
-              type: 'warning',
-              duration: 3000
-            })
-          }
-        })
-      } else if (resp.code === 2) {
-        this.$router.push('/404')
-      } else {
-        this.permissionDenied = true
-      }
-    }).catch(error => {
-      this.$notify.error({
-        message: error.message,
-        type: 'error',
-        duration: 3000
-      })
-    })
+    document.title = '我的图片'
   },
   mounted() {
     // 当窗口宽度改变时获取屏幕宽度
@@ -143,72 +57,6 @@ export default {
     }
   },
   methods: {
-    followUser(userId) {
-      if (this.followButton.text === '关注') {
-        followUser(userId).then(resp => {
-          if (resp.code === 0) {
-            this.followButton.text = '已关注'
-            this.followButton.icon = 'el-icon-check'
-          }
-        })
-      } else {
-        unfollowUser(userId).then(resp => {
-          if (resp.code === 0) {
-            this.followButton.text = '关注'
-            this.followButton.icon = 'el-icon-plus'
-          }
-        })
-      }
-    },
-    sendMessage(userId) {
-      console.log('发送消息')
-    },
-    showImages(index) {
-      const imageUrls = []
-      for (const i of this.data.images) {
-        imageUrls.push(i.originalUrl)
-      }
-
-      this.$viewerApi({
-        images: imageUrls,
-        options: {
-          initialViewIndex: index,
-          movable: true,
-          fullscreen: false,
-          keyboard: true
-        }
-      })
-    },
-    collectItem(image) {
-      const jsonData = {}
-      jsonData.contentType = 1001
-      jsonData.contentId = image.imageFileId
-      if (image.collected) {
-        jsonData.collected = false
-        collectItem(jsonData).then(resp => {
-          if (resp.code === 0) {
-            this.$notify({
-              title: '取消收藏图片',
-              type: 'info',
-              duration: 3000
-            })
-            image.collected = false
-          }
-        })
-      } else {
-        jsonData.collected = true
-        collectItem(jsonData).then(resp => {
-          if (resp.code === 0) {
-            this.$notify({
-              title: '图片已收藏',
-              type: 'info',
-              duration: 3000
-            })
-            image.collected = true
-          }
-        })
-      }
-    }
   }
 }
 </script>

+ 98 - 0
src/views/disk/FileVideo.vue

@@ -0,0 +1,98 @@
+<template>
+  <el-row>
+    <el-col :md="24" class="movie-list">
+      <div>
+        <el-col v-for="(image, index) in data.images" :key="image.thumbnailUrl" :md="6" :sm="12" :xs="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
+          <el-card :body-style="{ padding: '0px' }" class="card">
+            <div class="imgs">
+              <el-image
+                lazy
+                fit="cover"
+                class="coverImg"
+                :src="image.thumbnailUrl"
+                @click="showImages(index)"
+              />
+            </div>
+            <div style="padding: 14px;">
+                <span>
+                  <i v-if="image.collected" class="el-icon-star-on" @click="collectItem(image)" />
+                  <i v-else class="el-icon-star-off" @click="collectItem(image)" />
+                </span>
+            </div>
+          </el-card>
+        </el-col>
+      </div>
+    </el-col>
+  </el-row>
+</template>
+
+<script>
+import PermissionDeniedCard from '@/components/card/PermissionDeniedCard'
+import { followUser, getUserInfo, unfollowUser } from '@/api/user'
+import { getAlbum } from '@/api/image'
+import { collectItem } from '@/api/collect'
+
+export default {
+  name: 'Share',
+  components: { PermissionDeniedCard },
+  data() {
+    return {
+      // 屏幕宽度, 为了控制分页条的大小
+      screenWidth: document.body.clientWidth,
+      data: {
+        images: []
+      },
+    }
+  },
+  created() {
+    document.title = '我的视频'
+  },
+  mounted() {
+    // 当窗口宽度改变时获取屏幕宽度
+    window.onresize = () => {
+      return () => {
+        window.screenWidth = document.body.clientWidth
+        this.screenWidth = window.screenWidth
+      }
+    }
+  },
+  methods: {
+  }
+}
+</script>
+
+<style scoped>
+/*处于手机屏幕时*/
+@media screen and (max-width: 768px){
+  .movie-list {
+    padding-top: 8px;
+    padding-left: 0.5%;
+    padding-right: 0.5%;
+  }
+
+  .coverImg {
+    height: 120px !important;
+  }
+}
+
+.movie-list {
+  padding-top: 15px;
+  padding-left: 6%;
+  padding-right: 6%;
+}
+
+.coverImg {
+  width: 100%;
+  height: 320px;
+  display: block;
+}
+
+.card {
+  margin-bottom: 20px;
+  transition: all 0.6s; /*所有属性变化在0.6秒内执行动画*/
+}
+
+.imgs {
+  position: relative;
+}
+</style>

+ 98 - 0
src/views/disk/Share.vue

@@ -0,0 +1,98 @@
+<template>
+  <el-row>
+    <el-col :md="24" class="movie-list">
+      <div>
+        <el-col v-for="(image, index) in data.images" :key="image.thumbnailUrl" :md="6" :sm="12" :xs="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
+          <el-card :body-style="{ padding: '0px' }" class="card">
+            <div class="imgs">
+              <el-image
+                lazy
+                fit="cover"
+                class="coverImg"
+                :src="image.thumbnailUrl"
+                @click="showImages(index)"
+              />
+            </div>
+            <div style="padding: 14px;">
+                <span>
+                  <i v-if="image.collected" class="el-icon-star-on" @click="collectItem(image)" />
+                  <i v-else class="el-icon-star-off" @click="collectItem(image)" />
+                </span>
+            </div>
+          </el-card>
+        </el-col>
+      </div>
+    </el-col>
+  </el-row>
+</template>
+
+<script>
+import PermissionDeniedCard from '@/components/card/PermissionDeniedCard'
+import { followUser, getUserInfo, unfollowUser } from '@/api/user'
+import { getAlbum } from '@/api/image'
+import { collectItem } from '@/api/collect'
+
+export default {
+  name: 'Share',
+  components: { PermissionDeniedCard },
+  data() {
+    return {
+      // 屏幕宽度, 为了控制分页条的大小
+      screenWidth: document.body.clientWidth,
+      data: {
+        images: []
+      },
+    }
+  },
+  created() {
+    document.title = '我的分享'
+  },
+  mounted() {
+    // 当窗口宽度改变时获取屏幕宽度
+    window.onresize = () => {
+      return () => {
+        window.screenWidth = document.body.clientWidth
+        this.screenWidth = window.screenWidth
+      }
+    }
+  },
+  methods: {
+  }
+}
+</script>
+
+<style scoped>
+/*处于手机屏幕时*/
+@media screen and (max-width: 768px){
+  .movie-list {
+    padding-top: 8px;
+    padding-left: 0.5%;
+    padding-right: 0.5%;
+  }
+
+  .coverImg {
+    height: 120px !important;
+  }
+}
+
+.movie-list {
+  padding-top: 15px;
+  padding-left: 6%;
+  padding-right: 6%;
+}
+
+.coverImg {
+  width: 100%;
+  height: 320px;
+  display: block;
+}
+
+.card {
+  margin-bottom: 20px;
+  transition: all 0.6s; /*所有属性变化在0.6秒内执行动画*/
+}
+
+.imgs {
+  position: relative;
+}
+</style>

+ 22 - 23
src/views/disk/UploadFile.vue

@@ -35,6 +35,7 @@
           </div>
           <div class="text item">
             <uploader
+              v-if="options !== null"
               class="uploader-example"
               :options="options"
               :auto-start="true"
@@ -66,24 +67,11 @@ export default {
   data() {
     return {
       // ****************************************************************************************************************
-      options: {
-        target: process.env.VUE_APP_OSS_URL,
-        chunkSize: 1024 * 1024 * 1024 * 10, // 10GiB
-        fileParameterName: 'file',
-        testChunks: false,
-        query: (file, chunk) => {
-          return {
-            channelId: 1
-          }
-        },
-        headers: {
-          Authorization: ''
-        },
-        withCredentials: true
-      },
+      options: null,
       attrs: {
         accept: '*'
       },
+      channelId: process.env.VUE_APP_UPLOAD_FILE_CHANNEL,
       // ****************************************************************************************************************
       ossUrl: null,
       // ****************************************************************************************************************
@@ -104,13 +92,24 @@ export default {
   },
   created() {
     document.title = '上传文件'
-    getServerInfo(1).then(resp => {
+    getServerInfo(this.channelId).then(resp => {
       if (resp.code === 0) {
         const resData = resp.data
-        this.ossUrl = resData.ossUrl
-        this.options.target = resData.ossUrl
-        this.options.chunkSize = resData.maxSize
-        this.options.headers.Authorization = 'Bearer ' + resData.token
+        this.options = {
+          target: resData.ossUrl,
+          chunkSize: resData.maxSize,
+          fileParameterName: 'file',
+          testChunks: false,
+          query: (file, chunk) => {
+            return {
+              channelId: this.channelId
+            }
+          },
+          headers: {
+            Authorization: 'Bearer ' + resData.token
+          },
+          withCredentials: false
+        }
       } else {
         this.$notify({
           title: '提示',
@@ -171,7 +170,7 @@ export default {
         this.form.fileUrl = resp.data.url
 
         const jsonData = {}
-        jsonData.ossUrl = this.ossUrl
+        jsonData.channelId = this.channelId
         jsonData.uploadId = resp.data.uploadId
         jsonData.pid = this.pid
         this.addDiskFile(jsonData)
@@ -185,9 +184,9 @@ export default {
       }
     },
     onFileError(rootFile, file, response, chunk) {
-      const resp = JSON.parse(response)
       this.$notify({
-        message: resp.msg,
+        title: '提示',
+        message: '文件上传错误',
         type: 'warning',
         duration: 3000
       })

+ 27 - 4
src/views/my/My.vue

@@ -176,6 +176,30 @@
           </el-submenu>
         </el-menu>
       </el-aside>
+<!--      <el-row class="movie-list">
+        <el-col :md="12" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
+          <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
+            <el-card class="box-card">
+              <div slot="header" class="clearfix">
+                <span>我的资料</span>
+              </div>
+              <div class="text item">
+                <el-form ref="form" :model="loginUser" label-width="80px">
+                  <el-form-item label="ID">
+                    <el-input v-model="loginUser.userId" style="padding-right: 1px" readonly />
+                  </el-form-item>
+                  <el-form-item label="显示名">
+                    <el-input v-model="loginUser.screenName" style="padding-right: 1px" readonly />
+                  </el-form-item>
+                  <el-form-item label="签名">
+                    <el-input v-model="loginUser.signature" style="padding-right: 1px" readonly />
+                  </el-form-item>
+                </el-form>
+              </div>
+            </el-card>
+          </el-row>
+        </el-col>
+      </el-row>-->
       <el-main>
         <router-view />
       </el-main>
@@ -192,7 +216,8 @@ export default {
   mixins: [userMixin],
   data() {
     return {
-      user: null
+      user: null,
+      loginUser: null
     }
   },
   created() {
@@ -200,11 +225,9 @@ export default {
     const userInfo = getAuthedUser()
     if (userInfo !== null) {
       this.user = userInfo
+      this.loginUser = userInfo
     }
-
     console.log(process.env)
-    console.log(process.env.VUE_APP_SERVER_URL)
-    console.log(process.env.VUE_APP_OSS_URL)
   }
 }
 </script>