Ejemplo n.º 1
0
 public function actionIndex()
 {
     $uid = Yii::$app->user->id;
     $isAuthentic = member::isAuthentic(yii::$app->user->id);
     if ($isAuthentic['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有实名制认证')</script>";
         echo "<script>window.location.href='" . \yii\helpers\Url::to(['site/step2']) . "'</script>";
         exit;
     }
     //判断用户是否绑定银行卡
     $is_bind = sinapay::isBinding($uid);
     $model = UcenterMember::find()->where(['id' => $uid])->one();
     if ($is_bind['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有绑定银行卡');</script>";
         echo "<script>location.href='" . \yii\helpers\Url::to(['site/bindcard']) . "'</script>";
         exit;
     }
     $uid = Yii::$app->user->id;
     $info = Info::find()->where(['member_id' => $uid])->one();
     $limitConfig = sinapay::getsiteConfig();
     if ($limitConfig) {
         $withdraw_max = $limitConfig->withdraw_max;
         $withdraw_min = $limitConfig->withdraw_min;
         $withdraw_times = $limitConfig->withdraw_num;
     }
     return $this->view('index', compact('info', 'withdraw_max', 'withdraw_min', 'withdraw_times'));
 }
Ejemplo n.º 2
0
 /**
  * 判定用户手机号是否存在
  * @return bool
  */
 public function actionSmsphone()
 {
     $phone = $_POST['CellPhone'];
     $res = UcenterMember::findOne(['phone' => $phone]);
     if ($res) {
         return false;
         exit;
     } else {
         return true;
         exit;
     }
 }
Ejemplo n.º 3
0
 /**
  * Signs user up.
  *
  * @return User|null the saved model or null if saving fails
  */
 public function signup()
 {
     if ($this->validate()) {
         $user = new UcenterMember();
         $user->username = $this->username;
         $user->phone = $this->username;
         $user->setPassword($this->password);
         $user->create_ip = Yii::$app->request->userIp;
         $app_pwd = md5(sha1($this->password) . time());
         $user->app_pwd = $app_pwd;
         try {
             $area = self::get_area(Yii::$app->request->userIp);
             $user->create_area = $area;
         } catch (ErrorException $e) {
         }
         $user->generateAuthKey();
         if ($user->save()) {
             return $user;
         }
     }
     return null;
 }
Ejemplo n.º 4
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = product::find()->orderBy('id DESC');
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 10]]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $ucmember = new UcenterMember();
     $user = new User();
     $ocreditor = $ucmember->find()->andWhere(['username' => $this->ocreditor])->one();
     $oid = $ocreditor ? $ocreditor->id : '';
     $maxcreditor = $ucmember->find()->andWhere(['username' => $this->maxcreditor])->one();
     $mid = $maxcreditor ? $maxcreditor->id : '';
     $user = $user->find()->andWhere(['username' => $this->create_user_id])->one();
     $uid = $user ? $user->id : '';
     $query->andFilterWhere(['id' => $this->id, 'amount' => $this->amount, 'start_at' => $this->start_at, 'end_at' => $this->end_at, 'rate' => $this->rate, 'invest_people' => $this->invest_people, 'invest_sum' => $this->invest_sum, 'create_at' => $this->create_at, 'update_at' => $this->update_at, 'status' => $this->status, 'type' => $this->type, 'create_user_id' => $uid, 'check_user_id' => $this->check_user_id, 'ocreditor' => $oid, 'maxcreditor' => $mid]);
     $query->andFilterWhere(['like', 'title', $this->title])->andFilterWhere(['like', 'intro', $this->intro])->andFilterWhere(['like', 'each_max', $this->each_max])->andFilterWhere(['like', 'each_min', $this->each_min]);
     return $dataProvider;
 }
Ejemplo n.º 5
0
 public function actionIndex()
 {
     $uid = Yii::$app->user->id;
     Utils::ensureOpenId();
     $openId = Yii::$app->request->get('open_id');
     if (($usermodel = UcenterMember::findOne(['openid' => $openId])) !== null) {
         Yii::$app->user->login($usermodel);
     } elseif (empty(Yii::$app->user->id)) {
         return $this->redirect(['site/signin']);
     }
     $isAuthentic = member::isAuthentic(yii::$app->user->id);
     if ($isAuthentic['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有实名制认证')</script>";
         echo "<script>window.location.href='" . \yii\helpers\Url::to(['site/step2']) . "'</script>";
         exit;
     }
     //判断用户是否绑定银行卡
     $is_bind = sinapay::isBinding($uid);
     $model = UcenterMember::find()->where(['id' => $uid])->one();
     if ($is_bind['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有绑定银行卡');</script>";
         echo "<script>location.href='" . \yii\helpers\Url::to(['site/bindcard']) . "'</script>";
         exit;
     }
     //全部记录
     $logs = AloneMethod::total_log($uid, 1, 15);
     $logs_pages = Log::find()->select(['step', 'remark', 'status', 'create_at'])->where(['member_id' => $uid])->andWhere(['>', 'status', '0'])->andWhere(['<>', 'step', '0.00'])->asArray()->all();
     $logs_pages = ceil(count($logs_pages) / 15);
     //$logs = Log::find()->select(['step','create_at','status'])->where(['member_id'=>$uid])->andWhere(['in','status',[1,2,3,4]])->orderBy('id desc')->asArray()->all();
     //充值
     $recharge = AloneMethod::recharge_log($uid, 1, 15);
     $recharge_pages = Log::find()->select(['step', 'remark', 'status', 'create_at'])->where(['member_id' => $uid, 'status' => Log::STATUS_RECHAR_SUC])->asArray()->all();
     $recharge_pages = ceil(count($recharge_pages) / 15);
     //投资
     $invest = AloneMethod::invest_log($uid, 1, 15);
     $invest_pages = Log::find()->select(['step', 'remark', 'status', 'create_at'])->where(['member_id' => $uid, 'status' => Log::STATUS_INVEST_SUC])->asArray()->all();
     $invest_pages = ceil(count($invest_pages) / 15);
     //赎回
     $ransom = AloneMethod::redeem_log($uid, 1, 15);
     $ransom_pages = Log::find()->select(['step', 'remark', 'status', 'create_at'])->where(['member_id' => $uid, 'status' => Log::STATUS_REDEM_SUC])->asArray()->all();
     $ransom_pages = ceil(count($recharge_pages) / 15);
     //提现
     $withdraw = AloneMethod::withdrawals_log($uid, 1, 15);
     $withdraw_pages = Log::find()->select(['step', 'remark', 'status', 'create_at'])->where(['member_id' => $uid, 'status' => Log::STATUS_WITHDRAW_SUC])->asArray()->all();
     $withdraw_pages = ceil(count($recharge_pages) / 15);
     return $this->view('index', compact('invest', 'recharge', 'withdraw', 'ransom', 'logs', 'logs_pages', 'recharge_pages', 'invest_pages', 'ransom_pages', 'withdraw_pages'));
 }
