Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
6d7f135fa099aba764761d8ef32532747f458ba6
2 parents
c54d37c6
94393aa2
update
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
242 additions
and
24 deletions
library/Api/Yohobuy.php
static/js/home/home.js
static/js/me/address.js
static/sass/home/_home-header.scss
static/sass/product/_detail.scss
template/m.yohobuy.com/actions/index/home/index.phtml
template/m.yohobuy.com/actions/product/detail/index.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
library/Api/Yohobuy.php
View file @
6d7f135
...
...
@@ -18,18 +18,18 @@ class Yohobuy
{
// /* 正式环境 */
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://api2.open.yohobuy.com/';
// const API_URL2 = 'http://api.open.yohobuy.com/';
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 测试环境 */
const
API_URL
=
'http://test2.open.yohobuy.com/'
;
const
SERVICE_URL
=
'http://test.service.api.yohobuy.com/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
const
API_URL_MYCENTER
=
'http://192.168.102.213:8080/api-gateway-web/'
;
// 我的个人中心接口URL
const
API_URL_SHOPINGCART
=
'http://192.168.102.213:8080/api-gateway-web/'
;
// 我的购物车接口URL
const
API_URL_PRODUCTDETAIL
=
'http://172.16.6.145:8080/'
;
// 商品详情页
const
API_URL
=
'http://test2.open.yohobuy.com/'
;
const
SERVICE_URL
=
'http://test.service.api.yohobuy.com/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
const
API_URL_MYCENTER
=
'http://192.168.102.213:8080/api-gateway-web/'
;
// 我的个人中心接口URL
const
API_URL_SHOPINGCART
=
'http://192.168.102.213:8080/api-gateway-web/'
;
// 我的购物车接口URL
const
API_URL_PRODUCTDETAIL
=
'http://172.16.6.145:8080/'
;
// 商品详情页
/**
* 私钥列表
...
...
static/js/home/home.js
View file @
6d7f135
...
...
@@ -214,7 +214,7 @@ function tsAnimate() {
setTimeout
(
tsAnimate
,
3000
);
$
(
'.home-header .
search-btn
'
).
on
(
'touchstart'
,
function
()
{
$
(
'.home-header .
iconfont
'
).
on
(
'touchstart'
,
function
()
{
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
...
...
static/js/me/address.js
View file @
6d7f135
...
...
@@ -83,6 +83,28 @@ $addressForm.on('submit', function() {
if
(
isSubmiting
)
{
return
false
;
}
// 简单的表单校验
if
(
!
$
(
this
).
find
(
'[name="consignee"]'
).
val
())
{
tip
.
show
(
'收件人不能为空'
);
$
(
this
).
find
(
'[name="consignee"]'
).
focus
();
return
false
;
}
if
(
!
$
(
this
).
find
(
'[name="mobile"]'
).
val
())
{
tip
.
show
(
'手机号不能为空'
);
$
(
this
).
find
(
'[name="mobile"]'
).
focus
();
return
false
;
}
if
(
!
$
(
this
).
find
(
'[name="area_code"]'
).
val
()
||
!
$
(
this
).
find
(
'[name="area"]'
).
val
())
{
tip
.
show
(
'省市区不能为空'
);
return
false
;
}
if
(
!
$
(
this
).
find
(
'[name="address"]'
).
val
())
{
tip
.
show
(
'地址不能为空'
);
$
(
this
).
find
(
'[name="address"]'
).
focus
();
return
false
;
}
isSubmiting
=
true
;
$
.
ajax
({
method
:
'POST'
,
...
...
static/sass/home/_home-header.scss
View file @
6d7f135
...
...
@@ -75,10 +75,10 @@
font-size
:
40rem
/
$pxConvertRem
;
line-height
:
90rem
/
$pxConvertRem
;
}
}
&
.highlight
{
background
:
rgba
(
200
,
200
,
200
,.
4
);
}
.iconfont.highlight
{
background
:
rgba
(
200
,
200
,
200
,.
4
);
}
}
...
...
static/sass/product/_detail.scss
View file @
6d7f135
...
...
@@ -30,6 +30,7 @@ $basicBtnC:#eb0313;
left
:
pxToRem
(
30px
);
right
:
auto
;
}
<<<<<<<
HEAD
.good-detail-page
{
overflow
:
hidden
;
...
...
@@ -108,10 +109,168 @@ $basicBtnC:#eb0313;
bottom
:
pxToRem
(
40px
);
.swiper-pagination-bullet
{
margin-right
:
2px
;
=======
.feedback-list
{
padding-top
:
pxToRem
(
30px
);
background-color
:
#f0f0f0
;
.nodata
{
height
:
pxToRem
(
88px
);
background-color
:
#fff
;
padding
:
0
pxToRem
(
28px
);
span
,
a
{
line-height
:
pxToRem
(
88px
);
font-size
:
pxToRem
(
28px
);
}
span
{
color
:
$mainFontC
;
}
a
{
float
:
right
;
color
:
$subFontC
;
span
.iconfont
{
color
:inherit
;
}
}
}
.nav-tab
{
width
:
100%
;
}
.nav-tab
{
height
:
pxToRem
(
60px
);
padding
:
pxToRem
(
10px
)
0
;
background-color
:
#fff
;
border-top
:
1px
solid
$borderC
;
border-bottom
:
1px
solid
$borderC
;
}
.comment-nav
,
.consult-nav
{
box-sizing
:
border-box
;
float
:
left
;
width
:
50%
;
height
:
pxToRem
(
60px
);
line-height
:
pxToRem
(
60px
);
font-size
:
pxToRem
(
28px
);
text-align
:
center
;
color
:
#ccc
;
&
.focus
{
color
:
#000
;
}
}
.comment-nav
{
border-right
:
1px
solid
#ccc
;
}
.content
{
.content-main
{
background-color
:
#fff
;
border-bottom
:
1px
solid
$borderC
;
&
.comment-content-main
{
.user-name
{
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
62px
);
color
:
$mainFontC
;
padding-left
:
pxToRem
(
28px
);
padding-right
:
pxToRem
(
18px
);
}
.goods-spec
,
.comment-time
{
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
62px
);
}
.detail-content
{
// font-size: pxToRem(28px);
// line-height: pxToRem(36px);
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
62px
);
color
:
$mainFontC
;
padding-left
:
pxToRem
(
28px
);
padding-right
:
pxToRem
(
18px
);
}
.goods-spec
,
.comment-time
{
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
62px
);
}
.detail-content
{
font-size
:
pxToRem
(
28px
);
line-height
:
pxToRem
(
36px
);
}
.goods-spec
,
.detail-content
{
color
:
$mainFontC
;
}
.detail-content
,
.comment-time
{
padding-left
:
pxToRem
(
28px
);
}
.detail-content
{
padding-right
:
pxToRem
(
28px
);
padding-left
:
pxToRem
(
28px
);
}
.detail-content
{
padding-right
:
pxToRem
(
28px
);
}
.comment-time
{
color
:
#c1c1c1
;
}
}
&
.consult-content-main
{
padding-right
:
pxToRem
(
28px
);
padding-left
:
pxToRem
(
28px
);
padding-top
:
pxToRem
(
20px
);
padding-bottom
:
pxToRem
(
20px
);
.question
{
font-size
:
pxToRem
(
24px
);
color
:
$mainFontC
;
span
{
display
:
block
;
float
:
left
;
font-size
:
inherit
;
padding-right
:
pxToRem
(
15px
);
}
p
{
overflow
:
hidden
;
}
}
.time
{
font-size
:
pxToRem
(
22px
);
color
:
$subFontC
;
}
.answer
{
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
36px
);
color
:
$subFontC
;
margin-top
:
pxToRem
(
14px
);
span
{
display
:
block
;
float
:
left
;
font-size
:
inherit
;
color
:
$mainFontC
;
padding-right
:
pxToRem
(
15px
);
>>>>>>>
94393aa29a7f2704e60f85d3aa6ac8b379aa612d
}
.swiper-pagination-bullet-active
{
background-color
:
#000
;
}
<<<<<<<
HEAD
=======
}
}
&
.no-item
{
font-size
:
pxToRem
(
28px
);
text-align
:
center
;
height
:
pxToRem
(
200px
);
line-height
:
pxToRem
(
200px
);
color
:
$subFontC
;
span
{
font-size
:
inherit
;
}
}
}
>>>>>>>
94393aa29a7f2704e60f85d3aa6ac8b379aa612d
}
...
...
template/m.yohobuy.com/actions/index/home/index.phtml
View file @
6d7f135
...
...
@@ -21,15 +21,15 @@
</div>
<div
class=
"my-link clearfix {{^isLogin}}no-login{{/isLogin}}"
>
<a
class=
"link-item"
href=
"/home/favorite"
>
{
{#i
f
product_favorite_total
}
}
{
{product_favorite_total
}
}
{
{/if
}
}
{
{#i
sLogin
}
}
{
{product_favorite_total
}
}
{
{/isLogin
}
}
<p>收藏的商品</p>
</a>
<a
class=
"link-item"
href=
"/home/favorite?tab=brand"
>
{
{#i
f
brand_favorite_total
}
}
{
{brand_favorite_total
}
}
{
{/if
}
}
{
{#i
sLogin
}
}
{
{brand_favorite_total
}
}
{
{/isLogin
}
}
<p>收藏的品牌</p>
</a>
<a
class=
"link-item"
href=
"/home/"
>
{
{#i
f
product_browse
}
}
{
{product_browse
}
}
{
{/if
}
}
{
{#i
sLogin
}
}
{
{product_browse
}
}
{
{/isLogin
}
}
<p>浏览记录</p>
</a>
</div>
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
6d7f135
...
...
@@ -47,14 +47,23 @@
</div>
{
{/goodsDiscount
}
}
<div
class=
"feedback-list
-page
"
>
<div
class=
"feedback-list "
>
{
{#
feedbacks
}
}
{
{#if
nodata
}
}
<div
class=
"nodata"
>
<span>暂无商品评价和咨询</span>
<a
class=
"go-consult"
>我要咨询<i
class=
"iconfont"
><span
class=
"iconfont"
>
604
;</span></a>
</div>
{
{else
}
}
<ul
id=
"nav-tab"
class=
"nav-tab clearfix"
>
<li
class=
"comment-nav focus"
>
{
{commentName
}
}(
{
{commentsNum
}
})</li>
<li
class=
"consult-nav"
>
{
{consultName
}
}(
{
{consultsNum
}
})</li>
</ul>
<div
id=
"feedback-content"
>
<div
class=
"comment-content content "
>
{
{#if
commentsNum
}
}
<div
class=
"comment-content-main content-main"
>
{
{#
comments
}
}
<span
class=
"user-name"
>
...
...
@@ -71,11 +80,19 @@
</span>
{
{/
comments
}
}
</div>
{
{else
}
}
<div
class=
"comment-content-main content-main no-item"
>
<span
class=
"iconfont"
>
63
c;</span>暂无评论
</div>
{
{/if
}
}
<div
class=
"comment-content-footer"
>
<a
href=
"{{moreComments}}"
>查看更多
<span
class=
"iconfont"
>
604
;</span></a>
</div>
</div>
<div
class=
"consult-content content hide "
>
{
{#if
consultsNum
}
}
<div
class=
"consult-content-main content-main"
>
{
{#
consults
}
}
<div
class=
"question"
>
...
...
@@ -94,10 +111,24 @@
{
{/
consults
}
}
</div>
<div
class=
"consult-content-footer"
>
<a
href=
"{{moreComments}}"
>查看更多
<span
class=
"iconfont"
>
604
;</span></a>
<a
href=
"{{moreConsults}}"
>
查看更多
<span
class=
"iconfont"
>
604
;</span></a>
</div>
{
{else
}
}
<div
class=
"comment-content-main content-main no-item"
>
<span
class=
"iconfont"
>
63
c;</span>暂无咨询
</div>
<div
class=
"consult-content-footer"
>
<a
href=
"{{gotoConsults}}"
>
我要咨询
<span
class=
"iconfont"
>
604
;</span></a>
</div>
{
{/if
}
}
</div>
</div>
{
{/if
}
}
{
{/
feedbacks
}
}
</div>
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
6d7f135
...
...
@@ -48,11 +48,11 @@ class HomeController extends AbstractAction
'myIndexPage'
=>
true
,
'pageFooter'
=>
true
);
echo
$this
->
getRequest
()
->
getActionName
();
//
echo $this->getRequest()->getActionName();
$uid
=
$this
->
getUid
();
if
(
$uid
)
{
$data
[
'isLogin'
]
=
true
;
$uid
=
8826435
;
$uid
=
8826435
;
$data
+=
\Index\UserModel
::
getUserProfileData
(
$uid
);
$data
+=
\Index\UserModel
::
getInfoNumData
(
$uid
);
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
6d7f135
...
...
@@ -13,6 +13,10 @@ class DetailController extends AbstractAction
*/
public
function
indexAction
()
{
$commentsNum
=
0
;
$consultsNum
=
0
;
$nodate
=
0
;
$data
=
array
(
'goodsDetailPage'
=>
true
,
'pageHeader'
=>
array
(
...
...
@@ -66,12 +70,14 @@ SHOE BQT KEN BLOCK',
),
'goodsDiscount'
=>
'【summer final sale】满¥499立享6.8折'
,
'feedbacks'
=>
array
(
'commentsNum'
=>
2
,
'consultsNum'
=>
10
,
'commentsNum'
=>
0
,
'consultsNum'
=>
0
,
'nodata'
=>
0
,
'commentName'
=>
'商品评价'
,
'consultName'
=>
'购买咨询'
,
'moreComments'
=>
'http://www.baidu.com'
,
'moreConsults'
=>
'http://www.baidu.com'
,
'gotoConsults'
=>
'http://www.baidu.com'
,
'comments'
=>
array
(
array
(
'userName'
=>
'Lynnic'
,
...
...
@@ -241,7 +247,7 @@ SHOE BQT KEN BLOCK',
public
function
commentsAction
(){
$data
=
array
(
'goodsCommentsPage'
=>
true
,
'goodsCommentsPage'
=>
true
,
'pageHeader'
=>
array
(
'navBack'
=>
'sss '
,
// 'navHome' => 'sss ',
...
...
Please
register
or
login
to post a comment