ソースを参照

总台直播审核

yuhongqi 3 ヶ月 前
コミット
da5db63448

+ 46 - 2
src/views/live/live/index.vue

@@ -93,8 +93,8 @@
       <el-table-column label="主播ID" align="center" prop="talentId" />
       <el-table-column label="直播类型" align="center" prop="liveType">
         <template slot-scope="scope">
-          <el-tag v-if="scope.row.liveType == 1">直播</el-tag>
-          <el-tag v-if="scope.row.liveType == 2">录播</el-tag>
+          <el-tag type="danger" v-if="scope.row.liveType == 1">直播</el-tag>
+          <el-tag type="success" v-if="scope.row.liveType == 2">录播</el-tag>
           <el-tag v-if="scope.row.liveType == 3">直播回放</el-tag>
         </template>
       </el-table-column>
@@ -150,6 +150,12 @@
             @click="showLivingUrl(scope.row)"
             v-hasPermi="['live:live:remove']"
           >推流码</el-button>
+          <el-dropdown-item
+            v-if="scope.row.liveCodeUrl != null"
+            @click.native="handleCheckCode(scope.row)"
+          >
+            <i class="el-icon-service"></i> 查看二维码
+          </el-dropdown-item>
 <!--          <el-button-->
 <!--            v-if="scope.row.status == 2"-->
 <!--            size="mini"-->
@@ -162,6 +168,25 @@
         </template>
       </el-table-column>
     </el-table>
+    <el-dialog
+      title="直播二维码"
+      :visible.sync="qrcodeDialogVisible"
+      width="500px"
+      :close-on-click-modal="true"
+      :show-close="true"
+      top="10vh"
+    >
+      <div class="qrcode-img-container">
+
+        <img
+          :src="currentQrcodeUrl"
+          alt="直播二维码"
+          class="qrcode-img"
+          @error="handleImgError"
+          @click="handleImgZoom"
+        >
+      </div>
+    </el-dialog>
 
     <pagination
       v-show="total>0"