Ejemplo n.º 6
0
 public function actionLogout()
 {
     Utils::ensureOpenId();
     $request = Yii::$app->request;
     if ($request->isPost) {
         if (($model = UcenterMember::findOne(['openid' => $request->post('open_id')])) !== null) {
             /** @var MemberOther $model */
             $model->openid = '';
             $model->save();
         }
         Yii::$app->user->logout();
         return $this->goBack(['info' => "解绑成功"], Url::to(['site/signin']));
     }
     return $this->view('logout');
 }
Ejemplo n.º 7
0
 public static function Ucenter()
 {
     $model = UcenterMember::find()->where(['id' => Yii::$app->user->id])->one();
     //个人账户
     $model_asset = Info::find()->where(['member_id' => Yii::$app->user->id])->one();
     $session = yii::$app->session;
     $session->open();
     if (isset($session['last_time'])) {
         $updated_at = $session['last_time'];
     } else {
         $updated_at = $model->updated_at;
     }
     $balance = $model_asset->balance;
     $username = yii::$app->user->identity->username;
     return compact('updated_at', 'balance', 'username');
 }
Ejemplo n.º 8
0
 public function actionGindex()
 {
     Utils::ensureOpenId();
     $openId = Yii::$app->request->get('open_id');
     if (($usermodel = UcenterMember::findOne(['openid' => $openId])) !== null) {
         Yii::$app->user->login($usermodel);
     } elseif (empty(Yii::$app->user->id)) {
         return $this->redirect(['site/signin']);
     }
     $uid = yii::$app->user->id;
     $gold = Gold::find()->select('uid,sum(money) as smoney')->where(['uid' => $uid])->asArray()->one();
     $allgold = Gold::find()->select('uid,rid,sum(money) as smoney')->where(['uid' => $uid])->asArray()->groupBy('rid')->all();
     $invitation_code = UcenterMember::findIdentity($uid)->invitation_code;
     $goldincome = Income::find()->select('member_id,sum(goldincome) as sincome')->where(['member_id' => $uid])->asArray()->one();
     $jssdk = new Jssdk('wx32814d588c44c17c', '23b0f218574551f18db1dc991dbee87f');
     $signpack = $jssdk->getSignPackage();
     return $this->view('gindex', compact('gold', 'allgold', 'goldincome', 'invitation_code', 'signpack'));
 }
Ejemplo n.º 9
0
 public function actionIndex()
 {
     $uid = Yii::$app->user->id;
     $isAuthentic = member::isAuthentic(yii::$app->user->id);
     if ($isAuthentic['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有实名制认证')</script>";
         echo "<script>window.location.href='" . \yii\helpers\Url::to(['site/step2']) . "'</script>";
         exit;
     }
     //判断用户是否绑定银行卡
     $is_bind = sinapay::isBinding($uid);
     $model = UcenterMember::find()->where(['id' => $uid])->one();
     if ($is_bind['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有绑定银行卡');</script>";
         echo "<script>location.href='" . \yii\helpers\Url::to(['site/bindcard']) . "'</script>";
         exit;
     }
     $limitConfig = sinapay::getsiteConfig();
     if ($limitConfig) {
         $ransom_max = $limitConfig->ransom_max;
         $ransom_min = $limitConfig->ransom_min;
         $ransom_times = $limitConfig->ransom_num;
     }
     $collect = AloneMethod::user_collect($uid)[data];
     //在投金额和在投收益
     $red_packet = member::get_user_red_packet($uid)[data];
     //个人账户
     $model_asset = Info::find()->where('member_id=' . Yii::$app->user->id)->one();
     //投资总额
     $invest_total = 0;
     $model_order = Order::find()->where('member_id=' . Yii::$app->user->id . " AND status=1")->all();
     if (count($model_order) > 0) {
         foreach ($model_order as $K => $V) {
             $invest_total += $V->money;
         }
     }
     $invest_total += $model_asset->profit;
     return $this->view('index', compact('invest_total', 'ransom_max', 'ransom_min', 'ransom_times', 'collect', 'red_packet'));
 }
