array( 'desc' => '发布', 'kw' => 'EVENT_DISPLAY_SHOW', ), self::EVENT_DISPLAY_HIDE => array( 'desc' => '停用', 'kw' => 'EVENT_DISPLAY_HIDE', ), self::EVENT_DISPLAY_UNFINISHED => array( 'desc' => '未设置完成', 'kw' => 'EVENT_DISPLAY_UNFINISHED', ), ); /** * 活动发布状态 * @return array */ public static function getDisplay() { return self::$display; } /** * LIST_DISPLAY_HIDE 列表中隐藏 * @var int */ const LIST_DISPLAY_HIDE = 0; /** * LIST_DISPLAY_SHOW 列表中显示 * @var int */ const LIST_DISPLAY_SHOW = 1; public static $listDisplay= array( self::LIST_DISPLAY_HIDE => array( 'desc' => '不出现', 'kw' => 'LIST_DISPLAY_HIDE', ), self::LIST_DISPLAY_SHOW => array( 'desc' => '出现', 'kw' => 'LIST_DISPLAY_SHOW', ) ); /** * 活动列表中显示状态 * @return array */ public static function getListDisplay() { return self::$listDisplay; } /** * FOCUS_DISPLAY_HIDE 不推荐到焦点图 * @var int */ const FOCUS_DISPLAY_HIDE = 1; /** * FOCUS_DISPLAY_SHOW 推荐到焦点图 * @var int */ const FOCUS_DISPLAY_SHOW = 2; public static $focusDisplay= array( self::FOCUS_DISPLAY_HIDE => array( 'desc' => '不推荐', 'kw' => 'FOCUS_DISPLAY_HIDE', ), self::FOCUS_DISPLAY_SHOW => array( 'desc' => '推荐', 'kw' => 'FOCUS_DISPLAY_SHOW', ) ); /** * 推荐到焦点图 * @return array */ public static function getFocusDisplay() { return self::$focusDisplay; } /** * TOP_DISPLAY_HIDE 是否置顶 * @var int */ const TOP_DISPLAY_HIDE = 1; /** * TOP_DISPLAY_SHOW 是否置顶 * @var int */ const TOP_DISPLAY_SHOW = 2; public static $topDisplay= array( self::TOP_DISPLAY_HIDE => array( 'desc' => '不置顶', 'kw' => 'TOP_DISPLAY_HIDE', ), self::TOP_DISPLAY_SHOW => array( 'desc' => '置顶', 'kw' => 'TOP_DISPLAY_SHOW', ) ); /** * 是否置顶 * @return array */ public static function getTopDisplay() { return self::$topDisplay; } /** * NOT_DEL 未删除 * @var int */ const NOT_DEL = 1; /** * IS_NOT_DEL 已删除 * @var int */ const IS_DEL = 2; public static $del= array( self::NOT_DEL => array( 'desc' => '未删除', 'kw' => 'NOT_DEL', ), self::IS_DEL => array( 'desc' => '已删除', 'kw' => 'IS_DEL', ) ); /** * 获取活动是否被管理员删除状态 * @return array */ public static function getDel() { return self::$del; } /** * EVENT_AUTHORIZE_TRUE 需要登录 * @var int */ const EVENT_AUTHORIZE_TRUE = 1; /** * EVENT_AUTHORIZE_FALSE 不需要登录 * @var int */ const EVENT_AUTHORIZE_FALSE = 0; public static $authorize= array( self::EVENT_AUTHORIZE_TRUE => array( 'desc' => '需要登录', 'kw' => 'EVENT_AUTHORIZE_TRUE', ), self::EVENT_AUTHORIZE_FALSE => array( 'desc' => '不需要登录', 'kw' => 'EVENT_AUTHORIZE_FALSE', ), ); /** * 是否需要登录 * @return array */ public static function getAuthorize() { return self::$authorize; } /** * MUSIC_POSITION_LEFT 左上角 * @var int */ const MUSIC_POSITION_LEFT = 0; /** * MUSIC_POSITION_RIGHT 右上角 * @var int */ const MUSIC_POSITION_RIGHT = 1; public static $musicPosition = array( self::MUSIC_POSITION_LEFT=> array( 'desc' => '左上角', 'kw' => 'MUSIC_POSITION_LEFT', ), self::MUSIC_POSITION_RIGHT=> array( 'desc' => '右上角', 'kw' => 'MUSIC_POSITION_RIGHT', ), ); /** * 音乐图标位置 * @return array */ public static function getMusicPosition() { return self::$musicPosition; } /** * TYPE_EVENTS_NULL 未设置 * @var int */ const TYPE_EVENTS_NULL = 0; /** * TYPE_EVENTS_TURNTABLE 转盘 * @var int */ const TYPE_EVENTS_TURNTABLE = 1; /** * TYPE_EVENTS_SCRATCH 刮刮卡 * @var int */ const TYPE_EVENTS_SCRATCH = 2; /** * TYPE_EVENTS_LETTERS 收集字母 * @var int */ const TYPE_EVENTS_LETTERS = 3; /** * TYPE_EVENTS_TRY 试用 * @var int */ const TYPE_EVENTS_TRY = 4; /** * TYPE_EVENTS_VOTE 投票 * @var int */ const TYPE_EVENTS_VOTE = 5; /** * TYPE_EVENTS_INVITATION 邀请函 * @var int */ const TYPE_EVENTS_INVITATION = 6; /** * TYPE_EVENTS_CODE 领券 * @var int */ const TYPE_EVENTS_CODE = 7; /** * TYPE_EVENTS_OTHER 其他 * @var int */ const TYPE_EVENTS_OTHER = 8; /** * TYPE_EVENTS_ARTICLE 文章 * @var int */ const TYPE_EVENTS_ARTICLE = 9; /** * TYPE_EVENTS_CUT_SCREEN 切屏专题 * @var int */ const TYPE_EVENTS_CUT_SCREEN = 10; /** * TYPE_EVENTS_SURVEY 问卷调查 * @var int */ const TYPE_EVENTS_SURVEY = 11; public static $type = array( // self::TYPE_EVENTS_NULL => array( // 'desc' => '未设置', // 'kw' => 'TYPE_EVENTS_NULL', // ), self::TYPE_EVENTS_TURNTABLE => array( 'desc' => '抽奖', 'kw' => 'TYPE_EVENTS_TURNTABLE', 'lottery' => true, 'restrictions' => true, 'pageRoutine' => true, 'c' => 'EventsTurntable', ), // self::TYPE_EVENTS_SCRATCH => array( // 'desc' => '刮刮卡', // 'kw' => 'TYPE_EVENTS_SCRATCH', // 'lottery' => true, // 'restrictions' => true, // 'pageRoutine' => true, // 'c' => 'EventsScratch', // ), // self::TYPE_EVENTS_LETTERS => array( // 'desc' => '收集字母', // 'kw' => 'TYPE_EVENTS_LETTERS', // 'lottery' => true, // 'restrictions' => true, // 'pageRoutine' => true, // 'c' => 'EventsLetters', // ), self::TYPE_EVENTS_TRY => array( 'desc' => '试用', 'kw' => 'TYPE_EVENTS_TRY', 'form' => true, 'restrictions' => true, 'pageRoutine' => true, 'c' => 'EventsTry', ), self::TYPE_EVENTS_VOTE => array( 'desc' => '投票', 'kw' => 'TYPE_EVENTS_VOTE', 'vote' => true, 'restrictions' => true, 'pageRoutine' => true, 'c' => 'EventsVote', ), self::TYPE_EVENTS_INVITATION => array( 'desc' => '邀请函', 'kw' => 'TYPE_EVENTS_INVITATION', 'form' => true, 'restrictions' => true, 'pageRoutine' => true, 'c' => 'EventsInvitation', ), self::TYPE_EVENTS_CODE => array( 'desc' => '优惠券', 'kw' => 'TYPE_EVENTS_CODE', 'form' => true, 'code' => true, 'restrictions' => true, 'pageRoutine' => true, 'c' => 'EventsCode', ), self::TYPE_EVENTS_ARTICLE => array( 'desc' => '文章', 'kw' => 'TYPE_EVENTS_ARTICLE', 'article' =>true, 'c' => 'EventsArticle', ), self::TYPE_EVENTS_CUT_SCREEN => array( 'desc' => '切屏专题', 'kw' => 'TYPE_EVENTS_CUT_SCREEN', 'cut_screen' => true, 'c' => 'EventsCutScreen', ), self::TYPE_EVENTS_OTHER => array( 'desc' => '链接', 'kw' => 'TYPE_EVENTS_OTHER', 'jumpUrl' => true, 'c' => 'EventsOther', ), self::TYPE_EVENTS_SURVEY => array( 'desc' => '问卷调查', 'kw' => 'TYPE_EVENTS_SURVEY', 'form' => true, 'restrictions' => true, 'pageRoutine' => true, 'c' => 'EventsSurvey', ), ); /** * 获取活动路由规则 */ static public function getEventRoute(){ return array( 'a' => 'EventsTurntable', 'b' => 'EventsScratch', 'c' => 'EventsTry', 'd' => 'EventsVote', 'e' => 'EventsInvitation', 'f' => 'EventsCode', 'g' => 'EventsArticle', 'h' => 'EventsCutScreen', 'y' => 'EventsOther', 'z' => 'EventsSurvey' ); } /** * 活动 大类型 配置 * * @retrun array */ public function getBigTypeConfig(){ return array( 'H5' => array( self::TYPE_EVENTS_ARTICLE, ), 'Event' => array( self::TYPE_EVENTS_TURNTABLE, // self::TYPE_EVENTS_SCRATCH, self::TYPE_EVENTS_TRY, self::TYPE_EVENTS_SURVEY, self::TYPE_EVENTS_VOTE, self::TYPE_EVENTS_INVITATION, self::TYPE_EVENTS_CODE ), 'Article' => array( self::TYPE_EVENTS_CUT_SCREEN, ) ); } public function getBigType($type) { $bigTypes = self::getBigTypeConfig(); if (!$bigTypes) { return false; } foreach ($bigTypes as $bigType => $tmpTypes) { if (!in_array($type, $tmpTypes)) { continue; } return $bigType; } return false; } /** * 获取活动类型 * @return array */ public static function getType() { return self::$type; } /** * [领券活动] 是否是二维码输出 [是] */ const TWO_DIMENSIONAL_CODE_TRUE = 1; /** * [领券活动] 是否是二维码输出 [否] */ const TWO_DIMENSIONAL_CODE_FALSE = 2; public static $twoDimensionalCodeType= array( self::TWO_DIMENSIONAL_CODE_TRUE => array( 'desc' => '是', 'kw' => 'TWO_DIMENSIONAL_CODE_TRUE', ), self::TWO_DIMENSIONAL_CODE_FALSE => array( 'desc' => '否', 'kw' => 'TWO_DIMENSIONAL_CODE_FALSE', ), ); /** * 获取 [领券活动] 是否是二维码输出 类型 * @return array */ public static function getTwoDimensionalCodeType() { return self::$twoDimensionalCodeType; } /** * EVENT_VOTE_TEXT [投票活动] 文字类型 * @var int */ const EVENT_VOTE_TEXT = 1; /** * EVENT_VOTE_IMG [投票活动]图文类型 * @var int */ const EVENT_VOTE_IMG = 2; public static $voteType= array( self::EVENT_VOTE_TEXT => array( 'desc' => '文字类型', 'kw' => 'EVENT_VOTE_TEXT', ), self::EVENT_VOTE_IMG => array( 'desc' => '图文类型', 'kw' => 'EVENT_VOTE_IMG', ), ); /** * 获取 [投票活动]类型 * @return array */ public static function getVoteType() { return self::$voteType; } /** * DELIVERY_FALSE [未发货] * @var int */ const DELIVERY_FALSE = 1; /** * DELIVERY_TRUE [已经发货] * @var int */ const DELIVERY_TRUE = 2; public static $deliveryType= array( self::DELIVERY_FALSE => array( 'desc' => '未发货', 'kw' => 'DELIVERY_FALSE', ), self::DELIVERY_TRUE => array( 'desc' => '已经发货', 'kw' => 'DELIVERY_TRUE', ), ); /** * 获取 发货状态 * @return array */ public static function getDeliveryType() { return self::$deliveryType; } /** * SHARE_BUTTON_FALSE [不显示分享按钮] * @var int */ const SHARE_BUTTON_FALSE = 1; /** * SHARE_BUTTON_TRUE [显示分享按钮] * @var int */ const SHARE_BUTTON_TRUE = 2; public static $shareButton= array( self::SHARE_BUTTON_FALSE => array( 'desc' => '不显示', 'kw' => 'SHARE_BUTTON_FALSE', ), self::SHARE_BUTTON_TRUE => array( 'desc' => '显示', 'kw' => 'SHARE_BUTTON_TRUE', ), ); /** * 获取 是否显示分享按钮 * @return array */ public static function getShareButton() { return self::$shareButton; } /** * TOP_DATA_FALSE [不显示顶部数据栏目] * @var int */ const TOP_DATA_FALSE = 1; /** * TOP_DATA_TRUE [显示顶部数据栏目] * @var int */ const TOP_DATA_TRUE = 2; public static $topData= array( self::TOP_DATA_FALSE => array( 'desc' => '不显示', 'kw' => 'TOP_DATA_FALSE', ), self::TOP_DATA_TRUE => array( 'desc' => '显示', 'kw' => 'TOP_DATA_TRUE', ), ); /** * 获取 是否显示分享按钮 * @return array */ public static function getTopData() { return self::$topData; } /** * BUY_BUTTON_FALSE [是否显示导购按钮] * @var int */ const BUY_BUTTON_FALSE = 1; /** * BUY_BUTTON_TRUE [是否显示导购按钮] * @var int */ const BUY_BUTTON_TRUE = 2; public static $buyButton= array( self::BUY_BUTTON_FALSE => array( 'desc' => '不显示', 'kw' => 'BUY_BUTTON_FALSE', ), self::BUY_BUTTON_TRUE => array( 'desc' => '显示', 'kw' => 'BUY_BUTTON_TRUE', ), ); /** * 获取 是否显示导购按钮 * @return array */ public static function getBuyButton() { return self::$buyButton; } }