Example #1
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use app\models\U;
use app\models\MStaff;
$client = \app\models\ClientWechat::findOne(['gh_id' => $wx_user->gh_id])->client;
?>

<?php 
include '../models/utils/emoji.php';
?>
    
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>襄阳联通</title>

    <!-- Sets initial viewport load and disables zooming  -->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">

    <!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!-- Include the compiled Ratchet CSS -->
    <link href="/wx/web/ratchet/dist/css/ratchet.css?v11" rel="stylesheet">

  
    <link href="./php-emoji/emoji.css" rel="stylesheet">
Example #2
0
 public static function findOneByWechatOpenid($gh_id, $openid)
 {
     $client_wechat = \app\models\ClientWechat::findOne(['gh_id' => $gh_id]);
     $woso_client = $client_wechat->client;
     $wx_user = \app\models\MUser::findOne(['gh_id' => $gh_id, 'openid' => $openid]);
     foreach ($wx_user->bindMobileNumbers as $mobile) {
         $employee = self::find()->join('INNER JOIN', 'client_employee_mobile', 'client_employee.employee_id=client_employee_mobile.employee_id')->where(['client_id' => $woso_client->client_id, 'mobile' => $mobile])->one();
         if (!empty($employee)) {
             return $employee;
         }
     }
     return false;
 }
Example #3
0
 public function actionNearestoutlets()
 {
     $this->layout = false;
     $gh_id = U::getSessionParam('gh_id');
     $openid = U::getSessionParam('openid');
     Yii::$app->wx->setGhId($gh_id);
     $gh = Yii::$app->wx->getGh();
     $jssdk = new JSSDK($gh['appid'], $gh['appsecret']);
     $clientWechat = \app\models\ClientWechat::findOne(['gh_id' => $gh_id]);
     $outlets = \app\models\ClientOutlet::find()->where(['client_id' => $clientWechat->client_id])->where(['<>', 'longitude', 0])->all();
     return $this->render('nearestoutlets', ['gh_id' => $gh_id, 'openid' => $openid, 'outlets' => $outlets, 'jssdk' => $jssdk]);
 }
Example #4
0
 public function getWechats()
 {
     return $this->hasMany(\app\models\ClientWechat::className(), ['client_id' => 'client_id']);
 }