feat/task1-c-wallet
devil_gong 2018-08-31 15:53:59 +08:00
parent 7a8dfdd32a
commit a4f7574e45
61 changed files with 960 additions and 44 deletions

View File

@ -0,0 +1,185 @@
<?php
namespace Admin\Controller;
/**
* 品牌分类管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class BrandCategoryController extends CommonController
{
/**
* [_initialize 前置操作-继承公共前置方法]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public function _initialize()
{
// 调用父类前置方法
parent::_initialize();
// 登录校验
$this->Is_Login();
// 权限校验
$this->Is_Power();
}
/**
* [Index 品牌分类列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
$this->assign('common_is_enable_list', L('common_is_enable_list'));
$this->display('Index');
}
/**
* [GetNodeSon 获取节点子列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:19:45+0800
*/
public function GetNodeSon()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(L('common_unauthorized_access'));
}
// 获取数据
$field = array('id', 'name', 'sort', 'is_enable');
$data = M('BrandCategory')->field($field)->where(array('pid'=>intval(I('id', 0))))->select();
if(!empty($data))
{
foreach($data as $k=>$v)
{
$data[$k]['is_son'] = $this->IsExistSon($v['id']);
$data[$k]['ajax_url'] = U('Admin/BrandCategory/GetNodeSon', array('id'=>$v['id']));
$data[$k]['delete_url'] = U('Admin/BrandCategory/Delete');
$data[$k]['json'] = json_encode($v);
}
}
$msg = empty($data) ? L('common_not_data_tips') : L('common_operation_success');
$this->ajaxReturn($msg, 0, $data);
}
/**
* [IsExistSon 节点是否存在子数据]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:22:47+0800
* @param [int] $id [节点id]
* @return [string] [有数据ok, 则no]
*/
private function IsExistSon($id)
{
if(!empty($id))
{
return (M('BrandCategory')->where(array('pid'=>$id))->count() > 0) ? 'ok' : 'no';
}
return 'no';
}
/**
* [Save 品牌分类保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(L('common_unauthorized_access'));
}
// id为空则表示是新增
$m = D('BrandCategory');
// 公共额外数据处理
$m->sort = intval(I('sort'));
// 添加
if(empty($_POST['id']))
{
if($m->create($_POST, 1))
{
// 额外数据处理
$m->add_time = time();
$m->name = I('name');
// 写入数据库
if($m->add())
{
$this->ajaxReturn(L('common_operation_add_success'));
} else {
$this->ajaxReturn(L('common_operation_add_error'), -100);
}
}
} else {
// 编辑
if($m->create($_POST, 2))
{
// 额外数据处理
$m->name = I('name');
$m->upd_time = time();
// 移除 id
unset($m->id);
// 更新数据库
if($m->where(array('id'=>I('id')))->save())
{
$this->ajaxReturn(L('common_operation_edit_success'));
} else {
$this->ajaxReturn(L('common_operation_edit_error'), -100);
}
}
}
$this->ajaxReturn($m->getError(), -1);
}
/**
* [Delete 品牌分类删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
if(!IS_AJAX)
{
$this->error(L('common_unauthorized_access'));
}
$m = D('BrandCategory');
if($m->create($_POST, 5))
{
if($m->delete(I('id')))
{
$this->ajaxReturn(L('common_operation_delete_success'));
} else {
$this->ajaxReturn(L('common_operation_delete_error'), -100);
}
} else {
$this->ajaxReturn($m->getError(), -1);
}
}
}
?>

View File

@ -0,0 +1,333 @@
<?php
namespace Admin\Controller;
/**
* 品牌管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class BrandController extends CommonController
{
/**
* [_initialize 前置操作-继承公共前置方法]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public function _initialize()
{
// 调用父类前置方法
parent::_initialize();
// 登录校验
$this->Is_Login();
// 权限校验
$this->Is_Power();
}
/**
* [Index 品牌列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 参数
$param = array_merge($_POST, $_GET);
// 模型对象
$m = M('Brand');
// 条件
$where = $this->GetIndexWhere();
// 分页
$number = MyC('admin_page_number');
$page_param = array(
'number' => $number,
'total' => $m->where($where)->count(),
'where' => $param,
'url' => U('Admin/Brand/Index'),
);
$page = new \Library\Page($page_param);
// 获取列表
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('id desc')->select());
// 参数
$this->assign('param', $param);
// 分页
$this->assign('page_html', $page->GetPageHtml());
// 是否启用
$this->assign('common_is_enable_list', L('common_is_enable_list'));
// 品牌分类
$brand_category = M('BrandCategory')->where(['is_enable'=>1])->field('id,name')->select();
$this->assign('brand_category', $brand_category);
// 数据列表
$this->assign('list', $list);
$this->display('Index');
}
/**
* [SetDataHandle 数据处理]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-29T21:27:15+0800
* @param [array] $data [轮播图片数据]
* @return [array] [处理好的数据]
*/
private function SetDataHandle($data)
{
if(!empty($data))
{
$common_is_enable_tips = L('common_is_enable_tips');
foreach($data as &$v)
{
// 是否启用
$v['is_enable_text'] = $common_is_enable_tips[$v['is_enable']]['name'];
// 分类名称
$v['brand_category_text'] = M('BrandCategory')->where(['id'=>$v['brand_category_id']])->getField('name');
// logo
$v['logo'] = empty($v['logo']) ? '' : C('IMAGE_HOST').$v['logo'];
// 添加时间
$v['add_time_text'] = date('Y-m-d H:i:s', $v['add_time']);
// 更新时间
$v['upd_time_text'] = date('Y-m-d H:i:s', $v['upd_time']);
}
}
return $data;
}
/**
* [GetIndexWhere 列表条件]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-10T22:16:29+0800
*/
private function GetIndexWhere()
{
$where = array();
// 模糊
if(!empty($_REQUEST['keyword']))
{
$where['name'] = array('like', '%'.I('keyword').'%');
}
// 是否更多条件
if(I('is_more', 0) == 1)
{
if(I('is_enable', -1) > -1)
{
$where['is_enable'] = intval(I('is_enable', 0));
}
if(I('brand_category_id', -1) > -1)
{
$where['brand_category_id'] = intval(I('brand_category_id', 0));
}
// 表达式
if(!empty($_REQUEST['time_start']))
{
$where['add_time'][] = array('gt', strtotime(I('time_start')));
}
if(!empty($_REQUEST['time_end']))
{
$where['add_time'][] = array('lt', strtotime(I('time_end')));
}
}
return $where;
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 轮播图片信息
$data = empty($_REQUEST['id']) ? array() : M('Brand')->find(I('id'));
$this->assign('data', $data);
// 是否启用
$this->assign('common_is_enable_list', L('common_is_enable_list'));
// 品牌分类
$brand_category = M('BrandCategory')->where(['is_enable'=>1])->field('id,name')->select();
$this->assign('brand_category', $brand_category);
// 参数
$this->assign('param', array_merge($_POST, $_GET));
$this->display('SaveInfo');
}
/**
* [Save 品牌保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error(L('common_unauthorized_access'));
}
// 图片
if(!empty($_FILES['file_logo']))
{
// 文件上传校验
$error = FileUploadError('file_logo');
if($error !== true)
{
$this->ajaxReturn($error, -1);
}
// 文件类型
list($type, $suffix) = explode('/', $_FILES['file_logo']['type']);
$path = 'Public'.DS.'Upload'.DS.'brand'.DS.date('Y').DS.date('m').DS;
if(!is_dir($path))
{
mkdir(ROOT_PATH.$path, 0777, true);
}
$filename = date('YmdHis').GetNumberCode(6).'.'.$suffix;
$file_logo = $path.$filename;
if(move_uploaded_file($_FILES['file_logo']['tmp_name'], ROOT_PATH.$file_logo))
{
$_POST['logo'] = DS.$file_logo;
}
}
// id为空则表示是新增
$m = D('Brand');
// 公共额外数据处理
$_POST['is_enable'] = intval(I('is_enable', 0));
// 添加
if(empty($_POST['id']))
{
if($m->create($_POST, 1))
{
// 额外数据处理
$m->add_time = time();
$m->sort = intval(I('sort'));
$m->brand_category_id = intval(I('brand_category_id'));
$m->website_url = I('website_url');
$m->name = I('name');
// 写入数据库
if($m->add())
{
$this->ajaxReturn(L('common_operation_add_success'));
} else {
$this->ajaxReturn(L('common_operation_add_error'), -100);
}
}
} else {
// 编辑
if($m->create($_POST, 2))
{
// 额外数据处理
$m->upd_time = time();
$m->sort = intval(I('sort'));
$m->brand_category_id = intval(I('brand_category_id'));
$m->website_url = I('website_url');
$m->name = I('name');
// 移除 id
unset($m->id);
// 更新数据库
if($m->where(array('id'=>I('id')))->save())
{
$this->ajaxReturn(L('common_operation_edit_success'));
} else {
$this->ajaxReturn(L('common_operation_edit_error'), -100);
}
}
}
$this->ajaxReturn($m->getError(), -1);
}
/**
* [Delete 品牌删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
if(!IS_AJAX)
{
$this->error(L('common_unauthorized_access'));
}
$m = D('Brand');
if($m->create($_POST, 5))
{
$id = I('id');
// 删除
if($m->delete($id))
{
$this->ajaxReturn(L('common_operation_delete_success'));
} else {
$this->ajaxReturn(L('common_operation_delete_error'), -100);
}
} else {
$this->ajaxReturn($m->getError(), -1);
}
}
/**
* [StateUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StateUpdate()
{
// 参数
if(empty($_POST['id']) || !isset($_POST['state']))
{
$this->ajaxReturn(L('common_param_error'), -1);
}
// 数据更新
if(M('Brand')->where(array('id'=>I('id')))->save(array('is_enable'=>I('state'))))
{
$this->ajaxReturn(L('common_operation_edit_success'));
} else {
$this->ajaxReturn(L('common_operation_edit_error'), -100);
}
}
}
?>

View File

@ -102,6 +102,9 @@ class GoodsController extends CommonController
// 产地
$v['place_origin_text'] = M('Region')->where(['id'=>$v['place_origin']])->getField('name');
// 品牌
$v['brand_name'] = empty($v['brand_id']) ? null : M('Brand')->where(['id'=>$v['brand_id']])->getField('name');
// 商品url地址
$v['goods_url'] = HomeUrl('Goods', 'Index', ['id'=>$v['id']]);
@ -200,6 +203,17 @@ class GoodsController extends CommonController
}
$this->assign('category_list', $category);
// 品牌分类
$brand_list = M('BrandCategory')->where(['is_enable'=>1])->select();
if(!empty($brand_list))
{
foreach($brand_list as &$v)
{
$v['items'] = M('Brand')->field('id,name')->where(['is_enable'=>1, ['brand_category_id'=>$v['id']]])->order('sort asc')->select();
}
}
$this->assign('brand_list', $brand_list);
// 基础数据处理
if(!empty($data))
{
@ -313,6 +327,7 @@ class GoodsController extends CommonController
'photo_count' => count($photo['data']),
'is_home_recommended' => intval(I('is_home_recommended')),
'home_recommended_images' => empty($images['data']['file_home_recommended_images']) ? trim($_POST['home_recommended_images']) : $images['data']['file_home_recommended_images'],
'brand_id' => intval(I('brand_id')),
];
// 添加/编辑

View File

@ -0,0 +1,27 @@
<?php
/**
* 模块语言包-品牌
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
return array(
// 添加/编辑
'brand_add_name' => '品牌添加',
'brand_edit_name' => '品牌编辑',
'brand_category_id_text' => '品牌分类',
'brand_category_id_format' => '请选择品牌分类',
'brand_name_text' => '名称',
'brand_name_format' => '名称格式 2~60 个字符',
'brand_logo_text' => 'LOGO',
'brand_logo_format' => '请上传LOGO图片',
'brand_website_url_text' => '官网地址',
'brand_website_url_format' => '官网地址最多 255 个字符'
);
?>

View File

@ -0,0 +1,15 @@
<?php
/**
* 模块语言包-品牌分类分类
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
return array(
// 添加/编辑
'brand_category_add_name' => '品牌分类分类添加',
'brand_category_edit_name' => '品牌分类分类编辑',
);
?>

View File

@ -95,5 +95,7 @@ return array(
'goods_home_recommended_images_text'=> '首页推荐图片',
'goods_home_recommended_images_tips'=> '留空则取相册第一张图',
'goods_brand_id_text' => '品牌',
);
?>

View File

@ -0,0 +1,38 @@
<?php
namespace Admin\Model;
use Think\Model;
/**
* 品牌分类模型
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class BrandCategoryModel extends CommonModel
{
// 数据自动校验
protected $_validate = array(
// 添加,编辑
array('name', '2,16', '{%common_name_format}', 1, 'length', 3),
array('is_enable', array(0,1), '{%common_enable_tips}', 1, 'in', 3),
array('sort', 'CheckSort', '{%common_sort_error}', 1, 'function', 3),
// 删除校验是否存在子级
array('id', 'IsExistSon', '{%common_is_exist_son_error}', 1, 'callback', 5),
);
/**
* [IsExistSon 校验节点下是否存在子级数据]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-10T14:09:40+0800
*/
public function IsExistSon()
{
return ($this->db(0)->where(array('pid'=>I('id')))->count() == 0);
}
}
?>