Ejemplo n.º 10
0
 public function actionIndex()
 {
     if (Yii::$app->user->isGuest) {
         return $this->redirect(array('/site/signin'));
     }
     $uid = Yii::$app->user->id;
     $isAuthentic = member::isAuthentic(yii::$app->user->id);
     if ($isAuthentic['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有实名制认证')</script>";
         echo "<script>window.location.href='" . \yii\helpers\Url::to(['site/step2']) . "'</script>";
         exit;
     }
     //判断用户是否绑定银行卡
     $is_bind = sinapay::isBinding($uid);
     $model = UcenterMember::find()->where(['id' => $uid])->one();
     if ($is_bind['errorNum'] != 0) {
         header("Content-type: text/html; charset=utf-8");
         echo "<script>alert('您还没有绑定银行卡');</script>";
         echo "<script>location.href='" . \yii\helpers\Url::to(['site/bindcard']) . "'</script>";
         exit;
     }
     if ($_GET) {
         $uid = Yii::$app->user->id;
         $info = Info::find()->where(['member_id' => $uid])->one();
         $product = Product::find(['id' => $_GET['id']])->one();
         //项目可投金额
         $kmoney = \frontend\actions\App\Invest::kmoney($_GET['id'])[data];
         $limitConfig = sinapay::getsiteConfig();
         if ($limitConfig) {
             $invest_max = $limitConfig->invest_max;
             $invest_min = $limitConfig->invest_min;
             $invest_times = $limitConfig->invest_num;
         }
         return $this->view('index', compact('info', 'product', 'invest_max', 'invest_min', 'invest_num', 'kmoney'));
     }
 }
Ejemplo n.º 11
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = UcenterMember::find()->orderBy('id DESC');
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 10]]);
     $this->load($params);
     if (\App::$app->request->post()) {
         $time = \App::$app->request->post()['time'];
         if ($time) {
             $arr = explode('至', \App::$app->request->post()['time']);
             //var_dump($arr);
             //            var_dump(strtotime($arr[0].' 00:00:00'));
             //            var_dump(strtotime($arr[1].' 23:59:59'));
             $query->andWhere(['between', 'created_at', strtotime($arr[0] . ' 00:00:00'), strtotime($arr[1] . ' 23:59:59')]);
         }
     }
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'status' => $this->status, 'lock' => $this->lock, 'type' => $this->type, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, 'create_channel' => $this->create_channel, 'error_num' => $this->error_num, 'parent_member_id' => $this->parent_member_id, 'vip' => $this->vip]);
     $query->andFilterWhere(['like', 'username', $this->username])->andFilterWhere(['like', 'auth_key', $this->auth_key])->andFilterWhere(['like', 'password_hash', $this->password_hash])->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])->andFilterWhere(['like', 'phone', $this->phone])->andFilterWhere(['like', 'email', $this->email])->andFilterWhere(['like', 'idcard', $this->idcard])->andFilterWhere(['like', 'real_name', $this->real_name])->andFilterWhere(['like', 'create_ip', $this->create_ip])->andFilterWhere(['like', 'create_area', $this->create_area])->andFilterWhere(['like', 'login_ip', $this->login_ip])->andFilterWhere(['like', 'login_area', $this->login_area]);
     return $dataProvider;
 }
Ejemplo n.º 12
0
 /**
  *Auther:langxi
  *
  *检测用户状态 银行卡手机号 真实姓名身份证号  及是否被锁定
  * @param $member_id
  * @return bool
  * @throws ErrorException
  */
 private static function checkMember($member_id)
 {
     if (!$member_id || !is_numeric($member_id) || !is_int($member_id)) {
         $result = array('errorNum' => '1', 'errorMsg' => '参数错误', 'data' => null);
         return $result;
     }
     $card = Info::find()->where(['member_id' => $member_id])->asArray()->one();
     if (!$card) {
         $result = array('errorNum' => '1', 'errorMsg' => '此账户不存在1', 'data' => null);
         return $result;
     } else {
         if (empty($card['bank_card']) || empty($card['bank_card_phone'])) {
             $result = array('errorNum' => '1', 'errorMsg' => '未绑定银行卡及银行卡关联手机号', 'data' => null);
             return $result;
         }
     }
     $member = UcenterMember::find()->where(['id' => $member_id])->asArray()->one();
     $real_name = $member['real_name'];
     $idcard = $member['idcard'];
     if (empty($real_name) || empty($idcard)) {
         $result = array('errorNum' => '1', 'errorMsg' => '未进行实名认证', 'data' => null);
         return $result;
     }
     $status = $member['lock'];
     if ($status != UcenterMember::TYPE_UNLOCK) {
         $result = array('errorNum' => '1', 'errorMsg' => '用户被锁定', 'data' => null);
         return $result;
     }
     return false;
 }
Ejemplo n.º 13
0


    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'username', 'phone', 'email:email', 'idcard', 'real_name', ['attribute' => 'status', 'format' => 'html', 'value' => function ($model) {
    if ($model->status === $model::STATUS_ACTIVE) {
        $class = 'label-success';
    } elseif ($model->status === $model::STATUS_REAL) {
        $class = 'label-success';
    } elseif ($model->status === $model::STATUS_BIND) {
        $class = 'label-success';
    } else {
        $class = 'label-danger';
    }
    return '<span class="label ' . $class . '">' . $model->statusLabel . '</span>';
}, 'filter' => Html::activeDropDownList($searchModel, 'status', common\models\UcenterMember::getArrayStatus(), ['class' => 'form-control', 'prompt' => Yii::t('app', 'Please Filter')])], ['attribute' => 'lock', 'format' => 'html', 'value' => function ($model) {
    if ($model->lock === $model::TYPE_UNLOCK) {
        $class = 'label-success';
    } elseif ($model->lock === $model::TYPE_LOCK) {
        $class = 'label-warning';
    } else {
        $class = 'label-danger';
    }
    return '<span class="label ' . $class . '">' . $model->typeLabel . '</span>';
}, 'filter' => Html::activeDropDownList($searchModel, 'lock', common\models\UcenterMember::getTypeStatus(), ['class' => 'form-control', 'prompt' => Yii::t('app', 'Please Filter')])], ['attribute' => 'created_at', 'format' => ['date', 'php:Y-m-d H:i:s']], ['class' => 'yii\\grid\\ActionColumn', 'header' => '操作', 'buttons' => ['delete' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, ['title' => '删除', 'data' => ['confirm' => '你确定要删除吗?', 'method' => 'post']]);
}]]]]);
?>

</div>
Ejemplo n.º 14
0
 public function getUser()
 {
     return $this->hasOne(UcenterMember::className(), ['id' => 'uid']);
 }
