|
@@ -220,13 +220,17 @@
|
|
|
this.recentCustomers.push(item)
|
|
|
uni.setStorageSync('recentCustomers', this.recentCustomers)
|
|
|
}else{
|
|
|
- let _copyList = this.$u.deepClone(this.recentCustomers);
|
|
|
+ let _isDel = false
|
|
|
for (let i = 0; i < this.recentCustomers.length; i++) {
|
|
|
- if (this.recentCustomers[i].customerPhone != item.customerPhone) {
|
|
|
- _copyList.push(item)
|
|
|
- uni.setStorageSync('recentCustomers', _copyList)
|
|
|
+ if (this.recentCustomers[i].customerPhone == item.customerPhone) {
|
|
|
+ _isDel = true
|
|
|
}
|
|
|
}
|
|
|
+ if(!_isDel){
|
|
|
+ let _data = uni.getStorageSync('recentCustomers')
|
|
|
+ _data.push(item)
|
|
|
+ uni.setStorageSync('recentCustomers', _data)
|
|
|
+ }
|
|
|
}
|
|
|
// uni.hideLoading()
|
|
|
uni.navigateBack()
|
|
@@ -345,20 +349,20 @@
|
|
|
// }
|
|
|
// }
|
|
|
},
|
|
|
- emptysearch() {
|
|
|
+ emptysearch() {debugger
|
|
|
this.show = false
|
|
|
this.searchKeyWord = ''
|
|
|
this.gridList = []
|
|
|
this.currentPage = 1
|
|
|
this.getList()
|
|
|
},
|
|
|
- doSearch() {
|
|
|
+ doSearch() {debugger
|
|
|
this.show = true
|
|
|
this.gridList = []
|
|
|
this.currentPage = 1
|
|
|
this.getList()
|
|
|
},
|
|
|
- getList() {
|
|
|
+ getList() {debugger
|
|
|
var that = this
|
|
|
var url = ''
|
|
|
var data = {}
|