Selaa lähdekoodia

fix:搜索白名单字段取参错误处理

zhangsiya 1 vuosi sitten
vanhempi
commit
f724a82f1c

+ 2 - 4
apps/bigmember_pc/src/views/search/bidding/model/modules/before-search.js

@@ -20,7 +20,7 @@ export function beforeSearchModel (paramsObj = { }) {
 
     const { error_code: code, data } = await getInAntiSpiderWhiteList()
     if(code === 0 && data) {
-      onTheWhiteList.value = data.onTheWhiteList
+      onTheWhiteList.value = data.onTheWhitelist
 
       if (Array.isArray(data.filterReg)) {
         const newExp = []
@@ -29,9 +29,7 @@ export function beforeSearchModel (paramsObj = { }) {
         })
         commonSearchWordsRegExp.value = newExp
       }
-
-
-      if (keywords && !onTheWhiteList) {
+      if (keywords && !onTheWhiteList.value) {
         const timer = setTimeout(function() {
           clearTimeout(timer)
           const hasCommonWords = checkAndClearTextIncludesCommonWords(keywords)