Ejemplo n.º 15
0
 public function actionLogout()
 {
     Utils::ensureOpenId();
     $openId = Yii::$app->request->get('open_id');
     if ($openId) {
         $model = UcenterMember::findOne(['openid' => $openId]);
         if ($model) {
             $model->openid = '';
             $model->save();
         }
     }
     Yii::$app->user->logout();
     return $this->redirect(['site/main']);
 }
Ejemplo n.º 16
0
 public function getTypemaxUser()
 {
     return $this->hasOne(UcenterMember::className(), ['id' => 'maxcreditor']);
 }
Ejemplo n.º 17
0
 private static function datas()
 {
     $uid = yii::$app->user->id;
     $model = UcenterMember::find()->where(['id' => Yii::$app->user->id])->one();
     //个人账户
     $model_asset = Info::find()->where(['member_id' => Yii::$app->user->id])->one();
     if (!isset($model_asset)) {
         //跳转至绑定银行卡
         echo "<script>alert('您还没有绑定银行卡');</script>";
         echo "<script>location.href='" . \yii\helpers\Url::to(['money/bindcard']) . "'</script>";
         exit;
     }
     //收益总额
     $income_total = $model_asset->total_revenue;
     //当前收益
     $income_current = $model_asset->profit;
     //昨日收益
     try {
         $income_yesterday = Income::find()->where(['member_id' => yii::$app->user->id, 'created_at' => strtotime(date('Y-m-d', time()))])->one()->smoney;
     } catch (ErrorException $e) {
         $income_yesterday = 0;
     }
     //  		 体验金
     $experience_money = 0;
     $money = Gold::find()->where(['<', 'created_at', time()])->andWhere(['>', 'end_at', time()])->andWhere(['uid' => $uid, 'status' => Gold::STATUS_ACTIVE])->sum('money');
     if ($money) {
         $experience_money = sprintf("%.2f", $money);
     }
     //投资总额
     $invest_total = 0;
     $model_order = Order::find()->where(['member_id' => Yii::$app->user->id, 'status' => 1])->all();
     if (count($model_order) > 0) {
         foreach ($model_order as $K => $V) {
             $invest_total += $V->money;
         }
     }
     //用户投资记录
     $query1 = (new Query())->select("A.step,A.create_at,B.title")->from("asset_log AS A")->where('A.member_id=' . Yii::$app->user->id . " AND A.action='Invest/invest' AND A.status=2 ")->join("left join", "fund_product AS B", "A.product_id=B.id")->orderBy("A.id DESC");
     $pages = new Pagination(['totalCount' => $query1->count(), 'pageSize' => '10']);
     $array_investlog = $query1->offset($pages->offset)->limit($pages->limit)->all();
     $pages_offset = $pages->offset;
     //用户交易记录
     $query2 = Log::find()->where(['member_id' => Yii::$app->user->id, 'status' => [1, 2, 3, 4]]);
     $pages_trade = new Pagination(['totalCount' => $query2->count(), 'pageSize' => '2']);
     $array_tradelog = $query2->offset($pages_trade->offset)->limit($pages_trade->limit)->orderBy("id DESC")->all();
     $pages_trade_offset = $pages_trade->offset;
     //当前投资记录
     $query3 = (new Query())->select("A.step,A.create_at,B.title")->from("asset_log AS A")->where('A.member_id=' . Yii::$app->user->id . " AND A.action='Invest/invest' AND A.status=2 ")->join("left join", "fund_product AS B", "A.product_id=B.id")->limit(4)->orderBy("A.id DESC")->createCommand();
     $invest_log = $query3->queryAll();
     //数据包变量
     $amount_total = $model_asset->balance + $invest_total + $income_current;
     $session = yii::$app->session;
     $session->open();
     if (isset($session['last_time'])) {
         $updated_at = $session['last_time'];
     } else {
         $updated_at = $model->updated_at;
     }
     $phone = $model->phone;
     $balance = $model_asset->balance;
     $freeze = $model_asset->freeze;
     return $infos_rar = compact("invest_total", "income_total", "amount_total", "updated_at", "phone", "balance", "freeze", "invest_log", "array_investlog", "array_tradelog", "pages", "pages_trade", "pages_offset", "pages_trade_offset", "income_current", "income_yesterday", "experience_money");
 }
Ejemplo n.º 18
0
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use common\models\base\experience\Gold;
$octor = \common\models\UcenterMember::find()->asArray()->all();
foreach ($octor as $k => $v) {
    $octor[$k]['newname'] = '(' . $v['real_name'] . ')' . $v['username'];
}
/* @var $this yii\web\View */
/* @var $model common\models\base\experience\Gold */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="gold-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'uid')->dropDownList(ArrayHelper::map($octor, 'id', 'newname'));
?>

    <?php 
echo $form->field($model, 'money')->textInput(['maxlength' => true]);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', '派发') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
Ejemplo n.º 19
0
 /**
  * Finds the UcenterMember model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return UcenterMember the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = UcenterMember::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 20
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\base\cms\Feedback */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="feedback-form">

    <?php 
$form = ActiveForm::begin();
?>
    <?php 
echo $form->field($model, 'uid')->dropDownList(ArrayHelper::map(\common\models\UcenterMember::find()->asArray()->all(), 'id', 'username'));
?>


    <?php 
echo $form->field($model, 'feedback')->textarea(['rows' => 6]);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
Ejemplo n.º 21
0
 public static function Ucenter()
 {
     $model = UcenterMember::find()->where('id=' . Yii::$app->user->id)->one();
     //个人账户
     $model_asset = Info::find()->where('member_id=' . Yii::$app->user->id)->one();
     $updated_at = $model->updated_at;
     $balance = $model_asset->balance;
     $username = yii::$app->user->identity->username;
     return compact('updated_at', 'balance', 'username');
 }
