瀏覽代碼

Merge remote-tracking branch 'origin/master'

yjwang 2 周之前
父節點
當前提交
0a6fbfcbc4

+ 10 - 0
src/api/hisStore/userEndCategory.js

@@ -56,3 +56,13 @@ export function listCategoryProducts(id, params) {
     params: { id, ...params }
   })
 }
+
+/** 批量保存关联排序(当前页商品 productId + sort,id 为用户分端类 ID) */
+export function saveCategoryProductsSort(id, items) {
+  return request({
+    url: '/store/store/userEndCategory/products/sort',
+    method: 'put',
+    params: { id },
+    data: items
+  })
+}

二進制
src/assets/logo/bjzmlxsh.png


+ 46 - 9
src/views/course/courseQuestionBank/index.vue

@@ -148,7 +148,7 @@
         </template>
       </el-table-column>
       <el-table-column label="排序" align="center" prop="sort" />
-      <el-table-column label="答案" align="center" prop="answer" />
+      <el-table-column v-if="!hideAnswerFields" label="答案" align="center" prop="answer" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -179,7 +179,7 @@
 
     <!-- 添加或修改题库对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="dynamicRules" label-width="80px">
         <el-form-item label="标题" prop="title">
           <el-input v-model="form.title" placeholder="请输入问题" />
         </el-form-item>
@@ -239,7 +239,7 @@
                 <el-input v-model="scope.row.name" :placeholder="getOptionLabel(scope.$index) + ':' + '请输入标题'" ></el-input>
               </template>
             </el-table-column>
-            <el-table-column label="是否为答案" prop="isWrite" >
+            <el-table-column v-if="!hideAnswerFields" label="是否为答案" prop="isWrite" >
               <template slot-scope="scope">
                 <el-tooltip
                   v-if="!scope.row.name"
@@ -272,12 +272,10 @@
             </el-table-column>
           </el-table>
         </el-form-item>
-        <el-form-item label="答案:" prop="answer">
-          <template slot-scope="scope">
-            <span style="background-color: #faedc9; font-size: 20px;">
-              {{ form.answer }}
-            </span>
-          </template>
+        <el-form-item v-if="!hideAnswerFields" label="答案:" prop="answer">
+          <span style="background-color: #faedc9; font-size: 20px;">
+            {{ form.answer }}
+          </span>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -338,6 +336,7 @@ import {
   getCatePidList,
   getCateListByPid
 } from '@/api/course/userCourseCategory'
