فهرست منبع

feat: 优化猜你想问请求

zhangyuhan 8 ماه پیش
والد
کامیت
0dbe54ebcb
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/views/CustomerView.vue

+ 2 - 2
src/views/CustomerView.vue

@@ -1403,7 +1403,7 @@ export default {
       }
     },
     // 猜你想问
-    async getResult (name) {
+    getResult: debounce(async function (name) {
       // 名称为空或长度小于2不发请求
       if (!name || name.length < 2) return
       const userSide = this.login.userType === 2 && this.other.userType === 1
@@ -1419,7 +1419,7 @@ export default {
           this.hintShow = true
         }
       }
-    },
+    }, 350),
     // 选择联想问题发送客服
     chooseQuestion (item) {
       const { question, answer } = item