Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
19cec0768b8cee65a72313c8de8b4de3043faf74
1 parent
c9ca439c
全站支持https的改造
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
54 additions
and
33 deletions
library/Plugin/Helpers.php
library/Plugin/Images.php
script/nginx/conf/vhosts/login.m.yohobuy.com.conf
static/js/cart/cart.js
static/js/guang/plus-star/detail.js
template/m.yohobuy.com/actions/index/home/index.phtml
template/m.yohobuy.com/actions/passport/back/email-success.phtml
template/m.yohobuy.com/actions/passport/back/email.phtml
template/m.yohobuy.com/actions/passport/back/mobile-code.phtml
template/m.yohobuy.com/actions/passport/back/mobile.phtml
template/m.yohobuy.com/actions/passport/back/new-password.phtml
template/m.yohobuy.com/actions/passport/bind/code.phtml
template/m.yohobuy.com/actions/passport/bind/index.phtml
template/m.yohobuy.com/actions/passport/bind/password.phtml
template/m.yohobuy.com/actions/passport/login/index.phtml
template/m.yohobuy.com/actions/passport/login/international.phtml
template/m.yohobuy.com/partials/layout/download_app.phtml
yohobuy/m.yohobuy.com/application/models/Home/Grade.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Index.php
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Info.php
library/Plugin/Helpers.php
View file @
19cec07
...
...
@@ -62,7 +62,7 @@ class Helpers
*/
public
static
function
getImageUrl
(
$url
,
$width
,
$height
,
$mode
=
2
)
{
return
strtr
(
$url
,
array
(
'{width}'
=>
$width
,
'{height}'
=>
$height
,
'{mode}'
=>
$mode
));
return
strtr
(
$url
,
array
(
'{width}'
=>
$width
,
'{height}'
=>
$height
,
'{mode}'
=>
$mode
,
'http://'
=>
'//'
));
}
/**
...
...
@@ -74,6 +74,7 @@ class Helpers
public
static
function
getFilterUrl
(
$url
)
{
$url
=
strtr
(
$url
,
array
(
'.m.yohobuy.com'
=>
SUB_DOMAIN
,
OLD_MAIN
=>
SITE_MAIN
,
'www.yohobuy.com'
=>
SITE_MAIN
));
$url
=
strtr
(
$url
,
array
(
'http://'
=>
'//'
));
$filter
=
strstr
(
$url
,
'openby:yohobuy='
,
true
);
if
(
$filter
)
{
return
rtrim
(
rtrim
(
$filter
,
'?'
),
'&'
);
...
...
@@ -353,6 +354,10 @@ class Helpers
$articleData
[
'author'
][
'url'
]
=
Helpers
::
getFilterUrl
(
$articleData
[
'author'
][
'url'
]);
}
$result
[
'author'
]
=
$articleData
[
'author'
];
if
(
isset
(
$result
[
'author'
][
'avatar'
]))
{
$result
[
'author'
][
'avatar'
]
=
strtr
(
$result
[
'author'
][
'avatar'
],
array
(
'http://'
=>
'//'
));
}
}
// 模板中需要的标签标识
...
...
library/Plugin/Images.php
View file @
19cec07
...
...
@@ -51,7 +51,7 @@ class Images
return
$fileName
;
}
$domain
=
self
::
getDomain
(
$bucket
,
$fileName
);
return
'
http:
//'
.
$domain
.
'/'
.
$bucket
.
$fileName
;
return
'//'
.
$domain
.
'/'
.
$bucket
.
$fileName
;
}
/**
...
...
@@ -71,7 +71,7 @@ class Images
if
(
stripos
(
$fileName
,
'http://'
)
!==
0
)
{
$fileName
=
self
::
template
(
$fileName
,
$bucket
,
$mode
);
}
return
strtr
(
$fileName
,
array
(
'{width}'
=>
$width
,
'{height}'
=>
$height
,
'{mode}'
=>
$mode
));
return
strtr
(
$fileName
,
array
(
'{width}'
=>
$width
,
'{height}'
=>
$height
,
'{mode}'
=>
$mode
,
'http://'
=>
'//'
));
}
/**
...
...
script/nginx/conf/vhosts/login.m.yohobuy.com.conf
View file @
19cec07
...
...
@@ -34,7 +34,7 @@ server
location
^~ /
dist
/ {
proxy_redirect
off
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_pass
http
://
cdn
.
yoho
.
cn
/;
proxy_pass
http
s
://
cdn
.
yoho
.
cn
/;
}
location
= /
Passport
/
session
/
index
{
...
...
static/js/cart/cart.js
View file @
19cec07
...
...
@@ -216,7 +216,7 @@ $('.btn-balance').on('touchend', function() {
}
});
$
(
'.off-shell-goods'
).
on
(
'touchstart touchend'
,
function
()
{
$
(
'.off-shell-goods'
).
on
(
'touchstart touchend'
,
function
(
e
)
{
var
$this
=
$
(
e
.
target
).
closest
(
'span'
);
if
(
$this
.
hasClass
(
'icon-del'
))
{
...
...
static/js/guang/plus-star/detail.js
View file @
19cec07
...
...
@@ -95,6 +95,7 @@ likeHammer.on('tap', function(e) {
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
$this
.
toggleClass
(
'like'
);
tip
.
show
(
data
.
message
);
}
else
if
(
data
.
code
===
400
||
data
.
code
===
412
)
{
location
.
href
=
data
.
data
;
//未登录跳转登录页面
}
else
{
...
...
template/m.yohobuy.com/actions/index/home/index.phtml
View file @
19cec07
...
...
@@ -33,7 +33,7 @@
<p>浏览记录</p>
</a>
</div>
{
{#if
notice.open
}
}
<!--
{
{#if
notice.open
}
}
<div
class=
"notice"
data-time=
"{{notice.time}}"
>
{
{#notice.list
}
}
<a
class=
"notice-item item-{{@index}}"
href=
"{{url}}"
>
...
...
@@ -42,7 +42,7 @@
</a>
{
{/notice.list
}
}
</div>
{
{/if
}
}
{
{/if
}
}
-->
<div
class=
"my-order"
>
<a
class=
"order-title"
href=
"/home/orders"
>
我的订单
...
...
template/m.yohobuy.com/actions/passport/back/email-success.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"back-email-success-page passport-page yoho-page"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
...
...
@@ -8,4 +8,4 @@
<a
id=
"resend"
class=
"resend"
data-url=
{
{resendUrl
}
}>重新发送邮件</a>
</div>
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/passport/back/email.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"back-email-page passport-page yoho-page"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
...
...
@@ -8,4 +8,4 @@
<span
id=
"btn-sure"
class=
"btn btn-sure disable row"
>确定</span>
</div>
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/passport/back/mobile-code.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"back-code-page passport-page yoho-page"
>
{
{>
passport/code
}
}
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/passport/back/mobile.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"back-mobile-page passport-page yoho-page"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
...
...
@@ -10,4 +10,4 @@
<span
id=
"btn-next"
class=
"btn btn-next disable row"
>下一步</span>
</div>
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/passport/back/new-password.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"back-new-password-page passport-page yoho-page"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
...
...
@@ -17,4 +17,4 @@
<input
id=
"email-code"
type=
"hidden"
value=
{
{.
}
}>
{
{/
code
}
}
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/passport/bind/code.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"reg-code-page passport-page yoho-page"
>
<input
type=
"hidden"
id=
"isReg"
value=
"{{isReg}}"
>
<input
type=
"hidden"
id=
"openId"
value=
"{{openId}}"
>
...
...
@@ -6,4 +6,4 @@
<input
type=
"hidden"
id=
"nickname"
value=
"{{nickname}}"
>
{
{>
passport/code
}
}
</div>
{
{>
layout/footer
_passport
}
}
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/actions/passport/bind/index.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"bind-page passport-page yoho-page"
>
<input
type=
"hidden"
id=
"openId"
value=
"{{openId}}"
>
<input
type=
"hidden"
id=
"sourceType"
value=
"{{sourceType}}"
>
...
...
@@ -14,4 +14,4 @@
<p
class=
"bind-tip"
>绑定手机号码后,可选择
{
{platform
}
}和手机号登录此帐号</p>
</div>
</div>
{
{>
layout/footer
_passport
}
}
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/actions/passport/bind/password.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"bind-password-page passport-page yoho-page"
>
<input
type=
"hidden"
id=
"openId"
value=
"{{openId}}"
>
<input
type=
"hidden"
id=
"sourceType"
value=
"{{sourceType}}"
>
...
...
@@ -14,4 +14,4 @@
<input
id=
"area-code"
type=
"hidden"
value=
{
{areaCode
}
}>
<input
id=
"token"
type=
"hidden"
value=
{
{token
}
}>
</div>
{
{>
layout/footer
_passport
}
}
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/actions/passport/login/index.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"login-page passport-page yoho-page"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
...
...
@@ -41,4 +41,4 @@
</ul>
</div>
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/passport/login/international.phtml
View file @
19cec07
{
{>
layout/header
_passport
}
}
{
{>
layout/header
}
}
<div
class=
"login-international-page passport-page yoho-page"
>
{
{>
passport/header
}
}
<div
class=
"content"
>
...
...
@@ -13,4 +13,4 @@
<span
id=
"btn-login"
class=
"btn btn-login disble row"
>登录</span>
</div>
</div>
{
{>
layout/footer_passport
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/layout/download_app.phtml
View file @
19cec07
...
...
@@ -8,7 +8,7 @@
<i
class=
"close-icon iconfont"
>
623
;</i>
<div
class=
"circle-rightbottom"
></div>
</a>
<a
href=
"//a.app.qq.com/o/simple.jsp?pkgname=com.yoho"
id=
"float-layer-btn"
>
<a
href=
"
http:
//a.app.qq.com/o/simple.jsp?pkgname=com.yoho"
id=
"float-layer-btn"
>
立即下载
</a>
</div>
...
...
yohobuy/m.yohobuy.com/application/models/Home/Grade.php
View file @
19cec07
...
...
@@ -66,9 +66,15 @@ class GradeModel
//username 调用获取用户基本信息数据,获得nikename昵称;
$result
[
'vipGrade'
][
'name'
]
=
!
empty
(
$data
[
'userProfile'
])
?
$data
[
'userProfile'
][
'nickname'
]
:
''
;
//跳转url(会员特权详情)
$result
[
'vipGrade'
][
'allUrl'
]
=
Helpers
::
url
(
'/home/preferential'
,
null
);
$allUrl
=
Helpers
::
url
(
'/home/preferential'
,
null
);
$result
[
'vipGrade'
][
'allUrl'
]
=
strtr
(
$allUrl
,
array
(
'http://'
=>
'//'
));
//当前vip等级享受的特权
foreach
(
$data
[
'grade'
][
'enjoy_preferential'
]
as
&
$value
)
{
$value
[
'pic'
]
=
strtr
(
$value
[
'pic'
],
array
(
'http://'
=>
'//'
));
}
$result
[
'vipGrade'
][
'privilege'
]
=
$data
[
'grade'
][
'enjoy_preferential'
];
}
if
(
USE_CACHE
)
{
...
...
@@ -105,6 +111,9 @@ class GradeModel
//调取接口获得数据
$data
=
GradeData
::
getPreferentialData
(
$channel
,
$uid
);
if
(
isset
(
$data
[
'code'
])
&&
$data
[
'code'
]
==
200
)
{
foreach
(
$data
[
'data'
]
as
&
$value
)
{
$value
[
'pic'
]
=
strtr
(
$value
[
'pic'
],
array
(
'http://'
=>
'//'
));
}
$result
[
'vipGrade'
][
'privilege'
]
=
$data
[
'data'
];
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
19cec07
...
...
@@ -473,6 +473,8 @@ class DetailModel
// 测量方式
if
(
!
empty
(
$sizeInfo
[
'sizeImage'
]))
{
$sizeInfo
[
'sizeImage'
]
=
strtr
(
$sizeInfo
[
'sizeImage'
],
array
(
'http://'
=>
'//'
));
$result
[
'measurementMethod'
]
=
array
(
'title'
=>
'测量方式'
,
'enTitle'
=>
'MEASUREMENT METHOD'
,
...
...
@@ -501,7 +503,7 @@ class DetailModel
$result
[
'reference'
][
'detail'
][
'list'
][
6
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'试穿描述'
));
// 试穿描述
foreach
(
$sizeInfo
[
'modelBos'
]
as
$value
)
{
$result
[
'reference'
][
'detail'
][
'list'
][
0
][
'params'
][]
=
array
(
'param'
=>
$value
[
'avatar'
]
);
$result
[
'reference'
][
'detail'
][
'list'
][
0
][
'params'
][]
=
array
(
'param'
=>
strtr
(
$value
[
'avatar'
],
array
(
'http://'
=>
'//'
))
);
$result
[
'reference'
][
'detail'
][
'list'
][
1
][
'params'
][]
=
array
(
'param'
=>
$value
[
'modelName'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
2
][
'params'
][]
=
array
(
'param'
=>
$value
[
'height'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
3
][
'params'
][]
=
array
(
'param'
=>
$value
[
'weight'
]);
...
...
@@ -531,7 +533,7 @@ class DetailModel
);
foreach
(
$sizeInfo
[
'productMaterialList'
]
as
$value
)
{
$result
[
'materials'
][
'list'
][]
=
array
(
'img'
=>
$value
[
'imageUrl'
]
,
'img'
=>
strtr
(
$value
[
'imageUrl'
],
array
(
'http://'
=>
'//'
))
,
'desc'
=>
$value
[
'remark'
],
);
}
...
...
@@ -557,6 +559,7 @@ class DetailModel
'title'
=>
'商品详情'
,
'enTitle'
=>
'DETAILS'
,
'desc'
=>
strtr
(
$productIntro
,
array
(
'http://'
=>
'//'
,
'\r\n\t'
=>
''
,
'</p>'
=>
''
,
'<img src='
=>
"<img class=
\"
lazy
\"
src=
\"
data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==
\"
data-original="
,
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Index.php
View file @
19cec07
...
...
@@ -252,7 +252,7 @@ class IndexController extends AbstractAction
$data
=
IndexModel
::
getPageData
(
$gender
,
$sortId
,
$uid
,
$udid
,
$page
,
$tag
,
$authorId
,
$isApp
,
$showAuthor
,
$isTab
);
}
while
(
false
);
if
(
isset
(
$data
))
{
if
(
isset
(
$data
)
&&
!
empty
(
$data
)
)
{
$this
->
_view
->
display
(
'page'
,
$data
);
}
else
{
echo
' '
;
...
...
yohobuy/m.yohobuy.com/application/modules/Guang/controllers/Info.php
View file @
19cec07
...
...
@@ -55,7 +55,7 @@ class InfoController extends AbstractAction
// 作者信息数据
if
(
isset
(
$detail
[
'getAuthor'
][
'name'
]))
{
$data
[
'guang'
][
'author'
]
=
array
();
$data
[
'guang'
][
'author'
][
'avatar'
]
=
$detail
[
'getAuthor'
][
'avatar'
]
;
$data
[
'guang'
][
'author'
][
'avatar'
]
=
strtr
(
$detail
[
'getAuthor'
][
'avatar'
],
array
(
'http://'
=>
'//'
))
;
$data
[
'guang'
][
'author'
][
'name'
]
=
$detail
[
'getAuthor'
][
'name'
];
$data
[
'guang'
][
'author'
][
'intro'
]
=
$detail
[
'getAuthor'
][
'author_desc'
];
$data
[
'guang'
][
'author'
][
'url'
]
=
$isApp
?
$detail
[
'getAuthor'
][
'url'
]
:
Helpers
::
url
(
'/author/index'
,
array
(
'id'
=>
$detail
[
'getArticle'
][
'author_id'
]),
'guang'
);
...
...
@@ -158,6 +158,9 @@ class InfoController extends AbstractAction
// 相关品牌
if
(
!
empty
(
$detail
[
'getBrand'
]))
{
$data
[
'relatedBrand'
]
=
$detail
[
'getBrand'
];
foreach
(
$data
[
'relatedBrand'
]
as
&
$value
)
{
$value
[
'thumb'
]
=
strtr
(
$value
[
'thumb'
],
array
(
'http://'
=>
'//'
));
}
}
// 相关标签
...
...
Please
register
or
login
to post a comment