|
@@ -58,7 +58,7 @@
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="序号" :index="indexMethod" align="center" width="80" type="index" />
|
|
|
<el-table-column label="视频" align="center" width="100">
|
|
|
- <template slot-scope="{ row }"><el-image :src="row.cover" style="wdith: 80px" /></template>
|
|
|
+ <template slot-scope="{ row }"><el-image class="cover" :src="row.cover" /></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="登录账号" align="center" prop="userName" width="240" />
|
|
|
<el-table-column label="机构名称" align="center" prop="authParty" />
|
|
@@ -71,9 +71,19 @@
|
|
|
<span v-if="row.status === 0" class="status danger">未上传</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="上传时间" align="center" width="160">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.releaseTime | formatDate }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="440">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <permission-button size="mini" type="primary" @click="onSyancDouyin(row)">上传至抖音</permission-button>
|
|
|
+ <permission-button
|
|
|
+ v-if="row.status !== 1"
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="onSyancDouyin(row)"
|
|
|
+ >上传至抖音</permission-button>
|
|
|
<permission-button size="mini" type="primary" @click="onSaveCommand(row)">抖音口令</permission-button>
|
|
|
<permission-button size="mini" type="primary" @click="onPlayVideo(row)">播放视频</permission-button>
|
|
|
<permission-button size="mini" type="primary" @click="onDownload('single', row)">下载</permission-button>
|
|
@@ -129,7 +139,6 @@ import {
|
|
|
fetchDouyinActivityStatus,
|
|
|
fetchDouyinVideoList,
|
|
|
getDouyinAccessToken,
|
|
|
- getDouyinShareH5,
|
|
|
onSendDouyinCommand,
|
|
|
removeVideo,
|
|
|
updateDouyinActivityStatus
|
|
@@ -239,17 +248,23 @@ export default {
|
|
|
this.$confirm(dialog[flag], '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
+ type: 'warning',
|
|
|
+ closeOnClickModal: false,
|
|
|
+ showClose: false
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.activityFormData.status = 0
|
|
|
})
|
|
|
- .catch(() => {})
|
|
|
+ .catch(() => {
|
|
|
+ this.activityFormData.status = 0
|
|
|
+ })
|
|
|
return
|
|
|
}
|
|
|
|
|
|
this.updateActivityStatus()
|
|
|
},
|
|
|
+
|
|
|
+ // 更新活动状态
|
|
|
async updateActivityStatus() {
|
|
|
try {
|
|
|
const {
|
|
@@ -266,23 +281,26 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
- // 获取列表
|
|
|
+
|
|
|
+ // 获取视频列表
|
|
|
getList() {
|
|
|
this.list = []
|
|
|
this.listQuery.pageNum = 1
|
|
|
this.fetchDouyinVideoList()
|
|
|
},
|
|
|
+
|
|
|
// 获取视频列表
|
|
|
async fetchDouyinVideoList() {
|
|
|
try {
|
|
|
this.listLoading = true
|
|
|
const res = await fetchDouyinVideoList(this.listQuery)
|
|
|
this.list = res.data.list.map((item, index) => {
|
|
|
- item.rankNum = index + 1
|
|
|
+ if (item.rankingStatus === 1) {
|
|
|
+ item.rankNum = index + 1
|
|
|
+ }
|
|
|
return item
|
|
|
})
|
|
|
this.listLoading = false
|
|
|
- this.listQuery.pageNum++
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
}
|
|
@@ -292,10 +310,13 @@ export default {
|
|
|
onSelectionChange(data) {
|
|
|
this.selectionList = data
|
|
|
},
|
|
|
+
|
|
|
// 表格索引
|
|
|
indexMethod(index) {
|
|
|
return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
|
},
|
|
|
+
|
|
|
+ // 获取已发布视频机构列表
|
|
|
async getClubList(list) {
|
|
|
try {
|
|
|
const res = await fetchClubList()
|
|
@@ -304,6 +325,7 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 上传抖音
|
|
|
async onSyancDouyin(row) {
|
|
|
// 代理模式下不允许操作
|
|
@@ -322,18 +344,15 @@ export default {
|
|
|
this.douyinLogin(row)
|
|
|
return
|
|
|
}
|
|
|
- const res = await getDouyinShareH5({
|
|
|
- title: row.title,
|
|
|
- videoPath: row.ossUrl,
|
|
|
- authId: row.authId
|
|
|
- })
|
|
|
- await this.generateQrcode(res.data)
|
|
|
+ const url = process.env.VUE_APP_LOCAL + `/#/douyin/schema?id=${row.id}`
|
|
|
+ await this.generateQrcode(url)
|
|
|
// 获取分享码
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ // 登录抖音
|
|
|
async douyinLogin(row) {
|
|
|
const code = getStorage('zp_douyin_code')
|
|
|
if (!code) {
|
|
@@ -372,6 +391,7 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 提交抖音口令
|
|
|
async onCommandSubmit() {
|
|
|
try {
|
|
@@ -384,22 +404,26 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 保存抖音口令
|
|
|
async onSaveCommand(row) {
|
|
|
this.commandDialog = true
|
|
|
this.commandFormData.authId = row.authId
|
|
|
this.commandFormData.content = row.dyCommand
|
|
|
},
|
|
|
- // 清楚表单
|
|
|
+
|
|
|
+ // 清楚表单信息
|
|
|
onCommandClose() {
|
|
|
this.commandFormData.authId = ''
|
|
|
this.$refs.commandForm.resetFields()
|
|
|
},
|
|
|
+
|
|
|
// 播放视频
|
|
|
onPlayVideo(row) {
|
|
|
this.videoDialog = true
|
|
|
this.videoUrl = row.ossUrl
|
|
|
},
|
|
|
+
|
|
|
// 下载视频
|
|
|
onDownload(type, row) {
|
|
|
if (type === 'single') {
|
|
@@ -410,6 +434,7 @@ export default {
|
|
|
this.downloadVideo(ids)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 下载视频
|
|
|
async downloadVideo(fileIdList) {
|
|
|
try {
|
|
@@ -449,6 +474,7 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 删除视频
|
|
|
async onRemove(row) {
|
|
|
try {
|
|
@@ -463,6 +489,7 @@ export default {
|
|
|
this.$message.info('已取消操作')
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
// 删除视频
|
|
|
async removeVideo(row) {
|
|
|
try {
|
|
@@ -484,6 +511,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.cover {
|
|
|
+ width: 80px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
.el-divider {
|
|
|
margin: 12px 0;
|
|
|
}
|