|
|
<?php
|
|
|
namespace common\config;
|
|
|
use Yii;
|
|
|
|
|
|
/**
|
|
|
* 环境变量/常量
|
|
|
*/
|
|
|
class Environmen{
|
|
|
|
|
|
/**
|
|
|
* 应用环境量
|
|
|
*/
|
|
|
static function ENV(){
|
|
|
if (YII_ENV_PROD){
|
|
|
self::setProd();
|
|
|
}elseif (YII_ENV_DEV){
|
|
|
self::setDev();
|
|
|
}else{
|
|
|
self::setProd();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 生产环境
|
|
|
*/
|
|
|
private static function setProd(){
|
|
|
Yii::setAlias('@www', 'http://live.yoho.cn');
|
|
|
Yii::setAlias('@admin', 'http://admin.live.yoho.cn');
|
|
|
Yii::setAlias('@api', 'http://api.live.yoho.cn');
|
|
|
|
|
|
define('news_domain','http://newboys.yoho.cn/');
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 开发环境
|
|
|
*/
|
|
|
private static function setDev(){
|
|
|
Yii::setAlias('@www', 'http://test.live.yoho.cn');
|
|
|
Yii::setAlias('@admin', 'http://testadmin.live.yoho.cn');
|
|
|
Yii::setAlias('@api', 'http://testapi.live.yoho.cn');
|
|
|
|
|
|
define('news_domain','http://newboys.test.yoho.cn/');
|
|
|
}
|
|
|
}
|
|
|
Environmen::ENV();
|
|
|
|
|
|
class Params {
|
|
|
/**
|
|
|
* 业务线
|
...
|
...
|
@@ -20,6 +64,27 @@ class Params { |
|
|
* 直播已结束
|
|
|
*/
|
|
|
const LIVE_END = 2;
|
|
|
|
|
|
/**
|
|
|
* 是否精选
|
|
|
*/
|
|
|
const BEST_NO = 0;
|
|
|
const BEST_1 = 1;
|
|
|
const BEST_2 = 2;
|
|
|
|
|
|
/**
|
|
|
* 马甲状态
|
|
|
*/
|
|
|
const VEST_NO = 0;
|
|
|
const VEST_SLOW = 1;
|
|
|
const VEST_NORMAL = 2;
|
|
|
const VEST_FAST = 3;
|
|
|
|
|
|
/**
|
|
|
* 禁言状态
|
|
|
*/
|
|
|
const UN_FORBID = 0;
|
|
|
const IS_FORBID = 1;
|
|
|
}
|
|
|
|
|
|
return [
|
...
|
...
|
@@ -36,16 +101,16 @@ return [ |
|
|
],
|
|
|
//是否精选
|
|
|
'best'=>[
|
|
|
0=>'否',
|
|
|
1=>'精选1',
|
|
|
2=>'精选2',
|
|
|
Params::BEST_NO=>'否',
|
|
|
Params::BEST_1=>'精选1',
|
|
|
Params::BEST_2=>'精选2',
|
|
|
],
|
|
|
//马甲状态
|
|
|
'vest'=>[
|
|
|
0=>'关闭',
|
|
|
1=>'最慢',
|
|
|
2=>'一般',
|
|
|
3=>'最快'
|
|
|
Params::VEST_NO=>'关闭',
|
|
|
Params::VEST_SLOW=>'最慢',
|
|
|
Params::VEST_NORMAL=>'一般',
|
|
|
Params::VEST_FAST=>'最快'
|
|
|
],
|
|
|
//直播状态
|
|
|
'room_living'=>[
|
...
|
...
|
@@ -54,9 +119,9 @@ return [ |
|
|
Params::LIVE_END=>'已结束',
|
|
|
],
|
|
|
//未被禁言状态
|
|
|
'un_forbid_stat'=>0,
|
|
|
'un_forbid_stat'=>Params::UN_FORBID,
|
|
|
//被禁言状态
|
|
|
'is_forbid_stat'=>1,
|
|
|
'is_forbid_stat'=>Params::IS_FORBID,
|
|
|
],
|
|
|
/**
|
|
|
* 分页每页数目
|
...
|
...
|
@@ -76,5 +141,5 @@ return [ |
|
|
'failed_code'=>8001,
|
|
|
//异常状态
|
|
|
'exception_code'=>500,
|
|
|
'news_domain'=>'http://newboys.test.yoho.cn/',
|
|
|
'news_domain'=>news_domain,
|
|
|
]; |
...
|
...
|
|