From 5b629d83de981e12855ec1e6f8b3d0d7ad261f14 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期四, 07 八月 2025 19:16:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- manager/src/views/video/VideoList.vue | 102 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 94 insertions(+), 8 deletions(-) diff --git a/manager/src/views/video/VideoList.vue b/manager/src/views/video/VideoList.vue index d493f41..f3e5c72 100644 --- a/manager/src/views/video/VideoList.vue +++ b/manager/src/views/video/VideoList.vue @@ -202,8 +202,6 @@ :page-size-opts="[10, 20, 50]" size="small" show-total - show-elevator - show-sizer ></Page> </FormItem> </Col> @@ -404,15 +402,38 @@ <Button type="primary" size="small" style="margin-right: 5px" v-if="row.status === '99'" @click="openAuditing(row)">瀹℃牳 </Button> +<!-- <Button type="primary" size="small" style="margin-right: 5px"--> +<!-- @click="editVideo(row)">缂栬緫--> +<!-- </Button>--> <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '1'" @click="openVideoDown(row)">涓嬫灦 + </Button> + <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '1'" + @click="generalQrCode(row)">鐢熸垚浜岀淮鐮� </Button> <Button type="success" size="small" style="margin-right: 5px" v-else-if="row.status === '0'" @click="videoUp(row)">涓婃灦 </Button> </template> </Table> - + <Modal + v-model="showGeneralQrCode" + title="浜岀淮鐮�" + width="800" + :mask-closable="false" + > + <vue-qr + :text="QRCodeUrl" + :margin="0" + colorDark="#000" + colorLight="#fff" + :size="150" + ></vue-qr> + <div slot="footer"> + <Button type="text" @click="closeGeneralQrCode">鍏抽棴</Button> +<!-- <Button type="primary" @click="generalQrCode">纭</Button>--> + </div> + </Modal> <Row type="flex" justify="end" class="mt_10"> <Page :current="searchForm.pageNumber" @@ -440,10 +461,11 @@ import COS from "cos-js-sdk-v5"; import {getFileKey} from "@/utils/file"; import vuedraggable from "vuedraggable"; +import vueQr from "vue-qr"; export default { name: "VideoList", - components: {vuedraggable, Editor, GoodsExpandRow}, + components: {vuedraggable, Editor, GoodsExpandRow,"vue-qr": vueQr}, watch: { 'uploadVideoForm.videoContentType'(newValue, oldValue) { if (newValue === 'video') { @@ -480,10 +502,14 @@ }, data() { return { + // https://myk.9village.cn/scanpage/recommend?shareType=videoRecommend&videoId=1948284811844190209 + baseQRCodeUrl: this.QRcodeBaseUrl+ '/scanpage/recommend', + QRCodeUrl:'', + showGeneralQrCode:false, endpoint: '', searchGoods: '', videoTagList: [], - chooseTag: '', + chooseTag: [], videoTag: '', visible: false, imgName: '', @@ -681,6 +707,46 @@ this.getTags('') }, methods: { + editVideo(row){ + // this.uploadVideoForm = {}; + // this.uploadVideoForm = row; + // this.showUploadVideoShow = true; + console.log('------------------->缂栬緫',JSON.stringify(row)); + this.upLoadVideoShow = true; + this.videoTagList = [] + this.chooseTag = row.tagList + this.uploadVideoForm = { + id: '', + title: '', + cover: "", + videoFileKey: "", + videoDuration: 0, + videoFit: "cover", + videoContentType: 'video', + videoImgs: [], + showListImages: [], + tags: [], + fileInfo: {}, + goodsList: [] + } + this.uploadVideoForm = row + recommend({ + searchType: "HOT" + }).then(res => { + this.videoTagList = res.data; + }) + this.searchGoodsList(); + }, + closeGeneralQrCode(){ + this.showGeneralQrCode = false; + this.QRCodeUrl = ''; + }, + generalQrCode(row){ + this.showGeneralQrCode = true + console.log('-------------------->',row); + this.QRCodeUrl = this.baseQRCodeUrl + '?shareType=videoRecommend' + '&videoId='+ row.id; + console.log(this.QRCodeUrl) + }, //todo 淇濈暀鍚庣画鍙兘浼氫娇鐢� changeGoodsNum(id,index,goodsNum){ console.log('-------------------->',id,index,goodsNum) @@ -723,6 +789,23 @@ this.uploadVideoForm.goodsList = this.uploadVideoForm.goodsList.filter(item => { return item.goodsNum >0; }) + if (!this.uploadVideoForm.title) { + this.$Message.error('鏍囬涓嶈兘涓虹┖'); + return; + } + //琛ㄥ崟鏍¢獙 + if (this.uploadVideoForm.videoContentType==='video') { + if (!this.uploadVideoForm.videoFileKey){ + this.$Message.error('瑙嗛涓嶈兘涓虹┖'); + return; + } + } + if (this.uploadVideoForm.videoContentType==='img') { + if (this.uploadVideoForm.videoImgs<1){ + this.$Message.error('鍥剧墖涓嶈兘涓虹┖'); + return; + } + } publish(this.uploadVideoForm).then(response => { if (response.code == 200) { this.$Message.success("瑙嗛鍙戝竷鎴愬姛"); @@ -867,6 +950,7 @@ openUploadVideo() { this.upLoadVideoShow = true; this.videoTagList = [] + this.chooseTag = [] this.uploadVideoForm = { id: '', title: '', @@ -1058,6 +1142,7 @@ // 鑾峰彇鍒楄〃鏁版嵁 getGoodsDataList() { let search = this.searchGoodsForm; + console.log('-------------------------->',this.searchGoodsForm) if (search.pageNumber > 0) { search.pageNumber = search.pageNumber - 1; } @@ -1114,13 +1199,14 @@ }, // 鍒嗛〉 鏀瑰彉椤电爜 goodsChangePage(v) { - this.searchForm.pageNumber = v; + console.log('-------------------------->鍒嗛〉',v); + this.searchGoodsForm.pageNumber = v; this.getGoodsDataList(); }, // 鍒嗛〉 鏀瑰彉椤垫暟 goodsChangePageSize(v) { - this.searchForm.pageNumber = 1; - this.searchForm.pageSize = v; + this.searchGoodsForm.pageNumber = 1; + this.searchGoodsForm.pageSize = v; this.getGoodsDataList(); }, } -- Gitblit v1.8.0