Authored by 毕凯

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -25,9 +25,9 @@ class Yohobuy
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL2 = 'http://apih5.yoho.cn/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
// /* 测试环境 */
// const API_URL = 'http://192.168.102.205:8080/gateway/'; // 先临时使用网关
... ...
.yoho-coin-new-page {
padding-top: pxToRem(30px);
text-align: center;
.coin{
text-align: center;
}
.coin-num {
color: #d0021b;
font-size: pxToRem(66px);
... ... @@ -31,7 +32,7 @@
margin: pxToRem(30px) 0;
color: #444;
font-size: pxToRem(24px);
line-height: pxToRem(36px);
line-height: pxToRem(40px);
width: pxToRem(152px);
height: pxToRem(36px);
text-align: center;
... ...
<?php
<?php
/**
* 启动运行
*
... ... @@ -66,19 +65,21 @@ class Bootstrap extends Bootstrap_Abstract
{
$hostParts = explode('.', $dispatcher->getRequest()->getServer('HTTP_HOST', ''));
$level = count($hostParts) - 1;
/* 根据域名的级别,设置默认的模块、控制器、方法 */
$module = 'Index';
$controller = 'Index';
$action = 'Index';
// 二级域名
// 三级域名
if (2 === $level) {
$subDomain = strval($hostParts[0]);
switch (strtolower($subDomain)) {
case 'www': // 主站
case 'new': // 原新版
case 'dev': // 开发环境
case 'm': // 老版(到频道选择)
case 'buy': // 测试环境的域名, 以后可去掉
case 'login': // 登录
break;
case 'new': // 原新版(到男生首页)
$controller = 'Boys';
break;
case 'search': // 搜索
$controller = 'Search';
... ... @@ -88,12 +89,12 @@ class Bootstrap extends Bootstrap_Abstract
$module = 'Guang';
break;
case 'list': // 商品列表
case 'item': // 商品详情
$module = 'Product';
break;
case 'sale'://促销
$module = 'Product';
$controller = 'sale';
case 'cart': // 购物车
$module = 'Cart';
break;
default: // 其它(识别为品牌)
$module = 'Product';
$action = 'Brand';
... ... @@ -104,6 +105,7 @@ class Bootstrap extends Bootstrap_Abstract
$dispatcher->getRequest()->module = $module;
$dispatcher->getRequest()->controller = $controller;
$dispatcher->getRequest()->action = $action;
/* 根据对应模块的配置,添加相应的路由规则 */
$iniFile = APPLICATION_PATH . '/configs/routes.' . strtolower($module) . '.ini';
if (file_exists($iniFile)) {
... ...
<?php
use Action\WebAction;
use Action\WebAction;
use Index\HomeModel;
use Plugin\Captcha;
/**
* 女首
*/
... ... @@ -18,4 +18,5 @@ class GirlsController extends WebAction
);
$this->_view->display('index', $data);
}
}
\ No newline at end of file
... ...
<?php
use Action\WebAction;
use Plugin\Captcha;
class ImagesController extends WebAction
{
/**
* 验证码-生成
*
* @return mixed 验证码图片
*/
public function indexAction()
{
$g = trim($this->get('g'));
$namespace = !empty($g) ? $g : 'passport_istration';
$imgCode = new Captcha();
$imgCode->setWidth(150)->setHeight(50)->setWordLen(4)->generate($namespace);
exit();
}
/**
* 验证码-检测
*
* @param string auth_code (验证码)
* @return string true|false
*/
public function verifyimgcodeAction ()
{
if (strtolower($this->get('auth_code')) !== strtolower(Captcha::getFromSession('passport_istration')))
{
die('false');
}
die('true');
}
<?php
use Action\WebAction;
use Plugin\Captcha;
class ImagesController extends WebAction
{
/**
* 验证码-生成
*
* @return mixed 验证码图片
*/
public function indexAction()
{
$g = trim($this->get('g'));
$namespace = !empty($g) ? $g : 'passport_istration';
$imgCode = new Captcha();
$imgCode->setWidth(150)->setHeight(50)->setWordLen(4)->generate($namespace);
exit();
}
/**
* 验证码-检测
*
* @param string auth_code (验证码)
* @return string true|false
*/
public function verifyimgcodeAction ()
{
if (strtolower($this->get('auth_code')) !== strtolower(Captcha::getFromSession('passport_istration')))
{
die('false');
}
die('true');
}
}
\ No newline at end of file
... ...
<?php
<?php
use Yaf\Application;
define('SITE_MAIN', 'http://web.dev.yohobuy.com'); // 网站主域名
... ...