yangc 7 years ago
parent
commit
9e37c8af84
3 changed files with 8 additions and 2 deletions
  1. 1 0
      components/main/Search.vue
  2. 1 1
      components/search/SupplierList.vue
  3. 6 1
      utils/baseUtils.js

+ 1 - 0
components/main/Search.vue

@@ -297,6 +297,7 @@
       },
       setNewSearchType (type) {
         this.newSearchType = type
+        this.onSearch()
       }
     },
     created () {

+ 1 - 1
components/search/SupplierList.vue

@@ -14,7 +14,7 @@
             <span>地址:</span><span :title="item.enAddress">{{item.enAddress || '暂无信息'}}</span>
           </p>
           <p>
-            <span>邮箱:</span><span :title="item.enEmail">{{item.enEmail || '暂无信息'}}</span>
+            <span>邮箱:</span><span :title="item.enEmail">{{baseUtils.isEmptyStr(item.enEmail) ? '暂无信息' : item.enEmail}}</span>
             <span class="split_line">|</span>
             <span>电话:</span><span :title="item.enTel">{{item.enTel || '暂无信息'}}</span>
             <span class="split_line">|</span>

+ 6 - 1
utils/baseUtils.js

@@ -456,6 +456,10 @@ const _onFileUpload = ($this, file) => {
   }
 }
 
+const _isEmptyStr = (str) => {
+  return !str || !str.trim()
+}
+
 export default {
   // 获取字符串字符长度
   getRealLen: _getRealLen,
@@ -497,5 +501,6 @@ export default {
   // 统一通知框
   setMessage: _setMessage,
   // 文件上传
-  onFileUpload: _onFileUpload
+  onFileUpload: _onFileUpload,
+  isEmptyStr: _isEmptyStr
 }