Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
14a99a315b2d7639dcf783b04863741879d493d0
2 parents
7ee3f55d
88fea3df
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
54 deletions
library/Api/Yohobuy.php
static/sass/me/_yoho-coin-new.scss
yohobuy/www.yohobuy.com/application/Bootstrap.php
yohobuy/www.yohobuy.com/application/controllers/Girls.php
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Images.php
yohobuy/www.yohobuy.com/public/index-dev.php
library/Api/Yohobuy.php
View file @
14a99a3
...
...
@@ -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/'; // 先临时使用网关
...
...
static/sass/me/_yoho-coin-new.scss
View file @
14a99a3
.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
(
36
px
);
line-height
:
pxToRem
(
40
px
);
width
:
pxToRem
(
152px
);
height
:
pxToRem
(
36px
);
text-align
:
center
;
...
...
yohobuy/www.yohobuy.com/application/Bootstrap.php
View file @
14a99a3
<?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
))
{
...
...
yohobuy/www.yohobuy.com/application/controllers/Girls.php
View file @
14a99a3
<?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
...
...
yohobuy/www.yohobuy.com/application/modules/Passport/controllers/Images.php
View file @
14a99a3
<?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
...
...
yohobuy/www.yohobuy.com/public/index-dev.php
View file @
14a99a3
<?php
<?php
use
Yaf\Application
;
define
(
'SITE_MAIN'
,
'http://web.dev.yohobuy.com'
);
// 网站主域名
...
...
Please
register
or
login
to post a comment