添加协议

main
fengxinyhyl 10 months ago
parent 484f0a38b0
commit f13695c57c
  1. 58
      app/common/repositories/system/CacheRepository.php

@ -31,60 +31,63 @@ class CacheRepository extends BaseRepository
{ {
//积分说明 //积分说明
const INTEGRAL_RULE = 'sys_integral_rule'; const INTEGRAL_RULE = 'sys_integral_rule';
//商户入驻申请协议 //商户入驻申请协议
const INTEGRAL_AGREE = 'sys_intention_agree'; const INTEGRAL_AGREE = 'sys_intention_agree';
//预售协议 //预售协议
const PRESELL_AGREE = 'sys_product_presell_agree'; const PRESELL_AGREE = 'sys_product_presell_agree';
//微信菜单 //微信菜单
const WECHAT_MENUS = 'wechat_menus'; const WECHAT_MENUS = 'wechat_menus';
//发票说明 //发票说明
const RECEIPT_AGREE = 'sys_receipt_agree'; const RECEIPT_AGREE = 'sys_receipt_agree';
//佣金说明 //佣金说明
const EXTENSION_AGREE = 'sys_extension_agree'; const EXTENSION_AGREE = 'sys_extension_agree';
//商户类型说明 //商户类型说明
const MERCHANT_TYPE = 'sys_merchant_type'; const MERCHANT_TYPE = 'sys_merchant_type';
//分销等级规则 //分销等级规则
const SYS_BROKERAGE = 'sys_brokerage'; const SYS_BROKERAGE = 'sys_brokerage';
//用户协议 //用户协议
const USER_AGREE = 'sys_user_agree'; const USER_AGREE = 'sys_user_agree';
//用户隐私协议 //用户隐私协议
const USER_PRIVACY = 'sys_userr_privacy'; const USER_PRIVACY = 'sys_userr_privacy';
//免费会员 //免费会员
const SYS_MEMBER = 'sys_member'; const SYS_MEMBER = 'sys_member';
//关于我们 //关于我们
const ABOUT_US = 'sys_about_us'; const ABOUT_US = 'sys_about_us';
//资质证照 //资质证照
const SYS_CERTIFICATE = 'sys_certificate'; const SYS_CERTIFICATE = 'sys_certificate';
//注销声明 //注销声明
const CANCELLATION_MSG = 'the_cancellation_msg'; const CANCELLATION_MSG = 'the_cancellation_msg';
//注销重要提示 //注销重要提示
const CANCELLATION_PROMPT = 'the_cancellation_prompt'; const CANCELLATION_PROMPT = 'the_cancellation_prompt';
//平台规则 //平台规则
const PLATFORM_RULE = 'platform_rule'; const PLATFORM_RULE = 'platform_rule';
//优惠券说明 //优惠券说明
const COUPON_AGREE = 'sys_coupon_agree'; const COUPON_AGREE = 'sys_coupon_agree';
//付费会员协议 //付费会员协议
const SYS_SVIP = 'sys_svip'; const SYS_SVIP = 'sys_svip';
//预存注意事项
const LOTTERY_RULE = 'the_lottery_rule';
public function getAgreeList($type) public function getAgreeList($type)
{ {
$data = [ $data = [
['label' => '用户协议', 'key' => self::USER_AGREE], ['label' => '用户协议', 'key' => self::USER_AGREE],
['label' => '隐私政策', 'key' => self::USER_PRIVACY], ['label' => '隐私政策', 'key' => self::USER_PRIVACY],
['label' => '平台规则', 'key' => self::PLATFORM_RULE], ['label' => '平台规则', 'key' => self::PLATFORM_RULE],
['label' => '注销重要提示', 'key' => self::CANCELLATION_PROMPT], ['label' => '注销重要提示', 'key' => self::CANCELLATION_PROMPT],
['label' => '商户入驻申请协议', 'key' => self::INTEGRAL_AGREE], ['label' => '预存注意事项', 'key' => self::LOTTERY_RULE],
]; ];
if (!$type) { if (!$type) {
$data[] = ['label' => '注销声明', 'key' => self::CANCELLATION_MSG]; // $data[] = ['label' => '注销声明', 'key' => self::CANCELLATION_MSG];
$data[] = ['label' => '关于我们', 'key' => self::ABOUT_US]; $data[] = ['label' => '关于我们', 'key' => self::ABOUT_US];
$data[] = ['label' => '资质证照', 'key' => self::SYS_CERTIFICATE]; $data[] = ['label' => '资质证照', 'key' => self::SYS_CERTIFICATE];
} }
return $data; return $data;
} }
public function getAgreeKey(){ public function getAgreeKey()
{
return [ return [
self::INTEGRAL_RULE, self::INTEGRAL_RULE,
self::INTEGRAL_AGREE, self::INTEGRAL_AGREE,
@ -104,6 +107,7 @@ class CacheRepository extends BaseRepository
self::PLATFORM_RULE, self::PLATFORM_RULE,
self::COUPON_AGREE, self::COUPON_AGREE,
self::SYS_SVIP, self::SYS_SVIP,
self::LOTTERY_RULE,
]; ];
} }
@ -215,8 +219,8 @@ HTML;
unset($re['省市编码']); unset($re['省市编码']);
if (!$re) throw new ValidateException('无数据'); if (!$re) throw new ValidateException('无数据');
$shen = []; $shen = [];
$shi = []; $shi = [];
$qu = []; $qu = [];
foreach ($re as $key => $value) { foreach ($re as $key => $value) {
$item = explode(',', $value); $item = explode(',', $value);
$cout = count($item); $cout = count($item);
@ -234,9 +238,9 @@ HTML;
'value' => $key, 'value' => $key,
'label' => $item[2], 'label' => $item[2],
]; ];
$item[1] = $item[2]; $item[1] = $item[2];
} }
$_v = [ $_v = [
'value' => $key, 'value' => $key,
'label' => $item[2] 'label' => $item[2]
]; ];
@ -244,7 +248,7 @@ HTML;
} }
//区 //区
if ($cout == 4) { if ($cout == 4) {
$_v = [ $_v = [
'value' => $key, 'value' => $key,
'label' => $item[3] 'label' => $item[3]
]; ];

Loading…
Cancel
Save