+
+
+ {{/if}}
+
{{$site_store_info.base.site_top_notice|raw}}
+
diff --git a/application/admin/view/default/site/siteset/search.html b/application/admin/view/default/site/siteset/search.html
index b8cdb9036..8f6ee9df5 100644
--- a/application/admin/view/default/site/siteset/search.html
+++ b/application/admin/view/default/site/siteset/search.html
@@ -43,6 +43,14 @@
{{/foreach}}
+
+
+
+
diff --git a/application/api/controller/Agreement.php b/application/api/controller/Agreement.php
new file mode 100644
index 000000000..e163fb82c
--- /dev/null
+++ b/application/api/controller/Agreement.php
@@ -0,0 +1,50 @@
+data_request);
+ }
+}
+?>
\ No newline at end of file
diff --git a/application/index/view/default/config.json b/application/index/view/default/config.json
index 7519b5fad..7a8f5589a 100755
--- a/application/index/view/default/config.json
+++ b/application/index/view/default/config.json
@@ -1,6 +1,6 @@
{
"name":"默认主题",
- "ver":"2.0.1",
+ "ver":"2.0.2",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
diff --git a/application/lang/zh-cn.php b/application/lang/zh-cn.php
index 874bfa435..40a8c50df 100755
--- a/application/lang/zh-cn.php
+++ b/application/lang/zh-cn.php
@@ -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'],
],
// 用户注册类型列表
diff --git a/application/service/SearchService.php b/application/service/SearchService.php
index ec62854fa..6b2905da3 100755
--- a/application/service/SearchService.php
+++ b/application/service/SearchService.php
@@ -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.'%'];
}
}
diff --git a/application/service/SystemBaseService.php b/application/service/SystemBaseService.php
index d545886fd..066547f7e 100644
--- a/application/service/SystemBaseService.php
+++ b/application/service/SystemBaseService.php
@@ -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
diff --git a/application/tags.php b/application/tags.php
index ef46e24cc..73875f755 100755
--- a/application/tags.php
+++ b/application/tags.php
@@ -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
diff --git a/changelog.txt b/changelog.txt
index 53a0a7e84..45f86fcb6 100755
--- a/changelog.txt
+++ b/changelog.txt
@@ -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端主题、小程序主题支持在线安装更新
diff --git a/extend/payment/QQ.php b/extend/payment/QQ.php
index 6191f1cb5..5c26ea49a 100644
--- a/extend/payment/QQ.php
+++ b/extend/payment/QQ.php
@@ -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_appid'],
'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'],
diff --git a/extend/payment/Weixin.php b/extend/payment/Weixin.php
index f32424304..30f659009 100755
--- a/extend/payment/Weixin.php
+++ b/extend/payment/Weixin.php
@@ -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 = [
diff --git a/public/core.php b/public/core.php
index 96b8e02f7..eedaf9a4a 100755
--- a/public/core.php
+++ b/public/core.php
@@ -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', '/');
diff --git a/sourcecode/alipay/default/config.json b/sourcecode/alipay/default/config.json
index 7519b5fad..7a8f5589a 100755
--- a/sourcecode/alipay/default/config.json
+++ b/sourcecode/alipay/default/config.json
@@ -1,6 +1,6 @@
{
"name":"默认主题",
- "ver":"2.0.1",
+ "ver":"2.0.2",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
diff --git a/sourcecode/baidu/default/config.json b/sourcecode/baidu/default/config.json
index 7519b5fad..7a8f5589a 100644
--- a/sourcecode/baidu/default/config.json
+++ b/sourcecode/baidu/default/config.json
@@ -1,6 +1,6 @@
{
"name":"默认主题",
- "ver":"2.0.1",
+ "ver":"2.0.2",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
diff --git a/sourcecode/qq/default/config.json b/sourcecode/qq/default/config.json
index 7519b5fad..7a8f5589a 100644
--- a/sourcecode/qq/default/config.json
+++ b/sourcecode/qq/default/config.json
@@ -1,6 +1,6 @@
{
"name":"默认主题",
- "ver":"2.0.1",
+ "ver":"2.0.2",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/default/config.json b/sourcecode/toutiao/default/config.json
index 7519b5fad..7a8f5589a 100644
--- a/sourcecode/toutiao/default/config.json
+++ b/sourcecode/toutiao/default/config.json
@@ -1,6 +1,6 @@
{
"name":"默认主题",
- "ver":"2.0.1",
+ "ver":"2.0.2",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/config.json b/sourcecode/weixin/default/config.json
index 7519b5fad..7a8f5589a 100755
--- a/sourcecode/weixin/default/config.json
+++ b/sourcecode/weixin/default/config.json
@@ -1,6 +1,6 @@
{
"name":"默认主题",
- "ver":"2.0.1",
+ "ver":"2.0.2",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file