<?php

class Option_Store {

    public static function res(){
        $prefix = 'ppo_options';
        CSF::createSection( $prefix, array(
            'title'  => '会员&支付',
            'id' => 'vip_subscribe',
            'icon'   => 'fa fa-rocket',
          ) );

        CSF::createSection( $prefix, array(
        'parent' => 'vip_subscribe', 
        'title'  => '钱包充值',
        'fields' => array(   
          
             array(
              'id'          => 'charge_cash_min',
              'type'  => 'number',
              'title' => '最低充值金额',
              'step'    => '1',
              'min'     => '1',
              'max'     => '999',
              'unit'        => '元',
              'default' => '1',
            ),

            array(
              'id'          => 'charge_cash_max',
              'type'  => 'number',
              'title' => '最高充值金额',
              'step'    => '1',
              'min'     => '2',
              'unit'        => '元',
              'max'     => '1000',
              'default' => '1000',
            ),

            array(
              'id'          => 'charge_cash_limit',
              'type'  => 'number',
              'title' => '每日限充次数',
              'step'    => '1',
              'min'     => '1',
              'unit'        => '次',
              'max'     => '100',
              'default' => '5',
            ),

            array(
              'type'  => 'subheading',
              'title' => get_option('cash_name','余额').'充值与折扣',
            ),


            // 设置折扣区间
            array(
              'id'        => 'cash_discount_range',
              'type'      => 'group',
              'title'     => '折扣区间',
              'subtitle'  => '设置不同充值金额区间的折扣,请仔细考虑折扣区间',
              'fields'    => array(

                array(
                  'id'    => 'charge_min',
                  'type'  => 'number',
                  'title' => '最低充值金额',
                  'step'    => '1',
                  'min'     => '1',
                  'unit'        => '元',
                ),

                array(
                  'id'    => 'charge_max',
                  'type'  => 'number',
                  'title' => '最高充值金额',
                  'step'    => '1',
                  'min'     => '1',
                  'unit'        => '元',
                ),

                array(
                  'id'    => 'discount',
                  'type'  => 'number',
                  'title' => '区间折扣',
                  'step'    => 0.01,
                  'min'     => 0.1,
                  'max'     => 1.00,
                  'unit'        => '折',
                  'desc'    => '支付折扣：0和1代表原价，0.85代表85折'
                ),

              ),
              'default'   => array(
                array(
                  'charge_min' => '1',
                  'charge_max' => '49.99',
                  'discount' => '0.98',
                ),
                array(
                  'charge_min' => '50',
                  'charge_max' => '99.99',
                  'discount' => '0.95',
                ),
                array(
                  'charge_min' => '100',
                  'charge_max' => '199.99',
                  'discount' => '0.90',
                ),
                array(
                  'charge_min' => '200',
                  'charge_max' => '499.99',
                  'discount' => '0.88',
                ),
                array(
                  'charge_min' => '500',
                  'charge_max' => '999.99',
                  'discount' => '0.85',
                ),
                array(
                  'charge_min' => '1000',
                  'charge_max' => '1999.99',
                  'discount' => '0.80',
                ),
                array(
                  'charge_min' => '2000',
                  'charge_max' => '10000',
                  'discount' => '0.75',
                ),

              )
            ),

            array(
              'id'          => 'charge_cash_set_s',
              'type'  => 'switcher',
              'title' => '开启自定义余额充值',
              'default' => false,
            ),
        
            array(
              'id'     => 'charge_cash_set',
              'type'   => 'repeater',
              'title'  => '自定义充值余额',
              'max'    => 9,
              'min'    => 0,
              'dependency' => array('charge_cash_set_s', '==', 'true'),
              'subtitle'  => '请注意：如果设置的金额大于前边设置的最大充值金额，将不显示在充值列表中',
              'fields' => array(

                array(
                  'id'    => 'charge_amount',
                  'type'  => 'number',
                  'title' => '充值金额',
                  'step'    => '1',
                  'min'     => '1',
                  'unit'        => '元',
                  'default' => '10',
                  'desc'    => '显示充值的金额'
                ),

                array(
                  'id'    => 'tag',
                  'type'  => 'text',
                  'title' => '标签',
                  'class' => 'mini-input',
                  'desc'    => '显示充值的标签，例如：推荐、特惠等'
                ),

              ),

               'default'   => array(
                array(
                  'charge_amount' => '10',
                  'tag' => '',
                ),
                array(
                  'charge_amount' => '50',
                  'tag' => '推荐',
                ),
                array(
                  'charge_amount' => '100',
                  'tag' => '特惠',
                ),
                array(
                  'charge_amount' => '200',
                  'tag' => '',
                ),
                array(
                  'charge_amount' => '500',
                  'tag' => '',
                ),
              )
            ),

            array(
                'id'      => 'charge_cash_notice',
                'type'    => 'wp_editor',
                'title'   => '余额充值提示',
                'default' => '',
                'quicktags'     => false,
                'media_buttons' => false,
                'desc'    => '一些关于充值的声明事项'
              ),

            array(
              'type'  => 'subheading',
              'title' => get_option('credit_name','积分').'充值与折扣',
            ),  

            array(
                  'id'    => 'credit_rate',
                  'type'  => 'number',
                  'title' => '积分充值比例',
                  'step'    => '1',
                  'min'     => '1',
                  'default' => '10',
                  'desc'    => '填10代表10元充值100积分，100元充值1000积分，以此类推'
                ),
            
            //充值送积分
            array(
              'id'          => 'credit_add_s',
              'type'  => 'switcher',
              'title' => '开启充值送积分',
              'default' => false,
            ),  

            // 满额赠送积分
            array(
              'id'        => 'credit_add_range',
              'type'      => 'group',
              'title'     => '满额赠送积分',
              'subtitle'  => '设置不同满额赠送积分区间,请仔细考虑积分赠送区间',
              'dependency' => array('credit_add_s', '==', 'true'),
              'fields'    => array(

                array(
                  'id'    => 'min',
                  'type'  => 'number',
                  'title' => '满额',
                  'step'    => '1',
                  'min'     => '1',
                  'unit'        => '元',
                ),

                array(
                  'id'    => 'bonus_percent',
                  'type'  => 'number',
                  'title' => '赠送积分百分比',
                  'step'    => 1,
                  'min'     => '0',
                  'max'     => '100',
                  'unit'        => '%',
                  'desc'    => '赠送百分比，假如兑换比例为10，充值10元获得100积分，赠送20%代表赠送20积分'
                ),

              ),

              'default'   => array(
                array(
                  'min' => '50',
                  'bonus_percent' => '10',
                ),
                array(
                  'min' => '100',
                  'bonus_percent' => '20',
                ),
                array(
                  'min' => '200',
                  'bonus_percent' => '25',
                ),
                array(
                  'min' => '500',
                  'bonus_percent' => '30',
                ),
                array(
                  'min' => '1000',
                  'bonus_percent' => '35',
                ),
                array(
                  'min' => '5000',
                  'bonus_percent' => '40',
                ),

              )
            ),

            //自定义充值积分
             array(
              'id'     => 'charge_credit_set',
              'type'   => 'repeater',
              'title'  => '自定义充值积分',
              'subtitle'  => '请注意：如果设置的金额大于前边设置的最大充值金额，将不显示在充值列表中',
              'max'    => 9,
              'min'    => 0,
              'dependency' => array('credit_add_s', '==', 'true'),
              'fields' => array(

                array(
                  'id'    => 'charge_amount',
                  'type'  => 'number',
                  'title' => '充值金额',
                  'step'    => '1',
                  'min'     => '1',
                  'unit'        => '元',
                  'default' => '10',
                  'desc'    => '显示充值的金额，尽量为整数'
                ),
                array(
                  'id'    => 'tag',
                  'type'  => 'text',
                  'title' => '标签',
                  'class' => 'mini-input',
                  'desc'    => '例如：特惠，推荐等'
                ),

              ),

               'default'   => array(
                array(
                  'charge_amount' => '10',
                  'tag' => '',
                ),
                array(
                  'charge_amount' => '50',
                  'tag' => '推荐',
                ),
                array(
                  'charge_amount' => '100',
                  'tag' => '特惠',
                ),
                array(
                  'charge_amount' => '200',
                  'tag' => '',
                ),
                array(
                  'charge_amount' => '500',
                  'tag' => '',
                ),
                array(
                  'charge_amount' => '1000',
                  'tag' => '',
                ),
              )
            ),

            array(
                'id'      => 'charge_credit_notice',
                'type'    => 'wp_editor',
                'title'   => '积分充值提示',
                'default' => '',
                'quicktags'     => false,
                'media_buttons' => false,
                'desc'    => '一些关于充值的声明事项'
              ),

            

        )
        ) );  
          
        CSF::createSection( $prefix, array(
        'parent' => 'vip_subscribe', 
        'title'  => '基础设置',
        'fields' => array(
        
            array(
                'id'      => 'cash_name',
                'type'    => 'text',
                'title'   => '货币名称',
                'class'   => 'mini-input',
                'default' => '余额',
                'desc'    => '货币别名，比如 M币'
              ),

            array(
                'id'      => 'cash_icon',
                'type'    => 'text',
                'title'   => '货币图标',
                'default' => '¥',
                'class'   => 'mini-input',
                'desc'    => '设置一个符号作为货币标识'
              ),  

            array(
                'id'      => 'credit_name',
                'type'    => 'text',
                'title'   => '积分名称',
                'class'   => 'mini-input',
                'default' => '积分',
                'desc'    => '积分别名，比如 点数'
              ),

            array(
                'id'      => 'credit_icon',
                'type'    => 'text',
                'title'   => '货币图标',
                'default' => '◎',
                'class'   => 'mini-input',
                'desc'    => '设置一个符号作为积分标识'
              ),    

        )
        ) );        

        CSF::createSection( $prefix, array(
            'parent' => 'vip_subscribe', 
            'title'  => '会员订阅(VIP)',
            'fields' => array(
              
              array(
                'id'            => 'vip_title',
                'type'          => 'wp_editor',
                'title'         => 'VIP页面标题与描述',
                'tinymce'       => true,
                'media_buttons' => false,
                'quicktags' => false,
                'height'        => '150px',
                'default'       => '<h2 style="text-align: center"><strong><span style="color: #0000ff">PIXPRO</span> 一个主题，多种形态</strong></h2><p style="text-align: center"><span style="color: #666699">选择适合您的订阅套餐，然后开启无与伦比的体验之旅</span></p>'
              ),

              array(
                'id'           => 'vip_page_bg',
                'type'         => 'upload',
                'title'        => 'VIP页面背景图',
                'library'      => 'image',
                'placeholder'  => 'http://',
                'button_title' => '添加背景',
                'remove_title' => '移除背景',
                'default'      => THEME_URL.'/img/vipbg.png',
                'preview'      => true,
              ),

              array(
                'id'          => 'vip_page_bg_color',
                'type'        => 'color',
                'title'       => 'VIP页面背景色',
                'output'      => '.vipbg',
                'default'     => '#f6f7ff',
                'output_mode' => 'background' // Supports css properties like ( border-color, color, background-color etc )
              ),

              array(
                'id'          => 'vip_page_width',
                'type'        => 'number',
                'title'       => 'VIP页面最大宽度',
                'unit'        => 'px',
                'output'      => '.vip-content',
                'output_mode' => 'max-width',
                'default'     => 1080,
              ),

              array(
                'id'    => 'ordinary_free_num',
                'type'  => 'text',
                'class' => 'mini-input',
                'title' => '普通用户每日可下载次数',
                'desc'  => '不可为0，大于或等于9999为无限次',
                'default'  => '20'
              ),

                array(
                    'id'        => 'vip_item',
                    'type'      => 'group',
                    'title'     => '订阅套餐',
                    'subtitle'  => '<div style="color:red"><strong>#</strong> 请勿随意删除或更改订阅套餐的顺序，主题预制了3个等级套餐，可在此基础上做修改，或增加更多自定义套餐</div>',
                    'class'     => 'no-drag',
                    'fields'    => array(
                      array(
                        'id'    => 'title',
                        'type'  => 'text',
                        'class' => 'mini-input',
                        'title' => '套餐对外显示名称',
                        'default'  => '基础会员'
                      ),
                      array(
                        'id'    => 'des',
                        'type'  => 'text',
                        'title' => '套餐简单描述',
                        'class' => 'mini',
                        'default'  => '适合个人用户使用'
                      ),
                      array(
                        'id'           => 'icon',
                        'type'         => 'upload',
                        'title'        => '会员套餐图标',
                        'library'      => 'image',
                        'placeholder'  => 'http://',
                        'button_title' => '添加图标',
                        'remove_title' => '移除图标',
                        'preview'      => 'true',
                        'class' => 'mini',
                      ),
                      array(
                        'id'           => 'bg',
                        'type'         => 'upload',
                        'title'        => '会员卡背景',
                        'library'      => 'image',
                        'placeholder'  => 'http://',
                        'button_title' => '添加背景',
                        'remove_title' => '移除背景',
                        'preview'      => 'true',
                        'class' => 'mini',
                      ),
                      array(
                        'id'      => 'hot',
                        'type'    => 'switcher',
                        'title'   => '推荐此套餐',
                        'label'   => '推荐此套餐为高亮',
                        'class' => 'mini',
                        'default' => false
                      ),
                      array(
                        'id'    => 'hot_text',
                        'type'  => 'text',
                        'class' => 'mini',
                        'title' => '推荐文案',
                        'default'  => '<i class="ri-fire-fill"></i>限时优惠',
                        'dependency' => array( 'hot', '==', 'true' ),
                        'desc'    => '推荐套餐的文案，比如限时优惠，优惠-25% 等'
                      ),

                      // 价格设置
                      array(
                        'id'    => 'price_n',
                        'type'  => 'text',
                        'class' => 'mini-input',
                        'title' => '基础月费',
                        'desc'  => '基础的月费价格，折扣会在此基础上进行计算，必填',
                        'default'  => '25'
                      ),
                      array(
                        'id'    => 'price_m',
                        'type'  => 'spinner',
                        'class' => 'mini',
                        'title' => '月费折扣',
                        'min'     => 1,
                        'max'     => 10,
                        'step'    => 0.1,
                        'unit'    => '折',
                        'desc'  => '月费折扣力度，10为原价',
                        'default'  => '10'
                      ),
                      array(
                        'id'    => 'price_q',
                        'type'  => 'spinner',
                        'class' => 'mini',
                        'title' => '季费折扣',
                        'min'     => 1,
                        'max'     => 10,
                        'step'    => 0.1,
                        'unit'    => '折',
                        'desc'  => '季费折扣力度，10为原价',
                        'default'  => '10'
                      ),
                      array(
                        'id'    => 'price_y',
                        'type'  => 'spinner',
                        'class' => 'mini',
                        'title' => '年费折扣',
                        'min'     => 1,
                        'max'     => 10,
                        'step'    => 0.1,
                        'unit'    => '折',
                        'desc'  => '年费折扣力度，10为原价',
                        'default'  => '10'
                      ),
                      //权益设置

                      array(
                        'type'    => 'submessage',
                        'style'   => 'normal',
                        'content' => '每日下载次数修改后，不会立即生效，需要次日才会生效',
                      ),

                      array(
                        'id'          => 'allow_hide',
                        'type'        => 'select',
                        'title'       => '是否允许查看所有付费隐藏内容',
                        'chosen'      => true,
                        'options'     => array(
                          'y'  => '允许',
                          'n'  => '不允许',
                        ),
                        'default'     => 'n',
                        'desc'  => '是否允许查看所有付费隐藏内容，特殊资源除外'
                      ),

                      array(
                        'id'          => 'allow_down',
                        'type'        => 'select',
                        'title'       => '是否允许下载所有付费资源',
                        'chosen'      => true,
                        'options'     => array(
                          'y'  => '允许',
                          'n'  => '不允许',
                        ),
                        'default'     => 'y',
                        'desc'  => '是否允许下载所有付费资源，特殊资源除外',
                      ),

                      array(
                        'id'    => 'down_num',
                        'type'  => 'text',
                        'class' => 'mini-input mini',
                        'title' => '每日可下载次数',
                        'desc'  => '限制用户每日下载次数，可以防止恶意采集下载，设置大于或等于9999则判定为无限次',
                        'dependency' => array( 'allow_down', '==', 'y' ),
                        'default'  => '10'
                      ),

                      array(
                        'id'          => 'allow_video',
                        'type'        => 'select',
                        'title'       => '是否允许查看所有付费视频内容',
                        'chosen'      => true,
                        'options'     => array(
                          'y'  => '允许',
                          'n'  => '不允许',
                        ),
                        'default'     => 'n',
                        'desc'  => '是否允许查看所有付费视频内容，特殊资源除外'
                      ),

                      array(
                        'id'         => 'limits',
                        'type'       => 'checkbox',
                        'title'      => '套餐权限',
                        'options'    => array(
                          'msg' => '发送私信',
                          'comment' => '发布评论',
                          'post' => '发布文章',
                          'moment' => '发布片刻',
                          'cr_moment' => '创建圈子',
                        ),
                        'default'    => array( 'comment', 'msg','post','moment' ),
                        'inline'     => true,
                        'check_all' => true,
                        'check_all_text' => '全选/取消全选'
                      ),

                      array(
                        'id'    => 'limits_info',
                        'type'  => 'textarea',
                        'title' => '套餐自定义权限',
                        'desc'  => '可以额外增加套餐权限，一行一个，例如<br>一年售后服务|1<br>加入专属售后群|0<br>其中1代表有权限，反之亦然',
                      ),

                    ),

                    //默认套餐
                    'default' => array(
                      array(
                        'title'   => '基础会员',
                        'des' => '适合个人使用',
                        'icon' => THEME_URL.'/img/vip/normal.png',
                        'bg' => 'Editor content 1',
                        'hot' => false,
                        'price_n' => '25',
                        'price_m' => '8.5',
                        'price_q' => '8.5',
                        'price_y' => '8',
                        'allow_hide' => 'n',
                        'allow_down'  => 'y',
                        'hide_num' => '10',
                        'down_num' => '10',
                        'allow_video' => 'n',
                        'video_num' => '10',
                        'free_num'  => '20',
                        'limits' => array( 'comment', 'msg','moment' ),
                        'limits_info' => '',
                      ),

                      array(
                        'title'   => '高级会员',
                        'des' => '适合小团队使用',
                        'icon' => THEME_URL.'/img/vip/high.png',
                        'bg' => 'Editor content 1',
                        'hot' => true,
                        'price_n' => '35',
                        'price_m' => '8',
                        'price_q' => '8',
                        'price_y' => '7.5',
                        'allow_hide' => 'y',
                        'allow_down'  => 'y',
                        'hide_num' => '20',
                        'down_num' => '20',
                        'allow_video' => 'y',
                        'video_num' => '20',
                        'free_num'  => '50',
                        'limits' => array( 'comment', 'msg','moment' ),
                        'limits_info' => '',
                      ),

                      array(
                        'title'   => '专业会员',
                        'des' => '适合企业使用',
                        'icon' => THEME_URL.'/img/vip/pro.png',
                        'bg' => 'Editor content 1',
                        'hot' => false,
                        'price_n' => '80',
                        'price_m' => '7.5',
                        'price_q' => '7.5',
                        'price_y' => '7',
                        'allow_hide' => 'y',
                        'allow_down'  => 'y',
                        'hide_num' => '100',
                        'down_num' => '100',
                        'allow_video' => 'y',
                        'video_num' => '100',
                        'free_num'  => '100',
                        'limits' => array( 'comment', 'msg','moment','post' ),
                        'limits_info' => '',
                      ),
                     
                    )

                  ),

                  //VIP Q&A
                  array(
                    'id'            => 'qa_title',
                    'type'          => 'wp_editor',
                    'title'         => 'Q&A左侧内容',
                    'tinymce'       => true,
                    'media_buttons' => true,
                    'quicktags' => false,
                    'height'        => '150px',
                    'default'       => ''
                  ),

                  array(
                    'id'      => 'qa_icon',
                    'type'    => 'icon',
                    'title'   => 'Q&A标题图标',
                    'default' => 'ri-question-answer-line'
                  ),

                  array(
                    'id'        => 'vip_qa',
                    'type'      => 'group',
                    'title'     => 'Q&A列表',
                    'desc'      => '设置一些Q&A，来向用户解释关于VIP方面的问题',
                    'fields'    => array(
                      array(
                        'id'    => 'title',
                        'type'  => 'text',
                        'title' => '标题',
                      ),
                      array(
                        'id'    => 'content',
                        'type'  => 'textarea',
                        'title' => '内容',
                      ),
                    ),

                      'default'   => array(
                        array(
                          'title'   => '我可以开发票么',
                          'content' => '你想啥呢',
                        ),
                        array(
                          'title'   => '开通VIP有啥好处',
                          'content' => '可以当韭菜',
                        ),
                        array(
                          'title'   => '开通之后可以退款么',
                          'content' => '想啥呢',
                        ),
                      ),
                  ),

                  array(
                    'id'       => 'vip_diy',
                    'type'     => 'code_editor',
                    'title'    => '自定义html',
                    'settings' => array(
                      'theme'  => 'mbo',
                      'mode'   => 'htmlmixed',
                    ),
                    'desc'      => '支持html | js | css',
                    'default'  => '',
                  ),
    
            )
            ) );  

            // 支付设置
            CSF::createSection( $prefix, array(
              'parent' => 'vip_subscribe', 
              'title'  => '支付接口',
              'fields' => array(
              
                array(
                  'id'          => 'alipay_type',
                  'type'        => 'select',
                  'title'       => '支付宝接口',
                  'options'     => array(
                    '0'  => '关闭',
                    'alipay_normal'  => '支付宝官方(推荐)',
                    'alipay_hupijiao'  => '虎皮椒V3',
                    'yipay'  => '易支付',
                  ),
                  'default'     => '0'
                ),

                array(
                  'id'          => 'wepay_type',
                  'type'        => 'select',
                  'title'       => '微信支付接口',
                  'options'     => array(
                    '0'  => '关闭',
                    'wepay_normal'  => '微信官方(推荐)',
                    'wepay_hupijiao'  => '虎皮椒V3',
                    'yipay'  => '易支付',
                  ),
                  'default'     => '0',
                  'class' => 'mini',
                ),

                array(
                  'id'            => 'pay_config',
                  'type'          => 'accordion',
                  'title'         => '支付接口配置',
                  'accordions'    => array(
                    array(
                      'title'     => '支付宝官方',
                      'fields'    => array(
                        array(
                          'id'         => 'alipay_normal_type',
                          'type'       => 'radio',
                          'title'      => '支付宝官方模式',
                          'inline'  => true,
                          'options'    => array(
                            'alipay_normal'   => '常规方式',
                            'alipay_ftf'   => '当面付',			
                          ),
                          'default'    => 'alipay_normal',
                        ),
                        array(
                          'id'    => 'alipay_appid',
                          'type'  => 'text',
                          'title' => 'APPID',
                        ),
                        array(
                          'id'    => 'alipay_private_key',
                          'type'  => 'textarea',
                          'title' => '应用私钥',
                        ),
                        array(
                          'id'    => 'alipay_public_key',
                          'type'  => 'textarea',
                          'title' => '支付宝公钥',
                        ),
                      )
                    ),
                    array(
                      'title'     => '微信官方',
                      'fields'    => array(
                        array(
                          'id'    => 'wepay_appid',
                          'type'  => 'text',
                          'title' => 'APPID',
                        ),
                        array(
                          'id'    => 'wepay_mch_id',
                          'type'  => 'text',
                          'title' => '微信支付商户号',
                        ),
                        array(
                          'id'    => 'wepay_secret',
                          'type'  => 'text',
                          'title' => '商户支付密钥',
                        ),
                      )
                    ),
                    //虎皮椒微信
                    array(
                      'title'     => '虎皮椒V3',
                      'fields'    => array(

                          array(
                            'type'    => 'submessage',
                            'style'   => 'info',
                            'content' => '微信配置',
                          ),


                          array(
                            'id'    => 'wepay_hupijiao_appid',
                            'type'  => 'text',
                            'title' => 'Appid',
                            ),
                
                          array(
                            'id'    => 'wepay_hupijiao_appsecret',
                            'type'  => 'text',
                            'title' => 'Appsecret',
                            'class' => 'mini',
                            ),

                          array(
                            'type'    => 'submessage',
                            'style'   => 'info',
                            'content' => '支付宝配置',
                          ),

                          array(
                            'id'    => 'alipay_hupijiao_appid',
                            'type'  => 'text',
                            'title' => 'Appid',
                            ),
                
                          array(
                            'id'    => 'alipay_hupijiao_appsecret',
                            'type'  => 'text',
                            'title' => 'Appsecret',
                            'class' => 'mini',
                            ),
                            
                          array(
                            'id'    => 'hupijiao_gateway',
                            'type'  => 'text',
                            'title' => '支付网关',
                            'default' => 'https://api.xunhupay.com/payment/do.html',
                          ),
                        )
                      ),
                      // 易支付
                      array(
                        'title'     => '易支付',
                        'fields'    => array(
                          array(
                            'id'    => 'yipay_appid',
                            'type'  => 'text',
                            'title' => '商户ID',
                          ),
                          array(
                            'id'    => 'yipay_secret',
                            'type'  => 'text',
                            'title' => '商户密匙',
                          ),
                          array(
                            'id'    => 'yipay_url',
                            'type'  => 'text',
                            'title' => '接口地址',
                          ),
                        )
                      ),
                  )
                ),

                array(
                  'id'      => 'vip_protocol',
                  'type'    => 'textarea',
                  'title'   => '会员支付协议',
                  'desc'    => '选填，显示在会员支付按钮下方，一行一个，如：<br>会员协议|http://xxx.com<br>付款授权协议|http://xxxx.com'
                ),

                array(
                  'id'      => 'pay_protocol',
                  'type'    => 'textarea',
                  'title'   => '其他支付协议',
                  'desc'    => '选填，显示在支付下载按钮或充值按钮下方，一行一个，如：<br>支付下载协议|http://xxx.com<br>付款授权协议|http://xxxx.com',
                  'class' => 'mini',
                ),
      
              )
              ) ); 

    }
}