Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
u011369184
ShopXO
提交
0df1ae19
ShopXO
项目概览
u011369184
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0df1ae19
编写于
2月 15, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
4312467a
变更
51
展开全部
隐藏空白更改
内联
并排
Showing
51 changed file
with
1395 addition
and
487 deletion
+1395
-487
application/admin/controller/Order.php
application/admin/controller/Order.php
+46
-38
application/admin/form/Answer.php
application/admin/form/Answer.php
+0
-1
application/admin/form/Goodsbrowse.php
application/admin/form/Goodsbrowse.php
+0
-1
application/admin/form/Goodscomments.php
application/admin/form/Goodscomments.php
+0
-2
application/admin/form/Goodsfavor.php
application/admin/form/Goodsfavor.php
+0
-1
application/admin/form/Integrallog.php
application/admin/form/Integrallog.php
+0
-1
application/admin/form/Message.php
application/admin/form/Message.php
+0
-1
application/admin/form/Order.php
application/admin/form/Order.php
+0
-4
application/admin/form/Orderaftersale.php
application/admin/form/Orderaftersale.php
+0
-2
application/admin/form/Paylog.php
application/admin/form/Paylog.php
+0
-2
application/admin/form/Refundlog.php
application/admin/form/Refundlog.php
+0
-1
application/admin/form/Useraddress.php
application/admin/form/Useraddress.php
+0
-1
application/admin/form/Warehousegoods.php
application/admin/form/Warehousegoods.php
+0
-1
application/admin/view/default/order/module/goods.html
application/admin/view/default/order/module/goods.html
+35
-1
application/admin/view/default/pluginsadmin/save_info.html
application/admin/view/default/pluginsadmin/save_info.html
+1
-1
application/admin/view/default/site/siteset/extends.html
application/admin/view/default/site/siteset/extends.html
+9
-0
application/admin/view/default/site/siteset/search.html
application/admin/view/default/site/siteset/search.html
+16
-0
application/api/controller/Ordernotify.php
application/api/controller/Ordernotify.php
+8
-7
application/index/controller/Buy.php
application/index/controller/Buy.php
+4
-0
application/index/controller/Common.php
application/index/controller/Common.php
+1
-1
application/index/controller/Goods.php
application/index/controller/Goods.php
+17
-2
application/index/form/Orderaftersale.php
application/index/form/Orderaftersale.php
+0
-1
application/index/view/default/buy/index.html
application/index/view/default/buy/index.html
+13
-1
application/index/view/default/goods/index.html
application/index/view/default/goods/index.html
+390
-310
application/index/view/default/order/detail.html
application/index/view/default/order/detail.html
+12
-1
application/index/view/default/order/module/goods.html
application/index/view/default/order/module/goods.html
+35
-1
application/index/view/default/public/header_top_nav.html
application/index/view/default/public/header_top_nav.html
+12
-0
application/index/view/default/search/index.html
application/index/view/default/search/index.html
+1
-1
application/lang/zh-cn.php
application/lang/zh-cn.php
+3
-0
application/service/AppMiniService.php
application/service/AppMiniService.php
+3
-1
application/service/GoodsService.php
application/service/GoodsService.php
+1
-1
application/service/OrderAftersaleService.php
application/service/OrderAftersaleService.php
+3
-1
application/service/OrderService.php
application/service/OrderService.php
+16
-3
application/service/PaymentService.php
application/service/PaymentService.php
+1
-1
application/service/PluginsAdminService.php
application/service/PluginsAdminService.php
+1
-1
application/service/ResourcesService.php
application/service/ResourcesService.php
+18
-0
application/service/SearchService.php
application/service/SearchService.php
+41
-31
application/service/StoreService.php
application/service/StoreService.php
+36
-19
application/service/ThemeService.php
application/service/ThemeService.php
+2
-1
application/service/WarehouseService.php
application/service/WarehouseService.php
+46
-3
application/tags.php
application/tags.php
+66
-0
extend/base/FileUpload.php
extend/base/FileUpload.php
+15
-14
extend/payment/Bestpay.php
extend/payment/Bestpay.php
+510
-0
public/core.php
public/core.php
+3
-0
public/static/admin/default/css/common.css
public/static/admin/default/css/common.css
+10
-11
public/static/admin/default/css/iconfontmenu.css
public/static/admin/default/css/iconfontmenu.css
+1
-1
public/static/admin/default/css/index.index.css
public/static/admin/default/css/index.index.css
+1
-1
public/static/admin/default/js/index.js
public/static/admin/default/js/index.js
+8
-8
public/static/common/css/common.css
public/static/common/css/common.css
+4
-3
public/static/index/default/css/goods.css
public/static/index/default/css/goods.css
+4
-4
resources/.gitignore
resources/.gitignore
+2
-0
未找到文件。
application/admin/controller/Order.php
浏览文件 @
0df1ae19
...
...
@@ -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
...
...
application/admin/form/Answer.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Goodsbrowse.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Goodscomments.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Goodsfavor.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Integrallog.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Message.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Order.php
浏览文件 @
0df1ae19
...
...
@@ -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'
,
],
...
...
application/admin/form/Orderaftersale.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Paylog.php
浏览文件 @
0df1ae19
...
...
@@ -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'
,
],
...
...
application/admin/form/Refundlog.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Useraddress.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入用户名/昵称/手机/邮箱'
,
...
...
application/admin/form/Warehousegoods.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入商品名称/型号'
,
...
...
application/admin/view/default/order/module/goods.html
浏览文件 @
0df1ae19
...
...
@@ -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>
<!-- 订单列表基础商品顶部-开始 -->
...
...
application/admin/view/default/pluginsadmin/save_info.html
浏览文件 @
0df1ae19
...
...
@@ -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"
>
...
...
application/admin/view/default/site/siteset/extends.html
浏览文件 @
0df1ae19
...
...
@@ -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>
...
...
application/admin/view/default/site/siteset/search.html
浏览文件 @
0df1ae19
...
...
@@ -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
>
...
...
application/api/controller/Ordernotify.php
浏览文件 @
0df1ae19
...
...
@@ -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
''
;
...
...
application/index/controller/Buy.php
浏览文件 @
0df1ae19
...
...
@@ -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'
]
:
'参数错误'
);
...
...
application/index/controller/Common.php
浏览文件 @
0df1ae19
...
...
@@ -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
;
...
...
application/index/controller/Goods.php
浏览文件 @
0df1ae19
...
...
@@ -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
)
...
...
application/index/form/Orderaftersale.php
浏览文件 @
0df1ae19
...
...
@@ -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'
=>
'请输入订单号/商品名称/型号'
,
...
...
application/index/view/default/buy/index.html
浏览文件 @
0df1ae19
...
...
@@ -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>
...
...
application/index/view/default/goods/index.html
浏览文件 @
0df1ae19
此差异已折叠。
点击以展开。
application/index/view/default/order/detail.html
浏览文件 @
0df1ae19
...
...
@@ -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"
>
...
...
application/index/view/default/order/module/goods.html
浏览文件 @
0df1ae19
...
...
@@ -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>
<!-- 用户订单列表基础商品顶部-开始 -->
...
...
application/index/view/default/public/header_top_nav.html
浏览文件 @
0df1ae19
...
...
@@ -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}}
...
...
application/index/view/default/search/index.html
浏览文件 @
0df1ae19
...
...
@@ -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>
<!-- 搜索条件顶部钩子 -->
...
...
application/lang/zh-cn.php
浏览文件 @
0df1ae19
...
...
@@ -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}$'
,
);
?>
\ No newline at end of file
application/service/AppMiniService.php
浏览文件 @
0df1ae19
...
...
@@ -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
);
...
...
application/service/GoodsService.php
浏览文件 @
0df1ae19
...
...
@@ -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
);
}
...
...
application/service/OrderAftersaleService.php
浏览文件 @
0df1ae19
...
...
@@ -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'
]))
...
...
application/service/OrderService.php
浏览文件 @
0df1ae19
...
...
@@ -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'
]
=
''
;
}
}
// 订单模式处理
...
...
application/service/PaymentService.php
浏览文件 @
0df1ae19
...
...
@@ -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
);
...
...
application/service/PluginsAdminService.php
浏览文件 @
0df1ae19
...
...
@@ -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
);
...
...
application/service/ResourcesService.php
浏览文件 @
0df1ae19
...
...
@@ -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'
,
];
}
}
?>
\ No newline at end of file
application/service/SearchService.php
浏览文件 @
0df1ae19
...
...
@@ -335,40 +335,45 @@ class SearchService
*/
public
static
function
CategoryBrandList
(
$params
=
[])
{
// 基础条件
$brand_where
=
[
[
'is_enable'
,
'='
,
1
],
];
$data
=
[];
if
(
MyC
(
'home_search_is_brand'
,
0
)
==
1
)
{
// 基础条件
$brand_where
=
[
[
'is_enable'
,
'='
,
1
],
];
// 搜索条件
$where
=
self
::
SearchWhereHandle
(
$params
);
$base_where
=
$where
[
'base'
];
$where_keywords
=
$where
[
'keywords'
];
$where_screening_price
=
$where
[
'screening_price'
];
// 搜索条件
$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
))
// 一维数组、参数值去重
if
(
!
empty
(
$base_where
)
||
!
empty
(
$where_keywords
)
||
!
empty
(
$where_screening_price
))
{
$brand_where
[]
=
[
'id'
,
'in'
,
array_unique
(
$ids
)];
$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
);
return
$ret
[
'data'
];
// 获取品牌列表
$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
;
}
/**
...
...
application/service/StoreService.php
浏览文件 @
0df1ae19
...
...
@@ -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__
);
}
}
?>
\ No newline at end of file
application/service/ThemeService.php
浏览文件 @
0df1ae19
...
...
@@ -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
);
...
...
application/service/WarehouseService.php
浏览文件 @
0df1ae19
...
...
@@ -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
;
}
...
...
application/tags.php
浏览文件 @
0df1ae19
...
...
@@ -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'
,
),
);
?>
\ No newline at end of file
extend/base/FileUpload.php
浏览文件 @
0df1ae19
...
...
@@ -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
(
);
}
}
?>
\ No newline at end of file
extend/payment/Bestpay.php
0 → 100644
浏览文件 @
0df1ae19
<?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":""}}'
;
}
}
?>
\ No newline at end of file
public/core.php
浏览文件 @
0df1ae19
...
...
@@ -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'
]);
...
...
public/static/admin/default/css/common.css
浏览文件 @
0df1ae19
...
...
@@ -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
:
4
3
px
;}
h2
{
line-height
:
3
5
px
;}
h1
{
line-height
:
4
2
px
;}
h2
{
line-height
:
3
2
px
;}
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
:
3
5
px
;
}
header
.am-topbar-brand
{
height
:
3
5
px
;
}
header
,
header
.am-topbar
{
min-height
:
3
2
px
;
}
header
.am-topbar-brand
{
height
:
3
2
px
;
}
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
:
1
6
9px
;
}
header
.am-topbar-brand
,
.am-topbar-nav
>
li
>
a
{
line-height
:
3
5
px
;
}
.admin-sidebar
{
display
:
block
;
width
:
1
7
0px
;
z-index
:
1
;
position
:
fixed
;
top
:
0
;
left
:
0
;}
header
{
left
:
1
2
9px
;
}
header
.am-topbar-brand
,
.am-topbar-nav
>
li
>
a
{
line-height
:
3
2
px
;
}
.admin-sidebar
{
display
:
block
;
width
:
1
3
0px
;
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
:
3
5
px
;
background
:
#fff
;}
.admin
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
-webkit-flex
;
padding-top
:
3
3
px
;
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
:
1
7
4px
;
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
:
1
3
4px
;
top
:
40px
;
opacity
:
.6
;
width
:
16px
;
height
:
25px
;
padding
:
2px
;
box-shadow
:
0
0
3px
1px
#208fd5
;
font-size
:
18px
;}
/**
* mini小icon
...
...
public/static/admin/default/css/iconfontmenu.css
浏览文件 @
0df1ae19
...
...
@@ -9,7 +9,7 @@
.iconfont
{
font-family
:
"iconfont"
!important
;
font-size
:
1
6
px
;
font-size
:
1
2
px
;
font-style
:
normal
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
...
...
public/static/admin/default/css/index.index.css
浏览文件 @
0df1ae19
@media
only
screen
and
(
min-width
:
641px
)
{
#ifcontent
{
padding-left
:
1
7
0px
;
padding-left
:
1
3
0px
;
}
}
\ No newline at end of file
public/static/admin/default/js/index.js
浏览文件 @
0df1ae19
...
...
@@ -67,11 +67,11 @@ $(function()
$
(
'
#ifcontent
'
).
animate
({
paddingLeft
:
"
55px
"
},
300
);
$
(
'
header.admin-header
'
).
animate
({
left
:
"
54px
"
},
300
);
}
else
{
$
(
this
).
animate
({
left
:
"
1
7
4px
"
},
300
);
$
(
this
).
animate
({
left
:
"
1
3
4px
"
},
300
);
$
(
this
).
removeClass
(
'
am-icon-angle-double-right
'
).
addClass
(
'
am-icon-angle-double-left
'
);
$
(
'
#admin-offcanvas
'
).
animate
({
width
:
"
1
7
0px
"
},
300
);
$
(
'
#ifcontent
'
).
animate
({
paddingLeft
:
"
1
7
0px
"
},
300
);
$
(
'
header.admin-header
'
).
animate
({
left
:
"
1
6
9px
"
},
300
);
$
(
'
#admin-offcanvas
'
).
animate
({
width
:
"
1
3
0px
"
},
300
);
$
(
'
#ifcontent
'
).
animate
({
paddingLeft
:
"
1
3
0px
"
},
300
);
$
(
'
header.admin-header
'
).
animate
({
left
:
"
1
2
9px
"
},
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
"
:
"
1
7
4px
"
});
$
(
'
.menu-scaling-submit
'
).
css
({
"
left
"
:
"
1
3
4px
"
});
$
(
'
.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
"
:
"
1
7
0px
"
});
$
(
'
#ifcontent
'
).
css
({
"
padding-left
"
:
"
1
7
0px
"
});
$
(
'
header.admin-header
'
).
css
({
"
left
"
:
"
1
6
9px
"
});
$
(
'
#admin-offcanvas
'
).
css
({
"
width
"
:
"
1
3
0px
"
});
$
(
'
#ifcontent
'
).
css
({
"
padding-left
"
:
"
1
3
0px
"
});
$
(
'
header.admin-header
'
).
css
({
"
left
"
:
"
1
2
9px
"
});
}
}
});
...
...
public/static/common/css/common.css
浏览文件 @
0df1ae19
...
...
@@ -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
:
1
5px
0
10px
0px
;
}
}
/**
...
...
public/static/index/default/css/goods.css
浏览文件 @
0df1ae19
...
...
@@ -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
:
lef
t
;
width
:
55%
;
min-height
:
270px
;}
.clearfix-right
{
float
:
righ
t
;
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
:
3
6
0px
;}
.clearfix-left
{
display
:
block
;
float
:
left
;
width
:
3
5
0px
;}
.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
;
}
}
/* 手机模式下 */
...
...
resources/.gitignore
0 → 100644
浏览文件 @
0df1ae19
*
!.gitignore
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录