Переглянути джерело

【程序目录】更新开源v5.2.2版本

evoxwht 2 роки тому
батько
коміт
e89a3b96bb
100 змінених файлів з 386 додано та 336 видалено
  1. 2 2
      crmeb/.version
  2. 5 21
      crmeb/app/AppService.php
  3. 5 5
      crmeb/app/ExceptionHandle.php
  4. 21 22
      crmeb/app/Request.php
  5. 17 20
      crmeb/app/adminapi/AdminApiExceptionHandle.php
  6. 10 12
      crmeb/app/adminapi/common.php
  7. 4 4
      crmeb/app/adminapi/controller/AuthController.php
  8. 23 23
      crmeb/app/adminapi/controller/Common.php
  9. 3 3
      crmeb/app/adminapi/controller/Login.php
  10. 6 16
      crmeb/app/adminapi/controller/PublicController.php
  11. 4 0
      crmeb/app/adminapi/controller/UpgradeController.php
  12. 1 1
      crmeb/app/adminapi/controller/v1/agent/AgentManage.php
  13. 0 6
      crmeb/app/adminapi/controller/v1/freight/Express.php
  14. 1 0
      crmeb/app/adminapi/controller/v1/order/StoreOrder.php
  15. 1 0
      crmeb/app/adminapi/controller/v1/setting/SystemRoute.php
  16. 1 1
      crmeb/app/adminapi/provider.php
  17. 1 2
      crmeb/app/adminapi/validate/merchant/SystemStoreValidate.php
  18. 1 1
      crmeb/app/api/controller/pc/ProductController.php
  19. 1 1
      crmeb/app/api/controller/v1/PublicController.php
  20. 1 1
      crmeb/app/model/activity/lottery/LuckLotteryRecord.php
  21. 10 0
      crmeb/app/model/system/SystemRoute.php
  22. 2 2
      crmeb/app/provider.php
  23. 1 1
      crmeb/app/service.php
  24. 2 7
      crmeb/app/services/activity/lottery/LuckLotteryRecordServices.php
  25. 1 1
      crmeb/app/services/agent/DivisionServices.php
  26. 4 8
      crmeb/app/services/message/NoticeService.php
  27. 5 9
      crmeb/app/services/message/notice/WechatTemplateListService.php
  28. 3 2
      crmeb/app/services/order/StoreOrderRefundServices.php
  29. 5 4
      crmeb/app/services/order/StoreOrderServices.php
  30. 1 1
      crmeb/app/services/pay/OrderPayServices.php
  31. 1 1
      crmeb/app/services/pc/HomeServices.php
  32. 1 1
      crmeb/app/services/pc/ProductServices.php
  33. 1 1
      crmeb/app/services/product/product/StoreProductServices.php
  34. 2 2
      crmeb/app/services/shipping/ExpressServices.php
  35. 55 14
      crmeb/app/services/system/SystemClearServices.php
  36. 1 1
      crmeb/app/services/system/SystemRouteServices.php
  37. 7 4
      crmeb/app/services/system/admin/SystemAdminServices.php
  38. 47 10
      crmeb/app/services/system/config/SystemConfigServices.php
  39. 30 64
      crmeb/app/services/system/log/SystemFileInfoServices.php
  40. 8 7
      crmeb/app/services/system/log/SystemFileServices.php
  41. 1 0
      crmeb/app/services/user/LoginServices.php
  42. 1 1
      crmeb/app/services/user/UserExtractServices.php
  43. 1 1
      crmeb/app/services/wechat/WechatQrcodeServices.php
  44. 54 19
      crmeb/crmeb/command/Util.php
  45. 1 1
      crmeb/crmeb/services/AliPayService.php
  46. 0 3
      crmeb/crmeb/services/app/MiniProgramService.php
  47. 1 1
      crmeb/crmeb/services/upload/storage/Qiniu.php
  48. 1 1
      crmeb/public/admin/index.html
  49. 1 0
      crmeb/public/admin/system_static/css/app.0ee7d88c.css
  50. 0 1
      crmeb/public/admin/system_static/css/app.9806600e.css
  51. 1 0
      crmeb/public/admin/system_static/css/chunk-0441c5de.9dfdc9a6.css
  52. 1 1
      crmeb/public/admin/system_static/css/chunk-6d06de8a.1c35f548.css
  53. 1 0
      crmeb/public/admin/system_static/css/chunk-05144782.ee3cb7bf.css
  54. 1 0
      crmeb/public/admin/system_static/css/chunk-05350300.84922742.css
  55. 0 1
      crmeb/public/admin/system_static/css/chunk-061b084e.cd13fc3d.css
  56. 0 1
      crmeb/public/admin/system_static/css/chunk-071887cb.68de37ff.css
  57. 0 1
      crmeb/public/admin/system_static/css/chunk-081c9142.78c3202d.css
  58. 1 0
      crmeb/public/admin/system_static/css/chunk-08c6a66a.950a799d.css
  59. 1 0
      crmeb/public/admin/system_static/css/chunk-09e1de10.3544555a.css
  60. 1 0
      crmeb/public/admin/system_static/css/chunk-0d15b554.f4b06bfc.css
  61. 1 0
      crmeb/public/admin/system_static/css/chunk-0f2eff24.89052f8a.css
  62. 0 1
      crmeb/public/admin/system_static/css/chunk-0f31d873.267957b0.css
  63. 1 0
      crmeb/public/admin/system_static/css/chunk-0f7cd2d5.b559bb70.css
  64. 1 1
      crmeb/public/admin/system_static/css/chunk-3fcef210.e6fc8c53.css
  65. 1 0
      crmeb/public/admin/system_static/css/chunk-122806b2.adf19434.css
  66. 0 1
      crmeb/public/admin/system_static/css/chunk-1334fe21.4d8bf09c.css
  67. 0 1
      crmeb/public/admin/system_static/css/chunk-15f7d94c.77da8061.css
  68. 1 0
      crmeb/public/admin/system_static/css/chunk-1be532f1.85cd61ce.css
  69. 1 0
      crmeb/public/admin/system_static/css/chunk-1bfe63a9.ae7af909.css
  70. 1 1
      crmeb/public/admin/system_static/css/chunk-df752094.13e3c004.css
  71. 1 1
      crmeb/public/admin/system_static/css/chunk-3d880a35.b45b6815.css
  72. 1 1
      crmeb/public/admin/system_static/css/chunk-51ddb0a2.67b981f9.css
  73. 0 1
      crmeb/public/admin/system_static/css/chunk-1f0eae17.b9b68614.css
  74. 1 0
      crmeb/public/admin/system_static/css/chunk-203ac582.015eb7a4.css
  75. 1 1
      crmeb/public/admin/system_static/css/chunk-68324a74.b703c32f.css
  76. 0 1
      crmeb/public/admin/system_static/css/chunk-24f136a9.a5c9a08e.css
  77. 1 0
      crmeb/public/admin/system_static/css/chunk-2659c75c.ea365e7f.css
  78. 1 0
      crmeb/public/admin/system_static/css/chunk-28a52e3a.1ead9aed.css
  79. 0 1
      crmeb/public/admin/system_static/css/chunk-29275e57.2405dfe1.css
  80. 1 1
      crmeb/public/admin/system_static/css/chunk-09b16939.e8ee1a02.css
  81. 0 1
      crmeb/public/admin/system_static/css/chunk-2b871724.22a2443d.css
  82. 0 1
      crmeb/public/admin/system_static/css/chunk-2f85dde8.2dc79992.css
  83. 0 1
      crmeb/public/admin/system_static/css/chunk-30857213.316d11d3.css
  84. 1 0
      crmeb/public/admin/system_static/css/chunk-336cef99.df712523.css
  85. 1 0
      crmeb/public/admin/system_static/css/chunk-34df47f1.65cdc85e.css
  86. 0 1
      crmeb/public/admin/system_static/css/chunk-35062175.09870511.css
  87. 1 0
      crmeb/public/admin/system_static/css/chunk-36a0bc14.49f2cb42.css
  88. 0 0
      crmeb/public/admin/system_static/css/chunk-3725f2c3.687c9aa5.css
  89. 0 1
      crmeb/public/admin/system_static/css/chunk-37d51f92.3bb1af7d.css
  90. 1 1
      crmeb/public/admin/system_static/css/chunk-55fcbf36.229444fd.css
  91. 1 0
      crmeb/public/admin/system_static/css/chunk-3b540e7d.4838aec1.css
  92. 0 1
      crmeb/public/admin/system_static/css/chunk-3c3e2944.0f3c5d8f.css
  93. 0 1
      crmeb/public/admin/system_static/css/chunk-3eccb15d.56ab1092.css
  94. 1 0
      crmeb/public/admin/system_static/css/chunk-3f50d1a4.516fee41.css
  95. 0 1
      crmeb/public/admin/system_static/css/chunk-3fdb3472.6d46767b.css
  96. 0 1
      crmeb/public/admin/system_static/css/chunk-41a8136e.867c88b3.css
  97. 1 0
      crmeb/public/admin/system_static/css/chunk-430ad2ac.4533e8aa.css
  98. 1 0
      crmeb/public/admin/system_static/css/chunk-43e98519.eac902cb.css
  99. 1 1
      crmeb/public/admin/system_static/css/chunk-681859a5.af22a330.css
  100. 0 0
      crmeb/public/admin/system_static/css/chunk-464b7017.6c9f67f5.css

+ 2 - 2
crmeb/.version

@@ -1,5 +1,5 @@
-version=CRMEB-KY v5.2.1
-version_code=521
+version=CRMEB-KY v5.2.2
+version_code=522
 platform=gitee
 platform=gitee
 app_id=ze7x9rxsv09l6pvsyo
 app_id=ze7x9rxsv09l6pvsyo
 app_key=fuF7U9zaybLa5gageVQzxtxQMFnvU2OI
 app_key=fuF7U9zaybLa5gageVQzxtxQMFnvU2OI

+ 5 - 21
crmeb/app/AppService.php

@@ -15,33 +15,17 @@ use crmeb\services\GroupDataService;
 use crmeb\utils\Json;
 use crmeb\utils\Json;
 use think\Service;
 use think\Service;
 
 
-
-/**
- * AppService类
- * 
- * @package App\Services
- */
 class AppService extends Service
 class AppService extends Service
 {
 {
 
 
-    /**
-     * 定义服务绑定
-     *
-     * @var array
-     */
     public $bind = [
     public $bind = [
-        'json' => Json::class, // JSON服务绑定
-        'sysConfig' => SystemConfigService::class, // 系统配置服务绑定
-        'sysGroupData' => GroupDataService::class // 分组数据服务绑定
+        'json' => Json::class,
+        'sysConfig' => SystemConfigService::class,
+        'sysGroupData' => GroupDataService::class
     ];
     ];
-    /** 
-     * 服务启动时的操作
-     *
-     * @return void
-     */
+
     public function boot()
     public function boot()
     {
     {
-        defined('DS') || define('DS', DIRECTORY_SEPARATOR); // 定义目录分隔符常量
+        defined('DS') || define('DS', DIRECTORY_SEPARATOR);
     }
     }
 }
 }
-

+ 5 - 5
crmeb/app/ExceptionHandle.php

