From a4b3ee325c7354579d495bc74a777e494e5ec38c Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Fri, 06 Feb 2026 18:18:44 +0800
Subject: [PATCH] 商品可以价格面议 选择走访时显示输入走访企业名 分会添加活动时要总会审核 分类添加人数限制,添加活动选择了填写人数限制的分类时活动名额下显示该分类人数限制为15 同一个企业30天内只能走访一次,在30天内走访同一个企业时提示该企业已被走访xx天后才可以从新走访

---
 admin/app/common/model/plus/operations/Setting.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/admin/app/common/model/plus/operations/Setting.php b/admin/app/common/model/plus/operations/Setting.php
index 221eb15..f63ad80 100644
--- a/admin/app/common/model/plus/operations/Setting.php
+++ b/admin/app/common/model/plus/operations/Setting.php
@@ -1 +1 @@
-<?php



namespace app\common\model\plus\operations;



use app\common\model\BaseModel;

use think\facade\Cache;



/**

 * 区域代理设置模型

 */

class Setting extends BaseModel

{

    protected $name = 'operations_setting';

    protected $createTime = false;



    /**

     * 转义数组格式

     * @param $value

     * @return mixed

     */

    public function getValuesAttr($value)

    {

        return json_decode($value, true);

    }



    /**

     * 转义成json格式

     * @param $value

     * @return false|string

     */

    public function setValuesAttr($value)

    {

        return json_encode($value);

    }



    /**

     * 获取指定项设置

     * @param $key

     * @param null $app_id

     * @return array|mixed

     */

    public static function getItem($key, $app_id = null)

    {

        $data = static::getAll($app_id);

        return isset($data[$key]) ? $data[$key]['values'] : [];

    }



    /**

     * 获取区域代理设置

     */

    public static function getAll($app_id = null)

    {

        $self = new static;

        is_null($app_id) && $app_id = $self::$app_id;

        if (!$data = Cache::get('region_setting_' . $app_id)) {

            $data = array_column($self->select()->toArray(), null, 'key');

            Cache::tag('cache')->set('region_setting_' . $app_id, $data);

        }

        return array_merge_multiple($self->defaultData(), $data);

    }



    /**

     * 获取设置项信息

     */

    public static function detail($key)

    {

        return (new static())->find(compact('key'));

    }



    /**

     * 是否开启分销功能

     */

    public static function isOpen($app_id = null)

    {

        return static::getItem('basic', $app_id)['is_open'];

    }



    /**

     * 分销中心页面名称

     */

    public static function getregionTitle($app_id = null)

    {

        return static::getItem('words', $app_id)['index']['title']['value'];

    }



    /**

     * 默认配置

     */

    public function defaultData()

