zxl
2025-07-30 9f7b52e81c7d06a290520834febfe21aeacf021c
manager/src/views/health/HealthVideoList.vue
@@ -285,8 +285,30 @@
          <Button type="success" size="small" style="margin-right: 5px"
                  @click="deleteHealthVideo(row)">删除
          </Button>
          <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '1'"
                  @click="generalQrCode(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
@@ -314,12 +336,18 @@
import Editor from '@/components/editor/index.vue'
import COS from 'cos-js-sdk-v5';
import {getFileKey} from "@/utils/file.js";
import vueQr from "vue-qr";
export default {
  name: "VideoList",
  components: {Editor},
  components: {Editor,"vue-qr": vueQr},
  data() {
    return {
      showGeneralQrCode:false,
      codeUrl: this.QRcodeBaseUrl+ '/scanpage/health',
      QRCodeUrl:'',
      videoDownForm: {
        id: '',
        reason: ''
@@ -521,6 +549,22 @@
    this.getTags('')
  },
  methods: {
    closeGeneralQrCode(){
      this.showGeneralQrCode = false;
    },
    generalQrCode(row){
      this.QRCodeUrl = '';
      this.showGeneralQrCode = true;
      console.log('-------------------->',row);
      //shareType可能会是动态的,会加判断视频来源
      this.QRCodeUrl = this.codeUrl + '?shareType=health' + '&videoId='+ row.id  + '%source=' + 'system';
      //TODO 根据视频信息中的 ,作者id获得用户 判断 来源 ,用户作者的uniid为null则是系统上传,不为空则是用户上传;
      // console.log(this.QRCodeUrl)
    },
    // 秒转x分x秒
    formatSeconds(seconds) {
      if (isNaN(seconds) || seconds < 0) return '0秒';