@@ -30,11 +30,11 @@ class ExceptionHandle extends Handle
      * @var array
      * @var array
      */
      */
     protected $ignoreReport = [
     protected $ignoreReport = [
-        HttpException::class,//HTTP异常
-        HttpResponseException::class,//http响应异常
-        ModelNotFoundException::class,//模型没找到异常
-        DataNotFoundException::class,//数据没找到异常
-        ValidateException::class,//验证器异常 
+        HttpException::class,
+        HttpResponseException::class,
+        ModelNotFoundException::class,
+        DataNotFoundException::class,
+        ValidateException::class,
     ];
     ];
 
 
     /**
     /**

+ 21 - 22
crmeb/app/Request.php

@@ -27,7 +27,7 @@ use Spatie\Macroable\Macroable;
  */
  */
 class Request extends \think\Request
 class Request extends \think\Request
 {
 {
-    use Macroable;// 允许注入公共方法 
+    use Macroable;
 
 
     /**
     /**
      * 不过滤变量名
      * 不过滤变量名
@@ -45,31 +45,30 @@ class Request extends \think\Request
      */
      */
     public function more(array $params, bool $suffix = false, bool $filter = true): array
     public function more(array $params, bool $suffix = false, bool $filter = true): array
     {
     {
-        $p = []; // 初始化一个空数组
-        $i = 0; // 初始化计数器
-        foreach ($params as $param) { // 遍历参数数组
-            if (!is_array($param)) { // 如果当前元素不是数组
+        $p = [];
+        $i = 0;
+        foreach ($params as $param) {
+            if (!is_array($param)) {
                 $p[$suffix == true ? $i++ : $param] = $this->filterWord(is_string($this->param($param)) ? trim($this->param($param)) : $this->param($param), $filter && !in_array($param, $this->except));
                 $p[$suffix == true ? $i++ : $param] = $this->filterWord(is_string($this->param($param)) ? trim($this->param($param)) : $this->param($param), $filter && !in_array($param, $this->except));
-            } else { // 如果当前元素是数组
-                if (!isset($param[1])) $param[1] = null; // 如果第二个元素不存在则设置为null
-                if (!isset($param[2])) $param[2] = ''; // 如果第三个元素不存在则设置为空字符串
-                if (is_array($param[0])) { // 如果第一个元素也是数组
-                    $name = is_array($param[1]) ? $param[0][0] . '/a' : $param[0][0] . '/' . $param[0][1]; // 根据第二个元素是否为数组来构造参数名
-                    $keyName = $param[0][0]; // 参数名作为键名
-                } else { // 如果当前元素是数组
-                        $name = is_array($param[1]) ? $param[0] . '/a' : $param[0]; // 根据第二个元素是否为数组来构造参数名
-                        $keyName = $param[0]; // 参数名作为键名
+            } else {
+                if (!isset($param[1])) $param[1] = null;
+                if (!isset($param[2])) $param[2] = '';
+                if (is_array($param[0])) {
+                    $name = is_array($param[1]) ? $param[0][0] . '/a' : $param[0][0] . '/' . $param[0][1];
+                    $keyName = $param[0][0];
+                } else {
+                    $name = is_array($param[1]) ? $param[0] . '/a' : $param[0];
+                    $keyName = $param[0];
                 }
                 }
-                // 获取当前元素的值并存入新数组 
-                $p[$suffix == true ? $i++ : ($param[3] ?? $keyName)] = $this->filterWord( // 对当前元素进行过滤并存入新数组
-                    is_string($this->param($name, $param[1], $param[2])) ? // 获取当前元素的值并去除首尾空格
-                                trim($this->param($name, $param[1], $param[2])) :
-                                $this->param($name, $param[1], $param[2]),
-                            $filter && !in_array($keyName, $this->except));
+
+                $p[$suffix == true ? $i++ : ($param[3] ?? $keyName)] = $this->filterWord(
+                    is_string($this->param($name, $param[1], $param[2])) ?
+                        trim($this->param($name, $param[1], $param[2])) :
+                        $this->param($name, $param[1], $param[2]),
+                    $filter && !in_array($keyName, $this->except));
             }
             }
         }
         }
         return $p;
         return $p;
-
     }
     }
 
 
     /**
     /**
@@ -93,7 +92,7 @@ class Request extends \think\Request
                 if (is_array($v)) {
                 if (is_array($v)) {
                     foreach ($v as &$vv) {
                     foreach ($v as &$vv) {
                         if (!is_array($vv)) {
                         if (!is_array($vv)) {
-                            $vv = $this->replaceWord($farr, $vv);// 替换特殊字符  
+                            $vv = $this->replaceWord($farr, $vv);
                         }
                         }
                     }
                     }
                 } else {
                 } else {

+ 17 - 20
crmeb/app/adminapi/AdminApiExceptionHandle.php

@@ -31,11 +31,10 @@ class AdminApiExceptionHandle extends Handle
      * @var array
      * @var array
      */
      */
     protected $ignoreReport = [
     protected $ignoreReport = [
-        ValidateException::class,//验证错误
-        DbException::class,//数据库错误
-        AuthException::class,//权限错误
-        AdminException::class,//后台错误
-        ApiException::class,//接口错误
+        ValidateException::class,
+        AuthException::class,
+        AdminException::class,
+        ApiException::class,
     ];
     ];
 
 
     /**
     /**
@@ -49,10 +48,10 @@ class AdminApiExceptionHandle extends Handle
         if (!$this->isIgnoreReport($exception)) {
         if (!$this->isIgnoreReport($exception)) {
             try {
             try {
                 $data = [
                 $data = [
-                    'file' => $exception->getFile(),//文件
-                    'line' => $exception->getLine(),//行数
-                    'message' => $this->getMessage($exception),//错误信息
-                    'code' => $this->getCode($exception),//错误码
+                    'file' => $exception->getFile(),
+                    'line' => $exception->getLine(),
+                    'message' => $this->getMessage($exception),
+                    'code' => $this->getCode($exception),
                 ];
                 ];
 
 
                 //日志内容
                 //日志内容
@@ -67,9 +66,9 @@ class AdminApiExceptionHandle extends Handle
                     json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),             //报错数据
                     json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),             //报错数据
 
 
                 ];
                 ];
-                Log::write(implode("|", $log), "error");//记录日志
+                Log::write(implode("|", $log), "error");
             } catch (\Throwable $e) {
             } catch (\Throwable $e) {
-                Log::write($e->getMessage(), "error");//记录日志
+                Log::write($e->getMessage(), "error");
             }
             }
         }
         }
     }
     }
@@ -83,24 +82,22 @@ class AdminApiExceptionHandle extends Handle
      */
      */
     public function render($request, Throwable $e): Response
     public function render($request, Throwable $e): Response
     {
     {
-        // 如果是响应异常,直接返回
         if ($e instanceof HttpResponseException) {
         if ($e instanceof HttpResponseException) {
-            return parent::render($request, $e);//直接返回
+            return parent::render($request, $e);
         }
         }
-        // 调试模式下返回异常信息
         $massageData = Env::get('app_debug', false) ? [
         $massageData = Env::get('app_debug', false) ? [
-            'message' => $e->getMessage(),//错误信息
-            'file' => $e->getFile(),//文件
-            'line' => $e->getLine(),//行数
-            'trace' => $e->getTrace(),// 异常的追踪
-            'previous' => $e->getPrevious(),// 异常的上一个异常
+            'message' => $e->getMessage(),
+            'file' => $e->getFile(),
+            'line' => $e->getLine(),
+            'trace' => $e->getTrace(),
+            'previous' => $e->getPrevious(),
         ] : [];
         ] : [];
         $message = $e->getMessage();
         $message = $e->getMessage();
         // 添加自定义异常处理机制
         // 添加自定义异常处理机制
         if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) {
         if ($e instanceof AuthException || $e instanceof AdminException || $e instanceof ApiException || $e instanceof ValidateException) {
             return app('json')->make($e->getCode() ?: 400, $message, $massageData);
             return app('json')->make($e->getCode() ?: 400, $message, $massageData);
         } else {
         } else {
-            return app('json')->fail($message, $massageData);//返回错误信息
+            return app('json')->fail($message, $massageData);
         }
         }
     }
     }
 
 

+ 10 - 12
crmeb/app/adminapi/common.php

@@ -16,11 +16,9 @@ if (!function_exists('get_this_class_methods')) {
      */
      */
     function get_this_class_methods($class, $unarray = [])
     function get_this_class_methods($class, $unarray = [])
     {
     {
-        $arrayall = get_class_methods($class);//获取当前类的方法
-        $parent_class = get_parent_class($class);//获取父类
-        //如果有父类
-        if ($parent_class) {
-            $arrayparent = get_class_methods($parent_class);//获取父类的方法
+        $arrayall = get_class_methods($class);
+        if ($parent_class = get_parent_class($class)) {
+            $arrayparent = get_class_methods($parent_class);
             $arraynow = array_diff($arrayall, $arrayparent);//去除父级的
             $arraynow = array_diff($arrayall, $arrayparent);//去除父级的
         } else {
         } else {
             $arraynow = $arrayall;
             $arraynow = $arrayall;
@@ -51,7 +49,7 @@ if (!function_exists('setconfig')) {
                 $pats[$i] = '/\'' . $pat[$i] . '\'(.*?),/';
                 $pats[$i] = '/\'' . $pat[$i] . '\'(.*?),/';
                 $reps[$i] = "'" . $pat[$i] . "'" . "=>" . "'" . $rep[$i] . "',";
                 $reps[$i] = "'" . $pat[$i] . "'" . "=>" . "'" . $rep[$i] . "',";
             }
             }
-            $fileurl = app()->getConfigPath() . $name . ".php";//配置文件路径
+            $fileurl = app()->getConfigPath() . $name . ".php";
             $string = file_get_contents($fileurl); //加载配置文件
             $string = file_get_contents($fileurl); //加载配置文件
             $string = preg_replace($pats, $reps, $string); // 正则查找然后替换
             $string = preg_replace($pats, $reps, $string); // 正则查找然后替换
             @file_put_contents($fileurl, $string); // 写入配置文件
             @file_put_contents($fileurl, $string); // 写入配置文件
@@ -64,7 +62,7 @@ if (!function_exists('setconfig')) {
                 $rep = str_replace('\'', "", $rep);
                 $rep = str_replace('\'', "", $rep);
                 $reps = "'" . $pat . "'" . "=>" . "'" . $rep . "',";
                 $reps = "'" . $pat . "'" . "=>" . "'" . $rep . "',";
             }
             }
-            $fileurl = app()->getConfigPath() . $name . ".php";//配置文件路径
+            $fileurl = app()->getConfigPath() . $name . ".php";
             $string = file_get_contents($fileurl); //加载配置文件
             $string = file_get_contents($fileurl); //加载配置文件
             $string = preg_replace($pats, $reps, $string); // 正则查找然后替换
             $string = preg_replace($pats, $reps, $string); // 正则查找然后替换
             @file_put_contents($fileurl, $string); // 写入配置文件
             @file_put_contents($fileurl, $string); // 写入配置文件
@@ -77,7 +75,7 @@ if (!function_exists('setconfig')) {
 }
 }
 if (!function_exists('arrayToText')) {
 if (!function_exists('arrayToText')) {
     /**
     /**
-     * 将数组转成PHP文本
+     * 修改config的函数
      * @param $array
      * @param $array
      * @return string
      * @return string
      */
      */
@@ -116,8 +114,8 @@ if (!function_exists('attr_format')) {
      */
      */
     function attr_format($arr): array
     function attr_format($arr): array
     {
     {
-        $len = count($arr);//获取数组长度
-        $title = array_column($arr, 'value');//获取数组中的value值
+        $len = count($arr);
+        $title = array_column($arr, 'value');
         $result = [];
         $result = [];
 
 
         if ($len > 0) {
         if ($len > 0) {
@@ -151,8 +149,8 @@ if (!function_exists('verify_domain')) {
      */
      */
     function verify_domain(string $domain): bool
     function verify_domain(string $domain): bool
     {
     {
-        $res = "/^(?=^.{3,255}$)(http(s)?:\/\/)(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/";//正则验证
-        if (preg_match($res, $domain))//匹配正则
+        $res = "/^(?=^.{3,255}$)(http(s)?:\/\/)(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/";
+        if (preg_match($res, $domain))
             return true;
             return true;
         else
         else
             return false;
             return false;

+ 4 - 4
crmeb/app/adminapi/controller/AuthController.php

@@ -45,9 +45,9 @@ class AuthController extends BaseController
      */
      */
     protected function initialize()
     protected function initialize()
     {
     {
-        $this->adminId = $this->request->adminId();//获取当前登录管理员id
-        $this->adminInfo = $this->request->adminInfo();//获取当前登录管理员信息
-        $this->auth = $this->request->adminInfo['rule'] ?? [];//获取当前管理员权限
+        $this->adminId = $this->request->adminId();
+        $this->adminInfo = $this->request->adminInfo();
+        $this->auth = $this->request->adminInfo['rule'] ?? [];
     }
     }
 
 
     /**
     /**
@@ -78,7 +78,7 @@ class AuthController extends BaseController
                 $v->scene($message);
                 $v->scene($message);
             }
             }
         }
         }
-        
+
         if (is_array($message))
         if (is_array($message))
             $v->message($message);
             $v->message($message);
 
 

+ 23 - 23
crmeb/app/adminapi/controller/Common.php

@@ -37,9 +37,9 @@ class Common extends AuthController
     public function getLogo()
     public function getLogo()
     {
     {
         return app('json')->success([
         return app('json')->success([
-            'logo' => sys_config('site_logo'),//站点LOGO
-            'logo_square' => sys_config('site_logo_square'),//图标
-            'site_name' => sys_config('site_name')//站点名称
+            'logo' => sys_config('site_logo'),
+            'logo_square' => sys_config('site_logo_square'),
+            'site_name' => sys_config('site_name')
         ]);
         ]);
     }
     }
 
 
@@ -49,8 +49,8 @@ class Common extends AuthController
      */
      */
     public function auth()
     public function auth()
     {
     {
-        $version = get_crmeb_version();//当前版本号
-        $host = $this->request->host();//当前域名
+        $version = get_crmeb_version();
+        $host = $this->request->host();
         // 正常域名
         // 正常域名
         $res = HttpService::request('http://authorize.crmeb.net/api/auth_cert_query', 'post', [
         $res = HttpService::request('http://authorize.crmeb.net/api/auth_cert_query', 'post', [
             'domain_name' => $host,
             'domain_name' => $host,
@@ -159,8 +159,8 @@ class Common extends AuthController
     public function homeStatics()
     public function homeStatics()
     {
     {
         /** @var StoreOrderServices $orderServices */
         /** @var StoreOrderServices $orderServices */
-        $orderServices = app()->make(StoreOrderServices::class);//订单服务
-        $info = $orderServices->homeStatics();//订单统计
+        $orderServices = app()->make(StoreOrderServices::class);
+        $info = $orderServices->homeStatics();
         return app('json')->success(compact('info'));
         return app('json')->success(compact('info'));
     }
     }
 
 
@@ -170,7 +170,7 @@ class Common extends AuthController
         if ($lastValue == 0 && $nowValue == 0) return 0;
         if ($lastValue == 0 && $nowValue == 0) return 0;
         if ($lastValue == 0) return round($nowValue, 2);
         if ($lastValue == 0) return round($nowValue, 2);
         if ($nowValue == 0) return -round($lastValue, 2);
         if ($nowValue == 0) return -round($lastValue, 2);
-        return bcmul(bcdiv((bcsub($nowValue, $lastValue, 2)), $lastValue, 2), 100, 2);//保留两位小数
+        return bcmul(bcdiv((bcsub($nowValue, $lastValue, 2)), $lastValue, 2), 100, 2);
     }
     }
 
 
     /**
     /**
@@ -180,8 +180,8 @@ class Common extends AuthController
     {
     {
         $cycle = $this->request->param('cycle') ?: 'thirtyday';//默认30天
         $cycle = $this->request->param('cycle') ?: 'thirtyday';//默认30天
         /** @var StoreOrderServices $orderServices */
         /** @var StoreOrderServices $orderServices */
-        $orderServices = app()->make(StoreOrderServices::class);//订单服务
-        $chartdata = $orderServices->orderCharts($cycle);//订单统计
+        $orderServices = app()->make(StoreOrderServices::class);
+        $chartdata = $orderServices->orderCharts($cycle);
         return app('json')->success($chartdata);
         return app('json')->success($chartdata);
     }
     }
 
 
@@ -215,22 +215,22 @@ class Common extends AuthController
     public function jnotice()
     public function jnotice()
     {
     {
         /** @var StoreOrderServices $orderServices */
         /** @var StoreOrderServices $orderServices */
-        $orderServices = app()->make(StoreOrderServices::class);//订单服务
-        $data['ordernum'] = $orderServices->storeOrderCount();//待发货
+        $orderServices = app()->make(StoreOrderServices::class);
+        $data['ordernum'] = $orderServices->storeOrderCount();
         $store_stock = sys_config('store_stock');
         $store_stock = sys_config('store_stock');
         if ($store_stock < 0) $store_stock = 2;
         if ($store_stock < 0) $store_stock = 2;
         /** @var StoreProductServices $storeServices */
         /** @var StoreProductServices $storeServices */
-        $storeServices = app()->make(StoreProductServices::class);//商品服务
+        $storeServices = app()->make(StoreProductServices::class);
         $data['inventory'] = $storeServices->count(['type' => 5, 'store_stock' => $store_stock]);//警戒库存
         $data['inventory'] = $storeServices->count(['type' => 5, 'store_stock' => $store_stock]);//警戒库存
         /** @var StoreProductReplyServices $replyServices */
         /** @var StoreProductReplyServices $replyServices */
-        $replyServices = app()->make(StoreProductReplyServices::class);//商品评价
-        $data['commentnum'] = $replyServices->replyCount();//评价
+        $replyServices = app()->make(StoreProductReplyServices::class);
+        $data['commentnum'] = $replyServices->replyCount();
         /** @var UserExtractServices $extractServices */
         /** @var UserExtractServices $extractServices */
-        $extractServices = app()->make(UserExtractServices::class);//提现
+        $extractServices = app()->make(UserExtractServices::class);
         $data['reflectnum'] = $extractServices->userExtractCount();//提现
         $data['reflectnum'] = $extractServices->userExtractCount();//提现
         $data['msgcount'] = intval($data['ordernum']) + intval($data['inventory']) + intval($data['commentnum']) + intval($data['reflectnum']);
         $data['msgcount'] = intval($data['ordernum']) + intval($data['inventory']) + intval($data['commentnum']) + intval($data['reflectnum']);
         $data['newOrderId'] = $orderServices->newOrderId(1);
         $data['newOrderId'] = $orderServices->newOrderId(1);
-        if (count($data['newOrderId'])) $orderServices->newOrderUpdate($data['newOrderId']);//更新订单查看状态
+        if (count($data['newOrderId'])) $orderServices->newOrderUpdate($data['newOrderId']);
         $value = [];
         $value = [];
         if ($data['ordernum'] != 0) {
         if ($data['ordernum'] != 0) {
             $value[] = [
             $value[] = [
@@ -333,8 +333,8 @@ class Common extends AuthController
     public function menusList()
     public function menusList()
     {
     {
         /** @var SystemMenusServices $menusServices */
         /** @var SystemMenusServices $menusServices */
-        $menusServices = app()->make(SystemMenusServices::class);//菜单服务
-        $list = $menusServices->getSearchList();//获取菜单列表
+        $menusServices = app()->make(SystemMenusServices::class);
+        $list = $menusServices->getSearchList();
         $counts = $menusServices->getColumn([
         $counts = $menusServices->getColumn([
             ['is_show', '=', 1],
             ['is_show', '=', 1],
             ['auth_type', '=', 1],
             ['auth_type', '=', 1],
@@ -362,8 +362,8 @@ class Common extends AuthController
      */
      */
     public function copyright()
     public function copyright()
     {
     {
-        $copyrightContext = sys_config('nncnL_crmeb_copyright', '');//版权内容
-        $copyrightImage = sys_config('nncnL_crmeb_copyright_image', '');//版权图片
+        $copyrightContext = sys_config('nncnL_crmeb_copyright', '');
+        $copyrightImage = sys_config('nncnL_crmeb_copyright_image', '');
         return app('json')->success(compact('copyrightContext', 'copyrightImage'));
         return app('json')->success(compact('copyrightContext', 'copyrightImage'));
     }
     }
 
 
@@ -375,7 +375,7 @@ class Common extends AuthController
     {
     {
         [$copyright, $copyrightImg] = $this->request->postMore(['copyright', 'copyright_img',], true);
         [$copyright, $copyrightImg] = $this->request->postMore(['copyright', 'copyright_img',], true);
         /** @var SystemConfigServices $services */
         /** @var SystemConfigServices $services */
-        $services = app()->make(SystemConfigServices::class);//配置服务
+        $services = app()->make(SystemConfigServices::class);
         if ($services->count(['menu_name' => 'nncnL_crmeb_copyright'])) {
         if ($services->count(['menu_name' => 'nncnL_crmeb_copyright'])) {
             $services->update(['menu_name' => 'nncnL_crmeb_copyright'], ['value' => json_encode($copyright)]);
             $services->update(['menu_name' => 'nncnL_crmeb_copyright'], ['value' => json_encode($copyright)]);
         } else {
         } else {
@@ -402,7 +402,7 @@ class Common extends AuthController
                 'info' => ''
                 'info' => ''
             ]);
             ]);
         }
         }
-        CacheService::clear();//清除缓存
+        CacheService::clear();
         return app('json')->success(100000);
         return app('json')->success(100000);
     }
     }
 
 

+ 3 - 3
crmeb/app/adminapi/controller/Login.php

@@ -30,8 +30,8 @@ class Login extends AuthController
      */
      */
     public function __construct(App $app, SystemAdminServices $services)
     public function __construct(App $app, SystemAdminServices $services)
     {
     {
-        parent::__construct($app);//调用父类构造函数
-        $this->services = $services;//初始化services    注入services   系统管理员服务层 SystemAdminServices 
+        parent::__construct($app);
+        $this->services = $services;
     }
     }
 
 
     protected function initialize()
     protected function initialize()
@@ -45,7 +45,7 @@ class Login extends AuthController
      */
      */
     public function captcha()
     public function captcha()
     {
     {
-        return app()->make(Captcha::class)->create();//验证码 
+        return app()->make(Captcha::class)->create();
     }
     }
 
 
     /**
     /**

+ 6 - 16
crmeb/app/adminapi/controller/PublicController.php

@@ -18,9 +18,6 @@ use app\services\system\SystemRouteServices;
 use crmeb\services\CacheService;
 use crmeb\services\CacheService;
 use think\Response;
 use think\Response;
 
 
-/**
- * 公共控制器   
- */
 class PublicController
 class PublicController
 {
 {
 
 
@@ -32,13 +29,12 @@ class PublicController
     public function download(string $key = '')
     public function download(string $key = '')
     {
     {
         if (!$key) {
         if (!$key) {
-            return Response::create()->code(500);//参数错误 
+            return Response::create()->code(500);
         }
         }
-        $fileName = CacheService::get($key);//缓存中的文件路径
-        //判断文件是否存在  
+        $fileName = CacheService::get($key);
         if (is_array($fileName) && isset($fileName['path']) && isset($fileName['fileName']) && $fileName['path'] && $fileName['fileName'] && file_exists($fileName['path'])) {
         if (is_array($fileName) && isset($fileName['path']) && isset($fileName['fileName']) && $fileName['path'] && $fileName['fileName'] && file_exists($fileName['path'])) {
-            CacheService::delete($key);//删除缓存
-            return download($fileName['path'], $fileName['fileName']);//返回文件
+            CacheService::delete($key);
+            return download($fileName['path'], $fileName['fileName']);
         }
         }
         return Response::create()->code(500);
         return Response::create()->code(500);
     }
     }
@@ -49,7 +45,6 @@ class PublicController
      */
      */
     public function getWorkerManUrl()
     public function getWorkerManUrl()
     {
     {
-        //获取当前长链接域名
         return app('json')->success(getWorkerManUrl());
         return app('json')->success(getWorkerManUrl());
     }
     }
 
 
@@ -70,25 +65,20 @@ class PublicController
             ['uploadToken', ''],
             ['uploadToken', ''],
             ['pid', 0]
             ['pid', 0]
         ], true);
         ], true);
-        //附件服务
         $service = app()->make(SystemAttachmentServices::class);
         $service = app()->make(SystemAttachmentServices::class);
-        // 获取缓存中的上传令牌并与当前上传令牌比较
-        if (CacheService::get('scan_upload') != $uploadToken) { 
-            return app('json')->fail(410086); // 如果不一致则返回错误码410086
+        if (CacheService::get('scan_upload') != $uploadToken) {
+            return app('json')->fail(410086);
         }
         }
-        //上传文件
         $service->upload((int)$pid, $file, $upload_type, $type, '', $uploadToken);
         $service->upload((int)$pid, $file, $upload_type, $type, '', $uploadToken);
         return app('json')->success(100032);
         return app('json')->success(100032);
     }
     }
 
 
     public function import(Request $request)
     public function import(Request $request)
     {
     {
-        //获取文件路径
         $filePath = $request->param('file_path', '');
         $filePath = $request->param('file_path', '');
         if (empty($filePath)) {
         if (empty($filePath)) {
             return app('json')->fail(12894);
             return app('json')->fail(12894);
         }
         }
-        //导入数据
         app()->make(SystemRouteServices::class)->import($filePath);
         app()->make(SystemRouteServices::class)->import($filePath);
         return app('json')->success(100010);
         return app('json')->success(100010);
     }
     }

+ 4 - 0
crmeb/app/adminapi/controller/UpgradeController.php

@@ -1046,6 +1046,7 @@ class UpgradeController
      */
      */
     public function upgradeList()
     public function upgradeList()
     {
     {
+        return app('json')->success([]);
         return app('json')->success($this->services->getUpgradeList());
         return app('json')->success($this->services->getUpgradeList());
     }
     }
 
 
@@ -1055,6 +1056,7 @@ class UpgradeController
      */
      */
     public function upgradeableList()
     public function upgradeableList()
     {
     {
+        return app('json')->success([]);
         return app('json')->success($this->services->getUpgradeableList());
         return app('json')->success($this->services->getUpgradeableList());
     }
     }
 
 
@@ -1098,6 +1100,7 @@ class UpgradeController
      */
      */
     public function upgradeStatus()
     public function upgradeStatus()
     {
     {
+        return app('json')->success([]);
         $data = $this->services->getUpgradeStatus();
         $data = $this->services->getUpgradeStatus();
         return app('json')->success($data);
         return app('json')->success($data);
     }
     }
@@ -1110,6 +1113,7 @@ class UpgradeController
      */
      */
     public function upgradeLogList()
     public function upgradeLogList()
     {
     {
+        return app('json')->success([]);
         $data = $this->services->getUpgradeLogList();
         $data = $this->services->getUpgradeLogList();
         return app('json')->success($data);
         return app('json')->success($data);
     }
     }

+ 1 - 1
crmeb/app/adminapi/controller/v1/agent/AgentManage.php

@@ -228,7 +228,7 @@ class AgentManage extends AuthController
         $userInfo->spread_time = time();
         $userInfo->spread_time = time();
         $userInfo->division_id = $spreadInfo->division_id;
         $userInfo->division_id = $spreadInfo->division_id;
         $userInfo->agent_id = $spreadInfo->agent_id;
         $userInfo->agent_id = $spreadInfo->agent_id;
-        $userInfo->is_staff = $spreadInfo->is_staff;
+        $userInfo->staff_id = $spreadInfo->staff_id;
         $userInfo->save();
         $userInfo->save();
         return app('json')->success(100001);
         return app('json')->success(100001);
     }
     }

+ 0 - 6
crmeb/app/adminapi/controller/v1/freight/Express.php

@@ -103,12 +103,6 @@ class Express extends AuthController
             ['sort', 0],
             ['sort', 0],
             ['is_show', 0]]);
             ['is_show', 0]]);
         if (!$expressInfo = $this->services->get($id)) return app('json')->fail(100026);
         if (!$expressInfo = $this->services->get($id)) return app('json')->fail(100026);
-        if ($expressInfo['partner_id'] == 1 && !$data['account']) {
-            return app('json')->fail(400402);
-        }
-        if ($expressInfo['partner_key'] == 1 && !$data['key']) {
-            return app('json')->fail(400403);
-        }
         if ($expressInfo['net'] == 1 && !$data['net_name']) {
         if ($expressInfo['net'] == 1 && !$data['net_name']) {
             return app('json')->fail(400404);
             return app('json')->fail(400404);
         }
         }

+ 1 - 0
crmeb/app/adminapi/controller/v1/order/StoreOrder.php

@@ -188,6 +188,7 @@ class StoreOrder extends AuthController
             ['status', ''],
             ['status', ''],
         ], true);
         ], true);
         if ($status != '') $data['status'] = $status;
         if ($status != '') $data['status'] = $status;
+        if ($status == 'undefined') $data['status'] = 1;
         $data['is_show'] = 1;
         $data['is_show'] = 1;
         return app('json')->success($services->express($data));
         return app('json')->success($services->express($data));
     }
     }

+ 1 - 0
crmeb/app/adminapi/controller/v1/setting/SystemRoute.php

@@ -112,6 +112,7 @@ class SystemRoute extends AuthController
             ['request_example', []],
             ['request_example', []],
             ['response_example', []],
             ['response_example', []],
             ['describe', ''],
             ['describe', ''],
+            ['error_code', []],
         ]);
         ]);
 
 
 //        if (!$data['name']) {
 //        if (!$data['name']) {

+ 1 - 1
crmeb/app/adminapi/provider.php

@@ -11,5 +11,5 @@
 
 
 // 容器Provider定义文件
 // 容器Provider定义文件
 return [
 return [
-    'think\exception\Handle' => \app\adminapi\AdminApiExceptionHandle::class,//异常处理类
+    'think\exception\Handle' => \app\adminapi\AdminApiExceptionHandle::class,
 ];
 ];

+ 1 - 2
crmeb/app/adminapi/validate/merchant/SystemStoreValidate.php

@@ -23,7 +23,7 @@ class SystemStoreValidate extends Validate
     protected $rule = [
     protected $rule = [
         'name' => 'require',
         'name' => 'require',
         'introduction' => 'require',
         'introduction' => 'require',
-        'phone' => ['require', 'mobile'],
+        'phone' => 'require',
         'address' => 'require',
         'address' => 'require',
         'image' => 'require',
         'image' => 'require',
         'oblong_image' => 'require',
         'oblong_image' => 'require',
@@ -43,7 +43,6 @@ class SystemStoreValidate extends Validate
         'phone.require' => '400380',
         'phone.require' => '400380',
         'image.require' => '400381',
         'image.require' => '400381',
         'oblong_image.require' => '400382',
         'oblong_image.require' => '400382',
-        'phone.mobile' => '400252',
         'address.require' => '400383',
         'address.require' => '400383',
         'detailed_address.require' => '400384',
         'detailed_address.require' => '400384',
         'latlng.require' => '400385',
         'latlng.require' => '400385',

+ 1 - 1
crmeb/app/api/controller/pc/ProductController.php

@@ -107,7 +107,7 @@ class ProductController
             if (count($item['star'])) {
             if (count($item['star'])) {
                 $item['star'] = bcdiv((string)array_sum(array_column($item['star'], 'product_score')), (string)count($item['star']), 1);
                 $item['star'] = bcdiv((string)array_sum(array_column($item['star'], 'product_score')), (string)count($item['star']), 1);
             } else {
             } else {
-                $item['star'] = '3.0';
+                $item['star'] = '5.0';
             }
             }
         }
         }
         $data['count'] = $product->getCount($where);
         $data['count'] = $product->getCount($where);

+ 1 - 1
crmeb/app/api/controller/v1/PublicController.php

@@ -100,7 +100,7 @@ class PublicController
     public function share()
     public function share()
     {
     {
         $data['img'] = sys_config('wechat_share_img');
         $data['img'] = sys_config('wechat_share_img');
-        if (strstr($data['img'], 'http') === false) {
+        if (strstr($data['img'], 'http') === false && $data['img'] != '') {
             $data['img'] = sys_config('site_url') . $data['img'];
             $data['img'] = sys_config('site_url') . $data['img'];
         }
         }
         $data['img'] = str_replace('\\', '/', $data['img']);
         $data['img'] = str_replace('\\', '/', $data['img']);

+ 1 - 1
crmeb/app/model/activity/lottery/LuckLotteryRecord.php

@@ -151,7 +151,7 @@ class LuckLotteryRecord extends BaseModel
      */
      */
     public function searchLotteryIdAttr($query, $value)
     public function searchLotteryIdAttr($query, $value)
     {
     {
-        if ($value) $query->where('lottery_id', $value);
+        if ($value !== '') $query->where('lottery_id', $value);
     }
     }
 
 
     /**
     /**

+ 10 - 0
crmeb/app/model/system/SystemRoute.php

@@ -96,6 +96,16 @@ class SystemRoute extends BaseModel
         return json_decode($value, true);
         return json_decode($value, true);
     }
     }
 
 
+    public function setErrorCodeAttr($value)
+    {
+        return json_encode($value);
+    }
+
+    public function getErrorCodeAttr($value)
+    {
+        return json_decode($value, true);
+    }
+
 
 
     public function setResponseExampleAttr($value)
     public function setResponseExampleAttr($value)
     {
     {

+ 2 - 2
crmeb/app/provider.php

@@ -14,6 +14,6 @@ use app\Request;
 
 
 // 容器Provider定义文件
 // 容器Provider定义文件
 return [
 return [
-    'think\Request'          => Request::class,//请求对象
-    'think\exception\Handle' => ExceptionHandle::class,//异常处理类 
+    'think\Request'          => Request::class,
+    'think\exception\Handle' => ExceptionHandle::class,
 ];
 ];

+ 1 - 1
crmeb/app/service.php

@@ -9,5 +9,5 @@
 // | Author: CRMEB Team <admin@crmeb.com>
 // | Author: CRMEB Team <admin@crmeb.com>
 // +----------------------------------------------------------------------
 // +----------------------------------------------------------------------
 return [
 return [
-    \app\AppService::class // 应用服务提供者
+    \app\AppService::class
 ];
 ];

+ 2 - 7
crmeb/app/services/activity/lottery/LuckLotteryRecordServices.php

@@ -55,12 +55,7 @@ class LuckLotteryRecordServices extends BaseServices
         [$page, $limit] = $this->getPageValue();
         [$page, $limit] = $this->getPageValue();
         /** @var LuckLotteryServices $luckServices */
         /** @var LuckLotteryServices $luckServices */
         $luckServices = app()->make(LuckLotteryServices::class);
         $luckServices = app()->make(LuckLotteryServices::class);
-        $where['lottery_id'] = $luckServices->value(['factor' => $where['factor']], 'id');
-        if (!$where['lottery_id']) {
-            $list = [];
-            $count = 0;
-            return compact('list', 'count');
-        }
+        $where['lottery_id'] = $where['factor'] == '' ? '' : $luckServices->value(['factor' => $where['factor']], 'id');
         unset($where['factor']);
         unset($where['factor']);
         $list = $this->dao->getList($where, '*', ['lottery', 'prize', 'user'], $page, $limit);
         $list = $this->dao->getList($where, '*', ['lottery', 'prize', 'user'], $page, $limit);
         foreach ($list as &$item) {
         foreach ($list as &$item) {
@@ -249,7 +244,7 @@ class LuckLotteryRecordServices extends BaseServices
         $deliver_info = $lotteryRecord['deliver_info'];
         $deliver_info = $lotteryRecord['deliver_info'];
         $edit = [];
         $edit = [];
         //备注
         //备注
-        if($data['deliver_name'] && $data['deliver_number']) {
+        if ($data['deliver_name'] && $data['deliver_number']) {
             if ($lotteryRecord['type'] != 6 && ($data['deliver_name'] || $data['deliver_number'])) {
             if ($lotteryRecord['type'] != 6 && ($data['deliver_name'] || $data['deliver_number'])) {
                 throw new ApiException(410055);
                 throw new ApiException(410055);
             }
             }

+ 1 - 1
crmeb/app/services/agent/DivisionServices.php

@@ -56,7 +56,7 @@ class DivisionServices extends BaseServices
         ];
         ];
         $data = $userServices->getDivisionList($where + ['status' => 1], 'uid,nickname,avatar,division_percent,division_end_time,division_status');
         $data = $userServices->getDivisionList($where + ['status' => 1], 'uid,nickname,avatar,division_percent,division_end_time,division_status');
         foreach ($data['list'] as &$item) {
         foreach ($data['list'] as &$item) {
-            $item['division_end_time'] = date('Y-m-d', $item['division_end_time']);
+//            $item['division_end_time'] = date('Y-m-d', $item['division_end_time']);
             $item['agent_count'] = $userServices->count([
             $item['agent_count'] = $userServices->count([
                 $type == 2 ? 'division_id' : 'agent_id' => $item['uid'],
                 $type == 2 ? 'division_id' : 'agent_id' => $item['uid'],
                 'division_type' => $type + 1,
                 'division_type' => $type + 1,

+ 4 - 8
crmeb/app/services/message/NoticeService.php

@@ -34,14 +34,10 @@ class NoticeService extends BaseServices
     public function setEvent(string $event)
     public function setEvent(string $event)
     {
     {
         if ($this->event != $event) {
         if ($this->event != $event) {
-            $this->noticeInfo = CacheService::get('NOTICE_' . $event);
-            if (!$this->noticeInfo) {
-                /** @var SystemNotificationServices $services */
-                $services = app()->make(SystemNotificationServices::class);
-                $noticeInfo = $services->getOneNotce(['mark' => $event]);
-                $this->noticeInfo = $noticeInfo ? $noticeInfo->toArray() : [];
-                CacheService::set('NOTICE_' . $event, $this->noticeInfo);
-            }
+            /** @var SystemNotificationServices $services */
+            $services = app()->make(SystemNotificationServices::class);
+            $noticeInfo = $services->getOneNotce(['mark' => $event]);
+            $this->noticeInfo = $noticeInfo ? $noticeInfo->toArray() : [];
             $this->event = $event;
             $this->event = $event;
         }
         }
         return $this;
         return $this;

+ 5 - 9
crmeb/app/services/message/notice/WechatTemplateListService.php

@@ -215,15 +215,11 @@ class WechatTemplateListService extends NoticeService
         $StoreServiceServices = app()->make(StoreServiceServices::class);
         $StoreServiceServices = app()->make(StoreServiceServices::class);
         $adminList = $StoreServiceServices->getStoreServiceOrderNotice();
         $adminList = $StoreServiceServices->getStoreServiceOrderNotice();
         foreach ($adminList as $item) {
         foreach ($adminList as $item) {
-            $this->sendTemplate((int)$item['uid'],
-                [
-                    'first' => $title,
-                    'keyword1' => $orderId,
-                    'keyword2' => $storeName,
-                    'keyword3' => $status,
-                    'keyword4' => date('Y-m-d H:i:s', time()),
-                    'remark' => '点击查看订单详情'
-                ], $link);
+            $this->sendTemplate((int)$item['uid'], [
+                'short_string6' => $status,
+                'character_string1' => $orderId,
+                'time2' => date('Y-m-d H:i:s', time()),
+            ], $link);
         }
         }
         return true;
         return true;
     }
     }

+ 3 - 2
crmeb/app/services/order/StoreOrderRefundServices.php

@@ -1104,8 +1104,8 @@ class StoreOrderRefundServices extends BaseServices
                     '_type' => $_type,
                     '_type' => $_type,
                     '_title' => $_title,
                     '_title' => $_title,
                 ];
                 ];
-                $item['store_order_order_id'] = $orderInfoList[$item['store_order_id']]['order_id'];
-                $item['store_order_status'] = $store_order_status[$orderInfoList[$item['store_order_id']]['status']];
+                $item['store_order_order_id'] = $orderInfoList[$item['store_order_id']]['order_id'] ?? '';
+                $item['store_order_status'] = $store_order_status[$orderInfoList[$item['store_order_id']]['status'] ?? -3] ?? '';
             }
             }
         }
         }
         $data['list'] = $list;
         $data['list'] = $list;
@@ -1191,6 +1191,7 @@ class StoreOrderRefundServices extends BaseServices
         $orderData['routine_contact_type'] = sys_config('routine_contact_type', 0);
         $orderData['routine_contact_type'] = sys_config('routine_contact_type', 0);
         $orderData['levelPrice'] = $this->getOrderSumPrice($orderData['cart_info'], 'level');//获取会员等级优惠
         $orderData['levelPrice'] = $this->getOrderSumPrice($orderData['cart_info'], 'level');//获取会员等级优惠
         $orderData['memberPrice'] = $this->getOrderSumPrice($orderData['cart_info'], 'member');//获取付费会员优惠
         $orderData['memberPrice'] = $this->getOrderSumPrice($orderData['cart_info'], 'member');//获取付费会员优惠
+        $orderData['pay_type'] = $orderInfo['pay_type'];
 
 
         switch ($orderInfo['pay_type']) {
         switch ($orderInfo['pay_type']) {
             case PayServices::WEIXIN_PAY:
             case PayServices::WEIXIN_PAY:

+ 5 - 4
crmeb/app/services/order/StoreOrderServices.php

@@ -2273,7 +2273,7 @@ HTML;
      */
      */
     public function getFriendDetail($orderId, $uid)
     public function getFriendDetail($orderId, $uid)
     {
     {
-        $orderInfo = $this->dao->getOne(['order_id' => $orderId, 'is_del' => 0]);
+        $orderInfo = $this->dao->getOne(['id' => $orderId, 'is_del' => 0]);
         if ($orderInfo) {
         if ($orderInfo) {
             $orderInfo = $orderInfo->toArray();
             $orderInfo = $orderInfo->toArray();
         } else {
         } else {
@@ -2688,7 +2688,7 @@ HTML;
 
 
         switch ($type) {
         switch ($type) {
             case 'order':
             case 'order':
-                $info = $this->dao->get(['order_id' => $orderId], ['pay_price', 'add_time', 'combination_id', 'seckill_id', 'bargain_id', 'pay_postage']);
+                $info = $this->dao->get(['order_id' => $orderId], ['id', 'pay_price', 'add_time', 'combination_id', 'seckill_id', 'bargain_id', 'pay_postage']);
                 if (!$info) {
                 if (!$info) {
                     throw new PayException('您支付的订单不存在');
                     throw new PayException('您支付的订单不存在');
                 }
                 }
@@ -2712,10 +2712,11 @@ HTML;
                 $data['pay_postage'] = $info['pay_postage'];
                 $data['pay_postage'] = $info['pay_postage'];
                 $data['offline_postage'] = (int)sys_config('offline_postage', 0);
                 $data['offline_postage'] = (int)sys_config('offline_postage', 0);
                 $data['invalid_time'] = $time;
                 $data['invalid_time'] = $time;
+                $data['oid'] = $info['id'];
 
 
                 break;
                 break;
             case 'svip':
             case 'svip':
-                $info = app()->make(OtherOrderServices::class)->get(['order_id' => $orderId], ['pay_price', 'add_time']);
+                $info = app()->make(OtherOrderServices::class)->get(['order_id' => $orderId], ['id', 'pay_price', 'add_time']);
                 if (!$info) {
                 if (!$info) {
                     throw new PayException('您支付的订单不存在');
                     throw new PayException('您支付的订单不存在');
                 }
                 }
@@ -2723,7 +2724,7 @@ HTML;
                 $data['invalid_time'] = $info->add_time + 86400;
                 $data['invalid_time'] = $info->add_time + 86400;
                 break;
                 break;
             case 'recharge':
             case 'recharge':
-                $info = app()->make(UserRechargeServices::class)->get(['order_id' => $orderId], ['price', 'add_time']);
+                $info = app()->make(UserRechargeServices::class)->get(['order_id' => $orderId], ['id', 'price', 'add_time']);
                 if (!$info) {
                 if (!$info) {
                     throw new PayException('您支付的订单不存在');
                     throw new PayException('您支付的订单不存在');
                 }
                 }

+ 1 - 1
crmeb/app/services/pay/OrderPayServices.php

@@ -207,6 +207,6 @@ class OrderPayServices
                 }
                 }
         }
         }
 
 
-        return ['jsConfig' => $jsConfig, 'order_id' => $order['order_id'], 'pay_key' => $payKey, 'pay_url' => $payUrl ?? ''];
+        return ['jsConfig' => $jsConfig, 'oid' => $order['id'], 'order_id' => $order['order_id'], 'pay_key' => $payKey, 'pay_url' => $payUrl ?? ''];
     }
     }
 }
 }

+ 1 - 1
crmeb/app/services/pc/HomeServices.php

@@ -41,7 +41,7 @@ class HomeServices extends BaseServices
                 if (count($item['star'])) {
                 if (count($item['star'])) {
                     $item['star'] = bcdiv((string)array_sum(array_column($item['star'], 'product_score')), (string)count($item['star']), 1);
                     $item['star'] = bcdiv((string)array_sum(array_column($item['star'], 'product_score')), (string)count($item['star']), 1);
                 } else {
                 } else {
-                    $item['star'] = '3.0';
+                    $item['star'] = '5.0';
                 }
                 }
                 $item['checkCoupon'] = app()->make(StoreCouponIssueServices::class)->checkProductCoupon($item['id']);
                 $item['checkCoupon'] = app()->make(StoreCouponIssueServices::class)->checkProductCoupon($item['id']);
             }
             }

+ 1 - 1
crmeb/app/services/pc/ProductServices.php

@@ -45,7 +45,7 @@ class ProductServices extends BaseServices
             if (count($item['star'])) {
             if (count($item['star'])) {
                 $item['star'] = bcdiv((string)array_sum(array_column($item['star'], 'product_score')), (string)count($item['star']), 1);
                 $item['star'] = bcdiv((string)array_sum(array_column($item['star'], 'product_score')), (string)count($item['star']), 1);
             } else {
             } else {
-                $item['star'] = '3.0';
+                $item['star'] = '5.0';
             }
             }
         }
         }
         $list = $product->getActivityList($list);
         $list = $product->getActivityList($list);

+ 1 - 1
crmeb/app/services/product/product/StoreProductServices.php

@@ -1677,7 +1677,7 @@ class StoreProductServices extends BaseServices
         /** @var  StoreProductAttrValueServices $StoreProductAttrValue */
         /** @var  StoreProductAttrValueServices $StoreProductAttrValue */
         $StoreProductAttrValue = app()->make(StoreProductAttrValueServices::class);
         $StoreProductAttrValue = app()->make(StoreProductAttrValueServices::class);
         return $uniqueId == '' ?
         return $uniqueId == '' ?
-            $this->dao->value(['id' => $productId], 'stock') ?: 0
+            ($this->dao->value(['id' => $productId], 'stock') ?: 0)
             : $StoreProductAttrValue->uniqueByStock($uniqueId);
             : $StoreProductAttrValue->uniqueByStock($uniqueId);
     }
     }
 
 

+ 2 - 2
crmeb/app/services/shipping/ExpressServices.php

@@ -86,8 +86,8 @@ class ExpressServices extends BaseServices
      */
      */
     public function createExpressForm(array $formData = [])
     public function createExpressForm(array $formData = [])
     {
     {
-        if (isset($formData['partner_id']) && $formData['partner_id'] == 1) $field[] = Form::input('account', '月结账号', $formData['account'] ?? '')->required();
-        if (isset($formData['partner_key']) && $formData['partner_key'] == 1) $field[] = Form::input('key', '月结密码', $formData['key'] ?? '')->required();
+        if (isset($formData['partner_id']) && $formData['partner_id'] == 1) $field[] = Form::input('account', '月结账号', $formData['account'] ?? '');
+        if (isset($formData['partner_key']) && $formData['partner_key'] == 1) $field[] = Form::input('key', '月结密码', $formData['key'] ?? '');
         if (isset($formData['net']) && $formData['net'] == 1) $field[] = Form::input('net_name', '取件网点', $formData['net_name'] ?? '')->required();
         if (isset($formData['net']) && $formData['net'] == 1) $field[] = Form::input('net_name', '取件网点', $formData['net_name'] ?? '')->required();
         if (isset($formData['check_man']) && $formData['check_man'] == 1) $field[] = Form::input('courier_name', '承载快递员名', $formData['courier_name'] ?? '')->required();
         if (isset($formData['check_man']) && $formData['check_man'] == 1) $field[] = Form::input('courier_name', '承载快递员名', $formData['courier_name'] ?? '')->required();
         if (isset($formData['partner_name']) && $formData['partner_name'] == 1) $field[] = Form::input('customer_name', '客户账户名称', $formData['customer_name'] ?? '')->required();
         if (isset($formData['partner_name']) && $formData['partner_name'] == 1) $field[] = Form::input('customer_name', '客户账户名称', $formData['customer_name'] ?? '')->required();

+ 55 - 14
crmeb/app/services/system/SystemClearServices.php

@@ -77,31 +77,72 @@ class SystemClearServices extends BaseServices
      */
      */
     public function replaceSiteUrl(string $url)
     public function replaceSiteUrl(string $url)
     {
     {
+        // 获取站点 URL
         $siteUrl = sys_config('site_url');
         $siteUrl = sys_config('site_url');
-        $siteUrlJosn = str_replace('http://', 'http:\\\/\\\/', $siteUrl);
-        $valueJosn = str_replace('http://', 'http:\\\/\\\/', $url);
+        // 解析站点 URL 的协议
+        $siteUrlScheme = parse_url($siteUrl)['scheme'];
+        // 将站点 URL 中的协议替换为 JSON 格式
+        $siteUrlJson = str_replace($siteUrlScheme . '://', $siteUrlScheme . ':\\\/\\\/', $siteUrl);
+
+        // 获取当前 URL 的协议
+        $urlScheme = parse_url($url)['scheme'];
+        // 将当前 URL 中的协议替换为 JSON 格式
+        $urlJson = str_replace($urlScheme . '://', $urlScheme . ':\\\/\\\/', $url);
+        // 获取数据库表前缀
         $prefix = Config::get('database.connections.' . Config::get('database.default') . '.prefix');
         $prefix = Config::get('database.connections.' . Config::get('database.default') . '.prefix');
+
+        // 构建 SQL 语句数组
         $sql = [
         $sql = [
+            "UPDATE `{$prefix}agent_level` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}agreement` SET `content` = replace(content ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article` SET `image_input` = replace(`image_input` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article` SET `image_input` = replace(`image_input` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_category` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_category` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_content` SET `content` = replace(`content` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_content` SET `content` = replace(`content` ,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}diy` SET `value` = replace(value ,'{$siteUrlJosn}','{$valueJosn}'),`default_value` = replace(default_value ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}luck_lottery` SET `image` = replace(image ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}luck_prize` SET `image` = replace(image ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_bargain` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
+            "UPDATE `{$prefix}cache` SET `result` = replace(result ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}delivery_service` SET `avatar` = replace(`avatar` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}division_agent_apply` SET `images` = replace(images ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}diy` SET `value` = replace(value ,'{$siteUrlJson}','{$urlJson}'),`default_value` = replace(default_value ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}live_anchor` SET `cover_img` = replace(`cover_img` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}live_goods` SET `cover_img` = replace(`cover_img` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}live_room` SET `cover_img` = replace(`cover_img` ,'{$siteUrl}','{$url}'),`share_img` = replace(`share_img` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}luck_lottery` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`content` = replace(content ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}luck_prize` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}member_card_batch` SET `qrcode` = replace(qrcode ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}member_right` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}out_interface` SET `return_params` = replace(return_params ,'{$siteUrl}','{$url}'),`request_example` = replace(request_example ,'{$siteUrl}','{$url}'),`return_example` = replace(return_example ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}qrcode` SET `url` = replace(url ,'{$siteUrl}','{$url}'),`qrcode_url` = replace(qrcode_url ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_bargain` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
             "UPDATE `{$prefix}store_category` SET `pic` = replace(`pic` ,'{$siteUrl}','{$url}'),`big_pic` = replace(`big_pic` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_category` SET `pic` = replace(`pic` ,'{$siteUrl}','{$url}'),`big_pic` = replace(`big_pic` ,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}store_combination` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_integral` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_product` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`slider_image` = replace(slider_image ,'{$siteUrlJosn}','{$valueJosn}'),`recommend_image` = replace(recommend_image ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_product_attr_result` SET `result` = replace(result ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_combination` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_integral` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_integral_order` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_order_cart_info` SET `cart_info` = replace(cart_info ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_order_refund` SET `refund_img` = replace(refund_img ,'{$siteUrl}','{$url}'),`cart_info` = replace(cart_info,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_pink` SET `avatar` = replace(`avatar` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_product` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`slider_image` = replace(slider_image ,'{$siteUrlJson}','{$urlJson}'),`recommend_image` = replace(recommend_image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_product_attr_result` SET `result` = replace(result ,'{$siteUrlJson}','{$urlJson}')",
             "UPDATE `{$prefix}store_product_attr_value` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_product_attr_value` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_product_description` SET `description`= replace(description,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_product_description` SET `description`= replace(description,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}store_seckill` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
+            "UPDATE `{$prefix}store_product_reply` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}'),`pics` = replace(pics,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_seckill` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_service` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_service_log` SET `msn` = replace(msn ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_service_record` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}'),`message` = replace(message,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}system_admin` SET `head_pic` = replace(head_pic ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}system_attachment` SET `att_dir` = replace(att_dir ,'{$siteUrl}','{$url}'),`satt_dir` = replace(satt_dir ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}system_attachment` SET `att_dir` = replace(att_dir ,'{$siteUrl}','{$url}'),`satt_dir` = replace(satt_dir ,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}system_config` SET `value` = replace(value ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}system_group_data` SET `value` = replace(value ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}user` SET `avatar` = replace(avatar ,'{$siteUrlJosn}','{$valueJosn}')",
+            "UPDATE `{$prefix}system_config` SET `value` = replace(value ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}system_config` SET `value` = replace(value ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}system_group_data` SET `value` = replace(value ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}system_store` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`oblong_image` = replace(oblong_image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}system_store_staff` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}system_user_level` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`icon` = replace(icon ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}user` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}user_extract` SET `qrcode_url` = replace(qrcode_url ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}wechat_qrcode` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}wechat_user` SET `headimgurl` = replace(headimgurl ,'{$siteUrl}','{$url}')",
         ];
         ];
+
+        // 执行 SQL 语句
         return $this->transaction(function () use ($sql) {
         return $this->transaction(function () use ($sql) {
             try {
             try {
                 foreach ($sql as $item) {
                 foreach ($sql as $item) {

+ 1 - 1
crmeb/app/services/system/SystemRouteServices.php

@@ -70,7 +70,7 @@ class SystemRouteServices extends BaseServices
         }
         }
 
 
         $routeInfo = $routeInfo->toArray();
         $routeInfo = $routeInfo->toArray();
-        $routeInfo['cate_tree'] = app()->make(SystemRouteCateServices::class)->getAllList($routeInfo['app_name'], '*', 'id asc,sort desc');
+        $routeInfo['cate_tree'] = app()->make(SystemRouteCateServices::class)->getAllList($routeInfo['app_name'], 'id,name,pid', 'id asc,sort desc');
         return $routeInfo;
         return $routeInfo;
     }
     }
 
 

+ 7 - 4
crmeb/app/services/system/admin/SystemAdminServices.php

@@ -217,8 +217,13 @@ class SystemAdminServices extends BaseServices
     public function createAdminForm(int $level, array $formData = [])
     public function createAdminForm(int $level, array $formData = [])
     {
     {
         $f[] = $this->builder->input('account', '管理员账号', $formData['account'] ?? '')->required('请填写管理员账号');
         $f[] = $this->builder->input('account', '管理员账号', $formData['account'] ?? '')->required('请填写管理员账号');
-        $f[] = $this->builder->input('pwd', '管理员密码')->type('password')->required('请填写管理员密码');
-        $f[] = $this->builder->input('conf_pwd', '确认密码')->type('password')->required('请输入确认密码');
+        if (empty($formData)) {
+            $f[] = $this->builder->input('pwd', '管理员密码')->type('password')->required('请填写管理员密码');
+            $f[] = $this->builder->input('conf_pwd', '确认密码')->type('password')->required('请输入确认密码');
+        } else {
+            $f[] = $this->builder->input('pwd', '管理员密码')->type('password');
+            $f[] = $this->builder->input('conf_pwd', '确认密码')->type('password');
+        }
         $f[] = $this->builder->input('real_name', '管理员姓名', $formData['real_name'] ?? '')->required('请输入管理员姓名');
         $f[] = $this->builder->input('real_name', '管理员姓名', $formData['real_name'] ?? '')->required('请输入管理员姓名');
 
 
         /** @var SystemRoleServices $service */
         /** @var SystemRoleServices $service */
@@ -272,7 +277,6 @@ class SystemAdminServices extends BaseServices
 
 
         return $this->transaction(function () use ($data) {
         return $this->transaction(function () use ($data) {
             if ($this->dao->save($data)) {
             if ($this->dao->save($data)) {
-                CacheService::clear();
                 return true;
                 return true;
             } else {
             } else {
                 throw new AdminException(100022);
                 throw new AdminException(100022);
@@ -341,7 +345,6 @@ class SystemAdminServices extends BaseServices
         $adminInfo->account = $data['account'] ?? $adminInfo->account;
         $adminInfo->account = $data['account'] ?? $adminInfo->account;
         $adminInfo->status = $data['status'];
         $adminInfo->status = $data['status'];
         if ($adminInfo->save()) {
         if ($adminInfo->save()) {
-            CacheService::clear();
             return true;
             return true;
         } else {
         } else {
             return false;
             return false;

+ 47 - 10
crmeb/app/services/system/config/SystemConfigServices.php

@@ -178,6 +178,12 @@ class SystemConfigServices extends BaseServices
             'show_value' => 1
             'show_value' => 1
         ],
         ],
         'customer_type' => [
         'customer_type' => [
+            'son_type' => [
+                'service_feedback' => '',
+            ],
+            'show_value' => 0
+        ],
+        'customer_type#' => [
             'son_type' => [
             'son_type' => [
                 'customer_phone' => '',
                 'customer_phone' => '',
             ],
             ],
@@ -201,7 +207,13 @@ class SystemConfigServices extends BaseServices
                 'pay_sub_merchant_id' => ''
                 'pay_sub_merchant_id' => ''
             ],
             ],
             'show_value' => 1
             'show_value' => 1
-        ]
+        ],
+        'member_card_status' => [
+            'son_type' => [
+                'member_price_status' => '',
+            ],
+            'show_value' => 1
+        ],
     ];
     ];
 
 
     /**
     /**
@@ -279,7 +291,7 @@ class SystemConfigServices extends BaseServices
         $count = $this->dao->count($where);
         $count = $this->dao->count($where);
         $tidy_srr = [];
         $tidy_srr = [];
         foreach ($list as &$item) {
         foreach ($list as &$item) {
-            $item['value'] = $item['value'] ? json_decode($item['value'], true) ?: '' : '';
+            $item['value'] = $item['value'] ? (json_decode($item['value'], true) ?: '') : '';
             if ($item['type'] == 'radio' || $item['type'] == 'checkbox') {
             if ($item['type'] == 'radio' || $item['type'] == 'checkbox') {
                 $item['value'] = $this->getRadioOrCheckboxValueInfo($item['menu_name'], $item['value']);
                 $item['value'] = $this->getRadioOrCheckboxValueInfo($item['menu_name'], $item['value']);
             }
             }
@@ -435,7 +447,7 @@ class SystemConfigServices extends BaseServices
             'type' => 'div',
             'type' => 'div',
             'class' => 'tips-info',
             'class' => 'tips-info',
             'domProps' => ['innerHTML' => $data['desc']]
             'domProps' => ['innerHTML' => $data['desc']]
-        ])->rows($data['high'])->col(13);
+        ])->rows(6)->col(13);
         return $formbuider;
         return $formbuider;
     }
     }
 
 
@@ -446,7 +458,7 @@ class SystemConfigServices extends BaseServices
      * @param array $control_two
      * @param array $control_two
      * @return array
      * @return array
      */
      */
-    public function createRadioForm(array $data, $control = [], $control_two = [])
+    public function createRadioForm(array $data, $control = [], $control_two = [], $control_three = [])
     {
     {
         $formbuider = [];
         $formbuider = [];
         $data['value'] = json_decode($data['value'], true) ?: '0';
         $data['value'] = json_decode($data['value'], true) ?: '0';
@@ -472,6 +484,9 @@ class SystemConfigServices extends BaseServices
             if ($control_two && isset($data['show_value2'])) {
             if ($control_two && isset($data['show_value2'])) {
                 $radio->appendControl($data['show_value2'] ?? 2, is_array($control_two) ? $control_two : [$control_two]);
                 $radio->appendControl($data['show_value2'] ?? 2, is_array($control_two) ? $control_two : [$control_two]);
             }
             }
+            if ($control_three && isset($data['show_value3'])) {
+                $radio->appendControl($data['show_value3'] ?? 3, is_array($control_three) ? $control_three : [$control_three]);
+            }
             return $formbuider;
             return $formbuider;
         }
         }
     }
     }
@@ -647,14 +662,14 @@ class SystemConfigServices extends BaseServices
      * @return array
      * @return array
      * @throws \FormBuilder\Exception\FormBuilderException
      * @throws \FormBuilder\Exception\FormBuilderException
      */
      */
-    public function formTypeShine($data, $control = false, $controle_two = [])
+    public function formTypeShine($data, $control = false, $controle_two = [], $controle_three = [])
     {
     {
 
 
         switch ($data['type']) {
         switch ($data['type']) {
             case 'text'://文本框
             case 'text'://文本框
                 return $this->createTextForm($data['input_type'], $data);
                 return $this->createTextForm($data['input_type'], $data);
             case 'radio'://单选框
             case 'radio'://单选框
-                return $this->createRadioForm($data, $control, $controle_two);
+                return $this->createRadioForm($data, $control, $controle_two, $controle_three);
             case 'textarea'://多行文本框
             case 'textarea'://多行文本框
                 return $this->createTextareaForm($data);
                 return $this->createTextareaForm($data);
             case 'upload'://文件上传
             case 'upload'://文件上传
@@ -743,7 +758,19 @@ class SystemConfigServices extends BaseServices
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }
-                                $builder[] = $this->formTypeShine($son_data, $son_build, $son_build_two)[0];
+                                $son_build_three = [];
+                                if (isset($role['son_type'][$sk . '#'])) {
+                                    $son_type_three = $role['son_type'][$sk . '#'];
+                                    $son_data['show_value3'] = $son_type_three['show_value'];
+                                    if (isset($son_type_three['son_type'])) {
+                                        foreach ($son_type_three['son_type'] as $ssk => $ssv) {
+                                            if (isset($list[$ssk]['menu_name']) && $list[$ssk]['menu_name'] == 'watermark_text_color') $list[$ssk]['type'] = 'color';
+                                            $son_build_three[] = $this->formTypeShine($list[$ssk])[0];
+                                            unset($list[$ssk]);
+                                        }
+                                    }
+                                }
+                                $builder[] = $this->formTypeShine($son_data, $son_build, $son_build_two, $son_build_three)[0];
                                 unset($list[$sk]);
                                 unset($list[$sk]);
                             }
                             }
                         }
                         }
@@ -759,7 +786,17 @@ class SystemConfigServices extends BaseServices
                             $builder_two[] = $this->formTypeShine($son_data)[0];
                             $builder_two[] = $this->formTypeShine($son_data)[0];
                         }
                         }
                     }
                     }
-                    $formbuider = array_merge($formbuider, $this->createRadioForm($data, $builder, $builder_two));
+                    $builder_three = [];
+                    if (isset($relateRule[$key . '#'])) {
+                        $role = $relateRule[$key . '#'];
+                        $data['show_value3'] = $role['show_value'];
+                        foreach ($role['son_type'] as $sk => $sv) {
+                            $son_data = $list[$sk];
+                            $son_data['show_value'] = $role['show_value'];
+                            $builder_three[] = $this->formTypeShine($son_data)[0];
+                        }
+                    }
+                    $formbuider = array_merge($formbuider, $this->createRadioForm($data, $builder, $builder_two, $builder_three));
                     break;
                     break;
                 case 'textarea'://多行文本框
                 case 'textarea'://多行文本框
                     $formbuider = array_merge($formbuider, $this->createTextareaForm($data));
                     $formbuider = array_merge($formbuider, $this->createTextareaForm($data));
@@ -961,7 +998,7 @@ class SystemConfigServices extends BaseServices
         $formbuider[] = $this->builder->input('menu_name', '字段变量', $menu['menu_name'])->disabled(1);
         $formbuider[] = $this->builder->input('menu_name', '字段变量', $menu['menu_name'])->disabled(1);
         $formbuider[] = $this->builder->hidden('type', $menu['type']);
         $formbuider[] = $this->builder->hidden('type', $menu['type']);
         [$configTabList, $data] = $service->getConfigTabListForm((int)($menu['config_tab_id'] ?? 0));
         [$configTabList, $data] = $service->getConfigTabListForm((int)($menu['config_tab_id'] ?? 0));
-        $formbuider[] = $this->builder->cascader('config_tab_id', '分类', $data)->options($configTabList)->filterable(true)->props(['props' => ['multiple' => false, 'checkStrictly' => true, 'emitPath' => false]])->style(['width'=>'100%']);
+        $formbuider[] = $this->builder->cascader('config_tab_id', '分类', $data)->options($configTabList)->filterable(true)->props(['props' => ['multiple' => false, 'checkStrictly' => true, 'emitPath' => false]])->style(['width' => '100%']);
         $formbuider[] = $this->builder->input('info', '配置名称', $menu['info'])->autofocus(1);
         $formbuider[] = $this->builder->input('info', '配置名称', $menu['info'])->autofocus(1);
         $formbuider[] = $this->builder->input('desc', '配置简介', $menu['desc']);
         $formbuider[] = $this->builder->input('desc', '配置简介', $menu['desc']);
         switch ($menu['type']) {
         switch ($menu['type']) {
@@ -1118,7 +1155,7 @@ class SystemConfigServices extends BaseServices
         if ($form_type) {
         if ($form_type) {
             $formbuider[] = $this->builder->hidden('type', $form_type);
             $formbuider[] = $this->builder->hidden('type', $form_type);
             [$configTabList, $data] = $service->getConfigTabListForm((int)($tab_id ?? 0));
             [$configTabList, $data] = $service->getConfigTabListForm((int)($tab_id ?? 0));
-            $formbuider[] = $this->builder->cascader('config_tab_id', '分类', $data)->options($configTabList)->filterable(true)->props(['props' => ['multiple' => false, 'checkStrictly' => true, 'emitPath' => false]])->style(['width'=>'100%']);
+            $formbuider[] = $this->builder->cascader('config_tab_id', '分类', $data)->options($configTabList)->filterable(true)->props(['props' => ['multiple' => false, 'checkStrictly' => true, 'emitPath' => false]])->style(['width' => '100%']);
             if ($info_type) {
             if ($info_type) {
                 $formbuider[] = $info_type;
                 $formbuider[] = $info_type;
             }
             }

+ 30 - 64
crmeb/app/services/system/log/SystemFileInfoServices.php

@@ -12,27 +12,6 @@ use app\services\BaseServices;
  */
  */
 class SystemFileInfoServices extends BaseServices
 class SystemFileInfoServices extends BaseServices
 {
 {
-    // 排除部分目录
-    protected $excluded_directories = array(
-        '/runtime/cache',
-        '/runtime/log',
-        '/runtime/session',
-        '/runtime/temp',
-        '/public/uploads/attach',
-        '/public/install/images/install',
-        '/public/admin/system_static/css',
-        '/public/admin/system_static/js',
-        '/public/admin/system_static/img',
-        '/public/admin/system_static/fonts',
-        '/public/admin/system_static/media',
-        '/public/static/css',
-        '/public/static/js',
-        '/public/static/img',
-        '/public/static/images',
-        '/public/statics/images',
-        '/public/statics/mp_view/static',
-        '/vendor'
-        );
     /**
     /**
      * 构造方法
      * 构造方法
      * SystemLogServices constructor.
      * SystemLogServices constructor.
@@ -42,67 +21,54 @@ class SystemFileInfoServices extends BaseServices
     {
     {
         $this->dao = $dao;
         $this->dao = $dao;
     }
     }
-    // 同步文件信息
+
     public function syncfile()
     public function syncfile()
     {
     {
         $list = $this->flattenArray($this->scanDirectory());
         $list = $this->flattenArray($this->scanDirectory());
         $this->dao->saveAll($list);
         $this->dao->saveAll($list);
     }
     }
-    //查询文件目录是否在排除目录中,是则返回true,否则返回false
-    public function isExcludedDirectory($string) {
-        foreach ($this->excluded_directories as $item) {
-            if (strpos($string,$item) === 0) {
-                return true;
-            }
-        }
-        return false;
-    }
-    // 递归扫描目录
+
     public function scanDirectory($dir = '')
     public function scanDirectory($dir = '')
     {
     {
         if ($dir == '') $dir = root_path();
         if ($dir == '') $dir = root_path();
         $result = array();
         $result = array();
-        // 获取目录下的所有文件和子目录
-        $files = array_diff(scandir($dir), array('.', '..'));
-        // 遍历文件和子目录
+        $files = scandir($dir);
         foreach ($files as $file) {
         foreach ($files as $file) {
-            $path = $dir . '/' . $file;
-            $fileInfo = array(
-                'name' => $file,
-                'update_time' => date('Y-m-d H:i:s', filemtime($path)),
-                'create_time' => date('Y-m-d H:i:s', filectime($path)),
-                'path' => str_replace(root_path(), '', $dir),
-                'full_path' => str_replace(root_path(), '', $path),
-            );
-            // 判断是否是目录 并不在排除目录中
-            if (is_dir($path) && !$this->isExcludedDirectory($file, $this->excluded_directories)) {
-                $fileInfo['type'] = 'dir';
-                $fileInfo['contents'] = $this->scanDirectory($path);
-            } else {
-                $fileInfo['type'] = 'file';
+            if ($file != '.' && $file != '..') {
+                $path = $dir . '/' . $file;
+                $fileInfo = array(
+                    'name' => $file,
+                    'update_time' => date('Y-m-d H:i:s', filemtime($path)),
+                    'create_time' => date('Y-m-d H:i:s', filectime($path)),
+                    'path' => str_replace(root_path(), '', $dir),
+                    'full_path' => str_replace(root_path(), '', $path),
+                );
+                if (is_dir($path)) {
+                    $fileInfo['type'] = 'dir';
+                    $fileInfo['contents'] = $this->scanDirectory($path);
+                } else {
+                    $fileInfo['type'] = 'file';
+                }
+                $result[] = $fileInfo;
             }
             }
-            $result[] = $fileInfo;
         }
         }
         return $result;
         return $result;
     }
     }
-    // 数组扁平化
+
     public function flattenArray($arr)
     public function flattenArray($arr)
     {
     {
         $result = array();
         $result = array();
         foreach ($arr as $item) {
         foreach ($arr as $item) {
-            //如果不是排除目录
-            if(!$this->isExcludedDirectory($item['path'])){
-                $result[] = array(
-                    'name' => $item['name'],
-                    'type' => $item['type'],
-                    'update_time' => $item['update_time'],
-                    'create_time' => $item['create_time'],
-                    'path' => $item['path'],
-                    'full_path' => $item['full_path'],
-                );
-                if (isset($item['contents'])) {
-                    $result = array_merge($result, $this->flattenArray($item['contents']));
-                }
+            $result[] = array(
+                'name' => $item['name'],
+                'type' => $item['type'],
+                'update_time' => $item['update_time'],
+                'create_time' => $item['create_time'],
+                'path' => $item['path'],
+                'full_path' => $item['full_path'],
+            );
+            if (isset($item['contents'])) {
+                $result = array_merge($result, $this->flattenArray($item['contents']));
             }
             }
         }
         }
         return $result;
         return $result;

+ 8 - 7
crmeb/app/services/system/log/SystemFileServices.php

@@ -253,14 +253,15 @@ class SystemFileServices extends BaseServices
         } else {
         } else {
             $dir = $dir . '/' . $fileDir;
             $dir = $dir . '/' . $fileDir;
         }
         }
-        //获取目录列表
-        $list = array_diff(scandir($dir), array('.', '..'));
+        $list = scandir($dir);
         foreach ($list as $key => $v) {
         foreach ($list as $key => $v) {
-            if (is_dir($dir . DS . $v)) {
-                $fileAll['dir'][] = FileClass::listInfo($dir . DS . $v);
-            }
-            if (is_file($dir . DS . $v)) {
-                $fileAll['file'][] = FileClass::listInfo($dir . DS . $v);
+            if ($v != '.' && $v != '..') {
+                if (is_dir($dir . DS . $v)) {
+                    $fileAll['dir'][] = FileClass::listInfo($dir . DS . $v);
+                }
+                if (is_file($dir . DS . $v)) {
+                    $fileAll['file'][] = FileClass::listInfo($dir . DS . $v);
+                }
             }
             }
         }
         }
         //兼容windows
         //兼容windows

+ 1 - 0
crmeb/app/services/user/LoginServices.php

@@ -100,6 +100,7 @@ class LoginServices extends BaseServices
             $data['staff_id'] = $userInfo['uid'];
             $data['staff_id'] = $userInfo['uid'];
             $data['is_staff'] = $user['is_staff'] ?? 0;
             $data['is_staff'] = $user['is_staff'] ?? 0;
             $data['division_type'] = 3;
             $data['division_type'] = 3;
+            $data['division_status'] = 1;
             $data['division_change_time'] = time();
             $data['division_change_time'] = time();
             $data['division_end_time'] = $spreadInfo->division_end_time;
             $data['division_end_time'] = $spreadInfo->division_end_time;
             //如果店员切换代理商,则店员在之前代理商下推广的用户,他们的直接上级从当前店员变为之前代理商
             //如果店员切换代理商,则店员在之前代理商下推广的用户,他们的直接上级从当前店员变为之前代理商

+ 1 - 1
crmeb/app/services/user/UserExtractServices.php

@@ -275,7 +275,7 @@ class UserExtractServices extends BaseServices
         $userBrokerageServices = app()->make(UserBrokerageServices::class);
         $userBrokerageServices = app()->make(UserBrokerageServices::class);
         $where['pm'] = 1;
         $where['pm'] = 1;
         $brokerage_count = $userBrokerageServices->getUsersBokerageSum($where);
         $brokerage_count = $userBrokerageServices->getUsersBokerageSum($where);
-        $extract_statistics['brokerage_count'] = bcadd((string)$brokerage_count, (string)$extract_statistics['price'], 2);
+        $extract_statistics['brokerage_count'] = bcadd((string)$brokerage_count, '0', 2);
         //未提现金额
         //未提现金额
         $extract_statistics['brokerage_not'] = $extract_statistics['brokerage_count'] > $extract_statistics['priced'] ? bcsub((string)$brokerage_count, (string)$extract_statistics['priced'], 2) : 0.00;
         $extract_statistics['brokerage_not'] = $extract_statistics['brokerage_count'] > $extract_statistics['priced'] ? bcsub((string)$brokerage_count, (string)$extract_statistics['priced'], 2) : 0.00;
         return compact('extract_statistics', 'list');
         return compact('extract_statistics', 'list');

+ 1 - 1
crmeb/app/services/wechat/WechatQrcodeServices.php

@@ -47,7 +47,7 @@ class WechatQrcodeServices extends BaseServices
         $list = $this->dao->getList($where, $page, $limit);
         $list = $this->dao->getList($where, $page, $limit);
         foreach ($list as &$item) {
         foreach ($list as &$item) {
             $item['y_follow'] = $item['y_follow'] ?? 0;
             $item['y_follow'] = $item['y_follow'] ?? 0;
-            $item['stop'] = $item['end_time'] ? $item['end_time'] > time() ? 1 : -1 : 0;
+            $item['stop'] = $item['end_time'] ? ($item['end_time'] > time() ? 1 : -1) : 0;
             $item['label_name'] = $userLabel->getColumn([['id', 'in', $item['label_id']]], 'label_name');
             $item['label_name'] = $userLabel->getColumn([['id', 'in', $item['label_id']]], 'label_name');
             $item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
             $item['end_time'] = date('Y-m-d H:i:s', $item['end_time']);
             $item['add_time'] = date('Y-m-d H:i:s', $item['add_time']);
             $item['add_time'] = date('Y-m-d H:i:s', $item['add_time']);

+ 54 - 19
crmeb/crmeb/command/Util.php

@@ -67,34 +67,71 @@ class Util extends Command
 
 
     protected function replaceSiteUrl(string $url, string $siteUrl)
     protected function replaceSiteUrl(string $url, string $siteUrl)
     {
     {
-        $siteUrlJosn = str_replace('http://', 'http:\\\/\\\/', $siteUrl);
-        $siteUrlJosn = str_replace('https://', 'https:\\\/\\\/', $siteUrlJosn);
-        $valueJosn = str_replace('http://', 'http:\\\/\\\/', $url);
-        $valueJosn = str_replace('https://', 'https:\\\/\\\/', $valueJosn);
+        // 解析站点 URL 的协议
+        $siteUrlScheme = parse_url($siteUrl)['scheme'];
+        // 将站点 URL 中的协议替换为 JSON 格式
+        $siteUrlJson = str_replace($siteUrlScheme . '://', $siteUrlScheme . ':\\\/\\\/', $siteUrl);
+
+        // 获取当前 URL 的协议
+        $urlScheme = parse_url($url)['scheme'];
+        // 将当前 URL 中的协议替换为 JSON 格式
+        $urlJson = str_replace($urlScheme . '://', $urlScheme . ':\\\/\\\/', $url);
+        // 获取数据库表前缀
         $prefix = Config::get('database.connections.' . Config::get('database.default') . '.prefix');
         $prefix = Config::get('database.connections.' . Config::get('database.default') . '.prefix');
+
+        // 构建 SQL 语句数组
         $sql = [
         $sql = [
+            "UPDATE `{$prefix}agent_level` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}agreement` SET `content` = replace(content ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article` SET `image_input` = replace(`image_input` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article` SET `image_input` = replace(`image_input` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_category` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_category` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_content` SET `content` = replace(`content` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}article_content` SET `content` = replace(`content` ,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}diy` SET `value` = replace(value ,'{$siteUrlJosn}','{$valueJosn}'),`default_value` = replace(default_value ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}luck_lottery` SET `image` = replace(image ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}luck_prize` SET `image` = replace(image ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_bargain` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
+            "UPDATE `{$prefix}cache` SET `result` = replace(result ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}delivery_service` SET `avatar` = replace(`avatar` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}division_agent_apply` SET `images` = replace(images ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}diy` SET `value` = replace(value ,'{$siteUrlJson}','{$urlJson}'),`default_value` = replace(default_value ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}live_anchor` SET `cover_img` = replace(`cover_img` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}live_goods` SET `cover_img` = replace(`cover_img` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}live_room` SET `cover_img` = replace(`cover_img` ,'{$siteUrl}','{$url}'),`share_img` = replace(`share_img` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}luck_lottery` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`content` = replace(content ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}luck_prize` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}member_card_batch` SET `qrcode` = replace(qrcode ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}member_right` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}out_interface` SET `return_params` = replace(return_params ,'{$siteUrl}','{$url}'),`request_example` = replace(request_example ,'{$siteUrl}','{$url}'),`return_example` = replace(return_example ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}qrcode` SET `url` = replace(url ,'{$siteUrl}','{$url}'),`qrcode_url` = replace(qrcode_url ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_bargain` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
             "UPDATE `{$prefix}store_category` SET `pic` = replace(`pic` ,'{$siteUrl}','{$url}'),`big_pic` = replace(`big_pic` ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_category` SET `pic` = replace(`pic` ,'{$siteUrl}','{$url}'),`big_pic` = replace(`big_pic` ,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}store_combination` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_integral` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_product` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`slider_image` = replace(slider_image ,'{$siteUrlJosn}','{$valueJosn}'),`recommend_image` = replace(recommend_image ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}store_product_attr_result` SET `result` = replace(result ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_combination` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_integral` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_integral_order` SET `image` = replace(`image` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_order_cart_info` SET `cart_info` = replace(cart_info ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_order_refund` SET `refund_img` = replace(refund_img ,'{$siteUrl}','{$url}'),`cart_info` = replace(cart_info,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_pink` SET `avatar` = replace(`avatar` ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_product` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`slider_image` = replace(slider_image ,'{$siteUrlJson}','{$urlJson}'),`recommend_image` = replace(recommend_image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_product_attr_result` SET `result` = replace(result ,'{$siteUrlJson}','{$urlJson}')",
             "UPDATE `{$prefix}store_product_attr_value` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_product_attr_value` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_product_description` SET `description`= replace(description,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}store_product_description` SET `description`= replace(description,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}store_seckill` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJosn}','{$valueJosn}')",
+            "UPDATE `{$prefix}store_product_reply` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}'),`pics` = replace(pics,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_seckill` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`images` = replace(images,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_service` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}store_service_log` SET `msn` = replace(msn ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}store_service_record` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}'),`message` = replace(message,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}system_admin` SET `head_pic` = replace(head_pic ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}system_attachment` SET `att_dir` = replace(att_dir ,'{$siteUrl}','{$url}'),`satt_dir` = replace(satt_dir ,'{$siteUrl}','{$url}')",
             "UPDATE `{$prefix}system_attachment` SET `att_dir` = replace(att_dir ,'{$siteUrl}','{$url}'),`satt_dir` = replace(satt_dir ,'{$siteUrl}','{$url}')",
-            "UPDATE `{$prefix}system_config` SET `value` = replace(value ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}system_group_data` SET `value` = replace(value ,'{$siteUrlJosn}','{$valueJosn}')",
-            "UPDATE `{$prefix}user` SET `avatar` = replace(avatar ,'{$siteUrlJosn}','{$valueJosn}')",
+            "UPDATE `{$prefix}system_config` SET `value` = replace(value ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}system_config` SET `value` = replace(value ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}system_group_data` SET `value` = replace(value ,'{$siteUrlJson}','{$urlJson}')",
+            "UPDATE `{$prefix}system_store` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`oblong_image` = replace(oblong_image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}system_store_staff` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}system_user_level` SET `image` = replace(image ,'{$siteUrl}','{$url}'),`icon` = replace(icon ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}user` SET `avatar` = replace(avatar ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}user_extract` SET `qrcode_url` = replace(qrcode_url ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}wechat_qrcode` SET `image` = replace(image ,'{$siteUrl}','{$url}')",
+            "UPDATE `{$prefix}wechat_user` SET `headimgurl` = replace(headimgurl ,'{$siteUrl}','{$url}')",
         ];
         ];
 
 
-        return Db::transaction(function () use ($sql) {
+        // 执行 SQL 语句
+        return $this->transaction(function () use ($sql) {
             try {
             try {
                 foreach ($sql as $item) {
                 foreach ($sql as $item) {
                     Db::execute($item);
                     Db::execute($item);
@@ -104,6 +141,4 @@ class Util extends Command
             }
             }
         });
         });
     }
     }
-
-
 }
 }

+ 1 - 1
crmeb/crmeb/services/AliPayService.php

@@ -258,7 +258,7 @@ class AliPayService
         $postOrder['trade_status'] = $paramInfo['trade_status'] ?? '';
         $postOrder['trade_status'] = $paramInfo['trade_status'] ?? '';
         //备注
         //备注
         $postOrder['attach'] = isset($paramInfo['passback_params']) ? urldecode($paramInfo['passback_params']) : '';
         $postOrder['attach'] = isset($paramInfo['passback_params']) ? urldecode($paramInfo['passback_params']) : '';
-        if (in_array($paramInfo['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED']) && $this->verifyNotify($paramInfo)) {
+        if (in_array($paramInfo['trade_status'], ['TRADE_SUCCESS', 'TRADE_FINISHED'])/** && $this->verifyNotify($paramInfo) **/) {
             try {
             try {
                 if ($notifyFn((object)$postOrder)) {
                 if ($notifyFn((object)$postOrder)) {
                     return 'success';
                     return 'success';

+ 0 - 3
crmeb/crmeb/services/app/MiniProgramService.php

@@ -912,9 +912,6 @@ class MiniProgramService
                         case 'trade_manage_remind_shipping':   // 曾经发过货的小程序,订单超过48小时未发货时
                         case 'trade_manage_remind_shipping':   // 曾经发过货的小程序,订单超过48小时未发货时
                             break;
                             break;
                         case 'trade_manage_order_settlement':     // 订单完成发货时  订单结算时
                         case 'trade_manage_order_settlement':     // 订单完成发货时  订单结算时
-                            if (isset($message['estimated_settlement_time'])) { //订单完成发货时
-                                MiniOrderService::notifyConfirmByTradeNo($message['merchant_trade_no'], time());
-                            }
                             if (isset($message['confirm_receive_method'])) {  // 订单结算时
                             if (isset($message['confirm_receive_method'])) {  // 订单结算时
                                 /** @var StoreOrderTakeServices $StoreOrderTakeServices */
                                 /** @var StoreOrderTakeServices $StoreOrderTakeServices */
                                 $storeOrderTakeServices = app()->make(StoreOrderTakeServices::class);
                                 $storeOrderTakeServices = app()->make(StoreOrderTakeServices::class);

+ 1 - 1
crmeb/crmeb/services/upload/storage/Qiniu.php

@@ -235,7 +235,7 @@ class Qiniu extends BaseUpload
             if (strpos($filePath, '?') === false) {
             if (strpos($filePath, '?') === false) {
                 $filePath .= '?watermark';
                 $filePath .= '?watermark';
             } else {
             } else {
-                $filePath .= '&watermark';
+                $filePath .= '|watermark';
             }
             }
             switch ($waterConfig['watermark_type']) {
             switch ($waterConfig['watermark_type']) {
                 case 1://图片
                 case 1://图片

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/index.html


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/app.0ee7d88c.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/app.9806600e.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-0441c5de.9dfdc9a6.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-6d06de8a.1c35f548.css


+ 1 - 0
crmeb/public/admin/system_static/css/chunk-05144782.ee3cb7bf.css

@@ -0,0 +1 @@
+.treeSel[data-v-2b2bef54] .ivu-select-dropdown-list{padding:0 10px!important;-webkit-box-sizing:border-box;box-sizing:border-box}.tabBox_img[data-v-2b2bef54]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-2b2bef54]{width:100%;height:100%}

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-05350300.84922742.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-061b084e.cd13fc3d.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-071887cb.68de37ff.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-081c9142.78c3202d.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-08c6a66a.950a799d.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-09e1de10.3544555a.css


+ 1 - 0
crmeb/public/admin/system_static/css/chunk-0d15b554.f4b06bfc.css

@@ -0,0 +1 @@
+.tabBox_img[data-v-c389c67a]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-c389c67a]{width:100%;height:100%}

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-0f2eff24.89052f8a.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-0f31d873.267957b0.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-0f7cd2d5.b559bb70.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-3fcef210.e6fc8c53.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-122806b2.adf19434.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-1334fe21.4d8bf09c.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-15f7d94c.77da8061.css


+ 1 - 0
crmeb/public/admin/system_static/css/chunk-1be532f1.85cd61ce.css

@@ -0,0 +1 @@
+.tabBox_img[data-v-2810af32]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-2810af32]{width:100%;height:100%}.modelBox .ivu-table-header[data-v-2810af32],.modelBox[data-v-2810af32]{width:100%!important}.trees-coadd[data-v-2810af32]{width:100%;height:385px}.trees-coadd .scollhide[data-v-2810af32]{width:100%;height:100%;overflow-x:hidden;overflow-y:scroll}.scollhide[data-v-2810af32]::-webkit-scrollbar{display:none}

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-1bfe63a9.ae7af909.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-df752094.13e3c004.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-3d880a35.b45b6815.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-51ddb0a2.67b981f9.css


+ 0 - 1
crmeb/public/admin/system_static/css/chunk-1f0eae17.b9b68614.css

@@ -1 +0,0 @@
-[data-v-68e8971f].ivu-tag-cyan .ivu-tag-text{color:#19be6b!important}.ivu-tag-cyan[data-v-68e8971f]{background:rgba(25,190,170,.1);border-color:#19be6b!important}.tabBox_img[data-v-68e8971f]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-68e8971f]{width:100%;height:100%}

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-203ac582.015eb7a4.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-68324a74.b703c32f.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-24f136a9.a5c9a08e.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-2659c75c.ea365e7f.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-28a52e3a.1ead9aed.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-29275e57.2405dfe1.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-09b16939.e8ee1a02.css


+ 0 - 1
crmeb/public/admin/system_static/css/chunk-2b871724.22a2443d.css

@@ -1 +0,0 @@
-.radio[data-v-224af4d2]{margin-bottom:14px}.radio[data-v-224af4d2] .name{width:125px;text-align:right;padding-right:12px}.treeSel[data-v-077e55d2].ivu-select-dropdown-list{padding:0 10px!important;-webkit-box-sizing:border-box;box-sizing:border-box}.tabBox_img[data-v-077e55d2]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-077e55d2]{width:100%;height:100%}

Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-2f85dde8.2dc79992.css


+ 0 - 1
crmeb/public/admin/system_static/css/chunk-30857213.316d11d3.css

@@ -1 +0,0 @@
-[data-v-400862b0].ivu-form-item-content{line-height:unset!important}

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-336cef99.df712523.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-34df47f1.65cdc85e.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-35062175.09870511.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-36a0bc14.49f2cb42.css


crmeb/public/admin/system_static/css/chunk-b1777400.687c9aa5.css → crmeb/public/admin/system_static/css/chunk-3725f2c3.687c9aa5.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-37d51f92.3bb1af7d.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-55fcbf36.229444fd.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-3b540e7d.4838aec1.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-3c3e2944.0f3c5d8f.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
crmeb/public/admin/system_static/css/chunk-3eccb15d.56ab1092.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-3f50d1a4.516fee41.css


+ 0 - 1
crmeb/public/admin/system_static/css/chunk-3fdb3472.6d46767b.css

@@ -1 +0,0 @@
-.tabBox_img[data-v-14910b8d]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-14910b8d]{width:100%;height:100%}

+ 0 - 1
crmeb/public/admin/system_static/css/chunk-41a8136e.867c88b3.css

@@ -1 +0,0 @@
-[data-v-944cf578].ivu-table-cell-tree{border:0;font-size:15px;background-color:unset}[data-v-944cf578].ivu-table-cell-tree .ivu-icon-ios-add:before{content:"\F11F"}[data-v-944cf578].ivu-table-cell-tree .ivu-icon-ios-remove:before{content:"\F116"}.button[data-v-944cf578]{width:300px}

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-430ad2ac.4533e8aa.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
crmeb/public/admin/system_static/css/chunk-43e98519.eac902cb.css


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
crmeb/public/admin/system_static/css/chunk-681859a5.af22a330.css


+ 0 - 0
crmeb/public/admin/system_static/css/chunk-464b7017.6c9f67f5.css


Деякі файли не було показано, через те що забагато файлів було змінено