Преглед изворни кода

1.修改看课记录中的是否是会员判断查询

jzp пре 2 дана
родитељ
комит
c893b064a7

+ 8 - 0
src/views/course/courseWatchLog/index.vue

@@ -1039,6 +1039,14 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      // 如果用户没有手动选择是否为会员,则根据 qwUserId 自动判断
+      if (this.queryParams.isVip === null || this.queryParams.isVip === undefined || this.queryParams.isVip === '') {
+        if (this.queryParams.qwUserId) {
+          this.queryParams.isVip = 1; // 有 qwUserId 则为会员
+        } else if (this.queryParams.qwUserId === null || this.queryParams.qwUserId === '') {
+          this.queryParams.isVip = 0; // 没有 qwUserId 则不是会员
+        }
+      }
       this.queryParams.pageNum = 1;
       this.getList();
     },

+ 11 - 0
src/views/course/courseWatchLog/watchLog.vue

@@ -1064,6 +1064,15 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
+      // 如果用户没有手动选择是否为会员,则根据 qwUserId 自动判断
+      if (this.queryParams.isVip === null || this.queryParams.isVip === undefined || this.queryParams.isVip === '') {
+        if (this.queryParams.qwUserId) {
+          this.queryParams.isVip = 1; // 有 qwUserId 则为会员
+        } else if (this.queryParams.qwUserId === null || this.queryParams.qwUserId === '') {
+          this.queryParams.isVip = 0; // 没有 qwUserId 则不是会员
+        }
+      }
+
       this.queryParams.pageNum = 1;
       this.getList();
     },
@@ -1082,6 +1091,8 @@ export default {
       this.queryParams.scheduleStartTime = null;
       this.queryParams.scheduleEndTime = null;
       this.queryParams.sopId = null; // 重置SOP ID
+      this.queryParams.isVip = null; // 重置 isVip 状态
+      this.queryParams.qwUserId = null; // 重置 qwUserId
 
       // 重置SOP搜索
       this.handleSopClear();