Ejemplo n.º 22
0
 public function actionSetting()
 {
     $uid = Yii::$app->user->id;
     $user = UcenterMember::find()->andWhere(['id' => $uid])->one();
     return $this->view('setting', compact('user'));
 }
Ejemplo n.º 23
0
 public function actionExportuser()
 {
     $users = UcenterMember::find()->asArray()->all();
     $data = array();
     if ($users !== null) {
         foreach ($users as $key => $value) {
             $data[$key]['id'] = $value['id'];
             $data[$key]['phone'] = $value['phone'];
             $data[$key]['real_name'] = $value['real_name'];
             $data[$key]['created_at'] = date('Y-m-d :H-m-s', $value['created_at']);
             $data[$key]['create_area'] = $value['create_area'];
             $status = $value['status'];
             if ($status == UcenterMember::STATUS_ACTIVE) {
                 $data[$key]['status'] = '注册用户';
             } elseif ($status == UcenterMember::STATUS_REAL) {
                 $data[$key]['status'] = '实名用户';
             } elseif ($status == UcenterMember::STATUS_BIND) {
                 $data[$key]['status'] = '绑卡用户';
             }
             //账户信息
             $info = Info::find()->where(['member_id' => $value['id']])->one();
             //账户余额
             $data[$key]['balance'] = $info['balance'];
             //在投资金
             $data[$key]['invest'] = $info['invest'];
             //可用收益
             $data[$key]['profit'] = $info['profit'];
             //累计收益
             $data[$key]['total_revenue'] = $info['total_revenue'];
             //充值--投资--赎回--提现
             //首次充值
             $rechar_at = Log::find()->where(['member_id' => $value['id'], 'status' => Log::STATUS_RECHAR_SUC])->orderBy('id asc')->one();
             //充值总金额
             $rechar_sum = Log::find()->where(['member_id' => $value['id'], 'status' => Log::STATUS_RECHAR_SUC])->sum('step');
             //首次投资时间
             $invest_at = Log::find()->where(['member_id' => $value['id'], 'status' => Log::STATUS_INVEST_SUC])->orderBy('id asc')->one();
             //投资总额
             $invest_sum = Log::find()->where(['member_id' => $value['id'], 'status' => Log::STATUS_INVEST_SUC])->sum('step');
             //赎回总额
             $redem_sum = Log::find()->where(['member_id' => $value['id'], 'status' => Log::STATUS_REDEM_SUC])->sum('step');
             //提现总额
             $withdraw_sum = Log::find()->where(['member_id' => $value['id'], 'status' => Log::STATUS_WITHDRAW_SUC])->sum('step');
             //首次充值时间
             $data[$key]['rechar_at'] = $rechar_at ? date('Y-m-d :H-m-s', $rechar_at['create_at']) : 0;
             $data[$key]['rechar_sum'] = $rechar_sum;
             //首次投资时间
             $data[$key]['invest_at'] = $invest_at ? date('Y-m-d :H-m-s', $invest_at['create_at']) : 0;
             $data[$key]['invest_sum'] = $invest_sum;
             //赎回
             $data[$key]['redem_sum'] = $redem_sum;
             //提现
             $data[$key]['withdraw_sum'] = $withdraw_sum;
             //未领取红包奖励
             $red = member::get_user_red_packet($value['id']);
             $data[$key]['red_usable'] = $red['data']['red_sum'];
             //总的红包奖励
             $red1 = member::get_rad_list($value['id']);
             $data[$key]['red_sum'] = $red1['data']['sum'];
         }
         return Utils::exportExcel($data, array('用户id', '用户手机号', '用户真实姓名', '用户注册时间', '用户注册地区', '用户状态', '用户账户余额', '在投资金', '可用收益', '累计收益', '首次充值时间', '充值总金额', '首次投资时间', '投资总额', '赎回总额', '提现总额', '未领取红包', '红包奖励总额'), '数据分析' . date('Y-m-d-H-m-s'));
     }
 }
Ejemplo n.º 24
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use common\models\base\experience\Rule;
use common\models\UcenterMember;
use yii\captcha\Captcha;
/* @var $this yii\web\View */
$this->title = 'My Yii Application';
$upload = yii::$app->request->baseUrl . '/../../backend/web/upload/';
$user = UcenterMember::find()->where(['id' => $_GET['id']])->one();
?>

<span class="spanti-c2"></span>
<section>
    <p><img class="d-block" width="100%" src="<?php 
echo Yii::getAlias('@web') . '/';
?>
rq-images/sign2-bg.jpg" alt="活琪王"></p>
    <div class="Invitat-top Invtiat2-top">
        <p class="Invitat-tp1">您的好友<span><?php 
echo $user->username;
?>
</span> 邀请您一起使用天天理财</p>
        <p class="Invitat-tp2">赚钱的好事要分享,独食难肥哟~</p>
        <form  method="post" id="signupform" action="<?php 
echo yii\helpers\Url::to(['gold/gsignup']);
?>
">
            <span id="invitacode" class="spanti-flash">
               <?php 
