diff --git a/pages/home/customer-code/index.wxml b/pages/home/customer-code/index.wxml
index f2d548c..3d08651 100644
--- a/pages/home/customer-code/index.wxml
+++ b/pages/home/customer-code/index.wxml
@@ -9,7 +9,7 @@
{{name || ''}}
- 电话号码:18545124454
+ 联系电话:18545124454
diff --git a/pages/home/customer-list/index.js b/pages/home/customer-list/index.js
index 13ac61c..5ca4b4a 100644
--- a/pages/home/customer-list/index.js
+++ b/pages/home/customer-list/index.js
@@ -161,18 +161,22 @@ Scene({
return value1 - value2
}
},
- onChange: function({detail}) {
- this.setData({ ['form.name']: detail })
- let result = []
- this.data.orderList.forEach(item => {
- item.data.forEach(element => {
- var keyword = detail.toLocaleUpperCase()
- if (element.name.indexOf(keyword) !== -1 || element.mobile.indexOf(keyword) !== -1) {
- result.push(element)
- }
+ onChange: function(e) {
+ if(util.isEmpty(e.detail) || (e.detail !== e.detail + '')){
+ this.setData({ ['form.name']: '', searchList: [], loading: false })
+ } else {
+ this.setData({ ['form.name']: e.detail, loading: true })
+ let result = []
+ this.data.orderList.forEach(item => {
+ item.data.forEach(element => {
+ var keyword = e.detail.toLocaleUpperCase()
+ if (element.name.indexOf(keyword) !== -1 || element.mobile.indexOf(keyword) !== -1) {
+ result.push(element)
+ }
+ })
})
- })
- this.setData({ searchList: result })
+ this.setData({ searchList: result, loading: false })
+ }
},
onSearch: function(){
this.onRefreshList()
diff --git a/pages/home/customer-list/index.wxml b/pages/home/customer-list/index.wxml
index 74e09f0..f5947dc 100644
--- a/pages/home/customer-list/index.wxml
+++ b/pages/home/customer-list/index.wxml
@@ -35,9 +35,9 @@
{{finished?'到底啦~':'加载中...'}}
-->
-
-
- 添加客户
+
+
+ 取消
@@ -47,8 +47,15 @@
{{loading? '正在加载' : '暂无数据'}}
-
+
+
+
+
+
+
+ {{loading? '正在搜索' : '暂无数据'}}
+
@@ -70,7 +77,7 @@
{{pageItem.sign}}
-
+
{{item.name || ''}}
@@ -90,9 +97,9 @@
-
+