    {

        return [

            'basic' => [

                'key' => 'basic',

                'describe' => '基础设置',

                'values' => [

                    // 是否开启分红功能

                    'is_open' => '0',   // 参数值:1开启 0关闭

                    //'jcaward' => '0',   //级差奖

                    'pjaward' => '0',   //平级奖

                    'pjaward_level' => '1',   //平级奖奖励层级,默认往上1级

                    'become' => '10',

                    'total_rate' => '0',

                    // 分红结算方式

                    'bonus_type' => '20', // 10按周 20按月 30按年

                    'total_team_user' => 0, // 团队总人数

                    'self_buy_money' => 0, // 累计团队业绩是是否计算个人业绩

                    'one_expend_money' => 0, // 个人一次性消费

                    // 购买指定商品成为分销商 0关闭 1开启

                    'become__buy_product' => '0',

                    // 购买指定商品的id集

                    'become__buy_product_ids' => [],

                    'province_condition' => 0,

                    'city_condition' => 0,

                    'area_condition' => 0

                ],

            ],

            'condition' => [

                'key' => 'condition',

                'describe' => '运营中心条件',

                'values' => [

                    // 成为区域代理条件

                    'become' => '10',   // 参数值:10填写申请信息(需后台审核) 20填写申请信息(无需审核)

                    // 购买指定商品成为区域代理 0关闭 1开启

                    'become__buy_product' => '0',

                    // 购买指定商品的id集

                    'become__buy_product_ids' => [],

                ]

            ],

            'bonus' => [

                'key' => 'bonus',

                'describe' => '抽成设置',

                'values' => [

                    // 一级佣金

                    'province_ratio' => '0',

                    // 一级佣金

                    'city_ratio' => '0',

                    // 一级佣金

                    'area_ratio' => '0',

                ]

            ],

            'settlement' => [

                'key' => 'settlement',

                'describe' => '结算',

                'values' => [

                    // 提现方式

                    'pay_type' => [],   // 参数值:10微信支付 20支付宝支付 30银行卡支付

                    // 微信支付自动打款

                    'wechat_pay_auto' => '0',       // 微信支付自动打款:1开启 0关闭

					'fee_rate' => 0, //手续费

                    // 最低提现额度

                    'min_money' => '10.00',

                    // 分红结算天数

                    'settle_days' => '10',

                ]

            ],

            'words' => [

                'key' => 'words',

                'describe' => '自定义文字',

                'values' => [

                    'index' => [

                        'title' => [

                            'default' => '运营中心',

                            'value' => '运营中心'

                        ],

                        'words' => [

                            'region' => [

                                'default' => '运营中心',

                                'value' => '运营中心'

                            ],

                            'not_region' => [

                                'default' => '很抱歉,您还不是运营中心',

                                'value' => '很抱歉,您还不是运营中心'

                            ],

                            'apply_now' => [

                                'default' => '立即加入',

                                'value' => '立即加入'

                            ],

                            'referee' => [

                                'default' => '推荐人',

                                'value' => '推荐人'

                            ],

                            'money' => [

                                'default' => '可提现分红',

                                'value' => '可提现'

                            ],

                            'freeze_money' => [

                                'default' => '待提现分红',

                                'value' => '待提现'

                            ],

                            'total_money' => [

                                'default' => '已提现金额',

                                'value' => '已提现金额'

                            ],

                            'cash' => [

                                'default' => '去提现',

                                'value' => '去提现'

                            ],

                        ]

                    ],

                    'apply' => [

                        'title' => [

                            'default' => '申请成为运营中心',

                            'value' => '申请成为运营中心'

                        ],

                        'words' => [

                            'title' => [

                                'default' => '请填写申请信息',

                                'value' => '请填写申请信息'

                            ],

                            'license' => [

                                'default' => '运营中心申请协议',

                                'value' => '运营中心申请协议'

                            ],

                            'submit' => [

                                'default' => '申请成为运营中心',

                                'value' => '申请成为运营中心'

                            ],

                            'wait_audit' => [

                                'default' => '您的申请已受理,正在进行信息核验,请耐心等待。',

                                'value' => '您的申请已受理,正在进行信息核验,请耐心等待。'

                            ],

                            'goto_mall' => [

                                'default' => '去商城逛逛',

                                'value' => '去商城逛逛'

                            ],

                            'not_pass' => [

                                'default' => '很抱歉,您未达到申请条件',

                                'value' => '很抱歉,您未达到申请条件'

                            ],

                        ]

                    ],

                    'bonus_list' => [

                        'title' => [

                            'default' => '结算明细',

                            'value' => '结算明细'

                        ],

                        'words' => [

                            

                        ]

                    ],

                    'cash_list' => [

                        'title' => [

                            'default' => '提现明细',

                            'value' => '提现明细'

                        ],

                        'words' => [

                            'all' => [

                                'default' => '全部',

                                'value' => '全部'

                            ],

                            'apply_10' => [

                                'default' => '审核中',

                                'value' => '审核中'

                            ],

                            'apply_20' => [

                                'default' => '审核通过',

                                'value' => '审核通过'

                            ],

                            'apply_40' => [

                                'default' => '已打款',

                                'value' => '已打款'

                            ],

                            'apply_30' => [

                                'default' => '驳回',

                                'value' => '驳回'

                            ],

                        ]

                    ],

                    'cash_apply' => [

                        'title' => [

                            'default' => '申请提现',

                            'value' => '申请提现'

                        ],

                        'words' => [

                            'capital' => [

                                'default' => '可提现分红',

                                'value' => '可提现分红'

                            ],

                            'money' => [

                                'default' => '提现金额',

                                'value' => '提现金额'

                            ],

                            'money_placeholder' => [

                                'default' => '请输入要提取的金额',

                                'value' => '请输入要提取的金额'

                            ],

                            'min_money' => [

                                'default' => '最低提现分红',

                                'value' => '最低提现分红'

                            ],

                            'submit' => [

                                'default' => '提交申请',

                                'value' => '提交申请'

                            ],

                        ]

                    ],

                ]

            ],

            'license' => [

                'key' => 'license',

                'describe' => '申请协议',

                'values' => [

                    'license' => ''

                ]

            ],

            'background' => [

                'key' => 'background',

                'describe' => '页面背景图',

                'values' => [

                    // 分销中心首页

                    'index' => self::$base_url . 'image/region/region-bg.jpg',

                    // 申请成为区域代理页

                    'apply' => self::$base_url . 'image/region/region-bg.jpg',

                    // 申请提现页

                    'cash_apply' => self::$base_url . 'image/region/region-bg.jpg',

                    // 权益说明

                    'description' => self::$base_url . 'image/region/description.png',

                ],

            ],

            'template_msg' => [

                'key' => 'template_msg',

                'describe' => '模板消息',

                'values' => [

                    'apply_tpl' => '',    // 区域代理审核通知

                    'cash_tpl' => '',    // 提现状态通知

                ]

            ],

        ];

    }

}
\ No newline at end of file
+<?php



