48 lines
993 B
PHP
48 lines
993 B
PHP
<?php
|
|
|
|
namespace app\controllers;
|
|
|
|
use Yii;
|
|
use yii\filters\AccessControl;
|
|
use yii\web\Response;
|
|
use yii\filters\VerbFilter;
|
|
|
|
|
|
class SiteController extends Controller
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function actions()
|
|
{
|
|
return [
|
|
'error' => [
|
|
'class' => 'yii\web\ErrorAction',
|
|
],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Displays homepage.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function actionIndex()
|
|
{
|
|
$code = $this->request->get('code');
|
|
$state = $this->request->get('state');
|
|
$to_state = "";
|
|
if(!empty($state)){
|
|
$explode = explode('_',$state);
|
|
if(!empty($explode) && count($explode) >= 2){
|
|
$to_state = "&dev_id={$explode[0]}&store_id={$explode[1]}";
|
|
}
|
|
}
|
|
$url = "https://app.3dxh.h5.dev.1nww.com/#/White?code={$code}{$to_state}";
|
|
// echo $url;
|
|
// exit();
|
|
return $this->redirect($url);
|
|
}
|
|
|
|
}
|