Ejemplo n.º 25
0
 public function actionIndex()
 {
     error_reporting(0);
     //取出后台设置最大红包
     $maxincome = Setting::getCode('maxincome');
     //取出后台设置的每人最大红白
     $maxpeople = Setting::getCode('maxpeople');
     //后台设置体验金利率
     $goldrate = Setting::getCode('goldrate');
     //设定时区
     date_default_timezone_set('PRC');
     //取出当前时间
     $btime = date('Y-m-d' . '00:00:00', time());
     //转换成“开始”的时间戳
     $btimestr = strtotime($btime);
     //
     //判定今日是否已经计算了收益---防止收益被多次计算
     $count = Income::find()->where(['>', 'created_at', $btimestr])->count();
     if ($count) {
         return '收益已经计算过了';
     }
     //查询昨天以前所有的投资订单,查询order表
     $order = Order::find()->select('member_id,sum(money) as smoney,product_id')->andWhere(['<', 'start_at', Utils::alldaytostr($btimestr)[1]])->andWhere(['status' => 1])->groupBy(['member_id', 'product_id'])->asArray()->all();
     $arrnew = array();
     //循环所有投资
     //        $test = 0;
     foreach ($order as $k => $v) {
         //查询订单下对应项目
         $product = Product::findOne($v['product_id']);
         //查询昨天的生成的利息
         $income = Income::find()->andWhere(['member_id' => $v['member_id']])->andWhere(['between', 'created_at', Utils::alldaytostr($btimestr)[0], Utils::alldaytostr($btimestr)[1]])->one();
         //查询增值卡昨天信息
         //            $railscard = RaiseCard::find()
         //                ->select('member_id,sum(rate) as srate')
         //                ->andWhere(['member_id'=>$v['member_id']])
         //                ->andWhere(['<', 'use_at',Utils::alldaytostr($btimestr)[1]])
         //                ->andWhere(['>', 'use_end_time',Utils::alldaytostr($btimestr)[1]])
         //                ->andWhere(['status'=>RaiseCard::STATUS_USE])
         //                ->groupBy(['member_id'])
         //                ->asArray()
         //                ->one();
         //昨日签到人数
         $count = SignIn::find()->joinWith(['info' => function ($query) {
             /** @var \yii\db\ActiveQuery $query */
             $query->andWhere(['>', 'asset_info.invest', '1000']);
         }])->andWhere(['between', 'sign_in.sign_in_time', Utils::alldaytostr($btimestr)[0], Utils::alldaytostr($btimestr)[1]])->asArray()->count();
         //每人赠送利息,如果每人分的利息大于设置的每人获得的最大利息,就用设置的每人利息,如果小于就用分的利息
         $everyincome = 0;
         if ($count) {
             $everyincome = $maxincome / $count > $maxpeople ? $maxpeople : $maxincome / $count;
         }
         //取出昨天这个人有没有签到
         $rails = SignIn::find()->andWhere(['uid' => $v['member_id']])->andWhere(['between', 'sign_in_time', Utils::alldaytostr($btimestr)[0], Utils::alldaytostr($btimestr)[1]])->asArray()->one();
         //判断订单是否有总金额
         $smoney = isset($v['smoney']) ? $v['smoney'] : 0;
         //查询该用户体验金
         //            $all = Gold::find()->select('experience_gold.id,experience_gold.rid,sum(experience_gold.money) as gmoney')->andWhere(['uid'=>$v['member_id']])->joinWith(['rule' => function ($query) {
         //                /** @var \yii\db\ActiveQuery $query */
         //                $query->andWhere(['experience_rule.status'=>Rule::STATUS_ACTIVE]);
         //            }])->asArray()->all();
         //
         //            //查询发放给该用户体验金昨天信息
         //            $sendgold = RaiseCard::find()
         //                ->select('member_id,sum(rate) as srate')
         //                ->andWhere(['member_id'=>$v['member_id']])
         //                ->andWhere(['<', 'validity_start_at',Utils::alldaytostr($btimestr)[1]])
         //                ->andWhere(['>', 'validity_out_at',Utils::alldaytostr($btimestr)[1]])
         //                ->andWhere(['status'=>RaiseCard::STATUS_USE])
         //                ->asArray()
         //                ->one();
         //查询该用户体验金-----TODO
         $all = Gold::find()->select('uid,sum(money) as smoney')->andWhere(['uid' => $v['member_id'], 'status' => Gold::STATUS_ACTIVE])->andWhere(['<', 'created_at', time()])->andWhere(['>', 'end_at', time()])->asArray()->one();
         //            $summoney = 0;
         //            foreach($all as $kmmy=>$vmmy){
         //                $newbetime = strtotime(date('Y-m-d'.' 00:00:00',time()));
         //                $endtime = $vmmy['created_at'] + 3600 * 24 * $vmmy['time'];
         //                if($vmmy['created_at']<$newbetime && $endtime>$newbetime){
         //                    $summoney +=$all[$kmmy]['money'];
         //                }
         //            }
         //            var_dump($summoney);
         //            var_dump($all);
         //查询发放给该用户体验金昨天信息
         //            $sendgold = RaiseCard::find()
         //                ->select('member_id,sum(rate) as srate')
         //                ->andWhere(['member_id'=>$v['member_id']])
         //                ->andWhere(['<', 'validity_start_at',Utils::alldaytostr($btimestr)[1]])
         //                ->andWhere(['>', 'validity_out_at',Utils::alldaytostr($btimestr)[1]])
         //                ->groupBy(['member_id'])
         //                ->asArray()
         //                ->one();
         //计算利率,增息卡的利率+项目的利率
         //            $railscardrate = isset($railscard)? $railscard['srate']+$product->rate/365:$product->rate/365;
         //TODO
         $railscardrate = isset($railscard) ? $railscard['srate'] + $product->rate : $product->rate;
         //活动期间利率调整TODO
         date_default_timezone_set('PRC');
         //活动开始时间
         $begin_time = strtotime('2015-10-1');
         //活动结束时间
         $end_time = strtotime('2015-10-7');
         //当前时间
         $now_time = time();
         if ($now_time > $begin_time && $now_time < $end_time) {
             $railscardrate = '0.101';
         }
         $railscardrate = '0.08';
         //组成新数组,用户的id
         $arrnew[$v['member_id']]['member_id'] = $v['member_id'];
         //用户昨日利息,因利息也会产生利息,所以昨日利息乘以利率
         // $arrnew[$v['member_id']]['smoney'] += isset($income)?($smoney+$income->smoney)*Utils::moneyFormat($railscardrate) :$smoney*Utils::moneyFormat($railscardrate);
         //投资总额---记录当前再投资金
         $arrnew[$v['member_id']]['money'] += $v['smoney'];
         //计算收益--TODO
         $arrnew[$v['member_id']]['smoney'] += ceil($smoney * $railscardrate * 100 / 365) / 100;
         //取不包含红包体验金收益
         $arrnew[$v['member_id']]['iincome'] += ceil($smoney * $railscardrate * 100 / 365) / 100;
         //用户的昨日之前的累计利息
         // isset($income)? $arrnew[$v['member_id']]['newmoney'] = $arrnew[$v['member_id']]['smoney']+$income->newmoney : $arrnew[$v['member_id']]['newmoney'] += $smoney*Utils::moneyFormat($railscardrate);
         // TODO
         isset($income) ? $arrnew[$v['member_id']]['newmoney'] = $arrnew[$v['member_id']]['smoney'] + $income->newmoney : ($arrnew[$v['member_id']]['newmoney'] += ceil($smoney * $railscardrate * 100 / 365) / 100);
         //签到获取的利息
         $arrnew[$v['member_id']]['railscard'] = $rails ? $everyincome : 0;
         //在投金额大于1元--计算体验金收益
         if ($smoney >= 1) {
             //计算该用户体验金获取的利息
             $arrnew[$v['member_id']]['goldincome'] = ceil($all['smoney'] * $railscardrate * 100 / 365) / 100;
         }
         //每人的利率
         $arrnew[$v['member_id']]['rate'] = $railscardrate;
     }
     foreach ($arrnew as $k => &$v) {
         //求出每个用户的昨日利率
         $v['rate'] = Utils::moneyFormat(($v['smoney'] + $v['railscard']) * 365 / $v['money']);
         //总利息加上签到获取的利息
         $v['newmoney'] = $v['railscard'] + $v['newmoney'] + $v['goldincome'];
         //利息加上签到获取的利息
         $v['smoney'] = $v['railscard'] + $v['smoney'] + $v['goldincome'];
         //利息计算时的投资---
         //            $v['money'] = $v['money']  + $v['goldincome'] + $v['railscard'];
         // -- 计算在投金额不应该增加利息产生的金额
         $v['money'] = $v['money'];
     }
     //循环数组
     foreach ($arrnew as $vs) {
         $_model = new Income();
         //查出用户表的余额
         $Info = Info::find()->where(['member_id' => $vs['member_id']])->one();
         if ($Info) {
             $Info->profit = $Info->profit + $vs['smoney'];
             $Info->total_revenue = $Info->total_revenue + $vs['smoney'];
             $Info->save();
         }
         //取出昨天这个人有没有签到
         $signin = SignIn::find()->andWhere(['uid' => $vs['member_id']])->andWhere(['between', 'sign_in_time', Utils::alldaytostr($btimestr)[0], Utils::alldaytostr($btimestr)[1]])->one();
         if ($signin && $vs['money'] >= 1000) {
             $signin->sign_in_money = $vs['railscard'];
             $signin->status = SignIn::STATUS_FINISH;
             $signin->save();
             $_model->railscard = $vs['railscard'];
         }
         $_model->member_id = $vs['member_id'];
         $_model->smoney = $vs['smoney'];
         $_model->money = $vs['money'];
         $_model->rate = $vs['rate'];
         $_model->newmoney = $vs['newmoney'];
         $_model->goldincome = $vs['goldincome'];
         $_model->iincome = $vs['iincome'];
         //生成每日利息表的数据
         $_model->save();
     }
     //推荐大师活动
     //获取所有用户信息
     $users = UcenterMember::find()->select(['id'])->asArray()->all();
     if ($users !== null) {
         //获取所有用户id值
         foreach ($users as $key => $value) {
             //循环用户信息--判定其推荐人中是否有符合奖励规则的人--有进行推荐表中状态更改
             AloneMethod::produce_red_packet($value['id']);
         }
     }
     //判定推荐表中用户是否符合拿取奖励规则
     if ($users !== null) {
         foreach ($users as $key => $value) {
             AloneMethod::send_red_packet($value['id']);
         }
     }
     echo "成功";
 }
