细节优化
parent
22c37242b5
commit
5de368264d
|
|
@ -128,6 +128,9 @@
|
|||
<dt>标题名称</dt>
|
||||
<dd>{{$v.title}}</dd>
|
||||
|
||||
<dt>商品简述</dt>
|
||||
<dd>{{$v.simple_desc}}</dd>
|
||||
|
||||
<dt>销售价格(元)</dt>
|
||||
<dd>
|
||||
{{$v.price}}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>商品简述</label>
|
||||
<input type="text" name="simple_desc" placeholder="商品简述" maxlength="60" data-validation-message="商品简述格式 最多60个字符" class="am-radius" {{if !empty($data)}} value="{{$data.simple_desc}}"{{/if}} />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>商品型号</label>
|
||||
<input type="text" name="model" placeholder="商品型号" maxlength="30" data-validation-message="商品型号格式 最多30个字符" class="am-radius" {{if !empty($data)}} value="{{$data.model}}"{{/if}} />
|
||||
|
|
|
|||
|
|
@ -234,6 +234,12 @@
|
|||
<a href="{{:MyUrl('index/goods/index', ['id'=>$vs['goods_id']])}}" target="_blank" title="{{$vs.title}}" {{if !empty($vs['title_color'])}} style="color:{{$vs.title_color}};" {{/if}} >{{$vs.title}}</a>
|
||||
</div>
|
||||
<div class="other">
|
||||
<span class="fl fs-12">
|
||||
型号:
|
||||
{{if !empty($vs.model)}}
|
||||
{{$vs.model}}
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="fl fs-12">
|
||||
规格:
|
||||
{{if !empty($vs.spec_text)}}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
<!--规格-->
|
||||
<!--名称-->
|
||||
<div class="tb-detail-hd">
|
||||
<h1 class="detail-title" {{if !empty($goods.title_color)}}style="color:{{$goods.title_color}};"{{/if}}>
|
||||
<h1 class="detail-title am-margin-bottom-xs" {{if !empty($goods.title_color)}}style="color:{{$goods.title_color}};"{{/if}}>
|
||||
{{$goods.title}}
|
||||
<!-- 商品页面基础信息标题里面钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
|
|
@ -123,6 +123,9 @@
|
|||
{{/foreach}}
|
||||
{{/if}}
|
||||
</h1>
|
||||
{{if !empty($goods['simple_desc'])}}
|
||||
<p class="simple-desc am-margin-bottom-xs">{{$goods.simple_desc}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="tb-detail-list">
|
||||
<!-- 商品页面基础信息顶部钩子 -->
|
||||
|
|
|
|||
|
|
@ -273,11 +273,16 @@
|
|||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="{{$goods.goods_url}}" target="_blank" class="goods-title">{{$goods.title}}</a>
|
||||
{{if !empty($goods.spec)}}
|
||||
{{if !empty($goods.spec) or !empty($goods['model'])}}
|
||||
<ul class="am-margin-top-xs am-text-left goods-attr">
|
||||
{{foreach $goods.spec as $spec}}
|
||||
<li>{{$spec.type}}:{{$spec.value}}</li>
|
||||
{{/foreach}}
|
||||
{{if !empty($goods['model'])}}
|
||||
<li>型号:{{$goods.model}}</li>
|
||||
{{/if}}
|
||||
{{if !empty($goods.spec)}}
|
||||
{{foreach $goods.spec as $spec}}
|
||||
<li>{{$spec.type}}:{{$spec.value}}</li>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -153,15 +153,19 @@ class Hook extends Controller
|
|||
$level = Service::UserLevelMatching();
|
||||
if(!empty($level) && $level['discount_rate'] > 0)
|
||||
{
|
||||
if(empty($goods['original_price']))
|
||||
// 无价格字段则不处理
|
||||
if(isset($goods['price']))
|
||||
{
|
||||
$goods['original_price'] = $goods['price'];
|
||||
}
|
||||
if(empty($goods['original_price']))
|
||||
{
|
||||
$goods['original_price'] = $goods['price'];
|
||||
}
|
||||
|
||||
// 价格处理
|
||||
$goods['price'] = Service::PriceCalculate($goods['price'], $level['discount_rate'], 0);
|
||||
$price_title = empty($level['name']) ? '会员价' : $level['name'];
|
||||
$goods['show_field_price_text'] = '<span class="plugins-membershiplevel-goods-price-icon" title="'.$price_title.'">'.$price_title.'</span>';
|
||||
// 价格处理
|
||||
$goods['price'] = Service::PriceCalculate($goods['price'], $level['discount_rate'], 0);
|
||||
$price_title = empty($level['name']) ? '会员价' : $level['name'];
|
||||
$goods['show_field_price_text'] = '<span class="plugins-membershiplevel-goods-price-icon" title="'.$price_title.'">'.$price_title.'</span>';
|
||||
}
|
||||
|
||||
// 最低价最高价
|
||||
if(isset($goods['min_price']))
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class AppMiniService
|
|||
public static function Created($params = [])
|
||||
{
|
||||
// 是否https
|
||||
if(config('shopxo.is_develop') == false)
|
||||
if(config('shopxo.is_develop') !== true)
|
||||
{
|
||||
if(__MY_HTTP__ != 'https')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class BuyService
|
|||
$where = (!empty($params['where']) && is_array($params['where'])) ? $params['where'] : [];
|
||||
$where['c.user_id'] = $params['user']['id'];
|
||||
|
||||
$field = 'c.*, g.title, g.images, g.inventory_unit, g.is_shelves, g.is_delete_time, g.buy_min_number, g.buy_max_number';
|
||||
$field = 'c.*, g.title, g.images, g.inventory_unit, g.is_shelves, g.is_delete_time, g.buy_min_number, g.buy_max_number, g.model';
|
||||
$data = Db::name('Cart')->alias('c')->join(['__GOODS__'=>'g'], 'g.id=c.goods_id')->where($where)->field($field)->select();
|
||||
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ class BuyService
|
|||
'is_delete_time' => 0,
|
||||
'is_shelves' => 1,
|
||||
],
|
||||
'field' => 'id, id AS goods_id, title, images, inventory_unit, buy_min_number, buy_max_number',
|
||||
'field' => 'id, id AS goods_id, title, images, inventory_unit, buy_min_number, buy_max_number, model',
|
||||
];
|
||||
$ret = GoodsService::GoodsList($p);
|
||||
if(empty($ret['data'][0]))
|
||||
|
|
@ -784,6 +784,7 @@ class BuyService
|
|||
'spec_coding' => empty($v['spec_coding']) ? '' : $v['spec_coding'],
|
||||
'spec_barcode' => empty($v['spec_barcode']) ? '' : $v['spec_barcode'],
|
||||
'buy_number' => intval($v['stock']),
|
||||
'model' => $v['model'],
|
||||
'add_time' => time(),
|
||||
];
|
||||
if(Db::name('OrderDetail')->insertGetId($detail) <= 0)
|
||||
|
|
|
|||
|
|
@ -975,6 +975,13 @@ class GoodsService
|
|||
'checked_data' => '2,60',
|
||||
'error_msg' => '标题名称格式 2~60 个字符',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'length',
|
||||
'key_name' => 'simple_desc',
|
||||
'checked_data' => '60',
|
||||
'is_checked' => 1,
|
||||
'error_msg' => '商品简述格式 最多60个字符',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'length',
|
||||
'key_name' => 'model',
|
||||
|
|
@ -1062,6 +1069,7 @@ class GoodsService
|
|||
$data = [
|
||||
'title' => $params['title'],
|
||||
'title_color' => empty($params['title_color']) ? '' : $params['title_color'],
|
||||
'simple_desc' => $params['simple_desc'],
|
||||
'model' => $params['model'],
|
||||
'place_origin' => isset($params['place_origin']) ? intval($params['place_origin']) : 0,
|
||||
'inventory_unit' => $params['inventory_unit'],
|
||||
|
|
|
|||
|
|
@ -763,6 +763,7 @@ class OrderService
|
|||
$excel_export_items .= '原价:'.$vs['original_price']."\n";
|
||||
$excel_export_items .= '销售价:'.$vs['price']."\n";
|
||||
$excel_export_items .= '总价:'.$vs['total_price']."\n";
|
||||
$excel_export_items .= '型号:'.$vs['model']."\n";
|
||||
$excel_export_items .= '规格:'.$vs['spec_text']."\n";
|
||||
$excel_export_items .= '重量:'.$vs['spec_weight']."\n";
|
||||
$excel_export_items .= '编码:'.$vs['spec_coding']."\n";
|
||||
|
|
|
|||
|
|
@ -1085,6 +1085,12 @@ php;
|
|||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 是否开启开发者模式
|
||||
if(config('shopxo.is_develop') !== true)
|
||||
{
|
||||
return DataReturn('请先开启开发者模式', -1);
|
||||
}
|
||||
|
||||
// 获取应用标记
|
||||
$where = ['id'=>intval($params['id'])];
|
||||
|
|
|
|||
|
|
@ -177,9 +177,7 @@ fieldset legend{margin-left:15px;padding-left:3px;padding-right:3px;color:#333;}
|
|||
.tab a.cur{ font-weight:bold;}
|
||||
|
||||
/*商品详细页*/
|
||||
/*iteminfo*/
|
||||
.clearfix-right{font-size:12px;}
|
||||
.tb-detail-hd h1 {padding-bottom:0.4em; line-height: 1;font-size: 14px;font-weight: 600;color: #333; line-height: 24px;}
|
||||
.simple-desc { color: #999; }
|
||||
|
||||
/*价格*/
|
||||
.tb-detail-price{text-align: left; position: relative;}
|
||||
|
|
@ -421,7 +419,7 @@ ul.detail-attr li {height: 26px;overflow: hidden;line-height: 26px;vertical-alig
|
|||
/* 手机模式下 */
|
||||
@media only screen and (max-width:640px) {
|
||||
.goods-detail { padding: 0px; }
|
||||
.detail-title, .detail-attr { padding: 0px 5px; }
|
||||
.detail-title, .detail-attr, .simple-desc { padding: 0px 5px; }
|
||||
.tb-detail-price { padding: 10px 5px; }
|
||||
.buy-nav .buy-nav-opt { width: 40%; }
|
||||
ul.tm-ind-panel li { border-left: 0px; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
Loading…
Reference in New Issue