+import { getConfigByKey } from '@/api/system/config'
 
 export default {
   name: "CourseQuestionBank",
@@ -345,6 +344,22 @@ export default {
     alphabet() {
       return 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
     },
+    /** 点播配置:不校验答案时隐藏列表/表单中的答案相关项(与 validateAnswerWhenWatch 为 false / "0" 一致) */
+    hideAnswerFields() {
+      const cfg = this.courseConfig;
+      if (!cfg || !Object.prototype.hasOwnProperty.call(cfg, 'validateAnswerWhenWatch')) {
+        return false;
+      }
+      const v = cfg.validateAnswerWhenWatch;
+      return v === false || v === '0' || v === 0 || v === 'false';
+    },
+    dynamicRules() {
+      const r = { ...this.rules };
+      if (this.hideAnswerFields) {
+        delete r.answer;
+      }
+      return r;
+    },
   },
   watch: {
   },
@@ -352,6 +367,8 @@ export default {
   },
   data() {
     return {
+      /** course.config 解析后的对象 */
+      courseConfig: {},
       exportFailLoading: false,
       //单选
       selectedAnswer:null,
@@ -433,6 +450,15 @@ export default {
   },
   created() {
     this.getList();
+    getConfigByKey('course.config').then(response => {
+      if (response.data && response.data.configValue) {
+        try {
+          this.courseConfig = JSON.parse(response.data.configValue) || {};
+        } catch (e) {
+          this.courseConfig = {};
+        }
+      }
+    }).catch(() => { this.courseConfig = {}; });
     this.getDicts("sys_course_temp_type").then(response => {
       this.typeOptions = response.data;
     });
@@ -631,6 +657,17 @@ export default {
             return
           }
 
+          if (this.hideAnswerFields) {
+            this.question.forEach(q => { q.isAnswer = 0 });
+            this.selectedAnswer = null;
+            this.selectedAnswers = [];
+            if (this.form.type === 2) {
+              this.form.answer = [];
+            } else {
+              this.form.answer = '';
+            }
+          }
+
           this.form.question=JSON.stringify(this.question)
 
           if (this.form.type===2){

+ 51 - 3
src/views/course/userCoursePeriod/courseStatistics.vue

@@ -303,7 +303,18 @@
             </template>
           </el-table-column>
           <el-table-column label="分公司名称" align="center" prop="companyName" width="150" />
-          <el-table-column label="销售名称" align="center" prop="salesName" />
+          <el-table-column label="销售名称" align="center" prop="salesName" width="120" />
+          <el-table-column
+            label="课程评分"
+            align="center"
+            prop="courseRating"
+            min-width="260"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <span class="course-rating-cell">{{ formatCourseRating(scope.row.courseRating) }}</span>
+            </template>
+          </el-table-column>
         </el-table>
 
         <!-- 分页 -->
@@ -532,9 +543,11 @@ export default {
       this.userDetailDialog.loading = true;
       getCourseStatisticsUserDetailList(this.userDetailDialog.queryParams).then(response => {
         if (response.code === 200 && response.data) {
-          const d = response.data;
+          const raw = response.data;
+          // 兼容 PageInfo 直接放在 data,或再包一层 data
+          const d = raw.data != null && raw.list == null && raw.rows == null ? raw.data : raw;
           this.userDetailDialog.list = d.list || d.rows || [];
-          this.userDetailDialog.total = d.total ?? 0;
+          this.userDetailDialog.total = d.total != null ? d.total : 0;
         } else {
           this.userDetailDialog.list = [];
           this.userDetailDialog.total = 0;
@@ -571,6 +584,29 @@ export default {
         });
       }).catch(() => {});
     },
+    /**
+     * 课程评分:后端在关闭「看课校验答案」时返回答题 JSON(courseRating);否则为空
+     */
+    formatCourseRating(val) {
+      if (val == null || val === '') {
+        return '—';
+      }
+      if (typeof val === 'string') {
+        const s = val.trim();
+        if (!s) return '—';
+        try {
+          const parsed = JSON.parse(s);
+          return typeof parsed === 'object' ? JSON.stringify(parsed) : String(val);
+        } catch (e) {
+          return val;
+        }
+      }
+      try {
+        return typeof val === 'object' ? JSON.stringify(val) : String(val);
+      } catch (e) {
+        return String(val);
+      }
+    },
     /** 格式化时长 */
     formatDuration(seconds) {
       if (seconds == null || isNaN(seconds)) return '0秒';
@@ -635,4 +671,16 @@ export default {
     overflow-y: auto;
   }
 }
+
+.course-rating-cell {
+  display: inline-block;
+  max-width: 100%;
+  text-align: left;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  font-size: 12px;
+  line-height: 1.4;
+  vertical-align: middle;
+}
 </style>

+ 89 - 1
src/views/course/userCoursePeriod/index.vue

@@ -163,7 +163,6 @@
         <el-table v-loading="loading" :data="periodList" @selection-change="handleSelectionChange" border>
           <el-table-column type="selection" width="55" align="center" />
           <el-table-column label="营期名称" align="center" prop="periodName" />
-          <el-table-column label="公司名称" align="center" prop="companyName" />
           <el-table-column label="营期状态" align="center" prop="periodStatus" width="100" :formatter="periodStatusFormatter" />
           <el-table-column label="营期线" align="center" prop="periodLine" width="180" />
           <el-table-column label="开营开始时间" align="center" prop="periodStartingTime" width="180" />
@@ -204,6 +203,12 @@
                 @click="handleClosePeriod(scope.row)"
                 v-hasPermi="['course:period:close']"
               >结束营期</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-office-building"
+                @click="openPeriodCompanyCards(scope.row)"
+              >公司列表</el-button>
               <el-button
                 size="mini"
                 type="text"
@@ -225,6 +230,35 @@
       </el-main>
     </el-container>
 
+    <!-- 当前营期关联公司(按行 companyId / companyName 解析) -->
+    <el-dialog
+      :title="periodCompanyCardTitle"
+      :visible.sync="periodCompanyCardVisible"
+      width="720px"
+      append-to-body
+    >
+      <div class="period-company-card-scroll">
+        <el-row v-if="periodCompanyCardList && periodCompanyCardList.length > 0" :gutter="12">
+          <el-col
+            v-for="(item, idx) in periodCompanyCardList"
+            :key="item.companyId != null ? String(item.companyId) + '-' + idx : 'noid-' + idx"
+            :xs="24"
+            :sm="12"
+            :md="8"
+          >
+            <el-card shadow="hover" class="period-company-name-card">
+              <div class="period-company-name-card__title">{{ item.companyName || '—' }}</div>
+              <div v-if="item.companyId != null && item.companyId !== ''" class="period-company-name-card__id">ID:{{ item.companyId }}</div>
+            </el-card>
+          </el-col>
+        </el-row>
+        <el-empty v-else description="该营期未关联公司" />
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="periodCompanyCardVisible = false">关 闭</el-button>
+      </span>
+    </el-dialog>
+
     <!-- 添加或修改会员营期对话框-->
     <el-drawer :title="title" :visible.sync="open" size="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
@@ -904,6 +938,10 @@ export default {
       batchSetRedPacketDisabled: true,
       // 批量设置红包弹出框
       batchRedPacketVisible: false,
+      // 营期行 — 关联公司卡片弹窗
+      periodCompanyCardVisible: false,
+      periodCompanyCardTitle: '公司列表',
+      periodCompanyCardList: [],
     };
   },
   created() {
@@ -1714,6 +1752,33 @@ export default {
         })
       }).catch(() => {})
     },
+    /** 当前营期行关联公司:解析 companyId、companyName(逗号分隔),卡片展示 */
+    openPeriodCompanyCards(row) {
+      const pname = row.periodName ? String(row.periodName) : ''
+      this.periodCompanyCardTitle = pname ? `公司列表 - ${pname}` : '公司列表'
+      const idStr = row.companyId != null && row.companyId !== '' ? String(row.companyId) : ''
+      const nameStr = row.companyName != null && row.companyName !== '' ? String(row.companyName) : ''
+      const ids = idStr ? idStr.split(',').map(s => s.trim()).filter(s => s !== '') : []
+      const names = nameStr ? nameStr.split(',').map(s => s.trim()) : []
+      const list = []
+      ids.forEach((id, i) => {
+        let companyName = names[i]
+        if (!companyName) {
+          const opt = (this.companyOptions || []).find(c => String(c.companyId) === String(id))
+          companyName = opt ? opt.companyName : ''
+        }
+        const num = Number(id)
+        list.push({
+          companyId: !isNaN(num) ? num : id,
+          companyName: companyName || '—'
+        })
+      })
+      if (list.length === 0 && names.length > 0) {
+        names.forEach(n => list.push({ companyId: null, companyName: n || '—' }))
+      }
+      this.periodCompanyCardList = list
+      this.periodCompanyCardVisible = true
+    },
     handleBatchRedPacketSuccess() {
       this.batchRedPacketVisible = false;
       this.getCourseList();
@@ -2108,4 +2173,27 @@ export default {
   display: flex;
   align-items: center;
 }
+
+.period-company-card-scroll {
+  max-height: 65vh;
+  overflow-y: auto;
+  padding-right: 4px;
+}
+
+.period-company-name-card {
+  margin-bottom: 12px;
+}
+
+.period-company-name-card__title {
+  font-weight: 600;
+  font-size: 14px;
+  line-height: 1.4;
+  word-break: break-all;
+}
+
+.period-company-name-card__id {
+  margin-top: 8px;
+  font-size: 12px;
+  color: #909399;
+}
 </style>

+ 2 - 2
src/views/hisStore/store/recommend.vue

@@ -148,7 +148,7 @@
     <!-- 添加或修改推荐店铺对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-        <el-form-item label="推荐店铺Id" prop="storeName">
+        <el-form-item label="推荐店铺Id" prop="storeId">
           <el-select
             v-model="form.storeId"
             filterable
@@ -289,7 +289,7 @@ export default {
         this.storeLoading = true;
         // 这里应该调用实际的API来搜索店铺
         // 示例代码,需要根据实际API调整
-        listStore({ storeName: query }).then(response => {
+        listStore({ storeId: query }).then(response => {
           this.storeOptions = response.rows;
           this.storeLoading = false;
         }).catch(() => {

+ 24 - 4
src/views/hisStore/storeProduct/index.vue

@@ -763,8 +763,18 @@
           <el-col :span="24">
             <el-form-item label="运费模板:" prop="tempId">
               <div class="acea-row">
-                <el-select v-model="form.tempId"  class="mr20">
-                  <el-option v-for="(item,index) in templateList" :value="item.id" :key="index" :label="item.name">
+                <el-select
+                  v-model="form.tempId"
+                  class="mr20"
+                  filterable
+                  placeholder="可以输入文字进行过滤匹配"
+                >
+                  <el-option
+                    v-for="(item, index) in templateList"
+                    :value="item.id"
+                    :key="index"
+                    :label="item.name"
+                  >
                   </el-option>
                 </el-select>
               </div>
@@ -1269,6 +1279,9 @@ export default {
       if (row.isAudit == 0) {
         return '待审核';
       }
+      if (row.isAudit == 2) {
+        return '审核退回';
+      }
       const option = this.isShowOptions.find(item => item.dictValue == row.isShow);
       return option ? option.dictLabel : '未知状态';
     },
@@ -1277,8 +1290,15 @@ export default {
       if (row.isAudit == 0) {
         return 'warning';
       }
-      // 根据你的业务逻辑返回不同的类型,如:success, danger, info等
-      return row.isShow == 1 ? 'success' : 'info';
+      if (row.isAudit == 2) {
+        return 'danger';
+      }
+      const statusMap = {
+        0: 'warning',
+        1: 'success',
+        2: 'danger'
+      };
+      return statusMap[row.isShow] || 'info';
     },
     cancel1(){
       this.open1 = false;

+ 38 - 3
src/views/hisStore/storeProduct/indexZm.vue

@@ -791,9 +791,19 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="运费模板:" prop="tempId">
-              <div class="acea-row">
-                <el-select v-model="form.tempId"  class="mr20">
-                  <el-option v-for="(item,index) in templateList" :value="item.id" :key="index" :label="item.name">
+             <div class="acea-row">
+                <el-select
+                  v-model="form.tempId"
+                  class="mr20"
+                  filterable
+                  placeholder="可以输入文字进行过滤匹配"
+                >
+                  <el-option
+                    v-for="(item, index) in templateList"
+                    :value="item.id"
+                    :key="index"
+                    :label="item.name"
+                  >
                   </el-option>
                 </el-select>
               </div>
@@ -879,6 +889,19 @@
           </el-col>
 
         </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="单次购买数量" prop="singlePurchaseLimit">
+              <el-input-number
+                :min="0"
+                v-model="form.singlePurchaseLimit"
+                placeholder="单次下单最多件数,0不限"
+                :controls="true"
+                @input="handleSinglePurchaseLimitInput"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-form-item label="推广分类" prop="tuiCateId">
           <el-select style="width: 240px" v-model="form.tuiCateId" placeholder="请选择推广分类" clearable size="small" >
             <el-option
@@ -1514,6 +1537,17 @@ export default {
         }
       }
     },
+    handleSinglePurchaseLimitInput(value) {
+      if (value !== null && value !== undefined && value !== '') {
+        if (isNaN(value) || value < 0) {
+          this.$nextTick(() => {
+            this.form.singlePurchaseLimit = null;
+          });
+        } else {
+          this.form.singlePurchaseLimit = Math.floor(Number(value));
+        }
+      }
+    },
     // 删除规格
     handleRemoveRole (index) {
       this.attrs.splice(index, 1);
@@ -1779,6 +1813,7 @@ export default {
         contraindications: null, // 禁忌
         precautions: null ,// 注意事项
         purchaseLimit: null, // 限购数量
+        singlePurchaseLimit: null, // 单次购买数量上限
         userEndCategoryIds: [],
         tagIds: []
       };

+ 81 - 7
src/views/hisStore/userEndCategory/index.vue

@@ -50,7 +50,7 @@
           <el-tag v-else type="info">隐藏</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="排序" align="center" prop="sort" width="80" />
+      <el-table-column label="分类排序" align="center" prop="sort" width="80" />
       <el-table-column label="关联商品" align="center" width="120">
         <template slot-scope="scope">
           <el-button type="text" @click="showCategoryProducts(scope.row)">查看</el-button>
@@ -97,11 +97,26 @@
     </el-dialog>
 
     <!-- 关联商品弹窗 -->
-    <el-dialog title="关联商品" :visible.sync="productsOpen" width="960px" append-to-body>
-      <div class="mb8">关联商品数量: {{ productsTotal }}个</div>
+    <el-dialog title="关联商品" :visible.sync="productsOpen" width="1000px" append-to-body @closed="onProductsDialogClosed">
+      <div class="products-toolbar mb8">
+        <el-button
+          v-hasPermi="['store:userEndCategory:edit']"
+          size="small"
+          :type="productsSortEditMode ? 'warning' : 'default'"
+          @click="toggleProductsSortEdit"
+        >{{ productsSortEditMode ? '取消调整' : '调整排序' }}</el-button>
+        <el-button
+          v-hasPermi="['store:userEndCategory:edit']"
+          type="primary"
+          size="small"
+          :disabled="!productsSortEditMode"
+          @click="saveProductsSortAction"
+        >保存排序</el-button>
+        <span class="products-count">关联商品数量: {{ productsTotal }}个</span>
+      </div>
       <el-table v-loading="productsLoading" :data="productsList" border>
         <el-table-column label="商品ID" align="center" prop="productId" width="80" />
-        <el-table-column label="商品名称" align="center" prop="productName" min-width="140" show-overflow-tooltip />
+        <el-table-column label="商品名称" align="center" prop="productName" min-width="100" show-overflow-tooltip />
         <el-table-column label="售价" align="center" width="100">
           <template slot-scope="scope">
             <span v-if="scope.row.price != null">¥{{ scope.row.price.toFixed(2) }}</span>
@@ -123,6 +138,20 @@
             <span v-else>-</span>
           </template>
         </el-table-column>
+        <el-table-column label="商品排序" align="center" width="140">
+          <template slot-scope="scope">
+            <el-input-number
+              v-model="scope.row.sort"
+              :min="0"
+              :max="9999"
+              :step="1"
+              size="small"
+              controls-position="right"
+              :disabled="!productsSortEditMode"
+              class="product-sort-input"
+            />
+          </template>
+        </el-table-column>
       </el-table>
       <pagination v-show="productsTotal>0" :total="productsTotal" :page.sync="productsQuery.pageNum" :limit.sync="productsQuery.pageSize" @pagination="loadCategoryProducts" />
     </el-dialog>
@@ -130,7 +159,7 @@
 </template>
 
 <script>
-import { listUserEndCategory, getUserEndCategory, addUserEndCategory, updateUserEndCategory, delUserEndCategory, listCategoryProducts } from '@/api/hisStore/userEndCategory'
+import { listUserEndCategory, getUserEndCategory, addUserEndCategory, updateUserEndCategory, delUserEndCategory, listCategoryProducts, saveCategoryProductsSort } from '@/api/hisStore/userEndCategory'
 import Material from '@/components/Material'
 
 export default {
@@ -169,7 +198,8 @@ export default {
       productsList: [],
       productsTotal: 0,
       productsQuery: { pageNum: 1, pageSize: 10 },
-      currentCategoryId: null
+      currentCategoryId: null,
+      productsSortEditMode: false
     }
   },
   created() {
@@ -252,14 +282,44 @@ export default {
     showCategoryProducts(row) {
       this.currentCategoryId = row.id
       this.productsQuery = { pageNum: 1, pageSize: 10 }
+      this.productsSortEditMode = false
       this.productsOpen = true
       this.loadCategoryProducts()
     },
+    onProductsDialogClosed() {
+      this.productsSortEditMode = false
+    },
+    toggleProductsSortEdit() {
+      if (this.productsSortEditMode) {
+        this.productsSortEditMode = false
+        this.loadCategoryProducts()
+      } else {
+        this.productsSortEditMode = true
+      }
+    },
+    saveProductsSortAction() {
+      if (!this.productsSortEditMode || !this.currentCategoryId) return
+      const payload = this.productsList.map(r => {
+        let s = r.sort != null && r.sort !== '' ? Number(r.sort) : 0
+        if (Number.isNaN(s)) s = 0
+        s = Math.min(9999, Math.max(0, s))
+        return { productId: r.productId, sort: s }
+      })
+      saveCategoryProductsSort(this.currentCategoryId, payload).then(() => {
+        this.msgSuccess('保存成功')
+        this.productsSortEditMode = false
+        this.loadCategoryProducts()
+      })
+    },
     loadCategoryProducts() {
       if (!this.currentCategoryId) return
       this.productsLoading = true
       listCategoryProducts(this.currentCategoryId, this.productsQuery).then(response => {
-        this.productsList = response.rows || []
+        const rows = response.rows || []
+        this.productsList = rows.map(r => ({
+          ...r,
+          sort: r.sort != null && r.sort !== '' ? Number(r.sort) : 0
+        }))
         this.productsTotal = response.total || 0
         this.productsLoading = false
       })
@@ -270,4 +330,18 @@ export default {
 
 <style scoped>
 .mr4 { margin-right: 4px; }
+.products-toolbar {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  gap: 8px;
+}
+.products-count {
+  margin-left: auto;
+  color: #606266;
+  font-size: 13px;
+}
+.product-sort-input >>> .el-input__inner {
+  text-align: left;
+}
 </style>

+ 1 - 1
src/views/live/liveAnchor/index.vue

@@ -356,7 +356,7 @@ export default {
   }
 };
 </script>
-<style >
+<style  scoped>
 .el-form-item__label {
   width: 120px !important;
 }

+ 29 - 9
src/views/system/config/config.vue

@@ -43,7 +43,10 @@
           <el-form-item label="DeepSeekChat模型名称" prop="DeepSeekChatModelName">
             <el-input v-model="form40.modelName" placeholder="请输入DeepSeekChat模型名称"></el-input>
           </el-form-item>
-          <el-form-item label="系统可见外呼网关" prop="showGatewayIds">
+          <el-form-item label="是否限制外呼网关" prop="enableGateWayLimit">
+            <el-switch v-model="form40.enableGateWayLimit"></el-switch>
+          </el-form-item>
+          <el-form-item label="系统可见外呼网关" prop="showGatewayIds" v-if="!!form40.enableGateWayLimit">
             <!-- <el-input v-model="" placeholder="请输入DeepSeekChat模型名称"></el-input> -->
              <el-select v-model="form40.showGatewayIds" multiple filterable placeholder="请选择系统可见外呼网关">
               <el-option
@@ -1316,6 +1319,14 @@
               <el-input-number v-model="form18.answerErrorCount" :min="1"></el-input-number>
             </el-tooltip>
           </el-form-item>
+          <el-form-item label="看课是否校验答案">
+            <el-tooltip class="item" effect="dark" content="默认为「是」:需校验答题正确性;选「否」则不做答案校验" placement="top-end">
+              <el-radio-group v-model="form18.validateAnswerWhenWatch">
+                <el-radio label="1">是</el-radio>
+                <el-radio label="0">否</el-radio>
+              </el-radio-group>
+            </el-tooltip>
+          </el-form-item>
           <el-form-item label="每十分钟获取积分">
             <el-tooltip class="item" effect="dark" content="每十分钟获取多少积分" placement="top-end">
               <el-input-number v-model="form18.videoIntegral" :min="1"></el-input-number>
@@ -2900,6 +2911,8 @@ export default {
         smsDomainName: '', // 初始化为空字符串或其他默认值
         completionCountdown: false,//是否开启点播完课倒计时
         camelCase:'',
+        /** 看课是否校验答案:1-是(默认) 0-否,随 course.config JSON 保存 */
+        validateAnswerWhenWatch: '1',
       },
       form19: {},
       form20: {
@@ -3093,11 +3106,6 @@ export default {
     }
   },
   created() {
-        getGatewayList().then(res=>{
-      this.gatewayList = res.data;
-      console.log(this.gatewayList);
-    }).catch(res=>{
-    })
     this.checkProjectName();
     this.getConfigByKey(this.activeName)
     listStore().then(response => {
@@ -3369,8 +3377,9 @@ export default {
       this.form2.inquirySubType.splice(index, 1)
     },
     handleClick(tab, event) {
-      this.getConfigByKey(tab.name)
-
+    this.getConfigByKey(tab.name)
+     
+      
     },
     handleAddProduct() {
       setTimeout(() => {
@@ -3505,7 +3514,11 @@ export default {
           console.log(this.form16)
         }
         if (key == 'course.config') {
-          this.form18 = JSON.parse(response.data.configValue)
+          const parsed = JSON.parse(response.data.configValue)
+          if (parsed.validateAnswerWhenWatch == null || parsed.validateAnswerWhenWatch === '') {
+            parsed.validateAnswerWhenWatch = '1'
+          }
+          this.form18 = parsed
         }
         if (key == 'redPacket.config') {
           this.form19 = JSON.parse(response.data.configValue)
@@ -3601,6 +3614,13 @@ export default {
             console.log(this.form32 );
           }
         }
+         if(key == "cId.config" && !!this.form40.enableGateWayLimit){
+        getGatewayList().then(res=>{
+          this.gatewayList = res.data;
+          console.log(this.gatewayList);
+        }).catch(res=>{
+        })
+      }
       })
     },
     /** 提交按钮 */