Ejemplo n.º 26
0
 /**
  * 推广大师进行注册操作
  * @return string
  */
 public function actionSignupofmaster()
 {
     $post = Yii::$app->request->post();
     $userIp = Yii::$app->request->userIp;
     //获取邀请码
     $invite_code = $post['invite_code'];
     //解析链接中的手机号
     $invite_phone = \frontend\actions\App\AloneMethod::decrypt($invite_code);
     //判定手机号的合法性
     $res = UcenterMember::find()->where(['phone' => $invite_phone, 'username' => $invite_phone])->asArray()->one();
     if ($res == null) {
         $return = array('errorNum' => '1', 'errorMsg' => '活动链接来源不合法', 'data' => null);
         return json_encode($return);
     }
     // 获取推荐人信息
     $invitation_id = $res['id'];
     //进行注册操作
     $phone = $post['phone'];
     $pwd = $post['password'];
     $phone_code = $post['validate_code'];
     $request = member::the_master_register($phone, $pwd, $phone_code, $invitation_id, $userIp);
     return json_encode($request);
 }
Ejemplo n.º 27
0
?>

    <?php 
echo $form->field($model, 'idcard')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'real_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(UcenterMember::getArrayStatus());
?>

    <?php 
echo $form->field($model, 'lock')->dropDownList(UcenterMember::getTypeStatus());
?>

    <div class="form-group field-ucentermember-type">
        <label class="control-label" for="ucentermember-type">类型</label>
        <input type="hidden" name="UcenterMember[type]" value="">
        <select id="ucentermember-type" class="form-control" name="UcenterMember[type][]" multiple="multiple" size="4" style="font-size:14px;">
            <?php 
foreach ($allcat as $k => $v) {
    ?>
            <option value="<?php 
    echo $v['id'];
    ?>
" <?php 
    echo in_array($v['id'], $cat) ? 'selected' : '';
    ?>
Ejemplo n.º 28
0
?>

    <?php 
echo $form->field($model, 'real_name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(UcenterMember::getArrayStatus());
?>

    <?php 
echo $form->field($model, 'lock')->dropDownList(UcenterMember::getTypeStatus());
?>

    <?php 
echo $form->field($model, 'type')->dropDownList(UcenterMember::getCusStatus(), ['multiple' => 'multiple', 'style' => 'font-size:14px;']);
?>

    <?php 
echo $form->field($model, 'create_ip')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'create_area')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'create_channel')->textInput();
?>

    <?php 
