Kaynağa Gözat

3.6 开发完成 准备提测

bding 2 ay önce
ebeveyn
işleme
0be9334f42

+ 2 - 9
src/views/rai_manage/activityManage/audioVideoManagement.vue

@@ -208,16 +208,9 @@ export default {
         ActivityTypeId: this.cactivityTypeVal,
         SortType: this.sortType,
         SortParam: "videoCounts",
-        SearchType: this.tabActive,
+        IsResearch: true,
       };
-      const res =
-        this.tabActive == 4
-          ? await raiVideoApi.videoList(params)
-          : this.tabActive == 1
-          ? await raiVideoApi.activityVoiceAndVideoList(params)
-          : this.tabActive == 3
-          ? await raiVideoApi.askserie_videoList(params)
-          : await raiVideoApi.activityVoiceAndVideoList(params);
+      const res = await raiVideoApi.askserie_videoList(params)
       if (res.Ret === 200) {
         this.dataList = res.Data.List;
         this.total = res.Data.Paging.Totals;

+ 41 - 0
src/views/rai_manage/activityManage/components/addActivity.vue

@@ -212,6 +212,23 @@
           </el-upload>
           <el-progress type="circle" :percentage="percentage" width="40" style="margin-left: 10px" v-if="startUpload"></el-progress>
         </div>
+        <div class="audio-content" style="margin: 10px 0" v-if="isResearch">
+          <span class="text" style="width: 118px">扣点or付费查看:</span>
+          <div>
+            <el-select v-model="paymentForm.IsPay" placeholder="请选择" style="width: 100px">
+              <el-option label="否" :value="0"> </el-option>
+              <el-option label="是" :value="1"> </el-option>
+            </el-select>
+            <template v-if="paymentForm.IsPay == 1">
+              <el-select @change="selecrPointsNumHandler" v-model="paymentForm.PointsObject" placeholder="请设置扣点数" style="width: 200px; margin: 0 20px">
+                <el-option label="同报名参会时的扣点数" value="1"> </el-option>
+                <el-option label="输入其余点数" value="2"> </el-option>
+              </el-select>
+              <el-input :disabled="paymentForm.PointsObject == 1" style="width: 150px; margin-right: 20px" v-model="paymentForm.PointsNum" placeholder="请输入扣点数" type="number"></el-input>
+              <el-input v-if="paymentForm.PointsObject == 2" style="width: 200px" v-model="paymentForm.GoodsMoney" placeholder="请输入无点数时的付费金额" type="number"></el-input>
+            </template>
+          </div>
+        </div>
         <div class="audio-content cover-content" style="margin-top: 10px" v-if="(fileListAudio.length || addEditVideo.length) && defaultImage">
           <span class="text" style="width: 70px; text-align: right">封面:</span>
           <div class="img-content">
@@ -362,6 +379,12 @@ export default {
       shareImg: "",
       videoAndVoiceList: [],
       areaType: 1,
+      paymentForm: {
+        IsPay: 0,
+        PointsObject: "",
+        PointsNum: 0,
+        GoodsMoney: 0,
+      },
     };
   },
   computed: {
@@ -532,6 +555,7 @@ export default {
         this.valTemporary = Data.TemporaryLabel;
         this.radioTemporary = this.valTemporary ? true : false;
         this.areaType = Data.AreaType;
+        this.paymentForm = Data.VivoPointsSet;
         // 复选框模块
         this.$nextTick(() => {
           let RefPage = this.$refs.researchSelect;
@@ -640,6 +664,10 @@ export default {
           VideoUrl: item.url,
         };
       });
+      console.log(this.paymentForm.PointsNum, this.paymentForm.GoodsMoney, !this.paymentForm.PointsNum, !this.paymentForm.GoodsMoney);
+
+      if (this.paymentForm.IsPay == 1 && !this.paymentForm.PointsObject) return this.$message.error("请选择设置扣点数");
+      if (this.paymentForm.PointsObject == 2 && (!(this.paymentForm.PointsNum >= 0) || !(this.paymentForm.GoodsMoney >= 0))) return this.$message.error("请输入点数或金额");
       this.saveTheRelease(type, arr, VoiceList, VideoDetail[0]);
     },
     //保存或发布
@@ -678,6 +706,11 @@ export default {
         IsResearch: this.optionFormregion.includes("研选") ? true : false,
         IsShowHz: RefPage.isShowHz ? 1 : 0,
         AreaType: this.areaType,
+        VivoPointsSet: {
+          ...this.paymentForm,
+          PointsNum: Number(this.paymentForm.PointsNum) || 0,
+          GoodsMoney: Number(this.paymentForm.GoodsMoney) || 0,
+        },
       });
 
       if (res.Ret !== 200) return;
@@ -1044,6 +1077,14 @@ export default {
         this.videoAndVoiceList = res.Data.List;
       }
     },
+    // 参会人扣点的选择
+    selecrPointsNumHandler() {
+      if (this.paymentForm.PointsObject == 1) {
+        let RefPage = this.$refs.researchSelect;
+        let PointsSet = RefPage.PointsSet;
+        this.paymentForm.PointsNum = PointsSet.UserPointsNum;
+      }
+    },
   },
 };
 </script>