@@ -383,6 +408,10 @@ export default {
       serverName: '',
       livingCode:'',
       videoUrl: "",
+      qrcodeDialogVisible: false,  // 弹窗显示状态:默认隐藏
+      currentQrcodeUrl: "",        // 当前要展示的二维码地址
+      defaultImg: "https://via.placeholder.com/400x400?text=二维码加载失败"  // 占位图
+
     };
   },
   created() {
@@ -678,6 +707,21 @@ export default {
     handleManage(row) {
       this.$router.push('/live/liveConsole/' + row.liveId)
     },
+    // 查看二维码图片
+    handleCheckCode(row) {
+      // 先校验图片地址是否存在
+      if (!row.liveCodeUrl) {
+        this.$message.warning("二维码图片地址不存在,请稍后重试");
+        return;
+      }
+      // 赋值当前图片地址 + 打开弹窗
+      this.currentQrcodeUrl = row.liveCodeUrl;
+      this.qrcodeDialogVisible = true;
+    },
+    // 2. 图片加载失败:替换为占位图
+    handleImgError(e) {
+      e.target.src = this.defaultImg;
+    },
     handleAudit( row){
       this.$alert('是否审核通过?', '审核', {
         confirmButtonText: '同意',

+ 12 - 2
src/views/live/liveConfig/goods.vue

@@ -77,7 +77,17 @@
       >
         <template slot-scope="scope">
           <el-tag v-if="scope.row.status == 1">上架</el-tag>
-          <el-tag v-if="scope.row.status == 0">下架</el-tag>
+          <el-tag type="info" v-if="scope.row.status == 0">下架</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        prop="status"
+        label="店铺上下架"
+      >
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.fsStatus == 1">上架</el-tag>
+          <el-tag type="info" v-if="scope.row.fsStatus == 0">下架</el-tag>
         </template>
       </el-table-column>
 
@@ -224,7 +234,7 @@
       :close-on-press-escape="false"
     >
       <el-form :model="salesForm" ref="salesForm" :rules="salesRules">
-        <el-form-item label="调整后库存" prop="newSales">
+        <el-form-item label="调整后销量" prop="newSales">
           <el-input-number
             v-model="salesForm.sales"
             :min="0"

+ 3 - 1
src/views/live/liveConfig/index.vue

@@ -104,6 +104,7 @@ import Answer from './answer.vue';
 import Goods from './goods.vue';
 import WatchScore from './watchScore.vue';
 import IdCard from './idCard.vue';
+import Task from './task.vue';
 import LiveRedConf from './liveRedConf.vue'
 import LiveLotteryConf from './liveLotteryConf.vue'
 import LiveReplay from './liveReplay.vue'
@@ -120,7 +121,8 @@ export default {
     Answer,
     Goods,
     WatchScore,
-    IdCard
+    IdCard,
+    Task
   },
   data() {
     return {

+ 3 - 1
src/views/live/liveConfig/liveLotteryConf.vue

@@ -731,7 +731,9 @@ export default {
       const doLotteryParam = {
         lotteryId: row.lotteryId,
         lotteryStatus: status,
-        duration: row.duration
+        duration: row.duration,
+        liveId:this.liveId,
+        status: status
       };
       updateLiveLotteryConf(doLotteryParam).then(response => {
         if(response.code === 200){

+ 1 - 0
src/views/live/liveConfig/liveRedConf.vue

@@ -350,6 +350,7 @@ export default {
         redId: row.redId,
         redStatus: status,
         totalLots: row.totalLots,
+        liveId: this.liveId,
         duration: row.duration
       };
       updateLiveRedConf(doRedParam).then(response => {

+ 40 - 19
src/views/live/liveConsole/index.vue

@@ -67,7 +67,7 @@
         <div style="border-radius: 5px; overflow: hidden;" v-if="!isAudit">
           <img :src="require('@/assets/images/videoIsAudit.png')" style="width: 100%; height: 45vh;">
         </div>
-        <div style="border-radius: 5px; overflow: hidden;" v-else-if="status != 2">
+        <div style="border-radius: 5px; overflow: hidden;" v-else-if="status != 2 && status != 4">
           <img :src="require('@/assets/images/videoNotStart.png')" style="width: 100%; height: 45vh;">
         </div>
         <div style="border-radius: 5px; overflow: hidden;" v-else-if="liveType == 1">
@@ -105,6 +105,19 @@
             已播放:<span id="elapsedTime">00:00:00</span>
           </div>
         </div>
+        <div style="border-radius: 5px; overflow: hidden;" v-else-if="liveType == 3">
+          <video
+            controls
+            ref="liveReplay"
+            loop
+            autoplay
+            width="100%"
+            playsinline
+            style="display: block; background: #000; height: 40vh;"
+          >
+            <source :src="videoUrl" type="video/mp4">
+          </video>
+        </div>
         <div style="border-radius: 5px; overflow: hidden;" v-else>
           <img :src="require('@/assets/images/videoNotStart.png')" style="width: 100%; height: 45vh;">
         </div>
@@ -257,6 +270,9 @@ export default {
         activeName: "talk",
       },
       livingUrl:"",
+      videoUrl: "",
+      status: 0,
+      loadMsgMaxPage: 2,
       liveVideo: {},
       liveWsUrl: process.env.VUE_APP_LIVE_WS_URL + '/app/webSocket',
       userParams:{
@@ -515,25 +531,30 @@ export default {
           }
           this.isAudit = true
           this.status = res.data.status
-          if (res.data.status != 2) {
-            this.$message.error("当前直播间未直播");
-            this.loading = false
-            return
-          }
-          if (res.data.liveType == 1) {
-            this.livingUrl = res.data.flvHlsUrl
-            this.livingUrl = this.livingUrl.replace("flv","m3u8")
-            this.$nextTick(() => {
-              this.initPlayer()
-            })
-          } else {
-            this.liveType = 2
+          if(res.data.status == 4){
+            this.liveType = 3
             this.videoUrl = res.data.videoUrl;
-            this.$nextTick(() => {
-              const video = this.$refs.videoPlayer;
-              video.play()
-              this.initVideoPlayer(res.data.startTime)
-            })
+          }else {
+            if (res.data.status != 2) {
+              this.$message.error("当前直播间未直播");
+              this.loading = false
+              return
+            }
+            if (res.data.liveType == 1) {
+              this.livingUrl = res.data.flvHlsUrl
+              this.livingUrl = this.livingUrl.replace("flv","m3u8")
+              this.$nextTick(() => {
+                this.initPlayer()
+              })
+            } else {
+              this.liveType = 2
+              this.videoUrl = res.data.videoUrl;
+              this.$nextTick(() => {
+                const video = this.$refs.videoPlayer;
+                video.play()
+                this.initVideoPlayer(res.data.startTime)
+              })
+            }
           }
           this.loading = false
         } else {