| | |
| | | :page-size-opts="[10, 20, 50]" |
| | | size="small" |
| | | show-total |
| | | show-elevator |
| | | show-sizer |
| | | ></Page> |
| | | </FormItem> |
| | | </Col> |
| | |
| | | <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" |
| | |
| | | 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') { |
| | |
| | | }, |
| | | 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: '', |
| | |
| | | this.getTags('') |
| | | }, |
| | | methods: { |
| | | 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) |
| | |
| | | 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("视频发布成功"); |
| | |
| | | openUploadVideo() { |
| | | this.upLoadVideoShow = true; |
| | | this.videoTagList = [] |
| | | this.chooseTag = [] |
| | | this.uploadVideoForm = { |
| | | id: '', |
| | | title: '', |
| | |
| | | // 获取列表数据 |
| | | getGoodsDataList() { |
| | | let search = this.searchGoodsForm; |
| | | console.log('-------------------------->',this.searchGoodsForm) |
| | | if (search.pageNumber > 0) { |
| | | search.pageNumber = search.pageNumber - 1; |
| | | } |
| | |
| | | }, |
| | | // 分页 改变页码 |
| | | 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(); |
| | | }, |
| | | } |