Пример #1
0
 public function actionInformation()
 {
     if (($moneyModel = Invest::findByLately(Invest::TYPE_MONEY)) !== null) {
         $inverstOfMoney = Utils::timeCut($moneyModel->buy_time_start, time());
     } else {
         $inverstOfMoney = '未发布';
     }
     if (($emoneyModel = Invest::findByLately(Invest::TYPE_EXPERIENCE_MONEY)) !== null) {
         $inverstOfeMoney = Utils::timeCut($emoneyModel->buy_time_start, time());
     } else {
         $inverstOfeMoney = '未发布';
     }
     try {
         $jiuxinInfo = JiuxinApi::jiuxinGet();
         $row = wanhunet::app()->member->getOtherInfo(MemberOther::TABLE_JIUXIN)->row;
         $jiuxinInfo['j_user_name'] = current(explode('=|=', $row));
     } catch (\Exception $e) {
         $jiuxinInfo = [];
         //
         //            if ($e->getCode() == ErrorCode::Jiuxin_auth) {
         //                $jiuxinInfo = [];
         //            } else {
         //            }
     }
     return $this->view('information', ['inverstOfMoney' => $inverstOfMoney, 'inverstOfeMoney' => $inverstOfeMoney, 'jiuxinInfo' => $jiuxinInfo, 'actives' => Post::find()->where(['status' => Post::STATUS_ACTIVE])->orderBy('id desc')->all()]);
 }
Пример #2
0
<?php

/** @var $invest */
$web = \wanhunet\wanhunet::getAlias('@web') . '/';
$isGuest = \wanhunet\wanhunet::$app->user->isGuest;
$isEm = $invest['type'] == \modules\invest\models\Invest::TYPE_EXPERIENCE_MONEY;
$investList = \modules\invest\models\InvestList::find()->where(['invest_id' => $invest['id'], \modules\invest\models\InvestList::tableName() . '.`status`' => \modules\invest\models\InvestList::STATUS_PAYED])->joinWith(["member" => function ($q) {
    /** @var \yii\db\ActiveQuery $q */
    $q->select(\modules\member\models\Member::$SELECT_ROW);
}])->asArray()->orderBy("id desc")->limit(10)->all();
$sum = $invest['orderSum']['10'] + $invest['orderSum']['20'];
$sheng = $invest['amount'] - $sum;
if ($sheng <= 0) {
    $investListCount = \modules\invest\models\InvestList::find()->where(['invest_id' => $invest['id'], \modules\invest\models\InvestList::tableName() . '.`status`' => \modules\invest\models\InvestList::STATUS_PAYED])->count();
    $investListLast = \modules\invest\models\InvestList::find()->where(['invest_id' => $invest['id'], \modules\invest\models\InvestList::tableName() . '.`status`' => \modules\invest\models\InvestList::STATUS_PAYED])->asArray()->orderBy("id desc")->one();
    $shouqingshijian = \wanhunet\helpers\Utils::timeCut($investListLast['pay_time'], $invest['buy_time_start']);
}
?>
<style type="text/css">
    @media screen and (min-width: 320px)
    body {
        font-size:

    16px

    ;
    }

    body {
        color: #3a3a3a;
        font-family: "Helvetica";