|
@@ -27,75 +27,79 @@
|
|
|
label="注册时间">
|
|
label="注册时间">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="coverUrl"
|
|
|
|
|
|
|
+ prop="avatarUrl"
|
|
|
label="头像"
|
|
label="头像"
|
|
|
width="80">
|
|
width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-image :src="scope.row.coverUrl" min-width="40" height="30" />
|
|
|
|
|
|
|
+ <el-image :src="scope.row.avatarUrl" min-width="40" height="30" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="videoId"
|
|
|
|
|
|
|
+ prop="userId"
|
|
|
label="用户 ID">
|
|
label="用户 ID">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <router-link target="_blank" :to="`/video/${scope.row.videoId}`">
|
|
|
|
|
- <span>{{scope.row.videoId}}</span>
|
|
|
|
|
|
|
+ <router-link target="_blank" :to="`/user/${scope.row.userId}`">
|
|
|
|
|
+ <span>{{scope.row.userId}}</span>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="title"
|
|
|
|
|
- label="用户名">
|
|
|
|
|
|
|
+ prop="screenName"
|
|
|
|
|
+ label="显示名">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="description"
|
|
|
|
|
|
|
+ prop="gender"
|
|
|
|
|
+ label="性别">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="signature"
|
|
|
label="签名">
|
|
label="签名">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="scope"
|
|
|
|
|
- label="状态">
|
|
|
|
|
|
|
+ prop="following"
|
|
|
|
|
+ label="关注数">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="follower"
|
|
|
|
|
+ label="粉丝数">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="accountType"
|
|
|
|
|
+ label="帐号类型">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag v-if="scope.row.status === 1" :type="'warning'" disable-transitions>
|
|
|
|
|
+ tnb 帐号
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ <el-tag v-else-if="scope.row.status === 2" :type="'success'" disable-transitions>
|
|
|
|
|
+ bilibili 帐号
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
|
|
+ 其他
|
|
|
|
|
+ </el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="accountType"
|
|
|
|
|
+ label="帐号状态">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip class="item" effect="dark" content="点击修改视频可见范围" placement="top-end">
|
|
<el-tooltip class="item" effect="dark" content="点击修改视频可见范围" placement="top-end">
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="scope.row.scope === 1"
|
|
v-if="scope.row.scope === 1"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
- @click="handleScope(scope.$index, scope.row)">所有人可见</el-button>
|
|
|
|
|
|
|
+ @click="handleScope(scope.$index, scope.row)">正常</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-else-if="scope.row.scope === 2"
|
|
v-else-if="scope.row.scope === 2"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="success"
|
|
type="success"
|
|
|
- @click="handleScope(scope.$index, scope.row)">VIP 可见</el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-else-if="scope.row.scope === 3"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- type="warning"
|
|
|
|
|
- @click="handleScope(scope.$index, scope.row)">验证码可见</el-button>
|
|
|
|
|
|
|
+ @click="handleScope(scope.$index, scope.row)">封禁</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-else
|
|
v-else
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
- @click="handleScope(scope.$index, scope.row)">本人可见</el-button>
|
|
|
|
|
|
|
+ @click="handleScope(scope.$index, scope.row)">其他</el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- prop="scope"
|
|
|
|
|
- label="审核状态">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-tag v-if="scope.row.status === 1" :type="'warning'" disable-transitions>
|
|
|
|
|
- 审核中
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-else-if="scope.row.status === 2" :type="'success'" disable-transitions>
|
|
|
|
|
- 审核通过
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-else-if="scope.row.status === 3" :type="'danger'" disable-transitions>
|
|
|
|
|
- 审核未通过
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag v-else :type="'danger'" disable-transitions>
|
|
|
|
|
- 下架
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="210">
|
|
<el-table-column label="操作" width="210">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -118,6 +122,7 @@
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
background
|
|
background
|
|
|
:small="screenWidth <= 768"
|
|
:small="screenWidth <= 768"
|
|
|
|
|
+ hide-on-single-page
|
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
|
:page-size="pageSize"
|
|
:page-size="pageSize"
|
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
@@ -139,7 +144,7 @@
|
|
|
>
|
|
>
|
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
- <span>修改视频可见范围</span>
|
|
|
|
|
|
|
+ <span>修改帐号状态</span>
|
|
|
<el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateVideoScope">更新</el-button>
|
|
<el-button style="float: right; padding: 3px 0" type="text" @click="onUpdateVideoScope">更新</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="text item">
|
|
<div class="text item">
|
|
@@ -156,32 +161,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <!-- 视频预览对话框 -->
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- title="预览视频"
|
|
|
|
|
- append-to-body
|
|
|
|
|
- :visible.sync="showPreviewDialog"
|
|
|
|
|
- :before-close="handleDialogClose"
|
|
|
|
|
- width="70%"
|
|
|
|
|
- center
|
|
|
|
|
- >
|
|
|
|
|
- <template>
|
|
|
|
|
- <video-preview-player :video-prop.sync="this.videoProp"/>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import VideoPreviewPlayer from 'components/VideoPreviewPlayer'
|
|
|
|
|
-
|
|
|
|
|
-import {userVideoPost, updateVideoScope, videoInfo, deleteVideo} from "@/api/video";
|
|
|
|
|
-import {getUserAlbums} from "@/api/image";
|
|
|
|
|
-import { getUserAudio } from "@/api/audio";
|
|
|
|
|
|
|
+import { getUserList } from "@/api/user";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'AdminPost',
|
|
name: 'AdminPost',
|
|
|
- components: { VideoPreviewPlayer },
|
|
|
|
|
|
|
+ components: {},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
// 屏幕宽度, 为了控制分页条的大小
|
|
@@ -195,9 +183,7 @@ export default {
|
|
|
{ path: '/admin/user', name: '用户', icon: 'el-icon-user' },
|
|
{ path: '/admin/user', name: '用户', icon: 'el-icon-user' },
|
|
|
{ path: '/admin/post', name: '稿件', icon: 'el-icon-files' },
|
|
{ path: '/admin/post', name: '稿件', icon: 'el-icon-files' },
|
|
|
],
|
|
],
|
|
|
- userId: 10001,
|
|
|
|
|
showPreviewDialog: false,
|
|
showPreviewDialog: false,
|
|
|
- videoProp: null,
|
|
|
|
|
showEditScopeDialog: false,
|
|
showEditScopeDialog: false,
|
|
|
form: {
|
|
form: {
|
|
|
videoId: null,
|
|
videoId: null,
|
|
@@ -207,7 +193,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
document.title = "用户管理"
|
|
document.title = "用户管理"
|
|
|
- this.getData()
|
|
|
|
|
|
|
+ this.getUserListWrapper(this.currentPage)
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
$route(){
|
|
$route(){
|
|
@@ -217,7 +203,7 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
handleCurrentChange(pageNumber) {
|
|
handleCurrentChange(pageNumber) {
|
|
|
this.currentPage = pageNumber
|
|
this.currentPage = pageNumber
|
|
|
- this.getData()
|
|
|
|
|
|
|
+ this.getUserListWrapper(this.currentPage)
|
|
|
// 回到顶部
|
|
// 回到顶部
|
|
|
scrollTo(0, 0)
|
|
scrollTo(0, 0)
|
|
|
},
|
|
},
|
|
@@ -226,77 +212,24 @@ export default {
|
|
|
this.form.scope = row.scope
|
|
this.form.scope = row.scope
|
|
|
this.showEditScopeDialog = true
|
|
this.showEditScopeDialog = true
|
|
|
},
|
|
},
|
|
|
- handleDialogClose(done) {
|
|
|
|
|
- this.showPreviewDialog = false
|
|
|
|
|
- this.videoProp = {
|
|
|
|
|
- videoId: null,
|
|
|
|
|
- play: false
|
|
|
|
|
- }
|
|
|
|
|
- done()
|
|
|
|
|
- },
|
|
|
|
|
handlePreview(index, row) {
|
|
handlePreview(index, row) {
|
|
|
- videoInfo(row.videoId).then(res => {
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- this.showPreviewDialog = true
|
|
|
|
|
- this.videoProp = {
|
|
|
|
|
- videoId: res.data.videoId,
|
|
|
|
|
- play: true
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- console.log('预览 ' + row.videoId);
|
|
|
|
|
|
|
+ console.log('预览操作')
|
|
|
},
|
|
},
|
|
|
handleEdit(index, row) {
|
|
handleEdit(index, row) {
|
|
|
- console.log(row.videoId);
|
|
|
|
|
- const path = '/post/edit/video/' + row.videoId
|
|
|
|
|
- this.$router.push(path)
|
|
|
|
|
|
|
+ console.log('编辑操作')
|
|
|
},
|
|
},
|
|
|
handleDelete(index, row) {
|
|
handleDelete(index, row) {
|
|
|
- deleteVideo(row.videoId).then(res => {
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- message: '视频稿件已删除',
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- duration: 3000
|
|
|
|
|
- })
|
|
|
|
|
- this.$router.go(0)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- handleEditImage(index, row) {
|
|
|
|
|
- console.log(row.videoId);
|
|
|
|
|
- const path = '/post/edit/album/' + row.albumId
|
|
|
|
|
- this.$router.push(path)
|
|
|
|
|
- },
|
|
|
|
|
- handleDeleteImage(index, row) {
|
|
|
|
|
- console.log(row.videoId);
|
|
|
|
|
|
|
+ console.log('删除操作')
|
|
|
},
|
|
},
|
|
|
- handleEditAudio(index, row) {
|
|
|
|
|
- console.log(row.videoId);
|
|
|
|
|
- const path = '/post/edit/audio/' + row.audioId
|
|
|
|
|
- this.$router.push(path)
|
|
|
|
|
- },
|
|
|
|
|
- handleDeleteAudio(index, row) {
|
|
|
|
|
- console.log(row.videoId);
|
|
|
|
|
- },
|
|
|
|
|
- getData() {
|
|
|
|
|
- this.dataList = []
|
|
|
|
|
- userVideoPost(this.currentPage).then(res => {
|
|
|
|
|
|
|
+ getUserListWrapper(page) {
|
|
|
|
|
+ getUserList(page).then(res => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
- const resData = res.data
|
|
|
|
|
- this.dataList = resData.list
|
|
|
|
|
- this.totalSize = resData.totalSize
|
|
|
|
|
-
|
|
|
|
|
- if (this.totalSize !== 0) {
|
|
|
|
|
- this.showEmpty = false
|
|
|
|
|
- } else {
|
|
|
|
|
- this.showEmpty = true
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.dataList = res.data.list
|
|
|
|
|
+ this.totalSize = res.data.totalSize
|
|
|
} else {
|
|
} else {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
- message: res.msg,
|
|
|
|
|
|
|
+ message: '获取用户列表失败',
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
@@ -305,30 +238,14 @@ export default {
|
|
|
this.$notify({
|
|
this.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
message: error.message,
|
|
message: error.message,
|
|
|
- type: 'error',
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onUpdateVideoScope() {
|
|
onUpdateVideoScope() {
|
|
|
this.showEditScopeDialog = false
|
|
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
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ console.log('更新帐号状态')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|