Thirdlogin.php 1.87 KB
<?php

use Action\WebAction;
use Passport\PassportModel;
use LibModels\Wap\Passport\RegData;
use WebPlugin\Helpers;

class ThirdloginController extends WebAction
{

    /**
     * 第三方联合登录手机绑定流程页1
     */
    public function indexAction()
    {
        $this->setTitle('联合登录补全信息');
        $openId = trim($this->get('openId'));
        $sourceType = trim($this->get('sourceType'));

        $simpleHeader = PassportModel::getSimpleHeader();

        //整合
        $data = array(
            'thirdLogin' => true,
            'simpleHeader' => $simpleHeader,
            'openId' => $openId,
            'sourceType' => $sourceType,
            'region' => RegData::getAreasData(),//区域
            'serviceUrl' => Helpers::url('/help', array('category_id' => 9))//服务条款
        );

        $this->_view->display('index', $data);
    }

    /*
     * 首次登录绑定流程-新会员
     */

    public function noregistAction()
    {
        $mobile = trim($this->post('mobile'));
        $sourceType = trim($this->post('sourceType'));
        $openId = trim($this->post('openId'));
        $area = trim($this->post('area'));

        $simpleHeader = PassportModel::getSimpleHeader();
        $data = array(
            'thirdLogin' => true,
            'simpleHeader' => $simpleHeader,
            'mobile' => $mobile,
            'sourceType' => $sourceType,
            'openId' => $openId,
            'area' => $area
        );
        $this->_view->display('noregist', $data);
    }

    /*
     * 绑定成功
     * 
     */

    public function bindSuccessAction()
    {

        $simpleHeader = PassportModel::getSimpleHeader();
        $data = array(
            'thirdLogin' => true,
            'simpleHeader' => $simpleHeader,
            'goShopping' => SITE_MAIN,
        );
        $this->_view->display(' bindsuccess', $data);
    }

}