细节优化
parent
1b781a5a76
commit
1c9ff5e568
|
|
@ -16,7 +16,7 @@
|
|||
{{include file="public/breadcrumb_data" /}}
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<div class="goods-detail" data-id="{{$goods.id}}" data-spec-detail-ajax-url="{{:MyUrl('index/goods/specdetail')}}" data-spec-type-ajax-url="{{:MyUrl('index/goods/spectype')}}">
|
||||
<div class="system-goods-detail" data-id="{{$goods.id}}" data-spec-detail-ajax-url="{{:MyUrl('index/goods/specdetail')}}" data-spec-type-ajax-url="{{:MyUrl('index/goods/spectype')}}">
|
||||
<!-- 轮播 -->
|
||||
<div class="scoll">
|
||||
<div class="slider-content">
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
<!-- 非首页则展示首页入口 -->
|
||||
{{if MyC('home_header_top_is_home', 0) eq 1 and $module_name.$controller_name.$action_name neq 'indexindexindex'}}
|
||||
<div class="top-nav-items">
|
||||
<div class="top-nav-items top-nav-items-home">
|
||||
<div class="menu-hd ">
|
||||
<a href="{{$home_url}}" target="_top">
|
||||
<i class="am-icon-fw am-icon-home"></i>
|
||||
|
|
@ -85,23 +85,23 @@
|
|||
{{if !empty($common_nav_top_right_list) and is_array($common_nav_top_right_list)}}
|
||||
{{foreach $common_nav_top_right_list as $nav}}
|
||||
{{if empty($nav['items'])}}
|
||||
<div class="top-nav-items">
|
||||
<div class="top-nav-items {{if !empty($nav['type'])}}top-nav-items-{{$nav.type}}{{/if}}">
|
||||
<div class="menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}">
|
||||
<a href="{{if empty($user)}}javascript:;{{else /}}{{$nav.url}}{{/if}}" target="_top">
|
||||
<i class="am-icon-fw {{$nav.icon}}"></i>
|
||||
<span>{{$nav.name}}</span>
|
||||
{{if isset($nav['badge']) and $nav['badge'] gt -1}}
|
||||
{{if $nav['badge'] gt 0}}
|
||||
<strong class="am-badge am-badge-danger am-round common-cart-total">{{$nav.badge}}</strong>
|
||||
<strong class="am-badge am-badge-danger am-round {{if isset($nav['type']) and $nav['type'] eq 'cart'}}common-cart-total{{/if}}">{{$nav.badge}}</strong>
|
||||
{{else /}}
|
||||
<strong class="common-cart-total am-round">{{$nav.badge}}</strong>
|
||||
<strong class="am-round {{if isset($nav['type']) and $nav['type'] eq 'cart'}}common-cart-total{{/if}}">{{$nav.badge}}</strong>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{else /}}
|
||||
<div class="top-nav-items">
|
||||
<div class="top-nav-items {{if !empty($nav['type'])}}top-nav-items-{{$nav.type}}{{/if}}">
|
||||
<div class="am-dropdown menu-hd" data-am-dropdown>
|
||||
<a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle>
|
||||
<i class="am-icon-fw {{$nav.icon}}"></i>
|
||||
|
|
|
|||
|
|
@ -118,24 +118,7 @@
|
|||
<!-- 品牌 -->
|
||||
{{if !empty($brand_list)}}
|
||||
<li class="am-nbfc map-brand-container" data-field="brand_ids">
|
||||
{{if empty($search_map_info['brand'])}}
|
||||
<div class="map-left am-text-center am-fl">品牌</div>
|
||||
<div class="map-right map-images-text-items am-fr am-nbfc">
|
||||
<ul class="am-nbfc">
|
||||
{{foreach $brand_list as $v}}
|
||||
<li {{if isset($v['is_active']) and $v['is_active'] eq 1}}class="active"{{/if}}>
|
||||
<a href="{{$v.url}}" title="{{$v.name}}">
|
||||
{{if empty($v['logo'])}}
|
||||
{{$v.name}}
|
||||
{{else /}}
|
||||
<img src="{{$v.logo}}" alt="{{$v.name}}" />
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else /}}
|
||||
{{if !empty($search_map_info['brand']) and !empty($params['brand'])}}
|
||||
<div class="brand-info">
|
||||
<div class="map-left am-text-center am-fl">品牌</div>
|
||||
<div class="map-right map-images-text-items am-fr am-nbfc">
|
||||
|
|
@ -155,6 +138,23 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else /}}
|
||||
<div class="map-left am-text-center am-fl">品牌</div>
|
||||
<div class="map-right map-images-text-items am-fr am-nbfc">
|
||||
<ul class="am-nbfc">
|
||||
{{foreach $brand_list as $v}}
|
||||
<li {{if isset($v['is_active']) and $v['is_active'] eq 1}}class="active"{{/if}}>
|
||||
<a href="{{$v.url}}" title="{{$v.name}}">
|
||||
{{if empty($v['logo'])}}
|
||||
{{$v.name}}
|
||||
{{else /}}
|
||||
<img src="{{$v.logo}}" alt="{{$v.name}}" />
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -660,6 +660,7 @@ class NavigationService
|
|||
$data = [
|
||||
[
|
||||
'name' => '个人中心',
|
||||
'type' => 'center',
|
||||
'is_login' => 1,
|
||||
'badge' => null,
|
||||
'icon' => 'am-icon-user',
|
||||
|
|
@ -668,6 +669,7 @@ class NavigationService
|
|||
],
|
||||
[
|
||||
'name' => '我的商城',
|
||||
'type' => 'myself',
|
||||
'is_login' => 1,
|
||||
'badge' => null,
|
||||
'icon' => 'am-icon-cube',
|
||||
|
|
@ -681,6 +683,7 @@ class NavigationService
|
|||
],
|
||||
[
|
||||
'name' => '我的收藏',
|
||||
'type' => 'favor',
|
||||
'is_login' => 1,
|
||||
'badge' => null,
|
||||
'icon' => 'am-icon-heart',
|
||||
|
|
@ -694,6 +697,7 @@ class NavigationService
|
|||
],
|
||||
[
|
||||
'name' => '购物车',
|
||||
'type' => 'cart',
|
||||
'is_login' => 1,
|
||||
'badge' => $common_cart_total,
|
||||
'icon' => 'am-icon-shopping-cart',
|
||||
|
|
@ -702,6 +706,7 @@ class NavigationService
|
|||
],
|
||||
[
|
||||
'name' => '消息',
|
||||
'type' => 'message',
|
||||
'is_login' => 1,
|
||||
'badge' => $common_message_total,
|
||||
'icon' => 'am-icon-bell',
|
||||
|
|
|
|||
|
|
@ -297,11 +297,11 @@ class SearchService
|
|||
{
|
||||
$where_base[] = ['g.brand_id', 'in', array_unique($params['brand_ids'])];
|
||||
}
|
||||
} else {
|
||||
if(!empty($params['brand_id']))
|
||||
{
|
||||
$where_base[] = ['g.brand_id', 'in', [intval($params['brand_id'])]];
|
||||
}
|
||||
}
|
||||
// 指定品牌
|
||||
if(!empty($params['brand']))
|
||||
{
|
||||
$where_base[] = ['g.brand_id', 'in', [intval($params['brand'])]];
|
||||
}
|
||||
// web端
|
||||
if(!empty($params['bid']))
|
||||
|
|
@ -525,7 +525,7 @@ class SearchService
|
|||
|
||||
// 参数处理
|
||||
$field_arr = [
|
||||
'brand_ids' => ['brand_ids', 'brand_id', 'bid'],
|
||||
'brand_ids' => ['brand_ids', 'brand', 'bid'],
|
||||
'category_ids' => ['category_ids', 'category_id', 'cid'],
|
||||
'screening_price_values'=> ['screening_price_values', 'peid'],
|
||||
'goods_params_values' => ['goods_params_values', 'psid'],
|
||||
|
|
@ -777,12 +777,13 @@ class SearchService
|
|||
|
||||
// 品牌
|
||||
$brand = null;
|
||||
if(!empty($params['brand_id']))
|
||||
$bid = empty($params['brand']) ? (empty($params['bid']) ? 0 : intval($params['bid'])) : intval($params['brand']);
|
||||
if(!empty($bid))
|
||||
{
|
||||
$data_params = [
|
||||
'field' => 'id,name,describe,logo,website_url',
|
||||
'where' => [
|
||||
['id', '=', intval($params['brand_id'])]
|
||||
['id', '=', $bid]
|
||||
],
|
||||
'm' => 0,
|
||||
'n' => 1,
|
||||
|
|
@ -914,7 +915,7 @@ class SearchService
|
|||
$temp_name = [];
|
||||
|
||||
// 品牌
|
||||
$bid = empty($params['bid']) ? (empty($params['brand_id']) ? 0 : intval($params['brand_id'])) : intval($params['bid']);
|
||||
$bid = empty($params['bid']) ? (empty($params['brand']) ? 0 : intval($params['brand'])) : intval($params['bid']);
|
||||
if(!empty($bid))
|
||||
{
|
||||
$brand = Db::name('Brand')->where(['id'=>$bid])->field('id,name')->find();
|
||||
|
|
|
|||
|
|
@ -526,12 +526,12 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
|
|||
/* 小于1025 */
|
||||
@media only screen and (max-width:1025px) {
|
||||
ul.am-tabs-nav.am-nav.am-nav-tabs { width:100% !important; left: 0px !important; }
|
||||
.goods-detail { padding: 0 5px 10px 5px; }
|
||||
.system-goods-detail { padding: 0 5px 10px 5px; }
|
||||
}
|
||||
|
||||
/* 手机模式下 */
|
||||
@media only screen and (max-width:640px) {
|
||||
.goods-detail { padding: 0px; }
|
||||
.system-goods-detail { padding: 0px; }
|
||||
.detail-title, .detail-attr, .simple-desc { padding: 0px 5px; }
|
||||
.tb-detail-price { padding: 10px 5px; }
|
||||
.buy-nav .buy-nav-opt { width: 40%; }
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ function BuyCartCheck(e)
|
|||
}
|
||||
var type =( typeof(e) == 'object') ? e.attr('data-type') : null;
|
||||
return {
|
||||
"id": $('.goods-detail').data('id'),
|
||||
"id": $('.system-goods-detail').data('id'),
|
||||
"stock": stock,
|
||||
"spec": spec,
|
||||
"type": type
|
||||
|
|
@ -274,12 +274,12 @@ function GoodsSpecDetail()
|
|||
|
||||
// ajax请求
|
||||
$.ajax({
|
||||
url: RequestUrlHandle($('.goods-detail').data('spec-detail-ajax-url')),
|
||||
url: RequestUrlHandle($('.system-goods-detail').data('spec-detail-ajax-url')),
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
timeout: 10000,
|
||||
data: {
|
||||
"id": $('.goods-detail').data('id'),
|
||||
"id": $('.system-goods-detail').data('id'),
|
||||
"stock": stock,
|
||||
"spec": spec
|
||||
},
|
||||
|
|
@ -331,11 +331,11 @@ function GoodsSpecType()
|
|||
|
||||
// ajax请求
|
||||
$.ajax({
|
||||
url: RequestUrlHandle($('.goods-detail').data('spec-type-ajax-url')),
|
||||
url: RequestUrlHandle($('.system-goods-detail').data('spec-type-ajax-url')),
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
timeout: 10000,
|
||||
data: {"id": $('.goods-detail').data('id'), "spec": spec},
|
||||
data: {"id": $('.system-goods-detail').data('id'), "spec": spec},
|
||||
success: function(res)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
|
|
@ -447,7 +447,7 @@ function GoodsNumberChange()
|
|||
dataType: "json",
|
||||
timeout: 10000,
|
||||
data: {
|
||||
"id": $('.goods-detail').data('id'),
|
||||
"id": $('.system-goods-detail').data('id'),
|
||||
"stock": stock,
|
||||
"spec": spec
|
||||
},
|
||||
|
|
@ -631,7 +631,7 @@ $(function() {
|
|||
type: 'post',
|
||||
dataType: "json",
|
||||
timeout: 10000,
|
||||
data: {"id": $('.goods-detail').data('id')},
|
||||
data: {"id": $('.system-goods-detail').data('id')},
|
||||
success: function(res)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
|
|
|
|||
Loading…
Reference in New Issue