Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
02d2fc44
ShopXO
项目概览
飞鱼0526
/
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,发现更多精彩内容 >>
提交
02d2fc44
编写于
4月 26, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微信/QQ支付支持APP
上级
1e4c5d60
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
230 addition
and
19 deletion
+230
-19
application/admin/view/default/index/init.html
application/admin/view/default/index/init.html
+8
-0
application/admin/view/default/site/siteset/search.html
application/admin/view/default/site/siteset/search.html
+8
-0
application/api/controller/Agreement.php
application/api/controller/Agreement.php
+50
-0
application/index/view/default/config.json
application/index/view/default/config.json
+1
-1
application/lang/zh-cn.php
application/lang/zh-cn.php
+1
-0
application/service/SearchService.php
application/service/SearchService.php
+6
-1
application/service/SystemBaseService.php
application/service/SystemBaseService.php
+30
-0
application/tags.php
application/tags.php
+47
-0
changelog.txt
changelog.txt
+3
-1
extend/payment/QQ.php
extend/payment/QQ.php
+40
-8
extend/payment/Weixin.php
extend/payment/Weixin.php
+30
-2
public/core.php
public/core.php
+1
-1
sourcecode/alipay/default/config.json
sourcecode/alipay/default/config.json
+1
-1
sourcecode/baidu/default/config.json
sourcecode/baidu/default/config.json
+1
-1
sourcecode/qq/default/config.json
sourcecode/qq/default/config.json
+1
-1
sourcecode/toutiao/default/config.json
sourcecode/toutiao/default/config.json
+1
-1
sourcecode/weixin/default/config.json
sourcecode/weixin/default/config.json
+1
-1
未找到文件。
application/admin/view/default/index/init.html
浏览文件 @
02d2fc44
...
...
@@ -3,6 +3,14 @@
<!-- right content start -->
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- 顶部提示信息 -->
{{if !empty($site_store_info) and !empty($site_store_info['base']) and !empty($site_store_info['base']['site_top_notice'])}}
<div
class=
"am-alert am-alert-danger"
data-am-alert
>
<button
type=
"button"
class=
"am-close"
>
×
</button>
<p>
{{$site_store_info.base.site_top_notice|raw}}
</p>
</div>
{{/if}}
<!-- 顶部基础信息 -->
<div
class=
"block-container base-content-top am-nbfc"
>
<div
class=
"am-fl am-nbfc left-content"
>
...
...
application/admin/view/default/site/siteset/search.html
浏览文件 @
02d2fc44
...
...
@@ -43,6 +43,14 @@
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.home_search_is_keywords_seo_fields.name}}
<span
class=
"am-form-group-label-tips"
>
{{$data.home_search_is_keywords_seo_fields.describe}}
</span></label>
<select
name=
"{{$data.home_search_is_keywords_seo_fields.only_tag}}"
class=
"am-radius chosen-select"
data-validation-message=
"{{$data.home_search_is_keywords_seo_fields.error_tips}}"
required
>
{{foreach $common_is_text_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
home_search_is_keywords_seo_fields
']['
value
'])
and
$
data
['
home_search_is_keywords_seo_fields
']['
value
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</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>
...
...
application/api/controller/Agreement.php
0 → 100644
浏览文件 @
02d2fc44
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\SystemBaseService
;
/**
* 协议
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Agreement
extends
Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-16
* @desc description
*/
public
function
Index
()
{
return
SystemBaseService
::
AgreementData
(
$this
->
data_request
);
}
}
?>
\ No newline at end of file
application/index/view/default/config.json
浏览文件 @
02d2fc44
{
"name"
:
"默认主题"
,
"ver"
:
"2.0.
1
"
,
"ver"
:
"2.0.
2
"
,
"author"
:
"Devil"
,
"home"
:
"https://shopxo.net/"
}
\ No newline at end of file
application/lang/zh-cn.php
浏览文件 @
02d2fc44
...
...
@@ -34,6 +34,7 @@ return [
'1.9.3'
=>
[
'value'
=>
'1.9.3'
,
'name'
=>
'v1.9.3'
],
'2.0.0'
=>
[
'value'
=>
'2.0.0'
,
'name'
=>
'v2.0.0'
],
'2.0.1'
=>
[
'value'
=>
'2.0.1'
,
'name'
=>
'v2.0.1'
],
'2.0.2'
=>
[
'value'
=>
'2.0.2'
,
'name'
=>
'v2.0.2'
],
],
// 用户注册类型列表
...
...
application/service/SearchService.php
浏览文件 @
02d2fc44
...
...
@@ -160,10 +160,15 @@ class SearchService
$where_keywords
=
[];
if
(
!
empty
(
$params
[
'wd'
]))
{
$keywords_fields
=
'g.title|g.simple_desc'
;
if
(
MyC
(
'home_search_is_keywords_seo_fields'
)
==
1
)
{
$keywords_fields
.
=
'|g.seo_title|g.seo_keywords|g.seo_desc'
;
}
$keywords
=
explode
(
' '
,
$params
[
'wd'
]);
foreach
(
$keywords
as
$kv
)
{
$where_keywords
[]
=
[
'g.title|g.simple_desc'
,
'like'
,
'%'
.
$kv
.
'%'
];
$where_keywords
[]
=
[
$keywords_fields
,
'like'
,
'%'
.
$kv
.
'%'
];
}
}
...
...
application/service/SystemBaseService.php
浏览文件 @
02d2fc44
...
...
@@ -15,6 +15,7 @@ use think\facade\Hook;
use
app\service\ResourcesService
;
use
app\service\QuickNavService
;
use
app\service\PluginsService
;
use
app\service\ConfigService
;
/**
* 系统基础公共信息服务层
...
...
@@ -328,5 +329,34 @@ class SystemBaseService
// 返回状态、默认支持
return
$status
;
}
/**
* 协议数据
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-04-25
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
AgreementData
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'document'
,
'error_msg'
=>
'协议文档类型有误'
,
],
];
$ret
=
ParamsChecked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 获取内容
return
ConfigService
::
ConfigContentRow
(
'common_agreement_'
.
$params
[
'document'
]);
}
}
?>
\ No newline at end of file
application/tags.php
浏览文件 @
02d2fc44
...
...
@@ -38,6 +38,7 @@ return array (
1
=>
'app\\plugins\\shop\\Hook'
,
2
=>
'app\\plugins\\multilingual\\Hook'
,
3
=>
'app\\plugins\\store\\Hook'
,
4
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_js'
=>
array
(
...
...
@@ -45,6 +46,7 @@ return array (
1
=>
'app\\plugins\\shop\\Hook'
,
2
=>
'app\\plugins\\multilingual\\Hook'
,
3
=>
'app\\plugins\\store\\Hook'
,
4
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_navigation_header_handle'
=>
array
(
...
...
@@ -56,36 +58,44 @@ return array (
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\multilingual\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_quick_navigation_h5'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\multilingual\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_quick_navigation_weixin'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_quick_navigation_alipay'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_quick_navigation_baidu'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_quick_navigation_qq'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_quick_navigation_toutiao'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_goods_handle_end'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\shop\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_view_buy_form_inside'
=>
array
(
...
...
@@ -107,12 +117,14 @@ return array (
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\shop\\Hook'
,
2
=>
'app\\plugins\\store\\Hook'
,
3
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_order_status_change_history_success_handle'
=>
array
(
0
=>
'app\\plugins\\points\\Hook'
,
1
=>
'app\\plugins\\shop\\Hook'
,
2
=>
'app\\plugins\\store\\Hook'
,
3
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_base_data_return_api_buy_index'
=>
array
(
...
...
@@ -128,12 +140,14 @@ return array (
array
(
0
=>
'app\\plugins\\shop\\Hook'
,
1
=>
'app\\plugins\\store\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_header_navigation_top_right_handle'
=>
array
(
0
=>
'app\\plugins\\shop\\Hook'
,
1
=>
'app\\plugins\\multilingual\\Hook'
,
2
=>
'app\\plugins\\store\\Hook'
,
3
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_goods_save_handle'
=>
array
(
...
...
@@ -177,6 +191,7 @@ return array (
array
(
0
=>
'app\\plugins\\shop\\Hook'
,
1
=>
'app\\plugins\\store\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_view_admin_goods_save'
=>
array
(
...
...
@@ -252,5 +267,37 @@ return array (
array
(
0
=>
'app\\plugins\\store\\Hook'
,
),
'plugins_service_site_extraction_address_list'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_goods_spec_extends_handle'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_view_admin_user_save'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_user_save_handle'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_service_goods_spec_base'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_view_goods_detail_panel_price_top'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_module_form_admin_user_index'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
'plugins_module_form_admin_user_detail'
=>
array
(
0
=>
'app\\plugins\\distribution\\Hook'
,
),
);
?>
\ No newline at end of file
changelog.txt
浏览文件 @
02d2fc44
...
...
@@ -2,7 +2,9 @@
ShopXO 2.0.2 Release 000000 http://shopxo.net
+=========================================================+
全局
1.
1. 搜索关键字包含SEO字段新增开关
2. api接口新增用户注册协议数据
3. 微信/QQ支付支持APP支付独立配置appid
web端
1. 系统、功能插件、支付插件、web端主题、小程序主题支持在线安装更新
...
...
extend/payment/QQ.php
浏览文件 @
02d2fc44
...
...
@@ -60,6 +60,16 @@ class QQ
// 配置信息
$element
=
[
[
'element'
=>
'input'
,
'type'
=>
'text'
,
'default'
=>
''
,
'name'
=>
'app_appid'
,
'placeholder'
=>
'开放平台AppID'
,
'title'
=>
'开放平台AppID'
,
'is_required'
=>
0
,
'message'
=>
'请填写QQ开放平台APP支付分配的AppID'
,
],
[
'element'
=>
'input'
,
'type'
=>
'text'
,
...
...
@@ -250,7 +260,7 @@ class QQ
// APP支付
case
'APP'
:
$pay_data
=
array
(
'appid'
=>
$this
->
pay_params
[
'appid'
],
'appid'
=>
$this
->
pay_params
[
'app
_app
id'
],
'partnerid'
=>
$this
->
pay_params
[
'mch_id'
],
'prepayid'
=>
$data
[
'prepay_id'
],
'package'
=>
'Sign=WXPay'
,
...
...
@@ -275,7 +285,11 @@ class QQ
*/
private
function
GetPayParams
(
$params
=
[])
{
$trade_type
=
empty
(
$params
[
'trade_type'
])
?
$this
->
GetTradeType
()
:
$params
[
'trade_type'
];
// 平台
$client_type
=
ApplicationClientType
();
// 支付类型
$trade_type
=
empty
(
$params
[
'trade_type'
])
?
$this
->
GetTradeType
(
$client_type
)
:
$params
[
'trade_type'
];
if
(
empty
(
$trade_type
))
{
return
DataReturn
(
'支付类型不匹配'
,
-
1
);
...
...
@@ -284,9 +298,12 @@ class QQ
// 异步地址处理
$notify_url
=
(
__MY_HTTP__
==
'https'
&&
isset
(
$this
->
config
[
'agreement'
])
&&
$this
->
config
[
'agreement'
]
==
1
)
?
'http'
.
mb_substr
(
$params
[
'notify_url'
],
5
,
null
,
'utf-8'
)
:
$params
[
'notify_url'
];
// appid
$appid
=
$this
->
PayAppID
(
$client_type
);
// 请求参数
$data
=
[
'appid'
=>
$
this
->
config
[
'appid'
]
,
'appid'
=>
$
appid
,
'mch_id'
=>
$this
->
config
[
'mch_id'
],
'nonce_str'
=>
md5
(
time
()
.
$params
[
'order_no'
]),
'body'
=>
$params
[
'site_name'
]
.
'-'
.
$params
[
'name'
],
...
...
@@ -302,19 +319,34 @@ class QQ
return
DataReturn
(
'success'
,
0
,
$data
);
}
/**
* appid获取
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-04-25
* @desc description
* @param [string] $client_type [客户端类型]
*/
public
function
PayAppID
(
$client_type
)
{
$arr
=
[
'app'
=>
$this
->
config
[
'app_appid'
],
];
return
array_key_exists
(
$client_type
,
$arr
)
?
$arr
[
$client_type
]
:
$this
->
config
[
'appid'
];
}
/**
* 获取支付交易类型
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-01-08
* @param [string] $client_type [客户端类型]
* @desc description
*/
private
function
GetTradeType
()
private
function
GetTradeType
(
$client_type
)
{
// 平台
$client_type
=
ApplicationClientType
();
// 平台类型定义
$type_all
=
[
'pc'
=>
'NATIVE'
,
...
...
@@ -410,7 +442,7 @@ class QQ
// 请求参数
$data
=
[
'appid'
=>
$this
->
config
[
'appid'
]
,
'appid'
=>
$this
->
PayAppID
(
$params
[
'client_type'
])
,
'mch_id'
=>
$this
->
config
[
'mch_id'
],
'nonce_str'
=>
md5
(
time
()
.
rand
()
.
$params
[
'order_no'
]),
'transaction_id'
=>
$params
[
'trade_no'
],
...
...
extend/payment/Weixin.php
浏览文件 @
02d2fc44
...
...
@@ -60,6 +60,16 @@ class Weixin
// 配置信息
$element
=
[
[
'element'
=>
'input'
,
'type'
=>
'text'
,
'default'
=>
''
,
'name'
=>
'app_appid'
,
'placeholder'
=>
'开放平台AppID'
,
'title'
=>
'开放平台AppID'
,
'is_required'
=>
0
,
'message'
=>
'请填写微信开放平台APP支付分配的AppID'
,
],
[
'element'
=>
'input'
,
'type'
=>
'text'
,
...
...
@@ -370,7 +380,7 @@ class Weixin
}
// appid
$appid
=
(
$client_type
==
'weixin'
)
?
$this
->
config
[
'mini_appid'
]
:
$this
->
config
[
'appid'
]
;
$appid
=
$this
->
PayAppID
(
$client_type
)
;
// 异步地址处理
$notify_url
=
(
$client_type
==
'qq'
)
?
'https://api.q.qq.com/wxpay/notify'
:
$this
->
GetNotifyUrl
(
$params
);
...
...
@@ -395,6 +405,24 @@ class Weixin
return
DataReturn
(
'success'
,
0
,
$data
);
}
/**
* appid获取
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-04-25
* @desc description
* @param [string] $client_type [客户端类型]
*/
public
function
PayAppID
(
$client_type
)
{
$arr
=
[
'weixin'
=>
$this
->
config
[
'mini_appid'
],
'app'
=>
$this
->
config
[
'app_appid'
],
];
return
array_key_exists
(
$client_type
,
$arr
)
?
$arr
[
$client_type
]
:
$this
->
config
[
'appid'
];
}
/**
* 订单自动关闭的时间
* @author Devil
...
...
@@ -546,7 +574,7 @@ class Weixin
$refund_reason
=
empty
(
$params
[
'refund_reason'
])
?
$params
[
'order_no'
]
.
'订单退款'
.
$params
[
'refund_price'
]
.
'元'
:
$params
[
'refund_reason'
];
// appid,默认使用公众号appid
$appid
=
(
!
isset
(
$params
[
'client_type'
])
||
in_array
(
$params
[
'client_type'
],
[
'pc'
,
'h5'
]))
?
$this
->
config
[
'appid'
]
:
$this
->
config
[
'mini_appid'
]
;
$appid
=
$this
->
PayAppID
(
$params
[
'client_type'
])
;
// 请求参数
$data
=
[
...
...
public/core.php
浏览文件 @
02d2fc44
...
...
@@ -13,7 +13,7 @@
if
(
version_compare
(
PHP_VERSION
,
'5.6.0'
,
'<'
))
die
(
'PHP版本最低 5.6.0'
);
// 系统版本
define
(
'APPLICATION_VERSION'
,
'v2.0.
1
'
);
define
(
'APPLICATION_VERSION'
,
'v2.0.
2
'
);
// 定义系统目录分隔符
define
(
'DS'
,
'/'
);
...
...
sourcecode/alipay/default/config.json
浏览文件 @
02d2fc44
{
"name"
:
"默认主题"
,
"ver"
:
"2.0.
1
"
,
"ver"
:
"2.0.
2
"
,
"author"
:
"Devil"
,
"home"
:
"https://shopxo.net/"
}
\ No newline at end of file
sourcecode/baidu/default/config.json
浏览文件 @
02d2fc44
{
"name"
:
"默认主题"
,
"ver"
:
"2.0.
1
"
,
"ver"
:
"2.0.
2
"
,
"author"
:
"Devil"
,
"home"
:
"https://shopxo.net/"
}
\ No newline at end of file
sourcecode/qq/default/config.json
浏览文件 @
02d2fc44
{
"name"
:
"默认主题"
,
"ver"
:
"2.0.
1
"
,
"ver"
:
"2.0.
2
"
,
"author"
:
"Devil"
,
"home"
:
"https://shopxo.net/"
}
\ No newline at end of file
sourcecode/toutiao/default/config.json
浏览文件 @
02d2fc44
{
"name"
:
"默认主题"
,
"ver"
:
"2.0.
1
"
,
"ver"
:
"2.0.
2
"
,
"author"
:
"Devil"
,
"home"
:
"https://shopxo.net/"
}
\ No newline at end of file
sourcecode/weixin/default/config.json
浏览文件 @
02d2fc44
{
"name"
:
"默认主题"
,
"ver"
:
"2.0.
1
"
,
"ver"
:
"2.0.
2
"
,
"author"
:
"Devil"
,
"home"
:
"https://shopxo.net/"
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录