|
|
@ -141,7 +141,7 @@ Scene({ |
|
|
}) |
|
|
}) |
|
|
// 利用filter方法,剔除之前存在的空元素
|
|
|
// 利用filter方法,剔除之前存在的空元素
|
|
|
orderList = orderList.filter(function (item) { |
|
|
orderList = orderList.filter(function (item) { |
|
|
return item != ''; // 注:IE9(不包含IE9)以下的版本没有trim()方法
|
|
|
|
|
|
|
|
|
return item != '' // 注:IE9(不包含IE9)以下的版本没有trim()方法
|
|
|
}) |
|
|
}) |
|
|
// 利用sort方法进行排序
|
|
|
// 利用sort方法进行排序
|
|
|
orderList.sort(this.listSort('sign')) |
|
|
orderList.sort(this.listSort('sign')) |
|
|
@ -156,8 +156,8 @@ Scene({ |
|
|
// 排序
|
|
|
// 排序
|
|
|
listSort(sign) { |
|
|
listSort(sign) { |
|
|
return function (a, b) { |
|
|
return function (a, b) { |
|
|
var value1 = a[sign].charCodeAt(); |
|
|
|
|
|
var value2 = b[sign].charCodeAt(); |
|
|
|
|
|
|
|
|
var value1 = a[sign].charCodeAt() |
|
|
|
|
|
var value2 = b[sign].charCodeAt() |
|
|
return value1 - value2 |
|
|
return value1 - value2 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -166,7 +166,8 @@ Scene({ |
|
|
let result = [] |
|
|
let result = [] |
|
|
this.data.orderList.forEach(item => { |
|
|
this.data.orderList.forEach(item => { |
|
|
item.data.forEach(element => { |
|
|
item.data.forEach(element => { |
|
|
if (element.name.indexOf(detail.toLocaleUpperCase()) !== -1 || element.mobile.indexOf(detail.toLocaleUpperCase()) !== -1) { |
|
|
|
|
|
|
|
|
var keyword = detail.toLocaleUpperCase() |
|
|
|
|
|
if (element.name.indexOf(keyword) !== -1 || element.mobile.indexOf(keyword) !== -1) { |
|
|
result.push(element) |
|
|
result.push(element) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -214,10 +215,10 @@ Scene({ |
|
|
wx.navigateTo({ url: `/pages/home/customer-info/index?` }) |
|
|
wx.navigateTo({ url: `/pages/home/customer-info/index?` }) |
|
|
}, |
|
|
}, |
|
|
rpx2px: function(rpx) { |
|
|
rpx2px: function(rpx) { |
|
|
return rpx / 750 * app.globalData.windowWidth; |
|
|
|
|
|
|
|
|
return rpx / 750 * app.globalData.windowWidth |
|
|
}, |
|
|
}, |
|
|
px2rpx: function(px) { |
|
|
px2rpx: function(px) { |
|
|
return px * 750 / app.globalData.windowWidth; |
|
|
|
|
|
|
|
|
return px * 750 / app.globalData.windowWidth |
|
|
}, |
|
|
}, |
|
|
touchStart: function(e) { |
|
|
touchStart: function(e) { |
|
|
this.setData({ touchmove: true }) |
|
|
this.setData({ touchmove: true }) |
|
|
|