コード例 #1
0
ファイル: has_gift.php プロジェクト: suyuanen/p2p
?>
"
               style="width: 70%;line-height: 2.05em;background: #961313;border: 2px solid #fff;border-radius: 0.1666em;">进入玖信理财</a>
        </div>
        <div class="LookfrienBtn" data-zoom="zoom:1.2;" style="width: 98%;height: 30px;">
            <a style="width: 33.1%;height: 30px;line-height: 30px;" href="javascript:void(0);" class="friendCurrent" data-cato="friend">看朋友手气</a>
            <a style="width: 33.1%;height: 30px;line-height: 30px;" href="javascript:void(0);" class="" data-cato="activity">活动详情</a>
            <a style="width: 33.1%;height: 30px;line-height: 30px;" href="javascript:void(0);" class="" data-cato="know">了解玖信理财</a>
        </div>
        <div class="shareBox" data-zoom="zoom:1.12;" style="zoom: 0.95; display: block;" id="friend">

            <?php 
foreach ($members as $member) {
    ?>
                <?php 
    $wechatMember = \modules\asset\models\ShareGift::find()->where(['user_id' => $member['id']])->asArray()->one();
    ?>
                <?php 
    if (count($wechatMember) > 0) {
        ?>
                    <?php 
        $info = json_decode($wechatMember['wechat_info'], true);
        ?>
                    <ul class="friendList clearFloat">
                        <li class="floatLeft friendImg">
                            <img src="<?php 
        echo $info['headimgurl'];
        ?>
">
                        </li>
                        <li class="floatLeft friendName">
コード例 #2
0
ファイル: ShareController.php プロジェクト: suyuanen/p2p
 public function actionSignupFinish()
 {
     try {
         $member = wanhunet::app()->member;
         $wechat_id = $member->getOtherInfo(MemberOther::TABLE_WECHAT);
         /** @var ShareGift $shateGift */
         $shateGift = ShareGift::find()->where(['wechat_id' => $wechat_id->row])->one();
         $limit = $shateGift->gift_limit;
         /** @var Invest $invest */
         $invest = Invest::find()->where(["type" => Invest::TYPE_REG])->one();
         if (InvestList::hasBuy($member->getId(), $invest->id)) {
             $investOrder = InvestList::find()->where(["member_id" => $member->getId()])->andWhere(['invest_id' => $invest->id])->andWhere(['status' => self::STATUS_PAYED])->one();
         } else {
             $investOrder = new InvestList();
             $investOrder->investment_sum = $limit;
             $investOrder->invest_id = $invest->id;
             $order = $invest->markOrderReg($investOrder);
             $investOrder->finishPay(new Event());
             $shateGift->has_gift = ShareGift::HAS_GIFT;
             $shateGift->user_id = $member->id;
             $shateGift->save();
         }
         return $this->view("signup_finish", ['info' => $investOrder]);
     } catch (\Exception $e) {
         //            throw $e;
         return $this->redirect(Url::to(['site/signin']));
     }
 }