View File

@ -0,0 +1,25 @@
<?php
namespace Admin\Model;
use Think\Model;
/**
* 品牌模型
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class BrandModel extends CommonModel
{
// 数据自动校验
protected $_validate = array(
// 添加,编辑
array('logo', '0,255', '{%brand_logo_format}', 1, 'length', 3),
array('name', '2,16', '{%brand_name_format}', 1, 'length', 3),
array('is_enable', array(0,1), '{%common_enable_tips}', 1, 'in', 3),
array('sort', 'CheckSort', '{%common_sort_error}', 1, 'function', 3),
array('brand_category_id', 'require', '{%brand_category_id_format}', 1, '', 3),
);
}
?>

View File

@ -0,0 +1,114 @@
<include file="Public/Header" />
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form view-list" action="{{:U('Admin/Brand/Index')}}" method="POST">
<div class="am-g">
<input type="text" class="am-radius form-keyword" placeholder="{{:L('brand_name_text')}}" name="keyword" <present name="param['keyword']"> value="{{$param.keyword}}"</present> />
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">{{:L('common_operation_query')}}</button>
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
{{:L('common_more_screening')}}
<input type="checkbox" name="is_more" value="1" id="is_more" <if condition="isset($param['is_more']) and $param['is_more'] eq 1">checked</if> />
<i class="am-icon-angle-down"></i>
</label>
<div class="more-where <if condition="!isset($param['is_more']) or $param['is_more'] neq 1">none</if>">
<select name="is_enable" class="am-radius c-p m-t-10 m-l-5 param-where">
<option value="-1">{{:L('common_view_enable_title')}}</option>
<foreach name="common_is_enable_list" item="v">
<option value="{{$v.id}}" <if condition="isset($param['is_enable']) and $param['is_enable'] eq $v['id']">selected</if>>{{$v.name}}</option>
</foreach>
</select>
<select name="brand_category_id" class="am-radius c-p m-t-10 m-l-5 param-where">
<option value="">{{:L('brand_category_id_text')}}</option>
<foreach name="brand_category" item="v">
<option value="{{$v.value}}" <if condition="isset($param['brand_category_id']) and $param['brand_category_id'] eq $v['value']">selected</if>>{{$v.name}}</option>
</foreach>
</select>
<div class="param-date param-where m-l-5">
<input type="text" name="time_start" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_start_name')}}" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_start'])">value="{{$param.time_start}}"</if>/>
<span>~</span>
<input type="text" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_end_name')}}" name="time_end" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_end'])">value="{{$param.time_end}}"</if>/>
</div>
</div>
</div>
</form>
<!-- form end -->
<!-- operation start -->
<div class="am-g m-t-15">
<a href="{{:U('Admin/Brand/SaveInfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> {{:L('common_operation_add')}}</a>
</div>
<!-- operation end -->
<!-- list start -->
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
<thead>
<tr>
<th>{{:L('brand_name_text')}}</th>
<th>{{:L('brand_logo_text')}}</th>
<th class="am-hide-sm-only">{{:L('brand_category_id_text')}}</th>
<th class="am-hide-sm-only">{{:L('brand_website_url_text')}}</th>
<th>{{:L('common_view_enable_title')}}</th>
<th class="am-hide-sm-only">{{:L('common_create_time_name')}}</th>
<th>{{:L('common_operation_name')}}</th>
</tr>
</thead>
<tbody>
<if condition="!empty($list)">
<foreach name="list" item="v">
<tr id="data-list-{{$v.id}}" <if condition="$v['is_enable'] eq 0">class="am-active"</if>>
<td>{{$v.name}}</td>
<td>
<if condition="!empty($v['logo'])">
<a href="{{$v['logo']}}" target="_blank">
<img src="{{$v['logo']}}" class="am-radius" width="100" />
</a>
<else />
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
</if>
</td>
<td class="am-hide-sm-only">{{$v.brand_category_text}}</td>
<td class="am-hide-sm-only">
{{$v.website_url}}
<if condition="!empty($v['website_url'])">
<a href="{{$v.website_url}}" target="_blank">
<i class="am-icon-external-link"></i>
</a>
</if>
</td>
<td>
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Brand/StateUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
</td>
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
<td class="view-operation">
<a href="{{:U('Admin/Brand/SaveInfo', array('id'=>$v['id']))}}">
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit"> {{:L('common_operation_edit')}}</button>
</a>
<if condition="$v['is_enable'] eq 0">
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Brand/Delete')}}" data-id="{{$v.id}}"> {{:L('common_operation_delete')}}</button>
</if>
</td>
</tr>
</foreach>
<else />
<tr><td colspan="20" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
</if>
</tbody>
</table>
<!-- list end -->
<!-- page start -->
<if condition="!empty($list)">
{{$page_html}}
</if>
<!-- page end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->

View File

@ -0,0 +1,67 @@
<include file="Public/Header" />
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form form-validation view-save" action="{{:U('Admin/Brand/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/Brand/Index')}}" enctype="multipart/form-data">
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_image', 2048000)}}" />
<legend>
<span class="fs-16">
<if condition="empty($data['id'])">
{{:L('brand_add_name')}}
<else />
{{:L('brand_edit_name')}}
</if>
</span>
<a href="{{:U('Admin/Brand/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
</legend>
<div class="am-form-group">
<label>{{:L('brand_name_text')}}</label>
<input type="text" name="name" placeholder="{{:L('brand_name_text')}}" minlength="2" maxlength="60" data-validation-message="{{:L('brand_name_format')}}" class="am-radius" <notempty name="data"> value="{{$data.name}}"</notempty> required />
</div>
<div class="am-form-group">
<label>{{:L('brand_category_id_text')}}</label>
<select name="brand_category_id" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('brand_category_id_format')}}" required>
<option value="">{{:L('common_select_can_choose')}}</option>
<foreach name="brand_category" item="v">
<option value="{{$v.id}}" <if condition="isset($data['brand_category_id']) and $data['brand_category_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
</foreach>
</select>
</div>
<div class="am-form-group">
<label>{{:L('brand_website_url_text')}}</label>
<input type="text" name="website_url" placeholder="{{:L('brand_website_url_text')}}" data-validation-message="{{:L('brand_website_url_format')}}" class="am-radius" <notempty name="data"> value="{{$data.website_url}}"</notempty> />
</div>
<div class="am-form-group am-form-file">
<label class="block">{{:L('brand_logo_text')}}</label>
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
<i class="am-icon-cloud-upload"></i> {{:L('common_select_images_text')}}</button>
<input type="text" name="logo" class="am-radius js-choice-one original-images-url" data-choice-one-to=".images-file-event" <notempty name="data"> value="{{$data.logo}}"</notempty>" data-validation-message="{{:L('common_select_images_tips')}}" readonly="readonly" <notempty name="data"> value="{{$data.logo}}"</notempty> required />
<input type="file" name="file_logo" multiple data-validation-message="{{:L('common_select_images_tips')}}" accept="image/gif,image/jpeg,image/jpg,image/png" class="js-choice-one images-file-event" data-choice-one-to=".original-images-url" data-tips-tag="#form-logo-tips" data-image-tag="#form-img-logo" required />
<div id="form-logo-tips" class="m-t-5"></div>
<img src="<if condition="!empty($data['logo'])">{{$image_host}}{{$data.logo}}<else />{{$image_host}}/Public/Admin/Default/Images/default-images.png</if>" id="form-img-logo" class="block m-t-5 am-img-thumbnail am-radius" width="100" data-default="<if condition="!empty($data['logo'])">{{$image_host}}{{$data.logo}}<else />{{$image_host}}/Public/Admin/Default/Images/default-images.png</if>" />
</div>
<div class="am-form-group">
<label>{{:L('common_view_sort_title')}}</label>
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
</div>
<div class="am-form-group">
<label class="block">{{:L('common_view_enable_title')}}</label>
<input name="is_enable" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_is_text')}}" data-on-text="{{:L('common_operation_on_is_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="!empty($data) and $data['is_enable'] eq 1">checked="true"</if> />
</div>
<div class="am-form-group">
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"</notempty> />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->

View File

@ -0,0 +1,59 @@
<include file="Public/Header" />
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- operation start -->
<div class="am-g">
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus tree-submit-add" data-am-modal="{target: '#data-save-win'}"> {{:L('common_operation_add')}}</button>
</div>
<!-- operation end -->
<!-- save win start -->
<div class="am-popup am-radius" id="data-save-win">
<div class="am-popup-inner">
<div class="am-popup-hd">
<h4 class="am-popup-title" data-add-title="{{:L('brand_category_add_name')}}" data-edit-title="{{:L('brand_category_edit_name')}}">{{:L('brand_category_add_name')}}</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<!-- form start -->
<form class="am-form form-validation admin-save" action="{{:U('Admin/BrandCategory/Save')}}" method="POST" request-type="ajax-reload" request-value="">
<div class="am-form-group">
<label>{{:L('common_name_text')}}</label>
<input type="text" placeholder="{{:L('common_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('common_name_format')}}" class="am-radius" required />
</div>
<div class="am-form-group">
<label>{{:L('common_view_sort_title')}}</label>
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
</div>
<include file="Lib/Enable" />
<div class="am-form-group">
<input type="hidden" name="id" />
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
</div>
</form>
<!-- form end -->
</div>
</div>
</div>
<!-- save win end -->
<!-- list start -->
<div id="tree" class="m-t-15">
<div class="m-t-30 t-c">
<img src="__PUBLIC__/Common/Images/loading.gif" />
<p>{{:L('common_form_loading_tips')}}</p>
</div>
</div>
<!-- list end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->
<script>
Tree(0, "{{:U('Admin/BrandCategory/GetNodeSon')}}", 0);
</script>

View File

@ -50,9 +50,10 @@
<th>{{:L('goods_title_text')}}</th>
<th>{{:L('goods_price_text')}}</th>
<th>{{:L('goods_is_shelves_text')}}</th>
<th>{{:L('goods_is_home_recommended_text')}}</th>
<th class="am-hide-sm-only">{{:L('goods_is_home_recommended_text')}}</th>
<th class="am-hide-sm-only">{{:L('goods_inventory_text')}}</th>
<th class="am-hide-sm-only">{{:L('goods_model_text')}}</th>
<th class="am-hide-sm-only">{{:L('goods_brand_id_text')}}</th>
<th>{{:L('common_more_name')}}</th>
<th>{{:L('common_operation_name')}}</th>
</tr>
@ -76,11 +77,12 @@
<td>
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_shelves'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Goods/StatusShelves')}}" data-id="{{$v.id}}" data-state="{{$v['is_shelves']}}" data-is-update-status="1"></a>
</td>
<td>
<td class="am-hide-sm-only">
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_home_recommended'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Goods/StatusHomeRecommended')}}" data-id="{{$v.id}}" data-state="{{$v['is_home_recommended']}}" data-is-update-status="0"></a>
</td>
<td class="am-hide-sm-only">{{$v.inventory}} {{$v.inventory_unit}}</td>
<td class="am-hide-sm-only">{{$v.model}}</td>
<td class="am-hide-sm-only">{{$v.brand_name}}</td>
<td>
<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> {{:L('common_see_more_name')}}</span>
<div class="am-popup am-radius" id="my-popup{{$v.id}}">
@ -118,6 +120,9 @@
<dt>{{:L('goods_model_text')}}</dt>
<dd>{{$v.model}}</dd>
<dt>{{:L('goods_brand_id_text')}}</dt>
<dd>{{$v.brand_name}}</dd>
<dt>{{:L('goods_place_origin_text')}}</dt>
<dd>{{$v.place_origin_text}}</dd>

View File

@ -66,7 +66,7 @@
<if condition="!empty($category_list)">
<foreach name="category_list" item="v">
<optgroup label="{{$v.name}}">
<if condition="!empty($category_list)">
<if condition="!empty($v['items'])">
<foreach name="v.items" item="vs">
<option style="padding-left: 30px;" value="{{$vs.id}}" <if condition="!empty($data['category_ids']) and in_array($vs['id'], $data['category_ids'])">selected</if>>{{:L('goods_category_level_two')}}-{{$vs.name}}</option>
<foreach name="vs.items" item="vss">
@ -79,6 +79,24 @@
</if>
</select>
</div>
<div class="am-form-group">
<label>{{:L('goods_brand_id_text')}}</label>
<br />
<select name="brand_id" class="am-radius chosen-select c-p" data-placeholder="{{:L('common_please_select_choose')}}" data-validation-message="{{:L('goods_category_id_format')}}">
<if condition="!empty($brand_list)">
<option value="0">{{:L('common_please_select_choose')}}</option>
<foreach name="brand_list" item="v">
<optgroup label="{{$v.name}}">
<if condition="!empty($v['items'])">
<foreach name="v.items" item="vs">
<option style="padding-left: 30px;" value="{{$vs.id}}" <if condition="isset($data['brand_id']) and $data['brand_id'] eq $vs['id']">selected</if>>{{$vs.name}}</option>
</foreach>
</if>
</optgroup>
</foreach>
</if>
</select>
</div>
<div class="am-form-group">
<label>{{:L('goods_place_origin_text')}}</label>
<br />

View File

@ -17,6 +17,7 @@
<div class="search-list">
<div class="am-u-sm-12 am-u-md-12">
<div class="theme-popover">
<div class="searchAbout">
<span class="font-pale">相关搜索:</span>
<a title="坚果" href="#">坚果</a>
@ -25,11 +26,10 @@
</div>
<ul class="select">
<p class="title font-normal">
<p class="title-tips">
<span class="fl">松子</span>
<span class="total fl">搜索到<strong class="num">997</strong>件相关商品</span>
</p>
<div class="clear"></div>
<li class="select-result">
<dl>
<dt>已选</dt>
@ -37,7 +37,6 @@
<p class="eliminateCriteria">清除</p>
</dl>
</li>
<div class="clear"></div>
<li class="select-list">
<dl id="select1">
<dt class="am-badge am-round">品牌</dt>
@ -78,7 +77,6 @@
</div>
</dl>
</li>
</ul>
<div class="clear"></div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<?php
//000000000000a:115:{i:41;s:12:"config_index";i:42;s:11:"config_save";i:81;s:10:"site_index";i:103;s:10:"site_index";i:105;s:9:"site_save";i:104;s:9:"sms_index";i:107;s:8:"sms_save";i:219;s:11:"email_index";i:220;s:10:"email_save";i:221;s:15:"email_emailtest";i:199;s:9:"seo_index";i:200;s:8:"seo_save";i:1;s:11:"power_index";i:22;s:11:"admin_index";i:19;s:14:"admin_saveinfo";i:20;s:10:"admin_save";i:21;s:12:"admin_delete";i:4;s:10:"power_role";i:17;s:18:"power_rolesaveinfo";i:18;s:14:"power_rolesave";i:23;s:16:"power_roledelete";i:13;s:11:"power_index";i:15;s:15:"power_powersave";i:16;s:17:"power_powerdelete";i:126;s:10:"user_index";i:127;s:10:"user_index";i:128;s:13:"user_saveinfo";i:129;s:9:"user_save";i:130;s:11:"user_delete";i:146;s:16:"user_excelexport";i:38;s:11:"goods_index";i:39;s:11:"goods_index";i:57;s:14:"goods_saveinfo";i:58;s:10:"goods_save";i:59;s:12:"goods_delete";i:181;s:19:"goods_statusshelves";i:218;s:27:"goods_statushomerecommended";i:201;s:19:"goodscategory_index";i:202;s:18:"goodscategory_save";i:203;s:20:"goodscategory_delete";i:177;s:11:"order_index";i:178;s:11:"order_index";i:179;s:12:"order_delete";i:180;s:12:"order_cancel";i:213;s:12:"answer_index";i:214;s:12:"answer_index";i:215;s:11:"answer_save";i:216;s:13:"answer_delete";i:217;s:19:"answer_statusupdate";i:222;s:16:"navigation_index";i:223;s:16:"navigation_index";i:226;s:15:"navigation_save";i:227;s:17:"navigation_delete";i:228;s:23:"navigation_statusupdate";i:234;s:16:"customview_index";i:235;s:19:"customview_saveinfo";i:236;s:15:"customview_save";i:237;s:17:"customview_delete";i:238;s:23:"customview_statusupdate";i:239;s:10:"link_index";i:240;s:13:"link_saveinfo";i:241;s:9:"link_save";i:242;s:11:"link_delete";i:243;s:17:"link_statusupdate";i:244;s:11:"theme_index";i:245;s:10:"theme_save";i:246;s:12:"theme_upload";i:247;s:12:"theme_delete";i:204;s:13:"article_index";i:205;s:13:"article_index";i:206;s:16:"article_saveinfo";i:207;s:12:"article_save";i:208;s:14:"article_delete";i:209;s:20:"article_statusupdate";i:248;s:29:"article_statushomerecommended";i:210;s:21:"articlecategory_index";i:211;s:20:"articlecategory_save";i:212;s:22:"articlecategory_delete";i:162;s:15:"marketing_index";i:163;s:12:"coupon_index";i:164;s:18:"coupon_stateupdate";i:165;s:15:"coupon_saveinfo";i:166;s:11:"coupon_save";i:167;s:11:"coupon_user";i:168;s:13:"coupon_delete";i:169;s:15:"coupon_sendinfo";i:170;s:11:"coupon_send";i:171;s:16:"coupon_userquery";i:182;s:10:"data_index";i:183;s:13:"message_index";i:184;s:14:"message_delete";i:185;s:12:"paylog_index";i:186;s:21:"userintegrallog_index";i:187;s:15:"complaint_index";i:188;s:14:"complaint_save";i:189;s:16:"complaint_delete";i:152;s:15:"resources_index";i:153;s:12:"region_index";i:154;s:11:"region_save";i:155;s:13:"region_delete";i:156;s:13:"express_index";i:157;s:12:"express_save";i:158;s:14:"express_delete";i:172;s:11:"slide_index";i:173;s:14:"slide_saveinfo";i:174;s:10:"slide_save";i:175;s:17:"slide_stateupdate";i:176;s:12:"slide_delete";i:193;s:15:"agreement_index";i:194;s:14:"agreement_save";i:118;s:10:"tool_index";i:119;s:11:"cache_index";i:120;s:16:"cache_siteupdate";i:121;s:20:"cache_templateupdate";i:122;s:18:"cache_moduleupdate";}
//000000000000a:124:{i:41;s:12:"config_index";i:42;s:11:"config_save";i:81;s:10:"site_index";i:103;s:10:"site_index";i:105;s:9:"site_save";i:104;s:9:"sms_index";i:107;s:8:"sms_save";i:219;s:11:"email_index";i:220;s:10:"email_save";i:221;s:15:"email_emailtest";i:199;s:9:"seo_index";i:200;s:8:"seo_save";i:1;s:11:"power_index";i:22;s:11:"admin_index";i:19;s:14:"admin_saveinfo";i:20;s:10:"admin_save";i:21;s:12:"admin_delete";i:4;s:10:"power_role";i:17;s:18:"power_rolesaveinfo";i:18;s:14:"power_rolesave";i:23;s:16:"power_roledelete";i:13;s:11:"power_index";i:15;s:15:"power_powersave";i:16;s:17:"power_powerdelete";i:126;s:10:"user_index";i:127;s:10:"user_index";i:128;s:13:"user_saveinfo";i:129;s:9:"user_save";i:130;s:11:"user_delete";i:146;s:16:"user_excelexport";i:38;s:11:"goods_index";i:39;s:11:"goods_index";i:57;s:14:"goods_saveinfo";i:58;s:10:"goods_save";i:59;s:12:"goods_delete";i:181;s:19:"goods_statusshelves";i:218;s:27:"goods_statushomerecommended";i:201;s:19:"goodscategory_index";i:202;s:18:"goodscategory_save";i:203;s:20:"goodscategory_delete";i:177;s:11:"order_index";i:178;s:11:"order_index";i:179;s:12:"order_delete";i:180;s:12:"order_cancel";i:213;s:12:"answer_index";i:214;s:12:"answer_index";i:215;s:11:"answer_save";i:216;s:13:"answer_delete";i:217;s:19:"answer_statusupdate";i:222;s:16:"navigation_index";i:223;s:16:"navigation_index";i:226;s:15:"navigation_save";i:227;s:17:"navigation_delete";i:228;s:23:"navigation_statusupdate";i:234;s:16:"customview_index";i:235;s:19:"customview_saveinfo";i:236;s:15:"customview_save";i:237;s:17:"customview_delete";i:238;s:23:"customview_statusupdate";i:239;s:10:"link_index";i:240;s:13:"link_saveinfo";i:241;s:9:"link_save";i:242;s:11:"link_delete";i:243;s:17:"link_statusupdate";i:244;s:11:"theme_index";i:245;s:10:"theme_save";i:246;s:12:"theme_upload";i:247;s:12:"theme_delete";i:252;s:11:"brand_index";i:249;s:11:"brand_index";i:256;s:14:"brand_saveinfo";i:250;s:10:"brand_save";i:257;s:17:"brand_stateupdate";i:251;s:12:"brand_delete";i:253;s:19:"brandcategory_index";i:254;s:18:"brandcategory_save";i:255;s:20:"brandcategory_delete";i:204;s:13:"article_index";i:205;s:13:"article_index";i:206;s:16:"article_saveinfo";i:207;s:12:"article_save";i:208;s:14:"article_delete";i:209;s:20:"article_statusupdate";i:248;s:29:"article_statushomerecommended";i:210;s:21:"articlecategory_index";i:211;s:20:"articlecategory_save";i:212;s:22:"articlecategory_delete";i:162;s:15:"marketing_index";i:163;s:12:"coupon_index";i:164;s:18:"coupon_stateupdate";i:165;s:15:"coupon_saveinfo";i:166;s:11:"coupon_save";i:167;s:11:"coupon_user";i:168;s:13:"coupon_delete";i:169;s:15:"coupon_sendinfo";i:170;s:11:"coupon_send";i:171;s:16:"coupon_userquery";i:182;s:10:"data_index";i:183;s:13:"message_index";i:184;s:14:"message_delete";i:185;s:12:"paylog_index";i:186;s:21:"userintegrallog_index";i:187;s:15:"complaint_index";i:188;s:14:"complaint_save";i:189;s:16:"complaint_delete";i:152;s:15:"resources_index";i:153;s:12:"region_index";i:154;s:11:"region_save";i:155;s:13:"region_delete";i:156;s:13:"express_index";i:157;s:12:"express_save";i:158;s:14:"express_delete";i:172;s:11:"slide_index";i:173;s:14:"slide_saveinfo";i:174;s:10:"slide_save";i:175;s:17:"slide_stateupdate";i:176;s:12:"slide_delete";i:193;s:15:"agreement_index";i:194;s:14:"agreement_save";i:118;s:10:"tool_index";i:119;s:11:"cache_index";i:120;s:16:"cache_siteupdate";i:121;s:20:"cache_templateupdate";i:122;s:18:"cache_moduleupdate";}
?>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
/**
*
*/
.form-keyword { width: 55% !important; display: initial !important; }
.more-submit input { display: none; }
.param-where, .param-date input { display: initial !important; }
@media only screen and (max-width: 641px) {
.param-where { width: 100% !important; margin-left: 0px !important; }
.param-date input { width: 47% !important; }
}
@media only screen and (min-width: 641px) {
.param-where { width: 32% !important; float: left; }
.param-date input { width: 45% !important; }
.param-where:nth-child(1), .param-where:nth-child(4) { margin-left: 0px !important; }
}
@media only screen and (max-width: 321px) {
.view-operation button { margin: 2px 0px; }
}

