细节优化
parent
71884b25ba
commit
2c13394a99
|
|
@ -70,7 +70,7 @@ class Cart extends Common
|
|||
{
|
||||
$params = $this->data_post;
|
||||
$params['user'] = $this->user;
|
||||
return BuyService::CartAdd($params);
|
||||
return BuyService::CartSave($params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class Cart extends Common
|
|||
|
||||
$params = $_POST;
|
||||
$params['user'] = $this->user;
|
||||
return BuyService::CartAdd($params);
|
||||
return BuyService::CartSave($params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -223,11 +223,11 @@
|
|||
<!-- 订单详情操作钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_index_order_detail_operation</span>
|
||||
<span>plugins_view_index_order_detail_operate</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_index_order_detail_operation';
|
||||
$hook_name = 'plugins_view_index_order_detail_operate';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$data['id'], 'data'=>$data]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,11 +237,11 @@
|
|||
<!-- 订单列表操作钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_index_order_list_operation</span>
|
||||
<span>plugins_view_index_order_list_operate</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_index_order_list_operation';
|
||||
$hook_name = 'plugins_view_index_order_list_operate';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$order['id'], 'data'=>$order]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use app\service\ConfigService;
|
|||
class BuyService
|
||||
{
|
||||
/**
|
||||
* 购物车添加
|
||||
* 购物车添加/更新
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
|
|
@ -35,7 +35,7 @@ class BuyService
|
|||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function CartAdd($params = [])
|
||||
public static function CartSave($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
|
|
@ -163,7 +163,7 @@ class BuyService
|
|||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
private static function GoodsSpecificationsHandle($params = [])
|
||||
public static function GoodsSpecificationsHandle($params = [])
|
||||
{
|
||||
$spec = '';
|
||||
if(!empty($params['spec']))
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ return array (
|
|||
array (
|
||||
0 => 'app\\plugins\\coupon\\Hook',
|
||||
1 => 'app\\plugins\\membershiplevelvip\\Hook',
|
||||
2 => 'app\\plugins\\touristbuy\\Hook',
|
||||
),
|
||||
'plugins_view_buy_goods_bottom' =>
|
||||
array (
|
||||
|
|
@ -219,5 +220,25 @@ return array (
|
|||
array (
|
||||
0 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_service_system_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\touristbuy\\Hook',
|
||||
),
|
||||
'plugins_common_header' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\touristbuy\\Hook',
|
||||
),
|
||||
'plugins_view_header_navigation_top_left' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\touristbuy\\Hook',
|
||||
),
|
||||
'plugins_view_user_login_info_top' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\touristbuy\\Hook',
|
||||
),
|
||||
'plugins_view_user_reg_info' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\touristbuy\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
return [
|
||||
// 开发模式
|
||||
'is_develop' => true,
|
||||
'is_develop' => false,
|
||||
|
||||
// 默认编码
|
||||
'default_charset' => 'utf-8',
|
||||
|
|
|
|||
|
|
@ -1589,7 +1589,6 @@ function TableContainerInit()
|
|||
var last_width = $(this).find('th').last().data('width') || $(this).find('th').last().innerWidth();
|
||||
if(last_width > 0)
|
||||
{
|
||||
console.log($(this).find('th').eq(-2).innerWidth())
|
||||
$(this).find('th').eq(-2).css('min-width', ($(this).find('th').eq(-2).innerWidth()+last_width)+'px');
|
||||
$(this).find('th').eq(-2).css('padding-right', (last_width+10)+'px');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
|
|||
.introduce-main .am-sticky-placeholder { margin: 0px !important; }
|
||||
.am-sticky-placeholder .am-nav-tabs > li span { color: #888; }
|
||||
.am-sticky-placeholder .am-nav-tabs > li.am-active span { color: #333; }
|
||||
.attr-not-active { border: 1px solid #f03726 !important; box-shadow: 0 0px 3px #ed7f76, 0 0 6px rgba(0, 0, 0, 0); }
|
||||
.sku-not-active { border: 1px solid #f03726 !important; box-shadow: 0 0px 3px #ed7f76, 0 0 6px rgba(0, 0, 0, 0); }
|
||||
.sku-items-disabled { color: #d2cfcf !important; background-color: #ffffff !important; border: 1px dashed #d5d5d5 !important; box-shadow: none !important; }
|
||||
.sku-dont-choose { color: #b4b3b3 !important; background-color: #ffffff !important; border: 1px solid #ebeaea !important; box-shadow: none !important; }
|
||||
.sku-dont-choose img { opacity: 0.5; }
|
||||
|
|
|
|||
|
|
@ -111,13 +111,13 @@ function CartAdd(e)
|
|||
{
|
||||
if($(this).find('.sku-line.selected').length == 0)
|
||||
{
|
||||
$(this).addClass('attr-not-active');
|
||||
$(this).addClass('sku-not-active');
|
||||
}
|
||||
});
|
||||
PromptCenter('请选择规格');
|
||||
return false;
|
||||
} else {
|
||||
$('.iteminfo_parameter .sku-items').removeClass('attr-not-active');
|
||||
$('.iteminfo_parameter .sku-items').removeClass('sku-not-active');
|
||||
$('.theme-signin-left .sku-items li.selected').each(function(k, v)
|
||||
{
|
||||
spec.push({"type": $(this).data('type-value'), "value": $(this).data('value')})
|
||||
|
|
@ -423,7 +423,7 @@ $(function() {
|
|||
return false;
|
||||
}
|
||||
$(this).addClass('selected').siblings('li').removeClass('selected');
|
||||
$(this).parents('.sku-items').removeClass('attr-not-active');
|
||||
$(this).parents('.sku-items').removeClass('sku-not-active');
|
||||
|
||||
// 去掉元素之后的禁止
|
||||
if(index < length)
|
||||
|
|
@ -608,12 +608,11 @@ $(function() {
|
|||
{
|
||||
number = inventory;
|
||||
}
|
||||
if(number <= 1)
|
||||
if(number <= 1 || isNaN(number))
|
||||
{
|
||||
number = 1;
|
||||
number = min;
|
||||
}
|
||||
$sotck.val(number);
|
||||
console.log(number)
|
||||
});
|
||||
|
||||
//数量增加操作
|
||||
|
|
|
|||
Loading…
Reference in New Issue