zhangjidong преди 1 седмица
ревизия
86c40bb3f5
променени са 100 файла, в които са добавени 24256 реда и са изтрити 0 реда
  1. 46 0
      .gitignore
  2. 1 0
      .user.ini
  3. 1 0
      .well-known/acme-challenge/y51k7nfhr2o5mv8n6rypoww9h9bjmuja
  4. 29 0
      LICENSE.md
  5. 16 0
      bin/base.php
  6. 124 0
      bin/http.conf.php
  7. 9 0
      bin/server.php
  8. BIN
      bootstrap.php
  9. 0 0
      cashier/assets/css/app.d896c117.css
  10. 0 0
      cashier/assets/css/chunk-07b7b134.d78e3999.css
  11. 0 0
      cashier/assets/css/chunk-6159273a.d161e7fe.css
  12. 0 0
      cashier/assets/css/chunk-ef9e9492.9e6b86d7.css
  13. 8 0
      cashier/assets/css/chunk-vendors.2e0c4e1f.css
  14. BIN
      cashier/assets/fonts/element-icons.535877f5.woff
  15. BIN
      cashier/assets/fonts/element-icons.732389de.ttf
  16. BIN
      cashier/assets/img/kong.4e2c4cff.png
  17. 0 0
      cashier/assets/js/app.8d9fa6c1.js
  18. 0 0
      cashier/assets/js/chunk-07b7b134.b5ecd25c.js
  19. 1 0
      cashier/assets/js/chunk-2d0c8062.832e010d.js
  20. 0 0
      cashier/assets/js/chunk-6159273a.82302495.js
  21. 0 0
      cashier/assets/js/chunk-ef9e9492.c4b7fd83.js
  22. 4 0
      cashier/assets/js/chunk-vendors.692d1b3b.js
  23. BIN
      cashier/favicon.ico
  24. 1 0
      cashier/index.html
  25. 101 0
      commands/CopyrightController.php
  26. 33 0
      commands/HelloController.php
  27. 194 0
      commands/SyncVerifyCard.php
  28. 34 0
      commands/UserController.php
  29. 60 0
      composer.json
  30. 181 0
      config/action.php
  31. 536 0
      config/business_model/food_permission.php
  32. 1426 0
      config/business_model/platform_permission.php
  33. 190 0
      config/business_model/scan_permission.php
  34. 79 0
      config/console.php
  35. 807 0
      config/ext.php
  36. 741 0
      config/interface_permission.php
  37. 284 0
      config/mch_permission.php
  38. 12 0
      config/params.php
  39. 2715 0
      config/permission.php
  40. 10 0
      config/queue.php
  41. 13 0
      config/redis.php
  42. 592 0
      config/saas_admin_permission.php
  43. 89 0
      config/saas_bd_agent_permission.php
  44. 142 0
      config/saas_front_agent_permission.php
  45. 57 0
      config/saas_goods_agent_permission.php
  46. 46 0
      config/saas_mch_brands_permission.php
  47. 485 0
      config/saas_mch_permission.php
  48. 116 0
      config/saas_md_permission.php
  49. 156 0
      config/saas_permission.php
  50. 1805 0
      config/saas_store_cloud_permission.php
  51. 2899 0
      config/saas_store_permission.php
  52. 37 0
      config/saas_supplier_permission.php
  53. 9 0
      config/supplier_permission.php
  54. 164 0
      config/web.php
  55. 120 0
      constants/AdminPickLink.php
  56. 12 0
      constants/Kefu.php
  57. 2890 0
      constants/MchPickLink.php
  58. 410 0
      constants/NavbarLink.php
  59. 1396 0
      constants/OptionSetting.php
  60. 1033 0
      constants/PickLink.php
  61. 740 0
      constants/StoreImageFrom.php
  62. 3049 0
      events/OrderEvent.php
  63. 276 0
      events/SupplierOrderEvent.php
  64. BIN
      favicon.ico
  65. BIN
      h5/alipay-order/static/images/sj.png
  66. BIN
      h5/assets/bg1.3bc9b1c3.png
  67. BIN
      h5/assets/coupon2.ec77f16c.png
  68. BIN
      h5/assets/editor-icon.e359ff7f.ttf
  69. BIN
      h5/assets/index-icon3.6d1d6ecd.png
  70. BIN
      h5/assets/index-icon5.d6fc2320.png
  71. BIN
      h5/chart-gpt/static/image/tabbar-icon-1-active.png
  72. BIN
      h5/chart-gpt/static/image/tabbar-icon-1.png
  73. BIN
      h5/chart-gpt/static/image/tabbar-icon-2-active.png
  74. BIN
      h5/chart-gpt/static/image/tabbar-icon-2.png
  75. BIN
      h5/chart-gpt/static/image/tabbar-icon-3-active.png
  76. BIN
      h5/chart-gpt/static/image/tabbar-icon-3.png
  77. BIN
      h5/chart-gpt/static/image/tabbar-icon-qa-active.png
  78. BIN
      h5/chart-gpt/static/image/tabbar-icon-qa.png
  79. 75 0
      h5/chart-gpt/static/js/tabbarJson.js
  80. BIN
      h5/distribution/static/images/order/z_1.png
  81. BIN
      h5/distribution/static/images/order/z_2.png
  82. BIN
      h5/distribution/static/images/order/z_3.png
  83. BIN
      h5/global/static/image/alignment.png
  84. BIN
      h5/global/static/image/globalIcon.png
  85. BIN
      h5/global/static/image/globalList.png
  86. BIN
      h5/global/static/image/globalLog.png
  87. BIN
      h5/global/static/image/globalPool.png
  88. BIN
      h5/global/static/image/globalTi.png
  89. BIN
      h5/global/static/image/icon6.png
  90. BIN
      h5/global/static/image/pool.png
  91. BIN
      h5/goods/static/images/goods-group-price-header.png
  92. BIN
      h5/goods/static/images/jiangjia.png
  93. 2 0
      h5/index.html
  94. BIN
      h5/livestockAdoption/static/images/land/address.png
  95. BIN
      h5/livestockAdoption/static/images/land/cat.png
  96. BIN
      h5/livestockAdoption/static/images/land/check.png
  97. BIN
      h5/livestockAdoption/static/images/land/index.png
  98. BIN
      h5/livestockAdoption/static/images/land/kefu.png
  99. BIN
      h5/livestockAdoption/static/images/land/monitor.png
  100. BIN
      h5/livestockAdoption/static/images/land/no_check.png

+ 46 - 0
.gitignore

@@ -0,0 +1,46 @@
+# phpstorm project files
+.idea
+
+# netbeans project files
+nbproject
+
+# zend studio for eclipse project files
+.buildpath
+.project
+.settings
+/config/db.php
+
+# windows thumbnail cache
+Thumbs.db
+
+# composer vendor dir
+/vendor
+/tools/php-cs-fixer
+
+# composer itself is not needed
+composer.phar
+
+# Mac DS_Store Files
+.DS_Store
+
+# phpunit itself is not needed
+phpunit.phar
+# local phpunit config
+/phpunit.xml
+
+tests/_output/*
+tests/_support/_generated
+
+#vagrant folder
+/.vagrant
+
+xhprof_html
+xhprof_lib
+
+
+/web/admin/*
+admin/*
+diy/*
+composer.lock
+install/data/runtime/Cache
+install/data/runtime/Logs

+ 1 - 0
.user.ini

@@ -0,0 +1 @@
+open_basedir=/www/wwwroot/39.102.210.196/:/tmp/

+ 1 - 0
.well-known/acme-challenge/y51k7nfhr2o5mv8n6rypoww9h9bjmuja

@@ -0,0 +1 @@
+y51k7nfhr2o5mv8n6rypoww9h9bjmuja.r0OPD2kIKmkpAvLxSCVbu46irSkE1s-uUM2P4V76Wr8

+ 29 - 0
LICENSE.md

@@ -0,0 +1,29 @@
+Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+ * Neither the name of Yii Software LLC nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.

+ 16 - 0
bin/base.php

@@ -0,0 +1,16 @@
+<?php
+
+defined('YII_DEBUG') or define('YII_DEBUG', false);
+defined('YII_ENV') or define('YII_ENV', 'prod');
+define('IS_SAAS', true);
+define('DEFAULT_STORE_ID', 1);
+define('RUN_MODE', 'wokerman');
+
+
+require __DIR__ . '/../vendor/autoload.php';
+require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
+require __DIR__ . '/../librarys/Application.php';
+
+$config = require __DIR__ . '/../config/web.php';
+
+(new app\librarys\WebApplication($config))->init();

+ 124 - 0
bin/http.conf.php

@@ -0,0 +1,124 @@
+<?php
+use Workerman\Connection\TcpConnection;
+TcpConnection::$defaultMaxPackageSize = 10485760;
+return [
+    'name' => 'chidian', //服务名
+    'ip' => '0.0.0.0', //监听地址
+    'port' => 6504, //监听地址
+    'init_php' => __DIR__.'/base.php', //初始文件
+    'php_run' => function($req, $connection = null) {
+        // 心跳及空闲示例
+        $lifetimeTimer = \HttpForPHP\WorkerLifetimeTimer::instance(3, 15);
+        $lifetimeTimer->onHeartbeat = function () { //间隔数据库连接检测
+            \Yii::$app->db->createCommand('select 1')->queryOne();
+        };
+        $lifetimeTimer->onIdle = function () { //空闲释放
+            \Yii::$app->db->close();
+        };
+        $lifetimeTimer->run();
+        // 处理插件路由
+        $getParams = $req->get();
+        $route = isset($getParams['r']) ? $getParams['r'] : null;
+        if ($route && strpos($route, 'plugin') !== false) {
+            if (preg_match('/client\/v(\d+)\/plugin\/(.*)/', $route, $matches)) {
+                // 客户端插件
+                $_GET['r'] = sprintf('client/v%d/plugin/callback', $matches[1]);
+                $_GET['callback'] = $matches[2];
+            } else {
+                // 后台插件
+                $callback = str_replace('admin/plugins/', '', $route);
+                $_GET['r'] = 'admin/plugins/callback';
+                $_GET['callback'] = $callback;
+            }
+        }
+
+        ob_start();
+        $app = Yii::$app;
+
+        // 设置请求头
+        $headers = \HttpForPHP\SrvBase::$instance->getHeader($req);
+        foreach ($headers as $name=>$value){
+            $app->request->headers->set($name, $value);
+        }
+        // 设置请求参数
+        $app->request->setHostInfo($req->header('Chidian-Host', null));
+        $app->request->setBaseUrl(null);
+        $app->request->setScriptUrl(null);
+        $app->request->setPathInfo(null);
+        $app->request->setUrl(null);
+        $app->request->setQueryParams($_GET);
+        $app->request->setBodyParams($_POST);
+        $app->request->setRawBody(\HttpForPHP\SrvBase::$instance->getRawBody($req));
+
+        try{
+            $checkCache = cache()->exists('wokerman_update');
+            if ($checkCache) {
+                posix_kill(posix_getppid(), SIGUSR1);
+                cache()->delete('wokerman_update');
+            }
+            $app->checkAuthByWokerman($req);
+            $app->run();
+        } catch (\Exception $e) {
+            $msg = $e->getMessage();
+            $failReloadMsg = [
+                'MySQL server has gone away',
+                'Failed to write to socket', #Failed to write to socket. 0 of 34 bytes written.
+                'Failed to read from socket',
+                'Error while sending QUERY',
+                'read error on connection to', #read error on connection to 192.168.0.186:6379
+            ];
+            #因m异常断开重启进程
+            foreach ($failReloadMsg as $fail) {
+                if (strpos($msg, $fail) !== false) {
+                    \HttpForPHP\Log::write(sprintf('line:%s, file:%s, err:%s, trace:%s',$e->getLine(), $e->getFile(), $e->getMessage(), $e->getTraceAsString()), 'err');
+                    \HttpForPHP\SrvBase::$instance->stopWorker();
+                    break;
+                }
+            }
+
+            if ($msg != 'Page not found.' && $msg != '页面未找到。') {
+                \HttpForPHP\Log::write(sprintf('line:%s, file:%s, err:%s, trace:%s',$e->getLine(), $e->getFile(), $e->getMessage(), $e->getTraceAsString()), 'err');
+            }
+
+            echo \HttpForPHP\Helper::toJson(\HttpForPHP\Helper::fail($e->getCode().':'.$msg));
+        }
+        $content = ob_get_clean();
+
+        // 常驻服务需要清除信息
+        $app->request->getHeaders()->removeAll();
+        $app->response->clear();
+
+        if ($connection === null) { //是异步任务
+            //\HttpForPHP\Log::write($content, 'task');
+        } else {
+            $code = \Yii::$app->response->getStatusCode();
+            $header = ['Access-Control-Allow-Origin' => '*']; //'Content-Type'=>'application/json; charset=utf-8',
+            if (\Yii::$app->response->headers->count()) { //header头处理
+                \Yii::$app->response->headers->set('Access-Control-Allow-Origin', '*');
+                foreach (\Yii::$app->response->headers as $name => $values) {
+                    $name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $name)));
+                    $header[$name] = end($values);
+                }
+                unset($header['Link']);
+            } else {
+                $header['Content-Type'] = 'application/json; charset=utf-8';
+            }
+            $header['X-Req'] = 'chidian';
+
+            // 发送http
+            \HttpForPHP\SrvBase::$instance->httpSend($connection, $code, $header, $content);
+        }
+        unset($content);
+
+        return true;
+    }, //自定义php运行函数
+    'setting' => [
+        'count' => cpu_count() * 4,    // 异步非阻塞CPU核数的1-4倍最合理 同步阻塞按实际情况来填写 如50-100
+        #'task_worker_num' => 10, //异步任务进程数 配置了异步处理才能生效  异步处理耗时过多的会阻塞后续的异步处理请求
+        #'max_request' => 500, //最大请求数 默认0 进程内达到此请求重启进程 可能存在不规范的代码造成内存泄露 这里达到一定请求释放下内存
+        'stdoutFile' => __DIR__ . '/wokerman/http.log', //终端输出
+        'pidFile' => __DIR__ . '/wokerman/http.pid',
+        'logFile' => __DIR__ . '/wokerman/http.log', //日志文件
+        # 'user' => 'www', //设置worker/task子进程的进程用户 提升服务器程序的安全性
+    ]
+];

+ 9 - 0
bin/server.php

@@ -0,0 +1,9 @@
+#!/usr/bin/env php
+<?php
+define('LOG_PATH', __DIR__.'/log');
+error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+require_once __DIR__ . '/../vendor/autoload.php';
+$_SERVER['SCRIPT_FILENAME'] = __FILE__;
+
+$srv = new \HttpForPHP\WorkerManSrv(require(__DIR__ . '/http.conf.php'));
+$srv->run($argv);

BIN
bootstrap.php


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/css/app.d896c117.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/css/chunk-07b7b134.d78e3999.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/css/chunk-6159273a.d161e7fe.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/css/chunk-ef9e9492.9e6b86d7.css


Файловите разлики са ограничени, защото са твърде много
+ 8 - 0
cashier/assets/css/chunk-vendors.2e0c4e1f.css


BIN
cashier/assets/fonts/element-icons.535877f5.woff


BIN
cashier/assets/fonts/element-icons.732389de.ttf


BIN
cashier/assets/img/kong.4e2c4cff.png


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/js/app.8d9fa6c1.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/js/chunk-07b7b134.b5ecd25c.js


+ 1 - 0
cashier/assets/js/chunk-2d0c8062.832e010d.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c8062"],{"52b1":function(n,t,e){"use strict";e.r(t);var u=function(){var n=this,t=n._self._c;return t("div",[n._v(" 设置 ")])},c=[],d={name:"AntdDiyAdminSet",data(){return{}},mounted(){},methods:{}},a=d,i=e("2877"),o=Object(i["a"])(a,u,c,!1,null,"137467c4",null);t["default"]=o.exports}}]);

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/js/chunk-6159273a.82302495.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cashier/assets/js/chunk-ef9e9492.c4b7fd83.js


Файловите разлики са ограничени, защото са твърде много
+ 4 - 0
cashier/assets/js/chunk-vendors.692d1b3b.js


BIN
cashier/favicon.ico


+ 1 - 0
cashier/index.html

@@ -0,0 +1 @@
+<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>收银台</title><link href="assets/css/chunk-07b7b134.d78e3999.css" rel="prefetch"><link href="assets/css/chunk-6159273a.d161e7fe.css" rel="prefetch"><link href="assets/css/chunk-ef9e9492.9e6b86d7.css" rel="prefetch"><link href="assets/js/chunk-07b7b134.b5ecd25c.js" rel="prefetch"><link href="assets/js/chunk-2d0c8062.832e010d.js" rel="prefetch"><link href="assets/js/chunk-6159273a.82302495.js" rel="prefetch"><link href="assets/js/chunk-ef9e9492.c4b7fd83.js" rel="prefetch"><link href="assets/css/app.d896c117.css" rel="preload" as="style"><link href="assets/css/chunk-vendors.2e0c4e1f.css" rel="preload" as="style"><link href="assets/js/app.8d9fa6c1.js" rel="preload" as="script"><link href="assets/js/chunk-vendors.692d1b3b.js" rel="preload" as="script"><link href="assets/css/chunk-vendors.2e0c4e1f.css" rel="stylesheet"><link href="assets/css/app.d896c117.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but diy-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="assets/js/chunk-vendors.692d1b3b.js"></script><script src="assets/js/app.8d9fa6c1.js"></script></body></html>

+ 101 - 0
commands/CopyrightController.php

@@ -0,0 +1,101 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\commands;
+
+use yii\console\Controller;
+use yii\console\ExitCode;
+
+/**
+ * copyright command
+ * @package app\commands
+ * @author Syan mzsongyan@gmail.com
+ * @date 2022-05-30
+ */
+class CopyrightController extends Controller
+{
+    /**
+     * 批量更新或添加文件版权信息
+     * @return int 
+     * @author Syan mzsongyan@gmail.com
+     * @date 2022-05-30
+     */
+    public function actionUpdate()
+    {
+        $allFile = $this->allFiles(\Yii::$app->basepath, '*.php', [\Yii::$app->basepath . '/vendor']);
+        foreach ($allFile as $file) {
+            $this->addCopyright($file);
+        }
+        
+        return ExitCode::OK;
+    }
+
+    /**
+     * 
+     * @param mixed $file 
+     * @return bool 
+     * @author Syan mzsongyan@gmail.com
+     * @date 2022-05-30
+     */
+    private function addCopyright($file)
+    {
+        $content = file_get_contents($file);
+        if ($content === false) {
+            return false;
+        }
+$copyright = <<<COPYRIGHT
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+COPYRIGHT;
+
+        $content = preg_replace_callback('/\<\?php(\s+)?(\/\*\*.*?\*\/)?/mis', function ($matches) use ($copyright) {
+            $result = '<?php' . PHP_EOL . $copyright;
+            if (!isset($matches[2])) {
+                $result .= PHP_EOL;
+            }
+            return $result;
+        }, $content);
+
+        file_put_contents($file, $content, LOCK_EX);
+        return true;
+    }
+
+    /**
+     * 根据给出的路径获取所有相关文件
+     * @param string $dir 
+     * @param string $pattern 
+     * @param array $exclude 排除路径
+     * @return array 
+     * @author Syan mzsongyan@gmail.com
+     * @date 2022-05-30
+     */
+    private function allFiles(string $dir, string $pattern = '*', array $exclude = [])
+    {
+        $result = [];
+
+        $items = glob($dir . '/' . $pattern, GLOB_BRACE);
+        foreach ($items as $item) {
+            if (is_file($item)) {
+                $result[] = $item;
+            }
+        }
+
+        $items = glob($dir . '/*', GLOB_ONLYDIR);
+        foreach ($items as $item) {
+            if (is_dir($item)) {
+                if (in_array($item, $exclude)) {
+                    continue;
+                }
+                $result = array_merge($result, $this->allFiles($item, $pattern));
+            }
+        }
+
+        return $result;
+    }
+}

+ 33 - 0
commands/HelloController.php

@@ -0,0 +1,33 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\commands;
+
+use yii\console\Controller;
+use yii\console\ExitCode;
+
+/**
+ * This command echoes the first argument that you have entered.
+ *
+ * This command is provided as an example for you to learn how to create console commands.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @since 2.0
+ */
+class HelloController extends Controller
+{
+    /**
+     * This command echoes what you have entered as the message.
+     * @param string $message the message to be echoed.
+     * @return int Exit code
+     */
+    public function actionIndex($message = 'hello world')
+    {
+        echo $message . "\n";
+
+        return ExitCode::OK;
+    }
+}

+ 194 - 0
commands/SyncVerifyCard.php

@@ -0,0 +1,194 @@
+<?php
+
+/**
+ * @file SyncVerifyCard
+ * @editor Created by vscode
+ * @author WPing丶
+ * @date 2024/11/19
+ * @time 14:22:25
+ *
+ * 备注:同步储值卡消费记录
+ */
+
+namespace app\commands;
+
+use app\models\Order;
+use app\models\OrderRefund;
+use app\models\User;
+use app\models\VerifyCard;
+use app\models\VerifyCardLog;
+use app\models\VerifyCardSale;
+use yii\console\Controller;
+
+class SyncVerifyCard extends Controller
+{
+    /**
+     * 模块名:index
+     * 代码描述:同步储值卡消费记录
+     * 作者:WPing丶
+     * 请求方式:GET
+     * 创建时间:2024/11/19 14:31:15
+     */
+    public function actionIndex()
+    {
+        //清空所有储值卡的消费记录数据(兼容有脏数据的情况,一般情况下注释)
+        VerifyCardLog::updateAll([
+            'use_price' => 0,
+            'use_order_ids' => null,
+            'is_complete' => 0,
+        ]);
+        $usersWithBalancePay = User::find()
+            ->alias('u') // 给 User 表起一个别名
+            ->leftJoin(['o' => Order::tableName()], 'u.id = o.user_id') // 连接 Order 表
+            ->leftJoin(['r' => OrderRefund::tableName()], 'r.order_id = o.id') // 连接 OrderRefund 表
+            ->leftJoin(['vcl' => VerifyCardLog::tableName()], 'vcl.user_id = u.id') // 连接 VerifyCardLog 表
+            ->where([
+                'o.is_pay' => 1,          // 订单已支付
+                'o.is_delete' => 0,       // 未删除
+                'o.is_recycle' => 0       // 未被回收
+            ])
+            ->andWhere([
+                'or',
+                ['o.pay_type' => 3],    // 使用余额支付
+                [
+                    'or',
+                    [
+                        'and',
+                        'o.is_combine_pay' => 1,    //  组合支付
+                        ['>', 'combine_money', 0]   //  且余额抵扣大于0
+                    ],
+                    ['>', 'o.balance', 0]
+                ]
+            ])
+            ->andWhere(['<>', 'o.trade_status', 1]) // 排除交易状态为 1 的订单
+            ->andWhere(['IS NOT', 'vcl.id', null]) // 排除没有储值卡的用户
+            ->andWhere([
+                'or',
+                ['r.id' => null],         // 没有退款记录
+                ['<>', 'r.status', 1]     // 或者退款状态不是 1
+            ])
+            ->select('u.id') // 查询用户的 ID
+            ->distinct() // 去重
+            ->column(); // 获取所有用户 ID
+        debug_log('待同步的User_id:'.implode(',', $usersWithBalancePay) , 'VerifyCard.log');
+        foreach($usersWithBalancePay as $user_id) {
+            //查询出用户所有的储值卡
+            $card_list = VerifyCardLog::find()->alias('vcl')
+                ->leftJoin(['vcs' => VerifyCardSale::tableName()], 'vcl.sale_id=vcs.id')
+                ->leftJoin(['vc' => VerifyCard::tableName()], 'vcs.verify_card_id=vc.id')
+                ->where([
+                    'vcl.store_id' => 1, 
+                    'vc.type' => 3, 
+                    'vcl.user_id' => $user_id,
+                    'vcl.type' => VerifyCardLog::WRITE_TYPE_EXCHANGE,
+                    'vcl.is_complete' => 0,
+                ])
+                ->select('vc.total_price as price, vcl.*')
+                ->orderBy(['vcl.use_time' => SORT_ASC])
+                ->asArray()
+                ->all();
+            debug_log('用户User_id:'.$user_id.',的已激活储值卡' , 'VerifyCard.log');
+            debug_log(json_encode($card_list,JSON_UNESCAPED_UNICODE), 'VerifyCard.log');
+            
+            // if(count($card_list) == 0) {
+            //     //用户没有储值卡的跳出循环
+            //     continue;
+            // }
+            $order_balance = 0;
+            $last_order_id = 0;
+            $last_order_ids = [];
+            foreach($card_list as $card) {
+                $time = $card['use_time'];
+                $order_list = Order::find()->alias('o')
+                    ->leftJoin(['r' => OrderRefund::tableName()], 'r.order_id = o.id') // 连接 OrderRefund 表
+                    ->where([
+                        'o.is_pay' => 1,          // 订单已支付
+                        'o.is_delete' => 0,       // 未删除
+                        'o.is_recycle' => 0,       // 未被回收
+                        'o.user_id' => $user_id,
+                    ])
+                    ->andWhere([
+                        'or',
+                        ['o.pay_type' => 3],    // 使用余额支付
+                        [
+                            'or',
+                            [
+                                'and',
+                                'o.is_combine_pay' => 1,    //  组合支付
+                                ['>', 'combine_money', 0]   //  且余额抵扣大于0
+                            ],
+                            ['>', 'o.balance', 0]
+                        ]
+                    ])
+                    ->andWhere(['<>', 'o.trade_status', 1]) // 排除交易状态为 1 的订单
+                    ->andWhere(['>', 'o.pay_time', $time]) // 订单支付时间要大于储值卡的激活时间
+                    ->andWhere(['NOT IN', 'o.id', $last_order_ids]) // 订单支付时间要大于储值卡的激活时间
+                    ->andWhere([
+                        'or',
+                        ['r.id' => null],         // 没有退款记录
+                        ['<>', 'r.status', 1]     // 或者退款状态不是 1
+                    ])
+                    ->select('o.*')
+                    ->orderBy(['o.pay_time' => SORT_ASC])
+                    ->asArray()
+                    ->all();
+                // if(count($order_list) == 0) {
+                //     //用户有储值卡但未下单的跳出循环
+                //     continue 2;
+                // }
+                foreach($order_list as $order) {
+                    $pay_price = $order['combine_money'] > 0 ? $order['combine_money'] : $order['pay_price'];
+                    $log = VerifyCardLog::findOne($card['id']);
+                    $card_balance = bcsub($card['price'],$log->use_price,2);//卡内余额
+                    if($order['id'] == $last_order_id) {
+                        $pay_price = $order_balance;
+                    }
+                    if($pay_price <= $card_balance) {
+                        //储值卡内余额足以支付这笔订单
+                        $log->use_price += $pay_price;
+                        if($log->use_order_ids) {
+                            $use_order_ids = explode(',', $log->use_order_ids);
+                            $use_order_ids[] = $order['id'];
+                            $log->use_order_ids = implode(',', $use_order_ids);
+                        } else {
+                            $log->use_order_ids = $order['id'];
+                        }
+                        if($pay_price == $card_balance) {//如果储值卡内余额刚好够支付当前订单
+                            $log->is_complete = 1;
+                        }
+                        if (!$log->save()) {
+                            debug_log('储值卡消费记录保存失败', 'VerifyCard.log');
+                            debug_log($log->errors, 'VerifyCard.log');
+                        }
+                        $order_balance = 0;
+                        $last_order_id = 0;
+                        debug_log('OKOKOKOKOKOKOKOKOKOK,用户User_id:'.$user_id.'的用户于'.date('Y-m-d H:i:s',$order['pay_time']).'使用card_id为'.$card['id'].'的储值卡,支付了order_no为'.$order['order_no'].'的订单后,储值卡还剩下:¥'.bcsub($card_balance,$pay_price,2).'元' , 'VerifyCard.log');
+                        $last_order_ids[] = $order['id'];
+                        if($pay_price == $card_balance) {
+                            continue 2;
+                        }
+                    } else {
+                        //储值卡内余额不足支付这笔订单
+                        $log->use_price += $card_balance;
+                        if($log->use_order_ids) {
+                            $use_order_ids = explode(',', $log->use_order_ids);
+                            $use_order_ids[] = $order['id'];
+                            $log->use_order_ids = implode(',', $use_order_ids);
+                        } else {
+                            $log->use_order_ids = $order['id'];
+                        }
+                        $log->is_complete = 1;
+                        if (!$log->save()) {
+                            debug_log('储值卡消费记录保存失败', 'VerifyCard.log');
+                            debug_log($log->errors, 'VerifyCard.log');
+                        }
+                        $order_balance = bcsub($pay_price, $card_balance, 2);
+                        $last_order_id = $order['id'];
+                        debug_log('NONONONONONONONONONO,用户User_id:'.$user_id.'的用户于'.date('Y-m-d H:i:s',$order['pay_time']).'使用card_id为'.$card['id'].'的储值卡,支付了order_no为'.$order['order_no'].'的订单后,储值卡还剩下:¥0元' , 'VerifyCard.log');
+                        continue 2;
+                    }
+                }
+            }
+        }
+    }
+}

+ 34 - 0
commands/UserController.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\commands;
+
+use yii\console\Controller;
+use yii\console\ExitCode;
+use app\models\User;
+
+class UserController extends Controller
+{
+    /**
+     * 重建用户关系
+     * @return int Exit code
+     */
+    public function actionRebuild()
+    {
+        $stores = User::find()->select('store_id')->groupBy('store_id')->asArray()->all();
+        foreach ($stores as $store) {
+            $users = User::find()->where(['store_id' => $store['store_id']])->all();
+            foreach ($users as $user) {
+                echo 'store_id:' . $store['store_id'] . ' user_id:' . $user->id . ' => 重建中' . PHP_EOL;
+                $user->rebuildTreePath();
+                $user->getBehavior('oldTreePath')->rebuildTreePath();
+                echo 'store_id:' . $store['store_id'] . ' user_id:' . $user->id . ' => 重建完成' . PHP_EOL;
+            }
+        }
+
+        return ExitCode::OK;
+    }
+}

+ 60 - 0
composer.json

@@ -0,0 +1,60 @@
+{
+    "name": "cyy/quanqudao",
+    "description": "cyy",
+    "keywords": ["yii2", "framework", "basic", "project template"],
+    "homepage": "http://www.yiiframework.com/",
+    "type": "project",
+    "license": "BSD-3-Clause",
+    "support": {
+        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
+        "forum": "http://www.yiiframework.com/forum/",
+        "wiki": "http://www.yiiframework.com/wiki/",
+        "irc": "irc://irc.freenode.net/yii",
+        "source": "https://github.com/yiisoft/yii2"
+    },
+    "minimum-stability": "stable",
+    "require": {
+        "php": ">=7.2.0",
+        "yidas/yii2-bower-asset": "~2.0.5",
+        "yiisoft/yii2": "~2.0.14",
+        "yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0",
+        "yiisoft/yii2-redis": "^2.0",
+        "ext-json": "*",
+        "ext-pdo": "*",
+        "yiisoft/yii2-queue": "^2.3",
+        "firebase/php-jwt": "^5.2",
+        "guzzlehttp/guzzle": "6.3",
+        "aliyuncs/oss-sdk-php": "^2.4",
+        "qiniu/php-sdk": "^7.3",
+        "comodojo/zip": "2.0",
+        "overtrue/socialite": "^3.1",
+        "w7corp/easywechat": "^5.4",
+        "overtrue/easy-sms": "^1.3",
+        "qcloud/cos-sdk-v5": "^2.1",
+        "mzsongyan/express": "dev-master",
+        "mzsongyan/supports": "dev-main",
+        "mzsongyan/pay": "dev-main",
+        "curl/curl": "^2.3",
+        "claviska/simpleimage": "^3.6",
+        "tencentcloud/iotcloud": "^3.0",
+        "spatie/simple-excel": "^1.13",
+        "stbz-supply/php-sdk": "^1.0",
+        "tencentcloud/tiia": "^3.0",
+        "ext-bcmath": "*"
+    },
+    "require-dev": {
+        "squizlabs/php_codesniffer": "3.*"
+    },
+    "autoload": {
+        "files": [
+            "modules/helpers.php"
+        ]
+    },
+    "config": {
+        "allow-plugins": {
+            "yiisoft/yii2-composer": false,
+            "easywechat-composer/easywechat-composer": false,
+            "fxp/composer-asset-plugin": true
+        }
+    }
+}

+ 181 - 0
config/action.php

@@ -0,0 +1,181 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// 本文件配置操作日志
+return [
+    'admin/auth/login' => [
+        'desc' => '登录了系统',
+        'type' => 'login',
+    ],
+    'admin/auth/create-admin' => [
+        'desc' => '创建了账号',
+        'type' => 'add',
+    ],
+    'admin/auth/edit-admin' => [
+        'desc' => '编辑了账号',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/auth/delete-admin' => [
+        'desc' => '删除了账号',
+        'key' => 'id',
+        'type' => 'del',
+    ],
+    'admin/auth/create-role' => [
+        'desc' => '创建了角色',
+        'type' => 'add',
+    ],
+    'admin/auth/edit-role' => [
+        'desc' => '编辑了角色',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/auth/delete-role' => [
+        'desc' => '删除了角色',
+        'key' => 'key',
+        'type' => 'del',
+    ],
+    'admin/setting/save-setting' => [
+        'desc' => '编辑设置',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/goods/save' => [
+        'desc' => '编辑商品',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/goods/add' => [
+        'desc' => '添加商品',
+        'key' => 'key',
+        'type' => 'add',
+    ],
+    'admin/goods/set-attribute' => [
+        'desc' => '编辑商品属性',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/goods/status' => [
+        'desc' => '编辑商品状态',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/goods/full-minus-edit' => [
+        'desc' => '编辑商品满减活动',
+        'key' => 'goods_id',
+        'type' => 'edit',
+    ],
+    'admin/setting/setting/save-setting' => [
+        'desc' => '编辑功能设置',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/postage/save' => [
+        'desc' => '编辑运费规则',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/setting/postage/status' => [
+        'desc' => '编辑运费规则状态',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/setting/free/save' => [
+        'desc' => '编辑包邮规则',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/free/del' => [
+        'desc' => '删除包邮规则',
+        'key' => 'id',
+        'type' => 'del',
+    ],
+    'admin/setting/territorial/save' => [
+        'desc' => '编辑区域设置',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/offer-price/save' => [
+        'desc' => '编辑起送规则',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/refund-address/save' => [
+        'desc' => '编辑退货地址',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/refund-address/del' => [
+        'desc' => '删除退货地址',
+        'key' => 'id',
+        'type' => 'del',
+    ],
+    'admin/notice/notice-save' => [
+        'desc' => '编辑消息通知',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/sms/index' => [
+        'desc' => '编辑短信配置',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/express/save' => [
+        'desc' => '编辑电子面单',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/express/del' => [
+        'desc' => '删除电子面单',
+        'key' => 'id',
+        'type' => 'del',
+    ],
+    'admin/setting/cloud/save-setting' => [
+        'desc' => '编辑云打印设置',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/cloud/save' => [
+        'desc' => '编辑云打印',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/setting/cloud/del' => [
+        'desc' => '删除云打印设置',
+        'key' => 'id',
+        'type' => 'del',
+    ],
+    'admin/setting/printer/save-setting' => [
+        'desc' => '编辑小票打印设置',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/setting/printer/save' => [
+        'desc' => '编辑小票打印',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/setting/printer/del' => [
+        'desc' => '删除小票打印',
+        'key' => 'id',
+        'type' => 'del',
+    ],
+    'admin/cache/submit' => [
+        'desc' => '清除缓存',
+        'key' => 'key',
+        'type' => 'edit',
+    ],
+    'admin/goods/cat-save' => [
+        'desc' => '编辑分类',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+    'admin/attr-library/save' => [
+        'desc' => '编辑规格库',
+        'key' => 'id',
+        'type' => 'edit',
+    ],
+];

+ 536 - 0
config/business_model/food_permission.php

@@ -0,0 +1,536 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// 点餐模式
+return [
+    [
+        'key' => 'userManage',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'userManagement',
+                'title' => '用户管理',
+                'children' => [
+                    [
+                        'key' => 'userManagementView',
+                        'title' => '查看',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'userManagementDetails',
+                        'title' => '用户详情',
+                        'children' => [
+                            [
+                                'key' => 'userManagementDetailsEditUser',
+                                'title' => '编辑用户',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'userManagementDetailsSetProperty',
+                                'title' => '设置积分/余额',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ]
+                ],
+            ],
+            [
+                'key' => 'memberManage',
+                'title' => '会员等级',
+                'children' => [
+                    [
+                        'key' => 'memberLevel',
+                        'title' => '会员等级',
+                        'children' => [
+                            [
+                                'key' => 'memberLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'levelOrderList',
+                        'title' => '购买记录'
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userStoreClerk',
+                'title' => '核销员',
+                'children' => [],
+            ]
+        ]
+    ],
+    [
+        'key' => 'storeProfit',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'storeAccount',
+                'title' => '结算账户',
+            ],
+            [
+                'key' => 'storeCash',
+                'title' => '结算提现',
+            ],
+            [
+                'key' => 'profitSharingRecord',
+                'title' => '分账记录'
+            ],
+        ]
+    ],
+    [
+        'key' => 'setting',
+        'title' => '系统',
+        'children' => [
+            [
+                'key' => 'settingEdit',
+                'title' => '功能设置',
+                'children' => [
+                    [
+                        'key' => 'store',
+                        'title' => '基础设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'basicEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                ],
+            ],
+            [
+                'key' => 'printSetting',
+                'title' => '打印设置',
+                'children' => [
+                    [
+                        'key' => 'express',
+                        'title' => '电子面单',
+                        'children' => [
+                            [
+                                'key' => 'expressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'cloud',
+                        'title' => '云打印设置',
+                        'children' => [
+                            [
+                                'key' => 'cloudAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printer',
+                        'title' => '小票打印',
+                        'children' => [
+                            [
+                                'key' => 'printerAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'unionShopSetting',
+                'title' => '联盟店铺',
+            ],
+            [
+                'key' => 'SettingVoiceBroadcast',
+                'title' => '收款播报设置',
+            ],
+            [
+                'key' => 'delivery',
+                'title' => '配送设置'
+            ]
+        ],
+    ],
+    [
+        'key' => 'channel',
+        'title' => '渠道/端口',
+        'children' => [
+            [
+                'key' => 'appletManagementWechat',
+                'title' => '微信小程序',
+                'children' => [
+                    [
+                        'key' => 'payIncoming',
+                        'title' => '支付进件'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'appletManagementAlipay',
+                'title' => '支付宝小程序',
+                'children' => [
+                    [
+                        'key' => 'miniConfigAlipay',
+                        'title' => '小程序管理'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderSameCityList',
+                'title' => '同城订单',
+                'children' => [
+                    [
+                        'key' => 'orderSameCityListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderSameCityListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderSameCityListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderSameCityListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+                'children' => [
+                    [
+                        'key' => 'orderOfflineListVerify',
+                        'title' => '核销',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderOfflineListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderOfflineListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'orderRefundListConfirmReceive',
+                        'title' => '确认收货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseExchange',
+                        'title' => '拒绝换货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeRefund',
+                        'title' => '同意退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseRefund',
+                        'title' => '拒绝退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeExchange',
+                        'title' => '同意换货',
+                    ],
+                ],
+            ],
+        ]
+    ],
+
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'industryCategory',
+                'title' => '行业类',
+                'children' => [
+                    [
+                        'key' => 'cityDelivery',
+                        'title' => '微信同城配送',
+                    ],
+                    [
+                        'key' => 'food',
+                        'title' => '点餐管理',
+                        'children' => [
+                            [
+                                'key' => 'foodGoods',
+                                'title' => '商品管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodGoodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsSetting',
+                                        'title' => '设置',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'foodCat',
+                                'title' => '分类',
+                                'children' => [
+                                    [
+                                        'key' => 'foodCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodEditEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodTable',
+                                'title' => '餐桌管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodTableAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableQrcode',
+                                        'title' => '二维码',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodSetting',
+                                'title' => '设置',
+                            ],
+                            [
+                                'key' => 'foodQrcode',
+                                'title' => '店铺点餐二维码',
+                            ],
+                            [
+                                'key' => 'saasAllianceCoupon',
+                                'title' => '联盟券',
+                            ],
+                            [
+                                'key' => 'foodSlide',
+                                'title' => '轮播图',
+                                'children' => [
+                                    [
+                                        'key' => 'foodSlideAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'storeLocalDelivery',
+                        'title' => '同城自配',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'thirdCategory',
+                'title' => '第三方',
+                'children' => [
+                    [
+                        'key' => 'keloop',
+                        'title' => '快跑者',
+                    ],
+                    [
+                        'key' => 'saasAdapay',
+                        'title' => '汇付支付',
+                    ],
+                    [
+                        'key' => 'saasYunst',
+                        'title' => '通联支付',
+                    ],
+                ]
+            ],
+
+        ]
+    ],
+
+];

+ 1426 - 0
config/business_model/platform_permission.php

@@ -0,0 +1,1426 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版商城菜单权限
+return [
+    [
+        'key' => 'goods',
+        'title' => '商品',
+        'children' => [
+            [
+                'key' => 'goodsList',
+                'title' => '商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesHotelGoods',
+                'title' => '酒店预约商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesServiceGoods',
+                'title' => '服务预约商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesVirtualGoods',
+                'title' => '虚拟商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesViewGoods',
+                'title' => '展示类商品',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'catList',
+                'title' => '分类列表',
+                'children' => [
+                    [
+                        'key' => 'catEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catAdd',
+                        'title' => '新增',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catBatchEdit',
+                        'title' => '批量操作',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'attrList',
+                'title' => '规格库',
+                'children' => [
+                    [
+                        'key' => 'attrEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrBatchDelete',
+                        'title' => '批量删除',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'goodsBrand',
+                'title' => '品牌列表'
+            ],
+            [
+                'key' => 'goodsRecommendKeyword',
+                'title' => '推荐发现关键词',
+                'children' => [
+                    [
+                        'key' => 'recommendKeywordAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordDel',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordBatchDel',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'userManage',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'userManagement',
+                'title' => '用户管理',
+                'children' => [
+                    [
+                        'key' => 'userManagementView',
+                        'title' => '查看',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'userManagementDetails',
+                        'title' => '用户详情',
+                        'children' => [
+                            [
+                                'key' => 'userManagementDetailsEditUser',
+                                'title' => '编辑用户',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'userManagementDetailsSetProperty',
+                                'title' => '设置积分/余额',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ]
+                ],
+            ],
+            [
+                'key' => 'memberManage',
+                'title' => '会员等级',
+                'children' => [
+                    [
+                        'key' => 'memberLevel',
+                        'title' => '会员等级',
+                        'children' => [
+                            [
+                                'key' => 'memberLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'levelOrderList',
+                        'title' => '购买记录'
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userAdmin',
+                'title' => '手机端管理员',
+                'children' => [
+                    [
+                        'key' => 'userAdminAdd',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+
+                        'key' => 'userAdminDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userStoreClerk',
+                'title' => '核销员',
+                'children' => [],
+            ]
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderSameCityList',
+                'title' => '同城订单',
+                'children' => [
+                    [
+                        'key' => 'orderSameCityListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderSameCityListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderSameCityListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderSameCityListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+           [
+               'key' => 'orderOfflineList',
+               'title' => '自提订单',
+               'children' => [
+                   [
+                       'key' => 'orderOfflineListVerify',
+                       'title' => '核销',
+                       'type' => 'action',
+                   ],
+                   [
+                       'key' => 'orderOfflineListCancel',
+                       'title' => '取消',
+                       'type' => 'action',
+                   ],
+                   [
+                       'key' => 'orderOfflineListDetails',
+                       'title' => '详情',
+                   ],
+                   [
+                       'key' => 'orderOfflineListPrint',
+                       'title' => '打印',
+                   ],
+                   [
+                       'key' => 'orderOfflineListReceiptPrint',
+                       'title' => '小票打印',
+                   ],
+                   [
+                       'key' => 'orderOfflineListAddRemark',
+                       'title' => '添加备注',
+                   ],
+                   [
+                       'key' => 'orderOfflineListMoveRecycle',
+                       'title' => '移入回收站',
+                   ],
+               ],
+           ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'orderRefundListConfirmReceive',
+                        'title' => '确认收货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseExchange',
+                        'title' => '拒绝换货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeRefund',
+                        'title' => '同意退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseRefund',
+                        'title' => '拒绝退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeExchange',
+                        'title' => '同意换货',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderScanList',
+                'title' => '当面付订单',
+            ],
+            [
+                'key' => 'orderComment',
+                'title' => '评价管理',
+                'children' => [
+                    [
+                        'key' => 'orderCommentRely',
+                        'title' => '回复',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentHide',
+                        'title' => '隐藏',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'storeProfit',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'storeAccount',
+                'title' => '结算账户',
+            ],
+            [
+                'key' => 'storeCash',
+                'title' => '结算提现',
+            ],
+            [
+                'key' => 'profitSharingRecord',
+                'title' => '分账记录'
+            ],
+//            [
+//                'key' => 'mdPrice',
+//                'title' => '门店佣金'
+//            ],
+//            [
+//                'key' => 'userPrice',
+//                'title' => '会员佣金'
+//            ],
+            [
+                'key' => 'userMoney',
+                'title' => '用户余额'
+            ],
+        ]
+    ],
+    [
+        'key' => 'setting',
+        'title' => '系统',
+        'children' => [
+            [
+                'key' => 'settingEdit',
+                'title' => '功能设置',
+                'children' => [
+                    [
+                        'key' => 'store',
+                        'title' => '基础设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'basicEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wechat',
+                        'title' => '微信设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'weixinEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'display',
+                        'title' => '显示设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'displayEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                ],
+            ],
+            [
+                'key' => 'rulesSetting',
+                'title' => '规则设置',
+                'children' => [
+                    [
+                        'key' => 'postageList',
+                        'title' => '运费规则',
+                        'children' => [
+                            [
+                                'key' => 'postageAdd',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'freeDelivery',
+                        'title' => '包邮规则',
+                        'children' => [
+                            [
+                                'key' => 'freeDeliveryAdd',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'territorial',
+                        'title' => '区域限购',
+                        'children' => [
+                            [
+                                'key' => 'areaEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'offerPrice',
+                        'title' => '起送规则',
+                        'children' => [
+                            [
+                                'key' => 'offerPriceAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'refundAddress',
+                        'title' => '退货地址设置',
+                        'children' => [
+                            [
+                                'key' => 'refundAddressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'noticeConfig',
+                'title' => '消息通知',
+            ],
+            [
+                'key' => 'printSetting',
+                'title' => '打印设置',
+                'children' => [
+                    [
+                        'key' => 'express',
+                        'title' => '电子面单',
+                        'children' => [
+                            [
+                                'key' => 'expressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'cloud',
+                        'title' => '云打印设置',
+                        'children' => [
+                            [
+                                'key' => 'cloudAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printer',
+                        'title' => '小票打印',
+                        'children' => [
+                            [
+                                'key' => 'printerAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'authManage',
+                'title' => '员工权限',
+                'children' => [
+                    [
+                        'key' => 'accountManage',
+                        'title' => '账号管理',
+                        'children' => [
+                            [
+                                'key' => 'accountManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'accountManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'accountManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'roleManage',
+                        'title' => '角色管理',
+                        'children' => [
+                            [
+                                'key' => 'roleManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'roleManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'roleManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'unionShopSetting',
+                'title' => '联盟店铺',
+            ],
+
+            [
+                'key' => 'SettingVoiceBroadcast',
+                'title' => '收款播报设置',
+            ],
+            [
+                'key' => 'appConfigLock',
+                'title' => 'App配置',
+            ]
+        ]
+    ],
+    [
+        'key' => 'newDiy',
+        'title' => '装修',
+    ],
+    [
+        'key' => 'channel',
+        'title' => '渠道/端口',
+        'children' => [
+            [
+                'key' => 'appletManagementWechat',
+                'title' => '微信小程序',
+                'children' => [
+                    [
+                        'key' => 'payIncoming',
+                        'title' => '支付进件'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'alipayCertConfig',
+                'title' => '证书配置'
+            ],
+        ]
+    ],
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'marketingCategory',
+                'title' => '营销类',
+                'children' => [
+                    [
+                        'key' => 'couponManage',
+                        'title' => '优惠券',
+                        'children' => [
+                            [
+                                'key' => 'couponList',
+                                'title' => '优惠券列表',
+                                'children' => [
+                                    [
+                                        'key' => 'couponListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListDetails',
+                                        'title' => '详情',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListSend',
+                                        'title' => '发放',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'couponListManageBusiness',
+                                'title' => '联盟优惠券',
+                                'children' => [
+                                    [
+                                        'key' => 'couponListManageBusinessEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListManageBusinessAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListManageBusinessDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListManageBusinessDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+
+                        ],
+                    ],
+                    [
+                        'key' => 'cardCouponManage',
+                        'title' => '卡券',
+                        'children' => [
+                            [
+                                'key' => 'cardCouponView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'seckill',
+                        'title' => '限时秒杀',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'ActivityNewUser',
+                        'title' => '新人专享',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'ActivityCutPrice',
+                        'title' => '砍价',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'ActivityOrderRebateSelf',
+                        'title' => '消费全返',
+                        'children' => []
+                    ],
+                    [
+                        'key' => 'pintuan',
+                        'title' => '拼团',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'integralStore',
+                        'title' => '积分商城',
+                        'children' => [
+                            [
+                                'key' => 'integralStoreGoods',
+                                'title' => '积分商品',
+                            ],
+                            [
+                                'key' => 'integralStoreCat',
+                                'title' => '商品分类',
+                            ],
+                            [
+                                'key' => 'integralStoreSetting',
+                                'title' => '积分设置',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'saasAllianceCoupon',
+                        'title' => '联盟券',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'resourceCategory',
+                'title' => '资源类',
+                'children' => [
+                    [
+                        'key' => 'topicManage',
+                        'title' => '专题',
+                        'children' => [
+                            [
+                                'key' => 'topicList',
+                                'title' => '专题列表',
+                                'children' => [
+                                    [
+                                        'key' => 'topicAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'topicCat',
+                                'title' => '专题分类',
+                                'children' => [
+                                    [
+                                        'key' => 'topicCatEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatAdd',
+                                        'title' => '新增',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action'
+                                    ]
+                                ]
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'videoManage',
+                        'title' => '视频',
+                        'children' => [
+                            [
+                                'key' => 'videoEdit',
+                                'title' => '编辑',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'videoAdd',
+                                'title' => '新增',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'videoDelete',
+                                'title' => '删除',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'videoBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action'
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'aboutArticleManage',
+                        'title' => '文章',
+                        'children' => [
+                            [
+                                'key' => 'articleAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'articleEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'articleDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'toolCategory',
+                'title' => '工具类',
+                'children' => [
+                    [
+                        'key' => 'scanCodePay',
+                        'title' => '收款码',
+                        'children' => [
+                            [
+                                'key' => 'scanCodePayStore',
+                                'title' => '店铺聚合收款码',
+                            ],
+                            [
+                                'key' => 'scanCodePayPlatform',
+                                'title' => '平台聚合收款码',
+                            ],
+                            [
+                                'key' => 'scanCodePayConfig',
+                                'title' => '收款码设置',
+                            ]
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'industryCategory',
+                'title' => '行业类',
+                'children' => [
+                    [
+                        'key' => 'activityBooking',
+                        'title' => '预约',
+                    ],
+                    [
+                        'key' => 'food',
+                        'title' => '点餐管理',
+                        'children' => [
+                            [
+                                'key' => 'foodGoods',
+                                'title' => '商品管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodGoodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsSetting',
+                                        'title' => '设置',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'foodCat',
+                                'title' => '分类',
+                                'children' => [
+                                    [
+                                        'key' => 'foodCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodEditEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodTable',
+                                'title' => '餐桌管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodTableAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableQrcode',
+                                        'title' => '二维码',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodSetting',
+                                'title' => '设置',
+                            ],
+                            [
+                                'key' => 'foodQrcode',
+                                'title' => '店铺点餐二维码',
+                            ],
+                            [
+                                'key' => 'foodSlide',
+                                'title' => '轮播图',
+                                'children' => [
+                                    [
+                                        'key' => 'foodSlideAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'storeLocalDelivery',
+                        'title' => '同城自配',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'thirdCategory',
+                'title' => '第三方',
+                'children' => [
+                    [
+                        'key' => 'yinbao',
+                        'title' => '银豹',
+                    ],
+                    [
+                        'key' => 'cloudMerchant',
+                        'title' => '云仓',
+                        'children' => [
+                            [
+                                'key' => 'cloudMerchantSelection',
+                                'title' => '云仓选品库',
+                                'children' => [
+                                    [
+                                        'key' => 'cloudMerchantSelectionView',
+                                        'title' => '查看详情',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantSelectionAdd',
+                                        'title' => '加入选品',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'cloudMerchantMyCloud',
+                                'title' => '我的云仓',
+                                'children' => [
+                                    [
+                                        'key' => 'cloudMerchantMyCloudEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantMyCloudQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantMyCloudCopyPath',
+                                        'title' => '复制小程序链接',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantMyCloudDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'cloudMerchantTransferOrder',
+                                'title' => '云仓转单',
+                            ],
+                            [
+                                'key' => 'cloudMerchantAccount',
+                                'title' => '我的账户',
+                            ],
+                            [
+                                'key' => 'cloudMerchantSetting',
+                                'title' => '云仓设置',
+                            ],
+                            [
+                                'key' => 'cloudMerchantPreviewNum',
+                                'title' => '云仓库存',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'maiyatian',
+                        'title' => '麦芽田',
+                    ],
+                    [
+                        'key' => 'keloop',
+                        'title' => '快跑者',
+                    ],
+                    [
+                        'key' => 'kefuSetting',
+                        'title' => '在线客服',
+                    ],
+                    [
+                        'key' => 'jushuitan',
+                        'title' => '聚水潭',
+                    ],
+                    [
+                        'key' => 'saasAdapay',
+                        'title' => '汇付支付',
+                    ],
+                    [
+                        'key' => 'saasYunst',
+                        'title' => '通联支付',
+                    ],
+                    [
+                        'key' => 'cityDelivery',
+                        'title' => '微信同城配送',
+                        'children' => [
+//                            [
+//                                'key' => 'WechatNewDelivery',
+//                                'title' => '同城配送',
+//                            ],
+                            [
+                                'key' => 'delivery',
+                                'title' => '同城配送',
+                            ]
+                        ]
+                    ],
+                ]
+            ],
+
+
+
+
+
+
+
+
+
+
+
+        ]
+    ]
+
+];

+ 190 - 0
config/business_model/scan_permission.php

@@ -0,0 +1,190 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// 当面付模式
+return [
+    [
+        'key' => 'setting',
+        'title' => '系统',
+        'children' => [
+            [
+                'key' => 'unionShopSetting',
+                'title' => '联盟店铺',
+            ],
+            [
+                'key' => 'SettingVoiceBroadcast',
+                'title' => '收款播报设置',
+            ],
+        ]
+    ],
+    [
+        'key' => 'userManage',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'userManagement',
+                'title' => '用户管理',
+                'children' => [
+                    [
+                        'key' => 'userManagementView',
+                        'title' => '查看',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'userManagementDetails',
+                        'title' => '用户详情',
+                        'children' => [
+                            [
+                                'key' => 'userManagementDetailsEditUser',
+                                'title' => '编辑用户',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'userManagementDetailsSetProperty',
+                                'title' => '设置积分/余额',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ]
+                ],
+            ],
+            [
+                'key' => 'memberManage',
+                'title' => '会员等级',
+                'children' => [
+                    [
+                        'key' => 'memberLevel',
+                        'title' => '会员等级',
+                        'children' => [
+                            [
+                                'key' => 'memberLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'levelOrderList',
+                        'title' => '购买记录'
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderScanList',
+                'title' => '当面付订单',
+            ],
+        ]
+    ],
+    [
+        'key' => 'storeProfit',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'storeAccount',
+                'title' => '结算账户',
+            ],
+            [
+                'key' => 'storeCash',
+                'title' => '结算提现',
+            ],
+            [
+                'key' => 'profitSharingRecord',
+                'title' => '分账记录'
+            ],
+        ]
+    ],
+
+    [
+        'key' => 'channel',
+        'title' => '渠道/端口',
+        'children' => [
+            [
+                'key' => 'appletManagementWechat',
+                'title' => '微信小程序',
+                'children' => [
+                    [
+                        'key' => 'payIncoming',
+                        'title' => '支付进件'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'appletManagementAlipay',
+                'title' => '支付宝小程序',
+                'children' => [
+                    [
+                        'key' => 'miniConfigAlipay',
+                        'title' => '小程序管理'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'marketingCategory',
+                'title' => '营销类',
+                'children' => [
+                    [
+                        'key' => 'saasAllianceCoupon',
+                        'title' => '联盟券',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'toolCategory',
+                'title' => '工具类',
+                'children' => [
+                    [
+                        'key' => 'scanCodePay',
+                        'title' => '收款码',
+                        'children' => [
+                            [
+                                'key' => 'scanCodePayConfig',
+                                'title' => '收款码设置',
+                            ]
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'thirdCategory',
+                'title' => '第三方',
+                'children' => [
+                    [
+                        'key' => 'saasAdapay',
+                        'title' => '汇付支付',
+                    ],
+                    [
+                        'key' => 'saasYunst',
+                        'title' => '通联支付',
+                    ],
+                ],
+            ],
+
+        ],
+    ],
+
+];

+ 79 - 0
config/console.php

@@ -0,0 +1,79 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+$params = require __DIR__ . '/params.php';
+$db = require __DIR__ . '/db.php';
+$redis = require __DIR__ . '/redis.php';
+$queue = require __DIR__ . '/queue.php';
+
+$config = [
+    'id' => 'cyy-console',
+    'basePath' => dirname(__DIR__),
+    'bootstrap' => ['log', 'queue'],
+    'controllerNamespace' => 'app\commands',
+    'aliases' => [
+
+    ],
+    'components' => [
+        'cache' => [
+            'class' => 'yii\caching\FileCache',
+            'fileMode' => 0777,
+        ],
+        'cacheLock' => [
+            'class' => 'yii\caching\FileCache',
+            'fileMode' => 0777,
+            'cachePath' => '@runtime/cacheLock',
+        ],
+        'log' => [
+            'targets' => [
+                [
+                    'class' => 'yii\log\FileTarget',
+                    'levels' => ['error', 'warning'],
+                    'fileMode' => 0777,
+//                    'maxLogFiles' => 300,
+//                ],
+//                [
+//                    'class' => 'yii\log\FileTarget',
+//                    'levels' => ['error', 'warning','info','trace','profile'],
+//                    'logVars'=>[],
+//                    //表示以yii\db\或者app\models\开头的分类都会写入这个文件
+//                    'categories'=>['yii\db\*'],
+//                    //表示写入到文件
+//                    'logFile'=>'@runtime/../runtime/logs/YIISQL_console_'.date('y_m_d').'.log',
+//                    'microtime' => true,
+                ],
+            ],
+        ],
+        'db' => $db,
+        'redis' => $redis,
+        'queue' => $queue,
+        'authManager' => [
+            'class' => 'yii\rbac\DbManager',
+        ],
+        'storage' => [
+            'class' => app\librarys\storage\components\StorageComponent::class,
+            'basePath' => 'web/uploads'
+        ],
+        'storageTemp' => [
+            'class' => app\librarys\storage\components\StorageComponent::class,
+            'basePath' => 'runtime/temp'
+        ],
+    ],
+    'params' => $params,
+    'timeZone' => 'PRC',
+    /*
+    'controllerMap' => [
+        'fixture' => [ // Fixture generation command line.
+            'class' => 'yii\faker\FixtureController',
+        ],
+    ],
+    */
+    'controllerMap' => [
+        'sync-verify-card' => 'app\commands\SyncVerifyCard',
+    ],
+];
+
+return $config;

+ 807 - 0
config/ext.php

@@ -0,0 +1,807 @@
+<?php
+
+return '[
+    {
+      "root": "costPointsAppreciation",
+      "pages": [
+        "index/index",
+        "groupProducts/groupProducts",
+        "withdrawal/withdrawal",
+        "conversion_points_ncrease/conversion_points_ncrease",
+        "goTransferRecord/goTransferRecord",
+        "withdrawalDetails/withdrawalDetails",
+        "postList/postList",
+        "goEditPost/goEditPost",
+        "myPosts/myPosts"
+      ]
+    },
+    {
+      "root": "salesCenter",
+      "pages": [
+        "index/index",
+        "code/code",
+        "commissionDetails/commissionDetails",
+        "withdrawalDetails/withdrawalDetails",
+        "educationAwardOrder/educationAwardOrder",
+        "withdrawal/withdrawal",
+        "groupProducts/groupProducts",
+        "myRecommendation/myRecommendation",
+        "superSalesList/superSalesList"
+      ]
+    },
+    {
+      "root": "givingGifts",
+      "pages": [
+        "giftCat/giftCat",
+        "index/index",
+        "giftAddress/giftAddress",
+        "myGift/myGift"
+      ]
+    },
+    {
+      "root": "pages/index",
+      "pages": [
+        "home",
+        "diy",
+        "my/my"
+      ],
+      "plugins": {
+        "B2bPlugin": {
+          "version": "latest",
+          "provider": "wx69b7451feb427f0e"
+        }
+      }
+    },
+    {
+      "root": "pages/cat",
+      "pages": [
+        "cat"
+      ]
+    },
+    {
+      "root": "pages/shoppingcart",
+      "pages": [
+        "shoppingcart"
+      ]
+    },
+    {
+      "root": "allianceStore",
+      "pages": [
+        "index/index"
+      ]
+    },
+    {
+      "root": "brandZone",
+      "pages": [
+        "index/index",
+        "brand/brand"
+      ]
+    },
+    {
+      "root": "pinduoGou",
+      "pages": [
+        "index/index",
+        "commissionDetails/commissionDetails",
+        "withdrawalDetails/withdrawalDetails",
+        "withdrawal/withdrawal",
+        "freezeCommission/freezeCommission",
+        "pinduogouArea/pinduogouArea",
+        "assistanceZone/assistanceZone",
+        "groupDetails/groupDetails",
+        "jointPurchaseZone/jointPurchaseZone",
+        "code/code",
+        "freezeDetails/freezeDetails",
+        "payList/payList"
+      ]
+    },
+    {
+      "root": "realNameAuthentication",
+      "pages": [
+        "index/index"
+      ]
+    },
+    {
+      "root": "cash_register",
+      "pages": [
+        "index/index",
+        "cashier/cashier",
+        "registerList/balanceRecharge",
+        "registerList/registerMember",
+        "registerList/giftDiscounts",
+        "registerList/operationRecord",
+        "registerList/orderList",
+        "changeUser/changeUser",
+        "searchPproducts/searchPproducts",
+        "orderSubmission/orderSubmission",
+        "orderSubmission/addressmanage",
+        "orderSubmission/addreceiving",
+        "registerList/guaList"
+      ]
+    },
+    {
+      "root": "teamCenter",
+      "pages": [
+        "teamCenterIndex/teamCenterIndex",
+        "educationAwardOrder/educationAwardOrder",
+        "myTeam/myTeam",
+        "commissionDetails/commissionDetails",
+        "withdrawalDetails/withdrawalDetails",
+        "withdrawal/withdrawal",
+        "phoneCode/phoneCode"
+      ]
+    },
+    {
+      "root": "mch_store",
+      "pages": [
+        "mchCommodity/mchCommodity",
+        "mchList/mchList",
+        "nearbyShops/nearbyShops"
+      ]
+    },
+    {
+      "root": "monthlyPaymentA",
+      "pages": [
+        "monthlyPaymentA/monthlyPaymentA",
+        "historyOrder/historyOrder",
+        "fiveBilling/fiveBilling"
+      ]
+    },
+    {
+      "root": "collocation",
+      "pages": [
+        "collocation/collocation",
+        "shareworks/shareworks"
+      ]
+    },
+    {
+      "root": "freeOrder",
+      "pages": [
+        "index/index",
+        "log/log"
+      ]
+    },
+    {
+      "root": "cropping",
+      "pages": [
+        "cropping/cropping",
+        "search_deng/search_deng"
+      ]
+    },
+    {
+      "root": "wxlive",
+      "pages": [
+        "live/live"
+      ]
+    },
+    {
+      "root": "kefu",
+      "pages": [
+        "kefu"
+      ]
+    },
+    {
+      "root": "other",
+      "pages": [
+        "list/list",
+        "insurance/search",
+        "insurance/detail",
+        "special/special",
+        "special/collect",
+        "special/topic",
+        "others/account-list",
+        "pushSettings/index",
+        "coupon_center/coupon_center",
+        "search/searchPage",
+        "pay/pay",
+        "downLoadApp/index",
+        "downLoadAllianceApp/index",
+        "webview/webview",
+        "offlinePayment/index",
+        "offlinePayment/file",
+        "brand/index",
+        "register/index",
+        "register/result",
+        "store_list/index",
+        "billDetails/index"
+      ]
+    },
+    {
+      "root": "admin",
+      "pages": [
+        "home/home",
+        "data/index",
+        "evaluate/list/index",
+        "evaluate/item/index",
+        "coupon/list/index",
+        "coupon/item/index",
+        "goods/list/index",
+        "goods/edit/index",
+        "goods/category/index",
+        "order/list/index",
+        "order/afterSales/index",
+        "order/item/index",
+        "order/delivery/index",
+        "address/addreceiving",
+        "address/addressmanage",
+        "shop/index/index",
+        "shop/edit/index",
+        "shop/info/index",
+        "login/login",
+        "mchRegister/mchRegister",
+        "storeManagement/storeManagement",
+        "accountWithdrawal/accountWithdrawal",
+        "promoteCode/promoteCode"
+      ]
+    },
+    {
+      "root": "user",
+      "pages": [
+        "add-share/index",
+        "balance/balance",
+        "balance/balance-tab",
+        "balance/account-balance",
+        "balance/balance-detail",
+        "balance/balance-bonus",
+        "balance/recharge",
+        "bind_phone/bind_phone",
+        "card-clerk/card-clerk",
+        "cash/cash",
+        "shop/cash",
+        "clerk/voucher",
+        "clerk/clerk",
+        "clerk/integralList",
+        "express/express",
+        "express-detail/express-detail",
+        "history/history",
+        "collection/collection",
+        "my_card_coupon/my_card_coupon",
+        "my_coupon/my_coupon",
+        "my_coupon/my_coupon_detail",
+        "my_coupon/get_coupon",
+        "my/addreceiving",
+        "my/addressmanage",
+        "my/article-detail",
+        "my/setting",
+        "my/feedback",
+        "my/nickname",
+        "my/mobile",
+        "my/password",
+        "write_off_card/write_off_card",
+        "write_off_card/write_index",
+        "write_off_card/write_detail",
+        "write_off_card/write_message",
+        "write_off_card/card-list/add-card",
+        "write_off_card/card-list/detail-card",
+        "write_off_card/card-list/password-card",
+        "write_off_card/card-list/exchange-card",
+        "write_off_card/card-list/record-card",
+        "write_off_card/card-list/clerk-record",
+        "write_off_card/card-list/message-card",
+        "write_off_card/card-list/shop-card",
+        "write_off_card/card-list/video-card",
+        "write_off_card/card-list/get-card",
+        "write_off_card/card-list/video-detail",
+        "write_off_card/card-list/exchange-success",
+        "write_off_card/recharge_card",
+        "write_off_card/failure_card",
+        "write_off_card/write_off_detail",
+        "write_off_card/write_off_code",
+        "write_off_card/write_off_record",
+        "write_off_card/card_qrcode/card_qrcode",
+        "write_off_card/card_write_card/card_write_card",
+        "value_card/value_card",
+        "share/index",
+        "share/commission-details",
+        "share-money/share-money",
+        "share-order/share-order",
+        "share-order/video",
+        "share-order/share",
+        "share-recharge-order/recharge-order",
+        "share-recharge-order/recharge",
+        "share-team/share-team",
+        "share-qrcode/share-qrcode",
+        "member/member_center",
+        "share/pay-list",
+        "share/add-card",
+        "new_balance/new_balance",
+        "mumberRule/mumberRule",
+        "goMyGrowthValue/goMyGrowthValue"
+      ]
+    },
+    {
+      "root": "face-pay",
+      "pages": [
+        "face-pay/collection",
+        "face-pay/record",
+        "face-pay/setPrice",
+        "face-pay/pay",
+        "face-pay/payOut",
+        "face-pay/result",
+        "face-pay/payOutRes",
+        "face-pay/myCoupons",
+        "face-pay/storeCoupon",
+        "face-pay/member",
+        "face-pay/order-list",
+        "face-pay/orderDetail"
+      ]
+    },
+    {
+      "root": "integral",
+      "pages": [
+        "integral/integral",
+        "integral/integralDetail",
+        "integral/list",
+        "integral/myIntegral",
+        "integral/myIntegralDetail",
+        "signIn/signIn",
+        "integralStore/index",
+        "integralStore/explain",
+        "integralStore/record",
+        "integralStore/goods"
+      ]
+    },
+    {
+      "root": "alipay-order",
+      "pages": [
+        "appointment/appointment",
+        "appointment/result",
+        "orderMeal/orderMeal",
+        "shop/shop",
+        "order/order",
+        "order/list",
+        "goods/goods",
+        "spellOrder/index"
+      ]
+    },
+    {
+      "root": "order",
+      "pages": [
+        "order-submit/order-submit",
+        "order-comment/order-comment",
+        "order/order",
+        "order-detail/order-detail",
+        "order-refund-list/order-refund-list",
+        "order-refund/order-refund",
+        "order-refund-detail/order-refund-detail",
+        "pay-another/pay-another"
+      ]
+    },
+    {
+      "root": "salesman",
+      "pages": [
+        "salesman/index",
+        "juniorShop/juniorShop",
+        "checkShop/checkShop",
+        "withdraw/withdraw",
+        "application/list",
+        "application/chooseType",
+        "application/complete",
+        "application/aliComplete",
+        "application/application",
+        "application/write",
+        "order/list",
+        "salesman/code",
+        "salesman/applyShop",
+        "salesman/agencyCenter"
+      ]
+    },
+    {
+      "root": "agency",
+      "pages": [
+        "agency/commissionDetail",
+        "agency/lowerLevelShop",
+        "agency/renewOrder",
+        "agency/shopOrder"
+      ]
+    },
+    {
+      "root": "new_store",
+      "pages": [
+        "main/info",
+        "wechat/complete",
+        "wechat/wechantPayMent",
+        "wechat/weQrcode",
+        "main/ali_info",
+        "ali/complete",
+        "ali/GetPhone",
+        "ali/aliQrcode",
+        "main/ali_qrcode"
+      ]
+    },
+    {
+      "root": "md_admin",
+      "pages": [
+        "apply-md/apply",
+        "apply-md/richText",
+        "apply-md/apply-result",
+        "md-center/md",
+        "md-center/setting",
+        "md-center/user-list",
+        "md-center/self-mention",
+        "staff-center/staff",
+        "staff-center/add-staff",
+        "staff-center/staff-list",
+        "staff-center/staff-order",
+        "order-detail/order-detail",
+        "md-center/md-order",
+        "md-center/cash-summary",
+        "md-center/commission-list",
+        "withdraw/index",
+        "withdraw/pay-list",
+        "withdraw/add-card",
+        "member/member",
+        "md-center/promotionER",
+        "md-center/commodityManagement"
+      ]
+    },
+    {
+      "root": "goods",
+      "pages": [
+        "goods/goods",
+        "goods/comment",
+        "selectSelfPickup/selectSelfPickup",
+        "erpScan/index/index",
+        "erpScan/list/index"
+      ]
+    },
+    {
+      "root": "shareholder",
+      "pages": [
+        "shareholder/conditions",
+        "shareholder/goods",
+        "shareholder/index",
+        "shareholder/code",
+        "apply/apply",
+        "apply/apply-result",
+        "order/list",
+        "order/holder-list",
+        "finance/withdraw",
+        "team/index",
+        "level/level",
+        "finance/commission",
+        "withdraw/index",
+        "withdraw/pay-list",
+        "withdraw/add-card",
+        "frost/frost"
+      ]
+    },
+    {
+      "root": "videoGoods",
+      "pages": [
+        "register/index",
+        "list/index",
+        "add/index",
+        "imgDetails/index",
+        "videoDetails/index",
+        "report/index",
+        "userInfo/index",
+        "fans/index"
+      ]
+    },
+    {
+      "root": "livestockAdoption",
+      "pages": [
+        "index/index",
+        "adopt_detail/adopt_detail",
+        "adopt_order/adopt_order",
+        "adopt_agreement/adopt_agreement",
+        "my_order/my_order",
+        "order_detail/order_detail",
+        "adopt_pay/adopt_pay",
+        "cost_list/list",
+        "cost_dateil/cost_dateil",
+        "camera/camera"
+      ]
+    },
+    {
+      "root": "source",
+      "pages": [
+        "mySource/mySource",
+        "fillSource/fillSource",
+        "index/index",
+        "history/history",
+        "record/record",
+        "detail/detail",
+        "historyPlus/historyPlus",
+        "editSource/editSource",
+        "videoValue/videoValue"
+      ]
+    },
+    {
+      "root": "single-store",
+      "pages": [
+        "applyShop/applyShop"
+      ]
+    },
+    {
+      "root": "seckill",
+      "pages": [
+        "list/index"
+      ]
+    },
+    {
+      "root": "shop",
+      "pages": [
+        "list/index",
+        "md/md-list",
+        "newMap/newMap",
+        "newAdderss/newAdderss"
+      ]
+    },
+    {
+      "root": "marketing/newUser",
+      "pages": [
+        "index/index",
+        "list/index"
+      ]
+    },
+    {
+      "root": "marketing/video",
+      "pages": [
+        "list/index",
+        "item/index"
+      ]
+    },
+    {
+      "root": "marketing/serviceHome",
+      "pages": [
+        "category/index/index",
+        "engineer/list/index",
+        "engineer/item/index",
+        "goods/item/index",
+        "order/list/index",
+        "order/item/index",
+        "order/progress/index",
+        "order/evaluate/index",
+        "collect/index"
+      ]
+    },
+    {
+      "root": "marketing/booking",
+      "pages": [
+        "index/index"
+      ]
+    },
+    {
+      "root": "marketing/publicRanking",
+      "pages": [
+        "index/index",
+        "bind/index",
+        "taskIndex/index",
+        "goods/index",
+        "tutorial/index",
+        "tutorial/accept",
+        "tutorial/goods",
+        "commission/index",
+        "publicOrder/index",
+        "order/index"
+      ]
+    },
+    {
+      "root": "pt",
+      "pages": [
+        "index/index",
+        "rule/index",
+        "order/index",
+        "square/index",
+        "detail/index"
+      ]
+    },
+    {
+      "root": "marketing/curPrice",
+      "pages": [
+        "index/index",
+        "order/list/index",
+        "active/index",
+        "rule/index"
+      ]
+    },
+    {
+      "root": "recharge",
+      "pages": [
+        "list",
+        "item"
+      ]
+    },
+    {
+      "root": "marketing/mutate",
+      "pages": [
+        "index",
+        "record"
+      ]
+    },
+    {
+      "root": "chart-gpt",
+      "pages": [
+        "index/index",
+        "chart/chart",
+        "moban/moban",
+        "task/task",
+        "pay/pay",
+        "qa-list/qa-list"
+      ]
+    },
+    {
+      "root": "chain",
+      "pages": [
+        "index/index",
+        "teamData/index",
+        "commission/index",
+        "frozenAmount/index"
+      ]
+    },
+    {
+      "root": "login",
+      "pages": [
+        "login/login_page",
+        "login/login_res",
+        "login/register",
+        "login/forgetPassword"
+      ]
+    },
+    {
+      "root": "open",
+      "pages": [
+        "mochat/order"
+      ]
+    },
+    {
+      "root": "service-home",
+      "pages": [
+        "index/index",
+        "user/index",
+        "user/edit-name",
+        "user/edit-des",
+        "user/edit-service-date",
+        "user/edit-tel",
+        "user/edit-album",
+        "commission/index",
+        "commission/cash",
+        "product/index",
+        "evaluate/index",
+        "rob-order/index",
+        "rob-order/order-detail",
+        "service-order/index",
+        "service-order/balance",
+        "apply/index",
+        "user/address"
+      ]
+    },
+    {
+      "root": "webpage-pay-callback",
+      "pages": [
+        "index"
+      ]
+    },
+    {
+      "root": "area",
+      "pages": [
+        "apply/index",
+        "userInfo/index"
+      ]
+    },
+    {
+      "root": "videoNumber",
+      "pages": [
+        "center/index",
+        "goods/index",
+        "bind/index"
+      ]
+    },
+    {
+      "root": "invoice",
+      "pages": [
+        "manage/index",
+        "apply/index",
+        "item/index"
+      ]
+    },
+    {
+      "root": "showGoodsForm",
+      "pages": [
+        "form/index",
+        "result/index",
+        "list/index"
+      ]
+    },
+    {
+      "root": "distribution",
+      "pages": [
+        "info/index",
+        "index/index",
+        "index/result",
+        "index/rider",
+        "setting/order_set",
+        "setting/user_set",
+        "order/order_list",
+        "order/order_detail",
+        "order/map_order",
+        "account/index",
+        "account/order",
+        "cash/record",
+        "cash/cashInfo",
+        "cash/index"
+      ]
+    },
+    {
+      "root": "rebateSelf",
+      "pages": [
+        "index/index",
+        "order/index",
+        "info/index"
+      ]
+    },
+    {
+      "root": "prizeWheel",
+      "pages": [
+        "index/index",
+        "myPrize/myPrize"
+      ]
+    },
+    {
+      "root": "global",
+      "pages": [
+        "list/list",
+        "IntegralLog/IntegralLog",
+        "globalBonusPool/globalBonusPool",
+        "globalDivideBonus/globalDivideBonus",
+        "addForm/addForm",
+        "globalCash/globalCash",
+        "withdraw/withdraw"
+      ]
+    },
+    {
+      "root": "tools/teamGrades",
+      "pages": [
+        "task",
+        "apply",
+        "index",
+        "bonusRecord",
+        "teamScore"
+      ]
+    },
+    {
+      "root": "fugou",
+      "pages": [
+        "index/index",
+        "log/log"
+      ]
+    },
+    {
+      "root": "refund",
+      "pages": [
+        "index/index",
+        "form/index"
+      ]
+    },
+    {
+      "root": "tools/live",
+      "pages": [
+        "create/list/index",
+        "create/add/index",
+        "create/live/index",
+        "player/index",
+        "list/index",
+        "goods/index",
+        "video/index"
+      ]
+    },
+    {
+      "root": "tools/quickPost",
+      "pages": [
+        "index/index",
+        "item/index"
+      ]
+    },
+    {
+      "root": "marketing/quanzi",
+      "pages": [
+        "add/index",
+        "userInfo/index",
+        "message/index",
+        "item/index",
+        "report/index",
+        "search/index"
+      ]
+    }
+  ]';

+ 741 - 0
config/interface_permission.php

@@ -0,0 +1,741 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+    // 概况
+    'dashboard' => [
+        'admin/dashboard/data',
+        'admin/dashboard/operations',
+        'admin/dashboard/order-data',
+        'admin/dashboard/goods-data'
+    ],
+    // 数据统计
+    'dataStatistic' => [
+        'admin/statistic/data/collect'
+    ],
+    // 商品销售统计
+    'goodsStatistic' => [
+        'admin/statistic/goods/sale'
+    ],
+    // 商户数据统计
+    'mchStatistic' => [
+        'admin/statistic/mch/count'
+    ],
+    // 商城
+    'settingEdit' => [
+        'admin/setting/setting/get-setting'
+    ],
+    // 基础设置
+    'basic_edit' => [
+        'admin/setting/setting/save-setting'
+    ],
+    // app设置
+    'app_edit' => [
+        'admin/setting/setting/save-setting'
+    ],
+    // 微信设置
+    'weixin_edit' => [
+        'admin/setting/setting/save-setting'
+    ],
+    // 显示设置
+    'display_edit' => [
+        'admin/setting/setting/save-setting'
+    ],
+    // 网站设置
+    'web_edit' => [
+        'admin/setting/setting/save-setting'
+    ],
+    // 入驻商设置
+    'mch_edit' => [
+        'admin/setting/setting/save-setting'
+    ],
+
+    // 运费规则
+    'postageList' => [
+        'admin/setting/postage/list',
+    ],
+    'postage_edit' => [
+        'admin/setting/postage/edit',
+        'admin/setting/postage/status',
+        'admin/setting/postage/save',
+    ],
+    'postage_delete' => [
+        'admin/setting/postage/delete',
+    ],
+
+    // 包邮规则
+    'freeDelivery' => [
+        'admin/setting/free/list'
+    ],
+    'free_delivery_edit' => [
+        'admin/setting/free/edit',
+        'admin/setting/free/save',
+    ],
+    'free_delivery_delete' => [
+        'admin/setting/free/del',
+    ],
+
+    // 区域设置
+    'area_edit' => [
+        'admin/setting/territorial/save',
+    ],
+    'area_add' => [
+        'admin/setting/territorial/edit',
+    ],
+
+    // 起送规则
+    'offer_price_add' => [
+        'admin/setting/offer-price/save',
+    ],
+    'offer_price_edit' => [
+        'admin/setting/offer-price/edit',
+    ],
+
+    // 退货地址设置
+    'refundAddress' => [
+        'admin/setting/refund-address/list'
+    ],
+    'refund_address_add' => [
+        'admin/setting/refund-address/save',
+    ],
+    'refund_address_edit' => [
+        'admin/setting/refund-address/edit',
+    ],
+    'refund_address_delete' => [
+        'admin/setting/refund-address/del',
+    ],
+
+    // 电子面单
+    'express' => [
+        'admin/setting/express/list'
+    ],
+    'express_add' => [
+        'admin/setting/express/save'
+    ],
+    'express_edit' => [
+        'admin/setting/postage/edit',
+    ],
+    'express_delete' => [
+        'admin/setting/postage/del',
+    ],
+
+
+    // 云打印设置
+    'cloud' => [
+        'admin/setting/cloud/list'
+    ],
+    'cloud_add' => [
+        'admin/setting/cloud/save',
+    ],
+    'cloud_edit' => [
+        'admin/setting/cloud/edit',
+        'admin/setting/cloud/save-setting',
+    ],
+    'cloud_delete' => [
+        'admin/setting/cloud/del',
+    ],
+
+    // 小票打印
+    'printer' => [
+        'admin/setting/printer/list'
+    ],
+    'printer_add' => [
+        'admin/setting/printer/save',
+    ],
+    'printer_edit' => [
+        'admin/setting/printer/edit',
+        'admin/setting/printer/save-setting',
+    ],
+    'printer_delete' => [
+        'admin/setting/printer/del',
+    ],
+
+    // 清空缓存
+    'cache' => [
+        'admin/cache/submit'
+    ],
+
+    // 消息通知
+    'noticeConfig' => [
+        'admin/notice/notice',
+        'admin/notice/notice-save',
+        'admin/notice/get-tamplate-id',
+        'admin/setting/sms/index'
+    ],
+
+
+    // 商品列表
+    'goodsList' => [
+        'admin/goods/list'
+    ],
+    'goods_add' => [
+        'admin/goods/save',
+        'admin/goods/taobao-copy',
+    ],
+    'goods_edit' => [
+        'admin/goods/edit',
+        'admin/goods/update-all',
+        'admin/goods/set-attr-num',
+        'admin/goods/goods-copy',
+        'admin/goods/set-attr-attribute',
+        'admin/goods/get-qr',
+        'admin/goods/status',
+    ],
+    'goods_delete' => [
+    ],
+
+    // 规格库
+    'attr_edit' => [
+        'admin/attr-library/list',
+        'admin/attr-library/save',
+        'admin/attr-library/status',
+        'admin/attr-library/del',
+    ],
+
+    // 分类列表
+    'catList' => [
+        'admin/goods/cat-list',
+    ],
+    'cat_edit' => [
+        'admin/goods/cat-save',
+        'admin/goods/cat-status',
+        'admin/goods/cat-del',
+    ],
+
+    // 订单列表
+    'orderList' => [
+        'admin/order/list'
+    ],
+    'order_edit' => [
+        'admin/order/apply-order-delete',
+        'admin/order/seller-comments',
+        'admin/order/send',
+        'admin/order/confirm',
+        'admin/order/print-order',
+        'admin/order/print',
+        'admin/order/clerk',
+        'admin/order/express-detail',
+        'admin/order/modify-price',
+        'admin/order/set-words',
+        'admin/order/set-order-address',
+    ],
+    'order_delete' => [
+        'admin/order/edit',
+    ],
+    'orderDetails' => [
+        'admin/order/list'
+    ],
+
+    // 自提订单
+    'orderOfflineList' => [
+        'admin/order/list'
+    ],
+    'offline_edit' => [
+        'admin/order/update-shop',
+    ],
+    'offline_delete' => [
+    ],
+
+    // 售后订单
+    'orderRefundList' => [
+        'admin/order/refund'
+    ],
+    'refund_edit' => [
+        'admin/order/refund-handle'
+    ],
+    'refund_delete' => [
+    ],
+
+    // 评价管理
+    'orderComment' => [
+        'admin/order/comment-list',
+    ],
+    'comment_edit' => [
+        'admin/order/comment-reply',
+    ],
+    'comment_delete' => [
+        'admin/order/comment-delete',
+    ],
+    'comment_add' => [
+        'admin/order/comment-edit',
+    ],
+
+    // DIY
+    'diy' => [
+        'admin/diy/template-list',
+    ],
+    // diy编辑
+    'diyTemplateEdit' => [
+        'admin/diy/template-del',
+        'admin/diy/template-edit',
+        'admin/diy/template-save',
+        'admin/diy/get-link',
+        'admin/diy/page-list',
+        'admin/diy/page-save',
+        'admin/diy/page-del',
+        'admin/diy/up-down',
+    ],
+
+    // 用户管理
+    'user_edit' => [
+        'admin/user/update-info',
+        'admin/recharge/user-recharge',
+    ],
+    'userList' => [
+        'admin/user/list',
+    ],
+    'integralRechargeList' => [
+        'admin/recharge/list',
+    ],
+    'moneyRechargeList' => [
+        'admin/recharge/list',
+    ],
+
+    // 手机端管理员
+    'userAdmin' => [
+        'admin/user/admin-user',
+    ],
+    'user_admin_edit' => [
+        'admin/user/add-admin',
+    ],
+    'user_admin_delete' => [
+        'admin/user/del-admin',
+    ],
+
+    // 会员管理
+    'memberLevel' => [
+        'admin/user/level-list',
+    ],
+    'level_edit' => [
+        'admin/user/level-status',
+        'admin/user/update-level-info'
+    ],
+    'level_delete' => [
+        'admin/user/delete-level',
+    ],
+    'levelOrderList' => [
+        'admin/user/level-order',
+    ],
+
+    // 专题管理
+    'articleManage' => [
+        'admin/content/get-topic-list',
+    ],
+    'project_add' => [
+        'admin/content/add-topic',
+    ],
+    'project_edit' => [
+        'admin/content/edit-topic',
+        'admin/content/edit-topic-show'
+    ],
+    'project_delete' => [
+        'admin/content/del-topic',
+    ],
+
+    // 专题分类
+    'projectManage' => [
+        'admin/content/get-topic-type'
+    ],
+    'project_cat_edit' => [
+        'admin/content/edit-topic-type',
+        'admin/content/edit-topic-type-show'
+    ],
+    'project_cat_add' => [
+        'admin/content/add-topic-type'
+    ],
+    'project_cat_delete' => [
+        'admin/content/del-topic-type'
+    ],
+
+    // 文章
+    'aboutArticleManage' => [
+        'admin/content/get-about-article'
+    ],
+    'article_add' => [
+        'admin/content/add-about-article'
+    ],
+    'article_edit' => [
+        'admin/content/edit-about-article'
+    ],
+    'article_delete' => [
+        'admin/content/del-about-article'
+    ],
+
+    // 视频
+    'videoManage' => [
+        'admin/content/get-video-list',
+    ],
+    'video_edit' => [
+        'admin/content/edit-video',
+    ],
+    'video_add' => [
+        'admin/content/add-video',
+    ],
+    'video_delete' => [
+        'admin/content/del-video',
+    ],
+
+
+    // 优惠券管理
+    'couponListManage' => [
+        'admin/marketing/coupon-list',
+    ],
+    'coupon_edit' => [
+        'admin/marketing/coupon-edit',
+    ],
+    'coupon_add' => [
+        'admin/marketing/coupon-add',
+    ],
+    'coupon_delete' => [
+        'admin/marketing/coupon-del',
+    ],
+    'couponSendManage' => [
+        'admin/marketing/coupon-send-user',
+    ],
+
+
+    // 自动发放
+    'couponAutoSendManage' => [
+        'admin/marketing/coupon-auto-send-list',
+    ],
+    'auto_send_edit' => [
+        'admin/marketing/coupon-auto-send-edit',
+    ],
+    'auto_send_add' => [
+        'admin/marketing/coupon-auto-send-add',
+    ],
+    'auto_send_delete' => [
+        'admin/marketing/coupon-auto-send-del',
+    ],
+
+    // 核销卡管理
+    'verifyListManage' => [
+        'admin/marketing/verify-list',
+    ],
+    'verify_card_edit' => [
+        'admin/marketing/verify-edit',
+    ],
+    'verify_card_add' => [
+        'admin/marketing/verify-add',
+    ],
+    'verify_card_delete' => [
+        'admin/marketing/verify-del',
+    ],
+
+    // 核销卡订单
+    'verifyOrderManage' => [
+        'admin/marketing/verify-sale-list',
+    ],
+
+    // 卡券管理
+    'cardCouponManage' => [
+        'admin/marketing/card-coupon-list',
+    ],
+    'card_coupon_edit' => [
+        'admin/marketing/card-coupon-edit',
+    ],
+    'card_coupon_add' => [
+        'admin/marketing/card-coupon-add',
+    ],
+    'card_coupon_delete' => [
+        'admin/marketing/card-coupon-del',
+    ],
+
+    // 充值方案
+    'rechargePreceptManage' => [
+        'admin/marketing/recharge-list',
+    ],
+    'recharge_edit' => [
+        'admin/marketing/recharge-edit',
+    ],
+    'recharge_add' => [
+        'admin/marketing/recharge-add',
+    ],
+    'recharge_delete' => [
+        'admin/marketing/recharge-del',
+    ],
+    'rechargeSetting' => [
+        'admin/marketing/recharge-setting',
+    ],
+
+    // 插件
+
+    // 自提点
+    'shopListManage' => [
+        'admin/shop/shop-list',
+    ],
+    'shop_edit' => [
+        'admin/shop/shop-edit',
+        'admin/shop/shop-audit',
+    ],
+    'shop_add' => [
+        'admin/shop/shop-add',
+    ],
+    'shop_delete' => [
+        'admin/shop/shop-del',
+    ],
+
+    // 提现
+    'shopWithdrawManage' => [
+        'admin/shop/shop-cash-list',
+    ],
+    'cash_audit_edit' => [
+        'admin/share/apply',
+    ],
+
+    // 核销员
+    'verifierManage' => [
+        'admin/shop/clerk-list',
+    ],
+    'verifier_edit' => [
+        'admin/shop/clerk-edit',
+    ],
+    'verifier_add' => [
+        'admin/shop/clerk-add',
+    ],
+    'verifier_delete' => [
+        'admin/shop/clerk-del',
+    ],
+
+    // 核销设置
+    'verifySettingManage' => [
+        'admin/shop/shop-setting-list',
+        'admin/shop/shop-setting-edit',
+    ],
+
+    // 分销商列表
+    'shareUserList' => [
+        'admin/share/list',
+    ],
+    'share_user_edit' => [
+        'admin/share/status',
+        'admin/share/seller-comments',
+        'admin/share/get-qrcode',
+    ],
+    'share_user_delete' => [
+        'admin/share/del',
+    ],
+
+    // 基础设置
+    'shareBasicSetting' => [
+        'admin/share/get-share-setting'
+    ],
+    'share_basic_edit' => [
+        'admin/share/basic-setting',
+    ],
+
+    // 佣金设置
+    'shareMoneySetting' => [
+        'admin/share/get-share-setting'
+    ],
+    'share_money_edit' => [
+        'admin/share/money-setting',
+    ],
+
+    // 分销提现
+    'shareCash' => [
+        'admin/share/cash'
+    ],
+    'share_cash_edit' => [
+        'admin/share/apply',
+        'admin/share/confirm'
+    ],
+
+    // 分销订单
+    'shareOrder' => [
+        'admin/share/order',
+    ],
+    // 充值分销订单
+    'topUpOrder' => [
+        'admin/share/top-up-order',
+    ],
+    // 推广海报
+    'sharePoster' => [
+        'admin/share/get-qrcode-setting',
+    ],
+    'share_qrcode_edit' => [
+        'admin/share/qrcode',
+    ],
+
+    // 商户列表
+    'mchList' => [
+        'admin/mch/mch/list'
+    ],
+    'mch_update' => [
+        'admin/mch/mch/save',
+        'admin/mch/mch/up-down',
+        'admin/mch/mch/save-setting'
+    ],
+    'mch_delete' => [
+        'admin/mch/mch/del'
+    ],
+
+    // 入驻审核
+    'mchApply' => [
+        'admin/mch/mch/list'
+    ],
+    'mch_audit_edit' =>[
+        'admin/mch/mch/apply',
+    ],
+
+    // 所售类目
+    'mchCommonCat' => [
+        'admin/mch/common-cat/list'
+    ],
+    'mch_cat_edit' => [
+        'admin/mch/common-cat/save'
+    ],
+    'mch_cat_delete' => [
+        'admin/mch/common-cat/del'
+    ],
+
+    // 入驻商品
+    'mchGoods' => [
+        'admin/goods/mch-goods-list'
+    ],
+    'mch_goods_edit' => [
+        'admin/goods/status',
+    ],
+
+    // 入驻订单
+    'mchOrder' => [
+        'admin/mch/order/list',
+    ],
+    'mch_order_edit' => [
+        'admin/mch/order/seller-comments',
+    ],
+
+    // 提现申请
+    'mchCashList' => [
+        'admin/mch/cash/list',
+    ],
+    'mch_cash_edit' => [
+        'admin/mch/cash/info',
+        'admin/mch/cash/save',
+        'admin/mch/cash/cash-submit',
+    ],
+
+    // 小程序直播直播间列表
+    'wxLiveRoomList' => [
+        'admin/plugins/wxlive/live/index',
+        'admin/plugins/wxlive/live/get-media',
+    ],
+    // 查看回放
+    'replay' => [
+        'admin/plugins/wxlive/live/huifang',
+    ],
+    // 导入商品
+    'importGoods' => [
+        'admin/plugins/wxlive/live/goods-add',
+    ],
+    // 添加直播间
+    'addRoom' => [
+        'admin/plugins/wxlive/live/edit',
+    ],
+    // 删除直播间
+    'deleteRoom' => [
+        'admin/plugins/wxlive/live/delete',
+    ],
+
+    // 小程序直播商品列表
+    'wxLiveGoodsList' => [
+        'admin/plugins/wxlive/goods/index',
+        'admin/plugins/wxlive/goods/search-goods',
+    ],
+    // 删除商品
+    'delGoods' => [
+        'admin/plugins/wxlive/goods/delete',
+    ],
+    // 添加商品
+    'addGoods' => [
+        'admin/plugins/wxlive/goods/goods-add',
+    ],
+
+
+    // 微信配置
+    'wechatConfig' => [
+        'admin/wechat-config/config',
+    ],
+    'wx_config_edit' => [
+        'admin/wechat-config/save',
+    ],
+
+    // 支付宝配置
+    'alipayConfig' => [
+        'admin/alipay-config/index',
+    ],
+    'alipay_config_edit' => [
+        'admin/alipay-config/index',
+    ],
+
+    // 上传配置
+    'uploadConfig' => [
+        'admin/storage/config',
+    ],
+    'upload_config_edit' => [
+        'admin/storage/config',
+    ],
+
+    // 越限配置
+    'runOverConfig' => [
+        'admin/storage/run-over',
+    ],
+    'run_config_edit' => [
+        'admin/storage/run-over',
+    ],
+
+    // 系统更新
+    'updateSystem' => [
+        'admin/update/index',
+        'admin/storage/update',
+    ],
+
+    // 权限管理
+
+    // 账号管理
+    'accountManage' => [
+        'admin/auth/get-admin-list'
+    ],
+    'account_add' => [
+        'admin/auth/create-admin'
+    ],
+    'account_edit' => [
+        'admin/auth/edit-admin'
+    ],
+    'account_delete' => [
+        'admin/auth/delete-admin'
+    ],
+
+    // 角色管理
+    'roleManage' => [
+        'admin/auth/get-role-list'
+    ],
+    'role_edit' => [
+        'admin/auth/edit-role'
+    ],
+    'role_add' => [
+        'admin/auth/create-role'
+    ],
+    'role_delete' => [
+        'admin/auth/delete-role'
+    ],
+
+    // 操作日志
+    'actionLog' => [
+        'admin/auth/get-action-log',
+        'admin/auth/delete-action-log'
+    ],
+
+    // 小程序发布
+    'uploadWechat' => [
+        'admin/setting/wechat-upload/login'
+    ],
+
+    // 小程序发布
+    'uploadAlipay' => [
+        'admin/setting/alipay-upload/login'
+    ],
+];

+ 284 - 0
config/mch_permission.php

@@ -0,0 +1,284 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+    [
+        'key' => 'dashboard',
+        'title' => '概况',
+        'children' => [
+            [
+                'key' => 'analysis',
+                'title' => '分析页',
+            ],
+            [
+                'key' => 'workplace',
+                'title' => '工作台',
+            ],
+            [
+                'key' => 'test',
+                'title' => '测试功能',
+            ],
+        ]
+    ],
+    [
+        'key' => 'mchSetting',
+        'title' => '商城',
+        'children' => [
+            [
+                'key' => 'mchCenterList',
+                'title' => '商户中心',
+                'children' => [
+                    [
+                        'key' => 'add',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'edit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'del',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'mchSettingEdit',
+                'title' => '设置详情',
+                'children' => [
+                    [
+                        'key' => 'store',
+                        'title' => '基础设置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'app',
+                        'title' => 'app设置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'wechat',
+                        'title' => '微信设置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'display',
+                        'title' => '显示设置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'web',
+                        'title' => '网站设置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'msg',
+                        'title' => '短信配置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'mail',
+                        'title' => '邮箱配置',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'mchSupplierSetting',
+                'title' => '采购设置'
+            ],
+            [
+                'key' => 'mchPostageList',
+                'title' => '运费规则',
+                'children' => [
+                    [
+                        'key' => 'add',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'edit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'del',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'mchFreeDelivery',
+                'title' => '包邮规则',
+                'children' => [
+                    [
+                        'key' => 'add',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'edit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'del',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'mchRefundAddress',
+                'title' => '退货地址',
+            ],
+            [
+                'key' => 'mchScanCodePay',
+                'title' => '当面付设置',
+            ],
+            [
+                'key' => 'mchCloud',
+                'title' => '云打印设置',
+            ],
+            [
+                'key' => 'mchPrinter',
+                'title' => '小票打印',
+            ],
+            [
+                'key' => 'mchShare',
+                'title' => '分销设置',
+            ],
+        ]
+    ],
+    [
+        'key' => 'mchAdminGoods',
+        'title' => '商品',
+        'children' => [
+            [
+                'key' => 'mchGoodsList',
+                'title' => '商品列表',
+                'children' => [
+                    [
+                        'key' => 'add',
+                        'title' => '添加商品',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'edit',
+                        'title' => '商品详情',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'del',
+                        'title' => '删除商品',
+                        'type' => 'action'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'mchCatList',
+                'title' => '分类列表',
+                'children' => [
+                    [
+                        'key' => 'add',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'del',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ]
+                ]
+            ]
+        ]
+    ],
+    [
+        'key' => 'mchOrderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'mchOrderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'update',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'delete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'mchOrderDetails',
+                'title' => '订单详情',
+                'children' => [
+                ],
+            ],
+            [
+                'key' => 'mchOrderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'update',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'delete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'mchOrderComment',
+                'title' => '评价管理',
+                'children' => [
+                    [
+                        'key' => 'update',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'delete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'add',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                ],
+            ]
+        ]
+    ],
+    [
+        'key' => 'mchCash',
+        'title' => '账户',
+        'children' => [
+            [
+                'key' => 'mchCashInfo',
+                'title' => '提现',
+                'children' => [],
+            ],
+            [
+                'key' => 'mchCashLog',
+                'title' => '收支明细',
+                'children' => [],
+            ]
+        ]
+    ],
+];

+ 12 - 0
config/params.php

@@ -0,0 +1,12 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+    'pageSize' => 10, // 列表每页展示数量, 一般用不到,优先使用前端传递的pageSize
+    'ws_url' => 'ws1.chixiaodian.vip', // 客服系统域名
+    'module_admin_login_uri' => '/admin/#/', // 后台登陆链接
+    'uri_path_dandianpuh5' => 'h8', // 单店铺h5路径
+];

+ 2715 - 0
config/permission.php

@@ -0,0 +1,2715 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版商城菜单权限
+return [
+    [
+        'key' => 'goods',
+        'title' => '商品',
+        'children' => [
+            [
+                'key' => 'goodsList',
+                'title' => '商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesHotelGoods',
+                'title' => '酒店商品',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            // [
+            //     'key' => 'typesServiceGoods',
+            //     'title' => '服务预约商品列表',
+            //     'children' => [
+            //         [
+            //             'key' => 'goodsAdd',
+            //             'title' => '添加',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsEdit',
+            //             'title' => '编辑',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsDelete',
+            //             'title' => '删除',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsBatchEdit',
+            //             'title' => '批量设置',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsCsvUpload',
+            //             'title' => 'CSV上传',
+            //             'type' => 'action'
+            //         ],
+            //     ]
+            // ],
+            [
+                'key' => 'typesVirtualGoods',
+                'title' => '虚拟商品',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'catList',
+                'title' => '分类列表',
+                'children' => [
+                    [
+                        'key' => 'catEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catAdd',
+                        'title' => '新增',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catBatchEdit',
+                        'title' => '批量操作',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'attrList',
+                'title' => '规格库',
+                'children' => [
+                    [
+                        'key' => 'attrEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrBatchDelete',
+                        'title' => '批量删除',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'goodsBrand',
+                'title' => '品牌列表'
+            ],
+            [
+                'key' => 'goodsRecommendKeyword',
+                'title' => '推荐发现关键词',
+                'children' => [
+                    [
+                        'key' => 'recommendKeywordAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordDel',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordBatchDel',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'userManage',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'userManagement',
+                'title' => '用户管理',
+                'children' => [
+                    [
+                        'key' => 'userManagementView',
+                        'title' => '查看',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'userManagementDetails',
+                        'title' => '用户详情',
+                        'children' => [
+                            [
+                                'key' => 'userManagementDetailsEditUser',
+                                'title' => '编辑用户',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'userManagementDetailsSetProperty',
+                                'title' => '设置积分/余额',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ]
+                ],
+            ],
+            [
+                'key' => 'memberManage',
+                'title' => '会员等级',
+                'children' => [
+                    [
+                        'key' => 'memberLevel',
+                        'title' => '会员等级',
+                        'children' => [
+                            [
+                                'key' => 'memberLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'levelOrderList',
+                        'title' => '购买记录'
+                    ],
+                    [
+                        'key' => 'growthValueSetting',
+                        'title' => '成长值设置'
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userAdmin',
+                'title' => '手机端管理员',
+                'children' => [
+                    [
+                        'key' => 'userAdminAdd',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+
+                        'key' => 'userAdminDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userShareLevel',
+                'title' => '分销商会员等级',
+                'children' => [],
+            ],
+            [
+                'key' => 'userLabel',
+                'title' => '用户标签',
+                'children' => [],
+            ]
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'cashierOrderList',
+                'title' => '收银台列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+                'children' => [
+                    [
+                        'key' => 'orderOfflineListVerify',
+                        'title' => '核销',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderOfflineListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderOfflineListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'orderRefundListConfirmReceive',
+                        'title' => '确认收货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseExchange',
+                        'title' => '拒绝换货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeRefund',
+                        'title' => '同意退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseRefund',
+                        'title' => '拒绝退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeExchange',
+                        'title' => '同意换货',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderSameCityList',
+                'title' => '同城订单',
+                'children' => [
+                    [
+                        'key' => 'orderSameCityListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderSameCityListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderSameCityListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderSameCityListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderScanList',
+                'title' => '当面付订单',
+            ],
+            [
+                'key' => 'orderComment',
+                'title' => '评价管理',
+                'children' => [
+                    [
+                        'key' => 'orderCommentRely',
+                        'title' => '回复',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentHide',
+                        'title' => '隐藏',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'storeProfit',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'financialList',
+                'title' => '财务列表'
+            ],
+            [
+                'key' => 'orderCostProfit',
+                'title' => '订单列表'
+            ],
+            [
+                'key' => 'mdPrice',
+                'title' => '门店佣金'
+            ],
+            [
+                'key' => 'userPrice',
+                'title' => '会员佣金'
+            ],
+            [
+                'key' => 'userMoney',
+                'title' => '用户余额'
+            ],
+            [
+                'key' => 'offlineTransferLog',
+                'title' => '线下转账'
+            ],
+            [
+                'key' => 'invoiceManage',
+                'title' => '发票管理'
+            ],
+            [
+                'key' => 'userPriceTotal',
+                'title' => '用户佣金明细'
+            ],
+        ],
+    ],
+    [
+        'key' => 'statistic',
+        'title' => '统计',
+        'children' => [
+            [
+                'key' => 'dataStatistic',
+                'title' => '数据统计',
+                'children' => [
+                ],
+            ],
+            [
+                'key' => 'goodsStatistic',
+                'title' => '商品销售统计',
+                'children' => [
+                ],
+            ],
+            [
+                'key' => 'orderSaleGoodsStatistic',
+                'title' => '订单商品统计',
+            ],
+            [
+                'key' => 'dashboardRecharge',
+                'title' => '会员储值',
+            ],
+            [
+                'key' => 'dashboardUser',
+                'title' => '会员分析',
+            ],
+            [
+                'key' => 'dashboardGoodsNum',
+                'title' => '库存分析',
+            ],
+            [
+                'key' => 'dashboardGoodsSale',
+                'title' => '热销商品',
+            ],
+            [
+                'key' => 'dashboardSales',
+                'title' => '销量分析',
+            ],
+            [
+                'key' => 'dashboardSalesAnalysis',
+                'title' => '销售分析',
+            ],
+            [
+                'key' => 'dashboardActiveUser',
+                'title' => '活跃用户',
+            ],
+            [
+                'key' => 'expiredsProducts',
+                'title' => '临期产品',
+            ],
+        ]
+    ],
+    [
+        'key' => 'setting',
+        'title' => '系统',
+        'children' => [
+            [
+                'key' => 'settingEdit',
+                'title' => '功能设置',
+                'children' => [
+                    [
+                        'key' => 'store',
+                        'title' => '基础设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'basicEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wechat',
+                        'title' => '微信设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'weixinEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'display',
+                        'title' => '显示设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'displayEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'kuaidi100',
+                        'title' => '地址识别',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'rulesSetting',
+                'title' => '规则设置',
+                'children' => [
+                    [
+                        'key' => 'postageList',
+                        'title' => '运费规则',
+                        'children' => [
+                            [
+                                'key' => 'postageAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'freeDelivery',
+                        'title' => '包邮规则',
+                        'children' => [
+                            [
+                                'key' => 'freeDeliveryAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'territorial',
+                        'title' => '区域限购',
+                        'children' => [
+                            [
+                                'key' => 'areaEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'offerPrice',
+                        'title' => '起送规则',
+                        'children' => [
+                            [
+                                'key' => 'offerPriceAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'refundAddress',
+                        'title' => '退货地址设置',
+                        'children' => [
+                            [
+                                'key' => 'refundAddressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'distributionRules',
+                        'title' => '配送规则',
+                        'children' => [
+                            [
+                                'key' => 'distributionRulesAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'distributionRulesEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'distributionRulesDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'printSetting',
+                'title' => '打印设置',
+                'children' => [
+                    [
+                        'key' => 'express',
+                        'title' => '电子面单',
+                        'children' => [
+                            [
+                                'key' => 'expressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'cloud',
+                        'title' => '云打印设置',
+                        'children' => [
+                            [
+                                'key' => 'cloudAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printer',
+                        'title' => '小票打印',
+                        'children' => [
+                            [
+                                'key' => 'printerAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printOrderSetting',
+                        'title' => '订单打印设置',
+                        'children' => [
+                            [
+                                'key' => 'printOrderSettingEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'noticeConfig',
+                'title' => '消息通知',
+            ],
+            [
+                'key' => 'GoodsReviewed',
+                'title' => '小程序提审商品',
+            ],
+            [
+                'key' => 'authManage',
+                'title' => '员工权限',
+                'children' => [
+                    [
+                        'key' => 'accountManage',
+                        'title' => '账号管理',
+                        'children' => [
+                            [
+                                'key' => 'accountManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'accountManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'accountManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'roleManage',
+                        'title' => '角色管理',
+                        'children' => [
+                            [
+                                'key' => 'roleManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'roleManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'roleManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'payConfigOther',
+                'title' => '支付配置',
+            ],
+            [
+                'key' => 'payConfig',
+                'title' => '支付配置',
+                'children' => [
+                    [
+                        'key' => 'wechatConfig',
+                        'title' => '微信配置',
+                    ],
+                    [
+                        'key' => 'alipayConfig',
+                        'title' => '支付宝配置',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'CashStroeConf',
+                'title' => '提现设置',
+                'children' => [
+                    [
+                        'key' => 'wechatCashConfig',
+                        'title' => '微信提现配置'
+                    ],
+                    [
+                        'key' => 'platformWechatCashConfig',
+                        'title' => '平台微信提现配置'
+                    ],
+                    [
+                        'key' => 'alipayCertConfig',
+                        'title' => '支付宝配置'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'baseConfig',
+                'title' => '基础设置',
+                'children' => [
+                    [
+                        'key' => 'douyinConfig',
+                        'title' => '抖音配置',
+                    ],
+                    [
+                        'key' => 'uploadConfig',
+                        'title' => '上传配置',
+                    ],
+                    [
+                        'key' => 'runOverConfig',
+                        'title' => '越限配置',
+                    ],
+                    [
+                        'key' => 'SettingCopyright',
+                        'title' => '版权设置',
+                    ],
+                ],
+            ],
+            // [
+            //     'key' => 'appSetting',
+            //     'title' => 'APP设置',
+            // ],
+            [
+                'key' => 'SettingVoiceBroadcast',
+                'title' => '收款播报设置',
+            ],
+            [
+                'key' => 'ocrSetting',
+                'title' => 'OCR配置',
+            ],
+            [
+                'key' => 'saasLgSetting',
+                'title' => '灵工配置',
+            ],
+            [
+                'key' => 'uploadWechat',
+                'title' => '小程序发布',
+            ],
+            [
+                'key' => 'storeUpgrade',
+                'title' => '系统升级',
+            ],
+            [
+                'key' => 'timerTaskCopy',
+                'title' => '定时任务',
+            ],
+//            [
+//                'key' => 'cityDelivery',
+//                'title' => '同城配送',
+//                'children' => [
+//                    [
+//                        'key' => 'delivery',
+//                        'title' => '配送设置',
+//                    ],
+//                ]
+//            ],
+            [
+                'key' => 'mapSetting',
+                'title' => '地图设置',
+            ],
+            [
+                'key' => 'migration',
+                'title' => '店铺迁移',
+            ],
+
+        ]
+    ],
+
+
+    [
+        'key' => 'newDiy',
+        'title' => '装修',
+    ],
+
+    [
+        'key' => 'channel',
+        'title' => '渠道',
+        'children' => [
+            [
+                'key' => 'appletManagementWechat',
+                'title' => '微信小程序',
+                'children' => [
+                    [
+                        'key' => 'wechatConfig',
+                        'title' => '参数配置'
+                    ],
+                    [
+                        'key' => 'uploadWechat',
+                        'title' => '小程序发布',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'h5Management',
+                'title' => '手机H5',
+                'children' => [
+                    [
+                        'key' => 'h5Management',
+                        'title' => '入口地址'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'wechatAccountManagement',
+                'title' => '微信公众号',
+                'children' => [
+                    [
+                        'key' => 'wechatAccountConfig',
+                        'title' => '参数设置'
+                    ],
+                    [
+                        'key' => 'wechatAccountMenuConfig',
+                        'title' => '菜单设置'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'appletManagementAlipay',
+                'title' => '支付宝小程序',
+                'children' => [
+                    [
+                        'key' => 'alipayConfig',
+                        'title' => '基础配置'
+                    ],
+
+                     [
+                         'key' => 'uploadAlipay',
+                         'title' => '小程序发布',
+                     ],
+                ]
+            ],
+            [
+                'key' => 'appManagement',
+                'title' => 'App端',
+                'children' => [
+                    [
+                        'key' => 'appConfig',
+                        'title' => 'APP基础设置'
+                    ],
+                    [
+                        'key' => 'appPayConfig',
+                        'title' => '支付设置'
+                    ]
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'marketingCategory',
+                'title' => '营销类',
+                'children' => [
+                    [
+                        'key' => 'material',
+                        'title' => '一键发圈',
+                        'children' => [
+                            [
+                                'key' => 'materialList',
+                                'title' => '素材管理',
+                                'children' => [],
+                            ],
+                            [
+                                'key' => 'materialCategory',
+                                'title' => '素材分类',
+                                'children' => [],
+                            ],
+                            [
+                                'key' => 'materialQrcode',
+                                'title' => '素材海报',
+                                'children' => [],
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'ponpManage',
+                        'title' => '大转盘抽奖',
+                        'children' => [
+                            [
+                                'key' => 'ponpIndex',
+                                'title' => '大转盘配置',
+                                'children' => [],
+                            ],
+                            [
+                                'key' => 'ponpLogList',
+                                'title' => '抽奖记录',
+                                'children' => [],
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'couponManage',
+                        'title' => '优惠券',
+                        'children' => [
+                            [
+                                'key' => 'couponList',
+                                'title' => '优惠券列表',
+                                'children' => [
+                                    [
+                                        'key' => 'couponListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListDetails',
+                                        'title' => '详情',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListSend',
+                                        'title' => '发放',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'couponAutoSendManage',
+                                'title' => '发放规则',
+                                'children' => [
+                                    [
+                                        'key' => 'couponAutoSendManageEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponAutoSendManageAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponAutoSendManageDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponAutoSendManageBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+
+                        ],
+                    ],
+                    [
+                        'key' => 'cardCouponManage',
+                        'title' => '卡券管理',
+                        'children' => [
+                            [
+                                'key' => 'cardCouponView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'verifyCard1',
+                        'title' => '核销卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard2',
+                        'title' => '礼品卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard3',
+                        'title' => '储值卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard4',
+                        'title' => '虚拟卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard5',
+                        'title' => '视频卡',
+                        'children' => [
+                            [
+                                'key' => 'videoManage',
+                                'title' => '视频',
+                                'children' => [
+                                    [
+                                        'key' => 'videoEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'videoAdd',
+                                        'title' => '新增',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'videoDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'videoBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action'
+                                    ]
+                                ]
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'ActivityRebateOrderN',
+                        'title' => '推N返1',
+                    ],
+                    [
+                        'key' => 'pintuan',
+                        'title' => '拼团',
+                    ],
+                    [
+                        'key' => 'ActivityCutPrice',
+                        'title' => '砍价',
+                    ],
+                    [
+                        'key' => 'seckill',
+                        'title' => '限时秒杀',
+                    ],
+                    [
+                        'key' => 'integralStore',
+                        'title' => '积分商城',
+                        'children' => [
+                            [
+                                'key' => 'integralStoreGoods',
+                                'title' => '积分商品',
+                            ],
+                            [
+                                'key' => 'integralStoreCat',
+                                'title' => '商品分类',
+                            ],
+                            [
+                                'key' => 'integralStoreSetting',
+                                'title' => '积分设置',
+                            ],
+                            [
+                                'key' => 'integralStoreSignIn',
+                                'title' => '签到设置',
+                            ],
+                        ],
+                    ],
+
+                    [
+                        'key' => 'ActivityNewUser',
+                        'title' => '新人专享',
+                    ],
+                    [
+                        'key' => 'randDiscount',
+                        'title' => '随机立减',
+                    ],
+                    [
+                        'key' => 'givingGifts',
+                        'title' => '送礼物',
+                    ],
+                    [
+                        'key' => 'ActivityWechatRoom',
+                        'title' => '群优惠',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'resourceCategory',
+                'title' => '资源类',
+                'children' => [
+                    [
+                        'key' => 'Quanzi',
+                        'title' => 'DeepSeek圈子种草',
+                    ],
+                    [
+                        'key' => 'aboutArticleManage',
+                        'title' => '文章',
+                        'children' => [
+                            [
+                                'key' => 'articleAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'articleEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'articleDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'topicManage',
+                        'title' => '专题',
+                        'children' => [
+                            [
+                                'key' => 'topicList',
+                                'title' => '专题列表',
+                                'children' => [
+                                    [
+                                        'key' => 'topicAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'topicCat',
+                                'title' => '专题分类',
+                                'children' => [
+                                    [
+                                        'key' => 'topicCatEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatAdd',
+                                        'title' => '新增',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action'
+                                    ]
+                                ]
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'rechargePreceptManage',
+                        'title' => '充值方案',
+                        'children' => [
+                            [
+                                'key' => 'rechargeSetting',
+                                'title' => '设置',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'rechargeEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'rechargeAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'rechargeDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'assetsTransfer',
+                        'title' => '资产转增',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'monthlyPaymentNext',
+                        'title' => '每月月付',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'videoGoods',
+                        'title' => '短视频',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsWorkList',
+                                'title' => '作品列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsWorkListView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListAgree',
+                                        'title' => '同意',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsAuthorList',
+                                'title' => '作者列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsAuthorListAgree',
+                                        'title' => '同意',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsAuthorListRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsAuthorListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsAuthorListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsShareList',
+                                'title' => '佣金发放列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsShareListAgree',
+                                        'title' => '同意',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsShareListRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsShareListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsShareListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsFeedbackList',
+                                'title' => '举报列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsFeedbackListView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListDown',
+                                        'title' => '下架',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsBringGoodsList',
+                                'title' => '带货商品',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListEdit',
+                                        'title' => '上下架',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListCopyPath',
+                                        'title' => '复制小程序链接',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsCatList',
+                                'title' => '抖品分类',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsCatListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsCatListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsCatListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsCatListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsSetting',
+                                'title' => '设置',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'toolCategory',
+                'title' => '工具类',
+                'children' => [
+                    [
+                        'key' => 'shareManage',
+                        'title' => '分销管理',
+                        'children' => [
+                            [
+                                'key' => 'shareUserCheck',
+                                'title' => '分销商审核',
+                                'children' => [
+                                    [
+                                        'key' => 'shareUserCheckPass',
+                                        'title' => '通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserCheckRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserCheckBatchPass',
+                                        'title' => '批量通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserCheckBatchRefuse',
+                                        'title' => '批量拒绝',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'NewQueue',
+                                'title' => '排队免单',
+                            ],
+                            [
+                                'key' => 'shareUserList',
+                                'title' => '分销商列表',
+                                'children' => [
+                                    [
+                                        'key' => 'shareUserListView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListWithdrawLog',
+                                        'title' => '提现明细',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListShareOrder',
+                                        'title' => '分销订单',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListQrcode',
+                                        'title' => '分销二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListRemark',
+                                        'title' => '备注',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareOrder',
+                                'title' => '分销订单',
+                            ],
+                            [
+                                'key' => 'TopUpOrder',
+                                'title' => '充值分销订单',
+                            ],
+                            [
+                                'key' => 'shareCash',
+                                'title' => '分销提现',
+                                'children' => [
+                                    [
+                                        'key' => 'shareCashReject',
+                                        'title' => '驳回',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareCashConfirmPayment',
+                                        'title' => '确认打款',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareCashManualPayment',
+                                        'title' => '手动打款',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'shareBasicSetting',
+                                'title' => '基础设置',
+                            ],
+                            [
+                                'key' => 'shareMoneySetting',
+                                'title' => '佣金设置',
+                            ],
+                            [
+                                'key' => 'sharePoster',
+                                'title' => '推广海报',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wxLive',
+                        'title' => '小程序直播',
+                        'children' => [
+                            [
+                                'key' => 'wxLiveRoomList',
+                                'title' => '直播间列表',
+                                'children' => [
+                                    [
+                                        'key' => 'wxLiveRoomListReplay',
+                                        'title' => '回放',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListViewGoods',
+                                        'title' => '查看商品',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListImportGoods',
+                                        'title' => '导入商品',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListAddRoom',
+                                        'title' => '添加直播间',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListDeleteRoom',
+                                        'title' => '删除直播间',
+                                        'type' => 'action'
+                                    ],
+                                ]
+                            ],
+                            [
+                                'key' => 'wxLiveGoodsList',
+                                'title' => '商品列表',
+                                'children' => [
+                                    [
+                                        'key' => 'wxLiveGoodsListDelGoods',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveGoodsListAddGoods',
+                                        'title' => '添加',
+                                        'type' => 'action'
+                                    ],
+                                ]
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'scanCodePay',
+                        'title' => '收款码',
+                        'children' => [
+                            [
+                                'key' => 'scanCodePayProfit',
+                                'title' => '收款码佣金比例',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderManage',
+                        'title' => '股东分红',
+                        'children' => [
+                            [
+                                'key' => 'shareholderAudit',
+                                'title' => '股东审核',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderAuditPass',
+                                        'title' => '通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderAuditRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderList',
+                                'title' => '股东列表',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderListAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderLevel',
+                                'title' => '等级',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderLevelAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderLevelEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderLevelDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderShareOrder',
+                                'title' => '分润订单'
+                            ],
+                            [
+                                'key' => 'shareholderCommissionList',
+                                'title' => '佣金列表'
+                            ],
+                            [
+                                'key' => 'shareholderWithdrawalAudit',
+                                'title' => '提现审核',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderWithdrawalAuditPass',
+                                        'title' => '通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderWithdrawalAuditRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderPrizePool',
+                                'title' => '分红奖金池',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderPrizePoolSend',
+                                        'title' => '发放',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderSetting',
+                                'title' => '设置页面',
+                            ],
+                            [
+                                'key' => 'shareholderApplySetting',
+                                'title' => '申请设置',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderChain',
+                        'title' => '链动2+1',
+                    ],
+                    [
+                        'key' => 'areaDividend',
+                        'title' => '区域分红',
+                    ],
+
+
+                    [
+                        'key' => 'imageSearchGoods',
+                        'title' => '以图搜图',
+                    ],
+
+                    [
+                        'key' => 'cashier',
+                        'title' => '收银台',
+                    ],
+                    [
+                        'key' => 'goodsFormList',
+                        'title' => '商品表单',
+                        'children' => [
+                            [
+                                'key' => 'goodsFormList',
+                                'title' => '商品表单列表',
+                            ],
+                            [
+                                'key' => 'typesViewGoods',
+                                'title' => '展示类商品',
+                                'children' => [
+                                    [
+                                        'key' => 'goodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsBatchEdit',
+                                        'title' => '批量设置',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsCsvUpload',
+                                        'title' => 'CSV上传',
+                                        'type' => 'action'
+                                    ],
+                                ]
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'ERP',
+                        'title' => '本地商品进销存',
+                        'children' => [
+                            [
+                                'key' => 'purchasein',
+                                'title' => '入库',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'purchaseout',
+                                'title' => '出库',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'purchasedel',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'TeamBonus',
+                        'title' => '团队级差分红',
+                    ],
+                    [
+                        'key' => 'Live',
+                        'title' => '自建直播',
+                    ],
+                    [
+                        'key' => 'PublicRanking',
+                        'title' => '视频号爆单',
+                    ],
+                    [
+                        'key' => 'localPublicRanking',
+                        'title' => '公排计划',
+                    ],
+                    [
+                        'key' => 'ActivityOrderRebateSelf',
+                        'title' => '消费全返',
+                    ],
+                    [
+                        'key' => 'PaymentStatement',
+                        'title' => '付款对账单',
+                    ],
+                    [
+                        'key' => 'TeamGrades',
+                        'title' => '团队业绩分红',
+                        'children' => [
+                            [
+                                'key' => 'TeamGradesApply',
+                                'title' => '审核列表',
+                            ],
+                            [
+                                'key' => 'TeamGradesLevel',
+                                'title' => '团队等级',
+                            ],
+                            [
+                                'key' => 'TeamGradesRewardLog',
+                                'title' => '分红记录',
+                            ],
+                            [
+                                'key' => 'TeamRewardSetting',
+                                'title' => '分红设置',
+                            ],
+                            [
+                                'key' => 'TeamGradesList',
+                                'title' => '分红团队',
+                            ],
+                            [
+                                'key' => 'TeamRewardPayouts',
+                                'title' => '提现列表',
+                            ],
+                            [
+                                'key' => 'TeamGradesGoods',
+                                'title' => '团队业绩商品',
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'cashierMobile',
+                        'title' => '手机收银台',
+                        'children' => [
+                            [
+                                'key' => 'cashierMobile',
+                                'title' => '收银台用户',
+                            ],
+                            [
+                                'key' => 'cashierMobile',
+                                'title' => '操作日志',
+                            ],
+                            [
+                                'key' => 'cashierMobile',
+                                'title' => '门店充值权限',
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'shareGroupPurchase',
+                        'title' => '37拼购'
+                    ],
+                    [
+                        'key' => 'superSellingGoods',
+                        'title' => '超级卖货'
+                    ],
+                    [
+                        'key' => 'IntegralAppreciation',
+                        'title' => '增值积分'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'industryCategory',
+                'title' => '行业类',
+                'children' => [
+                    [
+                        'key' => 'activityBooking',
+                        'title' => '预约',
+                    ],
+                    [
+                        'key' => 'food',
+                        'title' => '点餐管理',
+                        'children' => [
+                            [
+                                'key' => 'foodGoods',
+                                'title' => '商品管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodGoodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsSetting',
+                                        'title' => '设置',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'foodCat',
+                                'title' => '分类',
+                                'children' => [
+                                    [
+                                        'key' => 'foodCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodEditEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodTable',
+                                'title' => '餐桌管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodTableAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableQrcode',
+                                        'title' => '二维码',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodSetting',
+                                'title' => '设置',
+                            ],
+                            [
+                                'key' => 'foodQrcode',
+                                'title' => '店铺点餐二维码',
+                            ],
+                            [
+                                'key' => 'foodSlide',
+                                'title' => '轮播图',
+                                'children' => [
+                                    [
+                                        'key' => 'foodSlideAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'serviceHome',
+                        'title' => '上门服务',
+                    ],
+                    [
+                        'key' => 'adopt',
+                        'title' => '认养',
+                        'children' => [
+                            [
+                                'key' => 'adoptList',
+                                'title' => '认养列表',
+                                'children' => [
+                                    [
+                                        'key' => 'adoptListAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'adoptCat',
+                                'title' => '认养分类',
+                                'children' => [
+                                    [
+                                        'key' => 'adoptCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptCatEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'adoptOrder',
+                                'title' => '认养订单',
+                            ],
+                            [
+                                'key' => 'adoptSetting',
+                                'title' => '认养设置',
+                            ],
+                            [
+                                'key' => 'adoptDeviceManagement',
+                                'title' => '设备管理',
+                            ],
+                            [
+                                'key' => 'adoptDeliveryOrder',
+                                'title' => '配送订单',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'global',
+                        'title' => '全域分佣',
+                        'children' => [
+                            [
+                                'key' => 'globalList',
+                                'title' => '报单列表',
+                                'children' => [
+                                    [
+                                        'key' => 'globalAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'globalEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'globalBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'globalAdd',
+                                'title' => '添加报单',
+                            ],
+                            [
+                                'key' => 'globalIntegralLog',
+                                'title' => '积分记录',
+                            ],
+                            [
+                                'key' => 'globalSetting',
+                                'title' => '规则配置',
+                            ],
+                            [
+                                'key' => 'globalBonusPool',
+                                'title' => '报单奖金池',
+                            ],
+                            [
+                                'key' => 'globalCash',
+                                'title' => '提现审核',
+                            ],
+                            [
+                                'key' => 'globalBonusPoolDetail',
+                                'title' => '奖池明细',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'productTraceability',
+                        'title' => '产品溯源',
+                        'children' => [
+                            [
+                                'key' => 'productTraceabilityList',
+                                'title' => '产品列表',
+                                'children' => [
+                                    [
+                                        'key' => 'productTraceabilityListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatch',
+                                'title' => '产品批次',
+                                'children' => [
+                                    [
+                                        'key' => 'productTraceabilityBatchAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchLog',
+                                        'title' => '溯源记录',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchQrcode',
+                                        'title' => '查看二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'productTraceabilityLog',
+                                'title' => '溯源记录',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'saasAdapay',
+                        'title' => '汇付支付',
+                    ],
+                    [
+                        'key' => 'saasAllinpay',
+                        'title' => '通联普通支付',
+                    ],
+                    [
+                        'key' => 'cityDelivery',
+                        'title' => '微信同城配送',
+                        'children' => [
+                            [
+                                'key' => 'WechatNewDelivery',
+                                'title' => '同城配送',
+                            ],
+                            [
+                                'key' => 'delivery',
+                                'title' => '同城配送',
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'GPT',
+                        'title' => 'GPT',
+                    ],
+                    [
+                        'key' => 'Insurance',
+                        'title' => '保单信息',
+                        'children' => [
+                            [
+                                'key' => 'insuranceList',
+                                'title' => '保单信息列表',
+                            ]
+                        ],
+                    ],
+                    /* begin 2025/07/08 11:04:46 id1248 新增活动报名插件 WPing丶 */
+                    [
+                        'key' => 'Event',
+                        'title' => '活动报名',
+                        'children' => [ 
+                            [
+                                'key' => 'eventList',
+                                'title' => '活动列表',
+                            ],
+                            [
+                                'key' => 'userApply',
+                                'title' => '报名审核',
+                            ],
+                            [
+                                'key' => 'eventSetting',
+                                'title' => '活动设置',
+                            ]
+                        ],
+                    ],
+                    /* end */
+                    [
+                        'key' => 'storeLocalDelivery',
+                        'title' => '同城自配',
+                    ],
+                    [
+                        'key' => 'UserAudit',
+                        'title' => '批发审核',
+                    ],
+                    [
+                        'key' => 'intelligentMatchScene',
+                        'title' => '在线搭配',
+                    ]
+                ]
+            ],
+            [
+                'key' => 'channelCategory',
+                'title' => '渠道类',
+                'children' => [
+                    [
+                        'key' => 'videoShop',
+                        'title' => '视频号分销',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'thirdCategory',
+                'title' => '第三方',
+                'children' => [
+                    [
+                        'key' => 'yinbao',
+                        'title' => '银豹',
+                    ],
+                    [
+                        'key' => 'scrm',
+                        'title' => 'SCRM',
+                    ],
+                    [
+                        'key' => 'kefuSetting',
+                        'title' => '在线客服',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'branchStoreCategory',
+                'title' => '门店类',
+                'children' => [
+                    [
+                        'key' => 'offlineShop',
+                        'title' => '社区团购',
+                        'children' => [
+                            [
+                                'key' => 'offlineShopList',
+                                'title' => '门店列表',
+                            ],
+                            [
+                                'key' => 'offlineStaff',
+                                'title' => '门店员工',
+                            ],
+                            [
+                                'key' => 'offlineShopAudit',
+                                'title' => '门店审核',
+                            ],
+                            [
+                                'key' => 'offlineShopOrder',
+                                'title' => '自提订单',
+                            ],
+                            [
+                                'key' => 'outletManageGroupActivities',
+                                'title' => '团购活动',
+                            ],
+                            [
+                                'key' => 'outletManageGroupActivitiesEdit',
+                                'title' => '门店团购活动',
+                            ],
+                            [
+                                'key' => 'outletManageDriver',
+                                'title' => '司机管理',
+                            ],
+                            [
+                                'key' => 'outletManageInventory',
+                                'title' => '备货单管理',
+                            ],
+                            [
+                                'key' => 'outletManageSorting',
+                                'title' => '分拣单管理',
+                            ],
+                            [
+                                'key' => 'outletManagePickUpOrder',
+                                'title' => '订单详情',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'outletManage',
+                        'title' => '连锁门店',
+                        'children' => [
+                            [
+                                'key' => 'outletManageList',
+                                'title' => '门店列表',
+                            ],
+                            [
+                                'key' => 'outletManageStaff',
+                                'title' => '门店员工',
+                            ],
+                            [
+                                'key' => 'outletManageAudit',
+                                'title' => '门店审核',
+                            ],
+                            [
+                                'key' => 'outletManageGoods',
+                                'title' => '门店商品',
+                            ],
+                            [
+                                'key' => 'outletManageOrder',
+                                'title' => '门店订单',
+                            ],
+                            [
+                                'key' => 'outletManagePickUpOrder',
+                                'title' => '订单详情',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'shopSetting',
+                        'title' => '设置提现',
+                        'children' => [
+                            [
+                                'key' => 'outletManageApplySetting',
+                                'title' => '申请设置',
+                            ],
+                            [
+                                'key' => 'outletManagePoster',
+                                'title' => '门店海报',
+                            ],
+                            [
+                                'key' => 'outletManageCommission',
+                                'title' => '门店佣金',
+                            ],
+                            [
+                                'key' => 'outletManageWithdraw',
+                                'title' => '门店提现',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'mch',
+                        'title' => '入驻商',
+                        'children' => [
+                            [
+                                'key' => 'mchList',
+                                'title' => '入驻商列表',
+                            ],
+                            [
+                                'key' => 'mchAudit',
+                                'title' => '入驻商审核',
+                            ],
+                            [
+                                'key' => 'mchCommonCat',
+                                'title' => '入驻商分类',
+                            ],
+                            [
+                                'key' => 'mchGoods',
+                                'title' => '入驻商商品',
+                            ],
+                            [
+                                'key' => 'mchOrder',
+                                'title' => '入驻商订单',
+                            ],
+                            [
+                                'key' => 'mchCash',
+                                'title' => '入驻商提现',
+                            ],
+                            [
+                                'key' => 'mchSetting',
+                                'title' => '入驻商设置',
+                            ],
+                            [
+                                'key' => 'mchBrands',
+                                'title' => '品牌分类',
+                            ],
+                        ]
+                    ],
+                ]
+            ],
+        ]
+    ]
+];

+ 10 - 0
config/queue.php

@@ -0,0 +1,10 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+    'class' => \yii\queue\redis\Queue::class,
+    'as log' => \yii\queue\LogBehavior::class,
+];

+ 13 - 0
config/redis.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+    'class' => 'yii\redis\Connection',
+    'hostname' => '192.168.1.4',
+    'port' => 6379,
+    'database' => 1,
+    'password' => 123456,
+];

+ 592 - 0
config/saas_admin_permission.php

@@ -0,0 +1,592 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+//saas版超级管理员菜单权限
+return [
+    // [
+    //     'key' => 'dashboard',
+    //     'title' => '概况',
+    // ],
+    [
+        'key' => 'saasStore',
+        'title' => '店铺',
+        'children' => [
+            [
+                'key' => 'saasStoreList',
+                'title' => '店铺列表',
+            ],
+            [
+                'key' => 'saasStoreCategory',
+                'title' => '店铺分类',
+            ],
+            [
+                'key' => 'saasStoreSetting',
+                'title' => '店铺设置',
+            ],
+            [
+                'key' => 'saasStoreApply',
+                'title' => '店铺申请',
+            ],
+            [
+                'key' => 'saasAgencyStoreRenew',
+                'title' => '店铺缴费',
+            ],
+            [
+                'key' => 'saasAgencyMoneyCode',
+                'title' => '收款码',
+            ],
+            [
+                'key' => 'saasAgencyAllianceMoneyCode',
+                'title' => '联盟收款码',
+            ],
+            [
+                'key' => 'saasAgencyPayApply',
+                'title' => '进件列表',
+            ],
+            [
+                'key' => 'saasFoodsCode',
+                'title' => '点餐码配置',
+            ],
+            [
+                'key' => 'saasStoreApplyConf',
+                'title' => '店铺申请配置',
+            ],
+            [
+                'key' => 'saasStoreCopy',
+                'title' => '店铺复制',
+            ],
+            [
+                'key' => 'saasStoreTemplate',
+                'title' => '店铺模板',
+            ],
+            [
+                'key' => 'saasStoreSync',
+                'title' => '店铺同步',
+            ],
+            [
+                'key' => 'migration',
+                'title' => '店铺迁移',
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasAgency',
+        'title' => '区域',
+        'children' => [
+
+            [
+                'key' => 'saasAgencyList',
+                'title' => '区域管理员',
+                'children' => [
+                    [
+                        'key' => 'saasAgencyList',
+                        'title' => '管理列表',
+                    ],
+                    [
+                        'key' => 'saasAgencySetting',
+                        'title' => '代理中心设置',
+                    ],
+                    [
+                        'key' => 'areaAgentApply',
+                        'title' => '区域代理申请列表'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'goodsAgent',
+                'title' => '产品代理',
+                'children' => [
+                    [
+                        'key' => 'goodsAgent',
+                        'title' => '产品代理',
+                    ],
+                    [
+                        'key' => 'goodsAgentSetting',
+                        'title' => '佣金设置',
+                    ],
+                    [
+                        'key' => 'goodsAgentApply',
+                        'title' => '代理申请',
+                    ]
+                ]
+            ],
+
+            [
+                'key' => 'frontAgent',
+                'title' => '仓库管理',
+                'children' => [
+                    [
+                        'key' => 'frontAgent',
+                        'title' => '仓库管理',
+                    ],
+                    [
+                        'key' => 'frontAgentBindSupplier',
+                        'title' => '绑定供货商',
+                    ],
+                    [
+                        'key' => 'frontAgentBindStore',
+                        'title' => '绑定商家',
+                    ],
+                    [
+                        'key' => 'frontAgentBindStoreMd',
+                        'title' => '绑定门店',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'countrysideList',
+                'title' => '村镇管理',
+                'children' => [
+                    [
+                        'key' => 'countrysideAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'countrysideEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'countrysideDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ],
+    ],
+    [
+        'key' => 'bdAgent',
+        'title' => '推广代理',
+        'children' => [
+            [
+                'key' => 'bdAgentList',
+                'title' => '推广代理',
+            ],
+            [
+                'key' => 'bdAgentProfitSet',
+                'title' => '佣金设置',
+            ],
+            [
+                'key' => 'saasAgencySalesman',
+                'title' => '业务员',
+            ],
+            [
+                'key' => 'bdAgentApply',
+                'title' => '代理申请',
+            ],
+        ]
+    ],
+    [
+        'key' => 'saasAllianceUser',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'saasAllianceUserList',
+                'title' => '联盟用户',
+            ],
+            [
+                'key' => 'storeOperations',
+                'title' => '运营人员',
+            ]
+        ],
+    ],
+    [
+        'key' => 'saasDiy',
+        'title' => '装修',
+    ],
+    [
+        'key' => 'saasAlliance',
+        'title' => '联盟',
+        'children' => [
+            [
+                'key' => 'saasAllianceShareAll',
+                'title' => '分润设置总项',
+            ],
+            [
+                'key' => 'saasAllianceStoreShare',
+                'title' => '店铺分销',
+                'children' => [
+                    [
+                        'key' => 'saasAllianceStoreShareInfo',
+                        'title' => '店铺分销',
+                    ],
+                    [
+                        'key' => 'saasAllianceStoreShareProfit',
+                        'title' => '佣金明细',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'saasAllianceShare',
+                'title' => '联盟分销',
+            ],
+            [
+                'key' => 'saasAllianceCouponSetting',
+                'title' => '联盟券设置',
+            ],
+            [
+                'key' => 'saasAllianceStoreRecommender',
+                'title' => '店铺推荐人',
+            ],
+            [
+                'key' => 'saasAllianceConsumeRebate',
+                'title' => '消费返利',
+            ],
+            [
+                'key' => 'saasAllianceFaceIntegral',
+                'title' => '当面付店铺积分',
+            ],
+            [
+                'key' => 'saasAllianceUserAuth',
+                'title' => '会员权限',
+            ],
+            [
+                'key' => 'saasAllianceSupplierAuth',
+                'title' => '供货商推荐人',
+            ],
+            [
+                'key' => 'sharingReceiverCustom',
+                'title' => '灵活分润',
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasAuthManage',
+        'title' => '员工',
+        'children' => [
+            [
+                'key' => 'saasAccountManage',
+                'title' => '账号管理',
+                'children' => [
+                    [
+                        'key' => 'saasAccountManageAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'saasAccountManageEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'saasAccountManageDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'saasRoleManage',
+                'title' => '角色管理',
+                'children' => [
+                    [
+                        'key' => 'saasRoleManageEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'saasRoleManageAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'saasRoleManageDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'saasMarketingBusiness',
+        'title' => '营销',
+        'children' => [
+            [
+                'key' => 'saasMemberManageBusiness',
+                'title' => '会员卡',
+            ],
+            [
+                'key' => 'saasCouponManageBusiness',
+                'title' => '优惠券',
+            ],
+            [
+                'key' => 'saasDistribution',
+                'title' => '推广海报设置',
+                'children' => [
+                    [
+                        'key' => 'saasDistributionPoster',
+                        'title' => '推广海报',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'saasMarketingWeChatVipCard',
+                'title' => '微信会员卡',
+            ],
+            [
+                'key' => 'jushuitan',
+                'title' => '聚水潭',
+            ],
+            [
+                'key' => 'maiyatian',
+                'title' => '麦芽田',
+            ],
+            [
+                'key' => 'keloop',
+                'title' => '快跑者',
+            ],
+            [
+                'key' => 'localDelivery',
+                'title' => '同城配送',
+            ],
+            [
+                'key' => 'SaasIntegralStore',
+                'title' => '积分商城',
+            ],
+            [
+                'key' => 'SaasPtActivity',
+                'title' => '拼团',
+            ],
+            [
+                'key' => 'SaasCutPriceActivity',
+                'title' => '砍价',
+            ],
+            [
+                'key' => 'SaasSeckillActivity',
+                'title' => '秒杀',
+            ],
+            [
+                'key' => 'SaasNewUserActivity',
+                'title' => '新人专享',
+            ],
+            [
+                'key' => 'SaasStoreDividends',
+                'title' => '某店分红',
+            ]
+        ],
+    ],
+    [
+        'key' => 'saasCloudPlatform',
+        'title' => '云仓',
+        'children' => [
+            [
+                'key' => 'saasCloudPlatformApply',
+                'title' => '云仓申请',
+                'children' => [
+                    [
+                        'key' => 'saasCloudPlatformSetting',
+                        'title' => '云仓申请',
+                    ]
+                ]
+            ],
+            [
+                'key' => 'saasCloudPlatformUser',
+                'title' => '云仓用户',
+                'children' => [
+                    [
+                        'key' => 'saasCloudPlatformUser',
+                        'title' => '会员等级',
+                    ],
+                    [
+                        'key' => 'cloudPlatformUserChannel',
+                        'title' => '供货渠道',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'saasCloudPlatformSupplier',
+                'title' => '云仓供货商',
+            ],
+            [
+                'key' => 'saasCloudPlatformGoods',
+                'title' => '云仓商品',
+                'children' => [
+                    [
+                        'key' => 'saasCloudPlatformGoodsCat',
+                        'title' => '商品分类',
+                    ]
+                ]
+            ],
+            [
+                'key' => 'saasCloudPlatformFinance',
+                'title' => '云仓财务',
+            ],
+            [
+                'key' => 'saasCloudPlatformStbz',
+                'title' => '胜天半子',
+            ],
+            [
+                'key' => 'saasCloudPlatformOrder',
+                'title' => '云仓订单',
+            ],
+            [
+                'key' => 'profitStrategy',
+                'title' => '成本定价',
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasProfit',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'saasProfitAgent',
+                'title' => '代理商提现',
+            ],
+            [
+                'key' => 'saasProfitSplitAccounts',
+                'title' => '分账记录',
+            ],
+            [
+                'key' => 'saasProfitUserWithdraw',
+                'title' => '用户提现',
+            ],
+            [
+                'key' => 'saasStoreCash',
+                'title' => '商城提现',
+            ],
+            [
+                'key' => 'cloudProfit',
+                'title' => '云仓报表',
+            ],
+            [
+                'key' => 'saasStoreProfitList',
+                'title' => '让利分配明细',
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasSetting',
+        'title' => '设置',
+        'children' => [
+            [
+                'key' => 'saasSettingBase',
+                'title' => '基础设置',
+                'children' => [
+                    [
+                        'key' => 'mapSetting',
+                        'title' => '地图设置',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'saasSettingService',
+                'title' => '服务商设置',
+                'children' => [
+                    [
+                        'key' => 'saasSettingServiceWechat',
+                        'title' => '微信服务商配置',
+                    ],
+                    [
+                        'key' => 'saasSettingServiceAli',
+                        'title' => '支付宝服务商配置',
+                    ],
+                    [
+                        'key' => 'storeAdminYunst',
+                        'title' => '通联设置',
+                    ]
+                ]
+            ],
+            [
+                'key' => 'saasSettingThird',
+                'title' => '第三方设置',
+                'children' => [
+                    [
+                        'key' => 'saasSettingThirdWechat',
+                        'title' => '抖音三方平台配置',
+                    ],
+                    [
+                        'key' => 'saasSettingThirdAli',
+                        'title' => '支付宝三方平台配置',
+                    ],
+                    [
+                        'key' => 'saasSettingThirdDouyin',
+                        'title' => '抖音三方平台配置',
+                    ],
+                    [
+                        'key' => 'saasSettingThirdWechatTemplate',
+                        'title' => '微信模板上传',
+                    ],
+                    [
+                        'key' => 'saasSettingThirdAliTemplate',
+                        'title' => '支付宝模板上传',
+                    ]
+                ],
+            ],
+            [
+                'key' => 'saasOcrSetting',
+                'title' => 'ocr设置',
+            ],
+            [
+                'key' => 'saasClientSetting',
+                'title' => '联盟端设置',
+                'children' => [
+                    [
+                        'key' => 'SaasSettingWechatPay',
+                        'title' => '联盟微信配置',
+                    ],
+                    [
+                        'key' => 'SaasSettingAliPay',
+                        'title' => '联盟支付宝配置',
+                    ],
+                    [
+                        'key' => 'FoodSetting',
+                        'title' => '点餐设置',
+                    ],
+                    [
+                        'key' => 'allianceUploadWechat',
+                        'title' => '联盟微信小程序发布',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'saasSingleStoreSetting',
+                'title' => '供应链端设置',
+            ],
+            [
+                'key' => 'storeForbiddenDirectory',
+                'title' => '店铺禁售目录',
+            ],
+            [
+                'key' => 'saasMchMiniSetting',
+                'title' => '服务端小程序设置',
+                'children' => [
+                    [
+                        'key' => 'SaasSmsSetting',
+                        'title' => '服务端短信申请',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'addressRecognitionSetting',
+                'title' => '地址识别设置',
+            ],
+            [
+                'key' => 'saasUpgrade',
+                'title' => '系统升级',
+            ],
+            [
+                'key' => 'saasProtocol',
+                'title' => '协议设置',
+            ],
+            [
+                'key' => 'saasAdapay',
+                'title' => '汇付支付',
+            ],
+            [
+                'key' => 'saasYunst',
+                'title' => '通联支付',
+            ],
+            [
+                'key' => 'timerTaskCopy',
+                'title' => '定时任务',
+            ],
+        ],
+    ],
+];

+ 89 - 0
config/saas_bd_agent_permission.php

@@ -0,0 +1,89 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版子账号菜单权限
+return [
+    // [
+    //     'key' => 'dashboard',
+    //     'title' => '概况',
+    // ],
+    [
+        'key' => 'saasStoreList',
+        'title' => '商城',
+    ],
+    [
+        'key' => 'saasAgencyFinance',
+        'title' => '分账',
+    ],
+    [
+        'key' => 'bdAgent',
+        'title' => '推广代理',
+        'children' => [
+            [
+                'key' => 'saasAgencyPayApply',
+                'title' => '进件列表',
+            ],
+            [
+                'key' => 'saasAgencyStoreRenew',
+                'title' => '店铺缴费',
+            ],
+            [
+                'key' => 'saasAgencySalesman',
+                'title' => '业务员',
+            ],
+        ]
+    ],
+    [
+        'key' => 'saasStore',
+        'title' => '店铺',
+        'children' => [
+            [
+                'key' => 'saasStoreList',
+                'title' => '店铺列表',
+            ],
+            [
+                'key' => 'saasStoreSetting',
+                'title' => '店铺设置',
+            ],
+            [
+                'key' => 'saasStoreApply',
+                'title' => '店铺申请',
+            ],
+        ],
+    ],
+    [
+        'key' => 'cloudSupplierOrder',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+            ],
+            [
+                'key' => 'OrderDetails',
+                'title' => '订单详情',
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasBdAgentFinance',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'saasBdAgentOrderLog',
+                'title' => '流水明细统计',
+            ],
+        ],
+    ],
+];

+ 142 - 0
config/saas_front_agent_permission.php

@@ -0,0 +1,142 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// 前置仓账号菜单权限
+return [
+    // [
+    //     'key' => 'dashboard',
+    //     'title' => '概况',
+    // ],
+    [
+        'key' => 'saasStoreList',
+        'title' => '商城',
+    ],
+//    [
+//        'key' => 'saasStore',
+//        'title' => '店铺',
+//        'children' => [
+//            [
+//                'key' => 'saasStoreList',
+//                'title' => '店铺列表',
+//            ]
+//        ]
+//    ],
+//    [
+//        'key' => 'saasAgency',
+//        'title' => '代理',
+//        'children' => [
+//            [
+//                'key' => 'frontAgentBindSupplier',
+//                'title' => '前置仓绑定供货商',
+//            ],
+//            [
+//                'key' => 'frontAgentBindStore',
+//                'title' => '前置仓绑定商家',
+//            ],
+//        ],
+//    ],
+//    [
+//        'key' => 'cloudSupplierOrder',
+//        'title' => '订单',
+//        'children' => [
+//            [
+//                'key' => 'orderList',
+//                'title' => '订单列表',
+//            ],
+//            [
+//                'key' => 'orderOfflineList',
+//                'title' => '自提订单',
+//            ],
+//            [
+//                'key' => 'orderRefundList',
+//                'title' => '售后订单',
+//            ],
+//            [
+//                'key' => 'OrderDetails',
+//                'title' => '订单详情',
+//            ],
+//        ],
+//    ],
+    [
+        'key' => 'saasAgentFrontCloudPlatform',
+        'title' => '云仓',
+        'children' => [
+//            [
+//                'key' => 'saasCloudPlatformApply',
+//                'title' => '云仓申请',
+//            ],
+//            [
+//                'key' => 'saasCloudPlatformUser',
+//                'title' => '云仓用户',
+//            ],
+//            [
+//                'key' => 'saasCloudPlatformSupplier',
+//                'title' => '云仓供货商',
+//            ],
+//            [
+//                'key' => 'saasCloudPlatformGoods',
+//                'title' => '云仓商品',
+//            ],
+
+            [
+                'key' => 'cloudSupplierDailiOrder',
+                'title' => '配货单',
+            ],
+
+            [
+                'key' => 'cloudSupplierAgentGroupOrder',
+                'title' => '集采订单',
+            ],
+//            [
+//                'key' => 'saasCloudPlatformFinance',
+//                'title' => '云仓财务',
+//            ],
+            // [
+            //     'key' => 'saasCloudPlatformStbz',
+            //     'title' => '胜天半子',
+            // ],
+
+        ],
+    ],
+    [
+        'key' => 'cloudDriver',
+        'title' => '司机',
+        'children' => [
+            [
+                'key' => 'cloudDriver',
+                'title' => '司机管理',
+            ],
+            [
+                'key' => 'cloudDriverLine',
+                'title' => '线路配送',
+            ],
+        ],
+    ],
+    [
+        'key' => 'agentFrontPurchaseERP',
+        'title' => '同城',
+        'children' => [
+            [
+                'key' => 'cloudFrontDeliveryOrderList',
+                'title' => '同城配送订单',
+            ],
+	    [
+                'key' => 'cloudFrontDelivery',
+                'title' => '同城配送订单',
+            ],
+        ],
+    ],
+    [
+        'key' => 'agentFrontERP',
+        'title' => '进销存',
+    ]
+    ,
+    [
+        'key' => 'agentFrontExpress',
+        'title' => '快递'
+    ]
+
+];

+ 57 - 0
config/saas_goods_agent_permission.php

@@ -0,0 +1,57 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// 前置仓账号菜单权限
+return [
+    // [
+    //     'key' => 'dashboard',
+    //     'title' => '概况',
+    // ],
+    [
+        'key' => 'saasGoodsAgent',
+        'title' => '代理',
+        'children' => [
+            [
+                'key' => 'saasGoodsAgentGoods',
+                'title' => '代理产品',
+            ],
+            [
+                'key' => 'saasGoodsAgentCommission',
+                'title' => '佣金列表',
+            ],
+            [
+                'key' => 'saasGoodsAgentSetting',
+                'title' => '申请设置',
+                'children' => [
+                    [
+                        'key' => 'saasGoodsAgentSetting',
+                        'title' => '申请代理产品',
+                    ]
+                ]
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasGoodsAgentOrder',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'saasGoodsAgentOrder',
+                'title' => '代理订单',
+            ],
+        ],
+    ],
+    [
+        'key' => 'saasGoodsAgentFinance',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'saasGoodsAgentFinance',
+                'title' => '收支明细',
+            ],
+        ],
+    ],
+];

+ 46 - 0
config/saas_mch_brands_permission.php

@@ -0,0 +1,46 @@
+<?php
+/**
+ * saas_mch_brands_permission.php
+ * 入住商品牌管理员菜单
+ * Created on 2025/5/14 10:27
+ * @author: hankaige
+ */
+
+return [
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'branchStoreCategory',
+                'title' => '门店类',
+                'children' => [
+                    [
+                        'key' => 'mch',
+                        'title' => '入驻商',
+                        'children' => [
+                            [
+                                'key' => 'mchList',
+                                'title' => '入驻商列表',
+                            ],
+                            [
+                                'key' => 'mchGoods',
+                                'title' => '入驻商商品',
+                            ],
+                            [
+                                'key' => 'mchOrder',
+                                'title' => '入驻商订单',
+                            ],
+                            [
+                                'key' => 'mchCash',
+                                'title' => '入驻商提现',
+                            ],
+
+                        ]
+                    ],
+
+                ]
+            ]
+        ]
+    ]
+];

+ 485 - 0
config/saas_mch_permission.php

@@ -0,0 +1,485 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版门店管理员菜单
+return [
+    [
+        'key' => 'mchSet',
+        'title' => '设置',
+    ],
+    [
+        'key' => 'setting',
+        'title' => '系统',
+        'children' => [
+            [
+                'key' => 'printSetting',
+                'title' => '打印设置',
+                'children' => [
+                    [
+                        'key' => 'printer',
+                        'title' => '小票打印',
+                        'children' => [
+                            [
+                                'key' => 'printerAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+        ],
+    ],
+    [
+        'key' => 'mchFinance',
+        'title' => '财务',
+    ],
+    [
+        'key' => 'goods',
+        'title' => '商品',
+        'children' => [
+            [
+                'key' => 'goodsList',
+                'title' => '商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesHotelGoods',
+                'title' => '酒店商品',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+//            [
+//                'key' => 'typesVirtualGoods',
+//                'title' => '虚拟商品',
+//                'children' => [
+//                    [
+//                        'key' => 'goodsAdd',
+//                        'title' => '添加',
+//                        'type' => 'action'
+//                    ],
+//                    [
+//                        'key' => 'goodsEdit',
+//                        'title' => '编辑',
+//                        'type' => 'action'
+//                    ],
+//                    [
+//                        'key' => 'goodsDelete',
+//                        'title' => '删除',
+//                        'type' => 'action'
+//                    ],
+//                    [
+//                        'key' => 'goodsBatchEdit',
+//                        'title' => '批量设置',
+//                        'type' => 'action'
+//                    ],
+//                    [
+//                        'key' => 'goodsCsvUpload',
+//                        'title' => 'CSV上传',
+//                        'type' => 'action'
+//                    ],
+//                ]
+//            ],
+            [
+                'key' => 'mchCatList',
+                'title' => '分类列表',
+                'children' => [
+                    [
+                        'key' => 'mchCatEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'mchCatAdd',
+                        'title' => '新增',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'mchCatBatchEdit',
+                        'title' => '批量操作',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderSameCityList',
+                'title' => '同城订单',
+                'children' => [
+                    [
+                        'key' => 'orderSameCityListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderSameCityListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderSameCityListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderSameCityListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+                'children' => [
+                    [
+                        'key' => 'orderOfflineListVerify',
+                        'title' => '核销',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderOfflineListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderOfflineListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'orderRefundListConfirmReceive',
+                        'title' => '确认收货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseExchange',
+                        'title' => '拒绝换货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeRefund',
+                        'title' => '同意退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseRefund',
+                        'title' => '拒绝退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeExchange',
+                        'title' => '同意换货',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderScanList',
+                'title' => '当面付订单',
+            ],
+            [
+                'key' => 'orderComment',
+                'title' => '评价管理',
+                'children' => [
+                    [
+                        'key' => 'orderCommentRely',
+                        'title' => '回复',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentHide',
+                        'title' => '隐藏',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'industryCategory',
+                'title' => '行业类',
+                'children' => [
+                    [
+                        'key' => 'food',
+                        'title' => '点餐管理',
+                        'children' => [
+                            [
+                                'key' => 'foodGoods',
+                                'title' => '商品管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodGoodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsSetting',
+                                        'title' => '设置',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'foodCat',
+                                'title' => '分类',
+                                'children' => [
+                                    [
+                                        'key' => 'foodCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodEditEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodTable',
+                                'title' => '餐桌管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodTableAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableQrcode',
+                                        'title' => '二维码',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodSetting',
+                                'title' => '设置',
+                            ],
+                            [
+                                'key' => 'foodQrcode',
+                                'title' => '店铺点餐二维码',
+                            ],
+                            [
+                                'key' => 'foodSlide',
+                                'title' => '轮播图',
+                                'children' => [
+                                    [
+                                        'key' => 'foodSlideAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ]
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'toolCategory',
+                'title' => '工具类',
+                'children' => [
+                    [
+                        'key' => 'scanCodePay',
+                        'title' => '收款码'
+                    ],
+                ]
+            ]
+        ]
+    ],
+    [
+        'key' => 'mchStaff',
+        'title' => '员工',
+    ],
+];

+ 116 - 0
config/saas_md_permission.php

@@ -0,0 +1,116 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版门店管理员菜单
+return [
+    [
+        'key' => 'dashboard',
+        'title' => '概况',
+    ],
+    [
+        'key' => 'outletGoods',
+        'title' => '商品',
+    ],
+    [
+        'key' => 'mdSetting',
+        'title' => '门店设置',
+        'children' => [
+            [
+                'key' => 'SubPrinterSetting',
+                '打印设置'
+            ]
+        ]
+    ],
+    [
+        'key' => 'outletSetting',
+        'title' => '设置',
+    ],
+    [
+        'key' => 'outletStaff',
+        'title' => '员工',
+    ],
+    [
+        'key' => 'outletFinance',
+        'title' => '财务',
+    ],
+    [
+        'key' => 'outletMarketing',
+        'title' => '营销',
+        'children' => [
+            [
+                'key' => 'outletMarketingFood',
+                'title' => '点餐管理',
+            ],
+            [
+                'key' => 'wastore',
+                'title' => '微信门店快送-门店权限',
+                'children' => [
+                    [
+                        'key' => 'wastoreManageGoods',
+                        'title' => '商品库'
+                    ],
+                ],
+            ],
+            [
+                'key' => 'WechatNewDelivery',
+                'title' => '微信同城配送',
+            ],
+            [
+                'key' => 'cashier',
+                'title' => '门店收银台',
+            ],
+            [
+                'key' => 'cashierMobile',
+                'title' => '手机收银台',
+                'children' => [
+                    [
+                        'key' => 'cashierMobile',
+                        'title' => '收银台用户',
+                    ],
+                    [
+                        'key' => 'cashierMobile',
+                        'title' => '操作日志',
+                    ]
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'outletOrderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'outletOrderList',
+                'title' => '订单列表',
+            ],
+            [
+                'key' => 'outletOrderOfflineList',
+                'title' => '自提订单',
+            ],
+            [
+                'key' => 'outletOrderRefundList',
+                'title' => '售后订单',
+            ],
+            [
+                'key' => 'outletOrderScanList',
+                'title' => '当面付订单',
+            ],
+            [
+                'key' => 'outletOrderComment',
+                'title' => '评价管理',
+            ],
+            [
+                'key' => 'outletOrderDetails',
+                'title' => '订单详情',
+            ],
+            [
+                'key' => 'outletCashierOrderList',
+                'title' => '收银订单',
+            ],
+
+        ]
+    ],
+];

+ 156 - 0
config/saas_permission.php

@@ -0,0 +1,156 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版子账号菜单权限
+return [
+    // [
+    //     'key' => 'dashboard',
+    //     'title' => '概况',
+    // ],
+    [
+        'key' => 'saasStoreList',
+        'title' => '商城',
+    ],
+    [
+        'key' => 'saasAgencyFinance',
+        'title' => '分账',
+    ],
+    [
+        'key' => 'saasAgency',
+        'title' => '代理',
+        'children' => [
+//            [
+//                'key' => 'saasAgencyPayApply',
+//                'title' => '进件列表',
+//            ],
+//            [
+//                'key' => 'saasAgencyStoreRenew',
+//                'title' => '店铺缴费',
+//            ],
+//            [
+//                'key' => 'goodsAgent',
+//                'title' => '产品代理',
+//            ],
+            [
+                'key' => 'saasGoodsAgentGoods',
+                'title' => '代理产品',
+            ],
+//            [
+//                'key' => 'frontAgent',
+//                'title' => '前置仓',
+//            ],
+//            [
+//                'key' => 'frontAgentBindSupplier',
+//                'title' => '前置仓绑定供货商',
+//            ],
+//            [
+//                'key' => 'frontAgentBindStore',
+//                'title' => '前置仓绑定商家',
+//            ],
+//            [
+//                'key' => 'saasAgencySalesman',
+//                'title' => '业务员',
+//            ],
+            [
+                'key' => 'areaUnderGoodsAgent',
+                'title' => '产品代理',
+            ],
+        ]
+    ],
+    [
+        'key' => 'saasStore',
+        'title' => '店铺',
+        'children' => [
+            [
+                'key' => 'saasStoreList',
+                'title' => '店铺列表',
+            ],
+//            [
+//                'key' => 'saasStoreCategory',
+//                'title' => '店铺分类',
+//            ],
+            [
+                'key' => 'saasStoreSetting',
+                'title' => '店铺设置',
+            ],
+            [
+                'key' => 'saasStoreApply',
+                'title' => '店铺申请',
+            ],
+        ],
+    ],
+    [
+        'key' => 'cloudSupplierOrder',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+            ],
+            [
+                'key' => 'OrderDetails',
+                'title' => '订单详情',
+            ],
+        ],
+    ],
+//    [
+//        'key' => 'saasCloudPlatform',
+//        'title' => '云仓',
+//        'children' => [
+//            [
+//                'key' => 'saasCloudPlatformApply',
+//                'title' => '云仓申请',
+//            ],
+//            [
+//                'key' => 'saasCloudPlatformUser',
+//                'title' => '云仓用户',
+//            ],
+//            [
+//                'key' => 'saasCloudPlatformSupplier',
+//                'title' => '云仓供货商',
+//            ],
+//            [
+//                'key' => 'saasCloudPlatformGoods',
+//                'title' => '云仓商品',
+//            ],
+//
+//            [
+//                'key' => 'cloudSupplierDailiOrder',
+//                'title' => '配货单',
+//            ],
+//            [
+//                'key' => 'cloudDriverLine',
+//                'title' => '线路配送',
+//            ],
+////            [
+////                'key' => 'saasCloudPlatformFinance',
+////                'title' => '云仓财务',
+////            ],
+//            // [
+//            //     'key' => 'saasCloudPlatformStbz',
+//            //     'title' => '胜天半子',
+//            // ],
+//        ],
+//    ],
+//    [
+//        'key' => 'cloudDriver',
+//        'title' => '司机',
+//        'children' => [
+//            [
+//                'key' => 'cloudDriver',
+//                'title' => '司机管理',
+//            ],
+//        ],
+//    ],
+];

+ 1805 - 0
config/saas_store_cloud_permission.php

@@ -0,0 +1,1805 @@
+<?php
+/**
+ * 洛阳赤炎鹰网络科技有限公司
+ * https://www.cyyvip.com
+ * Copyright (c) 2022 赤店商城 All rights reserved.
+ */
+// saas版商城菜单权限
+return [
+    [
+        'key' => 'dashboard',
+        'title' => '概况',
+        'children' => [
+        ]
+    ],
+    [
+        'key' => 'statistic',
+        'title' => '统计',
+        'children' => [
+            [
+                'key' => 'dataStatistic',
+                'title' => '数据统计',
+                'children' => [
+                ],
+            ],
+            [
+                'key' => 'goodsStatistic',
+                'title' => '商品销售统计',
+                'children' => [
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'setting',
+        'title' => '商城',
+        'children' => [
+            [
+                'key' => 'settingEdit',
+                'title' => '功能设置',
+                'children' => [
+                    [
+                        'key' => 'store',
+                        'title' => '基础设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'basicEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wechat',
+                        'title' => '微信设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'weixinEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'display',
+                        'title' => '显示设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'displayEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                ],
+            ],
+            [
+                'key' => 'rulesSetting',
+                'title' => '规则设置',
+                'children' => [
+                    [
+                        'key' => 'postageList',
+                        'title' => '运费规则',
+                        'children' => [
+                            [
+                                'key' => 'postageAdd',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'freeDelivery',
+                        'title' => '包邮规则',
+                        'children' => [
+                            [
+                                'key' => 'freeDeliveryAdd',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'territorial',
+                        'title' => '区域限购',
+                        'children' => [
+                            [
+                                'key' => 'areaEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'offerPrice',
+                        'title' => '起送规则',
+                        'children' => [
+                            [
+                                'key' => 'offerPriceAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'refundAddress',
+                        'title' => '退货地址设置',
+                        'children' => [
+                            [
+                                'key' => 'refundAddressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'printSetting',
+                'title' => '打印设置',
+                'children' => [
+                    [
+                        'key' => 'express',
+                        'title' => '电子面单',
+                        'children' => [
+                            [
+                                'key' => 'expressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'cloud',
+                        'title' => '云打印设置',
+                        'children' => [
+                            [
+                                'key' => 'cloudAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printer',
+                        'title' => '小票打印',
+                        'children' => [
+                            [
+                                'key' => 'printerAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'noticeConfig',
+                'title' => '消息通知',
+            ],
+            [
+                'key' => 'delivery',
+                'title' => '配送设置',
+            ],
+            
+        ]
+    ],
+    [
+        'key' => 'goods',
+        'title' => '商品',
+        'children' => [
+            [
+                'key' => 'goodsList',
+                'title' => '商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'catList',
+                'title' => '分类列表',
+                'children' => [
+                    [
+                        'key' => 'catEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catAdd',
+                        'title' => '新增',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catBatchEdit',
+                        'title' => '批量操作',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'attrList',
+                'title' => '规格库',
+                'children' => [
+                    [
+                        'key' => 'attrEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrBatchDelete',
+                        'title' => '批量删除',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'goodsRecommendKeyword',
+                'title' => '推荐发现关键词',
+                'children' => [
+                    [
+                        'key' => 'recommendKeywordAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordDel',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordBatchDel',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+                'children' => [
+                    [
+                        'key' => 'orderOfflineListVerify',
+                        'title' => '核销',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderOfflineListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderOfflineListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'orderRefundListConfirmReceive',
+                        'title' => '确认收货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseExchange',
+                        'title' => '拒绝换货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeRefund',
+                        'title' => '同意退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseRefund',
+                        'title' => '拒绝退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeExchange',
+                        'title' => '同意换货',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderScanList',
+                'title' => '当面付订单',
+            ],
+            [
+                'key' => 'orderComment',
+                'title' => '评价管理',
+                'children' => [
+                    [
+                        'key' => 'orderCommentRely',
+                        'title' => '回复',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentHide',
+                        'title' => '隐藏',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'newDiy',
+        'title' => '装修',
+    ],
+    [
+        'key' => 'userManage',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'userManagement',
+                'title' => '用户管理',
+                'children' => [
+                    [
+                        'key' => 'userManagementView',
+                        'title' => '查看',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'userManagementDetails',
+                        'title' => '用户详情',
+                        'children' => [
+                            [
+                                'key' => 'userManagementDetailsEditUser',
+                                'title' => '编辑用户',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'userManagementDetailsSetProperty',
+                                'title' => '设置积分/余额',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ]
+                ],
+            ],
+            [
+                'key' => 'memberManage',
+                'title' => '会员等级',
+                'children' => [
+                    [
+                        'key' => 'memberLevel',
+                        'title' => '会员等级',
+                        'children' => [
+                            [
+                                'key' => 'memberLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'levelOrderList',
+                        'title' => '购买记录'
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userAdmin',
+                'title' => '手机端管理员',
+                'children' => [
+                    [
+                        'key' => 'userAdminAdd',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+
+                        'key' => 'userAdminDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'authManage',
+        'title' => '员工',
+        'children' => [
+            [
+                'key' => 'accountManage',
+                'title' => '账号管理',
+                'children' => [
+                    [
+                        'key' => 'accountManageAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'accountManageEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'accountManageDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'roleManage',
+                'title' => '角色管理',
+                'children' => [
+                    [
+                        'key' => 'roleManageEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'roleManageAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'roleManageDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'marketingManage',
+        'title' => '营销',
+        'children' => [
+            [
+                'key' => 'aboutArticleManage',
+                'title' => '文章',
+                'children' => [
+                    [
+                        'key' => 'articleAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'articleEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'articleDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'topicManage',
+                'title' => '专题',
+                'children' => [
+                    [
+                        'key' => 'topicList',
+                        'title' => '专题列表',
+                        'children' => [
+                            [
+                                'key' => 'topicAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'topicEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'topicDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'topicBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'topicCat',
+                        'title' => '专题分类',
+                        'children' => [
+                            [
+                                'key' => 'topicCatEdit',
+                                'title' => '编辑',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'topicCatAdd',
+                                'title' => '新增',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'topicCatDelete',
+                                'title' => '删除',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'topicCatBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action'
+                            ]
+                        ]
+                    ]
+                ]
+            ],
+            [
+                'key' => 'videoManage',
+                'title' => '视频',
+                'children' => [
+                    [
+                        'key' => 'videoEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'videoAdd',
+                        'title' => '新增',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'videoDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'videoBatchDelete',
+                        'title' => '批量删除',
+                        'type' => 'action'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'couponManage',
+                'title' => '优惠券',
+                'children' => [
+                    [
+                        'key' => 'couponList',
+                        'title' => '优惠券列表',
+                        'children' => [
+                            [
+                                'key' => 'couponListEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponListAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponListBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponListDetails',
+                                'title' => '详情',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponListQrcode',
+                                'title' => '小程序二维码',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponListSend',
+                                'title' => '发放',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'couponAutoSendManage',
+                        'title' => '发放规则',
+                        'children' => [
+                            [
+                                'key' => 'couponAutoSendManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponAutoSendManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponAutoSendManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'couponAutoSendManageBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+
+                ],
+            ],
+            [
+                'key' => 'cardCouponManage',
+                'title' => '卡券管理',
+                'children' => [
+                    [
+                        'key' => 'cardCouponView',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'cardCouponEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'cardCouponAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'cardCouponDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'cardCouponBatchDelete',
+                        'title' => '批量删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'rechargePreceptManage',
+                'title' => '充值方案',
+                'children' => [
+                    [
+                        'key' => 'rechargeSetting',
+                        'title' => '设置',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'rechargeEdit',
+                        'title' => '编辑',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'rechargeAdd',
+                        'title' => '新增',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'rechargeDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'shareManage',
+                'title' => '分销管理',
+                'children' => [
+                    [
+                        'key' => 'shareUserCheck',
+                        'title' => '分销商审核',
+                        'children' => [
+                            [
+                                'key' => 'shareUserCheckPass',
+                                'title' => '通过',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserCheckRefuse',
+                                'title' => '拒绝',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserCheckBatchPass',
+                                'title' => '批量通过',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserCheckBatchRefuse',
+                                'title' => '批量拒绝',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareUserList',
+                        'title' => '分销商列表',
+                        'children' => [
+                            [
+                                'key' => 'shareUserListView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserListWithdrawLog',
+                                'title' => '提现明细',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserListShareOrder',
+                                'title' => '分销订单',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserListQrcode',
+                                'title' => '分销二维码',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareUserListRemark',
+                                'title' => '备注',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareOrder',
+                        'title' => '分销订单',
+                    ],
+                    [
+                        'key' => 'shareCash',
+                        'title' => '分销提现',
+                        'children' => [
+                            [
+                                'key' => 'shareCashReject',
+                                'title' => '驳回',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareCashConfirmPayment',
+                                'title' => '确认打款',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareCashManualPayment',
+                                'title' => '手动打款',
+                                'type' => 'action',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'shareBasicSetting',
+                        'title' => '基础设置',
+                    ],
+                    [
+                        'key' => 'shareMoneySetting',
+                        'title' => '佣金设置',
+                    ],
+                    [
+                        'key' => 'sharePoster',
+                        'title' => '推广海报',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'wxLive',
+                'title' => '小程序直播',
+                'children' => [
+                    [
+                        'key' => 'wxLiveRoomList',
+                        'title' => '直播间列表',
+                        'children' => [
+                            [
+                                'key' => 'wxLiveRoomListReplay',
+                                'title' => '回放',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'wxLiveRoomListViewGoods',
+                                'title' => '查看商品',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'wxLiveRoomListImportGoods',
+                                'title' => '导入商品',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'wxLiveRoomListAddRoom',
+                                'title' => '添加直播间',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'wxLiveRoomListDeleteRoom',
+                                'title' => '删除直播间',
+                                'type' => 'action'
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wxLiveGoodsList',
+                        'title' => '商品列表',
+                        'children' => [
+                            [
+                                'key' => 'wxLiveGoodsListDelGoods',
+                                'title' => '删除',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'wxLiveGoodsListAddGoods',
+                                'title' => '添加',
+                                'type' => 'action'
+                            ],
+                        ]
+                    ],
+                ]
+            ],
+            [
+                'key' => 'scanCodePay',
+                'title' => '收款码',
+                'children' => [
+                    [
+                        'key' => 'scanCodePayStore',
+                        'title' => '店铺聚合收款码',
+                    ],
+                    [
+                        'key' => 'scanCodePayPlatform',
+                        'title' => '平台聚合收款码',
+                    ]
+                ],
+            ],
+            [
+                'key' => 'integral',
+                'title' => '积分商品',
+                'children' => [
+                    [
+                        'key' => 'integralGoods',
+                        'title' => '商品列表',
+                        'children' => [
+                            [
+                                'key' => 'integralGoodsAdd',
+                                'title' => '新建',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'integralGoodsDelete',
+                                'title' => '删除',
+                                'type' => 'action'
+                            ],
+                            [
+                                'key' => 'integralGoodsEdit',
+                                'title' => '编辑',
+                                'type' => 'action'
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'integralOrder',
+                        'title' => '订单列表',
+                    ],
+                    [
+                        'key' => 'integralSetting',
+                        'title' => '积分设置',
+                    ]
+                ]
+            ],
+            [
+                'key' => 'food',
+                'title' => '点餐管理',
+                'children' => [
+                    [
+                        'key' => 'foodGoods',
+                        'title' => '商品管理',
+                        'children' => [
+                            [
+                                'key' => 'foodGoodsAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodGoodsEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodGoodsSetting',
+                                'title' => '设置',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodGoodsDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodGoodsBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'foodCat',
+                        'title' => '分类',
+                        'children' => [
+                            [
+                                'key' => 'foodCatAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodEditEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodCatDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'foodTable',
+                        'title' => '餐桌管理',
+                        'children' => [
+                            [
+                                'key' => 'foodTableAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodTableEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodTableDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodTableQrcode',
+                                'title' => '二维码',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'foodSetting',
+                        'title' => '设置',
+                    ],
+                    [
+                        'key' => 'foodQrcode',
+                        'title' => '店铺点餐二维码',
+                    ],
+                    [
+                        'key' => 'foodSlide',
+                        'title' => '轮播图',
+                        'children' => [
+                            [
+                                'key' => 'foodSlideAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodSlideEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'foodSlideDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ]
+                        ],
+                    ]
+                ],
+            ],
+            // [
+            //     'key' => 'form',
+            //     'title' => '自定义表单',
+            // ],
+            [
+                'key' => 'shareholderManage',
+                'title' => '股东分红',
+                'children' => [
+                    [
+                        'key' => 'shareholderAudit',
+                        'title' => '股东审核',
+                        'children' => [
+                            [
+                                'key' => 'shareholderAuditPass',
+                                'title' => '通过',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareholderAuditRefuse',
+                                'title' => '拒绝',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderList',
+                        'title' => '股东列表',
+                        'children' => [
+                            [
+                                'key' => 'shareholderListAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareholderListEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareholderListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderLevel',
+                        'title' => '股东等级',
+                        'children' => [
+                            [
+                                'key' => 'shareholderLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareholderLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareholderLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderShareOrder',
+                        'title' => '分润订单'
+                    ],
+                    [
+                        'key' => 'shareholderCommissionList',
+                        'title' => '佣金列表'
+                    ],
+                    [
+                        'key' => 'shareholderWithdrawalAudit',
+                        'title' => '提现审核',
+                        'children' => [
+                            [
+                                'key' => 'shareholderWithdrawalAuditPass',
+                                'title' => '通过',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'shareholderWithdrawalAuditRefuse',
+                                'title' => '拒绝',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderPrizePool',
+                        'title' => '分红奖金池',
+                        'children' => [
+                            [
+                                'key' => 'shareholderPrizePoolSend',
+                                'title' => '发放',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderSetting',
+                        'title' => '设置页面',
+                    ],
+                    [
+                        'key' => 'shareholderApplySetting',
+                        'title' => '申请设置',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'videoGoods',
+                'title' => '抖品',
+                'children' => [
+                    [
+                        'key' => 'videoGoodsWorkList',
+                        'title' => '作品列表',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsWorkListView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsWorkListAgree',
+                                'title' => '同意',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsWorkListRefuse',
+                                'title' => '拒绝',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsWorkListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsWorkListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'videoGoodsAuthorList',
+                        'title' => '作者列表',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsAuthorListAgree',
+                                'title' => '同意',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsAuthorListRefuse',
+                                'title' => '拒绝',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsAuthorListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsAuthorListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'videoGoodsFeedbackList',
+                        'title' => '反馈列表',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsFeedbackListView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsFeedbackListDown',
+                                'title' => '下架',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsFeedbackListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsFeedbackListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'videoGoodsBringGoodsList',
+                        'title' => '带货商品',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsBringGoodsListAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsBringGoodsListEdit',
+                                'title' => '上下架',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsBringGoodsListQrcode',
+                                'title' => '小程序二维码',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsBringGoodsListCopyPath',
+                                'title' => '复制小程序链接',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsBringGoodsListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsFeedbackListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'videoGoodsCatList',
+                        'title' => '抖品分类',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsCatListEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsCatListAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsCatListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'videoGoodsCatListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'videoGoodsSetting',
+                        'title' => '设置',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'cloudMerchant',
+                'title' => '云仓',
+                'children' => [
+                    [
+                        'key' => 'cloudMerchantSelection',
+                        'title' => '云仓选品库',
+                        'children' => [
+                            [
+                                'key' => 'cloudMerchantSelectionView',
+                                'title' => '查看详情',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudMerchantSelectionAdd',
+                                'title' => '加入选品',
+                                'type' => 'action',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'cloudMerchantMyCloud',
+                        'title' => '我的云仓',
+                        'children' => [
+                            [
+                                'key' => 'cloudMerchantMyCloudEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudMerchantMyCloudQrcode',
+                                'title' => '小程序二维码',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudMerchantMyCloudCopyPath',
+                                'title' => '复制小程序链接',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudMerchantMyCloudDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'cloudMerchantTransferOrder',
+                        'title' => '云仓转单',
+                    ],
+                    [
+                        'key' => 'cloudMerchantAccount',
+                        'title' => '我的账户',
+                    ],
+                    [
+                        'key' => 'cloudMerchantSetting',
+                        'title' => '云仓设置',
+                    ]
+                ],
+            ],
+	        [
+                'key' => 'adopt',
+                'title' => '认养',
+                'children' => [
+                    [
+                        'key' => 'adoptList',
+                        'title' => '认养列表',
+                        'children' => [
+                            [
+                                'key' => 'adoptListAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'adoptListEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'adoptListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'adoptCat',
+                        'title' => '认养分类',
+                        'children' => [
+                            [
+                                'key' => 'adoptCatAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'adoptCatEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'adoptCatDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'adoptOrder',
+                        'title' => '认养订单',
+                    ],
+                    [
+                        'key' => 'adoptSetting',
+                        'title' => '认养设置',
+                    ],
+                    [
+                        'key' => 'adoptDeviceManagement',
+                        'title' => '设备管理',
+                    ],
+                    [
+                        'key' => 'adoptDeliveryOrder',
+                        'title' => '配送订单',
+                    ],
+                ],
+            ],
+	        [
+                'key' => 'productTraceability',
+                'title' => '产品溯源',
+                'children' => [
+                    [
+                        'key' => 'productTraceabilityList',
+                        'title' => '产品列表',
+                        'children' => [
+                            [
+                                'key' => 'productTraceabilityListAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityListEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityListDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityListBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'productTraceabilityBatch',
+                        'title' => '产品批次',
+                        'children' => [
+                            [
+                                'key' => 'productTraceabilityBatchAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatchEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatchDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatchView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatchLog',
+                                'title' => '溯源记录',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatchQrcode',
+                                'title' => '查看二维码',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatchBatchAction',
+                                'title' => '批量操作',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'productTraceabilityLog',
+                        'title' => '溯源记录',
+                    ],
+                ],
+            ],
+        ]
+    ],
+    [
+        'key' => 'config',
+        'title' => '设置',
+        'children' => [
+            [
+                'key' => 'payConfig',
+                'title' => '支付配置',
+                'children' => [
+                    [
+                        'key' => 'wechatConfig',
+                        'title' => '微信配置',
+                    ],
+                    [
+                        'key' => 'alipayConfig',
+                        'title' => '支付宝配置',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'unionShopSetting',
+                'title' => '联盟店铺',
+            ],
+            [
+                'key' => 'baseConfig',
+                'title' => '基础设置',
+                'children' => [
+                    [
+                        'key' => 'douyinConfig',
+                        'title' => '抖音配置',
+                    ],
+                    [
+                        'key' => 'uploadConfig',
+                        'title' => '上传配置',
+                    ],
+                    [
+                        'key' => 'runOverConfig',
+                        'title' => '越限配置',
+                    ],
+                    [
+                        'key' => 'SettingCopyright',
+                        'title' => '版权设置',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'appSetting',
+                'title' => 'APP设置',
+            ],
+            [
+                'key' => 'ocrSetting',
+                'title' => 'OCR配置',
+            ],
+            [
+                'key' => 'uploadWechat',
+                'title' => '小程序发布',
+            ],
+            [
+                'key' => 'appletManagement',
+                'title' => '小程序管理',
+            ],
+            [
+                'key' => 'payIncoming',
+                'title' => '支付进件',
+            ],
+            [
+                'key' => 'saasUpgrade',
+                'title' => '系统升级',
+            ],
+        ]
+    ],
+    [
+        'key' => 'profitSharing',
+        'title' => '分账',
+        'children' => [
+            [
+                'key' => 'profitSharingRecord',
+                'title' => '分账记录'
+            ],
+        ]
+    ],
+    [
+        'key' => 'outletManage',
+        'title' => '门店管理',
+        'children' => [
+            [
+                'key' => 'outletManageList',
+                'title' => '门店列表',
+            ],
+            [
+                'key' => 'outletManageAudit',
+                'title' => '门店审核',
+            ],
+            [
+                'key' => 'outletManageGoods',
+                'title' => '门店商品',
+            ],
+            [
+                'key' => 'outletManageOrder',
+                'title' => '门店订单',
+            ],
+            [
+                'key' => 'outletManagePickUpOrder',
+                'title' => '自提订单',
+            ],
+            [
+                'key' => 'outletManageCommission',
+                'title' => '门店佣金',
+            ],
+            [
+                'key' => 'outletManageWithdraw',
+                'title' => '门店提现',
+            ],
+            [
+                'key' => 'outletManageStaff',
+                'title' => '门店员工',
+            ],
+            [
+                'key' => 'outletManageApplySetting',
+                'title' => '申请设置',
+            ],
+        ],
+    ]
+];

+ 2899 - 0
config/saas_store_permission.php

@@ -0,0 +1,2899 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// saas版商城菜单权限
+return [
+    [
+        'key' => 'goods',
+        'title' => '商品',
+        'children' => [
+            [
+                'key' => 'goodsList',
+                'title' => '商品列表',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'typesHotelGoods',
+                'title' => '酒店商品',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            // [
+            //     'key' => 'typesServiceGoods',
+            //     'title' => '服务预约商品列表',
+            //     'children' => [
+            //         [
+            //             'key' => 'goodsAdd',
+            //             'title' => '添加',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsEdit',
+            //             'title' => '编辑',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsDelete',
+            //             'title' => '删除',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsBatchEdit',
+            //             'title' => '批量设置',
+            //             'type' => 'action'
+            //         ],
+            //         [
+            //             'key' => 'goodsCsvUpload',
+            //             'title' => 'CSV上传',
+            //             'type' => 'action'
+            //         ],
+            //     ]
+            // ],
+            [
+                'key' => 'typesVirtualGoods',
+                'title' => '虚拟商品',
+                'children' => [
+                    [
+                        'key' => 'goodsAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsBatchEdit',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'goodsCsvUpload',
+                        'title' => 'CSV上传',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'catList',
+                'title' => '分类列表',
+                'children' => [
+                    [
+                        'key' => 'catEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catAdd',
+                        'title' => '新增',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'catBatchEdit',
+                        'title' => '批量操作',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'attrList',
+                'title' => '规格库',
+                'children' => [
+                    [
+                        'key' => 'attrEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrDelete',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'attrBatchDelete',
+                        'title' => '批量删除',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'goodsBrand',
+                'title' => '品牌列表'
+            ],
+            [
+                'key' => 'goodsRecommendKeyword',
+                'title' => '推荐发现关键词',
+                'children' => [
+                    [
+                        'key' => 'recommendKeywordAdd',
+                        'title' => '添加',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordEdit',
+                        'title' => '编辑',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordDel',
+                        'title' => '删除',
+                        'type' => 'action'
+                    ],
+                    [
+                        'key' => 'recommendKeywordBatchDel',
+                        'title' => '批量设置',
+                        'type' => 'action'
+                    ],
+                ]
+            ],
+        ]
+    ],
+    [
+        'key' => 'userManage',
+        'title' => '用户',
+        'children' => [
+            [
+                'key' => 'userManagement',
+                'title' => '用户管理',
+                'children' => [
+                    [
+                        'key' => 'userManagementView',
+                        'title' => '查看',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'userManagementDetails',
+                        'title' => '用户详情',
+                        'children' => [
+                            [
+                                'key' => 'userManagementDetailsEditUser',
+                                'title' => '编辑用户',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'userManagementDetailsSetProperty',
+                                'title' => '设置积分/余额',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ]
+                ],
+            ],
+            [
+                'key' => 'memberManage',
+                'title' => '会员等级',
+                'children' => [
+                    [
+                        'key' => 'memberLevel',
+                        'title' => '会员等级',
+                        'children' => [
+                            [
+                                'key' => 'memberLevelAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'memberLevelDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'levelOrderList',
+                        'title' => '购买记录'
+                    ],
+                    [
+                        'key' => 'growthValueSetting',
+                        'title' => '成长值设置'
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userAdmin',
+                'title' => '手机端管理员',
+                'children' => [
+                    [
+                        'key' => 'userAdminAdd',
+                        'title' => '添加',
+                        'type' => 'action',
+                    ],
+                    [
+
+                        'key' => 'userAdminDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'userShareLevel',
+                'title' => '分销商会员等级',
+                'children' => [],
+            ],
+            [
+                'key' => 'userLabel',
+                'title' => '用户标签',
+                'children' => [],
+            ]
+        ]
+    ],
+    [
+        'key' => 'orderManage',
+        'title' => '订单',
+        'children' => [
+            [
+                'key' => 'orderList',
+                'title' => '订单列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'cashierOrderList',
+                'title' => '收银台列表',
+                'children' => [
+                    [
+                        'key' => 'orderListSend',
+                        'title' => '发货',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderListExpressInfo',
+                        'title' => '物流信息',
+                    ],
+                    [
+                        'key' => 'orderListTransferOrder',
+                        'title' => '转单',
+                    ],
+                    [
+                        'key' => 'orderListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderSameCityList',
+                'title' => '同城订单',
+                'children' => [
+                    [
+                        'key' => 'orderSameCityListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderSameCityListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderSameCityListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderSameCityListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                    [
+                        'key' => 'orderSameCityListAgree',
+                        'title' => '同意',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderOfflineList',
+                'title' => '自提订单',
+                'children' => [
+                    [
+                        'key' => 'orderOfflineListVerify',
+                        'title' => '核销',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListCancel',
+                        'title' => '取消',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderOfflineListDetails',
+                        'title' => '详情',
+                    ],
+                    [
+                        'key' => 'orderOfflineListPrint',
+                        'title' => '打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListReceiptPrint',
+                        'title' => '小票打印',
+                    ],
+                    [
+                        'key' => 'orderOfflineListAddRemark',
+                        'title' => '添加备注',
+                    ],
+                    [
+                        'key' => 'orderOfflineListMoveRecycle',
+                        'title' => '移入回收站',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderRefundList',
+                'title' => '售后订单',
+                'children' => [
+                    [
+                        'key' => 'orderRefundListConfirmReceive',
+                        'title' => '确认收货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseExchange',
+                        'title' => '拒绝换货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeRefund',
+                        'title' => '同意退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListRefuseRefund',
+                        'title' => '拒绝退货',
+                    ],
+                    [
+                        'key' => 'orderRefundListAgreeExchange',
+                        'title' => '同意换货',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'orderScanList',
+                'title' => '当面付订单',
+            ],
+            [
+                'key' => 'orderComment',
+                'title' => '评价管理',
+                'children' => [
+                    [
+                        'key' => 'orderCommentRely',
+                        'title' => '回复',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentHide',
+                        'title' => '隐藏',
+                        'type' => 'action',
+                    ],
+                    [
+                        'key' => 'orderCommentDelete',
+                        'title' => '删除',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'cloudOrderList',
+                'title' => '云仓配送单',
+            ],
+        ]
+    ],
+    [
+        'key' => 'storeProfit',
+        'title' => '财务',
+        'children' => [
+            [
+                'key' => 'storeAccount',
+                'title' => '结算账户',
+            ],
+            [
+                'key' => 'storeCash',
+                'title' => '结算提现',
+            ],
+            [
+                'key' => 'profitSharingRecord',
+                'title' => '分账记录'
+            ],
+            [
+                'key' => 'financialList',
+                'title' => '财务列表'
+            ],
+            [
+                'key' => 'orderCostProfit',
+                'title' => '订单列表'
+            ],
+            [
+                'key' => 'offlineTransferLog',
+                'title' => '线下转账'
+            ],
+            [
+                'key' => 'invoiceManage',
+                'title' => '发票管理'
+            ],
+            [
+                'key' => 'mdPrice',
+                'title' => '门店佣金'
+            ],
+            [
+                'key' => 'userPrice',
+                'title' => '会员佣金'
+            ],
+            [
+                'key' => 'userMoney',
+                'title' => '用户余额'
+            ],
+            [
+                'key' => 'userPriceTotal',
+                'title' => '用户佣金明细'
+            ],
+        ],
+    ],
+    [
+        'key' => 'statistic',
+        'title' => '统计',
+        'children' => [
+            [
+                'key' => 'dataStatistic',
+                'title' => '数据统计',
+                'children' => [
+                ],
+            ],
+            [
+                'key' => 'goodsStatistic',
+                'title' => '商品销售统计',
+                'children' => [
+                ],
+            ],
+            [
+                'key' => 'orderSaleGoodsStatistic',
+                'title' => '订单商品统计',
+            ],
+            [
+                'key' => 'dashboardRecharge',
+                'title' => '会员储值',
+            ],
+            [
+                'key' => 'dashboardUser',
+                'title' => '会员分析',
+            ],
+            [
+                'key' => 'dashboardGoodsNum',
+                'title' => '库存分析',
+            ],
+            [
+                'key' => 'dashboardGoodsSale',
+                'title' => '热销商品',
+            ],
+            [
+                'key' => 'dashboardSales',
+                'title' => '销量分析',
+            ],
+            [
+                'key' => 'dashboardSalesAnalysis',
+                'title' => '销售分析',
+            ],
+            [
+                'key' => 'dashboardActiveUser',
+                'title' => '活跃用户',
+            ],
+            [
+                'key' => 'expiredsProducts',
+                'title' => '临期产品',
+            ],
+        ],
+    ],
+    [
+        'key' => 'setting',
+        'title' => '系统',
+        'children' => [
+            [
+                'key' => 'settingEdit',
+                'title' => '功能设置',
+                'children' => [
+                    [
+                        'key' => 'store',
+                        'title' => '基础设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'basicEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wechat',
+                        'title' => '微信设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'weixinEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'display',
+                        'title' => '显示设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'displayEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'alipay',
+                        'title' => '支付宝设置',
+                        'type' => 'action',
+                        'children' => [
+                            [
+                                'key' => 'alipayEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'kuaidi100',
+                        'title' => '地址识别',
+                        'type' => 'action',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'rulesSetting',
+                'title' => '规则设置',
+                'children' => [
+                    [
+                        'key' => 'postageList',
+                        'title' => '运费规则',
+                        'children' => [
+                            [
+                                'key' => 'postageAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'postageDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'freeDelivery',
+                        'title' => '包邮规则',
+                        'children' => [
+                            [
+                                'key' => 'freeDeliveryAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'freeDeliveryDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'territorial',
+                        'title' => '区域限购',
+                        'children' => [
+                            [
+                                'key' => 'areaEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'areaDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'offerPrice',
+                        'title' => '起送规则',
+                        'children' => [
+                            [
+                                'key' => 'offerPriceAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'offerPriceDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'refundAddress',
+                        'title' => '退货地址设置',
+                        'children' => [
+                            [
+                                'key' => 'refundAddressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'refundAddressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'distributionRules',
+                        'title' => '配送规则',
+                        'children' => [
+                            [
+                                'key' => 'distributionRulesAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'distributionRulesEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'distributionRulesDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'key' => 'noticeConfig',
+                'title' => '消息通知',
+            ],
+            [
+                'key' => 'printSetting',
+                'title' => '打印设置',
+                'children' => [
+                    [
+                        'key' => 'express',
+                        'title' => '电子面单',
+                        'children' => [
+                            [
+                                'key' => 'expressAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'expressDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'cloud',
+                        'title' => '云打印设置',
+                        'children' => [
+                            [
+                                'key' => 'cloudAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cloudDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printer',
+                        'title' => '小票打印',
+                        'children' => [
+                            [
+                                'key' => 'printerAdd',
+                                'title' => '添加',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'printerDelele',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'printOrderSetting',
+                        'title' => '订单打印设置',
+                        'children' => [
+                            [
+                                'key' => 'printOrderSettingEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'GoodsReviewed',
+                'title' => '小程序提审商品',
+            ],
+            [
+                'key' => 'authManage',
+                'title' => '员工权限',
+                'children' => [
+                    [
+                        'key' => 'accountManage',
+                        'title' => '账号管理',
+                        'children' => [
+                            [
+                                'key' => 'accountManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'accountManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'accountManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'roleManage',
+                        'title' => '角色管理',
+                        'children' => [
+                            [
+                                'key' => 'roleManageEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'roleManageAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'roleManageDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                ]
+            ],
+            [
+                'key' => 'payConfigOther',
+                'title' => '支付配置',
+            ],
+            [
+                'key' => 'CashStroeConf',
+                'title' => '提现设置',
+                'children' => [
+                    [
+                        'key' => 'wechatCashConfig',
+                        'title' => '微信提现配置'
+                    ],
+                    [
+                        'key' => 'platformWechatCashConfig',
+                        'title' => '平台微信提现配置'
+                    ],
+                    [
+                        'key' => 'alipayCertConfig',
+                        'title' => '支付宝配置'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'unionShopSetting',
+                'title' => '联盟店铺',
+            ],
+            [
+                'key' => 'baseConfig',
+                'title' => '基础设置',
+                'children' => [
+                    [
+                        'key' => 'douyinConfig',
+                        'title' => '抖音配置',
+                    ],
+                    [
+                        'key' => 'uploadConfig',
+                        'title' => '上传配置',
+                    ],
+                    [
+                        'key' => 'runOverConfig',
+                        'title' => '越限配置',
+                    ],
+                ],
+            ],
+            [
+                'key' => 'SettingVoiceBroadcast',
+                'title' => '收款播报设置',
+            ],
+
+            // [
+            //     'key' => 'appSetting',
+            //     'title' => 'APP设置',
+            // ],
+            [
+                'key' => 'ocrSetting',
+                'title' => 'OCR配置',
+            ],
+            [
+                'key' => 'saasLgSetting',
+                'title' => '灵工配置',
+            ],
+            [
+                'key' => 'AppConfigLock',
+                'title' => '支付宝APP配置',
+            ],
+            [
+                'key' => 'uploadWechat',
+                'title' => '小程序发布',
+            ],
+            [
+                'key' => 'uploadAlipay',
+                'title' => '支付宝小程序发布',
+            ],
+//            [
+//                'key' => 'cityDelivery',
+//                'title' => '同城配送',
+//                'children' => [
+//                    [
+//                        'key' => 'delivery',
+//                        'title' => '配送设置',
+//                    ],
+//                ]
+//            ],
+        ]
+    ],
+
+
+    [
+        'key' => 'newDiy',
+        'title' => '装修',
+    ],
+    [
+        'key' => 'channel',
+        'title' => '渠道',
+        'children' => [
+            [
+                'key' => 'appletManagementWechat',
+                'title' => '微信小程序',
+                'children' => [
+                    [
+                        'key' => 'wechatConfig',
+                        'title' => '参数配置'
+                    ],
+                    [
+                        'key' => 'miniConfig',
+                        'title' => '小程序管理'
+                    ],
+                    [
+                        'key' => 'payIncoming',
+                        'title' => '支付进件'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'h5Management',
+                'title' => '手机H5',
+                'children' => [
+                    [
+                        'key' => 'h5Management',
+                        'title' => '入口地址'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'dandianpuh5',
+                'title' => '供应链H5',
+                'children' => [
+                    [
+                        'key' => 'dandianpuh5',
+                        'title' => '入口地址'
+                    ],
+                    [
+                        'key' => 'dandianpuh5',
+                        'title' => '微信支付'
+                    ],
+                    [
+                        'key' => 'dandianpuh5',
+                        'title' => '支付宝支付'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'wechatAccountManagement',
+                'title' => '微信公众号',
+                'children' => [
+                    [
+                        'key' => 'wechatAccountConfig',
+                        'title' => '参数设置'
+                    ],
+                    [
+                        'key' => 'wechatAccountMenuConfig',
+                        'title' => '菜单设置'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'appletManagementAlipay',
+                'title' => '支付宝小程序',
+                'children' => [
+                    [
+                        'key' => 'alipayConfig',
+                        'title' => '基础配置'
+                    ],
+                    [
+                        'key' => 'miniConfigAlipay',
+                        'title' => '小程序管理'
+                    ],
+                    [
+                        'key' => 'alipayPromotionCard',
+                        'title' => '支付宝会员卡'
+                    ]
+                ]
+            ],
+            [
+                'key' => 'appletManagementDouyin',
+                'title' => '抖音小程序',
+                'children' => [
+                    [
+                        'key' => 'miniConfigDouyin',
+                        'title' => '小程序管理'
+                    ],
+                ]
+            ],
+//            [
+//                'key' => 'appManagement',
+//                'title' => 'App端',
+//                'children' => [
+//                    [
+//                        'key' => 'appConfig',
+//                        'title' => 'APP基础设置'
+//                    ],
+//                    [
+//                        'key' => 'appPayConfig',
+//                        'title' => '支付设置'
+//                    ]
+//                ]
+//            ],
+        ]
+    ],
+    [
+        'key' => 'marketingManage',
+        'title' => '应用',
+        'children' => [
+            [
+                'key' => 'marketingCategory',
+                'title' => '营销类',
+                'children' => [
+                    [
+                        'key' => 'material',
+                        'title' => '一键发圈',
+                        'children' => [
+                            [
+                                'key' => 'materialList',
+                                'title' => '素材管理',
+                                'children' => [],
+                            ],
+                            [
+                                'key' => 'materialCategory',
+                                'title' => '素材分类',
+                                'children' => [],
+                            ],
+                            [
+                                'key' => 'materialQrcode',
+                                'title' => '素材海报',
+                                'children' => [],
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'ponpManage',
+                        'title' => '大转盘抽奖',
+                        'children' => [
+                            [
+                                'key' => 'ponpIndex',
+                                'title' => '大转盘配置',
+                                'children' => [],
+                            ],
+                            [
+                                'key' => 'ponpLogList',
+                                'title' => '抽奖记录',
+                                'children' => [],
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'couponManage',
+                        'title' => '优惠券',
+                        'children' => [
+                            [
+                                'key' => 'couponList',
+                                'title' => '优惠券列表',
+                                'children' => [
+                                    [
+                                        'key' => 'couponListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListDetails',
+                                        'title' => '详情',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponListSend',
+                                        'title' => '发放',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'couponAutoSendManage',
+                                'title' => '发放规则',
+                                'children' => [
+                                    [
+                                        'key' => 'couponAutoSendManageEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponAutoSendManageAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponAutoSendManageDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'couponAutoSendManageBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+
+                        ],
+                    ],
+                    [
+                        'key' => 'saasAllianceCoupon',
+                        'title' => '联盟券',
+                    ],
+                    [
+                        'key' => 'cardCouponManage',
+                        'title' => '卡券',
+                        'children' => [
+                            [
+                                'key' => 'cardCouponView',
+                                'title' => '查看',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'cardCouponBatchDelete',
+                                'title' => '批量删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'verifyCard1',
+                        'title' => '核销卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard2',
+                        'title' => '礼品卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard3',
+                        'title' => '储值卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard4',
+                        'title' => '虚拟卡',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'verifyCard5',
+                        'title' => '视频卡',
+                        'children' => [
+                            [
+                                'key' => 'videoManage',
+                                'title' => '视频',
+                                'children' => [
+                                    [
+                                        'key' => 'videoEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'videoAdd',
+                                        'title' => '新增',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'videoDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'videoBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action'
+                                    ]
+                                ]
+                            ],
+                        ],
+                    ],
+
+                    [
+                        'key' => 'pintuan',
+                        'title' => '拼团',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'ActivityCutPrice',
+                        'title' => '砍价',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'seckill',
+                        'title' => '限时秒杀',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'integralStore',
+                        'title' => '积分商城',
+                        'children' => [
+                            [
+                                'key' => 'integralStoreGoods',
+                                'title' => '积分商品',
+                            ],
+                            [
+                                'key' => 'integralStoreCat',
+                                'title' => '商品分类',
+                            ],
+                            [
+                                'key' => 'integralStoreSetting',
+                                'title' => '积分设置',
+                            ],
+                            [
+                                'key' => 'integralStoreSignIn',
+                                'title' => '签到设置',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'NewQueue',
+                        'title' => '排队免单',
+                    ],
+                    [
+                        'key' => 'ActivityNewUser',
+                        'title' => '新人专享',
+                        'children' => [
+                            [
+                                'key' => 'saasActivitySubmit',
+                                'title' => '商盟活动',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'givingGifts',
+                        'title' => '送礼物',
+                    ],
+                    [
+                        'key' => 'ActivityWechatRoom',
+                        'title' => '群优惠',
+                    ],
+                    [
+                        'key' => 'randDiscount',
+                        'title' => '随机立减',
+                    ],
+                ]
+            ],
+            [
+                'key' => 'resourceCategory',
+                'title' => '资源类',
+                'children' => [
+                    [
+                        'key' => 'Quanzi',
+                        'title' => 'DeepSeek圈子种草',
+                    ],
+                    [
+                        'key' => 'aboutArticleManage',
+                        'title' => '文章',
+                        'children' => [
+                            [
+                                'key' => 'articleAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'articleEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'articleDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+
+                    [
+                        'key' => 'topicManage',
+                        'title' => '专题',
+                        'children' => [
+                            [
+                                'key' => 'topicList',
+                                'title' => '专题列表',
+                                'children' => [
+                                    [
+                                        'key' => 'topicAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'topicBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'topicCat',
+                                'title' => '专题分类',
+                                'children' => [
+                                    [
+                                        'key' => 'topicCatEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatAdd',
+                                        'title' => '新增',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'topicCatBatchDelete',
+                                        'title' => '批量删除',
+                                        'type' => 'action'
+                                    ]
+                                ]
+                            ]
+                        ]
+                    ],
+
+                    [
+                        'key' => 'rechargePreceptManage',
+                        'title' => '充值方案',
+                        'children' => [
+                            [
+                                'key' => 'rechargeSetting',
+                                'title' => '设置',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'rechargeEdit',
+                                'title' => '编辑',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'rechargeAdd',
+                                'title' => '新增',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'rechargeDelete',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'assetsTransfer',
+                        'title' => '资产转增',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'monthlyPaymentNext',
+                        'title' => '每月月付',
+                        'children' => [],
+                    ],
+                    [
+                        'key' => 'videoGoods',
+                        'title' => '短视频',
+                        'children' => [
+                            [
+                                'key' => 'videoGoodsWorkList',
+                                'title' => '作品列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsWorkListView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListAgree',
+                                        'title' => '同意',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsWorkListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsAuthorList',
+                                'title' => '作者列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsAuthorListAgree',
+                                        'title' => '同意',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsAuthorListRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsAuthorListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsAuthorListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsShareList',
+                                'title' => '佣金发放列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsShareListAgree',
+                                        'title' => '同意',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsShareListRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsShareListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsShareListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsFeedbackList',
+                                'title' => '举报列表',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsFeedbackListView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListDown',
+                                        'title' => '下架',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsBringGoodsList',
+                                'title' => '带货商品',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListEdit',
+                                        'title' => '上下架',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListCopyPath',
+                                        'title' => '复制小程序链接',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsBringGoodsListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsFeedbackListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsCatList',
+                                'title' => '短视频分类',
+                                'children' => [
+                                    [
+                                        'key' => 'videoGoodsCatListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsCatListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsCatListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'videoGoodsCatListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'videoGoodsSetting',
+                                'title' => '设置',
+                            ],
+                        ],
+                    ],
+
+                ]
+            ],
+            [
+                'key' => 'toolCategory',
+                'title' => '工具类',
+                'children' => [
+                    [
+                        'key' => 'shareManage',
+                        'title' => '分销管理',
+                        'children' => [
+                            [
+                                'key' => 'shareUserCheck',
+                                'title' => '分销商审核',
+                                'children' => [
+                                    [
+                                        'key' => 'shareUserCheckPass',
+                                        'title' => '通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserCheckRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserCheckBatchPass',
+                                        'title' => '批量通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserCheckBatchRefuse',
+                                        'title' => '批量拒绝',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareUserList',
+                                'title' => '分销商列表',
+                                'children' => [
+                                    [
+                                        'key' => 'shareUserListView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListWithdrawLog',
+                                        'title' => '提现明细',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListShareOrder',
+                                        'title' => '分销订单',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListQrcode',
+                                        'title' => '分销二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareUserListRemark',
+                                        'title' => '备注',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareOrder',
+                                'title' => '分销订单',
+                            ],
+                            [
+                                'key' => 'TopUpOrder',
+                                'title' => '充值分销订单',
+                            ],
+                            [
+                                'key' => 'shareCash',
+                                'title' => '分销提现',
+                                'children' => [
+                                    [
+                                        'key' => 'shareCashReject',
+                                        'title' => '驳回',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareCashConfirmPayment',
+                                        'title' => '确认打款',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareCashManualPayment',
+                                        'title' => '手动打款',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'shareBasicSetting',
+                                'title' => '基础设置',
+                            ],
+                            [
+                                'key' => 'shareMoneySetting',
+                                'title' => '佣金设置',
+                            ],
+                            [
+                                'key' => 'sharePoster',
+                                'title' => '推广海报',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'wxLive',
+                        'title' => '小程序直播',
+                        'children' => [
+                            [
+                                'key' => 'wxLiveRoomList',
+                                'title' => '直播间列表',
+                                'children' => [
+                                    [
+                                        'key' => 'wxLiveRoomListReplay',
+                                        'title' => '回放',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListViewGoods',
+                                        'title' => '查看商品',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListImportGoods',
+                                        'title' => '导入商品',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListAddRoom',
+                                        'title' => '添加直播间',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveRoomListDeleteRoom',
+                                        'title' => '删除直播间',
+                                        'type' => 'action'
+                                    ],
+                                ]
+                            ],
+                            [
+                                'key' => 'wxLiveGoodsList',
+                                'title' => '商品列表',
+                                'children' => [
+                                    [
+                                        'key' => 'wxLiveGoodsListDelGoods',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'wxLiveGoodsListAddGoods',
+                                        'title' => '添加',
+                                        'type' => 'action'
+                                    ],
+                                ]
+                            ],
+                            [
+                                'key' => 'wxLiveRoomEdit',
+                                'title' => '可见范围修改',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'scanCodePay',
+                        'title' => '收款码',
+                        'children' => [
+                            [
+                                'key' => 'scanCodePayProfit',
+                                'title' => '收款码佣金比例',
+                            ],
+
+                        ],
+                    ],
+                    [
+                        'key' => 'shareholderManage',
+                        'title' => '股东分红',
+                        'children' => [
+                            [
+                                'key' => 'shareholderAudit',
+                                'title' => '股东审核',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderAuditPass',
+                                        'title' => '通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderAuditRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderList',
+                                'title' => '股东列表',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderListAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderLevel',
+                                'title' => '等级',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderLevelAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderLevelEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderLevelDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderShareOrder',
+                                'title' => '分润订单'
+                            ],
+                            [
+                                'key' => 'shareholderCommissionList',
+                                'title' => '佣金列表'
+                            ],
+                            [
+                                'key' => 'shareholderWithdrawalAudit',
+                                'title' => '提现审核',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderWithdrawalAuditPass',
+                                        'title' => '通过',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'shareholderWithdrawalAuditRefuse',
+                                        'title' => '拒绝',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderPrizePool',
+                                'title' => '分红奖金池',
+                                'children' => [
+                                    [
+                                        'key' => 'shareholderPrizePoolSend',
+                                        'title' => '发放',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'shareholderSetting',
+                                'title' => '设置页面',
+                            ],
+                            [
+                                'key' => 'shareholderApplySetting',
+                                'title' => '申请设置',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'ActivityRebateOrderN',
+                        'title' => '推N返1',
+                    ],
+                    [
+                        'key' => 'shareholderChain',
+                        'title' => '链动2+1',
+                    ],
+                    [
+                        'key' => 'areaDividend',
+                        'title' => '区域分红',
+                    ],
+
+                    [
+                        'key' => 'imageSearchGoods',
+                        'title' => '以图搜图',
+                    ],
+                    [
+                        'key' => 'weChatVipCard',
+                        'title' => '微信会员卡',
+                    ],
+                    [
+                        'key' => 'cashier',
+                        'title' => '在线收银台',
+                    ],
+                    [
+                        'key' => 'storeIndexQrcode',
+                        'title' => '聚合店铺二维码',
+                    ],
+                    [
+                        'key' => 'goodsFormList',
+                        'title' => '商品表单',
+                        'children' => [
+                            [
+                                'key' => 'goodsFormList',
+                                'title' => '商品表单列表',
+                            ],
+                            [
+                                'key' => 'typesViewGoods',
+                                'title' => '展示类商品',
+                                'children' => [
+                                    [
+                                        'key' => 'goodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsBatchEdit',
+                                        'title' => '批量设置',
+                                        'type' => 'action'
+                                    ],
+                                    [
+                                        'key' => 'goodsCsvUpload',
+                                        'title' => 'CSV上传',
+                                        'type' => 'action'
+                                    ],
+                                ]
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'ERP',
+                        'title' => '本地商品进销存',
+                        'children' => [
+                            [
+                                'key' => 'purchasein',
+                                'title' => '入库',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'purchaseout',
+                                'title' => '出库',
+                                'type' => 'action',
+                            ],
+                            [
+                                'key' => 'purchasedel',
+                                'title' => '删除',
+                                'type' => 'action',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'TeamBonus',
+                        'title' => '团队级差分红',
+                    ],
+                    [
+                        'key' => 'Live',
+                        'title' => '自建直播',
+                    ],
+                    [
+                        'key' => 'PublicRanking',
+                        'title' => '视频号爆单',
+                    ],
+                    [
+                        'key' => 'localPublicRanking',
+                        'title' => '公排计划',
+                    ],
+                    [
+                        'key' => 'ActivityOrderRebateSelf',
+                        'title' => '消费全返',
+                    ],
+                    [
+                        'key' => 'PaymentStatement',
+                        'title' => '付款对账单',
+                    ],
+                    [
+                        'key' => 'TeamGrades',
+                        'title' => '团队业绩分红',
+                        'children' => [
+                            [
+                                'key' => 'TeamGradesApply',
+                                'title' => '审核列表',
+                            ],
+                            [
+                                'key' => 'TeamGradesLevel',
+                                'title' => '团队等级',
+                            ],
+                            [
+                                'key' => 'TeamGradesRewardLog',
+                                'title' => '分红记录',
+                            ],
+                            [
+                                'key' => 'TeamRewardSetting',
+                                'title' => '分红设置',
+                            ],
+                            [
+                                'key' => 'TeamGradesList',
+                                'title' => '分红团队',
+                            ],
+                            [
+                                'key' => 'TeamRewardPayouts',
+                                'title' => '提现列表',
+                            ],
+                            [
+                                'key' => 'TeamGradesGoods',
+                                'title' => '团队业绩商品',
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'cashierMobile',
+                        'title' => '手机收银台',
+                        'children' => [
+                            [
+                                'key' => 'cashierMobile',
+                                'title' => '收银台用户',
+                            ],
+                            [
+                                'key' => 'cashierMobile',
+                                'title' => '操作日志',
+                            ],
+                            [
+                                'key' => 'cashierMobile',
+                                'title' => '门店充值权限',
+                            ]
+                        ]
+                    ],
+                    [
+                        'key' => 'shareGroupPurchase',
+                        'title' => '37拼购'
+                    ],
+                    [
+                        'key' => 'superSellingGoods',
+                        'title' => '超级卖货'
+                    ],
+                    [
+                        'key' => 'IntegralAppreciation',
+                        'title' => '增值积分'
+                    ],
+
+                ]
+            ],
+            [
+                'key' => 'industryCategory',
+                'title' => '行业类',
+                'children' => [
+                    [
+                        'key' => 'activityBooking',
+                        'title' => '预约',
+                    ],
+                    [
+                        'key' => 'food',
+                        'title' => '点餐管理',
+                        'children' => [
+                            [
+                                'key' => 'foodGoods',
+                                'title' => '商品管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodGoodsAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsSetting',
+                                        'title' => '设置',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodGoodsBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'foodCat',
+                                'title' => '分类',
+                                'children' => [
+                                    [
+                                        'key' => 'foodCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodEditEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodTable',
+                                'title' => '餐桌管理',
+                                'children' => [
+                                    [
+                                        'key' => 'foodTableAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodTableQrcode',
+                                        'title' => '二维码',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'foodSetting',
+                                'title' => '设置',
+                            ],
+                            [
+                                'key' => 'foodQrcode',
+                                'title' => '店铺点餐二维码',
+                            ],
+                            [
+                                'key' => 'foodSlide',
+                                'title' => '轮播图',
+                                'children' => [
+                                    [
+                                        'key' => 'foodSlideAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'foodSlideDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ]
+                        ],
+                    ],
+                    [
+                        'key' => 'serviceHome',
+                        'title' => '上门服务',
+                    ],
+                    [
+                        'key' => 'adopt',
+                        'title' => '果树认养',
+                        'children' => [
+                            [
+                                'key' => 'adoptList',
+                                'title' => '认养列表',
+                                'children' => [
+                                    [
+                                        'key' => 'adoptListAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'adoptCat',
+                                'title' => '认养分类',
+                                'children' => [
+                                    [
+                                        'key' => 'adoptCatAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptCatEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'adoptCatDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'adoptOrder',
+                                'title' => '认养订单',
+                            ],
+                            [
+                                'key' => 'adoptSetting',
+                                'title' => '认养设置',
+                            ],
+                            [
+                                'key' => 'adoptDeviceManagement',
+                                'title' => '设备管理',
+                            ],
+                            [
+                                'key' => 'adoptDeliveryOrder',
+                                'title' => '配送订单',
+                            ],
+                        ],
+                    ],
+		            [
+                        'key' => 'global',
+                        'title' => '全域分佣',
+                        'children' => [
+                            [
+                                'key' => 'globalList',
+                                'title' => '报单列表',
+                                'children' => [
+                                    [
+                                        'key' => 'globalAdd',
+                                        'title' => '添加',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'globalEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'globalBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'globalAdd',
+                                'title' => '添加报单',
+                            ],
+                            [
+                                'key' => 'globalIntegralLog',
+                                'title' => '积分记录',
+                            ],
+                            [
+                                'key' => 'globalSetting',
+                                'title' => '规则配置',
+                            ],
+                            [
+                                'key' => 'globalBonusPool',
+                                'title' => '报单奖金池',
+                            ],
+                            [
+                                'key' => 'globalCash',
+                                'title' => '提现审核',
+                            ],
+                            [
+                                'key' => 'globalBonusPoolDetail',
+                                'title' => '奖池明细',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'productTraceability',
+                        'title' => '产品溯源',
+                        'children' => [
+                            [
+                                'key' => 'productTraceabilityList',
+                                'title' => '产品列表',
+                                'children' => [
+                                    [
+                                        'key' => 'productTraceabilityListAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityListEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityListDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityListBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'productTraceabilityBatch',
+                                'title' => '产品批次',
+                                'children' => [
+                                    [
+                                        'key' => 'productTraceabilityBatchAdd',
+                                        'title' => '新增',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchView',
+                                        'title' => '查看',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchLog',
+                                        'title' => '溯源记录',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchQrcode',
+                                        'title' => '查看二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'productTraceabilityBatchBatchAction',
+                                        'title' => '批量操作',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'productTraceabilityLog',
+                                'title' => '溯源记录',
+                            ],
+                        ],
+                    ],
+
+
+                    [
+                        'key' => 'GPT',
+                        'title' => '问答专区',
+                    ],
+                    [
+                        'key' => 'Insurance',
+                        'title' => '保单信息',
+                        'children' => [
+                            [
+                                'key' => 'insuranceList',
+                                'title' => '保单信息列表',
+                            ]
+                        ],
+                    ],
+                    /* begin 2025/07/08 11:04:46 id1248 新增活动报名插件 WPing丶 */
+                    [
+                        'key' => 'Event',
+                        'title' => '活动报名',
+                        'children' => [ 
+                            [
+                                'key' => 'eventList',
+                                'title' => '活动列表',
+                            ],
+                            [
+                                'key' => 'userApply',
+                                'title' => '报名审核',
+                            ],
+                            [
+                                'key' => 'eventSetting',
+                                'title' => '活动设置',
+                            ]
+                        ],
+                    ],
+                    /* end */
+                    [
+                        'key' => 'storeLocalDelivery',
+                        'title' => '同城自配',
+                    ],
+                    [
+                        'key' => 'UserAudit',
+                        'title' => '批发审核',
+                    ],
+                    [
+                        'key' => 'intelligentMatchScene',
+                        'title' => '在线搭配',
+                    ]
+                ]
+            ],
+            [
+                'key' => 'channelCategory',
+                'title' => '渠道类',
+                'children' => [
+                    [
+                        'key' => 'videoShop',
+                        'title' => '视频号分销',
+                    ],
+                    [
+                        'key' => 'alipayPromotion',
+                        'title' => '支付宝数字经营'
+                    ],
+                ]
+            ],
+            [
+                'key' => 'thirdCategory',
+                'title' => '第三方',
+                'children' => [
+                    [
+                        'key' => 'yinbao',
+                        'title' => '银豹',
+                    ],
+                    [
+                        'key' => 'cloudMerchant',
+                        'title' => '云仓',
+                        'children' => [
+                            [
+                                'key' => 'cloudMerchantSelection',
+                                'title' => '云仓选品库',
+                                'children' => [
+                                    [
+                                        'key' => 'cloudMerchantSelectionView',
+                                        'title' => '查看详情',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantSelectionAdd',
+                                        'title' => '加入选品',
+                                        'type' => 'action',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'key' => 'cloudMerchantMyCloud',
+                                'title' => '我的云仓',
+                                'children' => [
+                                    [
+                                        'key' => 'cloudMerchantMyCloudEdit',
+                                        'title' => '编辑',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantMyCloudQrcode',
+                                        'title' => '小程序二维码',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantMyCloudCopyPath',
+                                        'title' => '复制小程序链接',
+                                        'type' => 'action',
+                                    ],
+                                    [
+                                        'key' => 'cloudMerchantMyCloudDelete',
+                                        'title' => '删除',
+                                        'type' => 'action',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'key' => 'cloudMerchantTransferOrder',
+                                'title' => '云仓转单',
+                            ],
+                            [
+                                'key' => 'cloudMerchantAccount',
+                                'title' => '我的账户',
+                            ],
+                            [
+                                'key' => 'cloudMerchantSetting',
+                                'title' => '云仓设置',
+                            ],
+                            [
+                                'key' => 'cloudMerchantPreviewNum',
+                                'title' => '云仓库存',
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'jushuitan',
+                        'title' => '聚水潭',
+                    ],
+                    [
+                        'key' => 'scrm',
+                        'title' => 'SCRM',
+                    ],
+                    [
+                        'key' => 'maiyatian',
+                        'title' => '麦芽田',
+                    ],
+                    [
+                        'key' => 'keloop',
+                        'title' => '快跑者',
+                    ],
+                    [
+                        'key' => 'kefuSetting',
+                        'title' => '在线客服',
+                    ],
+                    [
+                        'key' => 'saasAdapay',
+                        'title' => '汇付支付',
+                    ],
+                    [
+                        'key' => 'saasYunst',
+                        'title' => '通联服务商支付',
+                    ],
+//                    [
+//                        'key' => 'saasAllinpay',
+//                        'title' => '通联普通支付',
+//                    ],
+                    [
+                        'key' => 'cityDelivery',
+                        'title' => '微信同城配送',
+                        'children' => [
+                            [
+                                'key' => 'WechatNewDelivery',
+                                'title' => '同城配送',
+                            ],
+                            [
+                                'key' => 'delivery',
+                                'title' => '同城配送',
+                            ]
+                        ]
+                    ],
+                ]
+            ],
+            [
+                'key' => 'branchStoreCategory',
+                'title' => '门店类',
+                'children' => [
+                    [
+                        'key' => 'wastoreManage',
+                        'title' => '微信门店快送-总部权限',
+                        'children' => [
+                            [
+                                'key' => 'wastore',
+                                'title' => '微信门店快送-门店权限'
+                            ],
+                            [
+                                'key' => 'wastoreManageGoods',
+                                'title' => '商品库'
+                            ],
+                        ],
+                    ],
+                    [
+                        'key' => 'offlineShop',
+                        'title' => '到店自提',
+                        'children' => [
+                            [
+                                'key' => 'offlineShopList',
+                                'title' => '门店列表',
+                            ],
+                            [
+                                'key' => 'offlineStaff',
+                                'title' => '门店员工',
+                            ],
+                            [
+                                'key' => 'offlineShopAudit',
+                                'title' => '门店审核',
+                            ],
+                            [
+                                'key' => 'offlineShopOrder',
+                                'title' => '自提订单',
+                            ],
+                            [
+                                'key' => 'outletManageGroupActivities',
+                                'title' => '团购活动',
+                            ],
+                            [
+                                'key' => 'outletManageGroupActivitiesEdit',
+                                'title' => '门店团购活动',
+                            ],
+                            [
+                                'key' => 'outletManageDriver',
+                                'title' => '司机管理',
+                            ],
+                            [
+                                'key' => 'outletManageInventory',
+                                'title' => '备货单管理',
+                            ],
+                            [
+                                'key' => 'outletManageSorting',
+                                'title' => '分拣单管理',
+                            ],
+                            [
+                                'key' => 'outletManagePickUpOrder',
+                                'title' => '订单详情',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'outletManage',
+                        'title' => '连锁门店',
+                        'children' => [
+                            [
+                                'key' => 'outletManageList',
+                                'title' => '门店列表',
+                            ],
+                            [
+                                'key' => 'outletManageStaff',
+                                'title' => '门店员工',
+                            ],
+                            [
+                                'key' => 'outletManageAudit',
+                                'title' => '门店审核',
+                            ],
+                            [
+                                'key' => 'outletManageGoods',
+                                'title' => '门店商品',
+                            ],
+                            [
+                                'key' => 'outletManageOrder',
+                                'title' => '门店订单',
+                            ],
+                            [
+                                'key' => 'outletManagePickUpOrder',
+                                'title' => '订单详情',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'shopSetting',
+                        'title' => '设置提现',
+                        'children' => [
+                            [
+                                'key' => 'outletManageApplySetting',
+                                'title' => '申请设置',
+                            ],
+                            [
+                                'key' => 'outletManagePoster',
+                                'title' => '门店海报',
+                            ],
+                            [
+                                'key' => 'outletManageCommission',
+                                'title' => '门店佣金',
+                            ],
+                            [
+                                'key' => 'outletManageWithdraw',
+                                'title' => '门店提现',
+                            ],
+                        ]
+                    ],
+                    [
+                        'key' => 'mch',
+                        'title' => '入驻商',
+                        'children' => [
+                            [
+                                'key' => 'mchList',
+                                'title' => '入驻商列表',
+                            ],
+                            [
+                                'key' => 'mchAudit',
+                                'title' => '入驻商审核',
+                            ],
+                            [
+                                'key' => 'mchCommonCat',
+                                'title' => '入驻商分类',
+                            ],
+                            [
+                                'key' => 'mchGoods',
+                                'title' => '入驻商商品',
+                            ],
+                            [
+                                'key' => 'mchOrder',
+                                'title' => '入驻商订单',
+                            ],
+                            [
+                                'key' => 'mchCash',
+                                'title' => '入驻商提现',
+                            ],
+                            [
+                                'key' => 'mchSetting',
+                                'title' => '入驻商设置',
+                            ],
+                            [
+                                'key' => 'mchBrands',
+                                'title' => '品牌分类',
+                            ],
+                        ]
+                    ],
+
+                ]
+            ]
+        ]
+    ]
+];

+ 37 - 0
config/saas_supplier_permission.php

@@ -0,0 +1,37 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+    [
+        'key' => 'cloudSupplier',
+        'title' => '云仓供货商',
+        'children' => [
+            [
+                'key' => 'cloudSupplierOrder',
+                'title' => '云仓订单'
+            ],
+            [
+                'key' => 'cloudSupplierOrderOnce',
+                'title' => '云仓订单'
+            ],
+            [
+                'key' => 'attrList',
+                'title' => '规格库'
+            ]
+        ],
+    ],
+    [
+        'key' => 'agentFrontPurchaseSupplierERP',
+        'title' => '仓库',
+        'children' => [
+            [
+                'key' => 'cloudFrontDeliveryOrderList',
+                'title' => '同城配送订单',
+            ],
+        ]
+    ]
+
+];

+ 9 - 0
config/supplier_permission.php

@@ -0,0 +1,9 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+return [
+
+];

+ 164 - 0
config/web.php

@@ -0,0 +1,164 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+$params = require __DIR__ . '/params.php';
+$db = require __DIR__ . '/db.php';
+$redis = require __DIR__ . '/redis.php';
+$queue = require __DIR__ . '/queue.php';
+
+$config = [
+    'id' => 'cyy',
+    'language' => 'zh-CN',
+    'basePath' => dirname(__DIR__),
+    'bootstrap' => ['log', 'queue'],
+    // 跨域全局配置
+    'as cors' => [
+        'class' => \yii\filters\Cors::class,
+        'cors' => [
+            'Origin' => ['*'],
+            'Access-Control-Request-Method' => ['GET', 'POST', 'OPTIONS'],
+            'Access-Control-Allow-Headers' => [
+                'X-Requested-With',
+                'Content-Type',
+                'Origin',
+                'Authorization',
+                'Accept',
+                'Access-Token',
+                'Accept-Encoding',
+            ],
+            'Access-Control-Allow-Credentials' => false,
+        ],
+    ],
+    'components' => [
+        'request' => [
+            'enableCsrfCookie' => false,
+            'enableCookieValidation' => false,
+            'enableCsrfValidation' => false,
+        ],
+        'session' => null,
+        'cache' => [
+            'class' => 'yii\caching\FileCache',
+            'fileMode' => 0777,
+        ],
+        'cacheLock' => [
+            'class' => 'yii\caching\FileCache',
+            'fileMode' => 0777,
+            'cachePath' => '@runtime/cacheLock',
+        ],
+        'jwt' => [
+            'class' => app\librarys\JwtComponent::class,
+            'key' => 'abc123456', // 密钥
+            'headerKey' => 'Authorization',
+        ],
+        'storage' => [
+            'class' => app\librarys\storage\components\StorageComponent::class,
+            'basePath' => 'web/uploads'
+        ],
+        'storageTemp' => [
+            'class' => app\librarys\storage\components\StorageComponent::class,
+            'basePath' => 'runtime/temp'
+        ],
+        'errorHandler' => [
+            'errorAction' => 'common/default/error',
+        ],
+        'mailer' => [
+            'class' => 'yii\swiftmailer\Mailer',
+            // send all mails to a file by default. You have to set
+            // 'useFileTransport' to false and configure a transport
+            // for the mailer to send real emails.
+            'useFileTransport' => false,
+        ],
+        'log' => [
+            'traceLevel' => YII_DEBUG ? 3 : 0,
+            'targets' => [
+                [
+                    'class' => 'yii\log\FileTarget',
+                    'levels' => ['error', 'warning'],
+                    'fileMode' => 0777,
+//                    'maxLogFiles' => 300,
+//                ],
+//                [
+//                    'class' => 'yii\log\FileTarget',
+//                    'levels' => ['error', 'warning','info','trace','profile'],
+//                    'logVars'=>[],
+//                    //表示以yii\db\或者app\models\开头的分类都会写入这个文件
+//                    'categories'=>['yii\db\*'],
+//                    //表示写入到文件
+//                    'logFile'=>'@runtime/../runtime/logs/YIISQL_'.date('y_m_d').'.log',
+//                    'microtime' => true,
+                ],
+            ],
+        ],
+        'db' => $db,
+        'redis' => $redis,
+        'queue' => $queue,
+        'urlManager' => [
+            'class' => 'app\librarys\common\UrlManager',
+            'enablePrettyUrl' => true,
+            'showScriptName' => false,
+            'rules' => [
+                'maiyatian/test/callback/<command:\w+>'  => 'common/maiyatian/test',
+                'maiyatian/callback/<command:\w+>'  => 'common/maiyatian/index',
+                'keloop/callback/index'  => 'common/keloop/index',
+                'live/callback'  => 'common/live/index',
+                'live/record'  => 'common/live/record',
+                'mochat/callback/<store_id:\d+>'  => 'common/mochat/index',
+                'mochat/api/<store_id:\d+>'  => 'common/mochat/api',
+                'jushuitan/callback'  => 'common/jushuitan/index',
+                'alipay/notify/<store_id:(\-)?\d+>' => 'common/alipay-notify/index',
+                'wechat/notify/<store_id:(\-)?\d+>' => 'common/wechat-notify/index',
+                'adapay/notify/<store_id:(\-)?\d+>' => 'common/adapay-notify/index',
+                'allinpay/notify/<store_id:(\-)?\d+>' => 'common/allinpay-notify/index',
+                'yunst/notify/<store_id:(\-)?\d+>' => 'common/yunst-notify/index',
+                'adapay/h5/<store_id:(\-)?\d+>' => 'common/adapay-notify/h5',
+                'alipay/callback'  => 'common/alipay-callback/index',
+                'ad/callback/<store_id:\d+>'  => 'common/ad-callback/index',
+                'alipay/spi'  => 'common/alipay-callback/spi',
+                'bytedance/notify' => 'common/byte-dance-notify/index',
+                'wechat_mp/push' => 'common/wechat-mp/index',
+                'wechat/msg' => 'common/wechat-msg/index',
+                'wechat/api' => 'common/wechat-msg/api',
+                'wechat/ticket' => 'common/wechat-get-ticket/index',
+                'wechat/fuwu-buyer-login' => 'common/wechat-get-ticket/fuwu-buyer-login',
+                'wechat/callback/<appid>'=>'common/wechat-get-ticket/callback',
+                'alipay/notify'=> 'common/alipay-callback/ali-notice', // 消息通知
+                'alipay/token'=> 'common/alipay-callback/get-token', // 支付宝token
+                //'alipay/notify'=> 'common/alipay-notify/index', // 网关验证
+                'douyin/ticket' => 'common/douyin/ticket',
+                'douyin/store-mini-code/<store_id>' => 'common/douyin/store-mini-code',
+                'douyin/callback/<appid>' => 'common/douyin/callback',
+                'wechat/video-shop-order/callback/<mini_id>' => 'common/wechat-callback/video-shop-order-callback',
+                'wechat/delivery-callback'=>'common/wechat-callback/delivery-call-back',
+                'wechat/transfer-batches-notify/<store_id:(\-)?\d+>' => 'common/wechat-callback/wechat-transfer-batches-notify',
+                'lg/cash-notify/<store_id:(\-)?\d+>' => 'common/lg-cash-notify/index',
+                'lg/apply-notify/<store_id:(\-)?\d+>' => 'common/lg-apply-notify/index',
+            ],
+        ]
+    ],
+    'params' => $params,
+    'timeZone' => 'PRC',
+    'modules' => [
+        'common' => [
+            'class' => 'app\modules\common\Module',
+        ],
+        'client' => [
+            'class' => 'app\modules\client\Module',
+        ],
+        'admin' => [
+            'class' => 'app\modules\admin\Module',
+        ],
+        'alliance' => [
+            'class' => 'app\modules\alliance\Module',
+        ]
+
+    ],
+    'defaultRoute' => 'common/default/index',
+    'aliases' => [
+        '@ByteDance' => '@app/utils/ByteDance'
+    ],
+];
+
+return $config;

+ 120 - 0
constants/AdminPickLink.php

@@ -0,0 +1,120 @@
+<?php
+
+namespace app\constants;
+
+use app\models\StoreAdmin;
+
+class AdminPickLink
+{
+    const LIST =  [
+        [
+            'key' => 'goods',
+            'title' => '商品',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'order',
+            'title' => '订单',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'refund_order',
+            'title' => '售后',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'category',
+            'title' => '分类',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'evaluate',
+            'title' => '商品评价',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'store_data',
+            'title' => '店铺数据',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'store',
+            'title' => '店铺',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'clerk',
+            'title' => '商家券核销',
+            'is_show' => 0
+        ],
+//        [
+//            'key' => 'store_pay',
+//            'title' => '支付进件',
+//            'is_show' => 0
+//        ],
+        [
+            'key' => 'store_set',
+            'title' => '店铺模版',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'store_withdraw',
+            'title' => '商城提现',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'store_profit',
+            'title' => '批量溢价',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'user_log',
+            'title' => '用户记录',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'erp_scan',
+            'title' => '扫码入库',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'cloud_purchase',
+            'title' => '云仓批发',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'cloud_goods',
+            'title' => '云仓选品',
+            'is_show' => 0
+        ],
+        [
+            'key' => 'store_kefu',
+            'title' => '客服消息',
+            'is_show' => 0
+        ]
+        ,
+        [
+            'key' => 'order_goods_cancel',
+            'title' => '单品退款',
+            'is_show' => 0
+        ]
+    ];
+
+    public static function getLink() {
+        try {
+            $list = self::LIST;
+            $store_no = [
+                'clerk', 'store_pay', 'store_set', 'store_set', 'store_withdraw', 'store_profit', 'user_log', 'cloud_purchase', 'cloud_goods'
+            ];
+            foreach ($list as $index => $item) {
+                if (!\Yii::$app->isSaas() && in_array($item['key'], $store_no)) {
+                    unset($list[$index]);
+                }
+            }
+            return array_values($list);
+        } catch (\Exception $e) {
+            return null;
+        }
+
+    }
+}

+ 12 - 0
constants/Kefu.php

@@ -0,0 +1,12 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\constants;
+
+class Kefu
+{
+    const API_HOST = 'https://im.cyyvip.com';
+}

+ 2890 - 0
constants/MchPickLink.php

@@ -0,0 +1,2890 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+// namespace app\constants;
+
+
+// class MchPickLink
+// {
+//     const LIST =  [
+//         [
+//             'name' => "商城首页",
+//             'link' => "/pages/home/home",
+//             'open_type' => "switchtab",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "分类",
+//             'link' => "/pages/cat/cat",
+//             'open_type' => "switchtab",
+//             'params' => [
+//                 [
+//                     'key' => "cat_id",
+//                     'value' => "",
+//                     'desc' => "cat_id请填写在商品分类中相关分类的ID"
+//                 ]
+//             ]
+//         ],
+//         [
+//             'name' => "购物车",
+//             'link' => "/pages/shoppingcart/shoppingcart",
+//             'open_type' => "switchtab",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "福利中心",
+//             'link' => "/integral/integral/integral",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "会员中心",
+//             'link' => "/user/member/member_center",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "用户中心",
+//             'link' => "/pages/my/my",
+//             'open_type' => "switchtab",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "商品列表",
+//             'link' => "/other/list/list",
+//             'open_type' => "navigate",
+//             'params' => [
+//                 [
+//                     'key' => "cat_id",
+//                     'value' => "",
+//                     'desc' => "cat_id请填写在商品分类中相关分类的ID"
+//                 ]
+//             ]
+//         ],
+//         [
+//             'name' => "商品详情",
+//             'link' => "/goods/goods/goods",
+//             'open_type' => "navigate",
+//             'params' => [
+//                 [
+//                     'key' => "id",
+//                     'value' => "",
+//                     'desc' => "id请填写在商品列表中相关商品的ID"
+//                 ]
+//             ]
+//         ],
+//         [
+//             'name' => "所有订单",
+//             'link' => "/pages/order/order?status=-1",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "待付款订单",
+//             'link' => "/pages/order/order?status=0",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "待发货订单",
+//             'link' => "/pages/order/order?status=1",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "待收货订单",
+//             'link' => "/pages/order/order?status=2",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "已完成订单",
+//             'link' => "/pages/order/order?status=3",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "售后订单",
+//             'link' => "/pages/order/order?status=4",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "我的订单",
+//             'link' => "/pages/order/order",
+//             'open_type' => "navigate",
+//             'params' => [
+//                 [
+//                     'key' => "status",
+//                     'value' => 0,
+//                     'desc' => "status 请填写订单列表状态, 为空则跳转为 待付款",
+//                 ]
+//             ],
+//         ],
+//         [
+//             'name' => "店铺商品分类",
+//             'link' => "/mch/shop/shop",
+//             'open_type' => "navigate",
+//             'params' => [
+//                 [
+//                     'key' => "cat_id",
+//                     'value' => "",
+//                     'desc' => "cat_id请填写在店铺商品分类中相关分类的ID"
+//                 ],
+//                 [
+//                     'key' => "tab",
+//                     'value' => "2",
+//                     'desc' => "tab该数据为默认数据,请勿修改"
+//                 ]
+
+//             ]
+//         ],
+//         [
+//             'name' => "店铺首页",
+//             'link' => "/mch/shop/shop?tab=1",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "店铺全部商品",
+//             'link' => "/mch/shop/shop?tab=2",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "店铺新品上架",
+//             'link' => "/mch/shop/shop?tab=3",
+//             'open_type' => "navigate",
+//             'params' => []
+//         ],
+//         [
+//             'name' => "店铺商品分类",
+//             'link' => "/mch/shop-cat/shop-cat",
+//             'open_type' => "navigate",
+//             'params' => [
+//                 [
+//                     'key' => "cat_id",
+//                     'value' => "",
+//                     'desc' => "cat_id请填写在店铺商品分类中相关分类的ID"
+//                 ]
+//             ]
+//         ],
+//     ];
+//     public static function getLink()
+//     {
+//         $link = self::LIST;
+//         foreach($link as $key => $val) {
+//             $link[$key]['params'][] = [
+//                 'key' => "mch_id",
+//                 'value' => get_mch_id(),
+//                 'desc' => "该数据为入驻商ID,请不要修改"
+//             ];
+//         }
+//         return $link;
+//     }
+// }
+
+
+/*
+ * @Author: your name
+ * @Date: 2021-03-02 09:50:20
+ * @LastEditTime: 2021-05-21 11:56:14
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \admin_php\constants\PickLink.php
+ */
+
+
+namespace app\constants;
+
+use app\models\NewDiyTemplate;
+use yii\helpers\Json;
+use app\models\Store;
+
+class MchPickLink
+{
+    const LIST =  [
+        [
+            'name' => '首页',
+            'link' => '/pages/home/home',
+            'open_type' => "switchtab",
+            'params' => []
+        ],
+        [
+            'name' => '推广二维码',
+            'link' => '/user/share-qrcode/share-qrcode',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '微信会员卡',
+            'link' => '/weChat/card/index',
+            'open_type' => "weChatCart",
+            'params' => []
+        ],
+        [
+            'name' => '支付宝会员卡',
+            'link' => '/alipay/card/index',
+            'open_type' => "alipayCard",
+            'params' => []
+        ],
+	[
+            'name' => '我的联盟券',
+            'link' => '/user/new_balance/new_balance',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => 'WIFI',
+            'link' => '/pages/home/wifi',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '素材中心',
+            'link' => '/tools/quickPost/index/index',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '支付宝支付券',
+            'link' => '/mkt/list/index',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '新版本DIY',
+            'link' => '/diy/diyNew/index',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+//        [
+//            'name' => '平台首页',
+//            'link' => '/pages/union/home/index',
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+        [
+            'name' => '分类',
+            'link' => '/pages/cat/cat',
+            'open_type' => "switchtab",
+            'params' => [
+                [
+                    'key' => "cat_id",
+                    'value' => "",
+                    'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                ]
+            ]
+        ],
+        [
+            'name' => '购物车',
+            'link' => '/pages/shoppingcart/shoppingcart',
+            'open_type' => "switchtab",
+            'params' => []
+        ],
+        [
+            'name' => '付款码',
+            'link' => '/face-pay/face-pay/collection',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '当面付',
+            'link' => '/face-pay/face-pay/payOut',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '签到',
+            'link' => '/integral/signIn/signIn',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '点餐页',
+            'link' => '/alipay-order/orderMeal/orderMeal',
+            'open_type' => 'navigate',
+            'params' => [
+                [
+                    'key' => "food_table_num",
+                    'value' => "",
+                    'desc' => "桌号"
+                ]
+            ],
+        ],
+        [
+            'name' => '点餐预约',
+            'link' => '/alipay-order/appointment/appointment',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '点餐订单列表',
+            'link' => '/alipay-order/order/list',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+//        [
+//            'name' => '福利中心',
+//            'link' => '/integral/integral/integral',
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+        [
+            'name' => '会员中心',
+            'link' => '/user/member/member_center',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '我的',
+            'link' => '/pages/my/my',
+            'open_type' => "switchtab",
+            'params' => []
+        ],
+        [
+            'name' => '商品列表',
+            'link' => '/other/list/list',
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "cat_id",
+                    'value' => "",
+                    'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                ]
+            ]
+        ],
+        [
+            'name' => "商品详情",
+            'link' => "/goods/goods/goods",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "id",
+                    'value' => "",
+                    'desc' => "id请填写在商品列表中相关商品的ID",
+                    'cat_type' => '1',
+                ]
+            ]
+        ],
+        // [
+        //     'name' => "账户设置",
+        //     'link' => "/user/my/setting",
+        //     'open_type' => "navigate",
+        //     'params' => []
+        // ],
+        [
+            'name' => "地址管理",
+            'link' => "/user/my/addressmanage",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "关于我们",
+            'link' => "/user/my/article-detail",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "专题",
+            'link' => "/other/special/special",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "专题详情",
+            'link' => "/other/special/topic",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "id",
+                    'value' => "",
+                    'desc' => "id请填写对应的专题ID"
+                ]
+            ]
+        ],
+        [
+            'name' => "余额",
+            'link' => "/user/balance/balance",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "充值",
+            'link' => "/user/balance/recharge",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "浏览记录",
+            'link' => "/user/history/history",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+//        [
+//            'name' => "授权手机号",
+//            'link' => "/user/bind_phone/bind_phone",
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+        [
+            'name' => "所有订单",
+            'link' => "/order/order/order?status=-1",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "待付款订单",
+            'link' => "/order/order/order?status=0",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "待发货订单",
+            'link' => "/order/order/order?status=1",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "待收货订单",
+            'link' => "/order/order/order?status=2",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "已完成订单",
+            'link' => "/order/order/order?status=3",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "售后订单",
+            'link' => "/order/order-refund-list/order-refund-list",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "领券中心",
+            'link' => "/other/coupon_center/coupon_center",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "我的优惠券",
+            'link' => "/user/my_coupon/my_coupon",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "我的核销卡",
+            'link' => "/user/write_off_card/write_off_card",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "type",
+                    'value' => "1",
+                    'desc' => "我的核销卡"
+                ],
+            ]
+        ],
+        [
+            'name' => "我的礼品卡",
+            'link' => "/user/write_off_card/write_off_card",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "type",
+                    'value' => "2",
+                    'desc' => "我的礼品卡"
+                ],
+            ]
+        ],
+        [
+            'name' => "我的储值卡",
+            'link' => "/user/write_off_card/write_off_card",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "type",
+                    'value' => "3",
+                    'desc' => "我的储值卡"
+                ],
+            ]
+        ],
+        [
+            'name' => "我的卡密卡",
+            'link' => "/user/write_off_card/write_off_card",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "type",
+                    'value' => "4",
+                    'desc' => "我的卡密卡"
+                ],
+            ]
+        ],
+        [
+            'name' => "我的视频卡",
+            'link' => "/user/write_off_card/write_off_card",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "type",
+                    'value' => "5",
+                    'desc' => "我的视频卡"
+                ],
+            ]
+        ],
+//        [
+//            'name' => "我的卡券",
+//            'link' => "/user/my_card_coupon/my_card_coupon",
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+        [
+            'name' => "分销中心",
+            'link' => "/user/share/index",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "搜索",
+            'link' => "/pages/search/search",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        // [
+        //     'name' => "申请自提点",
+        //     'link' => "/pages/shop/apply",
+        //     'open_type' => "navigate",
+        //     'params' => []
+        // ],
+        // [
+        //     'name' => "自提点后台",
+        //     'link' => "/pages/shop/admin",
+        //     'open_type' => "navigate",
+        //     'params' => []
+        // ],
+        // [
+        //     'name' => "附近门店",
+        //     'link' => "/pages/shop-nearby/shop-nearby",
+        //     'open_type' => "navigate",
+        //     'params' => []
+        // ],
+        // [
+        //     'name' => "附近店铺",
+        //     'link' => "/pages/shop-list/shop-list",
+        //     'open_type' => "navigate",
+        //     'params' => []
+        // ],
+        // [
+        //     'name' => "入驻商",
+        //     'link' => "/mch/admin/home/home",
+        //     'open_type' => "navigate",
+        //     'params' => []
+        // ],
+//        [
+//            'name' => "后台管理",
+//            'link' => "/admin/home/home",
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+        [
+            'name' => "我的收藏",
+            'link' => "/user/collection/collection",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "小程序直播",
+            'link' => "/wxlive/live/live",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "门店中心",
+            'link' => "/md_admin/md-center/md",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "申请门店",
+            'link' => "/md_admin/apply-md/apply",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "门店员工中心",
+            'link' => "/md_admin/staff-center/staff",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "申请股东",
+            'link' => "/shareholder/apply/apply",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "股东中心",
+            'link' => "/shareholder/shareholder/index",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '一键拨号',
+            'link' => 'tel',
+            'open_type' => 'tel',
+            'params' => [
+                [
+                    'key' => "tel",
+                    'value' => "",
+                    'desc' => "请填写联系电话"
+                ]
+            ],
+        ],
+        [
+            'name' => '小程序',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '微信客服',
+            'link' => 'contact',
+            'open_type' => 'contact',
+            'params' => []
+        ],
+        [
+            'name' => '官方客服',
+            'link' => '/kefu/kefu',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+//        [
+//            'name' => '外链',
+//            'link' => 'web',
+//            'open_type' => 'web',
+//            'params' => [
+//                [
+//                    'key' => "web",
+//                    'value' => "",
+//                    'desc' => "打开的网页链接(注:域名必须已在微信官方小程序平台设置业务域名)"
+//                ]
+//            ],
+//        ],
+        [
+            'name' => '核销扫码',
+            'link' => 'clerk',
+            'open_type' => 'clerk',
+            'params' => [],
+        ],
+        [
+            'name' => '我的核销码',
+            'link' => '/face-pay/face-pay/member',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '手机端后台',
+            'link' => '/admin/home/home',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '短视频列表',
+            'link' => '/videoGoods/list/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '短视频中心',
+            'link' => '/videoGoods/userInfo/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '我的砍价',
+            'link' => '/marketing/curPrice/order/list/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '砍价活动',
+            'link' => '/marketing/curPrice/index/index',
+            'open_type' => 'navigate',
+            'params' => [
+//                [
+//                    'key' => "activity_cut_price_id",
+//                    'value' => "",
+//                    'desc' => "id请填写在砍价活动列表中相关活动的ID"
+//                ]
+            ],
+        ],
+	    [
+            'name' => '认养',
+            'link' => '/livestockAdoption/index/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => "认养详情",
+            'link' => "/livestockAdoption/adopt_detail/adopt_detail",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "id",
+                    'value' => "",
+                    'desc' => "id请填写在认养商品列表中相关商品的ID"
+                ]
+            ]
+        ],
+        [
+            'name' => "认养订单",
+            'link' => "/livestockAdoption/my_order/my_order?status=-1",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '认养设备',
+            'link' => '/livestockAdoption/camera/camera',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+	    [
+            'name' => '溯源专区',
+            'link' => '/source/index/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '我的溯源',
+            'link' => '/source/mySource/mySource',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '积分商城',
+            'link' => '/integral/integralStore/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '储值卡兑换',
+            'link' => '/user/write_off_card/recharge_card',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '拼团首页',
+            'link' => '/pt/index/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '拼团广场',
+            'link' => '/pt/square/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '我的拼团',
+            'link' => '/pt/order/index',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => "积分赠送",
+            'link' => "/marketing/mutate/index",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "type",
+                    'value' => "",
+                    'desc' => "type请填写0.积分转赠 1.余额转赠 2.佣金转余额"
+                ]
+            ]
+        ]
+    ];
+
+    // 平台运营菜单
+    const PLATFORM_LIST = [
+        [
+            'name' => '分类',
+            'link' => '/pages/cat/cat',
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "cat_id",
+                    'value' => "",
+                    'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                ]
+            ]
+        ],
+        [
+            'name' => '当面付',
+            'link' => '/face-pay/face-pay/payOut',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '点餐',
+            'link' => '/alipay-order/orderMeal/orderMeal',
+            'open_type' => 'navigate',
+            'params' => [
+                [
+                    'key' => "food_table_num",
+                    'value' => "",
+                    'desc' => "桌号"
+                ]
+            ],
+        ],
+        [
+            'name' => '商品列表',
+            'link' => '/other/list/list',
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "cat_id",
+                    'value' => "",
+                    'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                ]
+            ]
+        ],
+        [
+            'name' => "商品详情",
+            'link' => "/goods/goods/goods",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "id",
+                    'value' => "",
+                    'desc' => "id请填写在商品列表中相关商品的ID"
+                ]
+            ]
+        ],
+        [
+            'name' => "领券中心",
+            'link' => "/pages/coupon_center/coupon_center",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "专题",
+            'link' => "/other/special/special",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "专题详情",
+            'link' => "/other/special/topic",
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "id",
+                    'value' => "",
+                    'desc' => "id请填写对应的专题ID"
+                ]
+            ]
+        ],
+        [
+            'name' => '一键拨号',
+            'link' => 'tel',
+            'open_type' => 'tel',
+            'params' => [
+                [
+                    'key' => "tel",
+                    'value' => "",
+                    'desc' => "请填写联系电话"
+                ]
+            ],
+        ],
+        [
+            'name' => '官方客服',
+            'link' => '/kefu/kefu',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+    ];
+
+    public static function getLink()
+    {
+        $store_id = get_store_id();
+        $store = Store::findOne($store_id);
+
+        $list = self::PLATFORM_LIST;
+
+        if ($store->business_model == 1) { //独立运营才走这个
+            $list = self::LIST;
+            $system_list = NewDiyTemplate::find()
+                ->where([
+                    'store_id' => get_store_id(),
+                    'is_delete' => 0,
+                    'name' => 'system'
+                ])->orderBy(['id' => SORT_ASC])->asArray()->all();
+//            if (\Yii::$app->prod_is_dandianpu()) {
+//                $list[] = [
+//                    'name' => '申请店铺',
+//                    'link' => '/single-store/applyShop/applyShop',
+//                    'open_type' => "navigate",
+//                    'params' => []
+//                ];
+//            }
+
+            foreach ($list as $key => &$value) {
+                foreach ($system_list as $k => $v) {
+                    $template = json_decode($v['template'], true);
+                    if ($template && is_array($template) && isset($template['page_name'])) {
+                        if ($value['name'] == $template['page_name']) {
+                            $value['id'] = $v['id'];
+                        }
+                    }
+                }
+            }
+        }
+
+
+        $template = NewDiyTemplate::find()->where([
+            'store_id' => get_store_id(),
+            'is_index' => 0,
+            'is_delete' => 0,
+            'name' => 'DIY',
+        ])->all();
+
+        foreach($template as $item) {
+            $info = Json::decode($item->template);
+            $list[] = [
+                'name' => $info['page_name'],
+                'link' => "/pages/diy/diy?id=".$item->id,
+                'id' => $item->id,
+                'open_type' => "navigate",
+                'params' => []
+            ];
+        }
+        return $list;
+    }
+    //连接选择器(分组版)
+    public static function getLinkGroup()
+    {
+        $store_id = get_store_id();
+        $store = Store::findOne($store_id);
+
+        $groupDiyPage = [];
+        $template = NewDiyTemplate::find()->where([
+            'store_id' => get_store_id(),
+            'is_index' => 0,
+            'is_delete' => 0,
+            'name' => 'DIY',
+        ])->all();
+
+        foreach($template as $item) {
+            $info = Json::decode($item->template);
+            $groupDiyPage[] = [
+                'name' => $info['page_name'],
+                'link' => "/pages/diy/diy?id=".$item->id,
+                'id' => $item->id,
+                'open_type' => "navigate",
+                'params' => []
+            ];
+        }
+
+        $list = self::PLATFORM_LIST;
+
+        if ($store->business_model == 1) { //独立运营才走这个
+            $list = self::LIST;
+            $system_list = NewDiyTemplate::find()
+                ->where([
+                    'store_id' => get_store_id(),
+                    'is_delete' => 0,
+                    'name' => 'system'
+                ])->orderBy(['id' => SORT_ASC])->asArray()->all();
+//            if (\Yii::$app->prod_is_dandianpu()) {
+//                $list[] = [
+//                    'name' => '申请店铺',
+//                    'link' => '/single-store/applyShop/applyShop',
+//                    'open_type' => "navigate",
+//                    'params' => []
+//                ];
+//            }
+
+            foreach ($list as $key => &$value) {
+                foreach ($system_list as $k => $v) {
+                    $template = json_decode($v['template'], true);
+                    if ($template && is_array($template) && isset($template['page_name'])) {
+                        if ($value['name'] == $template['page_name']) {
+                            $value['id'] = $v['id'];
+                        }
+                    }
+                }
+            }
+        }else{
+            return [
+                [
+                    'name' => '商城页面',
+                    'child' => [
+                        [
+                            'name' => 'DIY页面',
+                            'list' => $groupDiyPage,
+                            'type' => 'diy-page',
+                        ],
+                        [
+                            'name' => '商城链接',
+                            'child' => [
+                                [
+                                    'name' => '基础链接',
+                                    'list' => $list
+                                ]
+                            ]
+                        ],
+                        [
+                            'name' => '应用',
+                            'child' => [
+                                [
+                                    'name' => '预约',
+                                    'list' => [
+                                        [
+                                            'name' => '预约活动',
+                                            'link' => '/marketing/booking/index/index',
+                                            'open_type' => 'navigate',
+                                            'params' => [],
+                                        ],
+                                    ],
+                                ],
+                                [
+                                    'name' => '扫码点餐',
+                                    'list' => [
+                                        [
+                                            'name' => '点餐页',
+                                            'link' => '/alipay-order/orderMeal/orderMeal',
+                                            'open_type' => 'navigate',
+                                            'params' => [
+                                                [
+                                                    'key' => "food_table_num",
+                                                    'value' => "",
+                                                    'desc' => "桌号"
+                                                ]
+                                            ],
+                                        ],
+                                        //        [
+                                        //            'name' => '点餐预约',
+                                        //            'link' => '/alipay-order/appointment/appointment',
+                                        //            'open_type' => 'navigate',
+                                        //            'params' => [],
+                                        //        ],
+                                        [
+                                            'name' => '点餐订单列表',
+                                            'link' => '/alipay-order/order/list',
+                                            'open_type' => "navigate",
+                                            'params' => []
+                                        ],
+                                    ]
+                                ],
+                                [
+                                    'name' => '拼团',
+                                    'list' => [
+                                        [
+                                            'name' => '商品列表',
+                                            'link' => '/marketing/other/pt/list/index',
+                                            'open_type' => 'navigate',
+                                            'params' => [
+
+                                            ],
+                                        ],
+//                                        [
+//                                            'name' => '我的拼团',
+//                                            'link' => '/marketing/other/pt/order/index',
+//                                            'open_type' => "navigate",
+//                                            'params' => []
+//                                        ],
+
+                                    ]
+                                ],
+                                [
+                                    'name' => '砍价',
+                                    'list' => [
+                                        [
+                                            'name' => '商品列表',
+                                            'link' => '/marketing/other/bargain/list/index',
+                                            'open_type' => 'navigate',
+                                            'params' => [
+
+                                            ],
+                                        ],
+//                                        [
+//                                            'name' => '我的砍价',
+//                                            'link' => '/marketing/other/bargain/order/list/index',
+//                                            'open_type' => "navigate",
+//                                            'params' => []
+//                                        ],
+                                    ]
+                                ],
+                                [
+                                    'name' => '秒杀',
+                                    'list' => [
+                                        [
+                                            'name' => '商品列表',
+                                            'link' => '/marketing/other/seckill/list/index',
+                                            'open_type' => 'navigate',
+                                            'params' => [
+
+                                            ],
+                                        ],
+                                    ]
+                                ],
+                                [
+                                    'name' => '新人专享',
+                                    'list' => [
+                                        [
+                                            'name' => '商品列表',
+                                            'link' => '/marketing/other/newUser/list/index',
+                                            'open_type' => 'navigate',
+                                            'params' => [
+
+                                            ],
+                                        ],
+                                    ]
+                                ],
+                                [
+                                    'name' => '积分商城',
+                                    'list' => [
+                                        [
+                                            'name' => '积分商城',
+                                            'link' => '/marketing/integral/index/index',
+                                            'open_type' => 'navigate',
+                                            'params' => [
+
+                                            ],
+                                        ]
+                                    ]
+                                ],
+                            ]
+                        ]
+                    ],
+
+                ],
+                [
+                    'name' => '商品页面',
+                    'icon' => 'shopping',
+                    'child' => [
+                        [
+                            'name' => '商品分类',
+                            'type' => 'goods-cat',
+                            'typeLink' => [
+                                'name' => '分类',
+                                'link' => '/pages/cat/cat',
+                                'open_type' => "navigate",
+                                'params' => [
+                                    [
+                                        'key' => "cat_id",
+                                        'valueKey' => "id",
+                                        'value' => "",
+                                        'desc' => "cat_id请填写在商品分类中相关分类的ID",
+                                    ]
+                                ]
+                            ],
+                        ],
+                        [
+                            'name' => '商品',
+                            'type' => 'goods',
+                            'typeLink' => [
+                                'name' => "商品详情",
+                                'link' => "/goods/goods/goods",
+                                'open_type' => "navigate",
+                                'params' => [
+                                    [
+                                        'key' => "id",
+                                        'valueKey' => "id",
+                                        'value' => "",
+                                        'desc' => "id请填写在商品列表中相关商品的ID",
+                                    ]
+                                ]
+                            ],
+                        ]
+                    ]
+                ],
+                [
+                    'name' => '文章页面',
+                    'icon' => 'file-text',
+                    'child' => [
+//                    [
+//                        'name' => '文章',
+//                        'type' => 'article',
+//                        'typeLink' => [
+//                            'name' => "专题详情",
+//                            'link' => "/other/special/topic",
+//                            'open_type' => "navigate",
+//                            'params' => [
+//                                [
+//                                    'key' => "id",
+//                                    'valueKey' => "id",
+//                                    'value' => "",
+//                                    'desc' => "id请填写对应的专题ID"
+//                                ]
+//                            ]
+//                        ],
+//                    ],
+                        [
+                            'name' => '专题页',
+                            'type' => 'special',
+                            'typeLink' => [
+                                'name' => "专题详情",
+                                'link' => "/other/special/topic",
+                                'open_type' => "navigate",
+                                'params' => [
+                                    [
+                                        'key' => "id",
+                                        'valueKey' => "id",
+                                        'value' => "",
+                                        'desc' => "id请填写对应的专题ID"
+                                    ]
+                                ]
+                            ],
+                        ],
+                    ],
+                ],
+            ];
+        }
+
+        return [
+            [
+                'name' => '商城页面',
+                'icon' => 'shop',
+                'child' => [
+                    [
+                        'name' => 'DIY页面',
+                        'list' => $groupDiyPage,
+                        'type' => 'diy-page',
+                    ],
+                    [
+                        'name' => '商城链接',
+                        'child' => [
+                            [
+                                'name' => '基础链接',
+                                'list' => [
+                                    [
+                                        'name' => '商城首页',
+                                        'link' => '/pages/home/home',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '购物车',
+                                        'link' => '/pages/shoppingcart/shoppingcart',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '我的',
+                                        'link' => '/pages/my/my',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '商城分类',
+                                        'link' => '/pages/cat/cat',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '商品列表',
+                                        'link' => '/other/list/list',
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "cat_id",
+                                                'value' => "",
+                                                'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                                            ]
+                                        ]
+                                    ],
+
+                                    [
+                                        'name' => '付款码',
+                                        'link' => '/face-pay/face-pay/collection',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+
+                                    [
+                                        'name' => "关于我们",
+                                        'link' => "/user/my/article-detail",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "专题",
+                                        'link' => "/other/special/special",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+
+                                    [
+                                        'name' => "搜索",
+                                        'link' => "/pages/search/search",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '推广二维码',
+                                        'link' => '/user/share-qrcode/share-qrcode',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+
+                                    [
+                                        'name' => '新版本DIY',
+                                        'link' => '/diy/diyNew/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '一键拨号',
+                                        'link' => 'tel',
+                                        'open_type' => 'tel',
+                                        'params' => [
+                                            [
+                                                'key' => "tel",
+                                                'value' => "",
+                                                'desc' => "请填写联系电话"
+                                            ]
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '小程序',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '微信客服',
+                                        'link' => 'contact',
+                                        'open_type' => 'contact',
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '官方客服',
+                                        'link' => '/kefu/kefu',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+//                                    [
+//                                        'name' => '外链',
+//                                        'link' => 'web',
+//                                        'open_type' => 'web',
+//                                        'params' => [
+//                                            [
+//                                                'key' => "web",
+//                                                'value' => "",
+//                                                'desc' => "打开的网页链接(注:域名必须已在微信官方小程序平台设置业务域名)"
+//                                            ]
+//                                        ],
+//                                    ],
+                                    [
+                                        'name' => '核销扫码',
+                                        'link' => 'clerk',
+                                        'open_type' => 'clerk',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '我的核销码',
+                                        'link' => '/face-pay/face-pay/member',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '手机端后台',
+                                        'link' => '/admin/home/home',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '品牌中心',
+                                        'link' => '/other/brand/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '品牌分类',
+                                        'link' => '/brandZone/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ]
+                                ],
+                            ],
+                            [
+                                'name' => '个人中心',
+                                'list' => [
+
+                                    [
+                                        'name' => "浏览记录",
+                                        'link' => "/user/history/history",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "所有订单",
+                                        'link' => "/order/order/order?status=-1",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "待付款订单",
+                                        'link' => "/order/order/order?status=0",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "待发货订单",
+                                        'link' => "/order/order/order?status=1",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "待收货订单",
+                                        'link' => "/order/order/order?status=2",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "已完成订单",
+                                        'link' => "/order/order/order?status=3",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "售后订单",
+                                        'link' => "/order/order-refund-list/order-refund-list",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "我的收藏",
+                                        'link' => "/user/collection/collection",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "地址管理",
+                                        'link' => "/user/my/addressmanage",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "余额",
+                                        'link' => "/user/balance/balance",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "充值",
+                                        'link' => "/user/balance/recharge",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '会员中心',
+                                        'link' => '/user/member/member_center',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '视频列表',
+                                        'link' => '/marketing/video/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '我的发票-开票历史',
+                                        'link' => '/invoice/manage/index?index=1',
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "index",
+                                                'value' => "1",
+                                                'desc' => "开票历史"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => '手机号条形码',
+                                        'link' => '/teamCenter/phoneCode/phoneCode',
+                                        'open_type' => "navigate",
+                                    ],
+                                    [
+                                        'name' => '常购清单',
+                                        'link' => '/brandZone/purchaseCatList/purchaseCatList',
+                                        'open_type' => "navigate",
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '分销',
+                                'list' => [
+
+                                    [
+                                        'name' => "分销中心",
+                                        'link' => "/user/share/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                        ],
+                    ],
+                    [
+                        'name' => '应用',
+                        'child' => [
+                            [
+                                'name' => '优惠券',
+                                'list' => [
+                                    [
+                                        'name' => "领券中心",
+                                        'link' => "/other/coupon_center/coupon_center",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "我的优惠券",
+                                        'link' => "/user/my_coupon/my_coupon",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ]
+                                ],
+                            ],
+                            [
+                                'name' => '卡券',
+                                'list' => [
+                                    [
+                                        'name' => "可赠送卡券列表",
+                                        'link' => "/user/write_off_card/write_index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "我的核销卡",
+                                        'link' => "/user/write_off_card/write_off_card",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "1",
+                                                'desc' => "我的核销卡"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "我的礼品卡",
+                                        'link' => "/user/write_off_card/write_off_card",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "2",
+                                                'desc' => "我的礼品卡"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "我的储值卡",
+                                        'link' => "/user/write_off_card/write_off_card",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "3",
+                                                'desc' => "我的储值卡"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "我的虚拟卡",
+                                        'link' => "/user/write_off_card/write_off_card",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "4",
+                                                'desc' => "我的虚拟卡"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "我的视频卡",
+                                        'link' => "/user/write_off_card/write_off_card",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "5",
+                                                'desc' => "我的视频卡"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => '储值卡兑换',
+                                        'link' => '/user/write_off_card/recharge_card',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '预约',
+                                'list' => [
+                                    [
+                                        'name' => '预约活动',
+                                        'link' => '/marketing/booking/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '砍价',
+                                'list' => [
+
+                                    [
+                                        'name' => '我的砍价',
+                                        'link' => '/marketing/curPrice/order/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '砍价活动',
+                                        'link' => '/marketing/curPrice/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [
+                            //                [
+                            //                    'key' => "activity_cut_price_id",
+                            //                    'value' => "",
+                            //                    'desc' => "id请填写在砍价活动列表中相关活动的ID"
+                            //                ]
+                                        ],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '秒杀',
+                                'list' => [
+                                    [
+                                        'name' => '秒杀活动',
+                                        'link' => '/seckill/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [
+                                            [
+                                                'key' => "activeId",
+                                                'value' => "",
+                                                'desc' => "id请填写在秒杀活动列表中相关活动的ID"
+                                            ]
+                                        ],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '拼团',
+                                'list' => [
+
+                                    [
+                                        'name' => '拼团首页',
+                                        'link' => '/pt/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '拼团广场',
+                                        'link' => '/pt/square/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '我的拼团',
+                                        'link' => '/pt/order/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ]
+                                ],
+                            ],
+                            [
+                                'name' => '新人专享',
+                                'list' => [
+                                    [
+                                        'name' => '新人专享',
+                                        'link' => '/marketing/newUser/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [
+
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '更多商品',
+                                        'link' => '/marketing/newUser/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [
+
+                                        ],
+                                    ],
+                                ]
+                            ],
+                            [
+                                'name' => '扫码点餐',
+                                'list' => [
+
+                                    [
+                                        'name' => '点餐页',
+                                        'link' => '/alipay-order/orderMeal/orderMeal',
+                                        'open_type' => 'navigate',
+                                        'params' => [
+                                            [
+                                                'key' => "food_table_num",
+                                                'value' => "",
+                                                'desc' => "桌号"
+                                            ]
+                                        ],
+                                    ],
+                            //        [
+                            //            'name' => '点餐预约',
+                            //            'link' => '/alipay-order/appointment/appointment',
+                            //            'open_type' => 'navigate',
+                            //            'params' => [],
+                            //        ],
+                                    [
+                                        'name' => '点餐订单列表',
+                                        'link' => '/alipay-order/order/list',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '认养',
+                                'list' => [
+
+                                    [
+                                        'name' => '认养',
+                                        'link' => '/livestockAdoption/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => "认养详情",
+                                        'link' => "/livestockAdoption/adopt_detail/adopt_detail",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "id请填写在认养商品列表中相关商品的ID"
+                                            ]
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "认养订单",
+                                        'link' => "/livestockAdoption/my_order/my_order?status=-1",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '认养设备',
+                                        'link' => '/livestockAdoption/camera/camera',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '溯源',
+                                'list' => [
+
+                                    [
+                                        'name' => '溯源专区',
+                                        'link' => '/source/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '我的溯源',
+                                        'link' => '/source/mySource/mySource',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '门店',
+                                'list' => [
+
+                                    [
+                                        'name' => "门店中心",
+                                        'link' => "/md_admin/md-center/md",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "申请门店",
+                                        'link' => "/md_admin/apply-md/apply",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "门店员工中心",
+                                        'link' => "/md_admin/staff-center/staff",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "门店列表",
+                                        'link' => "/other/store_list/index",
+                                        'open_type' => "navigate",
+                                        'link_type' => 'md_list',
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "门店分类ID"
+                                            ],
+                                        ]
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '短视频',
+                                'list' => [
+
+                                    [
+                                        'name' => '短视频列表',
+                                        'link' => '/videoGoods/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '短视频中心',
+                                        'link' => '/videoGoods/userInfo/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '消费全返',
+                                'list' => [
+
+                                    [
+                                        'name' => '我的返利',
+                                        'link' => '/rebateSelf/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '股东',
+                                'list' => [
+
+                                    [
+                                        'name' => "申请股东",
+                                        'link' => "/shareholder/apply/apply",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "股东中心",
+                                        'link' => "/shareholder/shareholder/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '2+1链动',
+                                'list' => [
+                                    [
+                                        'name' => "团队中心",
+                                        'link' => "/chain/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "团队数据",
+                                        'link' => "/chain/teamData/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "链动佣金",
+                                        'link' => "/chain/commission/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "帮扶佣金",
+                                        'link' => "/chain/frozenAmount/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "复购冻结佣金",
+                                        'link' => "/fugou/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '区域代理',
+                                'list' => [
+
+                                    [
+                                        'name' => "代理申请",
+                                        'link' => "/area/apply/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "代理中心",
+                                        'link' => "/area/userInfo/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '资产转赠',
+                                'list' => [
+
+                                    [
+                                        'name' => "积分转赠",
+                                        'link' => "/marketing/mutate/index",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "0"
+                                            ]
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "余额转赠",
+                                        'link' => "/marketing/mutate/index",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "1"
+                                            ]
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "佣金转余额",
+                                        'link' => "/marketing/mutate/index",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "type",
+                                                'value' => "2"
+                                            ]
+                                        ]
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '联盟券',
+                                'list' => [
+                                    [
+                                        'name' => '我的联盟券',
+                                        'link' => '/user/new_balance/new_balance',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ]
+                                ]
+                            ],
+                            [
+                                'name' => '支付券',
+                                'list' => [
+                                    [
+                                        'name' => '支付宝支付券',
+                                        'link' => '/mkt/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ]
+                            ],
+                            [
+                                'name' => '问答专区',
+                                'list' => [
+                                    [
+                                        'name' => "提问首页",
+                                        'link' => "/chart-gpt/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => "提问模版",
+                                        'link' => "/chart-gpt/moban/moban",
+                                        'open_type' => "navigate",
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => "每日任务",
+                                        'link' => "/chart-gpt/task/task",
+                                        'open_type' => "navigate",
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => "我的问答",
+                                        'link' => "/chart-gpt/qa-list/qa-list",
+                                        'open_type' => "navigate",
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '排队免单',
+                                'list' => [
+                                    [
+                                        'name' => "免单列表",
+                                        'link' => "/freeOrder/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => "累计明细",
+                                        'link' => "/freeOrder/log/log",
+                                        'open_type' => "navigate",
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '营销活动',
+                                'list' => [
+                                    [
+                                        'name' => "保单查询",
+                                        'link' => "/other/insurance/search",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "小程序直播",
+                                        'link' => "/wxlive/live/live",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '积分商城',
+                                        'link' => '/integral/integralStore/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '当面付',
+                                        'link' => '/face-pay/face-pay/payOut',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '签到',
+                                        'link' => '/integral/signIn/signIn',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '微信会员卡',
+                                        'link' => '/weChat/card/index',
+                                        'open_type' => "weChatCart",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '支付宝会员卡',
+                                        'link' => '/alipay/card/index',
+                                        'open_type' => "alipayCard",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => 'WIFI',
+                                        'link' => '/pages/home/wifi',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '素材中心',
+                                        'link' => '/tools/quickPost/index/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ]
+                            ],
+                            [
+                                'name' => '上门服务',
+                                'list' => [
+                                    [
+                                        'name' => '服务人员中心',
+                                        'link' => '/service-home/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '服务人员收藏',
+                                        'link' => '/marketing/serviceHome/collect/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '服务人员列表',
+                                        'link' => '/marketing/serviceHome/engineer/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '服务商品列表',
+                                        'link' => '/marketing/serviceHome/category/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '服务订单',
+                                        'link' => '/marketing/serviceHome/order/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '视频号营销',
+                                'list' => [
+
+                                    [
+                                        'name' => '视频号直播',
+                                        'link' => 'videoShopLive',
+                                        'open_type' => 'videoShopLive',
+                                        'params' => [
+                                            [
+                                                'key' => "finder_id",
+                                                'value' => "",
+                                                'desc' => "视频号 id,以“sph”开头的id,可在视频号助手获取"
+                                            ]
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '视频号主页',
+                                        'link' => 'videoShop',
+                                        'open_type' => 'videoShop',
+                                        'params' => [
+                                            [
+                                                'key' => "finder_id",
+                                                'value' => "",
+                                                'desc' => "视频号 id,以“sph”开头的id,可在视频号助手获取"
+                                            ]
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '视频号分销选品',
+                                        'link' => '/videoNumber/center/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '商品表单',
+                                'list' => [
+                                    [
+                                        'name' => '展示商品表单',
+                                        'link' => '/showGoodsForm/form/index',
+                                        'open_type' => 'goodsForm',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '进入抖音号',
+                                        'link' => 'jump_douyin',
+                                        'open_type' => 'jump_douyin',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => '我的表单',
+                                        'link' => '/showGoodsForm/list/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '配送中心',
+                                'list' => [
+                                    [
+                                        'name' => '申请骑手',
+                                        'link' => '/distribution/index/rider',
+                                        'open_type' => 'localDeliveryIndex',
+                                    ],
+                                    [
+                                        'name' => '配送中心',
+                                        'link' => '/distribution/index/index',
+                                        'open_type' => 'localDeliveryIndex',
+                                    ]
+                                ],
+                            ],
+                            [
+                                'name' => '月付',
+                                'list' => [
+                                    [
+                                        'name' => '我的月付',
+                                        'link' => '/monthlyPaymentA/monthlyPaymentA/monthlyPaymentA',
+                                        'open_type' => 'navigate',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '入驻商',
+                                'list' => [
+
+                                    [
+                                        'name' => "入驻",
+                                        'link' => '/admin/home/home?is_mch=1',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                    [
+                                        'name' => "附近店铺",
+                                        'link' => "/mch_store/mchList/mchList",
+                                        'open_type' => "navigate",
+                                        'link_type' => 'mch_list',
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "入驻商分类ID"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => "商户列表",
+                                        'link' => "/mch_store/nearbyShops/nearbyShops",
+                                        'open_type' => "navigate",
+                                        'link_type' => 'mch_list',
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "入驻商分类ID"
+                                            ],
+                                        ]
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '自建直播',
+                                'list' => [
+
+                                    [
+                                        'name' => "主播中心",
+                                        'link' => "/tools/live/create/list/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "直播间列表",
+                                        'link' => "/tools/live/list/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "直播间页面",
+                                        'link' => "/tools/live/player/index",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "直播间ID"
+                                            ],
+                                        ]
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '圈子',
+                                'list' => [
+                                    [
+                                        'name' => "个人主页",
+                                        'link' => "/marketing/quanzi/userInfo/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "帖子详情",
+                                        'link' => "/marketing/quanzi/item/index",
+                                        'link_type' => 'quanzi',
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "帖子ID"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => "帖子列表",
+                                        'link' => "/marketing/quanzi/search/index",
+                                        'link_type' => 'quanzi',
+                                        'open_type' => "navigate",
+                                        'params' => [
+//                                            [
+//                                                'key' => "id",
+//                                                'value' => "",
+//                                                'desc' => "帖子ID,多个逗号分割"
+//                                            ],
+                                            [
+                                                'key' => "cat_id",
+                                                'value' => "",
+                                                'desc' => "分类ID",
+                                            ],
+                                            [
+                                                'key' => "label",
+                                                'value' => "",
+                                                'desc' => "标签"
+                                            ],
+//                                            [
+//                                                'key' => "user_id",
+//                                                'value' => "",
+//                                                'desc' => "作者用户id"
+//                                            ],
+                                        ]
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '送礼物',
+                                'list' => [
+                                    [
+                                        'name' => "我的礼物",
+                                        'link' => "/givingGifts/myGift/myGift",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "送礼清单",
+                                        'link' => "/givingGifts/giftCat/giftCat",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '视频号爆单',
+                                'list' => [
+                                    [
+                                        'name' => "视频号爆单公排中心",
+                                        'link' => "/marketing/publicRanking/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '商城公排',
+                                'list' => [
+                                    [
+                                        'name' => "商城公排中心",
+                                        'link' => "/tools/gongpai/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+			                [
+                                'name' => '大转盘抽奖',
+                                'list' => [
+                                    [
+                                        'name' => "大转盘首页",
+                                        'link' => "/prizeWheel/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+			                [
+                                'name' => '全域分佣',
+                                'list' => [
+                                    [
+                                        'name' => '全域分佣',
+                                        'link' => '/global/globalDivideBonus/globalDivideBonus',
+                                        'open_type' => 'navigate',
+                                    ],
+                                    [
+                                        'name' => '新增报单',
+                                        'link' => '/global/addForm/addForm',
+                                        'open_type' => 'navigate',
+                                    ],
+                                    [
+                                        'name' => '奖金池',
+                                        'link' => '/global/globalBonusPool/globalBonusPool',
+                                        'open_type' => 'navigate',
+                                        'link_type' => 'bonus_pool',
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "奖金池ID"
+                                            ]
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '积分记录',
+                                        'link' => '/global/IntegralLog/IntegralLog',
+                                        'open_type' => 'navigate',
+                                    ],
+                                    [
+                                        'name' => '报单列表',
+                                        'link' => '/global/list/list',
+                                        'open_type' => 'navigate',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '团队分红',
+                                'list' => [
+                                    [
+                                        'name' => '团队中心',
+                                        'link' => '/teamCenter/teamCenterIndex/teamCenterIndex',
+                                        'open_type' => 'navigate',
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '团队业绩分红',
+                                'list' => [
+                                    [
+                                        'name' => "团队业绩分红中心",
+                                        'link' => "/tools/teamGrades/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '手机收银台',
+                                'list' => [
+                                    [
+                                        'name' => '收银台',
+                                        'link' => '/cash_register/index/index',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '37拼购',
+                                'list' => [
+                                    [
+                                        'name' => "37拼购",
+                                        'link' => "/pinduoGou/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '超级卖货系统',
+                                'list' => [
+                                    [
+                                        'name' => "超级卖货系统",
+                                        'link' => "/salesCenter/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '增值积分',
+                                'list' => [
+                                    [
+                                        'name' => "增值积分",
+                                        'link' => "/costPointsAppreciation/index/index",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '批发审核',
+                                'list' => [
+                                    [
+                                        'name' => "门店认证",
+                                        'link' => "B2b",
+                                        'open_type' => "B2b",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            /* begin 2025/07/17 14:29:28 id1248 活动报名 WPing丶 */
+                            [
+                                'name' => '活动报名',
+                                'list' => [
+                                    [
+                                        'name' => '活动专区',
+                                        'link' => "/eventPlanning/activityArea/activityArea",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '活动报名',
+                                        'link' => "/eventPlanning/signUp/signUp",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "id请填写在报名活动列表中相关活动的ID"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => '签到码',
+                                        'link' => "/eventPlanning/signInQRCode/signInQRCode",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "id请填写在报名活动列表中相关活动的ID"
+                                            ],
+                                        ]
+                                    ],
+                                    [
+                                        'name' => '活动信息',
+                                        'link' => "/eventPlanning/detailInfo/detailInfo",
+                                        'open_type' => "navigate",
+                                        'params' => [
+                                            [
+                                                'key' => "id",
+                                                'value' => "",
+                                                'desc' => "id请填写在报名活动列表中相关活动的ID"
+                                            ],
+                                            [
+                                                'key' => "type",
+                                                'value' => "",
+                                                'desc' => "hotel=住宿;restaurant=用餐;itinerary=行程;"
+                                            ]
+                                        ]
+                                    ],
+                                    [
+                                        'name' => '我的报名',
+                                        'link' => "/eventPlanning/myRegistration/myRegistration",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '签到员中心',
+                                        'link' => "/eventPlanning/verifyCode/verifyCode",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ]
+                            ]
+                            /* end */
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'name' => '商品页面',
+                'icon' => 'shopping',
+                'child' => [
+                    [
+                        'name' => '商品分类',
+                        'type' => 'goods-cat',
+                        'typeLink' => [
+                            'name' => '分类',
+                            'link' => '/pages/cat/cat',
+                            'open_type' => "switchtab",
+                            'params' => [
+                                [
+                                    'key' => "cat_id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "cat_id请填写在商品分类中相关分类的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '商品详情',
+                        'type' => 'goods',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/goods/goods/goods",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '商品列表',
+                        'type' => 'goods-list',
+                        'typeLink' => [
+                            'name' => "商品列表",
+                            'link' => "/other/list/list",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "cat_id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '秒杀商品',
+                        'type' => 'goods-seckill',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/goods/goods/goods",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ],
+                                [
+                                    'key' => "is_seckill",
+                                    'value' => "1",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '砍价商品',
+                        'type' => 'goods-cut-price',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/goods/goods/goods",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ],
+                                [
+                                    'key' => "activity_cut_price_id",
+                                    'valueKey' => "activity_id",
+                                    'value' => "",
+                                    'desc' => "相关活动的ID"
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '拼团商品',
+                        'type' => 'goods-pt',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/goods/goods/goods",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ],
+                                [
+                                    'key' => "is_pt",
+                                    'value' => "1",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '上门服务',
+                        'type' => 'goods-worker',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/marketing/serviceHome/goods/item/index",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '上门服务列表',
+                        'type' => 'goods-worker-list',
+                        'typeLink' => [
+                            'name' => "商品列表",
+                            'link' => "/marketing/serviceHome/category/index/index",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "cat_id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '积分商品',
+                        'type' => 'goods-integral',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/integral/integralStore/goods",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '预约商品',
+                        'type' => 'reserve-goods',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/goods/goods/goods",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写在商品列表中相关商品的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '品牌商品',
+                        'type' => 'goods-grand',
+                        'typeLink' => [
+                            'name' => "商品详情",
+                            'link' => "/other/list/list",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "brand_id",
+                                    'valueKey' => "brand_id",
+                                    'value' => "",
+                                    'desc' => "grand_id请填写在品牌列表中相关的ID",
+                                ]
+                            ]
+                        ],
+                    ]
+                ]
+            ],
+            [
+                'name' => '文章页面',
+                'icon' => 'file-text',
+                'child' => [
+                    [
+                        'name' => '文章',
+                        'type' => 'article',
+                        'typeLink' => [
+                            'name' => "文章详情",
+                            'link' => "/user/my/article-detail",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写对应的文章ID"
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '专题详情',
+                        'type' => 'special',
+                        'typeLink' => [
+                            'name' => "专题详情",
+                            'link' => "/other/special/topic",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写对应的专题ID"
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '专题分类',
+                        'type' => 'special-category',
+                        'typeLink' => [
+                            'name' => "专题分类",
+                            'link' => "/other/special/special",
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "id请填写对应的专题分类ID"
+                                ]
+                            ]
+                        ],
+                    ],
+                ],
+            ],
+            [
+                'name' => '自定义',
+                'icon' => 'appstore',
+                'child' => [
+                    [
+                        'name' => '自定义链接',
+                        'type' => 'diy-link',
+                    ],
+                ],
+            ],
+        ];
+    }
+}

+ 410 - 0
constants/NavbarLink.php

@@ -0,0 +1,410 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\constants;
+
+use app\models\NewDiyTemplate;
+use yii\helpers\Json;
+
+class NavbarLink
+{
+    public static function getLink()
+    {
+        $host =  \Yii::$app->request->getHostName();
+        $list = [
+            [
+                'name' => '首页',
+                'link' => '/pages/home/home',
+                'open_type' => "switchtab",
+                'params' => []
+            ],
+            [
+                'name' => '新版本DIY',
+                'link' => '/diy/diyNew/index',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '平台首页',
+                'link' => '/pages/union/home/index',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '分类',
+                'link' => '/pages/cat/cat',
+                'open_type' => "switchtab",
+                'params' => [
+                    [
+                        'key' => "cat_id",
+                        'value' => "",
+                        'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                    ]
+                ]
+            ],
+            [
+                'name' => '购物车',
+                'link' => '/pages/shoppingcart/shoppingcart',
+                'open_type' => "switchtab",
+                'params' => []
+            ],
+            [
+                'name' => '当面付',
+                'link' => '/face-pay/face-pay/pay',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '点餐',
+                'link' => '/alipay-order/orderMeal/orderMeal',
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "food_table_num",
+                        'value' => "",
+                        'desc' => "桌号"
+                    ]
+                ]
+            ],
+            [
+                'name' => '点餐预约',
+                'link' => '/alipay-order/appointment/appointment',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '点餐订单列表',
+                'link' => '/alipay-order/order/list',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '福利中心',
+                'link' => '/integral/integral/integral',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '我的核销码',
+                'link' => '/face-pay/face-pay/member',
+                'open_type' => 'navigate',
+                'params' => [],
+            ],
+            [
+                'name' => '会员中心',
+                'link' => '/user/member/member_center',
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '用户中心',
+                'link' => '/pages/my/my',
+                'id' => 375,
+                'open_type' => "switchtab",
+                'params' => []
+            ],
+            [
+                'name' => '商品列表',
+                'link' => '/other/list/list',
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "cat_id",
+                        'value' => "",
+                        'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                    ]
+                ]
+            ],
+            [
+                'name' => "专题",
+                'link' => "/other/special/special",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "充值",
+                'link' => "/user/balance/recharge",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "领券中心",
+                'link' => "/other/coupon_center/coupon_center",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "分销中心",
+                'link' => "/user/share/index",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "搜索",
+                'link' => "/pages/search/search",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "附近门店",
+                'link' => "/pages/shop-nearby/shop-nearby",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => '一键拨号',
+                'link' => 'tel',
+                'open_type' => 'tel',
+                'params' => [
+                    [
+                        'key' => "tel",
+                        'value' => "",
+                        'desc' => "请填写联系电话"
+                    ]
+                ],
+            ],
+            [
+                'name' => '小程序',
+                'link' => 'wxapp',
+                'open_type' => 'wxapp',
+                'params' => [
+                    [
+                        'key' => "appid",
+                        'value' => "",
+                        'desc' => "请填写小程序appid"
+                    ],
+                    [
+                        'key' => "path",
+                        'value' => "",
+                        'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                    ],
+                ],
+            ],
+            [
+                'name' => '客服',
+                'link' => 'contact',
+                'open_type' => 'contact',
+                'params' => []
+            ],
+            [
+                'name' => "溯源专区",
+                'link' => "/source/index/index",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "我的溯源",
+                'link' => "/source/mySource/mySource",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            // [
+            //     'name' => '外链',
+            //     'link' => 'web',
+            //     'open_type' => 'web',
+            //     'params' => [
+            //         [
+            //             'key' => "web",
+            //             'value' => "",
+            //             'desc' => "打开的网页链接(注:域名必须已在微信官方小程序平台设置业务域名)"
+            //         ]
+            //     ],
+            // ],
+        ];
+        $template = NewDiyTemplate::find()->where([
+            'store_id' => get_store_id(),
+            'is_delete' => 0,
+            'name' => 'DIY',
+        ])->all();
+        
+        foreach($template as $item) {
+            $info = Json::decode($item->template);
+            $list[] = [
+                'name' => $info['page_name'],
+                'link' => "/pages/diy/diy?id=".$item->id,
+                'open_type' => "navigate",
+                'params' => []
+            ];
+        }
+        return $list;
+    }
+
+    /**
+     * 入住商店铺装修导航链接
+     * @return array
+     */
+    public static function mchLink()
+    {
+        $list = [
+            [
+                'name' => "商城首页",
+                'link' => "/pages/home/home",
+                'open_type' => "switchtab",
+                'params' => []
+            ],
+            [
+                'name' => "分类",
+                'link' => "/pages/cat/cat",
+                'open_type' => "switchtab",
+                'params' => [
+                    [
+                        'key' => "cat_id",
+                        'value' => "",
+                        'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                    ]
+                ]
+            ],
+            [
+                'name' => "购物车",
+                'link' => "/pages/shoppingcart/shoppingcart",
+                'open_type' => "switchtab",
+                'params' => []
+            ],
+            [
+                'name' => "会员中心",
+                'link' => "/user/member/member_center",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "用户中心",
+                'link' => "/pages/my/my",
+                'open_type' => "switchtab",
+                'params' => []
+            ],
+            [
+                'name' => "商品列表",
+                'link' => "/other/list/list",
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "cat_id",
+                        'value' => "",
+                        'desc' => "cat_id请填写在商品分类中相关分类的ID"
+                    ]
+                ]
+            ],
+            [
+                'name' => "商品详情",
+                'link' => "/goods/goods/goods",
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "id",
+                        'value' => "",
+                        'desc' => "id请填写在商品列表中相关商品的ID"
+                    ]
+                ]
+            ],
+            [
+                'name' => "所有订单",
+                'link' => "/pages/order/order?status=-1",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "待付款订单",
+                'link' => "/pages/order/order?status=0",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "待发货订单",
+                'link' => "/pages/order/order?status=1",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "待收货订单",
+                'link' => "/pages/order/order?status=2",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "已完成订单",
+                'link' => "/pages/order/order?status=3",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "售后订单",
+                'link' => "/pages/order/order?status=4",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "我的订单",
+                'link' => "/pages/order/order",
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "status",
+                        'value' => 0,
+                        'desc' => "status 请填写订单列表状态, 为空则跳转为 待付款",
+                    ]
+                ],
+            ],
+            [
+                'name' => "店铺商品分类",
+                'link' => "/mch/shop/shop",
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "cat_id",
+                        'value' => "",
+                        'desc' => "cat_id请填写在店铺商品分类中相关分类的ID"
+                    ],
+                    [
+                        'key' => "tab",
+                        'value' => "2",
+                        'desc' => "tab该数据为默认数据,请勿修改"
+                    ]
+
+                ]
+            ],
+            [
+                'name' => "店铺首页",
+                'link' => "/mch/shop/shop?tab=1",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "店铺全部商品",
+                'link' => "/mch/shop/shop?tab=2",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "店铺新品上架",
+                'link' => "/mch/shop/shop?tab=3",
+                'open_type' => "navigate",
+                'params' => []
+            ],
+            [
+                'name' => "店铺商品分类",
+                'link' => "/mch/shop-cat/shop-cat",
+                'open_type' => "navigate",
+                'params' => [
+                    [
+                        'key' => "cat_id",
+                        'value' => "",
+                        'desc' => "cat_id请填写在店铺商品分类中相关分类的ID"
+                    ]
+                ]
+            ],
+        ];
+        foreach($list as $k => $v) {
+            if ($v['open_type'] == 'mch' || $v['open_type'] == 'mch_nav') {
+                $list[$k]['params'][] = [
+                    'key' => "mch_id",
+                    'value' => get_mch_id(),
+                    'desc' => "mch_id为本商户id,请勿修改"
+                ];
+            }
+        }
+        return $list;
+    }
+}

+ 1396 - 0
constants/OptionSetting.php

@@ -0,0 +1,1396 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\constants;
+
+use app\models\Option;
+use app\models\Order;
+use app\models\Store;
+use app\modules\admin\models\AuthRoleForm;
+
+/**
+ * Class OptionSetting
+ * @package app\modules\common\constants
+ */
+class OptionSetting
+{
+    // 基础设置
+    const STORE_ID = 1;
+    const STORE_NAME = 'name';
+    const STORE_LOGO = 'logo';
+    const COORDINATE = 'coordinate';
+    const ADDRESS_INFO = 'address_info';
+    const ADDRESS = 'address';
+    const STORE_LOGIN_FORCIBLY_BIND_MOBILE = 'login_forcibly_bind_mobile';
+    const STORE_LOGIN_USE_MOBILE = 'login_use_mobile';
+    // const STORE_INDEX_SHOW_LOGIN = 'index_show_login';
+    const STORE_CONTACT_TEL = 'contact_tel';
+    const STORE_OVER_DAY = 'over_day';
+    const STORE_DELIVERY_TIME = 'delivery_time';
+    const STORE_AFTER_SALE_TIME = 'after_sale_time';
+    const SEND_INTEGRAL_PROFIT = 'send_integral_profit';
+    const STORE_GOOD_NEGOTIABLE = 'good_negotiable';
+    const STORE_ALI_EXPRESS_APP_CODE = 'ali_express_app_code';
+    const STORE_KDNIAO_MCH_ID = 'kdniao_mch_id';
+    const STORE_KDNIAO_API_KEY = 'kdniao_api_key';
+    const STORE_KDNIAO_API_FREE = 'kdniao_api_free';
+    const STORE_SEND_TYPE = 'send_type';
+    const STORE_LOCAL_TYPE = 'local_type';
+    const STORE_WX_LOGISTICS_TYPE = 'store_wx_logistics_type';
+    const STORE_PAYMENT = 'payment';
+    const STORE_PAYMENT_DEFAULT = 'payment_default';
+    const STORE_MOBILE_VERIFY = 'mobile_verify';
+    const STORE_INTEGRAL = 'integral';
+    const STORE_INTEGRAL_NAME = 'integral_name';
+    const STORE_INTEGRATION = 'integration';
+    const STORE_WARN_GOODS_INVENTORY = 'warn_goods_inventory';
+    const STORE_CLIENT_PRIVACY_ID = "client_privacy_id";
+    const STORE_CLIENT_SERVICE_ID = "client_service_id";
+    const STORE_LANGUAGE = "language";
+    const STORE_COMBINE_PAY = 'combine_pay';
+    const BALANCE_TO_CASH = 'balance_to_cash';
+    const BALANCE_TO_CASH_SETTING = 'balance_to_cash_setting';
+    const BALANCE_TO_COMMISSION = 'balance_to_commission';
+    const COMMISSION_TO_BALANCE = 'commission_to_balance';
+
+    //商品过期预警天数
+    const STORE_WARN_GOODS_TIMEOUT = 'warn_goods_timeout';
+    //商品库存预警
+    const STORE_WARN_GOODS_NUM = 'warn_goods_num';
+    const STORE_WARN_GOODS_NUM_DEFAULT = 100;
+
+    const DIY_EXPRESS_NAME = 'diy_express_name';
+    const DIY_SHOP_NAME = 'diy_shop_name';
+    const DIY_DELIVERY_NAME = 'diy_delivery_name';
+
+    //商品详情区组件开关
+    const ALI_MINI_PLUGIN_goodsDetail = 'ali_mini_plugin_goodsDetail';
+
+
+    // 微信设置
+    const WECHAT_IS_SHENHE = 'is_shenhe';
+    const WECHAT_ALI_IS_SHENHE = 'is_ali_shenhe';
+    const COMPONENT_ALI_IS_SHENHE = 'is_component_ali_shenhe';
+    const WECHAT_AUTO_ADDRESS_STATUS = 'auto_address_status';
+    const WECHAT_IS_OFFICIAL_ACCOUNT = "is_official_account";
+    //单店铺H5支付宝支付
+    const ALIPAY_PAY_DANDIANPUH5 = 'alipay_pay_dandianpuh5';
+
+    //微信公众号设置
+    const WECHAT_MP = 'wechat_mp';
+
+    //抖音三方设置
+    const DOUYIN_COMPONENT = 'douyin_component';
+    const DOUYIN_COMPONENT_OUTSIDE_HTTP = 'douyin_component_outside_http';
+
+    //银豹设置
+    const POSPAL = 'pospal';
+    const POSPAL_SYNC_STOCK_ORDERID_MAX = 'pospal_sync_stock_orderid_max';
+    const POSPAL_SYNC_STOCK_YB_ORDERID_MAX = 'pospal_sync_stock_yb_orderid_max';
+
+    //聚水潭设置
+    const JU_SHUI_TAN = 'jushuitan';
+    const JU_SHUI_TAN_TOKEN = 'jushuitan_token';
+
+    //快跑者设置
+    const KELOOP = 'keloop';
+    const KELOOP_TOKEN = 'keloop_token';
+
+    //麦芽田
+    const MAIYATIAN_SAAS = 'maiyatian_saas';
+    const MAIYATIAN = 'maiyatian';
+
+    //adapay
+    const ADAPAY = 'adapay';
+    const ADAPAY_RECEIVER = 'adapay_receiver';
+    const SAAS_BANK_SETTING = 'saas_bank_setting';
+    const SAAS_YUNST_SETTING = 'saas_yunst_setting';
+    const STORE_BANK_SETTING = 'store_bank_setting';
+
+    //allinpay
+    const ALLINPAY = 'allinpay';
+
+    //线下转账支付
+    const STORE_PAY_OFFLINE = 'store_pay_offline';
+
+    //MOCHAT SCRM
+    const MOCHAT = 'mochat';
+    const MOCHAT_API = 'mochat_api';
+
+    // app设置
+    const APP_STORE_ANDROID = 'app_store_android'; //商城端
+    const APP_STORE_ANDROID_VERSION = 'app_store_android_version'; // android最新版本号
+    const STORE_APP_LOGO = 'store_app_logo'; //供应链端
+    const STORE_APP_BG = 'store_app_bg'; //saas联盟端
+    const APP_STORE_IOS = 'app_store_ios'; //商城端-ios
+    const APP_IS_OPEN_MAP = 'app_is_open_map'; //是否开启地图
+    const MAP_APP_CODE = 'map_app_code'; //地图key
+    const APP_WIFI = 'app_wifi';
+
+    // 平台app设置
+    const PLATFORM_APP_STORE_ANDROID = 'platform_app_store_android';
+    const PLATFORM_APP_STORE_ANDROID_VERSION = 'platform_app_store_android_version'; // android最新版本号
+    const PLATFORM_STORE_APP_LOGO = 'platform_app_logo';
+    const PLATFORM_STORE_APP_BG = 'platform_app_bg';
+    const PLATFORM_APP_STORE_IOS = 'platform_app_store_ios';
+
+    // 显示设置
+    const DISPLAY_IS_COMMENT = "is_comment";
+    const CLIENT_LOADING_LOGO = 'client_loading_logo';
+    const INSURANCE_BG_IMG = 'insurance_bg_img';
+
+    const ALIPAY_LOGIN_TOGGLE = 'alipay_login_toggle';
+
+    const WECHAT_LOGIN_TOGGLE = 'wechat_login_toggle';
+
+    const WECHAT_LOGIN_TOGGLE_ARTICLE = 'wechat_login_toggle_article';
+
+
+    //是否是使用密码登录(h5/app)
+    const IS_PASSWORD_LOGIN = 'is_password_login';
+    //是否是使用密码登录(h5/app)
+    const IS_PASSWORD_LOGIN_PHONE_VERIFY = 'is_password_login_phone_verify';
+
+
+    // 网站设置
+    const WEB_NAME = 'web_name';
+    const WEB_LOG = 'web_log';
+    const WEB_COPYRIGHT = 'copyright';
+    const WEB_PASSPORT_BG = 'passport_bg';
+    const WEB_STORE_SHARE_TITLE = 'store_share_title';
+    const WEB_STORE_SHARE_LOG = 'store_share_logo';
+    const WEB_STORE_SHARE_DESC = 'store_share_desc';
+    const WEB_KF_WECHAT_IMG = 'kf_wechat_img';
+
+    //隐藏商户OSS设置,统一用平台配置OSS
+    const MCH_HIDE_OSS = 'mch_hide_oss';
+    // 平台上传越限配置
+    const PLATFORM_UPLOAD_LIMIT = 'platform_upload_limit';
+    // 充值设置 recharge
+    // 开启余额功能
+    const RECHARGE_WALLET_STATUS = 'recharge_wallet_status';
+    // 是否开放自定义金额
+    const RECHARGE_CUSTOM_STATUS = 'recharge_custom_status';
+    // 背景图片
+    const RECHARGE_PIC_URL = 'recharge_pic_url';
+    // 广告图片
+    const RECHARGE_AD_PIC_URL = 'recharge_ad_pic_url';
+    // 广告图片跳转链接
+    const RECHARGE_PAGE_URL = 'recharge_page_url';
+    // 充值说明图标
+    const RECHARGE_P_PIC_URL = 'recharge_p_pic_url';
+    // 充值说明
+    const RECHARGE_HELP = 'recharge_help';
+
+    // 自提点设置
+    // 最少提现额度
+    const SHOP_MIN_MONEY = 'shop_min_money';
+    // 申请协议
+    const SHOP_AGREE_RULES = 'shop_agree_rules';
+    // 分销佣金类型 1、百分比 2、固定金额
+    const SHOP_RATIO_TYPE = 'shop_ratio_type';
+    // 分销佣金比例
+    const SHOP_RATIO = 'shop_ratio';
+
+    /**
+     * 分销设置组名
+     */
+    const SHARE_GROUP_NAME = 'share';
+    //店铺分销默认设置
+    const SHARE_STORE_DEFAULT_SETTING = 'share_store_default_setting';
+    //联盟分销默认设置
+    const SHARE_SAAS_DEFAULT_SETTING = 'share_saas_default_setting';
+    //店铺推荐人分销默认设置
+    const SHARE_SAAS_REFERRAL_DEFAULT_SETTING = 'share_saas_referral_default_setting';
+    //供货商推荐人分销默认设置
+    const SHARE_SAAS_SUPPLIER_REFERRAL_DEFAULT_SETTING = 'share_saas_supplier_referral_default_setting';
+    //消费返利分销默认设置
+    const SHARE_SELF_REBATE_DEFAULT_SETTING = 'share_self_rebate_default_setting';
+    /**
+     * 分销基础设置
+     */
+    const SHARE_BASIC_SETTING = 'share_basic_setting';
+    /**
+     * 分销拥挤设置
+     */
+    const SHARE_MONEY_SETTING = 'share_money_setting';
+    const INTEGRAL_RECHARGE_SHARE_MONEY_SETTING = 'integral_recharge_share_money_setting';
+
+    /**
+     * 多商户设置
+     */
+    const MCH_SETTING = 'mch_setting';
+    const MCH_ENTRY_RULES = 'mch_entry_rules';
+    const MCH_CASH_TYPE = 'mch_cash_type';
+
+    /**
+     * 团队分红
+     */
+    const TEAM_BONUS_SETTING = 'team_bonus_setting';
+
+    /**
+     * 圈子
+     */
+    const QUANZI_SETTING = 'quanzi_setting';
+
+    /**
+     * 送礼物
+     */
+    const GIVING_GIFTS_SETTING = 'givingGifts_setting';
+
+    /**
+     * 公排
+     */
+    const PUBLIC_RANKING_SETTING = 'publicRanking_setting';
+
+    /**
+     * 本地公排
+     */
+    const LOCAL_PUBLIC_RANKING_SETTING = 'local_publicRanking_setting';
+
+    /**
+     *  云台访问域名
+     */
+    const CLOUD_DOMAIN_NAME = 'http://yuncang.tianxin100.vip';
+
+    //支付宝同城配送
+    //选择的门店号
+    const ALIPAY_DELIVERY_SHOP_NO = 'alipay_delivery_shop_no_';
+    //选择的配送公司
+    const ALIPAY_DELIVERY_COMPANY = 'alipay_delivery_company_';
+
+    //新人专享活动商品
+    const ACTIVITY_NEW_USER_GOODS_CONF = 'activity_new_user_goods_conf';
+    //新人专享活动设置
+    const ACTIVITY_NEW_USER_CONF = 'activity_new_user_conf';
+
+    //砍价活动配置
+    const ACTIVITY_CUT_PRICE_CONF = 'activity_cut_price_conf';
+
+    //消费全返
+    const ACTIVITY_ORDER_REBATE_SELF = 'activity_order_rebate_self';
+
+    //发票配置
+    const INVOICE_CONF = 'invoice_conf';
+
+    //ERP配置
+    const ERP = 'erp';
+    const ERP_OPEN = 'erp_open';
+    const ERP_INIT_GOODS_SET_NUM = 'erp_init_goods_set_num';
+
+    //微信门店快送
+    const WASTORE = 'wastore';
+
+    //审核小程序专用商品
+    const ACTIVITY_MINI_AUDIT_GOODS = 'activity_mini_audit_goods';
+
+    //同城配送设置组名
+    const LOCAL_DELIVERY_GROUP_NAME = 'local';
+    const LOCAL_DELIVERY_SETTING = 'delivery_setting';
+
+    const MALL_STATUS = 'mall_status';
+    //腾讯地图key
+    const TENCENT_MAP_KEY = 'tencent_map_key';
+    //是否显示购物车页面会员价
+
+    const MEMBER_ID_LEN = 'member_id_len';
+    //会员id生成长度
+    const IS_SHOW_CART_LEVEL_PRICE = 'is_show_cart_level_price';
+    //是否显示风控规则
+    const IS_SHOW_RISK = 'is_show_risk';
+
+    //默认头像昵称
+    const DEFAULT_USER_INFO_SWITCH = 'DEFAULT_USER_INFO_SWITCH';
+    const DEFAULT_USER_NICKNAME = 'DEFAULT_USER_NICKNAME';
+    const DEFAULT_USER_PIC = 'DEFAULT_USER_PIC';
+
+    //地址识别
+    const KUAIDI100_SECRET_KEY = 'kuaidi100_secret_key';
+    const KUAIDI100_SECRET_CODE = 'kuaidi100_secret_code';
+    const KUAIDI100_SECRET_SIGN = 'kuaidi100_secret_sign';
+    const KUAIDI100_SECRET_SECRET = 'kuaidi100_secret_secret';
+    const KUAIDI100_USE_CHANGE = 'kuaidi100_use_change';
+    const KUAIDI100_SECRET_KEY_NEW = 'kuaidi100_secret_key_new';
+    const KUAIDI100_SECRET_SECRET_NEW = 'kuaidi100_secret_secret_new';
+    const CASH_SETTING = 'cash_setting';
+
+
+    //积分相关配置
+    const STORE_CARD_TIME = 'store_card_time';
+    const STORE_COUPON_TIME = 'store_coupon_time';
+    const STORE_INTEGRAL_TIME = 'store_integral_time';
+    const STORE_INTEGRAL_ORDER_COMMENT_NUM = 'store_integral_order_comment_num';
+
+
+    /**
+     * type radio 单选 text 文本 textarea 大文本
+     * checkbox 多选(默认数据为json,必填)
+     * date_picker 时间 number  数字
+     * image 图片
+     */
+    const OPTION_SETTING = [
+        'store' => [
+            'name' => '基础设置',
+            'list' => [
+                [
+                    'name' => self::STORE_NAME, // option name
+                    'text' => '商城名称', // 名称
+                    'type' => 'text', // 数据类型
+                    'required' => true, // 是否必填
+                    'default' => '', // 默认值
+                    'unit' => '' ,//单位
+                    'muted' => '', // 描述
+                    'title' => '', // 标题
+                    'select_list' => [] // 单选框选择内容
+                ],
+                [
+                    'name' => self::STORE_LOGO,
+                    'text' => '商城logo',
+                    'type' => 'image',
+                    'size' => '50*50',
+                    'required' => false,
+                    'default' => '',
+                    'unit' => ''
+                ],
+                [
+                    'name' => self::COORDINATE, // option name
+                    'text' => '商城坐标', // 名称
+                    'type' => 'coordinate', // 数据类型
+                    'required' => false, // 是否必填
+                    'default' => '', // 默认值
+                    'unit' => '' ,//单位
+                    'muted' => '', // 描述
+                    'title' => '', // 标题
+                    'select_list' => [] // 单选框选择内容
+                ],
+                [
+                    'name' => self::ADDRESS_INFO, // option name
+                    'text' => '商城地区', // 名称
+                    'type' => 'address_info', // 数据类型
+                    'required' => false, // 是否必填
+                    'default' => [
+                        'province_id' => '',
+                        'city_id' => '',
+                        'district_id' => ''
+                    ], // 默认值
+                    'unit' => '' ,//单位
+                    'muted' => '', // 描述
+                    'title' => '', // 标题
+                    'select_list' => [] // 单选框选择内容
+                ],
+                [
+                    'name' => self::ADDRESS, // option name
+                    'text' => '商城地址', // 名称
+                    'type' => 'text', // 数据类型
+                    'required' => false, // 是否必填
+                    'default' => '', // 默认值
+                    'unit' => '' ,//单位
+                    'muted' => '', // 描述
+                    'title' => '', // 标题
+                    'select_list' => [] // 单选框选择内容
+                ],
+                // [
+                //     'name' => self::STORE_LOGIN_FORCIBLY_BIND_MOBILE,
+                //     'text' => '登录后强制绑定手机号',
+                //     'type' => 'radio',
+                //     'required' => false,
+                //     'default' => 0,
+                // ],
+                [
+                    'name' => self::MALL_STATUS,
+                    'text' => '商城打烊',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '<span style="color: red;">注意:开启此项后商城将不能下单,请谨慎开启</span>', // 描述
+                ],
+//                [
+//                    'name' => self::STORE_LOGIN_USE_MOBILE,
+//                    'text' => '强制使用手机号登陆',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 1,
+//                    'muted' => '<span style="color: red;">注意:关闭此项会生成随机手机号,请谨慎关闭</span>', // 描述
+//                ],
+                [
+                    'name' => self::STORE_CONTACT_TEL,
+                    'text' => '联系电话',
+                    'type' => 'mobile',
+                    'required' => false,
+                    'default' => '',
+                ],
+                [
+                    'name' => self::STORE_OVER_DAY,
+                    'text' => '未支付订单超时时间',
+                    'type' => 'number',
+                    'required' => false,
+                    'default' => '1',
+                    'unit' => '天',
+                    'muted' => '注意:时间设置为0则表示不开启自动删除未支付订单功能(只在预约订单以及认养订单有效)'
+                ],
+                [
+                    'name' => self::STORE_DELIVERY_TIME,
+                    'text' => '收货时间',
+                    'type' => 'number',
+                    'required' => false,
+                    'default' => '1',
+                    'unit' => '天',
+                    'muted' => '从发货到自动确认收货的时间'
+                ],
+                [
+                    'name' => self::STORE_AFTER_SALE_TIME,
+                    'text' => '售后时间',
+                    'type' => 'number',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => '天',
+                    'muted' => '可以申请售后的时间,<span style="color: red;">注意:分销订单中的已完成订单,只有订单已确认收货,并且时间超过设置的售后天数之后才计入其中!</span>'
+                ],
+
+                // [
+                //     'name' => self::STORE_GOOD_NEGOTIABLE,
+                //     'text' => '商品面议联系方式',
+                //     'type' => 'checkbox',
+                //     'required' => false,
+                //     'default' => [
+                //         'contact'=> [
+                //             'text' => '客服',
+                //             'value' => 0
+                //         ],
+                //         'tel' => [
+                //             'text' => '联系电话',
+                //             'value' => 0
+                //         ],
+                //         'web_contact' => [
+                //             'text' => '外链客服',
+                //             'value' => 0
+                //         ]
+                //     ],
+                //     'muted' => '客服和外链客服 统一显示客服<br>默认支持客服;若二个都不勾选,则视为勾选客服'
+                // ],
+//                [
+//                    'name' => self::STORE_MOBILE_VERIFY,
+//                    'text' => '是否开启手机号验证',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 0,
+//                ],
+
+                [
+                    'name' => self::ERP_OPEN,
+                    'text' => '启用本地商品进销存',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '<span style="color: red;">开启后,当用户访问商品详情页面,库存会按照进销存里面的入库记录刷新商品库存,请谨慎操作。</span>'
+                ],
+                [
+                    'name' => self::ERP_INIT_GOODS_SET_NUM,
+                    'text' => '本地进销存拉取库存',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '<span style="color: red;">开启后,本地进销存拉取商品或本地添加商品时会会把库存拉入进销存系统。</span>'
+                ],
+                [
+                    'name' => self::IS_SHOW_RISK,
+                    'text' => '价格风控提醒',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '<span style="color: red;">开启后在后台上传编辑产品时结合系统营销活动计算产品大致利润防止平台亏本。</span>',
+                ]
+            ]
+        ],
+        //  'app' => [
+        //      'name' => 'app设置',
+        //      'list' => [
+        //         [
+        //             'name' => self::APP_DOWN_ANDROID,
+        //             'text' => 'app下载地址(Android)',
+        //             'type' => 'text',
+        //             'required' => false,
+        //             'default' => '',
+        //             'unit' => ''
+        //         ],
+        //         [
+        //             'name' => self::APP_DOWN_IOS,
+        //             'text' => 'app下载地址(IOS)',
+        //             'type' => 'text',
+        //             'required' => false,
+        //             'default' => '',
+        //             'unit' => ''
+        //         ],
+        //         [
+        //             'name' => self::STORE_CLIENT_PRIVACY_ID,
+        //             'text' => '客户端隐私政策',
+        //             'type' => 'select',
+        //             'required' => false,
+        //             'default' => 0,
+        //             'muted' => '关联服务中心下边的文章'
+        //         ],
+        //         [
+        //             'name' => self::STORE_CLIENT_SERVICE_ID,
+        //             'text' => '客户端用户服务协议',
+        //             'type' => 'select',
+        //             'required' => false,
+        //             'default' => 0,
+        //             'muted' => '关联服务中心下边的文章'
+        //         ]
+        //          [
+        //              'name' => self::STORE_APP_LOGO,
+        //              'text' => 'AppLogo',
+        //              'type' => 'image',
+        //              'size' => '50*50',
+        //              'required' => false,
+        //              'default' => '',
+        //              'unit' => ''
+        //          ],
+        //          [
+        //              'name' => self::STORE_APP_BG,
+        //              'text' => 'App背景图片',
+        //              'type' => 'image',
+        //              'size' => '50*50',
+        //              'required' => false,
+        //              'default' => '',
+        //              'unit' => ''
+        //          ],
+        //           [
+        //               'name' => self::APP_STORE_ANDROID,
+        //               'text' => '商城端app包上传(Android)',
+        //               'type' => 'file',
+        //               'required' => false,
+        //               'default' => '',
+        //               'unit' => ''
+        //           ],
+
+        //          [
+        //              'name' => self::APP_STORE_IOS,
+        //              'text' => '商城端app下载地址(Ios)',
+        //              'type' => 'text',
+        //              'required' => false,
+        //              'default' => '',
+        //              'unit' => ''
+        //          ],
+        //      ]
+        //  ],
+        'wechat' => [
+            'name' => '微信设置',
+            'list' => [
+                [
+                    'name' => self::WECHAT_IS_SHENHE,
+                    'text' => '是否开启微信审核模式',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => ''
+                ],
+                [
+                    'name' => self::WECHAT_ALI_IS_SHENHE,
+                    'text' => '是否开启支付宝审核模式',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => '',
+                    //'muted' => '注意:该功能需要 ->配合开启审核后使用'
+                    'muted' => ''
+                ],
+                [
+                    'name' => self::COMPONENT_ALI_IS_SHENHE,
+                    'text' => '是否开启支付宝模板审核模式',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => '',
+                    'muted' => '注意:该功能需要 ->配合开启支付宝模板审核模式后使用'
+                ],
+//                [
+//                    'name' => self::WECHAT_AUTO_ADDRESS_STATUS,
+//                    'text' => '微信一键获取地址',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 0,
+//                    'unit' => ''
+//                ],
+                [
+                    'name' => self::WECHAT_IS_OFFICIAL_ACCOUNT,
+                    'text' => '关联公众号组件',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => '',
+                    'muted' => '注意:该功能需要 ->微信小程序后台->设置->接口设置 开启并设置关联(同一主体下)的公众号'
+                ],
+//                [
+//                    'name' => self::WECHAT_LOGIN_TOGGLE,
+//                    'text' => '微信使用短信验证码登陆',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 0,
+//                    'muted' => '开启后,在微信小程序中强制使用短信验证码登录'
+//                ],
+//                [
+//                    'name' => self::WECHAT_LOGIN_TOGGLE_ARTICLE,
+//                    'text' => '审核页面文章',
+//                    'type' => 'select',
+//                    'required' => false,
+//                    'default' => '',
+//                ],
+//                [
+//                    'name' => self::ACTIVITY_MINI_AUDIT_GOODS,
+//                    'text' => '审核小程序专用商品',
+//                    'type' => 'text',//'select_goods',
+//                    'required' => false,
+//                    'default' => '',
+//                ],
+
+            ]
+        ],
+        'display' => [
+            'name' => '显示设置',
+            'list' => [
+                [
+                    'name' => self::DISPLAY_IS_COMMENT,
+                    'text' => '商城评价开关',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 1,
+                    'unit' => ''
+                ],
+//                [
+//                    'name' => self::STORE_LANGUAGE,
+//                    'text' => '语言选择',
+//                    'type' => 'language',
+//                    'required' => false,
+//                    'default' => 'zh-CN',
+//                ],
+                [
+                    'name' => self::CLIENT_LOADING_LOGO,
+                    'text' => '客户端加载logo',
+                    'type' => 'image',
+                    'size' => '50*50',
+                    'required' => false,
+                    'default' => '',
+                    'unit' => ''
+                ],
+                [
+                    'name' => self::INSURANCE_BG_IMG,
+                    'text' => '保单查询页背景图',
+                    'type' => 'image',
+                    'size' => '540*1170',
+                    'required' => false,
+                    'default' => '',
+                    'unit' => ''
+                ],
+                [
+                    'name' => self::STORE_CLIENT_PRIVACY_ID,
+                    'text' => '客户端隐私政策',
+                    'type' => 'select',
+                    'required' => false,
+                    'default' => '',
+                ],
+                [
+                    'name' => self::STORE_CLIENT_SERVICE_ID,
+                    'text' => '客户端服务协议',
+                    'type' => 'select',
+                    'required' => false,
+                    'default' => '',
+                ],
+                [
+                    'name' => self::WEB_STORE_SHARE_TITLE,
+                    'text' => '商城分享标题',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'unit' => ''
+                ],
+                [
+                    'name' => self::WEB_STORE_SHARE_LOG,
+                    'text' => '商城分享缩略图',
+                    'type' => 'image',
+                    'size' => '500*400',
+                    'required' => false,
+                    'default' => '',
+                    'unit' => ''
+                ],
+                [
+                    'name' => self::WEB_STORE_SHARE_DESC,
+                    'text' => '商城分享描述',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'unit' => ''
+                ],
+//                [
+//                    'name' => self::IS_PASSWORD_LOGIN,
+//                    'text' => '是否使用手机号+密码登录',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 0,
+//                    'muted' => '', // 描述
+//                ],
+//                [
+//                    'name' => self::IS_PASSWORD_LOGIN_PHONE_VERIFY,
+//                    'text' => '密码注册是否验证手机号',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 0,
+//                    'muted' => '', // 描述
+//                ],
+//                [
+//                    'name' => self::WEB_KF_WECHAT_IMG,
+//                    'text' => '客服微信图',
+//                    'type' => 'image',
+//                    'size' => '500*500',
+//                    'required' => false,
+//                    'default' => '',
+//                    'unit' => ''
+//                ],
+                [
+                    'name' => self::IS_SHOW_CART_LEVEL_PRICE,
+                    'text' => '购物车页面会员价',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '',
+                ],
+                // [
+                //     'name' => self::MEMBER_ID_LEN,
+                //     'text' => '会员ID生成长度',
+                //     'type' => 'text',
+                //     'required' => false,
+                //     'default' => 0,
+                //     'muted' => '备注:举例:如果设置为4,系统将第一个会员1D生成1001,默认是O将第一个会员生成1D为1',
+                // ],
+            ]
+        ],
+//        'alipay' => [
+//            'name' => '支付宝设置',
+//            'list' => [
+//                [
+//                    'name' => self::ALIPAY_LOGIN_TOGGLE,
+//                    'text' => '支付宝使用短信验证码登陆',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => 0,
+//                    'muted' => '开启后,在支付宝小程序中强制使用短信验证码登录'
+//                ]
+//            ]
+//        ],
+        'kuaidi100' => [
+            'name' => '地址识别',
+            'list' => [
+                [
+                    'name' => self::KUAIDI100_SECRET_KEY,
+                    'text' => '(废弃)快递100 secret_key',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ''
+                ],
+                [
+                    'name' => self::KUAIDI100_SECRET_SECRET,
+                    'text' => '(废弃)快递100 secret_secret',
+
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ''
+                ],
+                [
+                    'name' => self::KUAIDI100_SECRET_SIGN,
+                    'text' => '(废弃)快递100 secret_sign',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ''
+                ],
+                [
+                    'name' => self::KUAIDI100_SECRET_CODE,
+                    'text' => '(废弃)快递100 secret_code',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => '地址解析-快递物流姓名、电话、地址自动识别</br><a target="_blank" href="https://cloud.kuaidi100.com/platform/productdetail/32164366860.shtml">快递100应用购买链接</a>&nbsp;&nbsp;&nbsp;&nbsp;<a target="_blank" href="https://market.aliyun.com/products/57124001/cmapi020020.html?spm=5176.2020520132.101.4.328472181FZ812#sku=yuncode14020000013">图片识别阿里云接口开通地址(<span style="color: #f00">需要配置“系统-阿里云OCR配置”<span>)</a>'
+                ],
+                [
+                    'name' => self::KUAIDI100_USE_CHANGE,
+                    'text' => '是否启用新版本',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '请先配置好快递100新版本的API key和secret,再启用新版本'
+                ],
+                [
+                    'name' => self::KUAIDI100_SECRET_KEY_NEW,
+                    'text' => '新版本快递100API key',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ''
+                ],
+                [
+                    'name' => self::KUAIDI100_SECRET_SECRET_NEW,
+                    'text' => '新版本快递100API secret',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => '地址解析-快递物流姓名、电话、地址自动识别</br><a target="_blank" href="https://api.kuaidi100.com/login/?redirect=%2F%2Fapi.kuaidi100.com%2Fmanager%2Fv2%2Faddress-resolution%2Foverview">快递100企业管理后台</a>'
+                ],
+            ]
+        ],
+        'reg' => [
+            'name' => '注册设置',
+            'list' => [
+                [
+                    'name' => self::STORE_MOBILE_VERIFY,
+                    'text' => '下单地址校验手机号',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                ],
+                [
+                    'name' => self::IS_PASSWORD_LOGIN,
+                    'text' => '使用手机号+密码登录',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '', // 描述
+                ],
+                [
+                    'name' => self::IS_PASSWORD_LOGIN_PHONE_VERIFY,
+                    'text' => '密码注册验证手机号',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '', // 描述
+                ],
+                [
+                    'name' => self::STORE_LOGIN_USE_MOBILE,
+                    'text' => '强制使用手机号登陆',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 1,
+                    'muted' => '<span style="color: red;">注意:关闭此项会生成随机手机号,请谨慎关闭</span>', // 描述
+                ],
+                [
+                    'name' => self::WECHAT_LOGIN_TOGGLE,
+                    'text' => '微信使用短信验证码登陆',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '开启后,在微信小程序中强制使用短信验证码登录'
+                ],
+                [
+                    'name' => self::DEFAULT_USER_INFO_SWITCH,
+                    'text' => '开启默认头像昵称',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 0,
+                    'muted' => '开启后,在微信小程序中强制使用短信验证码登录'
+                ],
+                [
+                    'name' => self::DEFAULT_USER_NICKNAME,
+                    'text' => '默认昵称',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '默认昵称',
+                    'muted' => ''
+                ],
+                [
+                    'name' => self::DEFAULT_USER_PIC,
+                    'text' => '默认头像',
+                    'type' => 'image',
+                    'size' => '500*500',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ''
+                ],
+            ]
+        ],
+        'pay' => [
+            'name' => '支付配送',
+            'list' => [
+                [
+                    'name' => self::STORE_ALI_EXPRESS_APP_CODE,
+                    'text' => '阿里云物流APP_CODE',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => "<p>申请地址:<a target='_blank' href='https://market.aliyun.com/products/57126001/cmapi023201.html'>快递物流查询</a></p>"
+                ],
+//                [
+//                    'name' => self::STORE_KDNIAO_API_FREE,
+//                    'text' => '使用快递鸟免费接口',
+//                    'type' => 'radio',
+//                    'required' => false,
+//                    'default' => '1',
+//                    'muted' => "<p style=''>免费接口每日调用次数限制不超过500次</p>"
+//                ],
+//                [
+//                    'name' => self::STORE_KDNIAO_MCH_ID,
+//                    'text' => '快递鸟商户ID',
+//                    'type' => 'text',
+//                    'required' => false,
+//                    'default' => ''
+//                ],
+//                [
+//                    'name' => self::STORE_KDNIAO_API_KEY,
+//                    'text' => '快递鸟API KEY',
+//                    'type' => 'text',
+//                    'required' => false,
+//                    'default' => ''
+//                ],
+                [
+                    'name' => self::STORE_SEND_TYPE,
+                    'text' => '发货方式',
+                    'type' => 'checkbox',
+                    'required' => false,
+                    'default' => [
+                        'express'=> [
+                            'text' => '快递',
+                            'value' => 1
+                        ],
+                        'shop' => [
+                            'text' => '自提',
+                            'value' => 1
+                        ],
+                        'delivery' => [
+                            'text' => '同城配送',
+                            'value' => 1
+                        ],
+                    ],
+//                    'muted' => "<p style='padding-left:144px;'>开启同城配送,需提前<a href='/admin/#/setting/delivery'>设置配送设置</a></p>"
+                ],
+
+                /* begin 2023/07/03 09:53:10  WPing丶 */
+                [
+                    'name' => self::STORE_LOCAL_TYPE,
+                    'text' => '同城配送方式',
+                    'type' => 'radio',
+                    'required' => false,
+                    'select_list' => [
+                        'maiyatian'=> [
+                            'text' => '麦芽田',
+                            'value' => 0
+                        ],
+                        'aggregate' => [
+                            'text' => '聚合配送',
+                            'value' => 0
+                        ],
+                        'self' => [
+                            'text' => '平台自配',
+                            'value' => 0
+                        ],
+                        'self_store' => [
+                            'text' => '商城自配',
+                            'value' => 0
+                        ],
+                        'keloop' => [
+                            'text' => '快跑者配送',
+                            'value' => 0
+                        ],
+                    ],
+                    // 'muted' => "<p style='padding-left:144px;'>开启同城配送,需提前<a href='/admin/#/setting/delivery'>设置配送设置</a></p>"
+                ],
+                /* end */
+                [
+                    'name' => self::STORE_WX_LOGISTICS_TYPE,
+                    'text' => '微信小程序发货方式',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 2,
+                    'select_list' => [
+                        '1'=> [
+                            'text' => '统一为快递',
+                            'value' => 0
+                        ],
+                        '2' => [
+                            'text' => '统一为同城配送',
+                            'value' => 0
+                        ],
+                        '3' => [
+                            'text' => '统一为虚拟发货',
+                            'value' => 0
+                        ],
+                        '4' => [
+                            'text' => '统一为用户自提',
+                            'value' => 0
+                        ],
+                        '100' => [
+                            'text' => '使用订单发货方式',
+                            'value' => 0
+                        ],
+                    ],
+                    'muted' => "<p style=''>用于同步上传微信小程序后台发货方式。<span style='color: red;'>注意:小程序快递发货最长10天收货,需要商城设置里售后时间改为超过10天</span></p>"
+                ],
+                //DIY_EXPRESS_NAME
+                //DIY_SHOP_NAME
+                //DIY_DELIVERY_NAME
+                [
+                    'name' => self::DIY_EXPRESS_NAME,
+                    'text' => '自定义快递配送名称',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ""
+                ],
+                [
+                    'name' => self::DIY_SHOP_NAME,
+                    'text' => '自定义自提配送名称',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ""
+                ],
+                [
+                    'name' => self::DIY_DELIVERY_NAME,
+                    'text' => '自定义同城配送名称',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => ""
+                ],
+                [
+                    'name' => self::STORE_PAYMENT,
+                    'text' => '支付方式',
+                    'type' => 'checkbox',
+                    'required' => false,
+                    'default' => [
+                        'wechat'=> [
+                            'text' => '微信支付',
+                            'value' => 1
+                        ],
+                        Order::PAY_TYPE_KEY_WX_B2B => [
+                            'text' => Order::PAY_TYPE_NAME_WX_B2B,
+                            'value' => 0
+                        ],
+                        'alipay' => [
+                            'text' => '支付宝支付',
+                            'value' => 1
+                        ],
+                        'huodao' => [
+                            'text' => '货到付款',
+                            'value' => 1
+                        ],
+                        'friend' => [
+                            'text' => '朋友代付',
+                            'value' => 1,
+                        ],
+                        Order::PAY_TYPE_KEY_OFFLINE => [
+                            'text' => Order::PAY_TYPE_NAME_OFFLINE,
+                            'value' => 0,
+                        ],
+                        Order::PAY_TYPE_KEY_MONTH => [
+                            'text' => Order::PAY_TYPE_NAME_MONTH,
+                            'value' => 0,
+                        ],
+                        Order::PAY_TYPE_KEY_ADAPAY_WX => [
+                            'text' => Order::PAY_TYPE_NAME_ADAPAY_WX,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_KEY_ADAPAY_ALIPAY => [
+                            'text' => Order::PAY_TYPE_NAME_ADAPAY_ALIPAY,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_KEY_ADAPAY_QUICKPAY_FRONTPAY => [
+                            'text' => Order::PAY_TYPE_NAME_ADAPAY_QUICKPAY_FRONTPAY,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_KEY_HUIFU_V2_JSPAY_WX => [
+                            'text' => Order::PAY_TYPE_NAME_HUIFU_V2_JSPAY_WX,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_KEY_YUNST_WECHAT_PAY => [
+                            'text' => Order::PAY_TYPE_NAME_YUNST_WECHAT_PAY,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_KEY_ALLINPAY_WX => [
+                            'text' => Order::PAY_TYPE_NAME_ALLINPAY_WX,
+                            'value' => 0
+                        ],
+                    ],
+                ],
+                [
+                    'name' => self::STORE_PAYMENT_DEFAULT,
+                    'text' => '默认支付方式',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 'wechat',
+                    'select_list' => [
+                        Order::PAY_TYPE_WECHAT=> [
+                            'text' => '微信支付',
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_WX_B2B => [
+                            'text' => Order::PAY_TYPE_NAME_WX_B2B,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_ALI => [
+                            'text' => '支付宝支付',
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_COD => [
+                            'text' => '货到付款',
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_OFFLINE => [
+                            'text' => Order::PAY_TYPE_NAME_OFFLINE,
+                            'value' => 0,
+                        ],
+                        Order::PAY_TYPE_MONTH => [
+                            'text' => Order::PAY_TYPE_NAME_MONTH,
+                            'value' => 0,
+                        ],
+                        Order::PAY_TYPE_ADAPAY_WX => [
+                            'text' => Order::PAY_TYPE_NAME_ADAPAY_WX,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_ADAPAY_ALIPAY => [
+                            'text' => Order::PAY_TYPE_NAME_ADAPAY_ALIPAY,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_ADAPAY_QUICKPAY_FRONTPAY => [
+                            'text' => Order::PAY_TYPE_NAME_ADAPAY_QUICKPAY_FRONTPAY,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_HUIFU_V2_JSPAY_WX => [
+                            'text' => Order::PAY_TYPE_NAME_HUIFU_V2_JSPAY_WX,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_YUNST_WECHAT_PAY => [
+                            'text' => Order::PAY_TYPE_NAME_YUNST_WECHAT_PAY,
+                            'value' => 0
+                        ],
+                        Order::PAY_TYPE_ALLINPAY_WX => [
+                            'text' => Order::PAY_TYPE_NAME_ALLINPAY_WX,
+                            'value' => 0
+                        ],
+                    ],
+                ],
+                [
+                    'name' => self::TENCENT_MAP_KEY,
+                    'text' => '腾讯地图key',
+                    'type' => 'text',
+                    'required' => false,
+                    'muted' => '<span style="color: red;">配置了参数后,前端订单详情会显示地图。</span>',
+                    'default' => ''
+                ],
+            ]
+        ],
+        'gift' => [
+            'name' => '赠送设置',
+            'list' => [
+                [
+                    'name' => self::SEND_INTEGRAL_PROFIT,
+                    'text' => '积分赠送比例',
+                    'type' => 'number',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => '%',
+                    'muted' => '积分赠送规则为 商品支付金额 × 积分赠送比例 = 赠送积分 (向下取整),售后完成后发放'
+                ],
+                [
+                    'name' => self::STORE_INTEGRAL,
+                    'text' => '会员积分',
+                    'type' => 'number',
+                    'required' => true,
+                    'default' => 100,
+                    'unit' => '积分抵扣1元',
+                ],
+                [
+                    'name' => self::STORE_INTEGRAL_NAME,
+                    'text' => '自定义积分名称',
+                    'type' => 'text',
+                    'required' => false,
+                    'default' => '积分',
+                ],
+                [
+                    'name' => self::STORE_INTEGRATION,
+                    'text' => '积分使用规则',
+                    'type' => 'textarea',
+                    'required' => false,
+                    'default' => '',
+                    'muted' => '积分使用规则用于用户结算页说明显示,为了更好体验字数最好不要超过80字'
+                ],
+                [
+                    'name' => self::STORE_INTEGRAL_TIME,
+                    'text' => '赠送积分时间',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 2,
+                    'select_list' => [
+                        '1'=> [
+                            'text' => '支付赠送',
+                            'value' => 0
+                        ],
+                        '2' => [
+                            'text' => '过售后期赠送',
+                            'value' => 0
+                        ],
+                    ],
+                    'muted' => '<span style="color: red;">备注:用户购买带积分赠送的普通商品时,购买商品订单状态达到响应状态时赠送积分</span>'
+                ],
+                [
+                    'name' => self::STORE_COUPON_TIME,
+                    'text' => '赠送优惠券时间',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 2,
+                    'select_list' => [
+                        '1'=> [
+                            'text' => '支付赠送',
+                            'value' => 0
+                        ],
+                        '2' => [
+                            'text' => '过售后期赠送',
+                            'value' => 0
+                        ],
+                    ],
+                    'muted' => '<span style="color: red;">备注:用户购买带优惠券赠送的普通商品时,购买商品订单状态达到响应状态时赠送优惠券</span>'
+                ],
+                [
+                    'name' => self::STORE_CARD_TIME,
+                    'text' => '赠送卡券时间',
+                    'type' => 'radio',
+                    'required' => false,
+                    'default' => 2,
+                    'select_list' => [
+                        '1'=> [
+                            'text' => '支付赠送',
+                            'value' => 0
+                        ],
+                        '2' => [
+                            'text' => '过售后期赠送',
+                            'value' => 0
+                        ],
+                    ],
+                    'muted' => '<span style="color: red;">备注:用户购买带卡券赠送的普通商品时,购买商品订单状态达到响应状态时赠送卡券</span>'
+                ],
+                [
+                    'name' => self::STORE_INTEGRAL_ORDER_COMMENT_NUM,
+                    'text' => '订单评价送积分',
+                    'type' => 'number',
+                    'required' => false,
+                    'default' => 0,
+                    'unit' => '',
+                    'muted' => ''
+                ],
+            ]
+        ],
+    ];
+
+    /**
+     * 获取配置
+     * @return array
+     * @author Syan mzsongyan@gmail.com
+     * @date 2022-09-05
+     */
+    public static function getOptionSetting()
+    {
+        $store = Store::findOne(get_store_id());
+        $options = self::OPTION_SETTING;
+        foreach ($options as $key => &$value) {
+            if ($key == 'wechat') {
+                foreach ($value['list'] as $k => $v) {
+                    if (\Yii::$app->isSaas() === false && $v['name'] == self::COMPONENT_ALI_IS_SHENHE) {
+                        unset($value['list'][$k]);
+                    }
+                }
+            }
+            //独立部署版本显示不使用手机号登陆
+            if ($key == 'pay') {
+                foreach ($value['list'] as $k => $v) {
+                    if ($store && $store->business_model == 2 && $v['name'] == self::STORE_LOCAL_TYPE) {
+                        unset($value['list'][$k]['select_list']['aggregate']);
+                    }
+                    if ($store && $store->business_model == 2 && $v['name'] == self::STORE_SEND_TYPE) {
+                        unset($value['list'][$k]['default']['shop']);
+                    }
+                    if ($store && $v['name'] == self::STORE_PAYMENT) {
+                        if ($store->business_model == 2) {
+                            $arr = ['wechat', 'alipay', Order::PAY_TYPE_KEY_YUNST_WECHAT_PAY];
+                            foreach ($v['default'] as $pay_type => $item) {
+                                if (!in_array($pay_type, $arr)) {
+                                    unset($value['list'][$k]['default'][$pay_type]);
+                                }
+                            }
+                        }
+                        if (\Yii::$app->prod_is_dandianpu()) {
+                            unset($value['list'][$k]['default'][Order::PAY_TYPE_KEY_WX_B2B]);
+                        }
+                    }
+                    if ($v['name'] == self::STORE_PAYMENT) {
+                        foreach ($v['default'] as $pay_type => $item) {
+                            if (!\Yii::$app->prod_is_duli()) {
+                                unset($value['list'][$k]['default'][Order::PAY_TYPE_KEY_ALLINPAY_WX]);
+                            }
+                        }
+                    }
+                }
+            }
+            if ($key == 'reg') {
+                foreach ($value['list'] as $k => $v) {
+                    if (\Yii::$app->isSaas() && $v['name'] == self::STORE_LOGIN_USE_MOBILE) {
+                        unset($value['list'][$k]);
+                    }
+                    if ($v['name'] == self::DEFAULT_USER_PIC) {
+                        if(RUN_MODE == 'fpm'){
+                            $value['list'][$k]['default'] = \Yii::$app->request->hostInfo . \Yii::$app->request->baseUrl . '/web/v1/statics/clientImg/default_wechat_avatar.jpeg';
+                        }
+                        //兼容旧数据
+                        $isOpenDefault = Option::get(OptionSetting::DEFAULT_USER_INFO_SWITCH, get_store_id())['value'];
+                        if(is_null($isOpenDefault)){
+                            $default_user_info_arr = self::default_user_info_arr();
+                            if($default_user_info_arr){
+                                foreach ($value['list'] as $kk => $vv) {
+                                    if ($vv['name'] == self::DEFAULT_USER_PIC) {
+                                        $value['list'][$kk]['default'] = $default_user_info_arr['default_user_pic'];
+                                    }
+                                    if ($vv['name'] == self::DEFAULT_USER_NICKNAME) {
+                                        $value['list'][$kk]['default'] = $default_user_info_arr['default_user_nickname'];
+                                    }
+                                    if ($vv['name'] == self::DEFAULT_USER_INFO_SWITCH) {
+                                        $value['list'][$kk]['default'] = $default_user_info_arr['isOpenDefault'];
+                                    }
+                                }
+                            }
+                            
+                        }
+                    }
+                }
+            }
+        }
+
+        return $options;
+    }
+
+    public static function getCloudDomainName() {
+        return Option::get('cloud_domain_name', 0, 'cloud', 'http://yuncang.tianxin100.vip')['value'];
+    }
+
+    public static function default_user_info_arr() {
+        $isOpenDefault = Option::get(OptionSetting::DEFAULT_USER_INFO_SWITCH, get_store_id())['value'];
+        if(!is_null($isOpenDefault)){
+            $default_user_info_arr = [
+                'isOpenDefault' => (int)$isOpenDefault,
+                'default_user_nickname' => Option::get(OptionSetting::DEFAULT_USER_NICKNAME, get_store_id())['value'],
+                'default_user_pic' => Option::get(OptionSetting::DEFAULT_USER_PIC, get_store_id())['value'],
+            ];
+        }else{
+            //兼容旧数据
+            $defaultUserInfo = Option::get('default_user_info', get_store_id(), 'store')['value'];
+            $default_user_info_arr = \yii\helpers\Json::decode($defaultUserInfo);
+            if($default_user_info_arr){
+                $default_user_info_arr['isOpenDefault'] = (int)$default_user_info_arr['isOpenDefault'];
+            }
+        }
+        if (RUN_MODE == 'fpm' && $default_user_info_arr['isOpenDefault'] && empty($default_user_info_arr['default_user_pic'])) {
+            $default_user_info_arr['default_user_pic'] = \Yii::$app->request->hostInfo . \Yii::$app->request->baseUrl . '/web/v1/statics/clientImg/default_wechat_avatar.jpeg';
+        }
+        return $default_user_info_arr;
+    }
+}

+ 1033 - 0
constants/PickLink.php

@@ -0,0 +1,1033 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+/*
+ * @Author: your name
+ * @Date: 2021-03-02 09:50:20
+ * @LastEditTime: 2021-05-21 11:56:14
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \admin_php\constants\PickLink.php
+ */
+
+
+namespace app\constants;
+
+use app\models\NewDiyTemplate;
+use app\models\Option;
+use app\models\SaasCategory;
+use app\models\Store;
+use yii\helpers\Json;
+
+class PickLink
+{
+    const LIST =  [
+        [
+            'name' => '平台首页',
+            'link' => '/pages/home/home',
+            'open_type' => "switchtab",
+            'params' => []
+        ],
+        [
+            'name' => '购物车',
+            'link' => '/pages/shoppingcart/shoppingcart',
+            'open_type' => "switchtab",
+            'params' => []
+        ],
+        [
+            'name' => '联盟会员卡',
+            'link' => '/user/member/saas_member',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '领券中心',
+            'link' => '/other/coupon_center/coupon_center',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+//        [
+//            'name' => '联盟佣金',
+//            'link' => '/pages/union/user-account',
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+
+        [
+            'name' => '足迹',
+            'link' => '/user/history/history',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+
+        [
+            'name' => '收货地址管理',
+            'link' => '/user/my/addressmanage',
+            'open_type' => "navigate",
+            'params' => []
+        ],
+
+        [
+            'name' => '店铺列表',
+            'link' => '/union/class-search/index',
+            'open_type' => "navigate",
+            'params' => [
+                [
+                    'key' => "common_cat_id",
+                    'value' => "",
+                    'desc' => "商城分类ID",
+                    'type' => "select",
+                    'options' => [],
+		            'label_name' => "商城分类"
+                ],
+		        [
+                    'key' => "cat_name",
+                    'value' => "",
+                    'label_name' => "商城分类名称",
+                    'hidden' => true
+                ],
+            ]
+        ],
+        [
+            'name' => '用户中心',
+            'link' => '/pages/my/my',
+            'open_type' => "switchtab",
+            'params' => []
+        ],
+        [
+            'name' => "所有订单",
+            'link' => "/order/order/order",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "待付款订单",
+            'link' => "/order/order/order?status=0",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "待发货订单",
+            'link' => "/order/order/order?status=1",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "待收货订单",
+            'link' => "/order/order/order?status=2",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => "已完成订单",
+            'link' => "/order/order/order?status=3",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+        [
+            'name' => '一键拨号',
+            'link' => 'tel',
+            'open_type' => 'tel',
+            'params' => [
+                [
+                    'key' => "tel",
+                    'value' => "",
+                    'desc' => "请填写联系电话"
+                ]
+            ],
+        ],
+        [
+            'name' => '小程序',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '客服',
+            'link' => 'contact',
+            'open_type' => 'contact',
+            'params' => []
+        ],
+        [
+            'name' => '业务员',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=yewuyuan",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+//        [
+//            'name' => '申请店铺',
+//            'link' => '/salesman/salesman/applyShop',
+//            'open_type' => 'navigate',
+//            'params' => [],
+//        ],
+//        [
+//            'name' => '代理中心',
+//            'link' => '/salesman/salesman/agencyCenter',
+//            'open_type' => 'navigate',
+//            'params' => [],
+//        ],
+//        [
+//            'name' => '商城后台',
+//            'link' => '/admin/home/home',
+//            'open_type' => 'navigate',
+//            'params' => [],
+//        ],
+        [
+            'name' => '我的卡券',
+            'link' => '/user/write_off_card/write_off_card',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+	    [
+            'name' => '跳转店铺',
+            'link' => 'store',
+            'open_type' => 'store',
+            'params' => [
+                [
+                    'key' => "store_id",
+                    'value' => "",
+                    'desc' => "跳转店铺首页",
+                    'type' => "select",
+                    'options' => [],
+		            'label_name' => "选择店铺"
+                ],
+            ],
+        ],
+	    [
+            'name' => "我的积分",
+            'link' => "/face-pay/face-pay/storePoints",
+            'open_type' => "navigate",
+            'params' => []
+        ],
+//        [
+//            'name' => "分销中心",
+//            'link' => "/user/share/index",
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+//        [
+//            'name' => "佣金统计",
+//            'link' => "/user/brokerageCharges/index",
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+//	    [
+//            'name' => "消费返利",
+//            'link' => "/user/rebate/index",
+//            'open_type' => "navigate",
+//            'params' => []
+//        ],
+        [
+            'name' => '分账账户',
+            'link' => '/user/share/share-account',
+            'open_type' => 'navigate',
+            'params' => [],
+        ],
+        [
+            'name' => '服务端小程序',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "pages/index/index",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '店铺管理',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=dianpu",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '区域管理员',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=daili",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '推广代理',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=tuiguang",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '云仓批发',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=1&param=yuncang",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '供货商申请',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=purchase",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '云仓选品',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=2&param=yuncang",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '联盟中心',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=fenxiao",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '代理佣金',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=1&param=yongjin",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ],
+        [
+            'name' => '司机中心',
+            'link' => 'wxapp',
+            'open_type' => 'wxapp',
+            'is_merchant' => 1,
+            'params' => [
+                [
+                    'key' => "appid",
+                    'value' => "",
+                    'desc' => "请填写小程序appid"
+                ],
+                [
+                    'key' => "path",
+                    'value' => "type=0&param=driver",
+                    'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                ],
+            ],
+        ]
+
+    ];
+    public static function getNewLink()
+    {
+        try {
+            $groupDiyPage = [];
+            $template = NewDiyTemplate::find()->where([
+                'store_id' => -1,
+                'is_index' => 0,
+                'is_delete' => 0,
+                'name' => 'DIY',
+            ])->all();
+
+            foreach($template as $item) {
+                $info = Json::decode($item->template);
+                $groupDiyPage[] = [
+                    'name' => $info['page_name'],
+                    'link' => "/pages/diy/diy?id=".$item->id,
+                    'id' => $item->id,
+                    'open_type' => "navigate",
+                    'params' => []
+                ];
+            }
+
+            $link = [
+                'name' => '商城页面',
+                'icon' => 'shop',
+                'child' => [
+                    [
+                        'name' => 'DIY页面',
+                        'list' => $groupDiyPage,
+                        'type' => 'diy-page',
+                    ],
+                    [
+                        'name' => '商城链接',
+                        'child' => [
+                            [
+                                'name' => '基础链接',
+                                'list' => [
+                                    [
+                                        'name' => '平台首页',
+                                        'link' => '/pages/home/home',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '购物车',
+                                        'link' => '/pages/shoppingcart/shoppingcart',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '用户中心',
+                                        'link' => '/pages/my/my',
+                                        'open_type' => "switchtab",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '个人中心',
+                                'list' => [
+                                    [
+                                        'name' => '足迹',
+                                        'link' => '/user/history/history',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '收货地址管理',
+                                        'link' => '/user/my/addressmanage',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "所有订单",
+                                        'link' => "/order/order/order",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "待付款订单",
+                                        'link' => "/order/order/order?status=0",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "待发货订单",
+                                        'link' => "/order/order/order?status=1",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "待收货订单",
+                                        'link' => "/order/order/order?status=2",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "已完成订单",
+                                        'link' => "/order/order/order?status=3",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '一键拨号',
+                                        'link' => 'tel',
+                                        'open_type' => 'tel',
+                                        'params' => [
+                                            [
+                                                'key' => "tel",
+                                                'value' => "",
+                                                'desc' => "请填写联系电话"
+                                            ]
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '小程序',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '客服',
+                                        'link' => 'contact',
+                                        'open_type' => 'contact',
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "店铺积分",
+                                        'link' => "/face-pay/face-pay/storePoints",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "店铺收藏",
+                                        'link' => "/user/collection/collection",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => "核销员中心",
+                                        'link' => "/md_admin/staff-center/staff",
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+//                                    [
+//                                        'name' => "分账账户",
+//                                        'link' => "/user/share/share-account",
+//                                        'open_type' => "navigate",
+//                                        'params' => []
+//                                    ]
+                                ],
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '应用',
+                        'child' => [
+                            [
+                                'name' => '优惠券',
+                                'list' => [
+
+                                    [
+                                        'name' => '领券中心',
+                                        'link' => '/pages/coupon_center/coupon_center',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '卡券',
+                                'list' => [
+                                    [
+                                        'name' => '联盟会员卡',
+                                        'link' => '/user/member/saas_member',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '我的卡券',
+                                        'link' => '/user/write_off_card/write_off_card',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '积分商城',
+                                'list' => [
+                                    [
+                                        'name' => '积分首页',
+                                        'link' => '/marketing/integral/index/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '我的兑换',
+                                        'link' => '/marketing/integral/my/record',
+                                        'open_type' => 'navigate',
+                                        'params' => [],
+                                    ]
+                                ],
+                            ],
+                            [
+                                'name' => '商盟活动',
+                                'list' => [
+                                    [
+                                        'name' => '商盟拼团',
+                                        'link' => '/marketing/other/pt/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '我的拼团',
+                                        'link' => '/marketing/other/pt/order/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '商盟砍价',
+                                        'link' => '/marketing/other/bargain/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '我的砍价',
+                                        'link' => '/marketing/other/bargain/order/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                    [
+                                        'name' => '商盟秒杀',
+                                        'link' => '/marketing/other/seckill/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],[
+                                        'name' => '新人专享',
+                                        'link' => '/marketing/other/newUser/list/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ],
+                                ],
+                            ],
+                            [
+                                'name' => '分红中心',
+                                'list' => [
+                                    [
+                                        'name' => '分红中心',
+                                        'link' => '/dividendCenter/index/index',
+                                        'open_type' => "navigate",
+                                        'params' => []
+                                    ]
+                                ],
+                            ],
+                        ],
+                    ],
+                    [
+                        'name' => '服务端功能',
+                        'type' => 'serve',
+                        'child' => [
+                            [
+                                'name' => '服务端功能',
+                                'type' => 'serve',
+                                'list' => [
+                                    [
+                                        'name' => '业务员',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=yewuyuan",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '服务端小程序',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "pages/index/index",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '店铺管理',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=dianpu",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '区域管理员',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=daili",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '推广代理',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=tuiguang",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '云仓批发',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=1&param=yuncang",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '供货商申请',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=purchase",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '云仓选品',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=2&param=yuncang",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '联盟中心',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=fenxiao",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '代理佣金',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=1&param=yongjin",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ],
+                                    [
+                                        'name' => '司机中心',
+                                        'link' => 'wxapp',
+                                        'open_type' => 'wxapp',
+                                        'is_merchant' => 1,
+                                        'params' => [
+                                            [
+                                                'key' => "appid",
+                                                'value' => "",
+                                                'desc' => "请填写小程序appid"
+                                            ],
+                                            [
+                                                'key' => "path",
+                                                'value' => "type=0&param=driver",
+                                                'desc' => "打开的页面路径,如pages/index/index,开头请勿加“/”"
+                                            ],
+                                        ],
+                                    ]
+
+                                ],
+                            ],
+
+                        ],
+                    ],
+                ],
+            ];
+            foreach ($link['child'] as &$item) {
+                if ($item['type'] === 'serve') {
+                    foreach ($item['child'][0]['list'] as &$s_item) {
+                        if ($s_item['is_merchant'] === 1) {
+                            if (isset($s_item['params'])) {
+                                foreach ($s_item['params'] as &$params) {
+                                    if ($params['key'] === 'appid') {
+                                        $platform_mch_appid = Option::get('platform_mch_appid', 0, 'saas')['value'];
+                                        $params['value'] = $platform_mch_appid;
+                                    }
+                                    if ($params['key'] === 'path') {
+                                        $params['value'] = '/pages/index/index?' . $params['value'];
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            return [$link, [
+                'name' => '店铺页面',
+                'icon' => 'shop',
+                'child' => [
+                    [
+                        'name' => '店铺列表',
+                        'type' => 'store-cat',
+                        'typeLink' => [
+                            'name' => '列表',
+                            'link' => '/union/class-search/index',
+                            'open_type' => "navigate",
+                            'params' => [
+                                [
+                                    'key' => "common_cat_id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "common_cat_id请填写在商城分类中相关分类的ID",
+                                ]
+                            ]
+                        ],
+                    ],
+                    [
+                        'name' => '跳转店铺',
+                        'type' => 'change-store',
+                        'typeLink' => [
+                            'name' => '跳转店铺',
+                            'link' => 'store',
+                            'open_type' => "store",
+                            'params' => [
+                                [
+                                    'key' => "store_id",
+                                    'valueKey' => "id",
+                                    'value' => "",
+                                    'desc' => "store_id请填写在商城分类中相关分类的ID",
+                                ]
+                            ]
+                        ],
+                    ]
+
+
+                ]
+            ]];
+        } catch (\Exception $e) {
+            return [
+                'code' => 1,
+                'msg' => $e->getMessage()
+            ];
+        }
+    }
+
+    public static function getLink()
+    {
+        $list = self::LIST;
+        $template = NewDiyTemplate::find()->where([
+            'store_id' => -1,
+            'is_delete' => 0,
+            'name' => 'DIY',
+        ])->all();
+
+        foreach($template as $item) {
+            $info = Json::decode($item->template);
+            $list[] = [
+                'name' => $info['page_name'],
+                'link' => "/pages/diy/diy?id=".$item->id,
+                'open_type' => "navigate",
+                'params' => []
+            ];
+        }
+
+        foreach ($list as &$item) {
+            if (!empty($item['params'])) {
+                foreach ($item['params'] as &$param_item) {
+                    //店铺列表
+                    if (!empty($param_item['key']) && $param_item['key'] === "common_cat_id" &&  $param_item['type'] === "select" ) {
+                        $param_item['options'] = SaasCategory::find()->where(['is_delete' => 0])->select('name, icon, id')->asArray()->all();
+                    }
+                    //跳转店铺
+                    if (!empty($param_item['key']) && $param_item['key'] === "store_id" &&  $param_item['type'] === "select" ) {
+                        $param_item['options'] = Store::find()->where(['is_delete' => 0])->select('name, logo, id')->asArray()->all();
+                    }
+                }
+            }
+            if ($item['is_merchant'] === 1) {
+                if (isset($item['params'])) {
+                    foreach ($item['params'] as &$params) {
+                        if ($params['key'] === 'appid') {
+                            $platform_mch_appid = Option::get('platform_mch_appid', 0, 'saas')['value'];
+                            $params['value'] = $platform_mch_appid;
+                        }
+                        if ($params['key'] === 'path') {
+                            $params['value'] = '/pages/index/index?' . $params['value'];
+                        }
+                    }
+                }
+            }
+        }
+
+        return $list;
+    }
+}

+ 740 - 0
constants/StoreImageFrom.php

@@ -0,0 +1,740 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+/*
+ * @Author: your name
+ * @Date: 2021-03-02 14:37:41
+ * @LastEditTime: 2021-05-21 11:49:15
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \admin_php\modules\client\models\v1\common\StoreImageFrom.php
+ */
+
+namespace app\constants;
+
+class StoreImageFrom
+{
+
+    public function search()
+    {
+        $baseUrl = \Yii::$app->request->hostInfo . \Yii::$app->request->baseUrl;
+        $wxappUrl = $baseUrl . '/web/v1/statics/clientImg';
+        $images = [
+            'service_home' => [
+                 'home_bg' => $wxappUrl.'/service-home/home-bg.png',
+                 'commission_index_bg' => $wxappUrl.'/service-home/commission-index-bg.png',
+                ],
+            'balance' => [
+                'icon_balance_ad' => $wxappUrl.'/balance/icon-balance-ad.png',
+                'icon_balance_bg' => $wxappUrl.'/balance/icon-balance-bg.png',
+                'icon_balance_recharge' => $wxappUrl.'/balance/icon-balance-recharge.png',
+                'icon_balance_recharge_bg' => $wxappUrl.'/balance/icon-balance-recharge-bg.png'
+            ],
+            'brand' => [
+                'bg' => $wxappUrl.'/brand/brand_info_bg.png'
+            ],
+            'bind_phone' => [
+                'bg' => $wxappUrl.'/bind_phone/bg.png'
+            ],
+            'cat' => [
+                'jia_1' => $wxappUrl.'/cat/jia_1.png',
+                'jian' => $wxappUrl.'/cat/jian.png',
+		        'down' => $wxappUrl.'/cat/down.jpg',
+		        'up' => $wxappUrl.'/cat/up.jpg'
+            ],
+            'league' => [
+                'lm_icon1' => $wxappUrl.'/league/lm-icon1.png',
+                'lm_icon2' => $wxappUrl.'/league/lm-icon2.png',
+                'lm_icon3' => $wxappUrl.'/league/lm-icon3.png'
+            ],
+            'new_share_holder' => [
+                'icon1' => $wxappUrl.'/new_share_holder/icon1.png',
+                'icon2' => $wxappUrl.'/new_share_holder/icon2.png',
+                'icon3' => $wxappUrl.'/new_share_holder/icon3.png',
+                'icon4' => $wxappUrl.'/new_share_holder/icon4.png',
+                'icon5' => $wxappUrl.'/new_share_holder/icon5.png',
+                'icon6' => $wxappUrl.'/new_share_holder/icon6.png',
+                'icon7' => $wxappUrl.'/new_share_holder/icon7.png',
+                'icon8' => $wxappUrl.'/new_share_holder/icon8.png'
+            ],
+            'free_order' => [
+                'fanxian' => $wxappUrl.'/free_order/fanxian.png',
+                'img' => $wxappUrl.'/free_order/img.png',
+                'zu' => $wxappUrl.'/free_order/zu.png',
+            ],
+            'coupon' => [
+                'download' => $wxappUrl.'/coupon/download.png',
+                'icon_close3' => $wxappUrl.'/coupon/icon-close3.png',
+                'icon_coupon_disabled' => $wxappUrl.'/coupon/icon-coupon-disabled.png',
+                'icon_coupon_enabled' => $wxappUrl.'/coupon/icon-coupon-enabled.png',
+                'img_get_coupon_bg' => $wxappUrl.'/coupon/img-get-coupon-bg.png',
+                'img_get_coupon_item_bg' => $wxappUrl.'/coupon/img-get-coupon-item-bg.png',
+                'coupon_bg' => $wxappUrl.'/coupon/coupon-bg.png',
+                'virtual_head' => $wxappUrl.'/coupon/virtual-head.png',
+            ],
+            'chart_gpt' => [
+                'integral_icon' => $wxappUrl.'/chart-gpt/integral-icon.png',
+                'jiqiren_head' => $wxappUrl.'/chart-gpt/jiqiren-head.png',
+                'jiqiren' => $wxappUrl.'/chart-gpt/jiqiren.png',
+                'nav_chongzhi' => $wxappUrl.'/chart-gpt/nav-chongzhi.png',
+                'nav_gouwu' => $wxappUrl.'/chart-gpt/nav-gouwu.png',
+                'nav_jifen' => $wxappUrl.'/chart-gpt/nav-jifen.png',
+                'nav_qiandao' => $wxappUrl.'/chart-gpt/nav-qiandao.png',
+                'nav_shangcheng' => $wxappUrl.'/chart-gpt/nav-shangcheng.png',
+                'tabbar_icon_1_active' => $wxappUrl.'/chart-gpt/tabbar-icon-1-active.png',
+                'tabbar_icon_1' => $wxappUrl.'/chart-gpt/tabbar-icon-1.png',
+                'tabbar_icon_2_active' => $wxappUrl.'/chart-gpt/tabbar-icon-2-active.png',
+                'tabbar_icon_2' => $wxappUrl.'/chart-gpt/tabbar-icon-2.png',
+                'tabbar_icon_3_active' => $wxappUrl.'/chart-gpt/tabbar-icon-3-active.png',
+                'tabbar_icon_3' => $wxappUrl.'/chart-gpt/tabbar-icon-3.png',
+                'task_head' => $wxappUrl.'/chart-gpt/task-head.png',
+            ],
+            'diy' => [
+                'addModule' => $wxappUrl.'/diy/addModule.png',
+                'banner1' => $wxappUrl.'/diy/banner1.png',
+                'banner2' => $wxappUrl.'/diy/banner2.png',
+                'banner3' => $wxappUrl.'/diy/banner3.png',
+                'btn1' => $wxappUrl.'/diy/btn1.png',
+                'btn2' => $wxappUrl.'/diy/btn2.png',
+                'class' => $wxappUrl.'/diy/class.png',
+                'coupon' => $wxappUrl.'/diy/coupon.png',
+                'fastNav1' => $wxappUrl.'/diy/fastNav1.png',
+                'fastNav2' => $wxappUrl.'/diy/fastNav2.png',
+                'footNav1' => $wxappUrl.'/diy/footNav1.png',
+                'getted' => $wxappUrl.'/diy/getted.png',
+                'goodNav1' => $wxappUrl.'/diy/goodNav1.png',
+                'goodNav2' => $wxappUrl.'/diy/goodNav2.png',
+                'goodNav3' => $wxappUrl.'/diy/goodNav3.png',
+                'goods1' => $wxappUrl.'/diy/goods1.png',
+                'goods2' => $wxappUrl.'/diy/goods2.png',
+                'goods3' => $wxappUrl.'/diy/goods3.png',
+                'goods4' => $wxappUrl.'/diy/goods4.png',
+                'goods5' => $wxappUrl.'/diy/goods5.png',
+                'icon01' => $wxappUrl.'/diy/icon01.png',
+                'icon02' => $wxappUrl.'/diy/icon02.png',
+                'icon03' => $wxappUrl.'/diy/icon03.png',
+                'location' => $wxappUrl.'/diy/location.png',
+                'mark1' => $wxappUrl.'/diy/mark1.png',
+                'mark2' => $wxappUrl.'/diy/mark2.png',
+                'mark3' => $wxappUrl.'/diy/mark3.png',
+                'mark4' => $wxappUrl.'/diy/mark4.png',
+                'notice' => $wxappUrl.'/diy/notice.png',
+                'phone' => $wxappUrl.'/diy/phone.png',
+                'phoneicon' => $wxappUrl.'/diy/phoneicon.png',
+                'search1' => $wxappUrl.'/diy/search1.png',
+                'search2' => $wxappUrl.'/diy/search2.png',
+                'search3' => $wxappUrl.'/diy/search3.png',
+                'search4' => $wxappUrl.'/diy/search4.png',
+                'search5' => $wxappUrl.'/diy/search5.png',
+                'star' => $wxappUrl.'/diy/star.png',
+                'time' => $wxappUrl.'/diy/time.png',
+                'topic1' => $wxappUrl.'/diy/topic1.png',
+                'topic2' => $wxappUrl.'/diy/topic2.png',
+                'type1_center' => $wxappUrl.'/diy/type1_center.png',
+                'type1_left' => $wxappUrl.'/diy/type1_left.png',
+                'type1_right' => $wxappUrl.'/diy/type1_right.png',
+                'type2_center' => $wxappUrl.'/diy/type2_center.png',
+                'type2_left' => $wxappUrl.'/diy/type2_left.png',
+                'type2_right' => $wxappUrl.'/diy/type2_right.png',
+                'up' => $wxappUrl.'/diy/up.png',
+                'wechat' => $wxappUrl.'/diy/wechat.png',
+            ],
+            'history' => [
+                'checked' => $wxappUrl.'/history/checked.png',
+                'unchecked' => $wxappUrl.'/history/unchecked.png',
+            ],
+            'queue' => [
+                'price_bg' => $wxappUrl.'/queue/price_bg.png',
+            ],
+            'saas_info' => [
+                'details' => $wxappUrl.'/saas_info/details.png',
+                'dividendDetails' => $wxappUrl.'/saas_info/dividendDetails.png',
+                'picture1' => $wxappUrl.'/saas_info/picture1.png',
+                'picture2' => $wxappUrl.'/saas_info/picture2.png',
+                'points' => $wxappUrl.'/saas_info/points.png',
+                'quan' => $wxappUrl.'/saas_info/quan.png',
+                'Recharge' => $wxappUrl.'/saas_info/Recharge.png',
+                'transferCoupons' => $wxappUrl.'/saas_info/transferCoupons.png',
+                'Withdrawal' => $wxappUrl.'/saas_info/Withdrawal.png',
+                'fenhong' => $wxappUrl.'/saas_info/fenhong.png',
+            ],
+            'home' => [
+                'comment' => $wxappUrl.'/home/community/comment.png',
+                'location' => $wxappUrl.'/home/community/location.png',
+                'nozan' => $wxappUrl.'/home/community/nozan.png',
+                'qiwen' => $wxappUrl.'/home/community/qiwen.png',
+                'shaidan' => $wxappUrl.'/home/community/shaidan.png',
+                'xinxian' => $wxappUrl.'/home/community/xinxian.png',
+                'zan' => $wxappUrl.'/home/community/zan.png',
+                'addcar' => $wxappUrl.'/home/shakeproduct/addcar.png',
+                'close' => $wxappUrl.'/home/shakeproduct/close.png',
+                'good_n_index' => $wxappUrl.'/home/shakeproduct/good_n_index.png',
+                'good_y_index' => $wxappUrl.'/home/shakeproduct/good_y_index.png',
+                'goods' => $wxappUrl.'/home/shakeproduct/goods.png',
+                'nozan' => $wxappUrl.'/home/shakeproduct/nozan.png',
+                'service' => $wxappUrl.'/home/shakeproduct/service.png',
+                'share' => $wxappUrl.'/home/shakeproduct/share.png',
+                'shoppingcar' => $wxappUrl.'/home/shakeproduct/shoppingcar.png',
+                'store_pic' => $wxappUrl.'/home/shakeproduct/store_pic.png',
+                'zan2' => $wxappUrl.'/home/shakeproduct/zan2.png',
+                'qrcode_close' => $wxappUrl.'/home/special/qrcode_close.png',
+                'close' => $wxappUrl.'/home/close.png',
+                'one_home_bg' => $wxappUrl.'/home/one_home_bg.png',
+                'b2b_img' => $wxappUrl.'/home/b2b_img.png',
+            ],
+            'member' => [
+                'bg' => $wxappUrl.'/member/bg.png',
+                'bg_1' => $wxappUrl.'/member/bg_1.png',
+                'bg_2' => $wxappUrl.'/member/bg_2.png',
+                'bg_3' => $wxappUrl.'/member/bg_3.png',
+                'bg_4' => $wxappUrl.'/member/bg_4.png',
+                'bg_5' => $wxappUrl.'/member/bg_5.png',
+                'btn' => $wxappUrl.'/member/btn.png',
+                'icon01' => $wxappUrl.'/member/icon01.png',
+                'icon02' => $wxappUrl.'/member/icon02.png',
+                'icon03' => $wxappUrl.'/member/icon03.png',
+                'icon04' => $wxappUrl.'/member/icon04.png',
+                'icon05' => $wxappUrl.'/member/icon05.png',
+            ],
+            'my' => [
+                'account' => $wxappUrl.'/my/account.png',
+                'avatar' => $wxappUrl.'/my/avatar.png',
+                'icon_bg' => $wxappUrl.'/my/icon-bg.png',
+                'icon_bg_1' => $wxappUrl.'/my/icon-bg-1.png',
+                'icon_integral' => $wxappUrl.'/my/icon-integral.png',
+                'iconj_sign' => $wxappUrl.'/my/iconj-sign.png',
+                'icon_right_1' => $wxappUrl.'/my/icon-right-1.png',
+                'icon_right_2' => $wxappUrl.'/my/icon-right-2.png',
+                'icon_right_3' => $wxappUrl.'/my/icon-right-3.png',
+                'icon_set' => $wxappUrl.'/my/icon-set.png',
+                'icon_vip' => $wxappUrl.'/my/icon-vip.png',
+                'order_1' => $wxappUrl.'/my/order-1.png',
+                'order_2' => $wxappUrl.'/my/order-2.png',
+                'order_3' => $wxappUrl.'/my/order-3.png',
+                'order_4' => $wxappUrl.'/my/order-4.png',
+                'order_5' => $wxappUrl.'/my/order-5.png',
+                'shopname' => $wxappUrl.'/my/shopname.png',
+                'shu' => $wxappUrl.'/my/shu.png',
+                'dianpushenqing' => $wxappUrl.'/my/dianpushenqing.png',
+                'dianpuguanli' => $wxappUrl.'/my/dianpuguanli.png',
+                'user_level' => $wxappUrl.'/my/user_level.png',
+            ],
+            'my_coupon' => [
+                'ietm_bg' => $wxappUrl.'/my_coupon/ietm_bg.png',
+                'coupon_bg' => $wxappUrl.'/my_coupon/coupon_bg.png',
+            ],
+            'shopingcart' => [
+                'heng' => $wxappUrl.'/shopingcart/heng.png',
+                'noselect' => $wxappUrl.'/shopingcart/noselect.png',
+                'select' => $wxappUrl.'/shopingcart/select.png',
+            ],
+            'sharer' => [
+                'fenxiao_bg' => $wxappUrl.'/sharer/fenxiao_bg.png',
+                'fenxiao_icon1' => $wxappUrl.'/sharer/fenxiao_icon1.png',
+                'fenxiao_icon2' => $wxappUrl.'/sharer/fenxiao_icon2.png',
+                'fenxiao_icon3' => $wxappUrl.'/sharer/fenxiao_icon3.png'
+            ],
+            'tabbarimg' => [
+                'icon_1_1' => $wxappUrl.'/tabbarimg/icon-1-1.png',
+                'icon_1_2' => $wxappUrl.'/tabbarimg/icon-1-2.png',
+                'icon_2_1' => $wxappUrl.'/tabbarimg/icon-2-1.png',
+                'icon_2_2' => $wxappUrl.'/tabbarimg/icon-2-2.png',
+                'icon_3_1' => $wxappUrl.'/tabbarimg/icon-3-1.png',
+                'icon_3_2' => $wxappUrl.'/tabbarimg/icon-3-2.png',
+                'icon_4_1' => $wxappUrl.'/tabbarimg/icon-4-1.png',
+                'icon_4_2' => $wxappUrl.'/tabbarimg/icon-4-2.png',
+                'icon_5_1' => $wxappUrl.'/tabbarimg/icon-5-1.png',
+                'icon_5_2' => $wxappUrl.'/tabbarimg/icon-5-2.png',
+            ],
+            'common' => [
+                'back' => $wxappUrl.'/back.png',
+                'icon_down' => $wxappUrl.'/icon-down.png',
+                'icon_search' => $wxappUrl.'/icon-search.png',
+                'icon_up' => $wxappUrl.'/icon-up.png',
+                'jia_1' => $wxappUrl.'/jia_1.png',
+                'logo' => $wxappUrl.'/logo.png',
+                'pitch_icon_img' => $wxappUrl.'/pitch_icon_img.png',
+                'play' => $wxappUrl.'/play.png',
+                'user_integral_arrow' => $wxappUrl.'/user-integral-arrow.png',
+                'login_bg' => $wxappUrl.'/login-bg.png',
+            ],
+            'tool' => [
+                'upload' => $wxappUrl.'/tool/upload.png'
+            ],
+            'goods' => [
+                'cart' => $wxappUrl.'/goods/cart.png',
+                'cart_icon' => $wxappUrl.'/goods/cart_icon.png',
+                'guanzhu' => $wxappUrl.'/goods/guanzhu.png',
+                'line_left' => $wxappUrl.'/goods/line_left.png',
+                'line_right' => $wxappUrl.'/goods/line_right.png',
+                'locationicon' => $wxappUrl.'/goods/locationicon.png',
+                'more' => $wxappUrl.'/goods/more.png',
+                'service' => $wxappUrl.'/goods/service.png',
+                'share1' => $wxappUrl.'/goods/share1.png',
+                'shop' => $wxappUrl.'/goods/shop.png',
+                'shopicon' => $wxappUrl.'/goods/shopicon.png',
+                'shoucang' => $wxappUrl.'/goods/shoucang.png',
+		        'shoucang_1' => $wxappUrl.'/goods/shoucang_1.png',
+                'vipicon' => $wxappUrl.'/goods/vipicon.png',
+                'share_qrcode' => $wxappUrl.'/goods/share_qrcode.jpg',
+                'share_wx' => $wxappUrl.'/goods/share_wx.jpg',
+                'is_favorite' => $wxappUrl.'/goods/is_favorite.png',
+		        'wxtimeline' => $wxappUrl.'/goods/wxtimeline.png',
+                'seckill_bg' => $wxappUrl.'/goods/seckill_bg.png',
+                'goods0' => $wxappUrl.'/goods/goods0.png',
+                'goods1' => $wxappUrl.'/goods/goods1.png',
+                'goods2' => $wxappUrl.'/goods/goods2.png',
+                'goods4' => $wxappUrl.'/goods/goods4.png',
+                'goods_is_trans' => $wxappUrl.'/goods/goods_is_trans.png',
+            ],
+            'shop' => [
+                'modify_3' => $wxappUrl.'/shop/modify_3.png',
+                'modify_4' => $wxappUrl.'/shop/modify_4.png',
+                'modify_a' => $wxappUrl.'/shop/modify_a.png',
+                'modify_b' => $wxappUrl.'/shop/modify_b.png',
+                'modify_c' => $wxappUrl.'/shop/modify_c.png',
+                'modify_cssh' => $wxappUrl.'/shop/modify_cssh.png',
+                'modify_d' => $wxappUrl.'/shop/modify_d.png',
+                'modify_e' => $wxappUrl.'/shop/modify_e.png',
+                'modify_f' => $wxappUrl.'/shop/modify_f.png',
+                'modify_g' => $wxappUrl.'/shop/modify_g.png',
+                'modify_h' => $wxappUrl.'/shop/modify_h.png',
+            ],
+            'cash' => [
+                'wx' => $wxappUrl.'/cash/wx.png',
+                'bank' => $wxappUrl.'/cash/bank.png',
+                'balance' => $wxappUrl.'/cash/balance.png',
+                'ali' => $wxappUrl.'/cash/ali.png',
+            ],
+            'lg' => [
+                'wx' => $wxappUrl.'/lg/add_bank.png',
+                'add_card_back' => $wxappUrl.'/lg/add_card_back.png',
+                'add_card_front' => $wxappUrl.'/lg/add_card_front.png',
+            ],
+            'null_all' => [
+                'null_1' => $wxappUrl.'/null_all/null_1.png',
+                'null_2' => $wxappUrl.'/null_all/null_2.png',
+                'null_3' => $wxappUrl.'/null_all/null_3.png',
+                'null_4' => $wxappUrl.'/null_all/null_4.png',
+                'null_5' => $wxappUrl.'/null_all/null_5.png',
+                'null_6' => $wxappUrl.'/null_all/null_6.png',
+                'null_7' => $wxappUrl.'/null_all/null_7.png',
+                'null_8' => $wxappUrl.'/null_all/null_8.png',
+                'null_9' => $wxappUrl.'/null_all/null_9.png',
+                'null_10' => $wxappUrl.'/null_all/null_10.png',
+            ],
+            'order' => [
+                'couponBg' => $wxappUrl.'/order/couponBg.png',
+                'giftPoints' => $wxappUrl.'/order/giftPoints.png',
+            ],
+            'login' => [
+                'password' => $wxappUrl.'/login/password.png',
+                'qq' => $wxappUrl.'/login/qq.jpg',
+                'wechat' => $wxappUrl.'/login/wechat.jpg'
+            ],
+            'index' => [
+                'index_top_bg' => $wxappUrl.'/index/index_top_bg.png?v=' . time(),
+                'menu_daili' => $wxappUrl.'/index/menu_daili.png?v=' . time(),
+                'menu_dianpu' => $wxappUrl.'/index/menu_dianpu.png?v=' . time(),
+                'menu_yewuyuan' => $wxappUrl.'/index/menu_yewuyuan.png?v=' . time(),
+                'menu_yuncang' => $wxappUrl.'/index/menu_yuncang.png',
+                'user_img_default' => $wxappUrl.'/index/user_img_default.png',
+                'menu_kefu' => $wxappUrl.'/index/menu_kefu.png',
+                'bg1' => $wxappUrl.'/index/bg1.png',
+                'bg2' => $wxappUrl.'/index/bg2.png',
+                'bg3' => $wxappUrl.'/index/bg3.png',
+                'cat' => $wxappUrl.'/index/cat.png',
+                'cut_price_ico' => $wxappUrl.'/index/cut_price_ico.png',
+                'cut_price_suc_bg' => $wxappUrl.'/index/cut_price_suc_bg.png',
+                'cut_price_flow1' => $wxappUrl.'/index/cut_price_flow1.png',
+                'cut_price_flow2' => $wxappUrl.'/index/cut_price_flow2.png',
+                'cut_price_flow3' => $wxappUrl.'/index/cut_price_flow3.png',
+                'close' => $wxappUrl.'/index/close.png',
+                'menu_money' => $wxappUrl . '/index/menu_money.png?v=' . time(),
+                'menu_comm' => $wxappUrl . '/index/mch_comm.png',
+                'menu_fenxiao' => $wxappUrl . '/index/menu_fenxiao.png?v=' . time(),
+                'menu_gonghuoshang' => $wxappUrl . '/index/menu_gonghuoshang.png?v=' . time(),
+                'menu_sj' => $wxappUrl . '/index/menu_sj.png?v=' . time(),
+                'menu_xuanpin' => $wxappUrl . '/index/menu_xuanpin.png',
+                'chanpin' => $wxappUrl . '/index/chanpin.png?v=' . time(),
+                'store_operations' => $wxappUrl . '/index/store_operations.png?v=' . time(),
+                'index_m1' => $wxappUrl . '/index/index_m1.png',
+                'index_m2' => $wxappUrl . '/index/index_m2.png',
+                'index_m3' => $wxappUrl . '/index/index_m3.png',
+                'index_m4' => $wxappUrl . '/index/index_m4.png',
+                'index_m5' => $wxappUrl . '/index/index_m5.png',
+                'menu_daili2' => $wxappUrl . '/index/menu_daili2.png',
+                'menu_money2' => $wxappUrl . '/index/menu_money2.png',
+                'icon_addr' => $wxappUrl . '/index/icon-addr.png',
+                'icon_phone' => $wxappUrl . '/index/icon-phone.png',
+                'icon_sort' => $wxappUrl . '/index/icon-sort.png',
+                'shoppingCartHuman' => $wxappUrl . '/index/shoppingCartHuman.png',
+            ],
+            'admin' => [
+                'addr' => $wxappUrl.'/admin/addr.png',
+                'md_now_title' => $wxappUrl.'/admin/md_now_title.png',
+                'broken' => $wxappUrl.'/admin/broken.png',
+                'cat_a' => $wxappUrl.'/admin/cat_a.png',
+                'cat_s' => $wxappUrl.'/admin/cat_s.png',
+                'file' => $wxappUrl.'/admin/file.png',
+                'file_s' => $wxappUrl.'/admin/file_s.png',
+                'index_a' => $wxappUrl.'/admin/index_a.png',
+                'index_s' => $wxappUrl.'/admin/index_s.png',
+                'money' => $wxappUrl.'/admin/money.png',
+                'news' => $wxappUrl.'/admin/news.png',
+                'news_a' => $wxappUrl.'/admin/news_a.png',
+                'news_b' => $wxappUrl.'/admin/news_b.png',
+                'pack' => $wxappUrl.'/admin/pack.png',
+                'plus' => $wxappUrl.'/admin/plus.png',
+                'plus_c' => $wxappUrl.'/admin/plus_c.png',
+                'server_app' => $wxappUrl.'/admin/server_app.png',
+                'server_small_app' => $wxappUrl.'/admin/server_small_app.png',
+                'setting_a' => $wxappUrl.'/admin/setting_a.png',
+                'setting_s' => $wxappUrl.'/admin/setting_s.png',
+                'shopping' => $wxappUrl.'/admin/shopping.png',
+                'users' => $wxappUrl.'/admin/users.png',
+                'location' => $wxappUrl.'/admin/location.jpg',
+                'send_order' => $wxappUrl.'/admin/send_order.jpg',
+                'phone' => $wxappUrl.'/admin/phone.jpg',
+            ],
+            'union' => [
+                'youhuijuan' => $wxappUrl.'/union/youhuijuan.png',
+                'wujiaoxing' => $wxappUrl.'/union/wujiaoxing.png',
+                'user' => $wxappUrl.'/union/user.png',
+                'tuikuan' => $wxappUrl.'/union/tuikuan.png',
+                'tuijianyouli' => $wxappUrl.'/union/tuijianyouli.png',
+                'shoucang' => $wxappUrl.'/union/shoucang.png',
+                'scanning' => $wxappUrl.'/union/scanning.png',
+                'qianbao' => $wxappUrl.'/union/qianbao.png',
+                'location' => $wxappUrl.'/union/location.png',
+                'location_1' => $wxappUrl.'/union/location-1.png',
+                'left_button' => $wxappUrl.'/union/left-button.png',
+                'guanzhu' => $wxappUrl.'/union/guanzhu.png',
+                'code' => $wxappUrl.'/union/code.png',
+                'zuji' => $wxappUrl.'/union/zuji.png',
+                'address' => $wxappUrl.'/union/address.png',
+                'rebate' => $wxappUrl.'/union/rebate.png',
+                'toux' => $wxappUrl.'/union/toux.png',
+            ],
+            'alipay' => [
+                'white_add_icon' => $wxappUrl.'/alipay/white_add_icon.png',
+                'right_tab_icon' => $wxappUrl.'/alipay/right_tab_icon.png',
+                'right_grey_arrow' => $wxappUrl.'/alipay/right_grey_arrow.png',
+                'notice_sound_icon' => $wxappUrl.'/alipay/notice_sound_icon.png',
+                'local_icon' => $wxappUrl.'/alipay/local_icon.png',
+                'left_tab_icon' => $wxappUrl.'/alipay/left_tab_icon.png',
+                'hot_icon' => $wxappUrl.'/alipay/hot_icon.png',
+                'green_phone_icon' => $wxappUrl.'/alipay/green_phone_icon.png',
+                'green_line_icon' => $wxappUrl.'/alipay/green_line_icon.png',
+                'great_point_icon' => $wxappUrl.'/alipay/great_point_icon.png',
+                'delete_grey_icon' => $wxappUrl.'/alipay/delete_grey_icon.png',
+                'close_grey_icon' => $wxappUrl.'/alipay/close_grey_icon.png',
+            ],
+            'images' => [
+                'wx_pay_icon' => $wxappUrl.'/images/wx_pay_icon.png',
+                'white_right_icon' => $wxappUrl.'/images/white_right_icon.png',
+                'white_close_icon' => $wxappUrl.'/images/white_close_icon.png',
+                'shop_icon' => $wxappUrl.'/images/shop_icon.png',
+                'shop_car_icon' => $wxappUrl.'/images/shop_car_icon.png',
+                'sequence_top_icon' => $wxappUrl.'/images/sequence_top_icon.png',
+                'sequence_down_icon' => $wxappUrl.'/images/sequence_down_icon.png',
+                'search_shop_icon' => $wxappUrl.'/images/search_shop_icon.png',
+                'search_delete_icon' => $wxappUrl.'/images/search_delete_icon.png',
+                'red_right_icon' => $wxappUrl.'/images/red_right_icon.png',
+                'red_close_icon' => $wxappUrl.'/images/red_close_icon.png',
+                'receive_pay_icon' => $wxappUrl.'/images/receive_pay_icon.png',
+                'phone_icon' => $wxappUrl.'/images/phone_icon.png',
+                'online_use_icon' => $wxappUrl.'/images/online_use_icon.png',
+                'notice_icon' => $wxappUrl.'/images/notice_icon.png',
+                'local_icon' => $wxappUrl.'/images/local_icon.png',
+                'left_arrow_icon' => $wxappUrl.'/images/left_arrow_icon.png',
+                'kefu_icon' => $wxappUrl.'/images/kefu_icon.png',
+                'integral_right_icon' => $wxappUrl.'/images/integral_right_icon.png',
+                'integral_detail_icon' => $wxappUrl.'/images/integral_detail_icon.png',
+                'integral_bg_icon' => $wxappUrl.'/images/integral_bg_icon.png',
+                'hang_list_show' => $wxappUrl.'/images/hang_list_show.png',
+                'guide_shop_icon' => $wxappUrl.'/images/guide_shop_icon.png',
+                'group_show_icon' => $wxappUrl.'/images/group_show_icon.png',
+                'face_pay_record' => $wxappUrl.'/images/face_pay_record.png',
+                'face_pay_mark' => $wxappUrl.'/images/face_pay_mark.png',
+                'face_pay_bg' => $wxappUrl.'/images/face_pay_bg.png',
+                'face_arrow_right' => $wxappUrl.'/images/face_arrow_right.png',
+                'eye_icon' => $wxappUrl.'/images/eye_icon.png',
+                'done_icon' => $wxappUrl.'/images/done_icon.png',
+                'delete_icon' => $wxappUrl.'/images/delete_icon.png',
+                'condition_active_icon' => $wxappUrl.'/images/condition_active_icon.png',
+                'close_eye_icon' => $wxappUrl.'/images/close_eye_icon.png',
+                'clock_icon' => $wxappUrl.'/images/clock_icon.png',
+                'choosed_red_icon' => $wxappUrl.'/images/choosed_red_icon.png',
+                'alipay_icon' => $wxappUrl.'/images/alipay_icon.png',
+                'add_car_icon' => $wxappUrl.'/images/add_car_icon.png',
+                'account_pay_icon' => $wxappUrl.'/images/account_pay_icon.png',
+                'yunst_pay_icon' => $wxappUrl.'/images/yunst_pay_icon.png',
+                'wx_b2b_pay_icon' => $wxappUrl.'/images/wx_b2b_pay_icon.png',
+                'alliance_location' => $wxappUrl.'/images/alliance_location.png',
+            ],
+            'video_shop' => [
+                'img_1' => $wxappUrl.'/video_shop/img_1.png',
+                'img_2' => $wxappUrl.'/video_shop/img_2.png',
+                'img_3' => $wxappUrl.'/video_shop/img_3.png',
+                'icon-key' => $wxappUrl.'/video_shop/icon-key.png',
+                'icon-link' => $wxappUrl.'/video_shop/icon-link.png',
+                'video_icon0' => $wxappUrl.'/video_shop/video_icon0.png',
+                'video-icon1' => $wxappUrl.'/video_shop/video-icon1.png',
+                'video-icon2' => $wxappUrl.'/video_shop/video-icon2.png',
+                'video-icon3' => $wxappUrl.'/video_shop/video-icon3.png',
+                'video-icon4' => $wxappUrl.'/video_shop/video-icon4.png',
+                'video-icon5' => $wxappUrl.'/video_shop/video-icon5.png',
+                'zhuan' => $wxappUrl.'/video_shop/zhuan.png',
+                'share' => $wxappUrl.'/video_shop/share.png',
+                'video-integral' => $wxappUrl.'/video_shop/videoIntegral.gif',
+                'pop' => $wxappUrl.'/video_shop/pop.png',
+            ],
+            'salesman' => [
+                'icon_1' => $wxappUrl.'/salesman/icon_1.png',
+                'icon_2' => $wxappUrl.'/salesman/icon_2.png',
+                'icon_3' => $wxappUrl.'/salesman/icon_3.png',
+                'icon_4' => $wxappUrl.'/salesman/icon_4.png',
+                'banner' => $wxappUrl.'/salesman/banner.png',
+            ],
+            'integral' => [
+                'qiandao_bg' => $wxappUrl.'/integral/qiandao_bg.png',
+                'store_bg' => $wxappUrl.'/integral/store_bg.png',
+                'icon1' => $wxappUrl.'/integral/icon1.png',
+                'icon2' => $wxappUrl.'/integral/icon2.png',
+            ],
+            'signIn'=>[
+                'notice' => $wxappUrl.'/signIn/notice.png',
+                'rules' => $wxappUrl.'/signIn/rules.png',
+                'sign' => $wxappUrl.'/signIn/sign.png',
+                'signed' => $wxappUrl.'/signIn/signed.png',
+                'tip' => $wxappUrl.'/signIn/tip.png',
+                'title' => $wxappUrl.'/signIn/title.png',
+            ],
+            'diyNew'=>[
+                'default_img' => $wxappUrl.'/diyNew/default_img.png',
+                'diy_notice_img' => $wxappUrl.'/diyNew/diy_notice_img.png',
+                'goods_no_rest' => $wxappUrl.'/diyNew/goods_no_rest.png',
+                'goods_out_line' => $wxappUrl.'/diyNew/goods_out_line.png',
+                'loading' => $wxappUrl.'/diyNew/loading.gif',
+                'topic_line_one' => $wxappUrl.'/diyNew/topic_line_one.png',
+                'topic_line_two' => $wxappUrl.'/diyNew/topic_line_two.png',
+            ],
+            'store_m_admin'=>[
+                'home_all' => $wxappUrl.'/store_m_admin/home_all.png',
+                'home_arr' => $wxappUrl.'/store_m_admin/home_arr.png',
+                'home_bgzx' => $wxappUrl.'/store_m_admin/home_bgzx.png',
+                'home_data' => $wxappUrl.'/store_m_admin/home_data.png',
+                'home_goods' => $wxappUrl.'/store_m_admin/home_goods.png',
+                'home_order' => $wxappUrl.'/store_m_admin/home_order.png',
+                'home_pj' => $wxappUrl.'/store_m_admin/home_pj.png',
+                'home_sh' => $wxappUrl.'/store_m_admin/home_sh.png',
+                'home_shop' => $wxappUrl.'/store_m_admin/home_shop.png',
+                'home_yhq' => $wxappUrl.'/store_m_admin/home_yhq.png',
+                'home_yj' => $wxappUrl.'/store_m_admin/home_yj.png',
+                'hone_zc' => $wxappUrl.'/store_m_admin/hone_zc.png',
+                'home_package' => $wxappUrl.'/store_m_admin/home_package.png',
+                'home_category' => $wxappUrl.'/store_m_admin/home_category.png',
+                'home_scan' => $wxappUrl.'/store_m_admin/home_scan.png',
+                'home_pay' => $wxappUrl.'/store_m_admin/home_pay.png',
+                'store_renew' => $wxappUrl.'/store_m_admin/store_renew.png',
+                'icon1' => $wxappUrl.'/store_m_admin/icon1.png',
+                'money' => $wxappUrl.'/store_m_admin/money.png',
+                'money1' => $wxappUrl.'/store_m_admin/money1.png',
+                'QRcode_3' => $wxappUrl.'/store_m_admin/QRcode_3.png',
+                'xs_order' => $wxappUrl.'/store_m_admin/xs_order.png',
+                'store_info' => $wxappUrl.'/store_m_admin/store_info.png',
+                'erp_scan' => $wxappUrl.'/store_m_admin/erp_scan.png',
+                'home_cloud_goods' => $wxappUrl.'/store_m_admin/home_cloud_goods.png',
+                'home_kefu' => $wxappUrl.'/store_m_admin/home_kefu.png',
+                'home_cloud_purchase' => $wxappUrl.'/store_m_admin/home_cloud_purchase.png',
+                'refund_icon' => $wxappUrl.'/store_m_admin/refund_icon.png',
+            ],
+            'super_sales'=>[
+                'dividendAward' => $wxappUrl.'/super_sales/dividendAward.png',
+                'groupInformation' => $wxappUrl.'/super_sales/groupInformation.png',
+                'groupProducts' => $wxappUrl.'/super_sales/groupProducts.png',
+                'myRecommendation' => $wxappUrl.'/super_sales/myRecommendation.png',
+                'recommendedAward' => $wxappUrl.'/super_sales/recommendedAward.png',
+                'commission' => $wxappUrl.'/super_sales/commission.png',
+                'withdrawal' => $wxappUrl.'/super_sales/withdrawal.png',
+            ],
+            'integral_appreciation'=>[
+                'IncreaseTransferring' => $wxappUrl.'/integral_appreciation/IncreaseTransferring.png',
+                'pointsDetails' => $wxappUrl.'/integral_appreciation/pointsDetails.png',
+                'purchaseZone' => $wxappUrl.'/integral_appreciation/purchaseZone.png',
+                'sellingZone' => $wxappUrl.'/integral_appreciation/sellingZone.png',
+                'Withdrawal' => $wxappUrl.'/integral_appreciation/Withdrawal.png',
+                'buy' => $wxappUrl.'/integral_appreciation/buy.png',
+                'expenses' => $wxappUrl.'/integral_appreciation/expenses.png',
+                'income' => $wxappUrl.'/integral_appreciation/income.png',
+                'Sold' => $wxappUrl.'/integral_appreciation/Sold.png',
+                'myPosts' => $wxappUrl.'/integral_appreciation/myPosts.png',
+            ],
+            'mch_m_admin'=>[
+                'bg' => $wxappUrl.'/mch_m_admin/bg.png',
+                'cash' => $wxappUrl.'/mch_m_admin/cash.png',
+                'qr' => $wxappUrl.'/mch_m_admin/qr.png',
+                'store' => $wxappUrl.'/mch_m_admin/store.png',
+            ],
+            'team_bonus'=>[
+                'commission' => $wxappUrl.'/team_bonus/commission.png',
+                'cultivation' => $wxappUrl.'/team_bonus/cultivation.png',
+                'detailed' => $wxappUrl.'/team_bonus/detailed.png',
+                'educatingPeople' => $wxappUrl.'/team_bonus/educatingPeople.png',
+                'flatLevel' => $wxappUrl.'/team_bonus/flatLevel.png',
+                'myContent' => $wxappUrl.'/team_bonus/myContent.png',
+                'range' => $wxappUrl.'/team_bonus/range.png',
+                'withdrawal' => $wxappUrl.'/team_bonus/withdrawal.png',
+            ],
+            'giving_gifts'=>[
+                'bg' => $wxappUrl.'/giving_gifts/bg.png',
+                'box' => $wxappUrl.'/giving_gifts/box.png',
+                'giftBg' => $wxappUrl.'/giving_gifts/giftBg.png',
+                'giftDetails' => $wxappUrl.'/giving_gifts/giftDetails.png',
+                'giftIcon' => $wxappUrl.'/giving_gifts/giftIcon.png',
+                'giftState' => $wxappUrl.'/giving_gifts/giftState.png',
+                'git' => $wxappUrl.'/giving_gifts/git.png',
+            ],
+            'seckill' => [
+                'seckill_list_bg' => $wxappUrl.'/seckill/seckill_list_bg.png',
+            ],
+            'inteligent' => [
+                'close' =>  $wxappUrl.'/close.png',
+                'scale' => $wxappUrl.'/scale.png'
+            ],
+            'share_holder_area' => [
+                'area_profit' =>  $wxappUrl.'/share_holder_area_agent/area_icon1.png',
+                'area_withdraw' => $wxappUrl.'/share_holder_area_agent/area_icon2.png',
+                'area_icon3' => $wxappUrl.'/share_holder_area_agent/area_icon3.png',
+                'area_withdraw_details' => $wxappUrl.'/share_holder_area_agent/withdrawal_details.png'
+            ],
+            'activity' => [
+                'buy' => $wxappUrl.'/activity/activity_buy.png',
+                'buy2' => $wxappUrl.'/activity/activity_buy2.png',
+            ],
+            'insurance' => [
+                'pdf' => $wxappUrl.'/insurance/pdf.png',
+            ],
+            'fugou' => [
+                'gouwuche' => $wxappUrl . '/fugou/gouwuche.png',
+            ],
+            'team_grades' => [
+                'team_grades_bg' => $wxappUrl.'/team_grades/team_grades_bg.png',
+                'team_grades_level' => $wxappUrl.'/team_grades/team_grades_level.png',
+                'team_grades_price' => $wxappUrl.'/team_grades/team_grades_price.png',
+                'team_grades_log' => $wxappUrl.'/team_grades/team_grades_log.png',
+            ],
+            'agent_staff' => [
+                'sorting_icon1' => $wxappUrl.'/agent_staff/sorting_icon1.png',
+                'sorting_icon1_1' => $wxappUrl.'/agent_staff/sorting_icon1_1.png',
+                'sorting_icon2' => $wxappUrl.'/agent_staff/sorting_icon2.png',
+                'sorting_icon2_2' => $wxappUrl.'/agent_staff/sorting_icon2_2.png',
+                'sorting_icon3' => $wxappUrl.'/agent_staff/sorting_icon3.png',
+                'return' => $wxappUrl.'/agent_staff/return.png',
+                'top' => $wxappUrl.'/agent_staff/top.png',
+            ],
+            'share_group' => [
+                'commission' => $wxappUrl.'/share_group/commission.png',
+                'help' => $wxappUrl.'/share_group/help.png',
+                'pinduogou' => $wxappUrl.'/share_group/pinduogou.png',
+                'withdrawal' => $wxappUrl.'/share_group/withdrawal.png',
+                'fugou' => $wxappUrl.'/share_group/fugou.png',
+            ],
+            'material' => [
+                'click' => $wxappUrl.'/click.png',
+                'save_result' => $wxappUrl.'/save_result.png',
+            ]
+        ];
+        $plugins = [
+            'pintuan' => [
+                'pt_details_pt' => $wxappUrl.'/pintuan/pt-details-pt.png',
+                'goods_lc' =>  $wxappUrl.'/pintuan/goods_lc.png',
+                'goods_price_bg' =>  $wxappUrl.'/pintuan/goods_price_bg.png',
+            ],
+            'live' => [
+                'live_bg' => $wxappUrl.'/live/live_bg.png',
+            ],
+            'wxlive' => [
+                'p1' => $wxappUrl.'/wxlive/p1.png',
+                'p2' => $wxappUrl.'/wxlive/p2.png',
+                'p3' => $wxappUrl.'/wxlive/p3.gif',
+                'p3_i' => $wxappUrl.'/wxlive/p3.png',
+                'play' => $wxappUrl.'/wxlive/play.png',
+                'skip' => $wxappUrl.'/wxlive/skip.png',
+            ],
+            'mch' => [
+                'star' => $wxappUrl . '/mch/star.png',
+                'time' => $wxappUrl . '/mch/time.png',
+                'right' => $wxappUrl . '/mch/right.png',
+                'lightning' => $wxappUrl . '/mch/lightning.png',
+                'shouye' => $wxappUrl . '/mch/shouye.png',
+                'shouye_active' => $wxappUrl . '/mch/shouye-active.png',
+                'quanbu' => $wxappUrl . '/mch/quanbu.png',
+                'quanbu_active' => $wxappUrl . '/mch/quanbu-active.png',
+                'xinpin' => $wxappUrl . '/mch/xinpin.png',
+                'xinpin_active' => $wxappUrl . '/mch/xinpin-active.png',
+                'fenlei' => $wxappUrl . '/mch/fenlei.png',
+                'fenlei_active' => $wxappUrl . '/mch/fenlei-active.png',
+                'shop_kf' => $wxappUrl . '/mch/shop-kf.png',
+                'shoucang' => $wxappUrl . '/mch/shoucang.png',
+                'close' => $wxappUrl . '/mch/close.png',
+                'jiage_1' => $wxappUrl . '/mch/jiage-1.png',
+                'jiage_2' => $wxappUrl . '/mch/jiage-2.png',
+                'jiage_3' => $wxappUrl . '/mch/jiage-3.png',
+                'map' => $wxappUrl . '/mch/map.png',
+                'phone' => $wxappUrl . '/mch/phone.png',
+                'time_black' => $wxappUrl . '/mch/time-black.png',
+                'summary' => $wxappUrl . '/mch/summary.png',
+                'notice' => $wxappUrl . '/mch/notice.png',
+                'safety' => $wxappUrl . '/mch/safety.png',
+                'shenhe_0' => $wxappUrl . '/mch/shenhe-0.png',
+                'shenhe_1' => $wxappUrl . '/mch/shenhe-1.png',
+                'shenhe_2' => $wxappUrl . '/mch/shenhe-2.png',
+            ],
+            'share' => [
+                'agree' =>   $wxappUrl . '/share/agree.png',
+                'un_agree' => $wxappUrl . '/share/un_agree.png',
+                'money' => $wxappUrl . '/share/money.png',
+                'info' => $wxappUrl . '/share/info.png',
+                'tip' => $wxappUrl . '/share/tip.png',
+                'down' => $wxappUrl . '/share/down.png',
+                'right' => $wxappUrl . '/share/right.png',
+            ],
+            'pond' => [
+                'pointer' =>   $wxappUrl . '/pond/pointer.png',
+                'bg' => $wxappUrl . '/pond/bg.png',
+                'wode' => $wxappUrl . '/pond/wode.png',
+                'yaoqing' => $wxappUrl . '/pond/yaoqing.png',
+                'button' => $wxappUrl . '/pond/button.png',
+            ],
+            'cashier' => [
+                'addPurchase' => $wxappUrl.'/cashier/addPurchase.png',
+                'balanceRecharge' => $wxappUrl.'/cashier/balanceRecharge.png',
+                'Cashier' => $wxappUrl.'/cashier/Cashier.png',
+                'nowCashier' => $wxappUrl.'/cashier/nowCashier.png',
+                'operationRecord' => $wxappUrl.'/cashier/operationRecord.png',
+                'orderList' => $wxappUrl.'/cashier/orderList.png',
+                'pickOrder' => $wxappUrl.'/cashier/pickOrder.png',
+                'pointsRecharge' => $wxappUrl.'/cashier/pointsRecharge.png',
+                'register' => $wxappUrl.'/cashier/register.png',
+                'registrationList' => $wxappUrl.'/cashier/registrationList.png',
+                'scan' => $wxappUrl.'/cashier/scan.png',
+                'search' => $wxappUrl.'/cashier/search.png',
+                'send' => $wxappUrl.'/cashier/send.png',
+            ],
+            'level' => [
+                'cat' => $wxappUrl.'/level/cat.png',
+                'money' => $wxappUrl.'/level/money.png',
+                'share' => $wxappUrl.'/level/share.png',
+                'signIn' => $wxappUrl.'/level/signIn.png',
+            ],
+            'newCart' => $wxappUrl.'/newCart.png',
+        ];
+
+        return array_merge($images, $plugins);
+    }
+}

+ 3049 - 0
events/OrderEvent.php

@@ -0,0 +1,3049 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\events;
+
+use app\constants\OptionSetting;
+use app\models\AgentGoodsBindGoods;
+use app\models\AgentGoodsInstallLog;
+use app\models\Cash;
+use app\models\ReportInfo;
+use app\models\ReportPool;
+use app\models\ReportPoolLevel;
+use app\models\ReportSetting;
+use app\models\SaaSLeaguePriceLog;
+use app\models\PtActivity;
+use app\models\PtActivityOrder;
+use app\models\PtActivityOrderDetail;
+use app\models\SaasUserPriceLog;
+use app\models\AccountLog;
+use app\models\Admin;
+use app\models\Coupon;
+use app\models\DeliveryInfo;
+use app\models\Goods;
+use app\models\Level;
+use app\models\LocalDeliveryCourier;
+use app\models\LocalDeliveryLog;
+use app\models\Md;
+use app\models\MdProfit;
+use app\models\MerchantInfo;
+use app\models\Option;
+use app\models\Order;
+use app\models\OrderDetail;
+use app\models\OrderRefund;
+use app\models\ReOrder;
+use app\models\SaasUser;
+use app\models\Salesman;
+use app\models\SeckillActivityGoods;
+use app\models\SeckillActivityOrderLog;
+use app\models\Share;
+use app\models\ShareHolder;
+use app\models\ShareLevel;
+use app\models\ShareLevelLog;
+use app\models\SharingReceiver;
+use app\models\Shop;
+use app\models\ShopShare;
+use app\models\Store;
+use app\models\StoreCash;
+use app\models\StoreShareMoney;
+use app\models\Supplier;
+use app\models\TeamGrades;
+use app\models\User;
+use app\models\UserBindLog;
+use app\models\UserCoupon;
+use app\models\UserShareLog;
+use app\models\UserShareMoney;
+use app\models\VideoGoodsShare;
+use app\models\VideoShopOrderExt;
+use app\models\WechatConfig;
+use app\models\Worker;
+use app\models\WorkerLevel;
+use app\models\WorkerOrderExt;
+use app\modules\admin\models\pt\PtActivityOrderForm;
+use app\plugins\adopt\models\AdoptCostOrder;
+use app\plugins\adopt\models\AdoptOrderInfo;
+use app\plugins\adopt\models\AdoptSetting;
+use app\plugins\food\models\FoodOrder;
+use app\utils\Alipay\AlipayProfit;
+use app\utils\Notice\NoticeSend;
+use app\utils\Share\BonusPool;
+use app\utils\Wechat\Wechat;
+use app\utils\Wechat\WechatMini;
+use app\utils\Wechat\WechatShare;
+use app\utils\WechatMerchant\Merchant;
+use app\utils\yunst\src\OrderYunst;
+use EasyWeChat\Factory;
+use yii\helpers\Json;
+use yii\base\Event;
+use yii\db\Expression;
+use app\utils\Adapay\Adapay;
+
+/**
+ * 事件类
+ * Class TestEvent
+ * @package app\events
+ */
+class OrderEvent extends Event
+{
+    public $store_id = 1;
+
+    public function onLoad() {
+    }
+
+    public function orderGrossProfit() {
+        try{
+            $list = Order::find()->where(['is_gross_profit' => 0])->limit(10)->asArray()->all();
+            $form = new \app\modules\admin\models\CostProfitListForm();
+            $form->commonData($list);
+            foreach ($list as $item) {
+                Order::updateAll(['is_gross_profit' => 1, 'gross_profit' => $item['profit']], ['id' => $item['id']]);
+            }
+
+        } catch (\Exception $ex) {
+            \Yii::error($ex);
+        }
+    }
+
+
+
+    public function shareLevel($store_id) {
+        try {
+            // 1 parent_id = u
+            // 2 parent_id = a   a parent_id = u
+            // 3 parent_id = b   c parent_id = d   d parent_id = u
+
+            $share_level = ShareLevel::find()->where(['store_id' => $store_id, 'is_delete' => ShareLevel::SHARE_NOT_DELETE, 'status' => ShareLevel::STATUS_ON, 'is_auto_upgrade' => ShareLevel::AUTO_UPGRADE])
+                ->orderBy('level ASC')->asArray()->all();
+            foreach ($share_level as $level) {
+                $user_arr = Share::find()->where(['store_id' => $store_id, 'status' => Share::SHARE_AUDIT_PASS, 'is_delete' => Share::SHARE_NOT_DELETE])
+                    ->andWhere(['<', 'level', $level['level']])->select('id, user_id, level')->asArray()->all();
+		        $level['type'] = intval($level['type']);
+                foreach ($user_arr as $item) {
+                    $open = false;
+                    $type = 0;
+                    $value = 0;
+                    //团队人数
+                    if ($level['type'] === ShareLevel::TYPE_MEMBER) {
+                        $user_count = User::find()->where(['parent_id' => $item['user_id'], 'is_delete' => User::USER_NOT_DELETE, 'store_id' => $store_id, 'is_distributor' => 1])
+                            ->select('id')->count() ?? 0;
+                        if (intval($level['value']) <= $user_count) {
+                            $open = true;
+                            $type = ShareLevel::TYPE_MEMBER;
+                            $value = $user_count;
+                        }
+                    }
+
+                    //累计佣金
+                    if ($level['type'] === ShareLevel::TYPE_COMMISSION) {
+                        $user_share_money = UserShareMoney::find()->where(['type' => 0, 'is_delete' => 0, 'user_id' => $item['user_id'], 'store_id' => $store_id])
+                            ->select('money')->sum('money') ?? 0;
+                        if (intval($level['value']) <= $user_share_money) {
+                            $open = true;
+                            $type = ShareLevel::TYPE_COMMISSION;
+                            $value = $user_share_money;
+                        }
+                    }
+
+                    //累计提现佣金
+                    if ($level['type'] === ShareLevel::TYPE_SEND_COMMISSION) {
+                        $user_share_money_ = UserShareMoney::find()->where(['type' => 1, 'is_delete' => 0, 'user_id' => $item['user_id'], 'store_id' => $store_id])
+                            ->select('money')->sum('money') ?? 0;
+                        if (intval($level['value']) <= $user_share_money_) {
+                            $open = true;
+                            $type = ShareLevel::TYPE_SEND_COMMISSION;
+                            $value = $user_share_money_;
+                        }
+                    }
+
+                    //累计消费金额
+                    if ($level['type'] === ShareLevel::TYPE_AMOUNT) {
+                        $user_pay_price = Order::find()->where(['is_pay' => 1, 'is_delete' => 0, 'user_id' => $item['user_id'], 'store_id' => $store_id])
+                                ->andWhere(['trade_status' => [Order::ORDER_FLOW_NO_SEND, Order::ORDER_FLOW_SEND, Order::ORDER_FLOW_CONFIRM]])
+                                ->select('pay_price')->sum('pay_price') ?? 0;
+                        if (intval($level['value']) <= $user_pay_price) {
+                            $open = true;
+                            $type = ShareLevel::TYPE_AMOUNT;
+                            $value = $user_pay_price;
+                        }
+                    }
+                    if ($open) {
+                        $share = Share::findOne($item['id']);
+                        $share->level = $level['level'];
+                        if ($share->save()) {
+                            $log = new ShareLevelLog();
+                            $log->level = $level['level'];
+                            $log->old_level = $item['level'];
+                            $log->type = $type;
+                            $log->value = $value;
+                            $log->store_id = $store_id;
+                            $log->user_id = $item['user_id'];
+                            $log->save();
+                        }
+
+
+                    }
+                }
+
+
+
+            }
+
+
+
+
+            return [
+                'code' => 0,
+                'msg' => '处理完成'
+            ];
+        } catch (\Exception $e) {
+            return [
+                'code' => 1,
+                'msg' => $e->getMessage()
+            ];
+        }
+    }
+
+    public function storeWxOrderShipping() {
+        try{
+            $form = new \app\modules\admin\models\WechatThirdForm(['store_id' => $this->store_id]);
+            $form->storeWxOrderShipping($this->store_id);
+        } catch (\Exception $ex) {
+//            \Yii::error($ex);
+        }
+    }
+
+    public function otherThird() {
+        // 处理商户进件状态
+        $this->handleMerchant();
+        $this->handleMerchant(1);
+    }
+    /**
+     * 执行奖金池自动发放
+     * @return void
+     */
+    public function reportPool() {
+        //自动检查奖金池是否需要新增
+        $this->autoCheckPool();
+        // 处理奖金池自动发放
+        $this->autoReportPool();
+    }
+
+    public function bonusPool() {
+    }
+
+    public function autoReportPool()
+    {
+        $ReportPoolArray = ReportPool::find()->where(['store_id'=>$this->store_id])
+            ->andWhere(['is_send'=>0])
+            ->andWhere(['!=','reward_amount',0])
+            ->andWhere(['<=', 'end_time',time()])
+//            ->andWhere(['<=', 'start_time',time()])
+            ->orderBy('id asc')
+           ->asArray()
+            ->all();
+        if(empty($ReportPoolArray)){
+            return;
+        }
+        \Yii::error('---------------------- REPORT POOL BEHAVIOR START------------------' . $this->store_id . '--' . count($ReportPoolArray));
+        if (!empty($ReportPoolArray)) {
+
+            foreach ($ReportPoolArray as $ReportPoolItem) {
+
+
+                $report_info_num = ReportInfo::find()->where(['store_id' => $ReportPoolItem['store_id'], 'pool_id'=> $ReportPoolItem['id'], 'status' => 1])->one();
+
+                if (!$report_info_num){
+                    debug_log('奖金池没有报单,奖金池id:' . $ReportPoolItem['id']);
+                    continue;
+
+                }
+
+                //发放奖励到每个level中
+                //查看所有奖励记录的积分
+                $report_bonus_sum = ReportPoolLevel::find()
+                    ->where(['store_id' => $ReportPoolItem['store_id'], 'pool_id' => $ReportPoolItem['id']])
+                    ->sum('money');
+
+                $report_level_list = ReportPoolLevel::find()
+                    ->where(['store_id' => $ReportPoolItem['store_id'], 'pool_id' => $ReportPoolItem['id']])
+                    ->asArray()
+                    ->all();
+
+                foreach ($report_level_list as $key => $report_level_item){
+                    // 总积分/奖励金额 * 个人奖励积分
+                    //奖励金额计算
+                    $reward_amount = $report_bonus_sum / $ReportPoolItem['reward_amount'] * $report_level_item['money'];
+
+                    //发放奖励到用户表当中记录
+                    $user = User::findOne($report_level_item['user_id']);
+                    $user->updateCounters(['global_money_total' => $reward_amount, 'global_money' => $reward_amount]);
+
+                    $report_level_info = ReportPoolLevel::findOne($report_level_item['id']);
+                    $report_level_info->is_send = 1;
+                    $report_level_info->dividend_money = $reward_amount;
+                    $report_level_info->send_time = time();
+
+                    if (!$report_level_info->save()){
+                        debug_log('分发用户id:'.$report_level_info->id.'奖金池id:'.$ReportPoolItem['id']);
+                    }
+
+
+                }
+
+                //奖金池也设置已完成
+                ReportPool::updateAll(['is_send'=>1,'send_time'=>time()],['id' => $ReportPoolItem['id']]);
+
+                //报单列表更新已完成
+                ReportInfo::updateAll(['is_send'=>1,'send_time'=>time()],['pool_id' => $ReportPoolItem['id']]);
+
+            }
+        }
+
+        \Yii::error('---------------------- REPORT POOL BEHAVIOR END------------------');
+
+        return false;
+    }
+
+    /**
+     * 检查奖金池是否需要新增
+     * @return void
+     */
+    public function autoCheckPool()
+    {
+        $list = ReportPool::find()->where(['store_id'=>$this->store_id])
+            ->andWhere(['>=', 'end_time',time()])
+            ->andWhere(['<=', 'start_time',time()])
+            ->andWhere(['is_send'=>0])
+            ->orderBy('id asc')
+            ->asArray()
+            ->one();
+
+        if(!$list){
+
+            $report_setting = ReportSetting::findOne(['store_id' => $this->store_id]);
+
+            if (!$report_setting->dividend_day){
+                debug_log('未设置奖金池分红周期');
+               return;
+            }
+
+            //如果奖金池不存在就新增奖池
+            $pool_info = new ReportPool();
+            $pool_info->store_id = $this->store_id;
+            $pool_info->start_time = time();
+            $pool_info->end_time = time() + $report_setting->dividend_day * 24 * 60 * 60;
+            $pool_info->created_at = time();
+
+            $pool_info_copy = ReportPool::find()->where(['store_id'=>$this->store_id])
+                ->orderBy('id desc')
+                ->one();
+
+            if ($pool_info_copy){
+                $pool_info->number = $pool_info_copy->number+1;
+            }else{
+                $pool_info->number =1;
+            }
+
+            if (!$pool_info->save()){
+                debug_log('奖金池新增失败');
+            }
+        }
+
+    }
+    public function handleMerchant($is_yunst = 0) {
+        $list = MerchantInfo::find()->where(['!=', 'state', Merchant::APPLYMENT_STATE_FINISHED])
+                ->andWhere(['!=', 'state', Merchant::APPLYMENT_STATE_CANCELED])
+                ->andWhere(['>', 'status', 0])
+                ->andWhere(['bind_store_id' => $this->store_id, 'is_yunst' => $is_yunst, 'is_delete' => 0])->asArray()->all();
+        if(empty($list)){
+            return;
+        }
+        \Yii::error('---------------------- HANDLE MERCHANT BEHAVIOR START------------------' . $this->store_id . '--' . count($list));
+
+        if (!empty($list)) {
+            try {
+                if ($is_yunst) {
+                    $merchant = new \app\utils\yunst\src\Merchant();//通联支付
+                } else {
+                    $merchant = new Merchant();
+                }
+            } catch (\Exception $e) {
+                \Yii::error(['---------------------- HANDLE MERCHANT BEHAVIOR CONFIG ERROR------------------', $e->getMessage()]);
+                return;
+            }
+            foreach ($list as $value) {
+                if ($is_yunst) {
+                    $res = $merchant->queryMerchantStatus($value['applyment_id']);//通联支付
+                } else {
+                    $res = $merchant->queryApplyment($value['applyment_id'], $value['business_code']);
+                    if (isset($res['code']) && isset($res['msg'])) {
+                        \Yii::warning(['<=================> 未获取到申请单信息', $res, $value['business_code']]);
+                        continue;
+                    }
+                }
+                \Yii::warning(['<=================> 获取到申请单信息', $res, $value['business_code']]);
+
+                $merchant_info = MerchantInfo::findOne($value['id']);
+
+		        //通联支付 start
+                if ($is_yunst) {
+                    $merchant_info->state = (string)$res['data']['auditstatus'];
+                    if ($res['data']['auditstatus'] == '00'){
+                        $status = 0;
+                    }elseif ($res['data']['auditstatus'] == '01'){
+                        $status = 1;
+                    }elseif ($res['data']['auditstatus'] == '02'){
+                        $status =3;
+                    } elseif ($res['data']['auditstatus'] == '03'){
+                        $status =2;
+                    } elseif ($res['data']['auditstatus'] == '04'){
+                        $status =2;
+                    }
+                    $merchant_info->status = $status;
+                    //通联支付end
+                } else {
+                    $merchant_info->state = (string)$res['applyment_state'];
+                    $merchant_info->status = Merchant::$valid_state_status[$res['applyment_state']];
+                    if ($res['applyment_state'] === 'APPLYMENT_STATE_CANCELED') {//已撤销
+                        $merchant_info->refuse_desc = "申请单已被撤销,请重新申请";
+                    }
+                }
+
+                $merchant_info->sign_url = "";
+                $merchant_info->refuse_desc = "";
+
+		        //通联支付 start
+                if ($is_yunst) {
+                    if ($res['data']['auditstatus'] == '03' || $res['data']['auditstatus'] == '04' ) {//已撤销
+                        $merchant_info->refuse_desc = $res['subMsg'];
+                    }
+                    //通联支付 end
+                } else {
+                    if (!empty($res['sign_url']) && in_array($res['applyment_state'], ["APPLYMENT_STATE_TO_BE_SIGNED", "APPLYMENT_STATE_TO_BE_CONFIRMED"])) {
+                        $merchant_info->status = 1;
+                        $merchant_info->sign_url = json_encode([
+                            'applyment_state_msg' => $res['applyment_state_msg'],
+                            'sign_url' => $res['sign_url']
+                        ]);
+                    }
+                     //待用户验证
+
+                    if ($res['applyment_state'] == Merchant::APPLYMENT_STATE_REJECTED) {
+                        if($res['audit_detail']){
+                            $refuse_desc = [];
+                            foreach ($res['audit_detail'] as $idetail) {
+                                $refuse_desc[] = $idetail['field_name'] . ':' . $idetail['reject_reason'];
+                            }
+                            $merchant_info->refuse_desc .= implode(';;;', $refuse_desc);
+                        }
+
+                    }
+                    $merchant_info->sub_mch_id = $res['sub_mchid'];
+                }
+
+
+
+
+                //通联支付 start
+                if ($is_yunst) {
+
+                    if ($res['data']['auditstatus'] == '02') {
+                        $merchant_info->sub_mch_id = $res['data']['merid'];
+                        $store_info = Store::findOne(['id' => $merchant_info->store_id]);
+                        $store_info->cusid = $res['data']['merid'];
+                        $store_info->save();
+                    }
+                }
+                //通联支付 end
+
+
+
+                if ($merchant_info->save()) {
+                    //如果已经完成并且又商户号则开始替换商城配置信息
+                    if ($res['sub_mchid'] && $res['applyment_state'] == Merchant::APPLYMENT_STATE_FINISHED) {
+                        $WechatConfig = WechatConfig::find()->where(['store_id' => $merchant_info->bind_store_id])->one();
+                        if(empty($WechatConfig)){
+                            $WechatConfig = new WechatConfig;
+                            $WechatConfig->store_id = $merchant_info->bind_store_id;
+                            $WechatConfig->created_at = time();
+                            $WechatConfig->updated_at = time();
+                            $WechatConfig->app_id = '0';
+                            $WechatConfig->app_secret = '0';
+                        }
+                        $WechatConfig->mch_id = $res['sub_mchid'];
+                        $res = $WechatConfig->save();
+                    } elseif (empty($res['sub_mchid']) && $res['applyment_state'] == Merchant::APPLYMENT_STATE_FINISHED) {
+                        $merchant_info->status = 2;
+                        $merchant_info->state = Merchant::APPLYMENT_STATE_REJECTED;
+                        $merchant_info->refuse_desc = Json::encode([
+                            'field' => "subject_type",
+                            'reject_reason' => "进件已完结,请重新提交资料信息"
+                        ]);
+                    }
+//                    \Yii::warning(['<=================> 更新申请单信息失败', $value['business_code'], $res]);
+                }
+            }
+        }
+
+        \Yii::error('---------------------- HANDLE MERCHANT BEHAVIOR END------------------');
+
+        return false;
+
+
+    }
+
+    /**
+     * 门店收益计算
+     */
+    public function handleMdProfit($order_id) {
+        $md_profit = MdProfit::findOne(['order_id' => $order_id, 'is_send' => 0]);
+        if ($md_profit) {
+            $md = Md::findOne($md_profit->md_id);
+            $md->updateCounters(['total_profit' => $md_profit->total_profit, 'cash_profit' => $md_profit->total_profit]);
+            $md_profit->is_send = 1;
+            $md_profit->save();
+        }
+    }
+    /**
+     * 处理过期优惠券
+     */
+    public function handleCoupon() {
+//        \Yii::warning('---- COUPON BEHAVIOR START ----');
+        $coupon_list = UserCoupon::find()->alias('uc')->where([
+            'uc.is_use' => 0,
+            'uc.is_delete' => 0,
+            'uc.is_expire' => 0,
+            'uc.store_id' => $this->store_id
+        ])->leftJoin(['c' => Coupon::tableName()], 'c.id=uc.coupon_id')->select('uc.id, uc.begin_time, uc.end_time, c.expire_type')->asArray()->all();
+        if (empty($coupon_list)) {
+//            \Yii::warning('无可操作优惠券数据');
+            return;
+        }
+        foreach ($coupon_list as $value) {
+            if ($value['expire_type'] == 1 ) {
+                if ($value['end_time'] < 1) {
+                    continue;
+                } else {
+                    if (time() > $value['end_time']) {
+                        UserCoupon::updateAll(['is_expire' => 1, 'updated_at' => time()], [
+                            'id' => $value['id'],
+                        ]);
+                        continue;
+                    }
+                }
+            }
+            if ($value['expire_type'] == 2) {
+                if (time() > strtotime(date('Y-m-d 23:59:59', $value['end_time']))) {
+                    UserCoupon::updateAll(['is_expire' => 1, 'updated_at' => time()], [
+                        'id' => $value['id'],
+                    ]);
+                    continue;
+                }
+            }
+        }
+//        \Yii::warning('---- COUPON BEHAVIOR END ----');
+    }
+    /**
+     * 订单自动收货 (废弃)
+     */
+    private function orderConfirm()
+    {
+        $time = time();
+        $delivery_time = (Option::get(OptionSetting::STORE_DELIVERY_TIME, $this->store_id, 0)['value']);
+	    if ($delivery_time !== null) {
+            $delivery_time = $time - ((int)$delivery_time * 86400);
+
+            //不处理视频号小店订单
+            $field_order_id = VideoShopOrderExt::find()->where(['store_id' => $this->store_id, 'is_delete' => 0])->select('order_id')->column();
+
+            $order_confirm = Order::find()->where([
+                'is_delete' => 0, 'trade_status' => Order::ORDER_FLOW_SEND, 'store_id' => $this->store_id
+            ])->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CONFIRM])->andWhere(['<=', 'send_time', $delivery_time])->andWhere(['NOT IN', 'id', $field_order_id])->all();
+
+            foreach ($order_confirm as $k => $v) {
+                /**
+                 * @var Order $v
+                 */
+                //如果是代理配送 且上门安装,用户没有对商品确认收货则不可确认收货
+                $order_detail = OrderDetail::findAll(['order_id' => $v->id]);
+                $is_can_confirm = true;
+
+
+
+                foreach ($order_detail as $detail) {
+                    $is_can_confirm_sub = ((bool)AgentGoodsInstallLog::findOne(['order_detail_id' => $detail->id, 'status' => [0, 1], 'is_need_install' => 1, 'order_type' => AgentGoodsInstallLog::ORDER_TYPE_NORMAL]));
+                    if ($is_can_confirm_sub) {
+                        $is_can_confirm = false;
+                    }
+                }
+                //如果是同城配送平台自配方式,判断骑手是否送达,如果未送达则不可以确认收货
+                $delivery_info = DeliveryInfo::findOne(['order_no' => $v->order_no]);
+                if ($delivery_info) {
+                    if($delivery_info->local_status != DeliveryInfo::LOCAL_STATUS_CONFIRM) {
+                        $is_can_confirm = false;
+                    }
+                }
+
+                if ($is_can_confirm) {
+                    Order::updateAll(['trade_status' => Order::ORDER_FLOW_CONFIRM, 'confirm_time' => time()], ['id' => $v->id]);
+                    if ($v->pay_type == 2) {
+                        $v->is_pay = 1;
+                        $v->save();
+                    }
+                    $t = \Yii::$app->db->beginTransaction();
+                    if($delivery_info->local_status == DeliveryInfo::LOCAL_STATUS_CONFIRM) {
+                        /* 骑手完成订单后发放收入 */
+                        $courier = LocalDeliveryCourier::findOne(['id' => $delivery_info->rider_id, 'is_delete' => 0, 'state' => 2]);
+                        //同城配送设置相关
+                        $store_id = 0;
+                        if (intval($delivery_info->is_store_delivery_type)) {
+                            $store_id = $courier->store_id;
+                        }
+                        $values = Option::find()->where([
+                            'store_id' => $store_id,
+                            'group' => OptionSetting::LOCAL_DELIVERY_GROUP_NAME, 'name' => OptionSetting::LOCAL_DELIVERY_SETTING
+                        ])->select('value')->one();
+                        $local_setting = json_decode($values->value, true);
+
+                        if (!empty($courier)) {
+                            if ($store_id > 0) {
+                                $local_setting['default_cost']['value'] = -1;
+                            }
+                            $amount = (float)$local_setting['default_cost']['value'] == -1 ? $delivery_info->fee : (float)$local_setting['default_cost']['value'];
+                            $log = LocalDeliveryLog::saveLog($courier->saas_user_id, $amount, 1, 1, $v->id, "骑手配送收入:" . $amount . "元");
+                            if (!$log) {//发放骑手佣金报错
+                                \Yii::warning('---- ORDER CONFIRM 订单完成发放骑手收入失败,order_id='.$v->id.' ----');
+                                $t->rollBack(); //事务回滚
+                                continue;
+                            }
+                        }
+
+                    }
+                    $t->commit();
+                }
+            }
+        }
+    }
+
+    /**
+     * 处理过了售后期且没有售后的订单
+     */
+    public function orderSend($type = 0, $order_id = [], $store_id = 0, $after_sale_time = 0, $is_handle_video_order = 0)
+    {
+        $time = time();
+        if ($type) {
+            $sale_time = $time - ((int)$after_sale_time * 86400);
+            $where = [
+                'and',
+                ['o.store_id' => $store_id],
+                ['o.id' => $order_id],
+                ['o.is_delete' => 0, 'o.trade_status' => Order::ORDER_FLOW_CONFIRM,  'o.is_sale' => 0],
+                ['<=', 'o.confirm_time', $sale_time],
+            ];
+            $this->store_id = $store_id;
+        } else {
+            $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id, 0)['value'];
+            $sale_time = $time - ((int)$after_sale_time * 86400);
+            $where = [
+                'and',
+                ['o.store_id' => $this->store_id],
+                ['o.is_delete' => 0, 'o.trade_status' => Order::ORDER_FLOW_CONFIRM,  'o.is_sale' => 0],
+                ['<=', 'o.confirm_time', $sale_time],
+            ];
+        }
+        //不处理视频号小店订单
+        $field_order_id = [];
+        if ($is_handle_video_order) {
+            $field_order_id = VideoShopOrderExt::find()->where(['store_id' => $this->store_id, 'is_delete' => 0])->select('order_id')->column();
+        }
+
+
+
+        $order_list = Order::find()->alias('o')
+            ->where($where)->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CANCEL])->andWhere(['NOT IN', 'o.id', $field_order_id])
+            ->leftJoin(OrderRefund::tableName() . ' r', "r.order_id = o.id and r.is_delete = 0")
+            ->select(['o.*'])->groupBy('o.id')
+            ->andWhere([
+                'or',
+                'isnull(r.id)',
+                ['r.type' => 2],
+                ['in', 'r.status', [2, 3]]
+            ])->offset(0)->limit(50)->asArray()->all();
+        $store_info = Store::findOne($this->store_id);
+        $order_id_arr = [];
+        try {
+            $order_id_arr = $this->profitSharing($sale_time, $this->store_id);
+        } catch (\Exception $e) {
+            \Yii::warning('---- COUPON BEHAVIOR END分账失败 ----' . $e->getMessage());
+        }
+        foreach ($order_list as $index => $value) {
+            if (in_array($value['id'], $order_id_arr ?? [])) {
+                continue;
+            }
+
+            try {
+                //检测微信是否收货
+                Wechat::init($this->store_id);
+                $app = Wechat::$wechat_mini;
+                $form = new \app\modules\admin\models\WechatThirdForm(['store_id' => $this->store_id]);
+                $order_ = Order::find()->where(['id' => $value['id']])->asArray()->one();
+                if($form->wxOrderStateIsConfirm($app, $order_)){
+                    //如果没有添加成功分账接收人就完结分账
+                    $share_receiver = SharingReceiver::findOne(['store_id' => $this->store_id, 'order_no' => $value['order_no']]);
+                    if (!$share_receiver) {
+                        $res = WechatShare::complete($value['transaction_id'], $value['id'], false,  '分账完结', $this->store_id, $value['is_platform'] );
+                        debug_log('分账完结_', 'wechatShare.log');
+                        debug_log($res, 'wechatShare.log');
+                    }
+                }
+            } catch (\Exception $e) {
+                debug_log($e->getMessage(), 'wechatShare.log');
+            }
+
+
+            Order::updateAll(['is_sale' => 1, 'updated_at' => time()], ['id' => $value['id']]);
+            \app\models\ActivityRebateOrderNLog::priceInfoOrderId($value['id']);
+            BonusPool::generalUserConsume($value['user_id'], $value['store_id']);
+            BonusPool::sendTwoPlusOneTeamLevelShare($value['id']);
+            BonusPool::sendArea($value['id']);
+            BonusPool::userAuto2ShareHolder($value['id']);
+            BonusPool::userSelfBuyGoods2ShareHolder($value['id']);
+
+            $this->share_money($value['id']);
+            $this->share_holder_money($value['id']);
+            $this->give_integral($value['id']);
+            $this->shop_share($value['id']);
+            $this->league_price($value['id']);
+            // 门店收益
+            if ($value['md_id'] > 0) {
+                $this->handleMdProfit($value['id']);
+            }
+            BonusPool::sendRange($value['id']);
+            // 奖金池补充奖金
+            BonusPool::poolPush($value['id']);
+            $this->sendVideoGoodsProfit($value['id']);
+
+            //代理发放佣金
+            $this->agencyPrice($value['id']);
+
+            //产品代理发放佣金
+            $this->sendGoodsAgentMoney($value['id']);
+            try {
+                // 处理供应链平台商户号收款店铺结算
+                if ($value['is_use_platform_mch'] == 1 && $value['pay_type'] == 1) {
+                    $profit = $value['pay_price'] * $store_info->transfer_profit / 100;
+                    $price = $value['pay_price'] - $profit;
+                    Store::addMoney($store_info, $price, '用户下单', $value['id'], $value['user_id']);
+                }
+            } catch (\Exception $e) {
+                // Todo
+            }
+
+            try {
+                //服务人员分佣
+                $workerProfitSend = \app\modules\admin\models\worker\WorkerForm::workerProfitSend($value['id']);
+                debug_log(['服务人员分佣', $value['id'], $workerProfitSend], __CLASS__ . '.log');
+
+            } catch (\Exception $e) {
+                \Yii::error($e);
+            }
+
+        }
+    }
+
+    //分账 订单分账失败重新分账
+    public function profitSharing($sale_time, $store_id)
+    {
+        $order_id_arr = [];
+        try {
+            $SharingReceiver = SharingReceiver::find()->where(['is_pay' => SharingReceiver::PAY_WAIT])->andWhere(['store_id' => $store_id])->groupBy('order_no')->asArray()->all();
+            foreach ($SharingReceiver as $item) {
+                $orderNoHead = substr($item['order_no'], 0, 2);
+                $model = Order::find();
+                $where = [];
+                switch ($orderNoHead) {
+                    case 'ML':
+                    case 'AL':
+                        //商盟会员购物订单
+                        $model = Order::find();
+                        $where = ['AND', [
+                            'order_no' => $item['order_no'],
+                            'is_delete' => 0,
+                            'trade_status' => Order::ORDER_FLOW_CONFIRM
+                        ], ['<=', 'confirm_time', $sale_time + 60]];
+                        break;
+                    case 'SC':
+                        //当面付订单
+                        $model = \app\plugins\scanCodePay\models\Order::find();
+                        $where = [
+                            'order_no' => $item['order_no'],
+                            'is_delete' => 0,
+                            'is_pay' => 1
+                        ];
+                        break;
+                }
+                $order = $model->where($where)->one();
+                if ($item['execute_type'] == SharingReceiver::EXECUTE_TYPE_NORMAL) {
+                    // 微信
+                    try {
+                        $order_id_arr = $this->wechatProfitSharing($order);
+                    } catch (\Exception $e) {
+                        \Yii::warning('---- COUPON BEHAVIOR END微信分账失败 ----');
+                    }
+                }
+                if ($item['execute_type'] == SharingReceiver::EXECUTE_TYPE_ALIPAY) {
+                    // 支付宝
+                    try {
+                        $this->alipayProfitSharing($order);
+                    } catch (\Exception $e) {
+                        \Yii::warning('---- COUPON BEHAVIOR END支付宝分账失败 ----' . $e->getMessage());
+                    }
+                }
+            }
+        } catch (\Exception $e) {
+            \Yii::warning('---- COUPON BEHAVIOR END ----');
+        }
+        return $order_id_arr;
+    }
+
+    private function saasUserPriceLog($order, $SharingReceivers = [], $expend = false, $log = '') {
+        try {
+            $log_type = SaasUserPriceLog::LOG_TYPE_INCOME;
+            $remark = '';
+            if($expend){
+                $log_type = SaasUserPriceLog::LOG_TYPE_EXPEND;
+                $remark = '-分账成功';
+            }
+            $log && $remark = $log;
+            foreach ($SharingReceivers as $item) {
+                \Yii::warning(['---- saasUserPriceLog Err11 ----', $item]);
+                if(in_array($item['type'], [SharingReceiver::RECEIVE_MERCHANT_ID])){
+                    continue;
+                }
+                $desc = $item['remark'] . $remark;
+                $saas_id = $item['saas_id'];
+                if(!$saas_id){
+                    if(!$order->is_platform){
+                        $saas_id = $item['user_id'];
+                    }else{
+                        $userInfo = User::findOne($item['user_id']);
+                        if(!empty($userInfo)){
+                            $saas = SaasUser::findOne(['mobile' => $userInfo->binding]);
+                            $saas_id = $saas->id;
+                        }
+                    }
+                }
+                \Yii::warning(['---- saasUserPriceLog Err22 ----', $saas_id, $item['amount'], $item['from'], $log_type, $order->order_no, $desc]);
+                SaasUserPriceLog::saveLog($saas_id, $item['amount'], $item['from'], $log_type, $order->order_no, $desc);
+            }
+        } catch (\Exception $e) {
+            \Yii::warning('---- saasUserPriceLog Err ----' . __LINE__);
+        }
+    }
+
+    /**
+     * 积分发放
+     */
+    private function give_integral($id)
+    {
+        $give = Order::findOne($id);
+        if ($give['give_integral'] != 0) {
+            return;
+        }
+        $integral = OrderDetail::find()
+            ->andWhere(['order_id' => $give['id'], 'is_delete' => 0])
+            ->select([
+                'sum(integral)',
+            ])->scalar();
+        if (!$integral) {
+            return;
+        }
+        $giveUser = User::findOne(['id' => $give['user_id']]);
+        $give->give_integral = 1;
+        $give->save();
+
+        AccountLog::saveLog($giveUser->id, $integral, AccountLog::TYPE_INTEGRAL,
+            AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+            $give->id, '订单'.$give->order_no.'赠送积分');
+    }
+
+
+    // 团长佣金结算
+    private function shop_share($id,$type=0)
+    {
+        if ($id) {
+            $shopShare = ShopShare::findOne([
+                'order_id' => $id,
+                'type' => $type
+            ]);
+            if ($shopShare->shop_id && $shopShare->status == 0) {
+                $shop = Shop::findOne($shopShare->shop_id);
+                if ($shop && $shop->user_id) {
+                    $form = User::findOne(['id' => $shop->user_id]);
+                    $form->updateCounters(['tuan_price' => $shopShare->amount]);
+                    $shopShare->status = 1;
+                    $shopShare->save();
+                }
+            }
+        }
+    }
+
+    /**
+     * 分销订单佣金结算
+     * @param Order $order
+     */
+    private function sendOrderProfit($order, $expire_day = 0) {
+        if (!$order->share_order_profit) {
+            \Yii::warning('订单佣金可分发值为0');
+            return;
+        }
+        $user_share = UserShareLog::find()->where(['user_id' => $order->user_id])->orderBy('created_at desc')->limit(1)->asArray()->one();
+        \Yii::warning($user_share);
+        if (empty($user_share)) {
+            \Yii::warning('订单佣金未找到分享关系');
+            return;
+        }
+        if ($expire_day > 0) {
+            if ($order->pay_time - $user_share['created_at'] > $expire_day * 24 * 3600) {
+                \Yii::warning('订单佣金分享关系已过期');
+                return;
+            }
+        }
+        $user = User::findOne($user_share['parent_id']);
+        if (!$user) {
+            \Yii::warning('订单佣金未找到分享关系用户');
+            return;
+        }
+        if ($order->share_send_type == 2) {
+            AccountLog::saveLog($user_share['parent_id'], $order->share_order_profit, AccountLog::TYPE_INTEGRAL,
+                AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                $order->id, "商城订单佣金赠送积分, 订单号:{$order->order_no}");
+        } else if ($order->share_send_type == 3) {
+            AccountLog::saveLog($user_share['parent_id'], $order->share_order_profit, AccountLog::TYPE_BALANCE,
+                AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                $order->id, "商城订单佣金赠送余额, 订单号:{$order->order_no}");
+        } else {
+            $user->updateCounters(['total_price' => doubleval($order->share_order_profit), 'price' => doubleval($order->share_order_profit)]);
+            $order->updateCounters(['share_price' => doubleval($order->share_order_profit)]);
+            UserShareMoney::set($order->share_order_profit, $user->id, $order->id, 0, 5, $order->store_id, 0);
+        }
+    }
+    private function league_price($id){
+        $order = Order::findOne($id);
+        $store = Store::findOne($this->store_id);
+        $user = User::findOne($order->user_id);
+        $saas_user = SaasUser::findOne(['mobile' => $user->binding]);
+        if($order->send_price > 0){ // && $store->league_price > 0
+            //给用户发放联盟券
+            $send_price = $order->send_price;
+
+            if($saas_user){
+                $before = $saas_user->league_price;
+                $saas_user->updateCounters(['league_price' => floatval($send_price)]);
+
+                //给用户增加赠送的联盟券
+                SaaSLeaguePriceLog::setLeaguePriceLog(
+                    $order->store_id,
+                    $saas_user->id,
+                    $send_price,
+                    $before,
+                    SaaSLeaguePriceLog::TYPE_ORDER_REBATE,
+                    SaaSLeaguePriceLog::SEND_TYPE,
+                    SaaSLeaguePriceLog::ROLE_USER,
+                    $order->id
+                );
+            }
+
+            //给商家扣减 (用户赠送的联盟券钱从商家从扣减)
+            $before = $store->league_price;
+            $store->updateCounters(['league_price' => -floatval($send_price)]);
+
+
+            //给商家扣减 (用户赠送的联盟券钱从商家从扣减)
+            SaaSLeaguePriceLog::setLeaguePriceLog(
+                $order->store_id,
+                $saas_user->id,
+                $send_price,
+                $before,
+                SaaSLeaguePriceLog::TYPE_ORDER_REBATE,
+                SaaSLeaguePriceLog::TAKE_TYPE,
+                SaaSLeaguePriceLog::ROLE_STORE,
+                $order->id
+            );
+
+        }
+
+        if($order->take_price > 0){
+            //给商家增加 (用户抵扣钱从赠送给商家)
+            $before = $store->league_price;
+            //给商家返券
+            $store->updateCounters(['league_price' => floatval($order->take_price)]);
+
+            SaaSLeaguePriceLog::setLeaguePriceLog(
+                $order->store_id,
+                $saas_user->id,
+                $order->take_price,
+                $before,
+                SaaSLeaguePriceLog::TYPE_ORDER_REBATE,
+                SaaSLeaguePriceLog::SEND_TYPE,
+                SaaSLeaguePriceLog::ROLE_STORE,
+                $order->id
+            );
+
+        }
+    }
+    // 分销订单佣金结算
+    private function share_money($id)
+    {
+        $order = Order::findOne($id);
+        if (!$order) {
+            return;
+        }
+        if ($order->is_price != 0) {
+            return;
+        }
+        //排除商盟订单
+        if($order->user_id == 0) {
+            return;
+        }
+        $setting = Option::get('share_money_setting', $this->store_id);
+        $setting = $setting ? Json::decode($setting['value']) : [];
+        if (!$setting) {
+            \Yii::warning('订单佣金发送:未开启分销设置1');
+            return;
+        }
+        //临时关系佣金发放
+        if (!empty($order->limit_id) && !empty($order->limit_price)) {
+            \Yii::error("临时绑定关系发放佣金", '临时绑定关系发放佣金');
+            //临时绑定关系发放佣金
+            $bind_log = UserBindLog::findOne($order->limit_id);
+            $user = User::findOne($bind_log->parent_id);
+            $user->updateCounters(['total_price' => $order->limit_price, 'price' => $order->limit_price]);
+            UserShareMoney::set($order->limit_price, $user->id, $order->id, 0, 6, $order->store_id, 0);
+            $order->is_send_limit = 1;
+            $order->updateCounters(['share_price' => doubleval($order->limit_price)]);
+            $res = $order->save();
+            if (!$res) {
+                \Yii::error("订单保存失败");
+            };
+        } else {
+            \Yii::error("订单中临时关系佣金为空");
+        }
+
+        $share_setting = Option::get('share_basic_setting', $this->store_id);
+        $share_setting = $share_setting ? Json::decode($share_setting['value']) : [];
+
+        // 分销商自购返利
+        $order->share_price = 0;
+        $user = User::findOne(['id' => $order->user_id]);
+        if ($order->rebate > 0) {
+            if ($order->share_send_type == 2) {
+                AccountLog::saveLog($order->user_id, $order->rebate, AccountLog::TYPE_INTEGRAL,
+                    AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                    $order->id, "商城订单自购返利赠送积分, 订单号:{$order->order_no}");
+            } else if ($order->share_send_type == 3) {
+                AccountLog::saveLog($order->user_id, $order->rebate, AccountLog::TYPE_BALANCE,
+                    AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                    $order->id, "商城订单自购返利赠送余额, 订单号:{$order->order_no}");
+            } else {
+                $user->updateCounters(['total_price' => doubleval($order->rebate), 'price' => doubleval($order->rebate)]);
+                $order->updateCounters(['share_price' => doubleval($order->rebate)]);
+                UserShareMoney::set($order->rebate, $user->id, $order->id, 0, 4, $order->store_id, 0);
+            }
+            $order->is_price = 1;
+        }
+
+        // 一级佣金发放
+        if ($share_setting['level']['value'] >= 1) {
+            $user_1 = User::findOne($order->old_parent_id);
+            if (!$user_1) {
+                $order->save();
+                return;
+            }
+
+            if ($order->share_send_type == 2 && $order->first_price > 0) {
+                AccountLog::saveLog($user_1->id, $order->first_price, AccountLog::TYPE_INTEGRAL,
+                    AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                    $order->id, "商城订单分销赠送积分, 订单号:{$order->order_no}");
+            } else if ($order->share_send_type == 3 && $order->first_price > 0) {
+                AccountLog::saveLog($user_1->id, $order->first_price, AccountLog::TYPE_BALANCE,
+                    AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                    $order->id, "商城订单分销赠送余额, 订单号:{$order->order_no}");
+            } else {
+                $user_1->updateCounters(['total_price' => $order->first_price, 'price' => $order->first_price]);
+                UserShareMoney::set($order->first_price, $user_1->id, $order->id, 0, 1, $order->store_id, 0);
+                $order->updateCounters(['share_price' => doubleval($order->first_price)]);
+            }
+            $order->is_price = 1;
+        }
+        // 二级佣金发放
+        if ($share_setting['level']['value'] >= 2) {
+            $user_2 = User::findOne($order->old_parent_id_1);
+            if ($user_2) {
+                if ($order->share_send_type == 2 && $order->second_price > 0) {
+                    AccountLog::saveLog($user_2->id, $order->second_price, AccountLog::TYPE_INTEGRAL,
+                        AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                        $order->id, "商城订单分销赠送积分, 订单号:{$order->order_no}");
+                } else if ($order->share_send_type == 3 && $order->second_price > 0) {
+                    AccountLog::saveLog($user_2->id, $order->second_price, AccountLog::TYPE_BALANCE,
+                        AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                        $order->id, "商城订单分销赠送余额, 订单号:{$order->order_no}");
+                } else {
+                    $user_2->updateCounters(['total_price' => $order->second_price, 'price' => $order->second_price]);
+                    UserShareMoney::set($order->second_price, $user_2->id, $order->id, 0, 2, $order->store_id, 0);
+                    $order->updateCounters(['share_price' => doubleval($order->second_price)]);
+                }
+            }
+        }
+        // 三级佣金发放
+        if ($share_setting['level']['value'] >= 3 && $order->rebate == 0) {
+            $user_3 = User::findOne($order->old_parent_id_2);
+            if ($user_3) {
+                if ($order->share_send_type == 2 && $order->third_price > 0) {
+                    AccountLog::saveLog($user_3->id, $order->third_price, AccountLog::TYPE_INTEGRAL,
+                        AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                        $order->id, "商城订单分销赠送积分, 订单号:{$order->order_no}");
+                } else if ($order->share_send_type == 3 && $order->third_price > 0) {
+                    AccountLog::saveLog($user_3->id, $order->third_price, AccountLog::TYPE_BALANCE,
+                        AccountLog::LOG_TYPE_INCOME, AccountLog::TYPE_PLATFORM_ORDER,
+                        $order->id, "商城订单分销赠送余额, 订单号({$order->order_no})");
+                } else {
+                    $user_3->updateCounters(['total_price' => $order->third_price, 'price' => $order->third_price]);
+                    UserShareMoney::set($order->third_price, $user_3->id, $order->id, 0, 3, $order->store_id, 0);
+                    $order->updateCounters(['share_price' => doubleval($order->third_price)]);
+                }
+            }
+        }
+        $order->save();
+        return;
+    }
+
+    // 等级分佣结算
+    private function share_holder_money($id)
+    {
+        $order = Order::findOne($id);
+        if (!$order) {
+            return;
+        }
+
+        if ($order->holder_is_price != 0) {
+            return;
+        }
+        //商盟订单没有股东分红
+        if($order->user_id == 0){
+            return;
+        }
+        // 一级佣金发放
+        if ($order->holder_first_price > 0) {
+            $user_1 = User::findOne($order->parent_id);
+            $user_1->updateCounters(['total_price' => $order->holder_first_price, 'price' => $order->holder_first_price]);
+            UserShareMoney::set($order->holder_first_price, $user_1->id, $order->id, 2, 1, $this->store_id, 0);
+            $order->holder_is_price = 1;
+            $order->updateCounters(['share_price' => doubleval($order->holder_first_price)]);
+        }
+
+        // 二级佣金发放
+        if ($order->holder_second_price > 0) {
+            $user_2 = User::findOne($order->parent_id_1);
+            $user_2->updateCounters(['total_price' => $order->holder_second_price, 'price' => $order->holder_second_price]);
+            UserShareMoney::set($order->holder_second_price, $user_2->id, $order->id, 2, 2, $this->store_id, 0);
+            $order->updateCounters(['share_price' => doubleval($order->holder_second_price)]);
+        }
+        // 三级佣金发放
+        if ($order->holder_third_price > 0) {
+            $user_3 = User::findOne($order->parent_id_2);
+            $user_3->updateCounters(['total_price' => $order->holder_third_price, 'price' => $order->holder_third_price]);
+            UserShareMoney::set($order->holder_third_price, $user_3->id, $order->id, 2, 3, $this->store_id, 0);
+            $order->updateCounters(['share_price' => doubleval($order->holder_third_price)]);
+        }
+
+        // 旧关系发放
+        // 一级佣金发放
+        if ($order->old_holder_first_price > 0) {
+            $user_1 = User::findOne($order->old_parent_id);
+            $user_1->updateCounters(['total_price' => $order->old_holder_first_price, 'price' => $order->old_holder_first_price]);
+            UserShareMoney::set($order->old_holder_first_price, $user_1->id, $order->id, 2, 1, $this->store_id, 0);
+            $order->updateCounters(['share_price' => doubleval($order->old_holder_first_price)]);
+        }
+
+        // 二级佣金发放
+        if ($order->old_holder_second_price > 0) {
+            $user_2 = User::findOne($order->old_parent_id_1);
+            $user_2->updateCounters(['total_price' => $order->old_holder_second_price, 'price' => $order->old_holder_second_price]);
+            UserShareMoney::set($order->old_holder_second_price, $user_2->id, $order->id, 2, 2, $this->store_id, 0);
+            $order->updateCounters(['share_price' => doubleval($order->old_holder_second_price)]);
+        }
+        // 三级佣金发放
+        if ($order->old_holder_third_price > 0) {
+            $user_3 = User::findOne($order->old_parent_id_2);
+            $user_3->updateCounters(['total_price' => $order->old_holder_third_price, 'price' => $order->old_holder_third_price]);
+            UserShareMoney::set($order->old_holder_third_price, $user_3->id, $order->id, 2, 3, $this->store_id, 0);
+            $order->updateCounters(['share_price' => doubleval($order->old_holder_third_price)]);
+        }
+        $order->save();
+    }
+
+    private function money($parent_id, $money)
+    {
+        if ($parent_id == 0) {
+            return ['code' => 1, 'parent_id' => 0];
+        }
+        $parent = User::findOne(['id' => $parent_id]);
+        if (!$parent) {
+            return ['code' => 1, 'parent_id' => 0];
+        }
+        $parent->updateCounters(['total_price' => $money, 'price' => $money]);
+        return [
+            'code' => 0,
+            'parent_id' => $parent->parent_id,
+        ];
+    }
+
+    /**
+     * 分账
+     * @param Order | \app\plugins\scanCodePay\models\Order | ReOrder | FoodOrder $order
+     * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
+     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
+     * @throws \GuzzleHttp\Exception\GuzzleException
+     */
+    public function wechatProfitSharing($order) {
+        if (!\Yii::$app->isSaas()) {
+            return;
+        }
+
+        if (!$order) {
+            \Yii::error('<=======================> 微信分账订单不存在');
+            return;
+        }
+        if(in_array($order->pay_type, [Order::PAY_TYPE_ADAPAY_WX, Order::PAY_TYPE_ADAPAY_ALIPAY]) && $this->is_yunst==0){
+            return $this->adapayProfitSharing($order);
+        }
+
+        if(in_array($order->pay_type, [Order::PAY_TYPE_YUNST_WECHAT_PAY, Order::PAY_TYPE_YUNST_ALI_PAY])){
+            //通联支付分账
+            return $this->yunstProfitSharing($order);
+        }
+
+        // 此方法目前为多次分账,故分账结束后,剩余金额需要主动完结分账去触发解冻资金
+
+        $order_id = $order->order_no;
+        $receivers_share = SharingReceiver::find()->where(['store_id' => $order->store_id,
+            'transaction_id' => $order->transaction_id, 'is_pay' => SharingReceiver::PAY_WAIT, 'execute_type' => SharingReceiver::EXECUTE_TYPE_NORMAL])
+            ->asArray()->all();
+
+        $profitOrderId = 0;
+        $receivers_share_ok = SharingReceiver::find()->where(['store_id' => $order->store_id,
+            'transaction_id' => $order->transaction_id, 'is_pay' => SharingReceiver::PAY_SUCCESS, 'execute_type' => SharingReceiver::EXECUTE_TYPE_NORMAL])
+            ->orderBy('id DESC')->asArray()->one();
+        $receivers_share_ok && $profitOrderId = $receivers_share_ok['order_id'];
+        $cacheKey = 'wechatProfitSharing11:' . $order->transaction_id;
+        if(\Yii::$app->cache->get($cacheKey)){
+            \Yii::error('<=======================> 微信分账进程已存在');
+            return;
+        }
+        \Yii::$app->cache->set($cacheKey, 1, 160);
+        $order_id_arr = [];
+        foreach($receivers_share as $receivers_share1){
+            sleep(1);
+
+            //检测微信是否收货
+            Wechat::init($this->store_id);
+
+            $app = WechatMini::getWechatConfig($this->store_id);
+            if (!$app) {
+                array_push($order_id_arr, $order->id);
+                continue;
+            }
+            $form = new \app\modules\admin\models\WechatThirdForm(['store_id' => $this->store_id]);
+            $order_ = Order::find()->where(['id' => $order->id])->asArray()->one();
+
+
+            $orderNoHead = substr($receivers_share1['order_no'], 0, 2);
+            $model = Order::find();
+            $where = [];
+            switch ($orderNoHead) {
+                case 'ML':
+                case 'AL':
+                    //商盟会员购物订单
+                    $model = Order::find();
+                    $where = [
+                        'order_no' => $receivers_share1['order_no'],
+                        'is_delete' => 0,
+                        'trade_status' => Order::ORDER_FLOW_CONFIRM
+                    ];
+                    break;
+                case 'SC':
+                    //当面付订单
+                    $model = \app\plugins\scanCodePay\models\Order::find();
+                    $where = [
+                        'order_no' => $receivers_share1['order_no'],
+                        'is_delete' => 0,
+                        'is_pay' => 1
+                    ];
+                    break;
+            }
+            $order_ = $model->where($where)->asArray()->one();
+
+
+            $res = $form->wxOrderStateIsConfirm($app, $order_);
+            if(!$res){
+                array_push($order_id_arr, $order->id);
+                continue;
+            }
+
+            $profitOrderId || $profitOrderId = $order->order_no;
+            $res = WechatShare::share($order->transaction_id, $profitOrderId, [$receivers_share1], false, false, $order->store_id, $order->is_platform, $order);
+            \Yii::error(['wechatProfitSharingwechatProfitSharing11:', $res]);
+            if ($res['code'] > 0) {
+                $faildDes = !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg'];
+                $faildDes && $faildDes = addslashes('(失败:' . $faildDes . ')');
+                $receivers_share_platform = [[
+                    'type' => SharingReceiver::RECEIVE_MERCHANT_ID,
+                    'account' => Option::get('sp_mch_id', 0, 'saas')['value'],
+                    'amount' => $receivers_share1['amount'],
+                    'name' => Option::get('sp_name', 0, 'saas')['value'],
+                ]];
+                //分到平台
+                if($receivers_share1['type'] == 2){
+                    SharingReceiver::updateAll([
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => !empty($res['res']['err_code']) ? $res['res']['err_code'] : $res['msg'],
+                        'err_code_des' => !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg']], ['id' => $receivers_share1['id']]);
+                    continue;
+                }
+                sleep(1);
+                $res = WechatShare::share($order->transaction_id, $profitOrderId, $receivers_share_platform, false, false, $order->store_id, $order->is_platform, $order);
+                \Yii::error(['分到平台wechatProfitSharingwechatProfitSharing11:', $res]);
+                if ($res['code'] > 0) {
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => !empty($res['res']['err_code']) ? $res['res']['err_code'] : $res['msg'],
+                        'err_code_des' => !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg']], ['id' => $receivers_share1['id']]);
+                    $this->saasUserPriceLog($order, [$receivers_share1]);
+                    $this->saasUserPriceLog($order, [$receivers_share1], true, '-分账失败');
+                }else{
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS, 'order_id' => $res['res']['order_id']], ['id' => $receivers_share1['id']]);
+                    $this->saasUserPriceLog($order, [$receivers_share1]);
+                    $profitOrderId = $res['res']['order_id'];
+                }
+            } else {
+                $order_id = $res['res']['order_id'];
+                SharingReceiver::updateAll(['updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS, 'order_id' => $res['res']['order_id']], ['id' => $receivers_share1['id']]);
+                $this->saasUserPriceLog($order, [$receivers_share1]);
+                $this->saasUserPriceLog($order, [$receivers_share1], true);
+                $profitOrderId = $res['res']['order_id'];
+            }
+        }
+        // 单次分账结束后,剩余金额自动解冻返给商户, 无需主动触发分账完结接口,多次分账时需要最终触发分账完结,最终解冻给商户
+        // 分账完结
+        $res = WechatShare::complete($order->transaction_id, $order_id, false,  '分账完结', $order->store_id, $order->is_platform );
+        return $order_id_arr;
+        \Yii::error(['<=======================> 订单号:' . $order->order_no . '-分账完结结果:', $res]);
+    }
+
+    /**
+     * 自动提现
+     * @return void
+     */
+    public function autoCash($order_id)
+    {
+        $sharing_info = SharingReceiver::find()->where(['order_id' => $order_id, 'is_pay' => SharingReceiver::PAY_SUCCESS])->one();
+        if ($sharing_info){
+            $order_info =  \app\plugins\scanCodePay\models\Order::find()->where(['id' => $sharing_info->order_id])->one();
+            if ($order_info){
+                $store_price =  $sharing_info->amount;
+                $mch_price = ($order_info->pay_price - $sharing_info->amount);
+
+
+                //平台提现
+                $cash = new StoreCash();
+                $cash->order_no = \app\utils\OrderNo::getOrderNo(\app\utils\OrderNo::ORDER_CASH);
+                $cash->is_delete = 0;
+                $cash->status = 0;
+                $cash->price = $store_price;
+                $cash->created_at = time();
+                $cash->store_id = -1;
+                $cash->type =6;//通联提现
+                $cash->name = '平台提现';
+                $cash->mobile = '';
+                $cash->pay_time = 0;
+                $cash->service_charge = 0;
+                $cash->cash_type = 0;
+
+                if ($cash->save()) {
+                    //调用通联自动提现接口
+                    $oldConf = Option::get(OptionSetting::SAAS_YUNST_SETTING, 0, 'saas')['value'];
+                    if ($oldConf) {
+                        $oldConf = json_decode($oldConf, true);
+                        if (!empty($oldConf)) {
+                            $customer_number = $oldConf['customer_number'];
+                            $orderYunst = new OrderYunst();
+//                    $res = $orderYunst->queryAcctInfo('66065100000219T');
+                            $res = $orderYunst->queryAcctInfo($customer_number);
+                            debug_log($res);
+                            $amount = 0;
+                            if ($res['subCode'] == 'SUCCESS'){
+                                $amount = $res['data']['amount'];//真的
+                            }
+
+                            if ($store_price > $amount) {
+                                debug_log('平台提现金额大于通联账户余额');
+                            }
+                            $orderYunst = new OrderYunst();
+                            $data['bizOrderNo'] = $cash->order_no;
+                            $data['bizUserId'] = $customer_number;//代理商号
+                            $data['amount'] = intval($cash->price * 100);
+                            $data['notifyUrl'] = \Yii::$app->request->hostInfo;
+                            $data['remark'] = "";
+                            $data['authWay'] = "3";
+                            $res_cash = $orderYunst->servicerWithdraw($data);
+                            debug_log($res_cash);
+                            if ($res_cash['subCode'] != 'SUCCESS'){
+                                debug_log('平台提现失败');
+                                debug_log($res_cash['subMsg']);
+                                $cash_info2 = StoreCash::findOne($cash->id);
+                                $order_no = \app\utils\OrderNo::getOrderNo(\app\utils\OrderNo::ORDER_CASH);
+                                $cash_info2->order_no = $order_no;
+                                $cash_info2->save();
+                            }else{
+                                $cash_info = StoreCash::findOne($cash->id);
+                                $cash_info->status = 2;
+                                $cash_info->pay_time = time();
+                                $cash_info->save();
+                                debug_log('平台提现成功');
+                            }
+                        }
+                    }
+                }
+
+                //商户提现
+                $cash_mch = new StoreCash();
+                $cash_mch->order_no = \app\utils\OrderNo::getOrderNo(\app\utils\OrderNo::ORDER_CASH);
+                $cash_mch->is_delete = 0;
+                $cash_mch->status = 0;
+                $cash_mch->price = $mch_price;
+                $cash_mch->created_at = time();
+                $cash_mch->store_id = $sharing_info->store_id;
+                $cash_mch->type =6;//通联提现
+                $cash_mch->name = '商户提现';
+                $cash_mch->mobile = '';
+                $cash_mch->pay_time = 0;
+                $cash_mch->service_charge = 0;
+                $cash_mch->cash_type = 0;
+
+                if ($cash_mch->save()) {
+                    //调用通联自动提现接口
+                    $store = \app\models\Store::findOne($sharing_info->store_id);
+                    $orderYunst = new OrderYunst();
+                    $res2 = $orderYunst->queryAcctInfo($store->store_number);
+                    debug_log($res2);
+                    $amount2 = 0;
+                    if ($res2['subCode'] == 'SUCCESS'){
+                        $amount2 = $res2['data']['amount'];//真的
+                    }
+
+                    if ($mch_price > $amount2) {
+                        debug_log('平台提现金额大于通联账户余额');
+                    }
+                    $orderYunst = new OrderYunst();
+                    $data['bizOrderNo'] = $cash_mch->order_no;
+                    $store  = Store::findOne(['id' => $cash_mch->store_id]);
+                    $data['bizUserId'] = $store->store_number;
+                    $data['amount'] = intval($cash_mch->price * 100);
+                    $data['notifyUrl'] = \Yii::$app->request->hostInfo;
+                    $data['remark'] = "";
+                    $data['authWay'] = "3";
+                    $res_cash2 = $orderYunst->servicerWithdraw($data);
+
+                    debug_log($res_cash2);
+
+                    if ($res_cash2['subCode'] != 'SUCCESS'){
+                        debug_log('商户提现失败');
+                        debug_log($res_cash2['subMsg']);
+                        $cash_info2 = StoreCash::findOne($cash_mch->id);
+                        $order_no = \app\utils\OrderNo::getOrderNo(\app\utils\OrderNo::ORDER_CASH);
+                        $cash_info2->order_no = $order_no;
+                        $cash_info2->save();
+                    }else{
+                        $cash_info2 = StoreCash::findOne($cash_mch->id);
+                        $cash_info2->status = 2;
+                        $cash_info2->pay_time = time();
+                        $cash_info2->save();
+                        debug_log('商户提现成功');
+                    }
+                }
+
+
+            }else{
+                debug_log('订单不存在,提现失败');
+            }
+        }else{
+            debug_log('分账不存在,提现失败');
+        }
+
+
+    }
+
+    public function adapayProfitSharing($order) {
+
+        $order_id = $order->order_no;
+        $receivers_share = SharingReceiver::find()->where(['store_id' => $order->store_id,
+            'order_no' => $order->order_no, 'is_pay' => SharingReceiver::PAY_WAIT])
+            ->asArray()->all();
+
+        $profitOrderId = 0;
+        $cacheKey = 'adapayProfitSharing11:' . $order->adapay_payment_id;
+        if(\Yii::$app->cache->get($cacheKey)){
+            \Yii::error('<=======================> adapay分账进程已存在');
+            return;
+        }
+        \Yii::$app->cache->set($cacheKey, 1, 160);
+        foreach($receivers_share as $receivers_share1){
+            sleep(1);
+            $res = Adapay::share($order, $receivers_share1);
+            \Yii::error(['adapayProfitSharingadapayProfitSharing11:', $res]);
+            if ($res['code'] > 0) {
+                $faildDes = $res['msg'];
+                $faildDes && $faildDes = addslashes('(失败:' . $faildDes . ')');
+                //分到平台
+                if($receivers_share1['type'] == 2){
+                    SharingReceiver::updateAll([
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => !empty($res['res']['err_code']) ? $res['res']['err_code'] : $res['msg'],
+                        'err_code_des' => !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg']], ['id' => $receivers_share1['id']]);
+                    continue;
+                }
+                sleep(1);
+                $res = Adapay::shareToSaas($order, $receivers_share1);
+                \Yii::error(['分到平台adapayProfitSharingadapayProfitSharing11:', $res]);
+                if ($res['code'] > 0) {
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => !empty($res['res']['err_code']) ? $res['res']['err_code'] : $res['msg'],
+                        'err_code_des' => !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg']], ['id' => $receivers_share1['id']]);
+                    $this->saasUserPriceLog($order, [$receivers_share1]);
+                    $this->saasUserPriceLog($order, [$receivers_share1], true, '-分账失败');
+                }else{
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS, 'order_id' => $res['res']['order_id']], ['id' => $receivers_share1['id']]);
+                    $this->saasUserPriceLog($order, [$receivers_share1]);
+                }
+            } else {
+                $order_id = $res['res']['order_id'];
+                SharingReceiver::updateAll(['updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS, 'order_id' => $res['res']['order_id']], ['id' => $receivers_share1['id']]);
+                $this->saasUserPriceLog($order, [$receivers_share1]);
+                $this->saasUserPriceLog($order, [$receivers_share1], true);
+            }
+        }
+        // 分账完结
+        \Yii::error(['<=======================> 订单号:' . $order->order_no . '-分账完结结果:']);
+    }
+
+
+    /**
+     * 通联分账
+     * @param $order
+     * @return void
+     */
+    public function yunstProfitSharing($order) {
+
+        $order_id = $order->order_no;
+        /**
+         *  查询待分账的记录
+         */
+        $receivers_share = SharingReceiver::find()->where(['store_id' => $order->store_id,
+            'order_no' => $order->order_no])
+//            ->andWhere(['in','is_pay',[SharingReceiver::PAY_WAIT,SharingReceiver::PAY_FAIL]])
+            ->andWhere(['is_pay'=>SharingReceiver::PAY_WAIT])
+            ->asArray()->all();
+        debug_log('开始分账le');
+        debug_log($receivers_share);
+        $profitOrderId = 0;
+//        $cacheKey = 'yunstProfitSharing:' . $order->adapay_payment_id;
+//        if(\Yii::$app->cache->get($cacheKey)){
+//            \Yii::error('<=======================> yunst分账进程已存在');
+//            return;
+//        }
+//
+//        \Yii::$app->cache->set($cacheKey, 1, 160);
+
+        foreach($receivers_share as $receivers_share1){
+            sleep(1);
+            //开始分账
+            debug_log('开始分账1');
+            debug_log($receivers_share1);
+            //这里重新方法调用orderYunst来实现分账
+            $res = OrderYunst::share($order, $receivers_share1);
+
+            \Yii::error(['adapayProfitSharingadapayProfitSharing11:', $res]);
+
+            //通联分账
+            if ($res['code'] > 0) {
+                debug_log('分账失败了');
+                debug_log($res);
+                $faildDes = $res['msg'];
+                $faildDes && $faildDes = addslashes('(失败:' . $faildDes . ')');
+                //分到平台
+                if($receivers_share1['type'] == 2){
+                    debug_log('到这里了吧hahahah');
+
+                    debug_log($res['res']);
+                    debug_log($res['msg']);
+                    debug_log($res['res']['yunst_order_no']);
+                    debug_log($res['res']['err_code']);
+                    debug_log($res['res']['err_code_des']);
+
+                    SharingReceiver::updateAll([
+                        'updated_at' => time(),
+                        'yunst_order_no'=>$res['res']['yunst_order_no'],
+                        'is_pay' => SharingReceiver::PAY_FAIL,
+                        'err_code' => !empty($res['res']['err_code']) ? $res['res']['err_code'] : $res['msg'],
+                        'err_code_des' => !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg']], ['id' => $receivers_share1['id']]);
+                    continue;
+                }
+                sleep(1);
+                //如果分账到账户失败再重试
+                $res = OrderYunst::shareToSaas($order, $receivers_share1);
+                \Yii::error(['分到平台yunstProfitSharingadapayProfitSharing11:', $res]);
+                if ($res['code'] > 0) {
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => !empty($res['res']['err_code']) ? $res['res']['err_code'] : $res['msg'],
+                        'err_code_des' => !empty($res['res']['err_code_des']) ? $res['res']['err_code_des'] : $res['msg']], ['id' => $receivers_share1['id']]);
+                    $this->saasUserPriceLog($order, [$receivers_share1]);
+                    $this->saasUserPriceLog($order, [$receivers_share1], true, '-分账失败');
+                }else{
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS, 'order_id' => $res['res']['order_id']], ['id' => $receivers_share1['id']]);
+                    $this->saasUserPriceLog($order, [$receivers_share1]);
+                    //如果是分账成功自动提现
+                    $this->autoCash($order_id);
+                }
+            } else {
+                debug_log('分账成功了');
+                debug_log($res);
+                $order_id = $res['res']['order_id'];
+                SharingReceiver::updateAll(['updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS, 'order_id' => $res['res']['order_id']], ['id' => $receivers_share1['id']]);
+                $this->saasUserPriceLog($order, [$receivers_share1]);
+                $this->saasUserPriceLog($order, [$receivers_share1], true);
+                //如果是分账成功自动提现
+                $this->autoCash($order_id);
+            }
+        }
+        // 分账完结
+        \Yii::error(['<=======================> 订单号:' . $order->order_no . '-分账完结结果:']);
+    }
+
+    public function adapayShareToSelf() {
+        $time = time();
+        $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id, 0)['value'];
+        $sale_time = $time - (((int)$after_sale_time + 1) * 86400);
+        $where = [
+            'and',
+            ['o.store_id' => $this->store_id],
+            ['o.is_delete' => 0, 'o.trade_status' => Order::ORDER_FLOW_CONFIRM,  'o.is_sale' => 1,  'o.adapay_share_finish' => 0],
+            ['<=', 'o.confirm_time', $sale_time],
+            ['<>', 'o.adapay_payment_id', ''],
+        ];
+        $query = Order::find()->alias('o')
+            ->where($where)->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CANCEL])
+            ->offset(0)->limit(50);
+        $order_list = $query->all();
+        foreach ($order_list as $index => $order) {
+            $share = Adapay::shareToSelf($order);
+            if($share['code'] == 0){
+                Order::updateAll(['adapay_share_finish' => 1], ['id' => $order['id']]);
+            }
+        }
+
+        $this->adapayShareToSelfScanCodePayOrder();
+        $this->adapayShareToSelfReOrder();
+    }
+    public function adapayShareToSelfScanCodePayOrder() {
+        $time = time();
+        $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id, 0)['value'];
+        $sale_time = $time - (((int)$after_sale_time + 1) * 1);
+        $where = [
+            'and',
+            ['o.store_id' => $this->store_id],
+            ['o.is_delete' => 0, 'o.trade_status' => Order::ORDER_FLOW_CONFIRM,  'o.adapay_share_finish' => 0],
+            ['<=', 'o.pay_time', $sale_time],
+            ['<>', 'o.adapay_payment_id', ''],
+        ];
+        $query = \app\plugins\scanCodePay\models\Order::find()->alias('o')
+            ->where($where)->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CANCEL])
+            ->offset(0)->limit(50);
+        $order_list = $query->all();
+        foreach ($order_list as $index => $order) {
+            $share = Adapay::shareToSelf($order);
+            if($share['code'] == 0){
+                \app\plugins\scanCodePay\models\Order::updateAll(['adapay_share_finish' => 1], ['id' => $order['id']]);
+            }
+        }
+    }
+    public function adapayShareToSelfReOrder() {
+        $time = time();
+        $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id, 0)['value'];
+        $sale_time = $time - (((int)$after_sale_time + 1) * 1);
+        $where = [
+            'and',
+            ['o.store_id' => $this->store_id],
+            ['o.is_delete' => 0,  'o.adapay_share_finish' => 0],
+            ['<=', 'o.pay_time', $sale_time],
+            ['<>', 'o.adapay_payment_id', ''],
+        ];
+        $query = ReOrder::find()->alias('o')
+            ->where($where)
+            ->offset(0)->limit(50);
+        $order_list = $query->all();
+        foreach ($order_list as $index => $order) {
+            $share = Adapay::shareToSelf($order);
+            if($share['code'] == 0){
+                ReOrder::updateAll(['adapay_share_finish' => 1], ['id' => $order['id']]);
+            }
+        }
+    }
+
+    /**
+     * 支付宝分账
+     * @param Order | \app\plugins\scanCodePay\models\Order | ReOrder | FoodOrder $order
+     * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
+     * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
+     * @throws \GuzzleHttp\Exception\GuzzleException
+     */
+    public function alipayProfitSharing($order) {
+        if (!$order) {
+            \Yii::error('<=======================> 支付宝分账订单不存在');
+            return;
+        }
+        $receivers_share = SharingReceiver::find()->where(['store_id' => $order->store_id, 'is_pay' => SharingReceiver::PAY_WAIT, 'order_no' => $order->order_no, 'execute_type' => SharingReceiver::EXECUTE_TYPE_ALIPAY])
+            ->asArray()->all();
+        if (empty($receivers_share)) {
+            \Yii::error('<=======================> 订单号:' . $order->order_no . '分账接收人为空');
+            return;
+        }
+        \Yii::warning($receivers_share);
+        $cacheKey = 'alipayProfitSharing11:' . $order->order_no;
+        if(\Yii::$app->cache->get($cacheKey)){
+            \Yii::error('<=======================> 支付宝分账进程已存在');
+            return;
+        }
+        \Yii::$app->cache->set($cacheKey, 1, 160);
+        foreach ($receivers_share as $receiver) {
+            sleep(1);
+            $res_arr = [];
+            $res_arr[] = [
+                'royalty_type' => 'transfer',
+                'trans_in_type' => 'userId',
+                'amount' => $receiver['amount'],
+                'trans_in' => $receiver['account'],
+                'desc' => $receiver['description']
+            ];
+            $storeInfo = Store::find()->where(['id'=>$order->store_id,'is_delete'=>0])->asArray()->one();
+//            if ($storeInfo['business_model'] != 1) {
+//                $res = AlipayUnion::settle($order->order_no, $order->alipay_trade_no, $res_arr, $order->store_id,'true');
+//            } else {
+            $is_app = false;
+            if ($order->order_origin === Order::ORDER_SOURCE_APP) {
+                $is_app = true;
+            }
+                $res = AlipayProfit::settle($order->order_no, $order->alipay_trade_no, $res_arr, $order->store_id,'true', $is_app);
+//            }
+            \Yii::error(['<=======================> 订单号:' . $order->order_no . ', 分销请求分账结果:', $res]);
+            if ($res['code'] > 0) {
+                $faildDes = $res['res']['sub_msg'];
+                $faildDes && $faildDes = addslashes('(失败:' . $faildDes . ')');
+                $receivers_share_platform = [];
+                $amount = $receiver['amount'];
+                $receivers_share_platform[] = [
+                    'royalty_type' => 'transfer',
+                    'trans_in_type' => 'userId',
+                    'amount' => $amount,
+                    'trans_in' => Option::get('alipay_user_id', 0, 'saas')['value'],
+                    'desc' => '分账到平台',
+                ];
+                //分到平台
+                if($receiver['type'] == 2){
+                    SharingReceiver::updateAll([
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => $res['res']['code'],
+                        'err_code_des' => $res['res']['sub_msg']], ['id' => $receiver['id']]);
+                    continue;
+                }
+                sleep(1);
+//                if ($storeInfo['business_model'] != 1) {
+//                    $res = AlipayUnion::settle($order->order_no, $order->alipay_trade_no, $receivers_share_platform, $order->store_id,'true');
+//                } else {
+                $is_app = false;
+                if ($order->order_origin === Order::ORDER_SOURCE_APP) {
+                    $is_app = true;
+                }
+                    $res = AlipayProfit::settle($order->order_no, $order->alipay_trade_no, $receivers_share_platform, $order->store_id,'true', $is_app);
+//                }
+
+                \Yii::error(['分到平台wechatProfitSharingwechatProfitSharing11:', $res]);
+                if ($res['code'] > 0) {
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_FAIL, 'err_code' => $res['res']['code'],
+                        'err_code_des' => $res['res']['sub_msg']], ['id' => $receiver['id']]);
+                    $this->saasUserPriceLog($order, [$receiver]);
+                    $this->saasUserPriceLog($order, [$receiver], true, '-分账失败');
+                }else{
+                    SharingReceiver::updateAll([
+                        'description' => new Expression('CONCAT(description, "' . $faildDes . '-分账失败,转到服务商")'),
+                        'updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS], ['id' => $receiver['id']]);
+                    $this->saasUserPriceLog($order, [$receiver]);
+                }
+                return;
+            }
+            SharingReceiver::updateAll(['updated_at' => time(), 'is_pay' => SharingReceiver::PAY_SUCCESS], ['id' => $receiver['id']]);
+            $this->saasUserPriceLog($order, $receivers_share);
+            $this->saasUserPriceLog($order, $receivers_share, true);
+        }
+    }
+
+    /**
+     * 自动取消预约订单
+     */
+    public function orderBook() {
+        $orders = Order::find()->where(['is_delete' => 0, 'is_pay' => 0, 'store_id' => $this->store_id])
+            ->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CANCEL])
+            ->andWhere(['in', 'order_type', [1, 2]])->all();
+        /* @var Order[] $orders */
+        if (!empty($orders)) {
+            foreach ($orders as $order) {
+                if (time() - $order->created_at > 15 * 30) {
+                    $order->trade_status = Order::ORDER_FLOW_CANCEL;
+                    $order->updated_at = time();
+                    $order->save();
+                }
+            }
+        }
+    }
+
+    public function workerLevel() {
+        try {
+            $worker_list = Worker::find()->where(['store_id' => $this->store_id, 'status' => Worker::STATUS_VALID])->select('id, level')->asArray()->all();
+
+            foreach ($worker_list as $item) {
+                $order_ext_price_num = WorkerOrderExt::find()->alias('woe')
+                    ->leftJoin(['o' => Order::tableName()], 'o.id = woe.order_id')
+                    ->where(['woe.worker_id' => $item['id'], 'woe.status_ext' => 100])
+                    ->andWhere(['o.is_delete' => 0,  'o.is_sale' => 1])
+                    ->select('o.total_price, o.order_type_ext')->asArray()->all();
+                $order_num = 0;
+                $order_price = 0;
+                foreach ($order_ext_price_num as $order_item) {
+                    if (in_array($order_item['order_type_ext'], [0, Order::ORDER_TYPE_EXT_WORKER_FIRST_PAY])) {
+                        ++$order_num;
+                    }
+                    $order_price += $order_item['total_price'];
+                }
+
+                $worker_level = WorkerLevel::find()->where(['store_id' => $this->store_id, 'status' => 1, 'is_delete' => 0])
+                    ->andWhere(['AND', ['<=', 'order_money', $order_price],['<=', 'order_count', $order_price], ['>', 'level', $item['level']]])
+                    ->orderBy('level DESC')
+                    ->asArray()->one();
+                if ($worker_level) {
+                    $current_level = $worker_level['level'];
+                    if ($current_level) {
+                        $worker = Worker::findOne($item['id']);
+                        $worker->level = $current_level;
+                        $worker->save();
+                    }
+                }
+
+            }
+        } catch (\Exception $e) {
+            debug_log($e->getMessage(), 'worker.log');
+        }
+
+
+    }
+
+    public function level() {
+        $time = time();
+        $after_sale_time = Option::get(OptionSetting::STORE_AFTER_SALE_TIME, $this->store_id, 0)['value'];
+        $sale_time = $time - ((int)$after_sale_time * 86400);
+        //查出所有有订单的会员
+        $userIds = Order::find()->alias('o')->select(['o.user_id', 'sum(o.pay_price) order_money'])
+            ->where(['o.is_delete' => 0, 'o.store_id' => $this->store_id, 'o.trade_status' => 3])
+            ->andWhere(['<=', 'o.confirm_time', $sale_time])
+            ->andWhere(['>','o.user_id',0]) //新增user_id=0是商盟订单
+            ->leftJoin(['r' => OrderRefund::find()->where(['is_delete' => 0, 'store_id' => $this->store_id])->select('*')], "r.order_id=o.id")
+            ->andWhere([
+                'or',
+                'isnull(r.id)',
+                ['r.type' => 2],
+                ['in', 'r.status', [2, 3]]
+            ])
+            ->groupBy('o.user_id');
+        $cacheKey = __METHOD__;
+        if(cache()->get($cacheKey)){
+            $sale_time2 = $sale_time - 3 * 86400;
+            $uids = (clone $userIds)->andWhere(['>=', 'o.confirm_time', $sale_time2])->all();
+            if(empty($uids)){
+                return;
+            }
+            $uidArr = array_column($uids, 'user_id');
+            $userIds->andWhere(['o.user_id' => $uidArr]);
+        }
+        cache()->set($cacheKey, 1, 86400);
+
+        //查如上会员的当前等级金额
+        $userList = User::find()
+            ->alias('u')
+            ->select(['u.*', 'uids.order_money'])
+            ->innerJoin(['uids' => $userIds], 'uids.user_id = u.id')
+            ->andWhere('uids.order_money is not null')
+            ->asArray()->all();
+        //查会员等级
+        $levelList = Level::find()
+            ->where(['store_id' => $this->store_id, 'is_delete' => 0, 'status' => 1])
+            ->orderBy(['money' => SORT_DESC, 'id' => SORT_DESC])
+            ->asArray()->all();
+
+        //调整会员等级
+        foreach ($userList as $user) {
+            foreach ($levelList as $level) {
+                if ($user['order_money'] >= $level['money']) {
+                    if ($user['level'] < $level['level']) {
+                        $user_info = User::findOne($user['id']);
+                        $user_info->level = $level['level'];
+                        if ($user_info->save()) {
+                            \Yii::error(['会员自动升级==============>', $user_info->id]);
+                        }
+                    }
+                    break;
+                }
+            }
+        }
+    }
+
+
+    /**
+     * 认养成熟超时自动设置农场代采
+     */
+    public function AdoptOrderMature() {
+
+        $time = time();
+        $AdoptSetting = AdoptSetting::findOne([ 'store_id' => $this->store_id,]);
+        $mature_overtime = $AdoptSetting->mature_overtime;
+        $mature_time = $time - ($mature_overtime * 86400);
+
+        $order_info = AdoptOrderInfo::find()->where([
+            'is_delete' => 0, 'pick_method'=> AdoptOrderInfo::ORDER_FLOW_NO_PICK,
+            'is_mature' => AdoptOrderInfo::ORDER_FLOW_MATURE, 'store_id' => $this->store_id,
+        ])->andWhere(['<=', 'mature_time', $mature_time])->all();
+
+        foreach ($order_info as $k => $v) {
+            $v->pick_method = AdoptOrderInfo::ORDER_FLOW_OTHER_PICK;
+            $v->pick_time = $v->mature_time + ($mature_overtime * 86400);
+            $v->pick_treatment_method = AdoptOrderInfo::ORDER_FLOW_PICK_STORAGE;
+            $v->pick_treatment_method_time = time();
+
+            $v->save();
+        }
+    }
+
+    /**
+     * 认养入库超时自动设置保管
+     */
+    public function AdoptOrderStorage() {
+
+        $time = time();
+        $AdoptSetting = AdoptSetting::findOne([ 'store_id' => $this->store_id,]);
+        $storage_overtime = $AdoptSetting->storage_overtime;
+        $storage_time = $time - ($storage_overtime * 86400);
+
+        $order_info = AdoptOrderInfo::find()
+            ->where([
+                'is_delete' => 0,
+                'is_mature' => AdoptOrderInfo::ORDER_FLOW_MATURE,
+                'is_storage' => AdoptOrderInfo::ORDER_FLOW_STORAGE,
+                'is_preserve' => AdoptOrderInfo::ORDER_FLOW_WAIT_PRESERVE,
+                'store_id' => $this->store_id,
+            ])
+            ->andWhere(['!=', 'pick_method',  AdoptOrderInfo::ORDER_FLOW_NO_PICK])
+            ->andWhere(['<=', 'storage_time', $storage_time])->all();
+
+
+
+        foreach ($order_info as $k => $v) {
+            $v->is_preserve = AdoptOrderInfo::ORDER_FLOW_PRESERVE;
+            $v->preserve_time = $v->storage_time + ($storage_overtime * 86400);
+            $v->save();
+        }
+    }
+
+    /**
+     * 认养免费保管结束开始计费
+     */
+    public function AdoptOrderBillingStart() {
+
+        $time = time();
+        $AdoptSetting = AdoptSetting::findOne(['store_id' => $this->store_id,]);
+        $free_preserve_time = $AdoptSetting->free_preserve_time;
+        $preserve_time = $time - ($free_preserve_time * 86400);
+
+        $order_info = AdoptOrderInfo::find()->where([
+            'is_delete' => 0, 'is_preserve' => AdoptOrderInfo::ORDER_FLOW_PRESERVE,
+            'store_id' => $this->store_id,
+        ])->andWhere(['<=', 'preserve_time', $preserve_time])->all();
+
+        foreach ($order_info as $k => $v) {
+            $v->billing_start_time = $v->preserve_time + ($free_preserve_time * 86400);
+            $v->save();
+        }
+    }
+
+    /**
+     * 认养成熟超时提示信息  (提示成熟超时要自动代采入库)
+     */
+    public function AdoptOrderMatureTips(){
+
+        $time = time();
+        $AdoptSetting = AdoptSetting::findOne([ 'store_id' => $this->store_id,]);
+        $mature_overtime_tips = $AdoptSetting->mature_overtime_tips;
+        $mature_time = $time - ($mature_overtime_tips * 86400);
+
+        $mature_overtime = $AdoptSetting->mature_overtime;
+
+        $order_info = AdoptOrderInfo::find()
+            ->where([
+                'is_delete' => 0, 'is_mature' => AdoptOrderInfo::ORDER_FLOW_MATURE,
+                'pick_method'=> AdoptOrderInfo::ORDER_FLOW_NO_PICK, 'store_id' => $this->store_id,])
+            ->andWhere(['<=', 'mature_time', $mature_time])->andWhere(['is_sms_mature'=>0])->all();
+
+        if ($order_info){
+            foreach ($order_info as $k => $v) {
+                $order_relevance = Order::findOne(['id'=>$v->order_id]);
+                $v->is_sms_mature = 1;
+                $v->save();
+                //查看已成熟几天。几天后系统自动设置
+                $day1 =  ceil(time() - $v->mature_time);
+
+                $day2 = $mature_overtime -$day1;
+
+                NoticeSend::Adopt($this->user_id, $v->mobile, $order_relevance->order_no, $v->name, 1,$day1,$day2);
+            }
+        }
+
+
+    }
+
+    /**
+     * 认养入库超时提示信息 (提示入库过期要自动保管)
+     */
+    public function AdoptOrderStorageTips(){
+
+        $time = time();
+        $AdoptSetting = AdoptSetting::findOne([ 'store_id' => $this->store_id,]);
+        $storage_overtime_tips = $AdoptSetting->storage_overtime_tips;
+        $storage_time = $time - ($storage_overtime_tips * 86400);
+
+        $storage_overtime = $AdoptSetting->mature_overtime;
+        $order_info = AdoptOrderInfo::find()
+            ->where([
+                'is_delete' => 0,
+                'is_mature' => AdoptOrderInfo::ORDER_FLOW_MATURE,
+                'is_storage' => AdoptOrderInfo::ORDER_FLOW_STORAGE,
+                'is_preserve' => AdoptOrderInfo::ORDER_FLOW_WAIT_PRESERVE,
+                'store_id' => $this->store_id,
+            ])
+            ->andWhere(['!=', 'pick_method',  AdoptOrderInfo::ORDER_FLOW_NO_PICK])
+            ->andWhere(['<=', 'storage_time', $storage_time])->andWhere(['is_sms_storage'=>0])->all();
+
+        if ($order_info){
+            foreach ($order_info as $k => $v) {
+                $order_relevance = Order::findOne(['id'=>$v->order_id]);
+                $v->is_sms_storage = 1;
+                $v->save();
+                //查看已成熟几天。几天后系统自动设置
+                $day1 =  ceil(time() - $v->storage_time);
+
+                $day2 = $storage_overtime -$day1;
+
+                NoticeSend::Adopt($this->user_id, $v->mobile, $order_relevance->order_no, $v->name, 2,$day1,$day2);
+            }
+        }
+    }
+
+    /**
+     * 认养免费保管提示信息 (提示从开始保管时间算免费保管超时)
+     */
+    public function AdoptOrderBillingTips(){
+
+        $time = time();
+        $AdoptSetting = AdoptSetting::findOne([ 'store_id' => $this->store_id,]);
+        $preserve_time_tips = $AdoptSetting->free_preserve_time_tips;
+        $preserve_time = $time - ($preserve_time_tips * 86400);
+
+        $preserve = $AdoptSetting->free_preserve_time;
+
+        $order_info = AdoptOrderInfo::find()->where([
+            'is_delete' => 0, 'is_preserve' => AdoptOrderInfo::ORDER_FLOW_PRESERVE,
+            'store_id' => $this->store_id,
+        ])->andWhere(['<=', 'preserve_time', $preserve_time])->andWhere(['is_sms_preserve'=>0])->all();
+
+        if ($order_info){
+            foreach ($order_info as $k => $v) {
+                $order_relevance = Order::findOne(['id'=>$v->order_id]);
+                $v->is_sms_preserve = 1;
+                $v->save();
+                //查看已成熟几天。几天后系统自动设置
+                $day1 =  ceil(time() - $v->preserve_time);
+
+                $day2 = $preserve -$day1;
+
+                NoticeSend::Adopt($this->user_id, $v->mobile, $order_relevance->order_no, $v->name, 3,$day1,$day2);
+            }
+        }
+    }
+
+    /**
+     * 认养配送订单自动收货
+     */
+    private function adoptCostOrderConfirm()
+    {
+        $time = time();
+        $delivery_time = Option::get(OptionSetting::STORE_DELIVERY_TIME, $this->store_id)['value'];
+        $delivery_time = $time - ((int)$delivery_time * 86400);
+
+        $order_confirm = AdoptCostOrder::find()->where([
+            'is_delete' => 0, 'trade_status' => AdoptCostOrder::ORDER_FLOW_SEND, 'store_id' => $this->store_id,
+        ])->andWhere(['<>', 'trade_status', AdoptCostOrder::ORDER_FLOW_CONFIRM])->andWhere(['<=', 'send_time', $delivery_time])->all();
+
+        foreach ($order_confirm as $k => $v) {
+            /**
+             * @var Order $v
+             */
+            $adopt_order_info = AdoptOrderInfo::find()->alias('aoi')
+                ->where([
+                    'aoi.order_id' => $v->order_id,
+                    'aoi.store_id' => $this->store_id,
+                    'aoi.harvest_weight' => 0
+                ])->one();
+            if ($adopt_order_info->harvest_weight == 0) {
+                $adopt_order = Order::find()->alias('o')
+                    ->where([
+                        'o.id' => $v->order_id,
+                        'o.store_id' => $this->store_id,
+                        'o.order_type' => 5,
+                    ])->one();
+                $adopt_order->trade_status = Order::ORDER_FLOW_CONFIRM;
+                $adopt_order->save();
+                $goods = Goods::findOne(OrderDetail::findOne(['order_id' => $v->order_id])->goods_id);
+                NoticeSend::AdoptOrderStateChange($adopt_order->user_id, $adopt_order_info->mobile, $adopt_order->order_no, $goods->name, 13);
+            }
+
+            AdoptCostOrder::updateAll(['trade_status' => Order::ORDER_FLOW_CONFIRM, 'confirm_time' => time()], ['id' => $v->id]);
+            if ($v->pay_type == 2) {
+                $v->is_pay = 1;
+                $v->save();
+            }
+        }
+    }
+
+    /**
+     * 自动取消认养配送订单
+     */
+    public function adoptCostOrderCancel() {
+
+        $time = time();
+        $over_time = Option::get(OptionSetting::STORE_DELIVERY_TIME, $this->store_id)['value'];
+        if (!$over_time) {
+            $over_time = 1;
+        }
+        $over_day = $time - ($over_time * 86400);
+
+        $orders = AdoptCostOrder::find()->where(['is_delete' => 0, 'is_pay' => 0,  'store_id' => $this->store_id,])
+            ->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CANCEL])
+            ->andWhere(['<=', 'created_at', $over_day])->andWhere(['!=', 'pay_type', 2])
+            ->all();
+
+        /* @var AdoptCostOrder[] $orders */
+        if (!empty($orders)) {
+            foreach ($orders as $order) {
+                $t = \Yii::$app->db->beginTransaction();
+                if ($order->order_type == 1) {
+                    $adopt_order =  AdoptOrderInfo::find()->where(['order_id' => $order->order_id, 'is_delete' => 0, 'store_id' => $this->store_id,])->one();
+                    $adopt_order->updateCounters(['harvest_weight' => $order->weight]);
+                }
+                $order->trade_status = Order::ORDER_FLOW_CANCEL;
+                $order->updated_at = time();
+
+                if (!$order->save()) {
+                    $t->rollBack();
+                    continue;
+                }
+                $t->commit();
+            }
+        }
+    }
+
+    /**
+     * 抖品发放佣金
+     */
+    public function sendVideoGoodsProfit($id)
+    {
+        try {
+            $video_share = VideoGoodsShare::find()->where(['order_id' => $id, 'is_pay' => 1, 'is_send' => 0])->all();
+            foreach ($video_share as $item) {
+                $item->is_send = 1;
+                $item->send_time = time();
+                if ($item->save()) {
+                    $user = User::findOne($item->author_user_id);
+                    $user->total_price = ((float)$user->total_price + (float)$item->proportion);
+                    $user->price = ((float)$user->price + (float)$item->proportion);
+                    if ($user->save()) {
+                        $UserShareMoney =  new UserShareMoney();
+                        $UserShareMoney->store_id = $item->store_id;
+                        $UserShareMoney->order_id = $item->order_id;
+                        $UserShareMoney->user_id = $item->author_user_id;
+                        $UserShareMoney->type = 0;
+                        $UserShareMoney->source = 1;
+                        $UserShareMoney->money = $item->proportion;
+                        $UserShareMoney->created_at = time();
+                        $UserShareMoney->order_type = 0;
+                        $UserShareMoney->is_delete = 0;
+                        $UserShareMoney->version = cyy_version();
+                        $UserShareMoney->save();
+                    }
+                }
+            }
+        } catch (\Exception $e) {
+            \Yii::error($e->getMessage());
+        }
+    }
+
+    /**
+     * 成为股东自动成为分销商
+     * @param $user_id integer 用户id
+     */
+    private function shareHolderAutoBecomeShare()
+    {
+        $share_holder_list = ShareHolder::find()->alias('sh')
+            ->where(['sh.is_delete' => 0, 'sh.status' => 1])
+            ->leftJoin(['s' => Share::tableName()], 'sh.user_id=s.user_id')
+            ->andWhere('s.id is null')
+            ->select('sh.*')
+            ->asArray()->all();
+
+
+        foreach ($share_holder_list as $k => $v) {
+            $user_id = $v['user_id'];
+            $store_id = $v['store_id'];
+            $share = Share::findOne(['user_id' => $user_id, 'is_delete' => 0, 'store_id' => $store_id]);
+            if ($share && $share->status == 1) {
+                continue;
+            }
+
+            if (!$share || $share->status == 2) {
+                $share = new Share();
+                $share->user_id = $user_id;
+                $share->mobile = '';
+                $share->name = '';
+                $share->is_delete = 0;
+                $share->store_id = $store_id;
+            }
+
+            $share->status = 1;
+            $share->created_at = time();
+            $share->save();
+
+            $user = User::findOne($user_id);
+            $user->time = time();
+            $user->is_distributor = 1;
+            $user->save();
+        }
+
+    }
+
+    /**
+     * 用户自动成为分销商
+     * @param $user_id integer 用户id
+     */
+    private function userAutoBecomeShare()
+    {
+        $store_id = $this->store_id;
+        $share_basic_setting = Option::get(OptionSetting::SHARE_BASIC_SETTING, $store_id, OptionSetting::SHARE_GROUP_NAME, '')['value'];
+        $share_basic_setting = json_decode($share_basic_setting, true);
+        //
+        $share_basic_setting['share_condition']['value'] = $share_basic_setting['share_condition']['value'] ?? 2;
+        $share_basic_setting['auto_share_val']['value'] = $share_basic_setting['auto_share_val']['value'] ?? 0;
+//        if (!empty($share_basic_setting['share_condition']) && !empty($share_basic_setting['auto_share_val'])) {
+        //判断无需审核且消费0元成为分销商条件
+        if (intval($share_basic_setting['share_condition']['value']) === 2 && floatval($share_basic_setting['auto_share_val']['value']) <= 0) {
+            //筛出已经成为分销商的用户
+            $filter_user_id = Share::find()->where(['is_delete' => 0, 'store_id' => $store_id, 'status' => 1])->select('user_id')
+                ->column();
+            //筛出已经被删除的分销商
+            $filter_delete_user_id = Share::find()->where(['is_delete' => 1, 'store_id' => $store_id, 'status' => 1])->select('user_id')
+                ->column();
+            $filter_user_id = array_merge($filter_user_id, $filter_delete_user_id);
+            //查询用户
+            $user_query = User::find()->where(['store_id' => $store_id, 'is_delete' => 0]);
+            if (!empty($filter_user_id)) {
+                $user_query->andWhere(['NOT IN', 'id', $filter_user_id]);
+            }
+            $user_list = $user_query->select('id')->column();
+            foreach ($user_list as $item) {
+                $share = Share::findOne(['user_id' => $item->id, 'is_delete' => 0, 'store_id' => $store_id]);
+                if (!$share) {
+                    $share = new Share();
+                    $share->mobile = '';
+                    $share->name = '';
+                    $share->is_delete = 0;
+                    $share->user_id = $item;
+                    $share->created_at = time();
+                }
+                $share->status = 1;
+
+                $share->store_id = $store_id;
+                if ($share->save()) {
+                    $user = User::findOne($item);
+                    $user->time = time();
+                    $user->is_distributor = 1;
+                    $user->save();
+                }
+            }
+        }
+//        }
+
+
+    }
+
+    public function seckillActivityOrder($store_id)
+    {
+        try {
+            $activity_order_log = SeckillActivityOrderLog::find()->alias('sao')->where(['AND', [
+                '<', 'sao.created_at', (time() - (60 * 15))
+            ], [
+                'sao.is_delete' => 0,
+                'sao.store_id' => $store_id,
+            ]])->andWhere([
+                'OR', [
+                    'o.trade_status' => 1
+                ],
+                [
+                    'o.is_pay' => 0,
+                ]
+            ])->leftJoin(['o' => Order::tableName()], 'sao.order_id = o.id')->select('sao.id, sao.is_delete, sao.activity_goods_id, sao.activity_id, sao.num, sao.goods_id')->all();
+            foreach ($activity_order_log as $item) {
+
+                $goods = SeckillActivityGoods::findOne(['is_delete' => 0, 'goods_id' => $item->goods_id, 'activity_id' => $item->activity_id]);
+                if ($goods) {
+                    $goods->sale_num -= $item->num;
+                    if (!$goods->save()) {
+                        throw new \Exception(json_encode($goods->errors));
+                    }
+                }
+
+                $item->is_delete = 1;
+                if (!$item->save()) {
+                    throw new \Exception(json_encode($item->errors));
+                }
+            }
+        } catch (\Exception $e) {
+            \Yii::error("秒杀逻辑处理" . $e->getMessage());
+//            return [
+//                'code' => 1,
+//                'msg' => $e->getMessage()
+//            ];
+        }
+    }
+
+    //拼团
+    public function ptActivityOrder($store_id)
+    {
+        try {
+            //判断团长下单的人
+            $pt_order_all = PtActivityOrder::find()->alias('o')
+                ->where(['o.store_id' => $store_id, 'o.is_pay' => 1, 'o.trade_status' => 0, 'is_pt_finish' => 0])
+                ->leftJoin(['od' => PtActivityOrderDetail::tableName()], 'o.id = od.order_id')
+                ->andWhere(['o.pt_number' => 0])->select('o.id, od.activity_id, o.pay_time')->asArray()->all();
+            foreach ($pt_order_all as $pt_order) {
+                $activity = PtActivity::findOne($pt_order['activity_id']);
+                $split_time = ($activity->split_time * 60 * 60);
+                //已经过期,需要失败处理
+                if ((time() - $split_time > $pt_order['pay_time']) || $activity->end_time < time()) {
+                    $pt_order_ = PtActivityOrder::find()->where(['is_pay' => 1])
+                        ->andWhere(['OR', ['id' => $pt_order['id']], ['pt_number' => $pt_order['id']]])
+                        ->select('id')->asArray()->all();
+                    foreach ($pt_order_ as $item) {
+                        $order = PtActivityOrder::findOne($item['id']);
+                        if ($order->head_integral > 0 && intval($order->head_integral_status) === 1) {
+                            $res = AccountLog::saveLog($order->user_id, floatval($order->head_integral), AccountLog::TYPE_INTEGRAL, AccountLog::LOG_TYPE_INCOME, 3, $order->id, "商城拼团失败,退还开团支付积分,订单号为:{$order->order_no}。");
+                            if (!$res) {
+                                debug_log('开团积分退款失败' . json_encode($res), 'ptOrderLog.log');
+                            }
+                            $order->head_integral_status = 2;
+                        }
+                        $order->is_pt_finish = 2;
+                        $order->save();
+                    }
+                    $form = new PtActivityOrderForm();
+                    $result = $form->loserHandle($pt_order['id']);
+                    if ($result['code'] !== 0) {
+                        throw new \Exception($result['msg']);
+                    }
+                }
+            }
+        } catch (\Exception $e) {
+            \Yii::error("拼团逻辑处理" . $e->getMessage());
+    //            return [
+    //                'code' => 1,
+    //                'msg' => $e->getMessage()
+    //            ];
+        }
+    }
+
+    private function agencyPrice($order_id){
+        try {
+            $order = Order::findOne($order_id);
+            $option = Option::get('agency_price_config', 0, 'saas', [])['value'];
+            debug_log('agency_price_config' . $option);
+            if ($option) {
+                $option = json_decode($option, true);
+            }
+            $province_percent = $option['province_percent'] ?? 0;
+            $city_percent = $option['city_percent'] ?? 0;
+            $district_percent = $option['district_percent'] ?? 0;
+            $bdoption = Option::get('bd_agency_price_config', 0, 'saas', [])['value'];
+            debug_log('bd_agency_price_config' . $bdoption);
+            if ($bdoption) {
+                $bdoption = json_decode($bdoption, true);
+            }
+            $bd_agent_percent = $bdoption['bd_agent_percent'] ?? 0;
+            //获取代理商ID
+            $store = Store::findOne($order->store_id);
+            $admin_list = Admin::find()->where(['province_id' => $store->province_id, 'is_delete' => 0, 'type' => 'admin'])->asArray()->all();
+            $user = User::findOne($order->user_id);
+            $saasUser = SaasUser::findOne(['mobile' => $user->binding]);
+            $saas_user_name = '-';
+            if ($saasUser) {
+                $saas_user_name = $saasUser->name;
+            }
+            //推广代理
+            if($store->salesman_id){
+                $salesman = Salesman::findOne($store->salesman_id);
+                $bd = Admin::find()->where(['type' => Admin::ADMIN_TYPE_BD_AGENT, 'id' => $salesman['admin_id']])->asArray()->one();
+                if($bd){
+                    $admin_list[] = $bd;
+                }
+            }
+            foreach ($admin_list as $item) {
+                $ag_rebate = 0;
+                $rate = 0;
+                $desc = '';
+                $type = StoreShareMoney::TYPE_AREA_AGENT;
+                if($item['type'] == Admin::ADMIN_TYPE_BD_AGENT){
+                    $ag_rebate = $order->ag_rebate * ($bd_agent_percent / 100);
+                    $ag_rebate = sprintf("%.2f", $ag_rebate);
+                    $rate = $bd_agent_percent;
+                    $desc = '用户' . $saas_user_name . '下单,订单' . $order->order_no . ',发放 ' . $ag_rebate . '元推广代佣金';
+                    $type = StoreShareMoney::TYPE_BD_AGENT;
+                }
+                //省
+                if ((int)$item['area_level'] === 3) {
+                    $ag_rebate = $order->ag_rebate * ($province_percent / 100);
+                    $ag_rebate = sprintf("%.2f", $ag_rebate);
+                    $rate = $province_percent;
+                    $desc = '用户' . $saas_user_name . '下单,订单' . $order->order_no . ',发放 ' . $ag_rebate . '元省代佣金';
+                }
+                //市
+                if ((int)$item['area_level'] === 2 && (int)$item['city_id'] === (int)$store->city_id) {
+                    $ag_rebate = $order->ag_rebate * ($city_percent / 100);
+                    $ag_rebate = sprintf("%.2f", $ag_rebate);
+                    $rate = $city_percent;
+                    $desc = '用户' . $saas_user_name . '下单,订单' . $order->order_no . ',发放 ' . $ag_rebate . '元市代佣金';
+                }
+                //区
+                if ((int)$item['area_level'] === 1 && (int)$item['city_id'] === (int)$store->city_id && (int)$item['district_id'] === (int)$store->district_id) {
+                    $ag_rebate = $order->ag_rebate * ($district_percent / 100);
+                    $ag_rebate = sprintf("%.2f", $ag_rebate);
+                    $rate = $district_percent;
+                    $desc = '用户' . $saas_user_name . '下单,订单' . $order->order_no . ',发放 ' . $ag_rebate . '元区代佣金';
+                }
+                if ($ag_rebate <= 0) {
+                    continue;
+                }
+                //给用户增加佣金
+                $SaasUser = SaasUser::findOne($item['saas_user_id']);
+                $SaasUser->share_profit = ($SaasUser->share_profit * 1) + ($ag_rebate * 1);
+                $res = $SaasUser->save();
+                //增加记录
+                if ($res) {
+                    $form = new StoreShareMoney();
+                    $form->user_id = $SaasUser->id;
+                    $form->store_id = $store->id;
+                    $form->profit = $rate;
+                    $form->total_price = $order->total_price;
+                    $form->desc = $desc;
+                    $form->order_id = $order_id;
+                    $form->created_at = time();
+                    $form->type = $type;//
+                    $form->status = StoreShareMoney::STATUS_STORE_ORDER;
+                    $form->commission = $ag_rebate;
+                    $form->is_send = 1;
+                    $res = $form->save();
+                    if (!$res) {
+                        debug_log($form->errors);
+                    }
+                }
+            }
+        } catch (\Exception $e) {
+            \Yii::error($e->getMessage());
+        }
+    }
+
+    private function sendGoodsAgentMoney($order_id){
+        $t = \Yii::$app->db->beginTransaction();
+        try {
+            $order = Order::findOne($order_id);
+            $option = Option::get('goods_agent_price_config', 0, 'saas', [])['value'];
+            $option = json_decode($option, true);
+            $goods_agent_percent = $option['goods_agent_percent'] ?? 0;
+            $goods_agent_install_percent = $option['goods_agent_install_percent'] ?? 0;
+            //订单中是否包含产品代理绑定的产品
+            $order_detail = OrderDetail::find()->alias('od')
+                ->leftJoin(['g' => Goods::tableName()], 'od.goods_id = g.id')->where(['od.order_id' => $order->id])
+                ->select('od.id, g.cloud_goods_id, od.total_price, g.cloud_supplier_id, g.name')->asArray()->all();
+            foreach ($order_detail as $value) {
+                //计算产品代理佣金
+                $supplier_rate = 0;
+                if (!empty($value['cloud_supplier_id'])) {
+                    $supplier = Supplier::findOne(['cloud_supplier_id' => $value['cloud_supplier_id']]);
+                    $supplier_rate = $supplier->rate;
+                }
+                if (!empty($value['cloud_goods_id'])) {
+                    //抓取云仓佣金
+                    $cloud_url = "/goods/getGoodsInfo";
+                    $cloud_data = [];
+                    $cloud_data['goods_id']         = $value['cloud_goods_id'];
+                    $domain = (new OptionSetting)->getCloudDomainName();
+                    $cloud_info = cloud_post($domain . $cloud_url, $cloud_data);
+                    $cloud_info = json_decode($cloud_info, true);
+                    if($cloud_info['code'] != 0){
+                        throw new \Exception($cloud_info['msg']);
+                    }else{
+                        $goods = $cloud_info['data']['goods'];
+                        $agent_profit_default = (int)$goods['agent_profit_default'];
+                        if (!$agent_profit_default) {
+                            $goods_agent_percent = $goods['agent_percent'];
+                            $goods_agent_install_percent = $goods['agent_install_percent'];
+                        }
+                    }
+
+                    $agent_goods_bind_goods = AgentGoodsBindGoods::find()->where(['cloud_goods_id' => $value['cloud_goods_id'], 'is_delete' => 0, 'status' => 1])
+                        ->select('goods_agent_admin_id, cloud_supplier_id')->asArray()->all();
+                    if (!empty($agent_goods_bind_goods)) {
+                        $goods_agent_admin_id = array_column($agent_goods_bind_goods, 'goods_agent_admin_id');
+                        $where = [
+                            'id' => $goods_agent_admin_id,
+                            'province_id' => $order->province_id
+                        ];
+                        $admin = Admin::findOne(array_merge($where, [
+                            'area_level' => 1,
+                            'city_id' => $order->city_id,
+                            'district_id' => $order->district_id
+                        ]));
+                        if (empty($admin)) {
+                            $admin = Admin::findOne(array_merge($where, [
+                                'area_level' => 2,
+                                'city_id' => $order->city_id
+                            ]));
+                            if (empty($admin)) {
+                                $admin = Admin::findOne(array_merge($where, [
+                                    'area_level' => 3
+                                ]));
+                            }
+                        }
+                        if (!empty($admin)) {
+                            $agent_rebate = $value['total_price'] * ($supplier_rate / 100) * ($goods_agent_percent / 100);
+                                //给用户增加佣金
+                                $SaasUser = SaasUser::findOne($admin->saas_user_id);
+                                $SaasUser->share_profit = ($SaasUser->share_profit * 1) + ($agent_rebate * 1);
+                                if (!$SaasUser->save()) {
+                                    throw new \Exception(json_encode($SaasUser->errors));
+                                }
+                                $StoreShareMoney = new StoreShareMoney();
+                                $StoreShareMoney->user_id = $SaasUser->id;
+                                $StoreShareMoney->store_id = $order->store_id;
+                                $StoreShareMoney->profit = $goods_agent_percent;
+                                $StoreShareMoney->total_price = $value['total_price'];
+                                $StoreShareMoney->desc = '产品代理佣金发放,代理商品' . $value['name'];
+                                $StoreShareMoney->order_id = $order_id;
+                                $StoreShareMoney->created_at = time();
+                                $StoreShareMoney->status = StoreShareMoney::STATUS_STORE_ORDER;
+                                $StoreShareMoney->type = StoreShareMoney::TYPE_GOODS_AGENT;
+                                $StoreShareMoney->commission = $agent_rebate;
+                                $StoreShareMoney->is_send = 1;
+                                if (!$StoreShareMoney->save()) {
+                                    throw new \Exception(json_encode($StoreShareMoney->errors));
+                                }
+                            }
+                        }
+                    }
+
+                //计算上门安装佣金
+                $install_log = AgentGoodsInstallLog::findOne(['order_detail_id' => $value['id'], 'status' => 2, 'is_need_install' => 1, 'order_type' => AgentGoodsInstallLog::ORDER_TYPE_NORMAL]);
+                if (!empty($install_log)) {
+                    $admin = Admin::findOne($install_log->goods_agent_admin_id);
+                    if (!empty($admin)) {
+                        $agent_rebate = $value['total_price'] * ($supplier_rate / 100) * ($goods_agent_install_percent / 100);
+                            //给用户增加佣金
+                            $SaasUser = SaasUser::findOne($admin->saas_user_id);
+                            $SaasUser->share_profit = ($SaasUser->share_profit * 1) + ($agent_rebate * 1);
+                            if (!$SaasUser->save()) {
+                                throw new \Exception(json_encode($SaasUser->errors));
+                            }
+                            $StoreShareMoney = new StoreShareMoney();
+                            $StoreShareMoney->user_id = $SaasUser->id;
+                            $StoreShareMoney->store_id = $order->store_id;
+                            $StoreShareMoney->profit = $goods_agent_install_percent;
+                            $StoreShareMoney->total_price = $value['total_price'];
+                            $StoreShareMoney->desc = '产品代理上门安装佣金发放,安装商品' . $value['name'];
+                            $StoreShareMoney->order_id = $order_id;
+                            $StoreShareMoney->created_at = time();
+                            $StoreShareMoney->status = StoreShareMoney::STATUS_STORE_ORDER;
+                            $StoreShareMoney->type = StoreShareMoney::TYPE_GOODS_AGENT;
+                            $StoreShareMoney->commission = $agent_rebate;
+                            $StoreShareMoney->is_send = 1;
+                            if (!$StoreShareMoney->save()) {
+                                throw new \Exception(json_encode($StoreShareMoney->errors));
+                            }
+                        }
+                    }
+                }
+            $t->commit();
+        } catch (\Exception $e) {
+            $t->rollBack();
+            \Yii::error($e->getMessage());
+        }
+    }
+
+    /**
+     * 同城配送订单处理
+     */
+    private function localDeliveryOrder()
+    {
+        \Yii::warning(['---- Order Event BEGIN 自动派单发放开始 localDeliveryOrder ----']);
+        $time = time();
+        $values = Option::find()->where([
+            'store_id' => 0,
+            'group' => OptionSetting::LOCAL_DELIVERY_GROUP_NAME, 'name' => OptionSetting::LOCAL_DELIVERY_SETTING
+        ])->select('value')->one();
+        if ($values) {
+            $local_setting = json_decode($values->value, true);
+        } else {
+            $local_setting = null;
+        }
+        if ($local_setting['send_type']['value'] != 'auto') { //未开启自动派单
+            \Yii::warning(['---- Order Event BEGIN 平台未开启自动派单 localDeliveryOrder ----']);
+            return false;
+        }
+        $default_time = $local_setting['default_time']['value']; //默认预计送达所消耗的时间,例:30分钟
+
+        //待分配骑手的订单
+        $list = Order::find()->alias('o')
+            ->leftJoin(['di' => DeliveryInfo::tableName()], 'o.order_no = di.order_no')
+            ->where(['o.order_type' => Order::ORDER_TYPE_STORE, 'di.is_local' => 1])
+            ->andWhere([
+                'o.trade_status' => Order::ORDER_FLOW_NO_SEND,
+                'o.is_delete' => Order::IS_DELETE_FALSE,
+                'di.local_status' => DeliveryInfo::LOCAL_STATUS_NO_SEND,
+                'di.rider_id' => 0,
+            ])
+            ->andWhere([
+                'or',
+                ['o.is_pay' => Order::IS_PAY_TRUE],
+                ['o.pay_type' => Order::PAY_TYPE_COD]
+            ])
+            ->andWhere([
+                'or',
+                ['<=', 'o.delivery_time', bcadd($time, bcmul($default_time, 60, 0), 0)],
+                ['o.delivery_time' => 0]
+            ])
+            ->select('o.*')
+            ->all();
+        foreach ($list as $order) {
+            $this->autoSendDeliveryOrder($order);
+        }
+    }
+    /**
+     * 模块名:autoSendDeliveryOrder
+     * 代码描述:平台自配的同城订单自动派单
+     * 作者:WPing丶
+     * 请求方式:GET
+     * 创建时间:2023/07/04 16:39:37
+     * @param object order
+     */
+    private function autoSendDeliveryOrder($order)
+    {
+        \Yii::warning(['---- Order Event BEGIN 平台自动派单开始,order_id='.$order->id.' ----']);
+        if ($order->is_delivery != 1) { //非同城订单
+            \Yii::warning(['---- Order Event BEGIN 非同城订单,order_id='.$order->id.' ----']);
+            return false;
+        }
+        $values = Option::find()->where([
+            'store_id' => 0,
+            'group' => OptionSetting::LOCAL_DELIVERY_GROUP_NAME, 'name' => OptionSetting::LOCAL_DELIVERY_SETTING
+        ])->select('value')->one();
+        if ($values) {
+            $local_setting = json_decode($values->value, true);
+        } else {
+            $local_setting = null;
+        }
+        $default_time = $local_setting['default_time']['value'];
+
+        if ((time() + ($default_time * 60)) < $order->delivery_time) { //期望送达时间提前30分钟分配订单
+            \Yii::warning(['---- Order Event BEGIN 当前订单时间小于期望送达时间,order_id='.$order->id.' ----']);
+            return false;
+        }
+        $delivery_info = DeliveryInfo::findOne(['order_no' => $order->order_no]);
+        if ($delivery_info->is_local == DeliveryInfo::IS_LOCAL_NO) { //非平台自配
+            \Yii::warning(['---- Order Event BEGIN 当前订单非平台自配订单,order_id='.$order->id.' ----']);
+            return false;
+        }
+        $option = Option::find()->where(['store_id' => 0, 'group' => OptionSetting::LOCAL_DELIVERY_GROUP_NAME, 'name' => OptionSetting::LOCAL_DELIVERY_SETTING])->select('value')->one();
+        if ($option) {
+            $setting = json_decode($option->value, true);
+        } else {
+            $setting = null;
+        }
+        if ($setting['send_type']['value'] != 'auto') { //未开启自动派单
+            \Yii::warning(['---- Order Event BEGIN 平台未开启自动派单,order_id='.$order->id.' ----']);
+            return false;
+        }
+        //获取可配送此订单的配送员列表
+        $query = LocalDeliveryCourier::find()
+            ->where([
+                'is_delete' => 0,
+                'state' => 2,
+                'status' => 1
+            ]);
+        /* 2023年7月6日20:17:11 */
+        //配送员筛选条件:配送订单自动推送给负责本村的配送员
+        $province_id = $order->province_id ? $order->province_id : 0;
+        $city_id = $order->city_id ? $order->city_id : 0;
+        $district_id = $order->district_id ? $order->district_id : 0;
+        $town_id = $order->town_id ? $order->town_id : 0;
+        $village_id = $order->village_id ? $order->village_id : 0;
+        $area = '[{"province_id":"' . $province_id . '","city_id":"' . $city_id . '","district_id":"' . $district_id . '","town_id":"' . $town_id . '","village_id":"' . $village_id . '"}]';
+        $query->andWhere(['area' => $area]);
+        /* end */
+        //默认都为店铺模式
+        //if ($setting['delivery_type']['value'] == "store") { //店铺模式:开启该模式只有店铺的“专属配送员”或者“平台配送员”才可以配送此订单
+            $query->andWhere([
+                'or',
+                ['store_id' => $order->store_id],
+                ['type' => 1]
+            ]);
+        //}
+        $courier_list = $query->asArray()->all();
+        $courier_list_new = [];
+        foreach ($courier_list as $courier) {
+            //获取当前配送员正在配送的订单数量
+            $now_order_num = DeliveryInfo::find()
+                ->alias('di')
+                ->leftJoin(['o' => Order::tableName()], 'o.order_no = di.order_no')
+                ->where(['di.rider_id' => $courier['id'], 'di.is_local' => 1, 'o.is_pay' => 1])
+                ->andWhere([
+                    'or',
+                    ['o.trade_status' => 0],
+                    ['o.trade_status' => 1]
+                ])->count();
+            if ($courier['max_num'] == 0 || $now_order_num < $courier['max_num']) { //排除掉订单满载的配送员
+                $work_time = json_decode($courier['work_time'],true);
+                $begin_time = strtotime(date('Y-m-d ').$work_time[0]['begin_time']);
+                $end_time = strtotime(date('Y-m-d ').$work_time[0]['end_time']);
+                if (time() >= $begin_time && time() <= $end_time ) {//排除不在上岗时间的配送员
+                    $courier_list_new[] = $courier;
+                }
+            }
+        }
+        if (count($courier_list_new) == 0) { //没有满足条件的配送员
+            \Yii::warning(['---- Order Event BEGIN 平台没有满足条件的配送员,order_id='.$order->id.' ----']);
+            return false;
+        }
+        //随机选择一名天选打工人给他分配订单(目前是随机,后期再优化)
+        $t = \Yii::$app->db->beginTransaction(); //开始事务
+        $randomKey = array_rand($courier_list_new);
+        $chosen_worker = $courier_list_new[$randomKey];
+        $delivery_info->rider_id = $chosen_worker['id'];
+        $delivery_info->rider_name = $chosen_worker['real_name'];
+        $delivery_info->rider_mobile = $chosen_worker['mobile'];
+        $delivery_info->local_status = DeliveryInfo::LOCAL_STATUS_WAITING;
+        $delivery_info->rush_time = time();
+        if (!$delivery_info->save()) {
+            \Yii::warning(['---- Order Event BEGIN 存delivery_info表失败,order_id='.$order->id.' ----']);
+            $t->rollBack(); //事务回滚
+            return false;
+        }
+        $order->send_time = time();
+        $order->trade_status = 2;
+        if (!$order->save()) {
+            \Yii::warning(['---- Order Event BEGIN 存order表失败,order_id='.$order->id.' ----']);
+            $t->rollBack(); //事务回滚
+            return false;
+        }
+        \Yii::warning(['---- Order Event END 自动派单成功,order_id='.$order->id.' ----']);
+        $t->commit(); //事务执行
+    }
+
+
+    //会员到期
+    public function userLevelExpiresHandle() {
+        try {
+            //获取已经到期的用户且排除永久日期的用户
+            $time = time();
+            $user_list = User::find()->where(['is_delete' => User::USER_NOT_DELETE])
+                ->andWhere(['AND', ['<', 'user_level_expires', $time], ['>', 'user_level_expires', 0]])
+                ->asArray()->all();
+            foreach ($user_list as $user_item) {
+                $user_level_expires_ext = json_decode($user_item['user_level_expires_ext'], true);
+                //排序
+                $last_names = array_column($user_level_expires_ext, 'level');
+                array_multisort($last_names, SORT_DESC, $user_level_expires_ext);
+                //去除已经过期的
+                if ($user_level_expires_ext) {
+                    foreach ($user_level_expires_ext as $user_level_index => $user_level_item) {
+                        // 去除已经过期的
+                        if ($user_level_item['expires_in'] > 0 && $user_level_item['expires_in'] <= time()) {
+                            unset($user_level_expires_ext[$user_level_index]);
+                        }
+                    }
+                }
+                $user_level_expires_ext = array_values($user_level_expires_ext);
+
+                $user = User::findOne($user_item['id']);
+
+                //
+                $user_level_expires = $user->user_level_expires;
+                $user_level = -1;
+                if (isset($user_level_expires_ext[0]['expires_in'])) {
+                    $user_level_expires = $user_level_expires_ext[0]['expires_in'];
+                    $user_level = $user_level_expires_ext[0]['level'];
+                }
+
+
+                $user->user_level_expires_ext = json_encode($user_level_expires_ext, JSON_UNESCAPED_UNICODE);
+                $user->user_level_expires = $user_level_expires;
+                $user->level = $user_level;
+                $user->save();
+            }
+
+
+            $team_grades_list = TeamGrades::find()->where(['is_delete' => User::USER_NOT_DELETE])
+                ->andWhere(['AND', ['<', 'level_expires', $time], ['>', 'level_expires', 0]])
+                ->asArray()->all();
+            foreach ($team_grades_list as $team_grades_item) {
+                $level_expires_ext = json_decode($team_grades_item['level_expires_ext'], true);
+                //排序
+                $last_names = array_column($level_expires_ext, 'level');
+                array_multisort($last_names, SORT_DESC, $level_expires_ext);
+                //去除已经过期的
+                if ($level_expires_ext) {
+                    foreach ($level_expires_ext as $user_level_index => $user_level_item) {
+                        // 去除已经过期的
+                        if ($user_level_item['expires_in'] > 0 && $user_level_item['expires_in'] <= time()) {
+                            unset($level_expires_ext[$user_level_index]);
+                        }
+                    }
+                }
+                $level_expires_ext = array_values($level_expires_ext);
+
+                $teamGrades = TeamGrades::findOne($team_grades_item['id']);
+
+                //
+                $level_expires = 0;
+                $team_grades_level = -1;
+                if (isset($level_expires_ext[0]['expires_in'])) {
+                    $level_expires = $level_expires_ext[0]['expires_in'];
+                    $team_grades_level = $level_expires_ext[0]['level'];
+                }
+
+
+                $teamGrades->level_expires_ext = json_encode($level_expires_ext, JSON_UNESCAPED_UNICODE);
+                $teamGrades->level_expires = $level_expires;
+                $teamGrades->team_grades_level = $team_grades_level;
+                $teamGrades->save();
+            }
+
+
+        } catch (\Exception $e) {
+
+        }
+    }
+
+
+    public function getWechatConfig($store_id) {
+        // TODO: 小程序为例
+        // 获取微信配置进行初始化
+        $wechat_config = WechatConfig::findOne(['store_id' => $store_id, 'type' => 1]);
+        if (\Yii::$app->prod_is_dandianpu()) {
+            $platform_mch_appid = Option::get('one_store_wechat_appid', 0, 'saas')['value'];
+            $platform_mch_key = Option::get('one_store_wechat_secret', 0, 'saas')['value'];
+            $wechat_config = (object)[
+                'app_id' => $platform_mch_appid,
+                'app_secret' => $platform_mch_key
+            ];
+            //没有进件走平台账号
+            if($store_id > 0){
+                $hasIncoming = \app\models\Store::hasIncoming($store_id);
+                if(!$hasIncoming){
+                    $mch_id = Option::get('one_store_mch_id', 0, 'saas', '')['value'];
+                    $pay_key = Option::get('one_store_pay_key', 0, 'saas', '')['value'];
+                    $apiclient_cert = Option::get('one_store_apiclient_cert', 0, 'saas', '')['value'];
+                    $apiclient_key = Option::get('one_store_apiclient_key', 0, 'saas', '')['value'];
+                    $wechat_config->mch_id = $mch_id;
+                    $wechat_config->pay_key = $pay_key;
+                    $wechat_config->cert_pem = $apiclient_cert;
+                    $wechat_config->key_pem = $apiclient_key;
+                }
+            }
+        } else {
+            //如果是商盟 获取商盟小程序配置信息
+            if($store_id == -1){
+                $keys = [
+                    'platform_appid',
+                    'platform_mch_id',
+                    'platform_key',
+                    'platform_apiclient_cert',
+                    'platform_apiclient_key',
+                    'platform_pay_key',
+                ];
+                $data = Option::get($keys, 0, 'saas');
+                if (empty($data)) {
+                    $data = [
+                        'platform_appid' => '',
+                        'platform_mch_id' => '',
+                        'platform_key' => ' ',
+                        'platform_apiclient_cert' => '',
+                        'platform_apiclient_key' => '',
+                        'platform_pay_key'=> '',
+                    ];
+                } else {
+                    $arr = [];
+                    foreach ($data as $value) {
+                        $index = array_search($value['name'], $keys);
+                        unset($keys[$index]);
+                        $arr[$value['name']] = $value['value'];
+                    }
+                    foreach ($keys as $key) {
+                        $arr[$key] = '';
+                    }
+                    $data = $arr;
+                }
+                $wechat_config =new WechatConfig();
+                $wechat_config->app_id  =  $data['platform_appid'];
+                $wechat_config->app_secret  =  $data['platform_key'];
+                $wechat_config->mch_id = $data['platform_mch_id'];
+                $wechat_config->pay_key = $data['platform_pay_key'];
+                $wechat_config->cert_pem = $data['platform_apiclient_cert'];
+                $wechat_config->key_pem = $data['platform_apiclient_key'];
+            }
+        }
+
+        // 证书
+        if (!is_dir(\Yii::$app->runtimePath . '/pem')) {
+            mkdir(\Yii::$app->runtimePath . '/pem');
+            file_put_contents(\Yii::$app->runtimePath . '/pem/index.html', '');
+        }
+
+        $cert_pem_file = null;
+        if (isset($wechat_config->cert_pem) && $wechat_config->cert_pem) {
+            $cert_pem_file = \Yii::$app->runtimePath . '/pem/' . md5($wechat_config->cert_pem);
+            if (!file_exists($cert_pem_file)) {
+                file_put_contents($cert_pem_file, $wechat_config->cert_pem);
+            }
+        }
+
+        $key_pem_file = null;
+        if (isset($wechat_config->key_pem) && $wechat_config->key_pem) {
+            $key_pem_file = \Yii::$app->runtimePath . '/pem/' . md5($wechat_config->key_pem);
+            if (!file_exists($key_pem_file)) {
+                file_put_contents($key_pem_file, $wechat_config->key_pem);
+            }
+        }
+
+        $config = [
+            'app_id' => $wechat_config->app_id,
+            'secret' => $wechat_config->app_secret,
+            'key' => $wechat_config->pay_key ?? '',
+            'mch_id' => $wechat_config->mch_id ?? '',
+            'cert_path' => $cert_pem_file,
+            'key_path' => $key_pem_file,
+            'response_type' => 'array'
+        ];
+
+        return Factory::payment($config);
+    }
+
+    //获取微信转账状态
+    public function getWechatCashStatus($store_id) {
+        $cash_list = Cash::find()->where(
+            [
+                'store_id' => $store_id,
+                'is_delete' => 0,
+                'status' => Cash::STATUS_GIVEN,
+                'pay_type' => Cash::PAY_TYPE_WX,
+                'wx_cash_status' => [
+                    -1,
+                    Cash::WX_CASH_STATUS_INIT,
+                    Cash::WX_CASH_STATUS_WAIT_PAY,
+                    Cash::WX_CASH_STATUS_PROCESSING
+                ], 'wx_cash_type' => Cash::WX_CASH_TYPE_OLD
+            ])->asArray()->all();
+
+        $wechat = $this->getWechatConfig($store_id);
+        $Wxv3 = (new \app\utils\WechatMerchant\WxV3($wechat));
+
+        foreach ($cash_list as $item) {
+            $this->handleWechatCashFail($Wxv3, $store_id, $item['order_no']);
+        }
+
+    }
+
+    public static function handleWechatCashFail($Wxv3, $store_id, $order_no) {
+        $cash = Cash::findOne(['order_no' => $order_no, 'is_delete' => 0, 'wx_cash_status' => [
+            -1,
+            Cash::WX_CASH_STATUS_INIT,
+            Cash::WX_CASH_STATUS_WAIT_PAY,
+            Cash::WX_CASH_STATUS_PROCESSING
+        ], 'wx_cash_type' => Cash::WX_CASH_TYPE_OLD]);
+        if ($cash) {
+            $result = $Wxv3->getBatchDetail($store_id, ['out_batch_no' => $order_no]);
+            if (!$result['code']) {
+                $cash->wx_cash_status = Cash::WX_CASH_STATUS_ARR[$result['data']['detail_status']];
+                $cash->wx_cash_error = "";
+                if (intval($cash->wx_cash_status) === Cash::WX_CASH_STATUS_FAIL) {
+                    $cash->wx_cash_error = Cash::WX_CASH_FAIL_REASON[$result['data']['fail_reason']];
+                    $cash->status = Cash::STATUS_REFUSE;
+                    cash::cashRefuse($cash->id);
+                }
+                if ($cash->save()) {
+                    $user = User::findOne(['id' => $cash->user_id]);
+                    debug_log([
+                        'type' => '提现驳回成功',
+                        'result' => $result
+                    ], 'wechat_cash_status.log');
+                    NoticeSend::CashFail($cash->user_id, $user->binding, $cash->price, '提现被驳回', '提现被驳回', $store_id);
+                } else {
+                    debug_log([
+                        'type' => '提现驳回失败',
+                        'error' => json_encode($cash->errors, JSON_UNESCAPED_UNICODE)
+                    ], 'wechat_cash_status.log');
+                }
+            }
+
+        }
+    }
+}

+ 276 - 0
events/SupplierOrderEvent.php

@@ -0,0 +1,276 @@
+<?php
+/**
+ * 重庆赤晓店信息科技有限公司
+ * https://www.chixiaodian.com
+ * Copyright (c) 2023 赤店商城 All rights reserved.
+ */
+namespace app\events;
+
+use app\models\Admin;
+use app\models\Option;
+use app\models\Order;
+use app\models\OrderDetail;
+use app\models\OrderTransit;
+use app\models\Purchase;
+use app\models\PurchaseOrder;
+use app\models\SaasUser;
+use app\models\Store;
+use app\models\StoreCloud;
+use app\models\StoreShareMoney;
+use app\models\Supplier;
+use app\models\SaasUserPriceLog;
+use app\models\SaasSupplierReferral;
+use app\constants\OptionSetting;
+
+/**
+ * 事件类
+ * Class TestEvent
+ * @package app\events
+ */
+class SupplierOrderEvent
+{
+    public $supplier_id = 1;
+    public function onLoad() {
+        // 处理过了售后期且没有售后的订单
+        $this->orderSend();
+        //处理转单
+        $this->orderTransitSend();
+    }
+
+    public function orderTransitSend() {
+        try {
+            //代理佣金抽取
+            $time = time();
+            $supplier_id = $this->supplier_id;
+            $supplier = Supplier::findOne(['cloud_supplier_id' => $supplier_id]);
+            $after_sale_time = $supplier->sale_day;
+            $sale_time = $time - ($after_sale_time * 86400);
+            $order_list = OrderTransit::find()->alias('o')
+                ->where([
+                    'and',
+                    ['o.cloud_supplier_id' => $supplier_id],
+                    ['o.is_delete' => 0, 'o.status' => 2,  'o.is_sale' => 0],
+                    ['<=', 'o.confirm_time', $sale_time],
+                    ['o.cancel_examine' => 0],
+                ])->andWhere(['<>', 'status', -1])
+                ->select(['o.*'])->groupBy('o.id')
+                ->offset(0)->limit(10)->asArray()->all();
+
+            foreach ($order_list as $index => $value) {
+                $OrderTransit = OrderTransit::find()->where(['order_id' => $value['order_id'], 'is_sale' => 0])->select('id')->asArray()->all();
+                $order_detail = OrderDetail::find()->where(['order_id' => $value['order_id']])->count();
+                if ((int)$order_detail === (int)count($OrderTransit)) {
+                    foreach ($OrderTransit as $item) {
+                        $this->PurchaseOrderAgencyPrice($item['id']);
+                        $order = OrderTransit::findOne($item['id']);
+                        $order->is_sale = 1;
+                        $order->save();
+                    }
+                }
+
+
+
+            }
+
+        } catch (\Exception $e) {
+
+        }
+    }
+    /**
+     * 处理过了售后期且没有售后的订单
+     */
+    private function orderSend() {
+        $time = time();
+        $supplier_id = $this->supplier_id;
+        $supplier = Supplier::findOne(['cloud_supplier_id' => $supplier_id]);
+        $after_sale_time = $supplier->sale_day;
+        $sale_time = $time - ($after_sale_time * 86400);
+        $order_list = PurchaseOrder::find()->alias('o')
+            ->where([
+                'and',
+                ['o.supplier_id' => $supplier_id],
+                ['o.is_delete' => 0, 'o.trade_status' => Order::ORDER_FLOW_CONFIRM,  'o.is_sale' => 0],
+                ['<=', 'o.confirm_time', $sale_time],
+                ['o.cancel_examine' => 0],
+            ])->andWhere(['<>', 'trade_status', Order::ORDER_FLOW_CANCEL])
+            ->select(['o.*'])->groupBy('o.id')
+            ->offset(0)->limit(10)->asArray()->all();
+        foreach ($order_list as $index => $value) {
+            $this->agencyPrice($value['id']);
+            $order = PurchaseOrder::findOne($value['id']);
+            $order->is_sale = 1;
+            $order->save();
+        }
+    }
+
+    //转单订单抽佣
+    private function PurchaseOrderAgencyPrice($order_id){
+        $supplier_id = $this->supplier_id;
+        $order = OrderTransit::find()->where(['id' => $order_id, 'is_sale' => 0])->asArray()->one();
+        $price = $order['order_price'];
+        $supplier = Supplier::findOne(['cloud_supplier_id' => $supplier_id]);
+        $this->supplierParentPrice($supplier, $order);
+        $old_order = Order::findOne($order['order_id']);
+        $store = Store::findOne($old_order->store_id);
+        $option = Option::get('agency_price_config', 0, 'saas', [])['value'];
+        if ($option) {
+            $option = json_decode($option, true);
+        }
+        $province_percent = $option['supplier_province_percent'] ?? 0;
+        $city_percent = $option['supplier_city_percent'] ?? 0;
+        $district_percent = $option['supplier_district_percent'] ?? 0;
+        $admin_list = Admin::find()->where(['province_id' => $supplier->province_id, 'is_delete' => 0, 'type' => 'admin'])->andWhere(['>', 'area_level', 0])->asArray()->all();
+        foreach ($admin_list as $item) {
+            $ag_rebate = 0;
+            $rate = 0;
+            $desc = '';
+            //省
+            if ((int)$item['area_level'] === 3) {
+                $ag_rebate = $price * ($province_percent / 100) * ($supplier->rate / 100);
+                $ag_rebate = sprintf("%.2f", $ag_rebate);
+                $rate = $province_percent;
+                $desc = '商户'. $store->name .'订单'. $old_order->order_no .'转单-发放 '. $ag_rebate .'元省代佣金';
+            }
+            //市
+            if ((int)$item['area_level'] === 2 && (int)$item['city_id'] === (int)$supplier->city_id) {
+                $ag_rebate = $price * ($city_percent / 100) * ($supplier->rate / 100);
+                $ag_rebate = sprintf("%.2f", $ag_rebate);
+                $rate = $city_percent;
+                $desc = '商户'. $store->name .'订单'. $old_order->order_no .'转单-发放 '. $ag_rebate .'元市代佣金';
+            }
+            //区
+            if ((int)$item['area_level'] === 1 && (int)$item['city_id'] === (int)$supplier->city_id && (int)$item['district_id'] === (int)$supplier->district_id) {
+                $ag_rebate = $price * ($district_percent / 100) * ($supplier->rate / 100);
+                $ag_rebate = sprintf("%.2f", $ag_rebate);
+                $rate = $district_percent;
+                $desc = '商户'. $store->name .'订单'. $old_order->order_no .'转单-发放 '. $ag_rebate .'元区代佣金';
+            }
+
+            if ($ag_rebate <= 0) {
+                continue;
+            }
+            $SaasUser = SaasUser::findOne($item['saas_user_id']);
+            if ($SaasUser) {
+                $SaasUser->share_profit = ($SaasUser->share_profit * 1) + ($ag_rebate * 1);
+                $res = $SaasUser->save();
+                if ($res) {
+                    $form = new StoreShareMoney();
+                    $form->user_id = $item['saas_user_id'];
+                    $form->store_id = $order->store_id ?? get_store_id();
+                    $form->profit = $rate;
+                    $form->total_price = $price;
+                    $form->desc = $desc;
+                    $form->order_id = $order['order_id'];
+                    $form->created_at = time();
+                    $form->status = StoreShareMoney::STATUS_STORE_ORDER;
+                    $form->type = StoreShareMoney::TYPE_AREA_AGENT;
+                    $form->commission = $ag_rebate;
+                    $form->cloud_type = 1;
+                    $form->is_send = 1;
+                    $form->save();
+                } else {
+                    debug_log(json_encode($SaasUser->errors));
+                }
+            }
+        }
+    }
+
+    //采购商抽佣
+    private function agencyPrice($order_id){
+        try {
+            $order = PurchaseOrder::find()->where(['id' => $order_id, 'is_sale' => 0])->asArray()->one();
+            $supplier = Supplier::findOne(['cloud_supplier_id' => $order['supplier_id']]);
+            $this->supplierParentPrice($supplier, $order);
+            $option = Option::get('agency_price_config', 0, 'saas');
+            if ($option['value']) {
+                $option = json_decode($option['value'], true);
+            }
+            $province_id = $supplier->province_id;
+            $city_id = $supplier->city_id;
+            $district_id =  $supplier->district_id;
+            $city_percent = $option['supplier_city_percent'] ?? 0;
+            $district_percent = $option['supplier_district_percent'] ?? 0;
+            $province_percent = $option['supplier_province_percent'] ?? 0;
+            $rate = 0;
+
+            $admin_list = Admin::find()->where(['is_delete' => 0, 'province_id' => $province_id])->andWhere(['>', 'area_level', 0])->asArray()->all();
+            $store_user = StoreCloud::findOne(['saas_user_id' => $order['saas_id']]);
+            foreach ($admin_list as $item) {
+                $price = 0;
+                $desc = '';
+                if ((int)$item['area_level'] === 3) {
+                    $price = $order['pay_price'] * ($province_percent / 100) * ($supplier->rate / 100);
+                    $price = sprintf("%.2f", $price);
+                    $desc = '商户'. $store_user->name .'订单'. $order['order_no'] .'采购订单-发放 '. $price .'元省代佣金';
+                }
+                if ((int)$item['area_level'] === 2 && (int)$item['city_id'] === $city_id) {
+                    $price = $order['pay_price'] * ($city_percent / 100) * ($supplier->rate / 100);
+                    $price = sprintf("%.2f", $price);
+                    $desc = '商户'. $store_user->name .'订单'. $order['order_no'] .'采购订单-发放 '. $price .'元市代佣金';
+                }
+                if ((int)$item['area_level'] === 1 && (int)$item['city_id'] === (int)$city_id && (int)$item['district_id'] === (int)$district_id) {
+                    $price = $order['pay_price'] * ($district_percent / 100) * ($supplier->rate / 100);
+                    $price = sprintf("%.2f", $price);
+                    $desc = '商户'. $store_user->name .'订单'. $order['order_no'] .'采购订单-发放 '. $price .'元区代佣金';
+                }
+                if ($price <= 0) {
+                    continue;
+                }
+                //给用户增加佣金
+                $SaasUser = SaasUser::find()->where(['id' => $item['saas_user_id']])->one();
+                if ($SaasUser) {
+
+                    $SaasUser->share_profit = ($SaasUser->share_profit * 1) + ($price * 1);
+                    $res = $SaasUser->save();
+                    //增加记录
+                    if ($res) {
+                        $form = new StoreShareMoney();
+                        $form->user_id = $item['saas_user_id'];
+                        $form->store_id = $order['store_id'];
+                        $form->profit = $rate;
+                        $form->total_price = $order['pay_price'];
+                        $form->desc = $desc;
+                        $form->order_id = $order_id;
+                        $form->created_at = time();
+                        $form->status = StoreShareMoney::STATUS_STORE_ORDER;
+                        $form->commission = $price;
+                        $form->order_type = 1;
+                        $form->cloud_type = 1;
+                        $form->type = StoreShareMoney::TYPE_AREA_AGENT;
+                        $form->is_send = 1;
+                        $form->save();
+                    }
+                }
+            }
+
+
+
+        } catch (\Exception $e) {
+            debug_log('抽佣' . $e->getMessage() . $e->getLine());
+            \Yii::error($e->getMessage());
+        }
+    }
+    private function supplierParentPrice($supplier, $order) {
+        try {
+            $saasSupplierReferral = SaasSupplierReferral::findOne(['supplier_id' => $supplier['id'], 'is_enable' => 1]);
+            if(!$saasSupplierReferral){
+                return;
+            }
+            $log_type = SaasUserPriceLog::LOG_TYPE_INCOME;
+            $amount_type = SaasUserPriceLog::AMOUNT_TYPE_SUPPLIER_PARENT;
+            $desc = '供货商推荐人分佣';
+            $defaultSet = Option::get(OptionSetting::SHARE_SAAS_SUPPLIER_REFERRAL_DEFAULT_SETTING, -1, OptionSetting::SHARE_GROUP_NAME, '{}')['value'];
+            $defaultSet = json_decode($defaultSet, true);
+            if(($saasSupplierReferral['referral_rebate'] == 0) &&
+                    (!empty($defaultSet['is_enable']) && !empty($defaultSet['referral_rebate']))){
+                $saasSupplierReferral['referral_rebate'] = $defaultSet['referral_rebate'];
+            }
+            $saas_id = $saasSupplierReferral['referral_id'];
+            $price = $order['pay_price'] * ($saasSupplierReferral['referral_rebate'] / 100) * ($supplier['rate'] / 100);
+            $saveLog = SaasUserPriceLog::saveLog($saas_id, $price, $amount_type, $log_type, $order['order_no'], $desc, $supplier['id']);
+            \Yii::warning(['---- supplierParentPrice ----', $saveLog, $saas_id, $price, $amount_type, $log_type, $order['order_no'], $desc]);
+        } catch (\Exception $e) {
+            \Yii::warning('---- supplierParentPrice Err ----' . __LINE__, $e);
+        }
+    }
+}

BIN
favicon.ico


BIN
h5/alipay-order/static/images/sj.png


BIN
h5/assets/bg1.3bc9b1c3.png


BIN
h5/assets/coupon2.ec77f16c.png


BIN
h5/assets/editor-icon.e359ff7f.ttf


BIN
h5/assets/index-icon3.6d1d6ecd.png


BIN
h5/assets/index-icon5.d6fc2320.png


BIN
h5/chart-gpt/static/image/tabbar-icon-1-active.png


BIN
h5/chart-gpt/static/image/tabbar-icon-1.png


BIN
h5/chart-gpt/static/image/tabbar-icon-2-active.png


BIN
h5/chart-gpt/static/image/tabbar-icon-2.png


BIN
h5/chart-gpt/static/image/tabbar-icon-3-active.png


BIN
h5/chart-gpt/static/image/tabbar-icon-3.png


BIN
h5/chart-gpt/static/image/tabbar-icon-qa-active.png


BIN
h5/chart-gpt/static/image/tabbar-icon-qa.png


+ 75 - 0
h5/chart-gpt/static/js/tabbarJson.js

@@ -0,0 +1,75 @@
+export default [
+  {
+    name: '导航',
+    is_show: true,
+    controlComName: 'widgetNavControl',
+    show_type: 'nav',
+    params: {
+      defaultColor: '#888',
+      activeColor: '#f0250e',
+      navList: [
+        {
+          pic_url:
+            require('@/chart-gpt/static/image/tabbar-icon-1.png'),
+          active_url:
+            require('@/chart-gpt/static/image/tabbar-icon-1-active.png'),
+          nav_text: '提问首页',
+          link: {
+            name: '提问首页',
+            link: '/chart-gpt/index/index',
+            open_type: 'redirectTo',
+            params: [],
+          },
+        },
+        {
+          pic_url:
+            require('@/chart-gpt/static/image/tabbar-icon-2.png'),
+          active_url:
+            require('@/chart-gpt/static/image/tabbar-icon-2-active.png'),
+          nav_text: '提问模版',
+          link: {
+            name: '提问模版',
+            link: '/chart-gpt/moban/moban',
+            open_type: 'redirectTo',
+            params: [],
+          },
+        },
+        {
+          pic_url:
+            require('@/chart-gpt/static/image/tabbar-icon-3.png'),
+          active_url:
+            require('@/chart-gpt/static/image/tabbar-icon-3-active.png'),
+          nav_text: '每日任务',
+          link: {
+            name: '每日任务',
+            link: '/chart-gpt/task/task',
+            open_type: 'redirectTo',
+            params: [],
+          },
+        },
+        {
+          pic_url:
+            require('@/chart-gpt/static/image/tabbar-icon-qa.png'),
+          active_url:
+            require('@/chart-gpt/static/image/tabbar-icon-qa-active.png'),
+          nav_text: '问答记录',
+          link: {
+            name: '问答记录',
+            link: '/chart-gpt/qa-list/qa-list',
+            open_type: 'redirectTo',
+            params: [],
+          },
+        }
+
+      ],
+    },
+    moduleCss: {
+      backgroundColor: '#ffffff',
+      backgroundImage: '',
+      bgImg: '',
+      useBackground: true,
+      backgroundSize: '100% 100%',
+      backgroundRepeat: 'no-repeat',
+    },
+  },
+]

BIN
h5/distribution/static/images/order/z_1.png


BIN
h5/distribution/static/images/order/z_2.png


BIN
h5/distribution/static/images/order/z_3.png


BIN
h5/global/static/image/alignment.png


BIN
h5/global/static/image/globalIcon.png


BIN
h5/global/static/image/globalList.png


BIN
h5/global/static/image/globalLog.png


BIN
h5/global/static/image/globalPool.png


BIN
h5/global/static/image/globalTi.png


BIN
h5/global/static/image/icon6.png


BIN
h5/global/static/image/pool.png


BIN
h5/goods/static/images/goods-group-price-header.png


BIN
h5/goods/static/images/jiangjia.png


+ 2 - 0
h5/index.html

@@ -0,0 +1,2 @@
+<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title></title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5/static/js/chunk-vendors.65542042.js></script><script src=/h5/static/js/index.20ae380b.js></script></body></html>

BIN
h5/livestockAdoption/static/images/land/address.png


BIN
h5/livestockAdoption/static/images/land/cat.png


BIN
h5/livestockAdoption/static/images/land/check.png


BIN
h5/livestockAdoption/static/images/land/index.png


BIN
h5/livestockAdoption/static/images/land/kefu.png


BIN
h5/livestockAdoption/static/images/land/monitor.png


BIN
h5/livestockAdoption/static/images/land/no_check.png


Някои файлове не бяха показани, защото твърде много файлове са промени