mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-29 10:29:27 +08:00
细节优化
This commit is contained in:
parent
4312467a5c
commit
0df1ae196d
@ -25,10 +25,11 @@ class Order extends Common
|
||||
{
|
||||
/**
|
||||
* 构造方法
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@ -44,10 +45,11 @@ class Order extends Common
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
@ -96,10 +98,11 @@ class Order extends Common
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-08-05T08:21:54+0800
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Detail()
|
||||
{
|
||||
@ -130,11 +133,12 @@ class Order extends Common
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 订单删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
* 订单删除
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
@ -154,11 +158,12 @@ class Order extends Common
|
||||
}
|
||||
|
||||
/**
|
||||
* [Cancel 订单取消]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
* 订单取消
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Cancel()
|
||||
{
|
||||
@ -177,11 +182,12 @@ class Order extends Common
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delivery 订单发货/取货]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
* 订单发货/取货
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Delivery()
|
||||
{
|
||||
@ -199,11 +205,12 @@ class Order extends Common
|
||||
}
|
||||
|
||||
/**
|
||||
* [Collect 订单收货]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
* 订单收货
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Collect()
|
||||
{
|
||||
@ -222,11 +229,12 @@ class Order extends Common
|
||||
}
|
||||
|
||||
/**
|
||||
* [Confirm 订单确认]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
* 订单确认
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
* @desc description
|
||||
*/
|
||||
public function Confirm()
|
||||
{
|
||||
@ -246,7 +254,7 @@ class Order extends Common
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
* @author Devil
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-28
|
||||
|
@ -66,7 +66,6 @@ class Answer
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -65,7 +65,6 @@ class GoodsBrowse
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'b.user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -67,7 +67,6 @@ class GoodsComments
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereGoodsInfo',
|
||||
'placeholder' => '请输入商品名称/型号',
|
||||
@ -82,7 +81,6 @@ class GoodsComments
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -65,7 +65,6 @@ class GoodsFavor
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'f.user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -54,7 +54,6 @@ class IntegralLog
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -67,7 +67,6 @@ class Message
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -60,7 +60,6 @@ class Order
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单ID/订单号/商品名称/型号',
|
||||
@ -75,7 +74,6 @@ class Order
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
@ -197,7 +195,6 @@ class Order
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueAddressInfo',
|
||||
],
|
||||
@ -211,7 +208,6 @@ class Order
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueTakeInfo',
|
||||
],
|
||||
|
@ -56,7 +56,6 @@ class OrderAftersale
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单号/商品名称/型号',
|
||||
@ -71,7 +70,6 @@ class OrderAftersale
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -56,7 +56,6 @@ class PayLog
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
@ -147,7 +146,6 @@ class PayLog
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueBusinessInfo',
|
||||
],
|
||||
|
@ -55,7 +55,6 @@ class RefundLog
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -66,7 +66,6 @@ class UserAddress
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
|
@ -70,7 +70,6 @@ class WarehouseGoods
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereGoodsInfo',
|
||||
'placeholder' => '请输入商品名称/型号',
|
||||
|
@ -31,11 +31,45 @@
|
||||
<hr data-am-widget="divider" class="am-divider am-divider-dashed" />
|
||||
{{/if}}
|
||||
<p class="am-nbfc am-margin-bottom-sm">
|
||||
<!-- 订单号/id -->
|
||||
<strong class="am-icon-bookmark-o"> {{$module_data.order_no}}</strong>
|
||||
<strong class="am-icon-circle-thin am-margin-left-lg"> {{$module_data.id}}</strong>
|
||||
|
||||
<!-- 仓库信息 -->
|
||||
{{if !empty($module_data['warehouse_name'])}}
|
||||
<span class="am-fr"> {{$module_data.warehouse_name}}</span>
|
||||
<span class="warehouse-item-container am-fr">
|
||||
{{if !empty($module_data['warehouse_icon'])}}<i class="{{$module_data.warehouse_icon}}"></i>{{/if}}
|
||||
{{if empty($module_data['warehouse_url'])}}
|
||||
<strong class="warehouse-name">{{$module_data.warehouse_name}}</strong>
|
||||
{{else /}}
|
||||
<a href="{{$module_data.warehouse_url}}" target="_blank" class="text-deco-none">
|
||||
<strong class="warehouse-name">{{$module_data.warehouse_name}}</strong>
|
||||
</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<!-- 订单列表基础导航底部-开始 -->
|
||||
{{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_admin_order_list_base_nav_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_admin_order_list_base_nav_bottom';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$module_data]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 订单列表基础导航底部-结束 -->
|
||||
</p>
|
||||
|
||||
<!-- 订单列表基础商品顶部-开始 -->
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>版本<span class="am-form-group-label-tips">主版本.次版本号.修订号,每个段不超过6位,如 1.0.0</span></label>
|
||||
<input type="text" name="version" placeholder="版本" minlength="5" maxlength="18" data-validation-message="版本格式有误" pattern="^[0-9]{1,6}\.[0-9]{1,6}\.[0-9]{1,6}$" class="am-radius" {{if !empty($data)}} value="{{$data.version}}"{{/if}} required />
|
||||
<input type="text" name="version" placeholder="版本" minlength="5" maxlength="18" data-validation-message="版本格式有误" pattern="{{:lang('common_regex_version')}}" class="am-radius" {{if !empty($data)}} value="{{$data.version}}"{{/if}} required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-file">
|
||||
|
@ -36,6 +36,15 @@
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_header_top_is_home.name}}<span class="am-form-group-label-tips">{{$data.home_header_top_is_home.describe}}</span></label>
|
||||
<select name="{{$data.home_header_top_is_home.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.home_header_top_is_home.error_tips}}" required>
|
||||
{{foreach $site_site_state_list as $v}}
|
||||
<option value="{{$v.value}}" {{if isset($data['home_header_top_is_home']['value']) and $data['home_header_top_is_home']['value'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -36,6 +36,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_search_is_brand.name}}<span class="am-form-group-label-tips">{{$data.home_search_is_brand.describe}}</span></label>
|
||||
<select name="{{$data.home_search_is_brand.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.home_search_is_brand.error_tips}}" required>
|
||||
{{foreach $site_site_state_list as $v}}
|
||||
<option value="{{$v.value}}" {{if isset($data['home_search_is_brand']['value']) and $data['home_search_is_brand']['value'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_search_is_category.name}}<span class="am-form-group-label-tips">{{$data.home_search_is_category.describe}}</span></label>
|
||||
<select name="{{$data.home_search_is_category.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.home_search_is_category.error_tips}}" required>
|
||||
{{foreach $site_site_state_list as $v}}
|
||||
<option value="{{$v.value}}" {{if isset($data['home_search_is_category']['value']) and $data['home_search_is_category']['value'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_search_is_price.name}}<span class="am-form-group-label-tips">{{$data.home_search_is_price.describe}}</span></label>
|
||||
<select name="{{$data.home_search_is_price.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.home_search_is_price.error_tips}}" required>
|
||||
|
@ -34,13 +34,14 @@ class OrderNotify extends Common
|
||||
// 调用父类前置方法
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [Notify 支付异步处理]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-03-04T14:35:38+0800
|
||||
* 支付异步处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-09-12
|
||||
* @desc description
|
||||
*/
|
||||
public function Notify()
|
||||
{
|
||||
@ -111,7 +112,7 @@ class OrderNotify extends Common
|
||||
$payment_obj = new $payment();
|
||||
if(method_exists($payment_obj, $action))
|
||||
{
|
||||
return $payment_obj->$action();
|
||||
return $payment_obj->$action($this->data_request);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
|
@ -16,6 +16,7 @@ use app\service\UserService;
|
||||
use app\service\UserAddressService;
|
||||
use app\service\PaymentService;
|
||||
use app\service\BuyService;
|
||||
use app\service\SeoService;
|
||||
|
||||
/**
|
||||
* 购买
|
||||
@ -112,6 +113,9 @@ class Buy extends Common
|
||||
// 钩子
|
||||
$this->PluginsHook($buy_ret['data'], $params);
|
||||
|
||||
// 浏览器名称
|
||||
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('订单确认', 1));
|
||||
|
||||
return $this->fetch();
|
||||
} else {
|
||||
$this->assign('msg', isset($ret['msg']) ? $ret['msg'] : '参数错误');
|
||||
|
@ -10,8 +10,8 @@
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\index\controller;
|
||||
|
||||
use think\facade\Hook;
|
||||
use think\Controller;
|
||||
use think\facade\Hook;
|
||||
use app\module\FormHandleModule;
|
||||
use app\service\SystemService;
|
||||
use app\service\ResourcesService;
|
||||
|
@ -191,7 +191,19 @@ class Goods extends Common
|
||||
// 商品页面购买导航顶部钩子
|
||||
'plugins_view_goods_detail_buy_nav_top',
|
||||
|
||||
// 商品页面基础信息面板底部钩子
|
||||
// 商品页右侧内容顶部钩子
|
||||
'plugins_view_goods_detail_right_content_top',
|
||||
|
||||
// 商品页右侧内容底部钩子
|
||||
'plugins_view_goods_detail_right_content_bottom',
|
||||
|
||||
// 商品页右侧内容内部顶部钩子
|
||||
'plugins_view_goods_detail_right_content_inside_top',
|
||||
|
||||
// 商品页右侧内容内部底部钩子
|
||||
'plugins_view_goods_detail_right_content_inside_bottom',
|
||||
|
||||
// 商品页基础信息底部钩子
|
||||
'plugins_view_goods_detail_base_bottom',
|
||||
|
||||
// 商品页面tabs顶部钩子
|
||||
@ -209,7 +221,10 @@ class Goods extends Common
|
||||
// 商品页面基础信息面板售价顶部钩子
|
||||
'plugins_view_goods_detail_panel_price_top',
|
||||
|
||||
// 商品页面基础信息购买小导航里面钩子
|
||||
// 商品页面基础信息购买小导航内部前面钩子
|
||||
'plugins_view_goods_detail_base_buy_nav_min_inside_begin',
|
||||
|
||||
// 商品页面基础信息购买小导航内部中间钩子
|
||||
'plugins_view_goods_detail_base_buy_nav_min_inside',
|
||||
];
|
||||
foreach($hook_arr as $hook_name)
|
||||
|
@ -73,7 +73,6 @@ class OrderAftersale
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_value_custom' => 'WhereBaseGoodsInfo',
|
||||
'placeholder' => '请输入订单号/商品名称/型号',
|
||||
|
@ -293,7 +293,18 @@
|
||||
{{/php}}
|
||||
<!-- 分组导航内部开始钩子-结束 -->
|
||||
|
||||
<strong>{{$v.name}}{{if !empty($v['alias'])}}<span class="am-badge am-badge-secondary-plain am-radius am-margin-left-xs">{{$v.alias}}</span>{{/if}}</strong>
|
||||
<!-- 仓库信息 -->
|
||||
<span class="warehouse-item-container">
|
||||
{{if !empty($v['icon'])}}<i class="{{$v.icon}}"></i>{{/if}}
|
||||
{{if empty($v['url'])}}
|
||||
<strong class="warehouse-name">{{$v.name}}</strong>
|
||||
{{else /}}
|
||||
<a href="{{$v.url}}" target="_blank" class="text-deco-none">
|
||||
<strong class="warehouse-name">{{$v.name}}</strong>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{if !empty($v['alias'])}}<span class="am-badge am-badge-secondary-plain am-radius am-margin-left-xs">{{$v.alias}}</span>{{/if}}
|
||||
</span>
|
||||
|
||||
<!-- 分组导航内部中间钩子-开始 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
@ -317,6 +328,7 @@
|
||||
{{/php}}
|
||||
<!-- 分组导航内部中间钩子-结束 -->
|
||||
|
||||
<!-- 地理位置 -->
|
||||
{{if isset($v['lng']) and isset($v['lat']) and $v['lng'] neq 0 and $v['lat'] neq 0}}
|
||||
<div class="am-fr">
|
||||
<a href="javascript:;" class="am-badge am-badge-default am-radius am-icon-map-marker submit-map-popup" data-lng="{{$v.lng}}" data-lat="{{$v.lat}}"> 查看地图</a>
|
||||
|
@ -132,387 +132,467 @@
|
||||
|
||||
<!-- 右侧 -->
|
||||
<div class="clearfix-right">
|
||||
<!--规格-->
|
||||
<!--名称-->
|
||||
<div class="tb-detail-hd">
|
||||
<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)}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_goods_detail_right_content_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_right_content_top_data) and is_array($plugins_view_goods_detail_right_content_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_right_content_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页右侧内容顶部钩子 结束 -->
|
||||
|
||||
<!-- 公共icon数据 -->
|
||||
{{if !empty($goods['plugins_view_icon_data']) and is_array($goods['plugins_view_icon_data'])}}
|
||||
<span class="goods-plugins-view-icon-container">
|
||||
{{foreach $goods.plugins_view_icon_data as $v}}
|
||||
{{if !empty($v) or is_array($v) and !empty($v['name'])}}
|
||||
<span class="am-badge am-radius" style="{{if !empty($v['br_color'])}}border:1px solid {{$v.br_color}};{{/if}}{{if !empty($v['color'])}}color:{{$v.color}};{{/if}}">{{$v.name}}</span>
|
||||
<!-- 右侧内容 -->
|
||||
<div class="clearfix-right-content">
|
||||
<!-- 商品页右侧内容内部顶部钩子 开始 -->
|
||||
{{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_goods_detail_right_content_inside_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_right_content_inside_top_data) and is_array($plugins_view_goods_detail_right_content_inside_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_right_content_inside_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页右侧内容内部顶部钩子 结束 -->
|
||||
|
||||
<!--规格/名称-->
|
||||
<div class="tb-detail-hd">
|
||||
<h1 class="detail-title am-margin-bottom-xs" {{if !empty($goods.title_color)}}style="color:{{$goods.title_color}};"{{/if}}>
|
||||
{{$goods.title}}
|
||||
<!-- 公共icon数据 -->
|
||||
{{if !empty($goods['plugins_view_icon_data']) and is_array($goods['plugins_view_icon_data'])}}
|
||||
<span class="goods-plugins-view-icon-container">
|
||||
{{foreach $goods.plugins_view_icon_data as $v}}
|
||||
{{if !empty($v) or is_array($v) and !empty($v['name'])}}
|
||||
<span class="am-badge am-radius" style="{{if !empty($v['br_color'])}}border:1px solid {{$v.br_color}};{{/if}}{{if !empty($v['color'])}}color:{{$v.color}};{{/if}}">{{$v.name}}</span>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息标题里面钩子 -->
|
||||
{{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_goods_detail_title</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_title_data) and is_array($plugins_view_goods_detail_title_data)}}
|
||||
{{foreach $plugins_view_goods_detail_title_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</span>
|
||||
{{/if}}
|
||||
</h1>
|
||||
{{if !empty($goods['simple_desc'])}}
|
||||
<p class="simple-desc am-margin-bottom-xs">{{$goods.simple_desc}}</p>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息标题里面钩子 -->
|
||||
{{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_goods_detail_title</span>
|
||||
</div>
|
||||
<div class="tb-detail-list">
|
||||
<!-- 公共面板数据 -->
|
||||
{{if !empty($goods['plugins_view_panel_data']) and is_array($goods['plugins_view_panel_data'])}}
|
||||
<div class="goods-plugins-view-panel-container am-margin-bottom-sm">
|
||||
{{foreach $goods.plugins_view_panel_data as $v}}
|
||||
{{if is_string($v) or is_int($v)}}
|
||||
<p>{{$v}}</p>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_title_data) and is_array($plugins_view_goods_detail_title_data)}}
|
||||
{{foreach $plugins_view_goods_detail_title_data as $hook}}
|
||||
|
||||
<!-- 商品页面基础信息顶部钩子 -->
|
||||
{{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_goods_detail_base_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_top_data) and is_array($plugins_view_goods_detail_base_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/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">
|
||||
<!-- 公共面板数据 -->
|
||||
{{if !empty($goods['plugins_view_panel_data']) and is_array($goods['plugins_view_panel_data'])}}
|
||||
<div class="goods-plugins-view-panel-container am-margin-bottom-sm">
|
||||
{{foreach $goods.plugins_view_panel_data as $v}}
|
||||
{{if is_string($v) or is_int($v)}}
|
||||
<p>{{$v}}</p>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息顶部钩子 -->
|
||||
<!-- 基础面板 -->
|
||||
<div class="tb-detail-price">
|
||||
{{if isset($goods['original_price']) and $goods['original_price'] gt 0 and !empty($goods['show_field_original_price_text'])}}
|
||||
<!-- 原价 -->
|
||||
<div class="items price">
|
||||
<dt>{{$goods.show_field_original_price_text|raw}}</dt>
|
||||
<dd>
|
||||
<b class="goods-original-price original-price-value" data-original-price="{{$goods.original_price}}">{{$currency_symbol}}{{$goods.original_price}}</b>
|
||||
</dd>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息面板售价顶部钩子 -->
|
||||
{{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_goods_detail_panel_price_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_panel_price_top_data) and is_array($plugins_view_goods_detail_panel_price_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_panel_price_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 售价 -->
|
||||
<div class="items price iteminfo_mktprice">
|
||||
<dt>{{if empty($goods['show_field_price_text'])}}销售价{{else /}}{{$goods.show_field_price_text|raw}}{{/if}}</dt>
|
||||
<dd>
|
||||
<em>{{$currency_symbol}}</em>
|
||||
<b class="goods-price" data-original-price="{{$goods.price}}">{{$goods.price}}</b>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<!-- 二维码 -->
|
||||
<div class="goods-qrcode am-hide-sm-only">
|
||||
<i class="am-icon-qrcode am-icon-sm"></i>
|
||||
<img class="qrcode-images am-img-thumbnail" src="{{$qrcode_url}}" />
|
||||
</div>
|
||||
|
||||
<!-- 商品页面基础信息面板底部钩子 -->
|
||||
{{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_goods_detail_panel_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_panel_bottom_data) and is_array($plugins_view_goods_detail_panel_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_panel_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!--销量/浏览/评论-->
|
||||
<ul class="tm-ind-panel">
|
||||
<li class="tm-ind-item">
|
||||
<div class="tm-indcon"><span class="tm-label">累计销量</span><span class="tm-count">{{$goods.sales_count}}</span></div>
|
||||
</li>
|
||||
<li class="tm-ind-item">
|
||||
<div class="tm-indcon"><span class="tm-label">浏览次数</span><span class="tm-count">{{$goods.access_count}}</span></div>
|
||||
</li>
|
||||
<li class="tm-ind-item ind-panel-comment">
|
||||
<div class="tm-indcon"><span class="tm-label">累计评论</span><span class="tm-count">{{$goods.comments_count}}</span></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{if !empty($goods['parameters']) and !empty($goods['parameters']['base'])}}
|
||||
<!-- 商品基础参数 -->
|
||||
<ul class="am-avg-sm-2 am-avg-md-2 am-avg-lg-3 am-padding-vertical-xs parameters-content parameters-base">
|
||||
{{foreach $goods.parameters.base as $v}}
|
||||
<li class="am-padding-vertical-xs am-padding-horizontal-sm am-text-truncate">
|
||||
<span>{{$v.name}}:</span>
|
||||
<span>{{$v.value}}</span>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
<!--各种规格-->
|
||||
{{if $goods['is_shelves'] == 1 and $goods['inventory'] gt 0}}
|
||||
<dl class="iteminfo_parameter sys_item_specpara">
|
||||
<dt class="buy-event mini-spec-event" data-type="buy">
|
||||
<div class="cart-title">
|
||||
<span class="specpara-title">可选规格</span>
|
||||
<span class="am-icon-angle-right"></span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<!--操作页面-->
|
||||
<div class="theme-popover-mask"></div>
|
||||
<div class="theme-popover">
|
||||
<div class="theme-span"></div>
|
||||
<div class="theme-poptit">
|
||||
<a href="javascript:;" title="关闭" class="close am-icon-close am-icon-sm"></a>
|
||||
</div>
|
||||
<div class="theme-popbod dform">
|
||||
<form class="theme-signin am-padding-sm" action="javascript:;">
|
||||
<div class="theme-signin-left">
|
||||
<!-- 商品页面规格顶部钩子 -->
|
||||
{{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_goods_detail_base_sku_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_sku_top_data) and is_array($plugins_view_goods_detail_base_sku_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_sku_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if !empty($goods['specifications']['choose'])}}
|
||||
{{foreach $goods.specifications.choose as $key=>$spec}}
|
||||
{{if !empty($spec['value'])}}
|
||||
<div class="theme-options sku-items">
|
||||
<div class="cart-title">{{$spec.name}}</div>
|
||||
<ul>
|
||||
{{foreach $spec.value as $keys=>$specs}}
|
||||
<li class="sku-line {{if !empty($specs['images'])}} sku-line-images{{/if}} {{if $key gt 0}} sku-dont-choose{{/if}} {{if isset($specs['is_only_level_one']) and isset($specs['inventory']) and $specs['inventory'] elt 0}} sku-items-disabled{{/if}}" data-type-value="{{$spec.name}}" data-value="{{$specs.name}}" {{if !empty($specs['images'])}} data-type-images="{{$specs.images}}"{{/if}}>
|
||||
{{if !empty($specs['images'])}}
|
||||
<img src="{{$specs.images}}" />
|
||||
{{/if}}
|
||||
{{$specs.name}}<i></i>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面库存数量顶部钩子 -->
|
||||
{{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_goods_detail_base_inventory_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_inventory_top_data) and is_array($plugins_view_goods_detail_base_inventory_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_inventory_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 库存数量 -->
|
||||
<div class="theme-options">
|
||||
<div class="cart-title number">数量</div>
|
||||
<dd>
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<button class="am-input-group-label" id="min" type="button">-</button>
|
||||
<input type="number" class="am-form-field" value="{{$goods.buy_min_number}}" id="text_box" min="{{$goods.buy_min_number}}" max="{{if empty($goods['buy_max_number'])}}{{$goods.inventory}}{{else /}}{{$goods.buy_max_number}}{{/if}}" data-original-max="{{$goods.inventory}}" />
|
||||
<button class="am-input-group-label" id="add" type="button">+</button>
|
||||
</div>
|
||||
<span class="tb-hidden stock-tips"><span>库存</span><span class="stock" data-original-stock="{{$goods.inventory}}" data-min-limit="{{$goods.buy_min_number}}" data-max-limit="{{$goods.buy_max_number}}" data-unit="{{$goods.inventory_unit}}">{{$goods.inventory}}</span><span>{{$goods.inventory_unit}}</span></span>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<!-- 商品页面库存数量底部钩子 -->
|
||||
{{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_goods_detail_base_inventory_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_inventory_bottom_data) and is_array($plugins_view_goods_detail_base_inventory_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_inventory_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<div class="btn-op">
|
||||
<span class="btn am-btn am-btn-default confirm login-event" data-type="cart">确认</span>
|
||||
<span class="btn close am-btn am-btn-danger cancel">取消</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="theme-signin-right">
|
||||
<div class="img-info">
|
||||
<img src="{{$goods.images}}" />
|
||||
</div>
|
||||
<div class="text-info">
|
||||
<span class="price-now" data-original-price="{{$goods.price}}">{{$currency_symbol}}{{$goods.price}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- 商品页面购买导航顶部钩子 -->
|
||||
{{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_goods_detail_base_top</span>
|
||||
<span>plugins_view_goods_detail_buy_nav_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_top_data) and is_array($plugins_view_goods_detail_base_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_top_data as $hook}}
|
||||
{{if !empty($plugins_view_goods_detail_buy_nav_top_data) and is_array($plugins_view_goods_detail_buy_nav_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_buy_nav_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 基础面板 -->
|
||||
<div class="tb-detail-price">
|
||||
{{if isset($goods['original_price']) and $goods['original_price'] gt 0 and !empty($goods['show_field_original_price_text'])}}
|
||||
<!-- 原价 -->
|
||||
<div class="items price">
|
||||
<dt>{{$goods.show_field_original_price_text|raw}}</dt>
|
||||
<dd>
|
||||
<b class="goods-original-price original-price-value" data-original-price="{{$goods.original_price}}">{{$currency_symbol}}{{$goods.original_price}}</b>
|
||||
</dd>
|
||||
</div>
|
||||
{{/if}}
|
||||
<!-- 购买导航 -->
|
||||
<div class="buy-nav {{if $common_site_type eq 1}}exhibition-nav{{else /}}{{if isset($is_goods_site_type_consistent) and $is_goods_site_type_consistent neq 1}}site-type-not-consistent-nav{{/if}}{{/if}}">
|
||||
{{if !empty($goods.is_shelves)}}
|
||||
{{if $goods['inventory'] gt 0}}
|
||||
<div class="buy-nav-opt">
|
||||
<!-- 商品页面基础信息购买小导航内部前面钩子 开始 -->
|
||||
{{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_goods_detail_base_buy_nav_min_inside_begin</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_buy_nav_min_inside_begin_data) and is_array($plugins_view_goods_detail_base_buy_nav_min_inside_begin_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_buy_nav_min_inside_begin_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页面基础信息购买小导航内部前面钩子 结束 -->
|
||||
|
||||
<!-- 商品页面基础信息面板售价顶部钩子 -->
|
||||
{{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_goods_detail_panel_price_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_panel_price_top_data) and is_array($plugins_view_goods_detail_panel_price_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_panel_price_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 首页 -->
|
||||
<a href="{{$Think.__MY_URL__}}" class=nav-min-home-submit>
|
||||
<span class="nav-icon nav-icon-home">
|
||||
<i class="am-icon-home am-icon-fw"></i>
|
||||
<em>首页</em>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<!-- 售价 -->
|
||||
<div class="items price iteminfo_mktprice">
|
||||
<dt>{{if empty($goods['show_field_price_text'])}}销售价{{else /}}{{$goods.show_field_price_text|raw}}{{/if}}</dt>
|
||||
<dd>
|
||||
<em>{{$currency_symbol}}</em>
|
||||
<b class="goods-price" data-original-price="{{$goods.price}}">{{$goods.price}}</b>
|
||||
</dd>
|
||||
</div>
|
||||
<!-- 收藏 -->
|
||||
{{if isset($goods['is_favor']) and $goods['is_favor'] eq 1}}
|
||||
<span class="nav-icon login-event favor-submit text-active" data-ajax-url="{{:MyUrl('index/goods/favor')}}">
|
||||
<i class="am-icon-heart am-icon-fw"></i>
|
||||
<em class="goods-favor-text">已收藏</em>
|
||||
<em class="goods-favor-count">({{$goods.favor_count}})</em>
|
||||
</span>
|
||||
{{else /}}
|
||||
<span class="nav-icon favor-submit login-event" data-ajax-url="{{:MyUrl('index/goods/favor')}}">
|
||||
<i class="am-icon-heart am-icon-fw"></i>
|
||||
<em class="goods-favor-text">收藏</em>
|
||||
<em class="goods-favor-count">({{$goods.favor_count}})</em>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<!-- 二维码 -->
|
||||
<div class="goods-qrcode am-hide-sm-only">
|
||||
<i class="am-icon-qrcode am-icon-sm"></i>
|
||||
<img class="qrcode-images am-img-thumbnail" src="{{$qrcode_url}}" />
|
||||
</div>
|
||||
|
||||
<!-- 商品页面基础信息面板底部钩子 -->
|
||||
{{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_goods_detail_panel_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_panel_bottom_data) and is_array($plugins_view_goods_detail_panel_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_panel_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!--销量/浏览/评论-->
|
||||
<ul class="tm-ind-panel">
|
||||
<li class="tm-ind-item">
|
||||
<div class="tm-indcon"><span class="tm-label">累计销量</span><span class="tm-count">{{$goods.sales_count}}</span></div>
|
||||
</li>
|
||||
<li class="tm-ind-item">
|
||||
<div class="tm-indcon"><span class="tm-label">浏览次数</span><span class="tm-count">{{$goods.access_count}}</span></div>
|
||||
</li>
|
||||
<li class="tm-ind-item ind-panel-comment">
|
||||
<div class="tm-indcon"><span class="tm-label">累计评论</span><span class="tm-count">{{$goods.comments_count}}</span></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{if !empty($goods['parameters']) and !empty($goods['parameters']['base'])}}
|
||||
<!-- 商品基础参数 -->
|
||||
<ul class="am-avg-sm-2 am-avg-md-2 am-avg-lg-3 am-padding-vertical-xs parameters-content parameters-base">
|
||||
{{foreach $goods.parameters.base as $v}}
|
||||
<li class="am-padding-vertical-xs am-padding-horizontal-sm am-text-truncate">
|
||||
<span>{{$v.name}}:</span>
|
||||
<span>{{$v.value}}</span>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
<!--各种规格-->
|
||||
{{if $goods['is_shelves'] == 1 and $goods['inventory'] gt 0}}
|
||||
<dl class="iteminfo_parameter sys_item_specpara">
|
||||
<dt class="buy-event mini-spec-event" data-type="buy">
|
||||
<div class="cart-title">
|
||||
<span class="specpara-title">可选规格</span>
|
||||
<span class="am-icon-angle-right"></span>
|
||||
</div>
|
||||
</dt>
|
||||
<dd>
|
||||
<!--操作页面-->
|
||||
<div class="theme-popover-mask"></div>
|
||||
<div class="theme-popover">
|
||||
<div class="theme-span"></div>
|
||||
<div class="theme-poptit">
|
||||
<a href="javascript:;" title="关闭" class="close am-icon-close am-icon-sm"></a>
|
||||
</div>
|
||||
<div class="theme-popbod dform">
|
||||
<form class="theme-signin am-padding-sm" action="javascript:;">
|
||||
<div class="theme-signin-left">
|
||||
<!-- 商品页面规格顶部钩子 -->
|
||||
{{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_goods_detail_base_sku_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_sku_top_data) and is_array($plugins_view_goods_detail_base_sku_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_sku_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if !empty($goods['specifications']['choose'])}}
|
||||
{{foreach $goods.specifications.choose as $key=>$spec}}
|
||||
{{if !empty($spec['value'])}}
|
||||
<div class="theme-options sku-items">
|
||||
<div class="cart-title">{{$spec.name}}</div>
|
||||
<ul>
|
||||
{{foreach $spec.value as $keys=>$specs}}
|
||||
<li class="sku-line {{if !empty($specs['images'])}} sku-line-images{{/if}} {{if $key gt 0}} sku-dont-choose{{/if}} {{if isset($specs['is_only_level_one']) and isset($specs['inventory']) and $specs['inventory'] elt 0}} sku-items-disabled{{/if}}" data-type-value="{{$spec.name}}" data-value="{{$specs.name}}" {{if !empty($specs['images'])}} data-type-images="{{$specs.images}}"{{/if}}>
|
||||
{{if !empty($specs['images'])}}
|
||||
<img src="{{$specs.images}}" />
|
||||
{{/if}}
|
||||
{{$specs.name}}<i></i>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面库存数量顶部钩子 -->
|
||||
{{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_goods_detail_base_inventory_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_inventory_top_data) and is_array($plugins_view_goods_detail_base_inventory_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_inventory_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 库存数量 -->
|
||||
<div class="theme-options">
|
||||
<div class="cart-title number">数量</div>
|
||||
<dd>
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<button class="am-input-group-label" id="min" type="button">-</button>
|
||||
<input type="number" class="am-form-field" value="{{$goods.buy_min_number}}" id="text_box" min="{{$goods.buy_min_number}}" max="{{if empty($goods['buy_max_number'])}}{{$goods.inventory}}{{else /}}{{$goods.buy_max_number}}{{/if}}" data-original-max="{{$goods.inventory}}" />
|
||||
<button class="am-input-group-label" id="add" type="button">+</button>
|
||||
</div>
|
||||
<span class="tb-hidden stock-tips"><span>库存</span><span class="stock" data-original-stock="{{$goods.inventory}}" data-min-limit="{{$goods.buy_min_number}}" data-max-limit="{{$goods.buy_max_number}}" data-unit="{{$goods.inventory_unit}}">{{$goods.inventory}}</span><span>{{$goods.inventory_unit}}</span></span>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<!-- 商品页面库存数量底部钩子 -->
|
||||
{{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_goods_detail_base_inventory_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_inventory_bottom_data) and is_array($plugins_view_goods_detail_base_inventory_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_inventory_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<div class="btn-op">
|
||||
<span class="btn am-btn am-btn-default confirm login-event" data-type="cart">确认</span>
|
||||
<span class="btn close am-btn am-btn-danger cancel">取消</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="theme-signin-right">
|
||||
<div class="img-info">
|
||||
<img src="{{$goods.images}}" />
|
||||
</div>
|
||||
<div class="text-info">
|
||||
<span class="price-now" data-original-price="{{$goods.price}}">{{$currency_symbol}}{{$goods.price}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- 商品页面购买导航顶部钩子 -->
|
||||
{{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_goods_detail_buy_nav_top</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_buy_nav_top_data) and is_array($plugins_view_goods_detail_buy_nav_top_data)}}
|
||||
{{foreach $plugins_view_goods_detail_buy_nav_top_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 购买导航 -->
|
||||
<div class="buy-nav {{if $common_site_type eq 1}}exhibition-nav{{else /}}{{if isset($is_goods_site_type_consistent) and $is_goods_site_type_consistent neq 1}}site-type-not-consistent-nav{{/if}}{{/if}}">
|
||||
{{if !empty($goods.is_shelves)}}
|
||||
{{if $goods['inventory'] gt 0}}
|
||||
<div class="buy-nav-opt">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<span class="nav-icon nav-icon-home">
|
||||
<i class="am-icon-home am-icon-fw"></i>
|
||||
<em>首页</em>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
{{if isset($goods['is_favor']) and $goods['is_favor'] eq 1}}
|
||||
<span class="nav-icon login-event favor-submit text-active" data-ajax-url="{{:MyUrl('index/goods/favor')}}">
|
||||
<i class="am-icon-heart am-icon-fw"></i>
|
||||
<em class="goods-favor-text">已收藏</em>
|
||||
<em class="goods-favor-count">({{$goods.favor_count}})</em>
|
||||
</span>
|
||||
{{else /}}
|
||||
<span class="nav-icon favor-submit login-event" data-ajax-url="{{:MyUrl('index/goods/favor')}}">
|
||||
<i class="am-icon-heart am-icon-fw"></i>
|
||||
<em class="goods-favor-text">收藏</em>
|
||||
<em class="goods-favor-count">({{$goods.favor_count}})</em>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<!-- 商品页面基础信息购买小导航里面钩子 -->
|
||||
{{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_goods_detail_base_buy_nav_min_inside</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_buy_nav_min_inside_data) and is_array($plugins_view_goods_detail_base_buy_nav_min_inside_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_buy_nav_min_inside_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{if $common_site_type eq 1}}
|
||||
<!-- 站点模式 1 展示型 -->
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-basket" data-type="cart">
|
||||
<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>
|
||||
<!-- 商品页面基础信息购买小导航内部后面钩子 开始 -->
|
||||
{{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_goods_detail_base_buy_nav_min_inside</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_buy_nav_min_inside_data) and is_array($plugins_view_goods_detail_base_buy_nav_min_inside_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_buy_nav_min_inside_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页面基础信息购买小导航内部后面钩子 结束 -->
|
||||
</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">{{if $common_order_is_booking eq 1}}立即预约{{else /}}立即购买{{/if}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if isset($is_goods_site_type_consistent) and $is_goods_site_type_consistent eq 1}}
|
||||
<!-- 商品类型是否与系统类型一致 -->
|
||||
{{if $common_site_type eq 1}}
|
||||
<!-- 站点模式 1 展示型 -->
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-basket buy-event login-event cart-submit" data-type="cart">
|
||||
<button title="加入购物车" href="javascript:;" type="button"><i></i>加入购物车</button>
|
||||
<div class="clearfix tb-btn tb-btn-basket" data-type="cart">
|
||||
<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">{{if $common_order_is_booking eq 1}}立即预约{{else /}}立即购买{{/if}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if isset($is_goods_site_type_consistent) and $is_goods_site_type_consistent eq 1}}
|
||||
<!-- 商品类型是否与系统类型一致 -->
|
||||
<div class="submit">
|
||||
<div class="clearfix tb-btn tb-btn-basket buy-event login-event cart-submit" data-type="cart">
|
||||
<button title="加入购物车" href="javascript:;" type="button"><i></i>加入购物车</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 购买表单 -->
|
||||
<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>
|
||||
|
||||
<!-- 加入购物车表单 -->
|
||||
<form action="{{:MyUrl('index/cart/save')}}" method="post" class="cart-form" request-type="ajax-fun" request-value="CartSubmitBack">
|
||||
<input type="hidden" name="goods_id" value="{{$goods.id}}" />
|
||||
<input type="hidden" name="stock" value="1" />
|
||||
<input type="hidden" name="spec" value="" />
|
||||
<button type="submit" class="am-hide"></button>
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
<!-- 购买表单 -->
|
||||
<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>
|
||||
|
||||
<!-- 加入购物车表单 -->
|
||||
<form action="{{:MyUrl('index/cart/save')}}" method="post" class="cart-form" request-type="ajax-fun" request-value="CartSubmitBack">
|
||||
<input type="hidden" name="goods_id" value="{{$goods.id}}" />
|
||||
<input type="hidden" name="stock" value="1" />
|
||||
<input type="hidden" name="spec" value="" />
|
||||
<button type="submit" class="am-hide"></button>
|
||||
</form>
|
||||
{{else /}}
|
||||
<p class="goods-not-buy-tips">没货了</p>
|
||||
{{/if}}
|
||||
{{else /}}
|
||||
<p class="goods-not-buy-tips">没货了</p>
|
||||
{{/if}}
|
||||
{{if $goods.is_shelves neq 1}}
|
||||
<p class="goods-not-buy-tips">商品已下架</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- 商品页右侧内容内部顶部钩子 开始 -->
|
||||
{{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_goods_detail_right_content_inside_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $goods.is_shelves neq 1}}
|
||||
<p class="goods-not-buy-tips">商品已下架</p>
|
||||
{{if !empty($plugins_view_goods_detail_right_content_inside_bottom_data) and is_array($plugins_view_goods_detail_right_content_inside_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_right_content_inside_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页右侧内容内部顶部钩子 结束 -->
|
||||
</div>
|
||||
|
||||
<!-- 商品页面基础信息底部钩子 -->
|
||||
<!-- 商品页右侧内容底部钩子 开始 -->
|
||||
{{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_goods_detail_base_bottom</span>
|
||||
<span>plugins_view_goods_detail_right_content_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_bottom_data) and is_array($plugins_view_goods_detail_base_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_bottom_data as $hook}}
|
||||
{{if !empty($plugins_view_goods_detail_right_content_bottom_data) and is_array($plugins_view_goods_detail_right_content_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_right_content_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页右侧内容底部钩子 结束 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 商品页基础信息底部钩子 开始 -->
|
||||
{{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_goods_detail_base_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if !empty($plugins_view_goods_detail_base_bottom_data) and is_array($plugins_view_goods_detail_base_bottom_data)}}
|
||||
{{foreach $plugins_view_goods_detail_base_bottom_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<!-- 商品页基础信息底部钩子 结束 -->
|
||||
|
||||
<!-- 左侧-->
|
||||
<div class="introduce am-container">
|
||||
<div class="browse">
|
||||
|
@ -140,7 +140,18 @@
|
||||
{{if !empty($data['warehouse_name'])}}
|
||||
<div class="items am-cf">
|
||||
<div class="items-title am-fl">出货服务:</div>
|
||||
<div class="items-detail am-fl">{{$data.warehouse_name}}</div>
|
||||
<div class="items-detail am-fl">
|
||||
<span class="warehouse-item-container">
|
||||
{{if !empty($data['warehouse_icon'])}}<i class="{{$data.warehouse_icon}}"></i>{{/if}}
|
||||
{{if empty($data['warehouse_url'])}}
|
||||
<strong class="warehouse-name">{{$data.warehouse_name}}</strong>
|
||||
{{else /}}
|
||||
<a href="{{$data.warehouse_url}}" target="_blank" class="text-deco-none">
|
||||
<strong class="warehouse-name">{{$data.warehouse_name}}</strong>
|
||||
</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="items am-cf">
|
||||
|
@ -24,10 +24,44 @@
|
||||
|
||||
<!-- 基础信息 -->
|
||||
<p class="am-margin-bottom-sm">
|
||||
<!-- 订单号 -->
|
||||
<strong class="am-icon-bookmark-o"> {{$module_data.order_no}}</strong>
|
||||
|
||||
<!-- 仓库信息 -->
|
||||
{{if !empty($module_data['warehouse_name'])}}
|
||||
<span class="am-fr"> {{$module_data.warehouse_name}}</span>
|
||||
<span class="warehouse-item-container am-fr">
|
||||
{{if !empty($module_data['warehouse_icon'])}}<i class="{{$module_data.warehouse_icon}}"></i>{{/if}}
|
||||
{{if empty($module_data['warehouse_url'])}}
|
||||
<strong class="warehouse-name">{{$module_data.warehouse_name}}</strong>
|
||||
{{else /}}
|
||||
<a href="{{$module_data.warehouse_url}}" target="_blank" class="text-deco-none">
|
||||
<strong class="warehouse-name">{{$module_data.warehouse_name}}</strong>
|
||||
</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<!-- 订单列表基础导航底部-开始 -->
|
||||
{{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_user_order_list_base_nav_bottom</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_user_order_list_base_nav_bottom';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'data'=>$module_data]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
<!-- 订单列表基础导航底部-结束 -->
|
||||
</p>
|
||||
|
||||
<!-- 用户订单列表基础商品顶部-开始 -->
|
||||
|
@ -69,6 +69,18 @@
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 非首页则展示首页入口 -->
|
||||
{{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="menu-hd ">
|
||||
<a href="{{$Think.__MY_URL__}}" target="_top">
|
||||
<i class="am-icon-fw am-icon-home"></i>
|
||||
<span>商城首页</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- 右侧导航 -->
|
||||
{{if !empty($common_nav_top_right_list) and is_array($common_nav_top_right_list)}}
|
||||
{{foreach $common_nav_top_right_list as $nav}}
|
||||
|
@ -50,7 +50,7 @@
|
||||
<strong class="map-result-count am-text-danger">...</strong>
|
||||
<span>条数据</span>
|
||||
</p>
|
||||
<button class="am-btn am-btn-primary am-icon-th-large map-offcanvas-submit" data-am-offcanvas="{target: '#search-map'}"></button>
|
||||
<button class="am-btn am-btn-primary am-icon-filter map-offcanvas-submit" data-am-offcanvas="{target: '#search-map'}"></button>
|
||||
</div>
|
||||
|
||||
<!-- 搜索条件顶部钩子 -->
|
||||
|
@ -425,5 +425,8 @@ return array(
|
||||
|
||||
// 图片比例值
|
||||
'common_regex_image_proportion' => '^([1-9]{1}[0-9]?|[1-9]{1}[0-9]?\.{1}[0-9]{1,2}|100|0)?$',
|
||||
|
||||
// 版本号
|
||||
'common_regex_version' => '^[0-9]{1,6}\.[0-9]{1,6}\.[0-9]{1,6}$',
|
||||
);
|
||||
?>
|
@ -10,6 +10,8 @@
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\service;
|
||||
|
||||
use app\service\ResourcesService;
|
||||
|
||||
/**
|
||||
* 小程序服务层
|
||||
* @author Devil
|
||||
@ -171,7 +173,7 @@ class AppMiniService
|
||||
}
|
||||
|
||||
// 文件格式化校验
|
||||
$type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
|
||||
$type = ResourcesService::ZipExtTypeList();
|
||||
if(!in_array($_FILES['theme']['type'], $type))
|
||||
{
|
||||
return DataReturn('文件格式有误,请上传zip压缩包', -2);
|
||||
|
@ -1433,7 +1433,7 @@ class GoodsService
|
||||
return DataReturn('规格名称列之间不能重复['.implode(',', array_unique($repeat_names_all)).']', -1);
|
||||
}
|
||||
} else {
|
||||
if(empty($data[0][0]) || $data[0][0] <= 0)
|
||||
if(!isset($data[0][0]) || $data[0][0] < 0)
|
||||
{
|
||||
return DataReturn('请填写有效的规格销售价格', -1);
|
||||
}
|
||||
|
@ -923,8 +923,9 @@ class OrderAftersaleService
|
||||
}
|
||||
|
||||
// 是否仅退款操作需要退数量操作
|
||||
// 如果是仅退、订单状态为待发货或虚拟订单则退回数量
|
||||
$is_refund_only_number = false;
|
||||
if($aftersale['type'] == 0 && $order['data']['status'] <= 2)
|
||||
if($aftersale['type'] == 0 && ($order['data']['status'] <= 2 || $order['data']['order_model'] == 3))
|
||||
{
|
||||
$is_refund_only_number = true;
|
||||
$aftersale['number'] = $order['data']['items']['buy_number'];
|
||||
@ -1090,6 +1091,7 @@ class OrderAftersaleService
|
||||
'refund_price' => $aftersale['price'],
|
||||
'client_type' => $order['client_type'],
|
||||
'refund_reason' => $order['order_no'].'订单退款'.$aftersale['price'].'元',
|
||||
'pay_time' => $pay_log['pay_time'],
|
||||
];
|
||||
$ret = (new $pay_name($payment[0]['config']))->Refund($pay_params);
|
||||
if(!isset($ret['code']))
|
||||
|
@ -23,6 +23,7 @@ use app\service\UserService;
|
||||
use app\service\GoodsService;
|
||||
use app\service\OrderAftersaleService;
|
||||
use app\service\OrderCurrencyService;
|
||||
use app\service\WarehouseService;
|
||||
|
||||
/**
|
||||
* 订单服务层
|
||||
@ -1043,9 +1044,12 @@ class OrderService
|
||||
// 仓库信息
|
||||
if(in_array('warehouse_id', $keys))
|
||||
{
|
||||
// 地区数据
|
||||
$we_ids = array_unique(array_column($data, 'warehouse_id'));
|
||||
$warehouse_list = Db::name('Warehouse')->where(['id'=>$we_ids])->column('name', 'id');
|
||||
$warehouse_list = WarehouseService::DataHandle(Db::name('Warehouse')->where(['id'=>$we_ids])->field('id,name')->select());
|
||||
if(!empty($warehouse_list))
|
||||
{
|
||||
$warehouse_list = array_column($warehouse_list, null, 'id');
|
||||
}
|
||||
}
|
||||
|
||||
// 默认货币
|
||||
@ -1095,7 +1099,16 @@ class OrderService
|
||||
// 订单所属仓库
|
||||
if(isset($v['warehouse_id']))
|
||||
{
|
||||
$v['warehouse_name'] = (!empty($warehouse_list) && is_array($warehouse_list) && array_key_exists($v['warehouse_id'], $warehouse_list)) ? $warehouse_list[$v['warehouse_id']] : '';
|
||||
if(!empty($warehouse_list) && is_array($warehouse_list) && array_key_exists($v['warehouse_id'], $warehouse_list))
|
||||
{
|
||||
$v['warehouse_name'] = $warehouse_list[$v['warehouse_id']]['name'];
|
||||
$v['warehouse_icon'] = $warehouse_list[$v['warehouse_id']]['icon'];
|
||||
$v['warehouse_url'] = $warehouse_list[$v['warehouse_id']]['url'];
|
||||
} else {
|
||||
$v['warehouse_name'] = '';
|
||||
$v['warehouse_icon'] = '';
|
||||
$v['warehouse_url'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
// 订单模式处理
|
||||
|
@ -472,7 +472,7 @@ class PaymentService
|
||||
}
|
||||
|
||||
// 文件格式化校验
|
||||
$type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
|
||||
$type = ResourcesService::ZipExtTypeList();
|
||||
if(!in_array($_FILES['file']['type'], $type))
|
||||
{
|
||||
return DataReturn('文件格式有误,请上传zip压缩包', -2);
|
||||
|
@ -1013,7 +1013,7 @@ php;
|
||||
}
|
||||
|
||||
// 文件格式化校验
|
||||
$type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
|
||||
$type = ResourcesService::ZipExtTypeList();
|
||||
if(!in_array($_FILES['file']['type'], $type))
|
||||
{
|
||||
return DataReturn('文件格式有误,请上传zip压缩包', -2);
|
||||
|
@ -654,5 +654,23 @@ class ResourcesService
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* zip压缩包扩展可用格式
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-02
|
||||
* @desc description
|
||||
* @param array $params [description]
|
||||
*/
|
||||
public static function ZipExtTypeList($params = [])
|
||||
{
|
||||
return [
|
||||
'application/zip',
|
||||
'application/octet-stream',
|
||||
'application/x-zip-compressed',
|
||||
];
|
||||
}
|
||||
}
|
||||
?>
|
@ -335,40 +335,45 @@ class SearchService
|
||||
*/
|
||||
public static function CategoryBrandList($params = [])
|
||||
{
|
||||
// 基础条件
|
||||
$brand_where = [
|
||||
['is_enable', '=', 1],
|
||||
];
|
||||
|
||||
// 搜索条件
|
||||
$where = self::SearchWhereHandle($params);
|
||||
$base_where = $where['base'];
|
||||
$where_keywords = $where['keywords'];
|
||||
$where_screening_price = $where['screening_price'];
|
||||
|
||||
// 一维数组、参数值去重
|
||||
if(!empty($base_where) || !empty($where_keywords) || !empty($where_screening_price))
|
||||
$data = [];
|
||||
if(MyC('home_search_is_brand', 0) == 1)
|
||||
{
|
||||
$ids = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->where($base_where)->where(function($query) use($where_keywords) {
|
||||
$query->whereOr($where_keywords);
|
||||
})->where(function($query) use($where_screening_price) {
|
||||
$query->whereOr($where_screening_price);
|
||||
})->group('g.brand_id')->column('g.brand_id');
|
||||
if(!empty($ids))
|
||||
{
|
||||
$brand_where[] = ['id', 'in', array_unique($ids)];
|
||||
}
|
||||
}
|
||||
// 基础条件
|
||||
$brand_where = [
|
||||
['is_enable', '=', 1],
|
||||
];
|
||||
|
||||
// 获取品牌列表
|
||||
$data_params = [
|
||||
'field' => 'id,name,logo,website_url',
|
||||
'where' => $brand_where,
|
||||
'm' => 0,
|
||||
'n' => 0,
|
||||
];
|
||||
$ret = BrandService::BrandList($data_params);
|
||||
return $ret['data'];
|
||||
// 搜索条件
|
||||
$where = self::SearchWhereHandle($params);
|
||||
$base_where = $where['base'];
|
||||
$where_keywords = $where['keywords'];
|
||||
$where_screening_price = $where['screening_price'];
|
||||
|
||||
// 一维数组、参数值去重
|
||||
if(!empty($base_where) || !empty($where_keywords) || !empty($where_screening_price))
|
||||
{
|
||||
$ids = Db::name('Goods')->alias('g')->join(['__GOODS_CATEGORY_JOIN__'=>'gci'], 'g.id=gci.goods_id')->where($base_where)->where(function($query) use($where_keywords) {
|
||||
$query->whereOr($where_keywords);
|
||||
})->where(function($query) use($where_screening_price) {
|
||||
$query->whereOr($where_screening_price);
|
||||
})->group('g.brand_id')->column('g.brand_id');
|
||||
if(!empty($ids))
|
||||
{
|
||||
$brand_where[] = ['id', 'in', array_unique($ids)];
|
||||
}
|
||||
}
|
||||
|
||||
// 获取品牌列表
|
||||
$data_params = [
|
||||
'field' => 'id,name,logo,website_url',
|
||||
'where' => $brand_where,
|
||||
'm' => 0,
|
||||
'n' => 0,
|
||||
];
|
||||
$ret = BrandService::BrandList($data_params);
|
||||
$data = empty($ret['data']) ? [] : $ret['data'];
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -382,8 +387,13 @@ class SearchService
|
||||
*/
|
||||
public static function GoodsCategoryList($params = [])
|
||||
{
|
||||
$pid = empty($params['category_id']) ? 0 : intval($params['category_id']);
|
||||
return GoodsService::GoodsCategoryList(['where'=>['pid'=>$pid], 'field'=>'id,name']);
|
||||
$data = [];
|
||||
if(MyC('home_search_is_category', 0) == 1)
|
||||
{
|
||||
$pid = empty($params['category_id']) ? 0 : intval($params['category_id']);
|
||||
$data = GoodsService::GoodsCategoryList(['where'=>['pid'=>$pid], 'field'=>'id,name']);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,41 +21,58 @@ class StoreService
|
||||
{
|
||||
/**
|
||||
* 应用商店地址
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-06-16T00:33:28+0800
|
||||
* @param [array] $params [输入参数]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-12
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function StoreUrl($params = [])
|
||||
{
|
||||
return config('shopxo.store_url').'?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__);
|
||||
return config('shopxo.store_url').self::RequestParamsString($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用商店支付插件地址
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-06-16T00:33:28+0800
|
||||
* @param [array] $params [输入参数]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-12
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function StorePaymentUrl($params = [])
|
||||
{
|
||||
return config('shopxo.store_payment_url').'?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__);
|
||||
return config('shopxo.store_payment_url').self::RequestParamsString($params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 应用商店主题地址
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-06-16T00:33:28+0800
|
||||
* @param [array] $params [输入参数]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-12
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function StoreThemeUrl($params = [])
|
||||
{
|
||||
return config('shopxo.store_theme_url').'?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__);
|
||||
return config('shopxo.store_theme_url').self::RequestParamsString($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-12
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function RequestParamsString($params = [])
|
||||
{
|
||||
return '?ver='.APPLICATION_VERSION.'&url='.urlencode(__MY_URL__).'&host='.urlencode(__MY_HOST__).'&ip='.urlencode(__MY_ADDR__);
|
||||
}
|
||||
}
|
||||
?>
|
@ -11,6 +11,7 @@
|
||||
namespace app\service;
|
||||
|
||||
use think\Db;
|
||||
use app\service\ResourcesService;
|
||||
|
||||
/**
|
||||
* 主题服务层
|
||||
@ -116,7 +117,7 @@ class ThemeService
|
||||
}
|
||||
|
||||
// 文件格式化校验
|
||||
$type = array('application/zip', 'application/octet-stream', 'application/x-zip-compressed');
|
||||
$type = ResourcesService::ZipExtTypeList();
|
||||
if(!in_array($_FILES['theme']['type'], $type))
|
||||
{
|
||||
return DataReturn('文件格式有误,请上传zip压缩包', -2);
|
||||
|
@ -11,6 +11,7 @@
|
||||
namespace app\service;
|
||||
|
||||
use think\Db;
|
||||
use think\facade\Hook;
|
||||
use app\service\RegionService;
|
||||
use app\service\WarehouseGoodsService;
|
||||
|
||||
@ -39,7 +40,7 @@ class WarehouseService
|
||||
$field = empty($params['field']) ? '*' : $params['field'];
|
||||
$order_by = empty($params['order_by']) ? 'level desc, id desc' : trim($params['order_by']);
|
||||
$data = Db::name('Warehouse')->field($field)->where($where)->order($order_by)->select();
|
||||
return DataReturn('处理成功', 0, self::DataHandle($data));
|
||||
return DataReturn('处理成功', 0, self::DataHandle($data, $params));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -49,15 +50,19 @@ class WarehouseService
|
||||
* @version 1.0.0
|
||||
* @date 2020-07-18
|
||||
* @desc description
|
||||
* @param [array] $data [仓库数据]
|
||||
* @param [array] $data [仓库数据]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function DataHandle($data)
|
||||
public static function DataHandle($data, $params = [])
|
||||
{
|
||||
if(!empty($data))
|
||||
{
|
||||
// 字段列表
|
||||
$keys = ArrayKeys($data);
|
||||
|
||||
// 基础数据
|
||||
$data_key_field = empty($params['data_key_field']) ? 'id' : $params['data_key_field'];
|
||||
|
||||
// 获取商品信息
|
||||
if(in_array('province', $keys) && in_array('city', $keys) && in_array('county', $keys))
|
||||
{
|
||||
@ -69,6 +74,25 @@ class WarehouseService
|
||||
// 循环处理数据
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 数据主键id
|
||||
$data_id = isset($v[$data_key_field]) ? $v[$data_key_field] : 0;
|
||||
|
||||
// 仓库处理前钩子
|
||||
$hook_name = 'plugins_service_warehouse_handle_inside_begin';
|
||||
Hook::listen($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'params' => &$params,
|
||||
'warehouse' => &$v,
|
||||
'warehouse_id' => $data_id,
|
||||
]);
|
||||
|
||||
// icon
|
||||
$v['icon'] = 'am-icon-cube';
|
||||
|
||||
// url地址
|
||||
$v['url'] = '';
|
||||
|
||||
// 地区
|
||||
if(isset($v['province']))
|
||||
{
|
||||
@ -92,7 +116,26 @@ class WarehouseService
|
||||
{
|
||||
$v['upd_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']);
|
||||
}
|
||||
|
||||
// 仓库处理后钩子
|
||||
$hook_name = 'plugins_service_warehouse_handle_inside_end';
|
||||
Hook::listen($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'params' => &$params,
|
||||
'warehouse' => &$v,
|
||||
'warehouse_id' => $data_id,
|
||||
]);
|
||||
}
|
||||
|
||||
// 仓库处理列表钩子
|
||||
$hook_name = 'plugins_service_warehouse_handle_end';
|
||||
Hook::listen($hook_name, [
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'params' => &$params,
|
||||
'data' => &$data,
|
||||
]);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
@ -32,6 +32,18 @@ return array (
|
||||
'log_write' =>
|
||||
array (
|
||||
),
|
||||
'plugins_admin_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_css' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_js' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_navigation_header_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
@ -39,10 +51,12 @@ return array (
|
||||
'plugins_service_users_center_left_menu_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
1 => 'app\\plugins\\wallet\\Hook',
|
||||
),
|
||||
'plugins_service_header_navigation_top_right_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
1 => 'app\\plugins\\wallet\\Hook',
|
||||
),
|
||||
'plugins_service_warehouse_goods_inventory_deduct' =>
|
||||
array (
|
||||
@ -72,5 +86,57 @@ return array (
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_right_content_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_base_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_goods_detail_base_buy_nav_min_inside_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_warehouse_handle_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_buy_order_insert_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_buy_order_insert_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_system_begin' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_buy_form_inside' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_buy_base_confirm_top' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_view_admin_order_list_operate' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_order_status_change_history_success_handle' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_order_aftersale_audit_handle_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\store\\Hook',
|
||||
),
|
||||
'plugins_service_user_register_end' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\wallet\\Hook',
|
||||
),
|
||||
);
|
||||
?>
|
@ -34,7 +34,7 @@ class FileUpload
|
||||
*/
|
||||
public function __construct($params = [])
|
||||
{
|
||||
$this->config['root_path'] = isset($params['root_path']) ? $params['root_path'] : ROOT.'public';
|
||||
$this->config['dir'] = isset($params['dir']) ? $params['dir'] : ROOT.'public';
|
||||
$this->config['path'] = isset($params['path']) ? $params['path'] : DS.'static'.DS.'upload'.DS.'file'.DS.date('Y').DS.date('m').DS.date('d').DS;
|
||||
}
|
||||
|
||||
@ -55,11 +55,11 @@ class FileUpload
|
||||
$error = FileUploadError($name, $index);
|
||||
if($error !== true)
|
||||
{
|
||||
return ['status'=>false, 'msg'=>$error];
|
||||
return DataReturn($error, -1);
|
||||
}
|
||||
|
||||
// 存储目录校验
|
||||
$dir = str_replace(['//', '\\\\'], ['/', '\\'], $this->config['root_path'].$this->config['path']);
|
||||
$dir = str_replace(['//', '\\\\'], ['/', '\\'], $this->config['dir'].$this->config['path']);
|
||||
$this->IsMkdir($dir);
|
||||
|
||||
// 临时文件数据
|
||||
@ -85,18 +85,19 @@ class FileUpload
|
||||
if(move_uploaded_file($temp_file, $dir.$filename))
|
||||
{
|
||||
$data = [
|
||||
'name' => $original_name,
|
||||
'url' => $this->config['path'].$filename,
|
||||
'file_path' => $this->config['path'],
|
||||
'file_name' => $filename,
|
||||
'file_ext' => $ext,
|
||||
'file_size' => $size,
|
||||
'file_type' => $type,
|
||||
'file_hash' => hash_file('sha256', $dir.$filename, false),
|
||||
'title' => $original_name,
|
||||
'url' => $this->config['path'].$filename,
|
||||
'path' => $this->config['path'],
|
||||
'name' => $filename,
|
||||
'ext' => $ext,
|
||||
'size' => $size,
|
||||
'type' => $type,
|
||||
'hash' => hash_file('sha256', $dir.$filename, false),
|
||||
'md5' => md5_file($dir.$filename),
|
||||
];
|
||||
return ['status'=>true, 'msg'=>'上传成功', 'data'=>$data];
|
||||
return DataReturn('上传成功', 0, $data);
|
||||
}
|
||||
return ['status'=>false, 'msg'=>'文件存储失败'];
|
||||
return DataReturn('文件存储失败', -1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -127,7 +128,7 @@ class FileUpload
|
||||
*/
|
||||
private function RandNewFilename()
|
||||
{
|
||||
return date('YmdHis').rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9);
|
||||
return date('YmdHis').GetNumberCode();
|
||||
}
|
||||
}
|
||||
?>
|
510
extend/payment/Bestpay.php
Normal file
510
extend/payment/Bestpay.php
Normal file
@ -0,0 +1,510 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace payment;
|
||||
|
||||
/**
|
||||
* 翼支付
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-07
|
||||
* @desc description
|
||||
*/
|
||||
class Bestpay
|
||||
{
|
||||
// 插件配置参数
|
||||
private $config;
|
||||
|
||||
// 证书路径
|
||||
private $p12_dir_file = ROOT.'rsakeys'.DS.'payment_bestpay'.DS.'bestpay.P12';
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-07
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数(支付配置参数)]
|
||||
*/
|
||||
public function __construct($params = [])
|
||||
{
|
||||
$this->config = $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置信息
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-19
|
||||
* @desc description
|
||||
*/
|
||||
public function Config()
|
||||
{
|
||||
// 基础信息
|
||||
$base = [
|
||||
'name' => '翼支付', // 插件名称
|
||||
'version' => '1.0.0', // 插件版本
|
||||
'apply_version' => '不限', // 适用系统版本描述
|
||||
'apply_terminal'=> ['pc', 'h5'], // 适用终端 默认全部 ['pc', 'h5', 'ios', 'android', 'alipay', 'weixin', 'baidu', 'toutiao']
|
||||
'desc' => '适用翼支付APP中子应用模式发起支付,即时到帐支付方式,买家的交易资金直接打入卖家账户,快速回笼交易资金。 <a href="https://www.bestpay.com.cn/" target="_blank">立即申请</a>', // 插件描述(支持html)
|
||||
'author' => 'Devil', // 开发者
|
||||
'author_url' => 'http://shopxo.net/', // 开发者主页
|
||||
];
|
||||
|
||||
// 配置信息
|
||||
$element = [
|
||||
[
|
||||
'element' => 'input',
|
||||
'type' => 'text',
|
||||
'default' => '',
|
||||
'name' => 'mch_id',
|
||||
'placeholder' => '支付商户号',
|
||||
'title' => '支付商户号',
|
||||
'is_required' => 0,
|
||||
'message' => '请填写支付分配的商户号',
|
||||
],
|
||||
[
|
||||
'element' => 'input',
|
||||
'type' => 'text',
|
||||
'default' => '',
|
||||
'name' => 'password',
|
||||
'placeholder' => '证书密码',
|
||||
'title' => '证书密码',
|
||||
'is_required' => 0,
|
||||
'message' => '请填写证书密码',
|
||||
],
|
||||
[
|
||||
'element' => 'message',
|
||||
'message' => '将p12证书按照[bestpay.P12]命名放入目录中['.$this->p12_dir_file.']、如目录不存在自行创建即可',
|
||||
],
|
||||
];
|
||||
|
||||
return [
|
||||
'base' => $base,
|
||||
'element' => $element,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付入口
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-19
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function Pay($params = [])
|
||||
{
|
||||
// 参数
|
||||
if(empty($params))
|
||||
{
|
||||
return DataReturn('参数不能为空', -1);
|
||||
}
|
||||
|
||||
// 配置信息
|
||||
if(empty($this->config) || empty($this->config['mch_id']) || empty($this->config['password']))
|
||||
{
|
||||
return DataReturn('支付缺少配置', -1);
|
||||
}
|
||||
if(!file_exists($this->p12_dir_file))
|
||||
{
|
||||
return DataReturn('p12证书不存在', -1);
|
||||
}
|
||||
|
||||
// 支付参数
|
||||
$parameter = [
|
||||
'merchantNo' => $this->config['mch_id'],
|
||||
'outTradeNo' => $params['order_no'],
|
||||
'tradeAmt' => (string) (($params['total_price']*1000)/10),
|
||||
'ccy' => '156',
|
||||
'requestDate' => date('Y-m-d H:i:s'),
|
||||
'tradeChannel' => 'APP',
|
||||
'accessCode' => 'CASHIER',
|
||||
'mediumType' => 'WIRELESS',
|
||||
'subject' => $params['name'],
|
||||
'goodsInfo' => $params['name'],
|
||||
'operator' => $this->config['mch_id'],
|
||||
'notifyUrl' => $params['notify_url'],
|
||||
];
|
||||
// 风控参数
|
||||
$risk_control_info = [
|
||||
'service_identify' => $params['order_no'],
|
||||
'subject' => $params['name'],
|
||||
'product_type' => '1',
|
||||
'order_ip' => GetClientIP(),
|
||||
];
|
||||
$parameter['riskControlInfo'] = json_encode($risk_control_info, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
// 生成签名参数+签名
|
||||
$parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
|
||||
|
||||
// 下单
|
||||
$result = $this->HttpRequest('https://mapi.bestpay.com.cn/mapi/uniformReceipt/proCreateOrder', $parameter);
|
||||
if(!empty($result) && isset($result['success']) && $result['success'] == 1 && !empty($result['result']))
|
||||
{
|
||||
// 根据当前环境判断支付方式
|
||||
if(!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'Bestpay') !== false)
|
||||
{
|
||||
// APP中子应用发起支付
|
||||
$this->AppLaunchPay($parameter, $result['result'], $params);
|
||||
} else {
|
||||
return DataReturn('非APP环境中正在开发中...', -1);
|
||||
}
|
||||
}
|
||||
$msg = empty($result) ? '支付异常错误' : ((empty($result['errorMsg']) || !is_array($result)) ? $result : $result['errorMsg']);
|
||||
return DataReturn($msg, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起支付
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-07
|
||||
* @desc description
|
||||
* @param [array] $data [支付参数]
|
||||
* @param [array] $result [返回数据]
|
||||
* @param [array] $params [支付参数]
|
||||
*/
|
||||
public function AppLaunchPay($data, $result, $params)
|
||||
{
|
||||
// 支付参数
|
||||
$parameter = [
|
||||
'merchantNo' => $data['merchantNo'],
|
||||
'institutionCode' => $data['merchantNo'],
|
||||
'institutionType' => 'MERCHANT',
|
||||
'signType' => 'CA',
|
||||
'platform' => $this->ClientType(),
|
||||
'tradeType' => 'acquiring',
|
||||
'outTradeNo' => $data['outTradeNo'],
|
||||
'tradeNo' => $result['tradeNo'],
|
||||
'tradeAmt' => $data['tradeAmt'],
|
||||
'tradeDesc' => $data['subject'],
|
||||
];
|
||||
$parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
|
||||
|
||||
// 拼接html
|
||||
$html = '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>安全支付</title>
|
||||
<script src="https://h5.bestpay.com.cn/common/js/bestpay-html5-3.0.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
BestpayHtml5.config();
|
||||
BestpayHtml5.Payment.payForSimpleCheckout('.json_encode($parameter, JSON_UNESCAPED_UNICODE).', function(res)
|
||||
{
|
||||
window.location.replace("'.$params['redirect_url'].'");
|
||||
}, function (res) {
|
||||
window.location.replace("'.$params['redirect_url'].'");
|
||||
}, function (res) {
|
||||
window.location.replace("'.$params['redirect_url'].'");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>';
|
||||
die($html);
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户端
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-08
|
||||
* @desc description
|
||||
*/
|
||||
public function ClientType()
|
||||
{
|
||||
if(!empty($_SERVER['HTTP_USER_AGENT']))
|
||||
{
|
||||
// 安卓手机
|
||||
if(stripos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false)
|
||||
{
|
||||
return 'android_4.0';
|
||||
}
|
||||
|
||||
// ios手机/ipad
|
||||
if(stripos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false || stripos($_SERVER['HTTP_USER_AGENT'], 'ipad'))
|
||||
{
|
||||
return 'ios_4.0';
|
||||
}
|
||||
}
|
||||
return 'other';
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付回调处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-19
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function Respond($params = [])
|
||||
{
|
||||
if(!empty($params['outTradeNo']))
|
||||
{
|
||||
// 查询订单
|
||||
$parameter = [
|
||||
'outTradeNo' => $params['outTradeNo'],
|
||||
'merchantNo' => $this->config['mch_id'],
|
||||
'tradeDate' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
|
||||
// 生成签名参数+签名
|
||||
$parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
|
||||
|
||||
// 查询订单
|
||||
$result = $this->HttpRequest('https://mapi.bestpay.com.cn/mapi/uniformReceipt/tradeQuery', $parameter);
|
||||
if(!empty($result) && isset($result['success']) && $result['success'] == 1 && !empty($result['result']) && isset($result['result']['tradeStatus']) && $result['result']['tradeStatus'] == 'SUCCESS')
|
||||
{
|
||||
return DataReturn('支付成功', 0, $this->ReturnData($result['result']));
|
||||
}
|
||||
}
|
||||
return DataReturn('处理异常错误', -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回数据统一格式
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-08
|
||||
* @desc description
|
||||
* @param [array] $data [支付数据]
|
||||
*/
|
||||
private function ReturnData($data)
|
||||
{
|
||||
// 返回数据固定基础参数
|
||||
$data['trade_no'] = $data['tradeNo']; // 支付平台 - 订单号
|
||||
$data['buyer_user'] = $data['buyerLoginNo']; // 支付平台 - 用户
|
||||
$data['out_trade_no'] = $data['outTradeNo']; // 本系统发起支付的 - 订单号
|
||||
$data['subject'] = $data['subject']; // 本系统发起支付的 - 商品名称
|
||||
$data['pay_price'] = $data['tradeAmt']/100; // 本系统发起支付的 - 总价
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-05-28
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function Refund($params = [])
|
||||
{
|
||||
// 参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'order_no',
|
||||
'error_msg' => '订单号不能为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'trade_no',
|
||||
'error_msg' => '交易平台订单号不能为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'pay_price',
|
||||
'error_msg' => '支付金额不能为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'refund_price',
|
||||
'error_msg' => '退款金额不能为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'pay_time',
|
||||
'error_msg' => '支付时间不能为空',
|
||||
],
|
||||
];
|
||||
$ret = ParamsChecked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 退款原因
|
||||
$refund_reason = empty($params['refund_reason']) ? $params['order_no'].'订单退款'.$params['refund_price'].'元' : $params['refund_reason'];
|
||||
|
||||
// 请求参数
|
||||
$parameter = [
|
||||
'merchantNo' => $this->config['mch_id'],
|
||||
'outTradeNo' => $params['order_no'],
|
||||
'outRequestNo' => $params['order_no'].GetNumberCode(),
|
||||
'originalTradeDate' => date('Y-m-d H:i:s', $params['pay_time']),
|
||||
'refundAmt' => (int) (($params['refund_price']*1000)/10),
|
||||
'requestDate' => date('Y-m-d H:i:s'),
|
||||
'operator' => $this->config['mch_id'],
|
||||
'tradeChannel' => 'APP',
|
||||
'ccy' => '156',
|
||||
'accessCode' => 'CASHIER',
|
||||
'remark' => $refund_reason,
|
||||
];
|
||||
|
||||
// 生成签名参数+签名
|
||||
$parameter['sign'] = $this->CreateSign($this->GetSignContent($parameter));
|
||||
|
||||
// 退款
|
||||
$result = $this->HttpRequest('https://mapi.bestpay.com.cn/mapi/uniformReceipt/tradeRefund', $parameter);
|
||||
if(!empty($result) && isset($result['success']) && $result['success'] == 1)
|
||||
{
|
||||
if(!empty($result['result']) && isset($result['result']['tradeStatus']) && $result['result']['tradeStatus'] == 'SUCCESS')
|
||||
{
|
||||
// 统一返回格式
|
||||
$data = [
|
||||
'out_trade_no' => isset($result['result']['outTradeNo']) ? $result['result']['outTradeNo'] : '',
|
||||
'trade_no' => isset($result['result']['tradeNo']) ? $result['result']['tradeNo'] : (isset($result['err_code_des']) ? $result['err_code_des'] : ''),
|
||||
'buyer_user' => isset($result['result']['buyerLoginNo']) ? $result['result']['buyerLoginNo'] : '',
|
||||
'refund_price' => isset($result['result']['refundAmt']) ? $result['result']['refundAmt']/100 : 0.00,
|
||||
'return_params' => $result['result'],
|
||||
];
|
||||
return DataReturn('退款成功', 0, $data);
|
||||
} else {
|
||||
return DataReturn($result['result']['tradeResultDesc'], -1);
|
||||
}
|
||||
}
|
||||
|
||||
$msg = empty($result) ? '退款接口异常' : ((empty($result['errorMsg']) || !is_array($result)) ? $result : $result['errorMsg']);
|
||||
return DataReturn($msg, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 网络请求
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2017-09-25T09:10:46+0800
|
||||
* @param [string] $url [请求url]
|
||||
* @param [array] $data [发送数据]
|
||||
* @param [int] $second [超时]
|
||||
* @return [mixed] [请求返回数据]
|
||||
*/
|
||||
private function HttpRequest($url, $data, $second = 30)
|
||||
{
|
||||
$ch = curl_init();
|
||||
$header = ['Content-Type: application/json'];
|
||||
curl_setopt_array($ch, array(
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_HTTPHEADER => $header,
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_SSL_VERIFYHOST => false,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_POSTFIELDS => json_encode($data),
|
||||
CURLOPT_TIMEOUT => $second,
|
||||
));
|
||||
$result = curl_exec($ch);
|
||||
|
||||
//返回结果
|
||||
if($result)
|
||||
{
|
||||
curl_close($ch);
|
||||
return json_decode($result, true);
|
||||
} else {
|
||||
$error = curl_errno($ch);
|
||||
curl_close($ch);
|
||||
return "curl出错,错误码:$error";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取签名内容
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-07
|
||||
* @desc description
|
||||
* @param [array] $params [需要签名的参数]
|
||||
*/
|
||||
public function GetSignContent($params)
|
||||
{
|
||||
ksort($params);
|
||||
$string = "";
|
||||
$i = 0;
|
||||
foreach($params as $k => $v)
|
||||
{
|
||||
if(!empty($v) && "@" != substr($v, 0, 1) && $k != 'sign')
|
||||
{
|
||||
if ($i == 0) {
|
||||
$string .= "$k" . "=" . "$v";
|
||||
} else {
|
||||
$string .= "&" . "$k" . "=" . "$v";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
unset($k, $v);
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 签名生成
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2021-02-07
|
||||
* @desc description
|
||||
* @param [string] $params [需要签名的参数]
|
||||
*/
|
||||
public function CreateSign($params)
|
||||
{
|
||||
$cer_key = file_get_contents($this->p12_dir_file);
|
||||
openssl_pkcs12_read($cer_key, $certs, $this->config['password']);
|
||||
openssl_sign($params, $sign_msg, $certs['pkey'], OPENSSL_ALGO_SHA256);
|
||||
return $sign_msg ? base64_encode($sign_msg) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义成功返回内容
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-07-01
|
||||
* @desc description
|
||||
* @param [string] $params [需要签名的参数]
|
||||
*/
|
||||
public function SuccessReturn($params = [])
|
||||
{
|
||||
if(empty($params))
|
||||
{
|
||||
$params = input();
|
||||
}
|
||||
return '{"success":true,"result":{"statusCode": 200,"outTradeNo":"'.$params['outTradeNo'].'","tradeNo":"'.$params['tradeNo'].'"}}';
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义失败返回内容
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-07-01
|
||||
* @desc description
|
||||
* @param [string] $params [需要签名的参数]
|
||||
*/
|
||||
public function ErrorReturn($params = [])
|
||||
{
|
||||
return '{"success":false,"result":{"statusCode":400,"outTradeNo":"","tradeNo":""}}';
|
||||
}
|
||||
}
|
||||
?>
|
@ -34,6 +34,9 @@ $my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'],
|
||||
define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root : str_replace('public'.DS, '', $my_root));
|
||||
define('__MY_ROOT_PUBLIC__', defined('IS_ROOT_ACCESS') ? DS.$my_root.'public'.DS : DS.$my_root);
|
||||
|
||||
// 当前服务器ip
|
||||
define('__MY_ADDR__', empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR']);
|
||||
|
||||
// 项目HOST
|
||||
define('__MY_HOST__', empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST']);
|
||||
|
||||
|
@ -75,8 +75,8 @@ input:hover, select:hover, textarea:hover, .chosen-choices:hover, .chosen-single
|
||||
body {margin:0;color:#666;}
|
||||
html,body {position:relative;background:#fff;height:100%;width:100%;}
|
||||
h1,h2,h3,h4,h5,h6 {font-family:'Karla',sans-serif;margin:10px 0;}
|
||||
h1 {line-height:43px;}
|
||||
h2 {line-height:35px;}
|
||||
h1 {line-height:42px;}
|
||||
h2 {line-height:32px;}
|
||||
h3 small {color:#444444;}
|
||||
h4 {line-height:22px;}
|
||||
h4 small {color:#444444;}
|
||||
@ -383,11 +383,11 @@ a:focus {outline:0;text-decoration:none;}
|
||||
header .tpl-header-list-user-nick {color:#fff;}
|
||||
}
|
||||
header { background-color:#4386fb !important; border-color:#4386fb; color:#fff; }
|
||||
header, header.am-topbar { min-height:35px; }
|
||||
header .am-topbar-brand { height:35px; }
|
||||
header, header.am-topbar { min-height:32px; }
|
||||
header .am-topbar-brand { height:32px; }
|
||||
header .am-dropdown-content {border-radius:2px;}
|
||||
header .am-topbar-brand h2 { margin: 0; }
|
||||
header .header-nav-submit { margin: 4px 10px 0 0; }
|
||||
header .header-nav-submit { margin: 4px 10px 0 0; padding: 4px 10px;}
|
||||
ul {margin-top:0;}
|
||||
.admin-header {position:fixed;top:0;right:0;z-index:1000;font-size:1.4rem;margin-bottom:0;}
|
||||
.admin-sidebar {width:260px;min-height:100%;float:left;border-right:1px solid #cecece;}
|
||||
@ -403,9 +403,9 @@ ul {margin-top:0;}
|
||||
.admin-sidebar {height:100%;overflow-x:hidden;overflow-y:scroll;-webkit-overflow-scrolling:touch;}
|
||||
.admin-sidebar .am-icon-angle-down {margin-top: 2px;}
|
||||
@media only screen and (min-width:641px) {
|
||||
header { left: 169px; }
|
||||
header .am-topbar-brand, .am-topbar-nav > li > a { line-height: 35px; }
|
||||
.admin-sidebar {display:block;width:170px;z-index:1; position: fixed; top: 0; left: 0;}
|
||||
header { left: 129px; }
|
||||
header .am-topbar-brand, .am-topbar-nav > li > a { line-height: 32px; }
|
||||
.admin-sidebar {display:block;width:130px;z-index:1; position: fixed; top: 0; left: 0;}
|
||||
.admin-offcanvas-bar {position:static;width:auto;background:none;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);overflow-y:visible;min-height:100%;}
|
||||
.admin-offcanvas-bar:after {content:none;}
|
||||
}
|
||||
@ -418,12 +418,11 @@ ul {margin-top:0;}
|
||||
.admin-sidebar .am-offcanvas-bar { width: 70%; }
|
||||
}
|
||||
.common-nav-bar {position:fixed;z-index:10;bottom:30px;right:20px;box-shadow: 0 0 10px 2px #c4c4c4;opacity: 0.8;}
|
||||
.admin {width:100%;height:100%;display:flex;display:-webkit-flex;padding-top:35px;background:#fff;}
|
||||
.admin {width:100%;height:100%;display:flex;display:-webkit-flex;padding-top:33px;background:#fff;}
|
||||
.admin .am-g {padding-left:0;padding-right:0;}
|
||||
/*---right Content---*/
|
||||
.content-right .content {padding:10px 10px 0 10px;}
|
||||
.admin-sidebar-list li a {padding:0.6rem;}
|
||||
.admin-sidebar-list li a .iconfont { vertical-align: middle; }
|
||||
.common-left-menu a:hover { background:rgba(118, 119, 120, 0.45); }
|
||||
.common-left-menu-active {background:#1cc09f !important;color:#fff !important;}
|
||||
#ifcontent {border:0px;}
|
||||
@ -468,7 +467,7 @@ ul {margin-top:0;}
|
||||
/**
|
||||
* mini开关
|
||||
*/
|
||||
.menu-scaling-submit{position:fixed;left:174px;top:40px;opacity:.6;width:16px;height:25px;padding:2px;box-shadow:0 0 3px 1px #208fd5;font-size: 18px;}
|
||||
.menu-scaling-submit{position:fixed;left:134px;top:40px;opacity:.6;width:16px;height:25px;padding:2px;box-shadow:0 0 3px 1px #208fd5;font-size: 18px;}
|
||||
|
||||
/**
|
||||
* mini小icon
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
@ -1,5 +1,5 @@
|
||||
@media only screen and (min-width: 641px) {
|
||||
#ifcontent {
|
||||
padding-left: 170px;
|
||||
padding-left: 130px;
|
||||
}
|
||||
}
|
@ -67,11 +67,11 @@ $(function()
|
||||
$('#ifcontent').animate({paddingLeft: "55px"}, 300);
|
||||
$('header.admin-header').animate({left: "54px"}, 300);
|
||||
} else {
|
||||
$(this).animate({left: "174px"}, 300);
|
||||
$(this).animate({left: "134px"}, 300);
|
||||
$(this).removeClass('am-icon-angle-double-right').addClass('am-icon-angle-double-left');
|
||||
$('#admin-offcanvas').animate({width: "170px"}, 300);
|
||||
$('#ifcontent').animate({paddingLeft: "170px"}, 300);
|
||||
$('header.admin-header').animate({left: "169px"}, 300);
|
||||
$('#admin-offcanvas').animate({width: "130px"}, 300);
|
||||
$('#ifcontent').animate({paddingLeft: "130px"}, 300);
|
||||
$('header.admin-header').animate({left: "129px"}, 300);
|
||||
$('#admin-offcanvas').removeClass('menu-mini-event');
|
||||
setTimeout(function() {
|
||||
$('#admin-offcanvas').removeClass('menu-mini');
|
||||
@ -162,7 +162,7 @@ $(function()
|
||||
if($(document).width() <= 640)
|
||||
{
|
||||
$('.menu-scaling-submit').attr('data-status', 0);
|
||||
$('.menu-scaling-submit').css({"left": "174px"});
|
||||
$('.menu-scaling-submit').css({"left": "134px"});
|
||||
$('.menu-scaling-submit').removeClass('am-icon-angle-double-right').addClass('am-icon-angle-double-left');
|
||||
$('#admin-offcanvas').css({"width": "inherit"});
|
||||
$('#admin-offcanvas').removeClass('menu-mini').removeClass('menu-mini-event');
|
||||
@ -171,9 +171,9 @@ $(function()
|
||||
} else {
|
||||
if(($('.menu-scaling-submit').attr('data-status') || 0) == 0)
|
||||
{
|
||||
$('#admin-offcanvas').css({"width": "170px"});
|
||||
$('#ifcontent').css({"padding-left":"170px"});
|
||||
$('header.admin-header').css({"left": "169px"});
|
||||
$('#admin-offcanvas').css({"width": "130px"});
|
||||
$('#ifcontent').css({"padding-left":"130px"});
|
||||
$('header.admin-header').css({"left": "129px"});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -5,13 +5,14 @@
|
||||
ul { list-style: none; }
|
||||
.none { display:none !important; }
|
||||
.block { display:block !important; }
|
||||
.text-deco-none { text-decoration: none !important; }
|
||||
.text-deco-line { text-decoration: underline !important; }
|
||||
|
||||
/* 没数据 */
|
||||
.table-no {text-align:center;padding:115px 0;background:#FFF !important;color: #888; }
|
||||
|
||||
/* 公共dl样式 */
|
||||
.dl-content dt { float: left; padding-left: 5px; overflow: hidden; clear: left;
|
||||
width: 120px; }
|
||||
.dl-content dt { float: left; padding-left: 5px; overflow: hidden; width: 120px; }
|
||||
.dl-content dd { padding-left: 120px; }
|
||||
.dl-content dd:not(:last-child) { border-bottom: 1px solid #efefef; }
|
||||
.dl-content dt, .dl-content dd { font-weight: normal !important; text-align: left; margin-top: 0px; line-height: 20px; min-height: 40px; padding-top: 10px; padding-bottom: 10px; }
|
||||
@ -161,7 +162,7 @@ iframe { border: 0; }
|
||||
.region-linkage select:not(:first-child) { margin-bottom: 5px; }
|
||||
|
||||
/* 表单 */
|
||||
form.am-form .am-form-group, .plug-file-upload-view, .business-form-group, .business-form-block { padding: 5px 0 10px 0px; }
|
||||
form.am-form .am-form-group, .plug-file-upload-view, .business-form-group, .business-form-block { padding: 15px 0 10px 0px; }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -275,9 +275,9 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
|
||||
@media only screen and (min-width:640px) {
|
||||
/*导航固定*/
|
||||
ul.am-tabs-nav.am-nav.am-nav-tabs {margin-right:10px ;margin-left: 10px;width: auto;}
|
||||
.scoll{float: left;width: calc(45% - 10px);max-width:360px;padding-right:20px; }
|
||||
.scoll{float: left;width: calc(45% - 20px);}
|
||||
.scoll .slider-content { border: 1px solid #eee; }
|
||||
.clearfix-right{float:left;width:55%;min-height: 270px;}
|
||||
.clearfix-right{float:right;width:55%;min-height: 270px;}
|
||||
.iteminfo_parameter.freight{display: block;margin-top: 10px;margin-bottom:10px ;}
|
||||
.iteminfo_parameter.freight dt{margin-left:-70px ;float: left;margin-right:10px ;padding-top:5px ;padding-bottom:20px ;}
|
||||
.buy-nav{position: static; margin-top: 20px; overflow: hidden; }
|
||||
@ -354,7 +354,7 @@ flex: 1 1 0%;line-height: 16px;cursor: pointer;}
|
||||
|
||||
.scoll{display: none;}
|
||||
.item-inform{max-width:1000px; background:#fff; margin-top: 20px; margin-bottom: 30px; }
|
||||
.clearfix-left{display:block;float: left;width:360px;}
|
||||
.clearfix-left{display:block;float: left;width:350px;}
|
||||
.clearfix-right{width:calc(100% - 370px);margin-left:10px;}
|
||||
.freight{width:400px;float: left;}
|
||||
.iteminfo_parameter.freight dt{padding-top:6px ;padding-bottom:0px ;}
|
||||
@ -407,7 +407,7 @@ 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: 10px; }
|
||||
.goods-detail { padding: 10px 5px; }
|
||||
}
|
||||
|
||||
/* 手机模式下 */
|
||||
|
2
resources/.gitignore
vendored
Normal file
2
resources/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
Loading…
Reference in New Issue
Block a user