namespace app\common\model\plus\operations;



use app\common\model\BaseModel;

use think\facade\Cache;



/**

 * 区域代理设置模型

 */

class Setting extends BaseModel

{

    protected $name = 'operations_setting';

    protected $createTime = false;



    /**

     * 转义数组格式

     * @param $value

     * @return mixed

     */

    public function getValuesAttr($value)

    {

        return json_decode($value, true);

    }



    /**

     * 转义成json格式

     * @param $value

     * @return false|string

     */

    public function setValuesAttr($value)

    {

        return json_encode($value);

    }



    /**

     * 获取指定项设置

     * @param $key

     * @param null $app_id

     * @return array|mixed

     */

    public static function getItem($key, $app_id = null)

    {

        $data = static::getAll($app_id);

        return isset($data[$key]) ? $data[$key]['values'] : [];

    }



    /**

     * 获取区域代理设置

     */

    public static function getAll($app_id = null)

    {

        $self = new static;

        is_null($app_id) && $app_id = $self::$app_id;

        if (!$data = Cache::get('operations_setting_' . $app_id)) {

            $data = array_column($self->select()->toArray(), null, 'key');

            Cache::tag('cache')->set('operations_setting_' . $app_id, $data);

        }

        return array_merge_multiple($self->defaultData(), $data);

    }



    /**

     * 获取设置项信息

     */

    public static function detail($key)

    {

        return (new static())->find(compact('key'));

    }



    /**

     * 是否开启分销功能

     */

    public static function isOpen($app_id = null)

    {

        return static::getItem('basic', $app_id)['is_open'];

    }



    /**

     * 分销中心页面名称

     */

    public static function getregionTitle($app_id = null)

    {

        return static::getItem('words', $app_id)['index']['title']['value'];

    }



    /**

     * 默认配置

     */

    public function defaultData()