Ejemplo n.º 29
0
    ?>
</option>
            <?php 
}
?>

        </select>

        <div class="help-block"></div>
    </div>

    <?php 
echo $form->field($model, 'ocreditor', ['options' => ['style' => 'display:block;', 'id' => 'ocreditor']])->dropDownList(ArrayHelper::map(\common\models\UcenterMember::find()->andWhere(['type' => \common\models\UcenterMember::CUS_CRE])->asArray()->all(), 'id', 'username'));
?>
    <?php 
echo $form->field($model, 'maxcreditor', ['options' => ['style' => 'display:block;', 'id' => 'maxcreditor']])->dropDownList(ArrayHelper::map(\common\models\UcenterMember::find()->andWhere(['type' => \common\models\UcenterMember::CUS_MAXCRE])->asArray()->all(), 'id', 'username'));
?>
    <?php 
echo $form->field($model, 'intro')->textarea(['rows' => 6]);
?>

	<div class="form-group field-thirdproduct-start_at required" style="width: 300px">
        <label class="control-label" for="thirdproduct-amount">起始时间</label>
        <?php 
echo DateTimePicker::widget(['model' => $model, 'attribute' => 'start_at', 'language' => 'zh-CN', 'size' => 'ms', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd  HH:ii ', 'todayBtn' => true]]);
?>
    </div>

    	<div class="form-group field-thirdproduct-start_at required" style="width: 300px">
        <label class="control-label" for="thirdproduct-amount">结束时间</label>
        <?php 
Ejemplo n.º 30
0
 /**
  * 获取用户的详细信息--认证信息--账户信息
  * @param $uid
  * @return array|null|\yii\db\ActiveRecord
  */
 public static function getUserInfo($uid)
 {
     $year_rate = '0.08';
     //活动期间利率调整TODO
     date_default_timezone_set('PRC');
     //活动开始时间
     $begin_time = strtotime('2015-9-24');
     //活动结束时间
     $end_time = strtotime('2015-9-30');
     //当前时间
     $now_time = time();
     if ($now_time > $begin_time && $now_time < $end_time) {
         $year_rate = '0.0815';
     }
     $yes_money = 0;
     $info = UcenterMember::find()->joinWith('info')->select(['id', 'ucenter_member.status', 'lock', 'invitation_code', 'phone', 'idcard', 'real_name', 'bank_card', 'bank_card_phone', 'balance', 'total_invest', 'invest', 'profit', 'total_revenue'])->where(['id' => $uid])->asArray()->one();
     if ($info == null) {
         $return = array('errorNum' => '1', 'errorMsg' => '用户不存在', 'data' => null);
         return $return;
     }
     //获取网站配置信息
     $config = AssetConfig::find()->select(['id', 'deposit_num', 'deposit_min', 'deposit_max', 'deposit_time', 'invest_num', 'invest_min', 'invest_max', 'invest_time', 'withdraw_num', 'withdraw_min', 'withdraw_max', 'withdraw_time', 'ransom_num', 'ransom_min', 'ransom_max', 'ransom_time'])->where(['id' => '2'])->asArray()->one();
     //获取用户昨日收益金额
     //今日零时时间
     $zero_time = strtotime(date("Y-m-d"));
     //获取昨日收益
     $get_yes_money = Income::find()->where(['>', 'created_at', $zero_time])->andWhere(['member_id' => $uid])->one();
     //获取昨日收益金额--利率
     $yes_experience_money = 0;
     if ($get_yes_money) {
         $yes_money = $get_yes_money->smoney ? $get_yes_money->smoney : 0;
         $year_rate = $get_yes_money->rate ? $get_yes_money->rate : 0;
         $yes_experience_money = $get_yes_money->goldincome ? $get_yes_money->goldincome : 0;
     }
     //获取体验金
     $experience_money = 0;
     $money = Gold::find()->where(['<', 'created_at', time()])->andWhere(['>', 'end_at', time()])->andWhere(['uid' => $uid, 'status' => Gold::STATUS_ACTIVE])->sum('money');
     if ($money) {
         $experience_money = sprintf("%.2f", $money);
     }
     //获取活动红包可用金额
     $red_packet_money = 0;
     $red_money = member::get_user_red_packet($uid);
     if (!$red_money['errorNum']) {
         $red_packet_money = $red_money['data']['red_sum'];
     }
     $activity_invite = '';
     //用户再投资金大于一元,可以进行分享
     //        $invest = $info['invest'] ? $info['invest'] : 0;
     //        if($invest >= 1){
     //            $activity_invite = AloneMethod::encrypt($info['phone']);
     //        }
     $activity_invite = AloneMethod::encrypt($info['phone']);
     $data = array('phone' => $info['phone'], 'idcard' => $info['idcard'], 'real_name' => $info['real_name'], 'status' => $info['status'], 'lock' => $info['lock'], 'invitation_code' => $info['invitation_code'], 'bank_card' => $info['bank_card'], 'bank_card_phone' => $info['bank_card_phone'], 'balance' => $info['balance'], 'total_invest' => $info['total_invest'], 'total_revenue' => $info['total_revenue'], 'invest' => $info['invest'], 'profit' => $info['profit'], 'yesterday_rate' => sprintf("%.4f", $year_rate), 'yesterday_money' => $yes_money, 'experience_money' => $experience_money, 'yes_experience_money' => $yes_experience_money, 'red_packet_money' => $red_packet_money, 'activity_invite' => $activity_invite, 'config' => $config);
     $return = array('errorNum' => '0', 'errorMsg' => 'success', 'data' => $data);
     return $return;
 }