Esempio n. 1
0
 public function actionHd201509t6()
 {
     $this->layout = false;
     $gh_id = U::getSessionParam('gh_id');
     $openid = U::getSessionParam('openid');
     $wx_user = \app\models\MUser::findOne(['gh_id' => $gh_id, 'openid' => $openid]);
     if (empty($wx_user) || $wx_user->subscribe === 0) {
         return $this->render('need_subscribe');
     }
     $bindMobiles = \app\models\OpenidBindMobile::findOne(['gh_id' => $gh_id, 'openid' => $openid]);
     if (empty($bindMobiles)) {
         $url = \yii\helpers\Url::to();
         \Yii::$app->getSession()->set('RETURN_URL', $url);
         return $this->redirect(['wap/addbindmobile', 'gh_id' => $gh_id, 'openid' => $openid]);
     }
     $hd201509t5 = \app\models\MHd201509t5::findOne(['mobile' => $bindMobiles->mobile]);
     if (empty($hd201509t5)) {
         //不在能充值的用户表中,表明是新用户
         $tcnx_flag = 0;
         $yfzx = "";
         $fsc = "";
     } else {
         if ($hd201509t5->tcnx == 1) {
             //76元套餐以下
             $tcnx_flag = 1;
         } else {
             $tcnx_flag = 2;
         }
         $yfzx = $hd201509t5->yfzx;
         $fsc = $hd201509t5->fsc;
     }
     $hd201509t6 = \app\models\MHd201509t6::findOne(['mobile' => $bindMobiles->mobile]);
     if (empty($hd201509t6)) {
         $hd201509t6 = new \app\models\MHd201509t6();
         $hd201509t6->gh_id = $gh_id;
         $hd201509t6->openid = $openid;
         $hd201509t6->mobile = $bindMobiles->mobile;
         $hd201509t6->status = 0;
         $hd201509t6->yfzx = $yfzx;
         $hd201509t6->fsc = $fsc;
         $hd201509t6->tcnx = $tcnx_flag;
         $hd201509t6->hbme = 0;
         $hd201509t6->save(false);
     }
     return $this->render('hd201509t6', ['observer' => $wx_user, 'hd201509t6' => $hd201509t6]);
 }
Esempio n. 2
0
    <script src="/wx/web/ratchet/dist/js/ratchet.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
        <style type="text/css">

        </style>
  </head>
  <body>

    <!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) -->
    <!--<div class="content" style="background-color: #401080">-->
    <div class="content">
    <img width=100%  src="/wx/web/images/hd201509t6-head1.jpg?v3">
        <marquee direction=left style="color:red" scrollamount=3>
        <span>
        <?php 
$hd_users = app\models\MHd201509t6::find()->where(["status" => 1])->orderBy(['create_time' => SORT_DESC])->limit(10)->all();
foreach ($hd_users as $hd_user) {
    ?>
            <?php 
    echo emoji_unified_to_html(emoji_softbank_to_unified($hd_user->user->nickname));
    ?>
 &nbsp;
            手机<?php 
    echo '*******' . substr($hd_user->mobile, 7, 4);
    ?>
 &nbsp;
            已抢到红包<?php 
    echo $hd_user->hbme;
    ?>
元&nbsp;&nbsp;