    {

        return [

            'basic' => [

                'key' => 'basic',

                'describe' => '基础设置',

                'values' => [

                    // 是否开启分红功能

                    'is_open' => '0',   // 参数值:1开启 0关闭

                    //'jcaward' => '0',   //级差奖

                    'pjaward' => '0',   //平级奖

                    'pjaward_level' => '1',   //平级奖奖励层级,默认往上1级

                    'become' => '10',

                    'total_rate' => '0',

                    // 分红结算方式

                    'bonus_type' => '20', // 10按周 20按月 30按年

                    'total_team_user' => 0, // 团队总人数

                    'self_buy_money' => 0, // 累计团队业绩是是否计算个人业绩

                    'one_expend_money' => 0, // 个人一次性消费

                    // 购买指定商品成为分销商 0关闭 1开启

                    'become__buy_product' => '0',

                    // 购买指定商品的id集

                    'become__buy_product_ids' => [],

                    'province_condition' => 0,

                    'city_condition' => 0,

                    'area_condition' => 0

                ],

            ],

            'condition' => [

                'key' => 'condition',

                'describe' => '运营中心条件',

                'values' => [

                    // 成为区域代理条件

                    'become' => '10',   // 参数值:10填写申请信息(需后台审核) 20填写申请信息(无需审核)

                    // 购买指定商品成为区域代理 0关闭 1开启

                    'become__buy_product' => '0',

                    // 购买指定商品的id集

                    'become__buy_product_ids' => [],

                ]

            ],

            'bonus' => [

                'key' => 'bonus',

                'describe' => '抽成设置',

                'values' => [

                    // 一级佣金

                    'province_ratio' => '0',

                    // 一级佣金

                    'city_ratio' => '0',

                    // 一级佣金

                    'area_ratio' => '0',

                ]

            ],

            'settlement' => [

                'key' => 'settlement',

                'describe' => '结算',

                'values' => [

                    // 提现方式

                    'pay_type' => [],   // 参数值:10微信支付 20支付宝支付 30银行卡支付

                    // 微信支付自动打款

                    'wechat_pay_auto' => '0',       // 微信支付自动打款:1开启 0关闭

					'fee_rate' => 0, //手续费

                    // 最低提现额度

                    'min_money' => '10.00',

                    // 分红结算天数

                    'settle_days' => '10',

                ]

            ],

            'words' => [

                'key' => 'words',

                'describe' => '自定义文字',

                'values' => [

                    'index' => [

                        'title' => [

                            'default' => '运营中心',

                            'value' => '运营中心'

                        ],

                        'words' => [

                            'region' => [

                                'default' => '运营中心',

                                'value' => '运营中心'

                            ],

                            'not_region' => [

                                'default' => '很抱歉,您还不是运营中心',

                                'value' => '很抱歉,您还不是运营中心'

                            ],

                            'apply_now' => [

                                'default' => '立即加入',

                                'value' => '立即加入'

                            ],

                            'referee' => [

                                'default' => '推荐人',

                                'value' => '推荐人'

                            ],

                            'money' => [

                                'default' => '可提现分红',

                                'value' => '可提现'

                            ],

                            'freeze_money' => [

                                'default' => '待提现分红',

                                'value' => '待提现'

                            ],

                            'total_money' => [

                                'default' => '已提现金额',

                                'value' => '已提现金额'

                            ],

                            'cash' => [

                                'default' => '去提现',

                                'value' => '去提现'

                            ],

                        ]

                    ],

                    'apply' => [

                        'title' => [

                            'default' => '申请成为运营中心',

                            'value' => '申请成为运营中心'

                        ],

                        'words' => [

                            'title' => [

                                'default' => '请填写申请信息',

                                'value' => '请填写申请信息'

                            ],

                            'license' => [

                                'default' => '运营中心申请协议',

                                'value' => '运营中心申请协议'

                            ],

                            'submit' => [

                                'default' => '申请成为运营中心',

                                'value' => '申请成为运营中心'

                            ],

                            'wait_audit' => [

                                'default' => '您的申请已受理,正在进行信息核验,请耐心等待。',

                                'value' => '您的申请已受理,正在进行信息核验,请耐心等待。'

                            ],

                            'goto_mall' => [

                                'default' => '去商城逛逛',

                                'value' => '去商城逛逛'

                            ],

                            'not_pass' => [

                                'default' => '很抱歉,您未达到申请条件',

                                'value' => '很抱歉,您未达到申请条件'

                            ],

                        ]

                    ],
                    'order' => [
                        'title' => [
                            'default' => '运营中心订单',
                            'value' => '运营中心订单'
                        ],
                        'words' => [
                            'all' => [
                                'default' => '全部',
                                'value' => '全部'
                            ],
                            'unsettled' => [
                                'default' => '未结算',
                                'value' => '未结算'
                            ],
                            'settled' => [
                                'default' => '已结算',
                                'value' => '已结算'
                            ],
                        ]
                    ],

                    'bonus_list' => [

                        'title' => [

                            'default' => '结算明细',

                            'value' => '结算明细'

                        ],

                        'words' => [

                            

                        ]

                    ],

                    'cash_list' => [

                        'title' => [

                            'default' => '提现明细',

                            'value' => '提现明细'

                        ],

                        'words' => [

                            'all' => [

                                'default' => '全部',

                                'value' => '全部'

                            ],

                            'apply_10' => [

                                'default' => '审核中',

                                'value' => '审核中'

                            ],

                            'apply_20' => [

                                'default' => '审核通过',

                                'value' => '审核通过'

                            ],

                            'apply_40' => [

                                'default' => '已打款',

                                'value' => '已打款'

                            ],

                            'apply_30' => [

                                'default' => '驳回',

                                'value' => '驳回'

                            ],

                        ]

                    ],

                    'cash_apply' => [

                        'title' => [

                            'default' => '申请提现',

                            'value' => '申请提现'

                        ],

                        'words' => [

                            'capital' => [

                                'default' => '可提现分红',

                                'value' => '可提现分红'

                            ],

                            'money' => [

                                'default' => '提现金额',

                                'value' => '提现金额'

                            ],

                            'money_placeholder' => [

                                'default' => '请输入要提取的金额',

                                'value' => '请输入要提取的金额'

                            ],

                            'min_money' => [

                                'default' => '最低提现分红',

                                'value' => '最低提现分红'

                            ],

                            'submit' => [

                                'default' => '提交申请',

                                'value' => '提交申请'

                            ],

                        ]

                    ],

                ]

            ],

            'license' => [

                'key' => 'license',

                'describe' => '申请协议',

                'values' => [

                    'license' => ''

                ]

            ],

            'background' => [

                'key' => 'background',

                'describe' => '页面背景图',

                'values' => [

                    // 分销中心首页

                    'index' => self::$base_url . 'image/region/region-bg.jpg',

                    // 申请成为区域代理页

                    'apply' => self::$base_url . 'image/region/region-bg.jpg',

                    // 申请提现页

                    'cash_apply' => self::$base_url . 'image/region/region-bg.jpg',

                    // 权益说明

                    'description' => self::$base_url . 'image/region/description.png',

                ],

            ],

            'template_msg' => [

                'key' => 'template_msg',

                'describe' => '模板消息',

                'values' => [

                    'apply_tpl' => '',    // 区域代理审核通知

                    'cash_tpl' => '',    // 提现状态通知

                ]

            ],

        ];

    }

}
\ No newline at end of file

--
Gitblit v1.9.2