|
@@ -271,27 +271,27 @@ $(function(){
|
|
|
$('#topSearch').on("click", '.searchBtn', function(){
|
|
|
var type = isPC ? $('#topSearch').find('[data-select]').attr("data-select")*1 : $('#topSearch').find('select').val()*1;
|
|
|
var keyword = $.trim($('#topSearch').find('.keyword').val());
|
|
|
- if (keyword.length < 2) {
|
|
|
- $.confirm({
|
|
|
- useBootstrap: false,
|
|
|
- boxWidth: (isPC?'300px':'70%'),
|
|
|
- title:'提示',
|
|
|
- content:'请至少输入两个关键字!',
|
|
|
- closeIcon: true,
|
|
|
- animation: 'opacity',
|
|
|
- closeAnimation: 'opacity',
|
|
|
- animateFromElement: false,
|
|
|
- buttons: {
|
|
|
- close: {
|
|
|
- text: '确定',
|
|
|
- btnClass: 'btn-confirm'
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
if (type === 0) {
|
|
|
// 商品
|
|
|
+ if (keyword.length < 2) {
|
|
|
+ $.confirm({
|
|
|
+ useBootstrap: false,
|
|
|
+ boxWidth: (isPC?'300px':'70%'),
|
|
|
+ title:'提示',
|
|
|
+ content:'请至少输入两个关键字!',
|
|
|
+ closeIcon: true,
|
|
|
+ animation: 'opacity',
|
|
|
+ closeAnimation: 'opacity',
|
|
|
+ animateFromElement: false,
|
|
|
+ buttons: {
|
|
|
+ close: {
|
|
|
+ text: '确定',
|
|
|
+ btnClass: 'btn-confirm'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
window.location.href = '/product/list.html?keyword='+encodeURIComponent(keyword);
|
|
|
} else if(type === 1) {
|
|
|
// 供应商
|