From c9101208c3051f4cff23cbe891d8cc441d0dcc6a Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 8 Apr 2024 08:42:25 +0800 Subject: [PATCH] 1 --- addons/shopro/controller/third/Wechat.php | 3 +++ addons/shopro/listener/Commission.php | 3 ++- addons/shopro/service/CommissionScoreLog.php | 11 ++++++----- application/admin/model/Admin.php | 2 +- application/database.php | 2 +- .../NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc | 1 - .../TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ | 1 + 7 files changed, 14 insertions(+), 9 deletions(-) delete mode 100755 public/.well-known/acme-challenge/NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc create mode 100644 public/.well-known/acme-challenge/TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ diff --git a/addons/shopro/controller/third/Wechat.php b/addons/shopro/controller/third/Wechat.php index 387ef7a..dbef0bc 100755 --- a/addons/shopro/controller/third/Wechat.php +++ b/addons/shopro/controller/third/Wechat.php @@ -36,6 +36,9 @@ class Wechat extends Common // 微信登陆(小程序+公众号+开放平台) public function login() { + $shareInfo = $this->request->param('shareInfo'); + $shareInfo = htmlspecialchars_decode($shareInfo); + \think\Log::info('分享参数:'.$shareInfo); $result = Db::transaction(function () { return $this->wechat->login(); }); diff --git a/addons/shopro/listener/Commission.php b/addons/shopro/listener/Commission.php index 5dbcb59..e2051ee 100755 --- a/addons/shopro/listener/Commission.php +++ b/addons/shopro/listener/Commission.php @@ -21,7 +21,8 @@ class Commission { // $shareInfo = request()->param('shareInfo/a'); $shareInfo = request()->param('shareInfo'); - \think\Log::info('分享参数:'.$shareInfo['shareId']); + $shareInfo = json_decode(htmlspecialchars_decode($shareInfo), true); + //\think\Log::info('分享参数:'.$shareInfo['shareId']); if ($shareInfo) { // 注册后添加分享信息 diff --git a/addons/shopro/service/CommissionScoreLog.php b/addons/shopro/service/CommissionScoreLog.php index 4bdebb5..ebeee32 100644 --- a/addons/shopro/service/CommissionScoreLog.php +++ b/addons/shopro/service/CommissionScoreLog.php @@ -103,7 +103,7 @@ class CommissionScoreLog return true; } - //1.非用户角色下单立即反积分 并且给公司账户返积分 + //1.非用户角色下单立即反积分 if ($initLevel > self::LEVEL_1 && $currentCommissionLevel == 1) { $amount = bcsub($order['goods_price'], $current_level_price, 2); //算积分 @@ -144,8 +144,9 @@ class CommissionScoreLog //4.向上反佣金 if ($parentLevel > $currentLevel) { $amount = bcsub($current_level_price, $parent_level_price, 2); - //如果当前当前用户等级是会员 按原价算 - if($currentLevel == self::LEVEL_2) { + //5.如果初始用户等级普通用户 上级是会员 会员上级按原价算 +// if($currentLevel == self::LEVEL_2) { + if($initLevel == self::LEVEL_1 && $sonLevel == self::LEVEL_2) { $amount = bcsub($order['goods_price'], $parent_level_price, 2); } \think\Log::info('上级商品价格'.$parent_level_price); @@ -158,7 +159,7 @@ class CommissionScoreLog } } - //5.用户的上上级是高级 算团队2% 并给公司账户加钱 + //6.用户的上上级是高级 算团队2% 并给公司账户加钱 if ($parentLevel == self::LEVEL_5 && $currentLevel == self::LEVEL_5 && $level5<2) { if ($level5 == 0) { @@ -181,7 +182,7 @@ class CommissionScoreLog } } else { - //6.只有最后一级是高级时反公司积分 + //7.只有最后一级是高级时反公司积分 if ($currentLevel == self::LEVEL_5 && $sonLevel != self::LEVEL_5 && $currentCommissionLevel > 1) { $this->calcCompany($current_level_price, $company_level_price); } diff --git a/application/admin/model/Admin.php b/application/admin/model/Admin.php index f5ecd54..b94de46 100755 --- a/application/admin/model/Admin.php +++ b/application/admin/model/Admin.php @@ -8,7 +8,7 @@ use think\Session; class Admin extends Model { - protected $name = 'user'; + protected $name = 'admin'; // 开启自动写入时间戳字段 protected $autoWriteTimestamp = 'int'; // 定义时间戳字段名 diff --git a/application/database.php b/application/database.php index 36b4655..a73c5d5 100755 --- a/application/database.php +++ b/application/database.php @@ -34,7 +34,7 @@ return [ // 数据库表前缀 'prefix' => Env::get('database.prefix', 'heshui_'), // 数据库调试模式 - 'debug' => Env::get('database.debug', false), + 'debug' => Env::get('database.debug', true), // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 'deploy' => 0, // 数据库读写是否分离 主从式有效 diff --git a/public/.well-known/acme-challenge/NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc b/public/.well-known/acme-challenge/NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc deleted file mode 100755 index 85802ab..0000000 --- a/public/.well-known/acme-challenge/NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc +++ /dev/null @@ -1 +0,0 @@ -NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc.r0j_tUmcVSaqou_w_dSej5bM6cKZ1-8c0P-aHTDMU_0 \ No newline at end of file diff --git a/public/.well-known/acme-challenge/TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ b/public/.well-known/acme-challenge/TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ new file mode 100644 index 0000000..6ecc0de --- /dev/null +++ b/public/.well-known/acme-challenge/TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ @@ -0,0 +1 @@ +TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ.r0j_tUmcVSaqou_w_dSej5bM6cKZ1-8c0P-aHTDMU_0 \ No newline at end of file