View File

@ -13,8 +13,8 @@
.am-form-group:hover>label { color: #333 !important; }
.am-form-group:hover>label>span { color: #FF9800 !important; }
.am-form-group:hover>input, .am-form-group:hover>select, .am-form-group:hover>textarea, .am-form-group:hover .chosen-choices, .am-form-group:hover .chosen-single { border: 1px solid #999 ; }
.am-form-error .chosen-choices { border: 1px solid #dd514c !important; }
.am-form-success .chosen-choices { border: 1px solid #5eb95e !important; }
.am-form-error .chosen-choices, .am-form-error .chosen-default { border: 1px solid #dd514c !important; }
.am-form-success .chosen-choices, .am-form-success .chosen-single { border: 1px solid #5eb95e !important; }
/**
*

View File

@ -568,9 +568,9 @@ $(function()
});
}
// 多选插件 空内容失去焦点验证bug兼容处理
$(document).on('blur', 'ul.chosen-choices .search-field', function()
$(document).on('blur', 'ul.chosen-choices .search-field, div.chosen-select .chosen-search', function()
{
if($('ul.chosen-choices li').length <= 1)
if($(this).parent().find('li').length <= 1 || $(this).parent().parent().find('.chosen-default').length >= 1)
{
$(this).parent().parent().prev().trigger('blur');
}

View File

@ -91,7 +91,7 @@ color: #555555;background:none;border-color:transparent;cursor: default;}
.goods-category-s{display: none;}
/*浮动框*/
.nav-search{top:0;left:0;width:100%;z-index:1099; margin:0px auto;background:#fff; padding-top: 5px;}
.nav-search{top:0;left:0;width:100%;z-index:1099; margin:0px auto;background:#fff; padding-top: 5px; position: relative;}
.nav-search .logo{height:36px;width:95px; margin: 0 auto; display: -webkit-inline-box;}
.logoBig{display:none;}
.logo img{width:100%}

View File

@ -17,16 +17,17 @@ p {margin: 0 0 .3rem 0; font-size:14px; }
img{ width:100%;}
.price{color: #e4393c;font-weight: 600;}
.theme-popover {z-index: 1009;overflow:visible;background:#fff;}
.theme-popover {z-index: 1009;overflow:visible;background:#fff; width: 100%; }
.sort-nav a:hover, .sort-nav a:focus { color: #d2364c; }
.select .title-tips { font-size: 12px; color: #888; }
/* select */
.sort-nav{padding:0px;font-size:12px}
.suggest,.searchAbout{ display:none;}
.select li {margin: 10px 0 5px 0px;}
.select dl{zoom:1;position:relative;line-height:24px; margin:10px 0px; }
.select li { margin: 5px 0px; }
.select dl{zoom:1;position:relative;line-height:24px; }
.select dl:after{content:" ";display:block;clear:both;height:0;overflow:hidden}
.select dt{width:80%;margin-left:10%;margin-bottom:5px;position:absolute;cursor: pointer;height:24px;line-height:24px;}
.select dd{float:left;display:inline;margin:0 0 5px 5px;}
@ -36,8 +37,8 @@ img{ width:100%;}
ul.pagination{display:none;}
/*搜索显示*/
.select-result{display: none;}
li.select-result dl{padding: 40px 0 5px 0px;}
li.select-result dt {left:-30px; top:10px;font-weight:bold;width:50px;}
li.select-result dl{padding: 25px 0 5px 0px;}
li.select-result dt {left:-26px; top:0;font-weight:bold;width:50px;}
.select-no{color:#999}
.select .select-result a{padding-right:20px;background: url("../images/close.png") right 9px no-repeat}
@ -46,7 +47,7 @@ li.select-result dt {left:-30px; top:10px;font-weight:bold;width:50px;}
/*排序*/
.sort-nav { width:100%; border-bottom: 1px solid #eee; background: #fff; overflow: hidden; }
.sort-nav { width:100%; border-bottom: 1px solid #eee; background: #fff; overflow: hidden; height: 30px; }
.sort-nav li{ float:left;width:33.33%;height:30px; line-height:30px; text-align:center; padding:0px 0px;}
.sort-nav li a{font-size:14px;}
.sort-nav li.big{display:none;}
@ -56,16 +57,15 @@ li.select-result dt {left:-30px; top:10px;font-weight:bold;width:50px;}
/*筛选条件*/
.select-list{ float:left;display:inline; left:0;width:33.33%; height:30px;}
.select-list dl dt{left:0px; cursor:pointer; top:-10px;text-align: center;}
.select-list dl dt{left:0px; cursor:pointer; text-align: center;}
{display:none ;float:left; top:20px; padding-top:5px; z-index:10; left:0px; width:300%;position:absolute;}
.select-list .dd-conent{display:none ;float:left; top:20px; padding-top:5px; z-index:10; left:0px; width:300%;position:absolute; background:#fff;overflow: hidden;}
.select-list .dd-conent{display:none ;float:left; top:30px; z-index:10; left:0px; width:300%;position:absolute; background:#fff;overflow: hidden;}
.select-list .dd-conent dd{width:33.33% ;text-align: center;margin-left: 0px;height:25px ;}
dl#select2 .dd-conent{ left:-100%; right:-100%;}
dl#select3 .dd-conent{ left:-200%; right:0px;}
.am-badge{font-size:12px ;padding:0px 0px;background-color: #999999;color: #ffffff;}
.theme-popover-mask{z-index:5;width: 100%;height: auto;position:fixed ;background:#000 ;top:0;opacity: 0.6;}
.theme-popover{width: 100%;}
/*搜索结果*/
.i-pic.limit {margin:5px;border: 1px #e8e8e8 solid;overflow: hidden;position: relative;cursor: pointer;}
@ -87,8 +87,7 @@ dl#select3 .dd-conent{ left:-200%; right:0px;}
.select li.select-result{display: none;}
.suggest,.searchAbout,ul.pagination{ display:block;}
.select .title.font-normal{margin-top:0px;margin-left:0px}
.select,.sort-nav{padding:5px 10px;box-shadow: 0px 0px 2px #ccc;margin-top:5px;background: #fff;}
.select,.sort-nav{padding:10px 10px 5px 10px;box-shadow: 0px 0px 2px #ccc;margin-top:5px;background: #fff;}
.searchAbout{padding:10px;}
.select-list{width:100%;padding:0px 0px;}
@ -107,18 +106,18 @@ dl#select3 .dd-conent{ left:-200%; right:0px;}
.sort-nav li{ display:inline; height:35px; line-height:35px; padding:0px 20px;width:auto;border-right:1px dotted #ddd;}
.sort-nav li.big{display:block;border: none;}
.sort-nav li.first{background: #F5F5F5;color: #000;}
.select-list .dd-conent { padding-top: 10px; }
/*筛选条件*/
.select-list,.select-list dl{width:100%;}
.select dl dt{left:-100px;top:10px;}
.select-list dl dt{top:5px;}
.select dt{width:100px;margin-left:0;text-align:center;color:#666;height:24px;line-height:24px;}
.select-list .dd-conent{ display:inline-block;float:left;background: none;width:100%;position: static;}
dl#select2 .dd-conent,dl#select3 .dd-conent{ left:0; right:0;}
/*搜索结果*/
li.select-result dl {padding: 10px 0px;}
li.select-result dl {padding: 10px 0px 0px 0px;}
.scoll{ margin-top:70px;}
.am-slider-default .am-direction-nav a {z-index:0;}
@ -154,4 +153,5 @@ dl#select3 .dd-conent{ left:-200%; right:0px;}
.search-pages { display: none; }
.search-pages-submit { display: block; }
.eliminateCriteria { margin-top: -28px; }
.select .title-tips { padding: 0 5px; }
}

View File

@ -33,7 +33,6 @@ $(function()
// 商品分类子级内容显示/隐藏
$(".category-content li").hover(function() {
console.log(1);
$(".category-content .category-list li.first .menu-in").css("display", "none");
$(".category-content .category-list li.first").removeClass("hover");
$(this).addClass("hover");
@ -50,7 +49,7 @@ $(function()
{
if(!$('#goods-category .category-content').is(":visible"))
{
$('#goods-category .category-content').slideDown(300);
$('#goods-category .category-content').slideDown(200);
}
}

View File

@ -91,32 +91,30 @@ $(function()
$(".select dt").on('click', function() {
if ($(this).next("div").css("display") == 'none') {
$(".theme-popover-mask").height(hh);
$(".theme-popover").css("position", "fixed");
$(this).next("div").slideToggle("slow");
$(".theme-popover").css({"position":"fixed", "top":0, "padding-top":"46px"});
$(this).next("div").slideToggle(300);
$(".select div").not($(this).next()).hide();
}
else{
$(".theme-popover-mask").height(0);
$(".theme-popover").css("position", "static");
$(this).next("div").slideUp("slow");;
}
} else {
$(this).next("div").slideUp(300);
$(".theme-popover-mask").height(0);
$(".theme-popover").css({"position":"static", "top":0, "padding-top":"0"});
}
})
$(document).on("click", ".eliminateCriteria", function() {
$(".dd-conent").hide();
$(".dd-conent").slideUp(300);
})
$(document).on("click", ".select dd", function() {
$(".dd-conent").slideUp(300);
$(".theme-popover-mask").height(0);
$(".theme-popover").css("position", "static");
$(".dd-conent").hide();
$(".theme-popover").css({"position":"static", "top":0, "padding-top":"0"});
});
$(document).on("click", ".theme-popover-mask", function() {
$(".dd-conent").slideUp(300);
$(".theme-popover-mask").height(0);
$(".theme-popover").css("position", "static");
$(".dd-conent").hide();
$(".theme-popover").css({"position":"static", "top":0, "padding-top":"0"});
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB