| | |
| | | // console.log(2324345) |
| | | that.getInputData(); |
| | | // console.log(that.searchDatas) |
| | | var han = /^[\u4e00-\u9fa5]+$/; |
| | | if (han.test(that.searchDatas)) { |
| | | that.getData(0, that.searchDatas); |
| | | $('.searchLMain').show(); |
| | | } else { |
| | | $('.searchLMain').hide(); |
| | | if(typeof that.searchDatas == 'string'){ |
| | | var han = /^[\u4e00-\u9fa5]+$/; |
| | | if (han.test(that.searchDatas) || that.searchDatas == ' ') { |
| | | that.getData(0, that.searchDatas); |
| | | $('.searchLMain').show(); |
| | | } else { |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | | var layer = layui.layer //弹层 |
| | | // layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 }); |
| | | layer.tips('请先填写关键字', '.searchImg',{ |
| | | tips: [2,'#FF5722'] |
| | | }); |
| | | }) |
| | | $('.searchLMain').hide(); |
| | | } |
| | | }else{ |
| | | if(that.searchDatas[0] && that.searchDatas[1]){ |
| | | console.log(that.searchDatas); |
| | | }else{ |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | | var layer = layui.layer //弹层 |
| | | // layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 }); |
| | | layer.tips('请先填写完整坐标', '.searchImg',{ |
| | | tips: [2,'#FF5722'] |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | $(".searchColce").click(function () { |
| | |
| | | } |
| | | }, |
| | | getData: function (index, val) { |
| | | val = val == ' '? '': val; |
| | | var d = $('.searchLMain').find('.layui-tab-item').hide; |
| | | // console.log(d) |
| | | var that = this, |