商品新增虚拟模式
parent
e3a2e4e272
commit
0df518142d
|
|
@ -87,11 +87,8 @@ class Site extends Common
|
|||
// 自提点地址处理
|
||||
if($nav_type == 'sitetype' && !empty($data['common_self_extraction_address']) && !empty($data['common_self_extraction_address']['value']))
|
||||
{
|
||||
$address_list = json_decode($data['common_self_extraction_address']['value'], true);
|
||||
if(!empty($address_list) && is_array($address_list))
|
||||
{
|
||||
$this->assign('sitetype_address_list', $address_list);
|
||||
}
|
||||
$address = ConfigService::SiteTypeExtractionAddressList($data['common_self_extraction_address']['value']);
|
||||
$this->assign('sitetype_address_list', $address['data']);
|
||||
}
|
||||
|
||||
// 编辑器文件存放地址
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ class Slide extends Common
|
|||
// 事件类型
|
||||
$this->assign('common_app_event_type', lang('common_app_event_type'));
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
|
||||
// 编辑器文件存放地址
|
||||
$this->assign('editor_path_type', 'slide');
|
||||
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@
|
|||
<tr>
|
||||
<th>名称</th>
|
||||
<th class="am-hide-sm-only">所属平台</th>
|
||||
<th>导航图标</th>
|
||||
<th class="am-hide-sm-only">导航图标</th>
|
||||
<th class="am-hide-sm-only">事件值</th>
|
||||
<th class="am-hide-sm-only">启用</th>
|
||||
<th>启用</th>
|
||||
<th>更多</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
<tr id="data-list-{{$v.id}}" {{if $v['is_enable'] eq 0}}class="am-active"{{/if}}>
|
||||
<td>{{$v.name}}</td>
|
||||
<td class="am-hide-sm-only">{{$v.platform_text}}</td>
|
||||
<td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{if !empty($v['images_url'])}}
|
||||
<a href="{{$v['images_url']}}" target="_blank">
|
||||
<img src="{{$v['images_url']}}" class="am-radius am-vertical-align-middle" width="30" height="30" />
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/appcenternav/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-field="is_enable" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@
|
|||
<tr>
|
||||
<th>名称</th>
|
||||
<th class="am-hide-sm-only">所属平台</th>
|
||||
<th>导航图标</th>
|
||||
<th class="am-hide-sm-only">导航图标</th>
|
||||
<th class="am-hide-sm-only">事件值</th>
|
||||
<th class="am-hide-sm-only">登录</th>
|
||||
<th class="am-hide-sm-only">启用</th>
|
||||
<th>启用</th>
|
||||
<th>更多</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<tr id="data-list-{{$v.id}}" {{if $v['is_enable'] eq 0}}class="am-active"{{/if}}>
|
||||
<td>{{$v.name}}</td>
|
||||
<td class="am-hide-sm-only">{{$v.platform_text}}</td>
|
||||
<td>
|
||||
<td class="am-hide-sm-only">
|
||||
<div class="am-circle nav-icon-circle am-vertical-align" {{if !empty($v['bg_color'])}}style="background-color:{{$v.bg_color}};"{{/if}}>
|
||||
{{if !empty($v['images_url'])}}
|
||||
<a href="{{$v['images_url']}}" target="_blank">
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
<td class="am-hide-sm-only">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_need_login'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/apphomenav/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_need_login']}}" data-field="is_need_login"></a>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/apphomenav/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-field="is_enable" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -215,6 +215,16 @@
|
|||
<dt>访问次数</dt>
|
||||
<dd>{{$v.access_count}}</dd>
|
||||
|
||||
<dt>电脑端详情</dt>
|
||||
<dd>
|
||||
<div class="am-scrollable-vertical web-content">{{$v.content_web|raw}}</div>
|
||||
</dd>
|
||||
|
||||
<dt>虚拟商品展示数据</dt>
|
||||
<dd>
|
||||
<div class="am-scrollable-vertical virtual-goods-value">{{$v.virtual_goods_value|raw}}</div>
|
||||
</dd>
|
||||
|
||||
<dt>SEO标题</dt>
|
||||
<dd>{{$v.seo_title}}</dd>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,28 +19,31 @@
|
|||
<nav class="goods-nav">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#goods-nav-base">基础信息</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-base">基础信息</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-operations">商品规格</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-operations">商品规格</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-photo">商品相册</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-photo">商品相册</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-video">商品视频</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-video">商品视频</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-app">手机端详情</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-app">手机端详情</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-web">电脑端详情</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-web">电脑端详情</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-extends">扩展数据</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-virtual">虚拟商品</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#goods-nav-seo">SEO</a>
|
||||
<a href="javascript:;" data-value="#goods-nav-extends">扩展数据</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;" data-value="#goods-nav-seo">SEO</a>
|
||||
</li>
|
||||
<li class="am-text-center am-padding-xs nav-shrink-submit">
|
||||
<i class="am-icon-angle-double-right am-icon-sm"></i>
|
||||
|
|
@ -506,6 +509,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 虚拟商品 -->
|
||||
<div id="goods-nav-virtual" class="division-block">
|
||||
<label class="block nav-detail-title">虚拟商品<span class="am-form-group-label-tips">用户下单后自动发货,用于将该数据展示在用户订单中</span></label>
|
||||
<div class="am-form-group">
|
||||
<script type="text/plain" id="goods-virtual-container" name="virtual_goods_value">{{if !empty($data)}}{{$data.virtual_goods_value|raw}}{{/if}}</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 扩展数据 -->
|
||||
<div id="goods-nav-extends" class="division-block">
|
||||
<label class="block nav-detail-title">扩展数据<span class="am-form-group-label-tips-must">该区域为插件扩展数据,请按照插件文档填写相应的值</span></label>
|
||||
|
|
|
|||
|
|
@ -89,11 +89,11 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>所属平台</th>
|
||||
<th>轮播图片</th>
|
||||
<th>事件值</th>
|
||||
<th>是否启用</th>
|
||||
<th>创建时间</th>
|
||||
<th class="am-hide-sm-only">所属平台</th>
|
||||
<th class="am-hide-sm-only">图片</th>
|
||||
<th class="am-hide-sm-only">事件值</th>
|
||||
<th>启用</th>
|
||||
<th>更多</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -102,8 +102,8 @@
|
|||
{{foreach $data_list as $v}}
|
||||
<tr id="data-list-{{$v.id}}" {{if $v['is_enable'] eq 0}}class="am-active"{{/if}}>
|
||||
<td>{{$v.name}}</td>
|
||||
<td>{{$v.platform_text}}</td>
|
||||
<td {{if !empty($v['bg_color'])}}style="background-color:{{$v.bg_color}};"{{/if}}>
|
||||
<td class="am-hide-sm-only">{{$v.platform_text}}</td>
|
||||
<td class="am-hide-sm-only" {{if !empty($v['bg_color'])}}style="background-color:{{$v.bg_color}};"{{/if}}>
|
||||
{{if !empty($v['images_url'])}}
|
||||
<a href="{{$v['images_url']}}" target="_blank">
|
||||
<img src="{{$v['images_url']}}" class="am-radius" width="100" height="60" />
|
||||
|
|
@ -112,18 +112,68 @@
|
|||
<span class="cr-ddd">暂无图片</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<td class="am-hide-sm-only">
|
||||
{{$v.event_value}}
|
||||
{{if !empty($v['event_value']) and !empty($v['event_type_text'])}}
|
||||
<br /><span class="am-badge am-badge-warning am-radius">{{$v.event_type_text}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/slide/statusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>{{$v.add_time_time}}</td>
|
||||
<td>
|
||||
<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> 查看更多</span>
|
||||
<div class="am-popup am-radius" id="my-popup{{$v.id}}">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">详情内容</h4>
|
||||
<span data-am-modal-close
|
||||
class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<dl class="dl-content">
|
||||
<dt>名称</dt>
|
||||
<dd>{{$v.name}}</dd>
|
||||
|
||||
<dt>所属平台</dt>
|
||||
<dd>{{$v.platform_text}}</dd>
|
||||
|
||||
<dt>图片</dt>
|
||||
<dd>
|
||||
{{if !empty($v['images_url'])}}
|
||||
<a href="{{$v['images_url']}}" target="_blank">
|
||||
<img src="{{$v['images_url']}}" class="am-radius" width="100" height="60" />
|
||||
</a>
|
||||
{{else /}}
|
||||
<span class="cr-ddd">暂无图片</span>
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>事件值</dt>
|
||||
<dd>
|
||||
<div class="event-value">
|
||||
{{$v.event_value}}
|
||||
{{if !empty($v['event_value'])}}
|
||||
<br /><span class="am-badge am-badge-warning am-radius">{{$v.event_type_text}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt>启用</dt>
|
||||
<dd>{{$v.is_enable_text}}</dd>
|
||||
|
||||
<dt>创建时间</dt>
|
||||
<dd>{{$v.add_time_time}}</dd>
|
||||
|
||||
<dt>更新时间</dt>
|
||||
<dd>{{$v.upd_time_time}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="view-operation">
|
||||
<a href="{{:MyUrl('admin/slide/saveinfo', array('id'=>$v['id']))}}">
|
||||
<a href="{{:MyUrl('admin/slide/saveinfo', array_merge($params, ['id'=>$v['id']]))}}">
|
||||
<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit"> 编辑</button>
|
||||
</a>
|
||||
<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:MyUrl('admin/slide/delete')}}" data-id="{{$v.id}}"> 删除</button>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/slide/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/slide/index')}}" enctype="multipart/form-data">
|
||||
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/slide/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/slide/index', $params)}}" enctype="multipart/form-data">
|
||||
<legend>
|
||||
<span class="am-text-default">
|
||||
{{if empty($data['id'])}}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
轮播编辑
|
||||
{{/if}}
|
||||
</span>
|
||||
<a href="{{:MyUrl('admin/slide/index')}}" class="am-fr am-text-sm am-margin-top-xs am-icon-mail-reply"> 返回</a>
|
||||
<a href="{{:MyUrl('admin/slide/index', $params)}}" class="am-fr am-text-sm am-margin-top-xs am-icon-mail-reply"> 返回</a>
|
||||
</legend>
|
||||
<div class="am-form-group">
|
||||
<label>名称</label>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use app\service\GoodsService;
|
|||
use app\service\UserService;
|
||||
use app\service\PaymentService;
|
||||
use app\service\BuyService;
|
||||
use app\service\ConfigService;
|
||||
|
||||
/**
|
||||
* 购买
|
||||
|
|
@ -55,8 +56,23 @@ class Buy extends Common
|
|||
session('buy_post_data', $_POST);
|
||||
return redirect(MyUrl('index/buy/index'));
|
||||
} else {
|
||||
// 获取商品列表
|
||||
$params = array_merge(input(), session('buy_post_data'));
|
||||
// 站点类型,是否开启了展示型
|
||||
if(MyC('common_site_type', 0, true) == 1)
|
||||
{
|
||||
$this->assign('msg', '展示型不允许提交订单');
|
||||
return $this->fetch('public/tips_error');
|
||||
}
|
||||
|
||||
// 获取下单信息
|
||||
$data = session('buy_post_data');
|
||||
if(empty($data))
|
||||
{
|
||||
$this->assign('msg', '商品信息为空');
|
||||
return $this->fetch('public/tips_error');
|
||||
}
|
||||
|
||||
// 参数
|
||||
$params = array_merge(input(), $data);
|
||||
$params['user'] = $this->user;
|
||||
$ret = BuyService::BuyTypeGoodsList($params);
|
||||
|
||||
|
|
@ -69,6 +85,9 @@ class Buy extends Common
|
|||
|
||||
// 支付方式
|
||||
$this->assign('payment_list', PaymentService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
|
||||
|
||||
// 站点类型 - 自提模式下提货地址
|
||||
$this->assign('common_self_extraction_address', ConfigService::SiteTypeExtractionAddressList());
|
||||
|
||||
// 页面数据
|
||||
$this->assign('base', $ret['data']['base']);
|
||||
|
|
|
|||
|
|
@ -213,6 +213,9 @@ class Common extends Controller
|
|||
// 公共参数
|
||||
$this->assign('params', $this->params);
|
||||
|
||||
// 站点类型
|
||||
$this->assign('common_site_type', MyC('common_site_type', 0, true));
|
||||
|
||||
// 商店信息
|
||||
$this->assign('common_customer_store_tel', MyC('common_customer_store_tel'));
|
||||
$this->assign('common_customer_store_email', MyC('common_customer_store_email'));
|
||||
|
|
|
|||
|
|
@ -129,6 +129,9 @@ class Goods extends Common
|
|||
$like_goods = GoodsService::GoodsList($params);
|
||||
$this->assign('detail_like_goods', $like_goods['data']);
|
||||
|
||||
// 站点类型 - 展示型模式操作名称
|
||||
$this->assign('common_is_exhibition_mode_btn_text', MyC('common_is_exhibition_mode_btn_text', '立即咨询', true));
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 购买导航 -->
|
||||
<div class="buy-nav">
|
||||
<div class="buy-nav {{if $common_site_type eq 1}}exhibition-nav{{/if}}">
|
||||
{{if !empty($goods.is_shelves)}}
|
||||
{{if $goods['inventory'] gt 0}}
|
||||
<div class="buy-nav-opt">
|
||||
|
|
@ -330,25 +330,39 @@
|
|||
</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-buy buy-event login-event buy-submit" data-type="buy">
|
||||
<button title="点此按钮到下一步确认购买信息" href="javascript:;" type="button">立即购买</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-basket buy-event login-event cart-submit" data-type="cart" data-ajax-url="{{:MyUrl('index/Cart/Save')}}">
|
||||
<button title="加入购物车" href="javascript:;" type="button"><i></i>加入购物车</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 购买表单 -->
|
||||
<form action="{{:MyUrl('index/buy/index')}}" method="post" class="buy-form">
|
||||
<input type="hidden" name="goods_id" value="{{$goods.id}}" />
|
||||
<input type="hidden" name="buy_type" value="goods" />
|
||||
<input type="hidden" name="stock" value="1" />
|
||||
<input type="hidden" name="spec" value="" />
|
||||
<button type="submit"></button>
|
||||
</form>
|
||||
<!-- 站点模式 1 展示型 -->
|
||||
{{if $common_site_type eq 1}}
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-basket" data-type="cart" data-ajax-url="{{:MyUrl('index/Cart/Save')}}">
|
||||
<a href="{{if empty($common_customer_store_tel)}}javascript:;{{else /}}tel:{{$common_customer_store_tel}}{{/if}}">
|
||||
<button title="{{$common_is_exhibition_mode_btn_text}}" href="javascript:;" type="button"><i class="am-icon-phone"></i> {{$common_is_exhibition_mode_btn_text}}</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 销售型,自提点,虚拟销售 -->
|
||||
{{else /}}
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-buy buy-event login-event buy-submit" data-type="buy">
|
||||
<button title="点此按钮到下一步确认购买信息" href="javascript:;" type="button">立即购买</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-basket buy-event login-event cart-submit" data-type="cart" data-ajax-url="{{:MyUrl('index/Cart/Save')}}">
|
||||
<button title="加入购物车" href="javascript:;" type="button"><i></i>加入购物车</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 购买表单 -->
|
||||
<form action="{{:MyUrl('index/buy/index')}}" method="post" class="buy-form">
|
||||
<input type="hidden" name="goods_id" value="{{$goods.id}}" />
|
||||
<input type="hidden" name="buy_type" value="goods" />
|
||||
<input type="hidden" name="stock" value="1" />
|
||||
<input type="hidden" name="spec" value="" />
|
||||
<button type="submit"></button>
|
||||
</form>
|
||||
{{/if}}
|
||||
{{else /}}
|
||||
<p class="goods-not-buy-tips">商品卖光了</p>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -775,6 +775,12 @@ class BuyService
|
|||
*/
|
||||
public static function OrderAdd($params = [])
|
||||
{
|
||||
// 站点类型,是否开启了展示型
|
||||
if(MyC('common_site_type', 0, true) == 1)
|
||||
{
|
||||
return DataReturn('展示型不允许提交订单', -1);
|
||||
}
|
||||
|
||||
// 请求参数
|
||||
$p = [
|
||||
[
|
||||
|
|
|
|||
|
|
@ -267,5 +267,35 @@ class ConfigService
|
|||
|
||||
return DataReturn('操作成功', 0, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点自提模式 - 自提地址列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-11-13
|
||||
* @desc description
|
||||
* @param [string] $value [自提的配置数据]
|
||||
*/
|
||||
public static function SiteTypeExtractionAddressList($value = null)
|
||||
{
|
||||
// 未指定内容则从缓存读取
|
||||
if(empty($value))
|
||||
{
|
||||
$value = MyC('common_self_extraction_address');
|
||||
}
|
||||
|
||||
// 数据处理
|
||||
$data = [];
|
||||
if(!empty($value) && is_string($value))
|
||||
{
|
||||
$temp_data = json_decode($value, true);
|
||||
if(!empty($temp_data) && is_array($temp_data))
|
||||
{
|
||||
$data = $temp_data;
|
||||
}
|
||||
}
|
||||
return DataReturn('操作成功', 0, $data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -353,6 +353,12 @@ class GoodsService
|
|||
$v['content_web'] = ResourcesService::ContentStaticReplace($v['content_web'], 'get');
|
||||
}
|
||||
|
||||
// 虚拟商品展示数据
|
||||
if(isset($v['virtual_goods_value']))
|
||||
{
|
||||
$v['virtual_goods_value'] = ResourcesService::ContentStaticReplace($v['virtual_goods_value'], 'get');
|
||||
}
|
||||
|
||||
// 产地
|
||||
if(isset($v['place_origin']))
|
||||
{
|
||||
|
|
@ -1109,6 +1115,7 @@ class GoodsService
|
|||
|
||||
// 编辑器内容
|
||||
$content_web = empty($params['content_web']) ? '' : ResourcesService::ContentStaticReplace(htmlspecialchars_decode($params['content_web']), 'add');
|
||||
$virtual_goods_value = empty($params['virtual_goods_value']) ? '' : ResourcesService::ContentStaticReplace(htmlspecialchars_decode($params['virtual_goods_value']), 'add');
|
||||
|
||||
// 基础数据
|
||||
$data = [
|
||||
|
|
@ -1135,6 +1142,7 @@ class GoodsService
|
|||
'seo_desc' => empty($params['seo_desc']) ? '' : $params['seo_desc'],
|
||||
'is_exist_many_spec' => empty($specifications['data']['title']) ? 0 : 1,
|
||||
'spec_base' => empty($specifications_base['data']) ? '' : json_encode($specifications_base['data']),
|
||||
'virtual_goods_value' => $virtual_goods_value,
|
||||
];
|
||||
|
||||
// 商品保存处理钩子
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -12,6 +12,13 @@
|
|||
float:left;
|
||||
margin-right:5px;
|
||||
}
|
||||
.goods-list.am-table dl .web-content img,
|
||||
.goods-list.am-table dl .virtual-goods-value img {
|
||||
max-width: 100%;
|
||||
}
|
||||
.goods-list.am-table dl .virtual-goods-value {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 滚动导航
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
@media only screen and (max-width: 321px) {
|
||||
.view-operation button { margin: 2px 0px; }
|
||||
}
|
||||
.event-value { max-width: 260px; word-wrap: break-word; word-break: break-all; }
|
||||
|
||||
/**
|
||||
* 覆盖插件样式
|
||||
|
|
|
|||
|
|
@ -55,8 +55,12 @@ $(function()
|
|||
// 商品导航
|
||||
$('.goods-nav li a').on('click', function()
|
||||
{
|
||||
// 样式
|
||||
$('.goods-nav li a').removeClass('goods-nav-active');
|
||||
$(this).addClass('goods-nav-active');
|
||||
|
||||
// 滚动
|
||||
$(window).smoothScroll({position: $($(this).data('value')).offset().top});
|
||||
});
|
||||
|
||||
// 商品导航收缩
|
||||
|
|
@ -667,4 +671,14 @@ $(function()
|
|||
onCancel: function(){}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 虚拟商品编辑器初始化
|
||||
if($('#goods-virtual-container').length > 0)
|
||||
{
|
||||
UE.getEditor('goods-virtual-container', {
|
||||
toolbars: [['source', 'undo', 'redo', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', '|', 'forecolor', 'backcolor', 'link', 'fontsize', 'insertorderedlist', 'insertunorderedlist']],
|
||||
initialFrameHeight : 100
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -447,4 +447,11 @@ ul.detail-attr li {height: 26px;overflow: hidden;line-height: 26px;vertical-alig
|
|||
|
||||
/* 底部 */
|
||||
.am-footer { padding-bottom: 35px; }
|
||||
}
|
||||
|
||||
|
||||
/* 展示模式 */
|
||||
.exhibition-nav div.submit { width: 60%; }
|
||||
@media only screen and (min-width:641px) {
|
||||
.exhibition-nav .buy-nav-opt { margin-left: 120px; }
|
||||
}
|
||||
|
|
@ -656,24 +656,21 @@ $(function() {
|
|||
GoodsCommentsHtml(page);
|
||||
|
||||
// 回到评论顶部位置
|
||||
var top = $('.introduce-main').offset().top;
|
||||
$(window).smoothScroll({position: top});
|
||||
$(window).smoothScroll({position: $('.introduce-main').offset().top});
|
||||
}
|
||||
});
|
||||
|
||||
// 累计评价点击事件
|
||||
$('.tm-ind-panel .ind-panel-comment').on('click', function()
|
||||
{
|
||||
var top = $('.introduce-main').offset().top;
|
||||
$(window).smoothScroll({position: top});
|
||||
$(window).smoothScroll({position: $('.introduce-main').offset().top});
|
||||
$('.introduce-main .am-tabs').tabs('open', 1);
|
||||
});
|
||||
|
||||
// tab事件
|
||||
$('.introduce-main .am-tabs li').on('click', function()
|
||||
{
|
||||
var top = $('.introduce-main').offset().top;
|
||||
$(window).smoothScroll({position: top});
|
||||
$(window).smoothScroll({position: $('.introduce-main').offset().top});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue