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
071d4dfea6e549097c3e9ca90bd29c8b08384b33
2 parents
e757dd25
98345de0
master
...
feature/balanceSwitch
feature/jitmodified
gray
hotfix/unionData
release/5.4.1
20160907
1230
1220
1025
0927
5.3.0
5.0
4.9.31
4.9.27
4.9.14
4.9.13
4.9.13.invoice
4.9.12
4.9.11
4.9.11.shop
4.9.10
4.9.02
4.9.1.5
4.9.1.4
4.9.1.1
4.9.1.0
4.9.01
4.9.1
4.8.7.2
4.8.7.1
4.8.7
4.8.6
4.8.4
4.8.3
4.8.2
4.8.1
4.7.8
4.7.5
4.7.2
4.6.5
4.6.4.1
4.6.4
4.6.3
4.6
wap4.5
before5.0.0
shop index
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
196 additions
and
865 deletions
library/LibModels/Web/Product/SearchData.php
library/Plugin/DataProcess/ShopProcess.php
static/js/product/shop.js
static/sass/product/_product-category.css
static/sass/product/_shop-index.css
static/sass/product/_shop-index.scss
static/sass/product/_shop-prodfile.css
template/m.yohobuy.com/actions/product/index/brand.phtml
template/m.yohobuy.com/actions/product/index/category.phtml
template/m.yohobuy.com/actions/product/index/intro.phtml
template/m.yohobuy.com/actions/product/index/shop.phtml
template/m.yohobuy.com/actions/shop/index/brand.phtml
template/m.yohobuy.com/actions/shop/index/category.phtml
template/m.yohobuy.com/actions/shop/index/intro.phtml
template/m.yohobuy.com/partials/product/shop-footer.phtml
yohobuy/m.yohobuy.com/application/models/Product/List.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/m.yohobuy.com/application/modules/Shop/controllers/Index.php
library/LibModels/Web/Product/SearchData.php
View file @
071d4df
...
...
@@ -118,7 +118,7 @@ class SearchData
// return 'http://101.200.31.165/yohosearch/brand/list.json';
// return 'http://182.92.99.119:8080/yohosearch/brand/list.json';
}
return
'http://1
01.200.31.165/yohosearch/search.json'
;
return
'http://1
92.168.102.216:8087/yohosearch/search.json'
;
//支持shop_id
//return 'http://101.200.31.165/yohosearch/search.json';
// return 'http://182.92.99.119:8080/yohosearch/search.json';
}
...
...
library/Plugin/DataProcess/ShopProcess.php
View file @
071d4df
...
...
@@ -37,7 +37,6 @@ class ShopProcess
*/
private
static
function
decorator
(
$data
)
{
// print_r($data); exit;
if
(
!
isset
(
$data
[
'code'
])
||
$data
[
'code'
]
!=
200
||
!
isset
(
$data
[
'data'
][
'list'
])
||
empty
(
$data
[
'data'
][
'list'
]))
{
return
;
}
...
...
@@ -60,6 +59,8 @@ class ShopProcess
self
::
$shopData
[
'storeName'
]
=
$data
[
'data'
][
'shop_name'
];
//用户是否收藏店铺
self
::
$shopData
[
'favorite'
]
=
$data
[
'data'
][
'is_favorite'
]
==
'Y'
?
true
:
false
;
//店铺简介页地址
self
::
$shopData
[
'shopIntroHref'
]
=
Helpers
::
url
(
''
,
''
,
$data
[
'data'
][
'shop_domain'
]);
}
/**
...
...
@@ -102,8 +103,9 @@ class ShopProcess
*/
private
static
function
brandBrowse
(
$data
)
{
// print_r($data);
foreach
(
$data
as
$val
)
{
self
::
$shopData
[
'brandList'
][
'list'
]
=
array
(
self
::
$shopData
[
'brandList'
][
'list'
]
[]
=
array
(
'url'
=>
Helpers
::
url
(
''
,
''
,
$val
[
'brandDomain'
]),
'img'
=>
Images
::
getImageUrl
(
$val
[
'brandIco'
],
640
,
400
),
'brandName'
=>
$val
[
'brandName'
]
...
...
@@ -113,6 +115,7 @@ class ShopProcess
//TODO
self
::
$shopData
[
'brandList'
][
'url'
]
=
Helpers
::
url
(
'brandList'
);
}
// print_r(self::$shopData['brandList']); exit;
}
/**
...
...
static/js/product/shop.js
View file @
071d4df
...
...
@@ -406,7 +406,6 @@ $.jqtab = function(nav, posNav, main) {
$
(
nav
+
' li, '
+
posNav
+
' li'
).
on
(
'touchstart'
,
function
()
{
var
index
=
$
(
this
).
index
(),
activeTab
=
$
(
this
).
attr
(
'tab'
);
console
.
log
(
activeTab
)
tabChange
(
$
(
nav
+
' li'
),
index
);
tabChange
(
$
(
posNav
+
' li'
),
index
);
...
...
@@ -501,10 +500,6 @@ $(function(){
});
},
1000
)
// console.log(lazyLoad)
// console.log($('#scroller').height())
document
.
addEventListener
(
'touchmove'
,
function
(
e
)
{
e
.
preventDefault
();
...
...
@@ -527,3 +522,14 @@ window.onload = function() {
scH
=
$
(
'#scroller'
).
outerHeight
();
};
//底部点击
function
fotterClick
(
group
)
{
$
(
group
+
' li'
).
on
(
'touchstart'
,
function
()
{
$
(
'.sub-group'
).
addClass
(
'hide'
);
if
(
$
(
this
).
find
(
'.sub-group'
).
length
>
0
){
$
(
this
).
find
(
'.sub-group'
).
removeClass
(
'hide'
);
}
});
};
fotterClick
(
'.shop-foot-wrapper'
);
...
...
static/sass/product/_product-category.css
View file @
071d4df
...
...
@@ -4,12 +4,11 @@
.allproduct
{
position
:
relative
;
padding
:
15px
0
;
height
:
89px
;
line-height
:
89px
;
background
:
#fff
;
border-top
:
15px
;
border-bottom
:
15px
;
padding-left
:
32px
;
border-top
:
1px
solid
#e6e6e6
;
margin-left
:
30px
;
}
.margin-under-allproduct
{
...
...
@@ -23,9 +22,9 @@
}
.arrow-icon
{
position
:
absolute
;
font-size
:
16px
;
top
:
15px
;
right
:
20px
;
font-size
:
30px
;
top
:
0px
;
right
:
33px
;
color
:
#e1e1e1
;
}
...
...
static/sass/product/_shop-index.css
View file @
071d4df
...
...
@@ -142,14 +142,12 @@
.multi-browse
{
margin-top
:
50px
;
@extend
.swiper-container
}
.brand-img
{
margin-left
:
30px
;
width
:
30%
;
height
:
55%
;
height
:
150px
;
overflow
:
hidden
;
padding-bottom
:
20px
;
float
:
left
;
...
...
@@ -159,6 +157,10 @@
color
:
#b1b1b1
;
padding-top
:
10px
;
}
img
{
height
:
70%
;
}
}
.spring
{
...
...
@@ -268,10 +270,6 @@
color
:
#b1b1b1
;
}
.cur
{
color
:
#000
;
}
.goods-container
{
position
:
relative
;
min-height
:
440px
;
...
...
@@ -304,25 +302,13 @@
}
}
.list-nav
{
.active
>
a
{
.active
{
.cur
{
color
:
#000
;
.spanTest{
width
:
auto
;
height
:
100%
;
display
:
inline-block
;
box-sizing
:
border-box
;
}
.iconfont
{
color
:
#999
;
&.cur
{
color
:
#000
;
}
}
}
}
}
.list-nav
.icon
.up
{
top
:
-6px
;
...
...
@@ -344,6 +330,7 @@
.search-area
{
@extend
.search-page;
margin-top
:
85px
;
}
.hide
{
...
...
@@ -400,10 +387,11 @@
.sub-group
{
position
:
absolute
;
background
:
#fff
;
border-right
:
1px
solid
#eaeaea
;
border-radius
:
5px
;
border
:
1px
solid
#eaeaea
;
border-radius
:
12px
;
bottom
:
104px
;
width
:
30%
;
width
:
40%
;
margin-left
:
5%
;
dl
{
width
:
80%
;
...
...
@@ -414,6 +402,9 @@
line-height
:
80px
;
text-align
:
center
;
border-top
:
1px
solid
#eaeaea
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
dd
:first-child
{
...
...
@@ -424,8 +415,13 @@
.sharp
{
position
:
absolute
;
width
:
100%
;
height
:
8px
;
background
:
url('product/sharp.png')
no-repeat
center
center
;
height
:
14px
;
background
:
resolve
(
'product/sharp.png'
)
no-repeat
center
center
;
}
.foot-list-3
.sub-group
{
width
:
29%
;
margin-left
:
2%
;
}
}
...
...
static/sass/product/_shop-index.scss
deleted
100644 → 0
View file @
e757dd2
.shop-index
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
overflow
:
hidden
;
.branner-top
{
width
:
100%
;
height
:
200rem
/
$pxConvertRem
;
position
:
relative
;
overflow
:
hidden
;
}
.logo
{
position
:
absolute
;
overflow
:
hidden
;
left
:
30rem
/
$pxConvertRem
;
bottom
:
30rem
/
$pxConvertRem
;
width
:
100rem
/
$pxConvertRem
;
height
:
100rem
/
$pxConvertRem
;
}
.store-name
{
color
:
#fff
;
font-size
:
28rem
/
$pxConvertRem
;
position
:
absolute
;
overflow
:
hidden
;
left
:
148rem
/
$pxConvertRem
;
bottom
:
20rem
/
$pxConvertRem
;
}
.collect
{
width
:
128rem
/
$pxConvertRem
;
height
:
50rem
/
$pxConvertRem
;
position
:
absolute
;
bottom
:
30rem
/
$pxConvertRem
;
right
:
30rem
/
$pxConvertRem
;
border-radius
:
10rem
/
$pxConvertRem
;
text-align
:
center
;
background
:
image-url
(
'product/collect.png'
)
no-repeat
;
background-size
:
contain
;
}
.nav
{
width
:
100%
;
height
:
88rem
/
$pxConvertRem
;
margin
:
0
;
padding
:
0
;
border
:
0
;
font
:
inherit
;
vertical-align
:
baseline
;
list-style
:
none
;
font-size
:
0
.7rem
;
background
:
#fff
;
overflow
:
hidden
;
border-sizing
:
border-box
;
border-bottom
:
2rem
/
$pxConvertRem
solid
#e1e1e1
;
li
{
color
:
#b1b1b1
;
display
:
block
;
height
:
28rem
/
$pxConvertRem
;
float
:
left
;
line-height
:
28rem
/
$pxConvertRem
;
width
:
24%
;
text-align
:
center
;
border-left
:
1rem
/
$pxConvertRem
solid
#e1e1e1
;
margin-top
:
30rem
/
$pxConvertRem
;
border-sizing
:
border-box
;
color
:
#b1b1b1
;
&
:first-child
{
border-left
:
none
;
}
a
{
color
:
#b1b1b1
;
}
}
.color
{
color
:
#000
;
}
}
.main
{
background
:
#f0f0f0
;
padding-bottom
:
1rem
;
overflow
:
hidden
;
}
.banner-area
{
@extend
.banner-top
;
.banner-swiper
ul
{
height
:
6
.5rem
;
}
.swiper-pagination
{
bottom
:
1
.5rem
;
}
}
.hide
{
display
:
hidden
;
}
.coupon
{
width
:
100%
;
padding
:
30rem
/
$pxConvertRem
0
;
overflow
:
hidden
;
img
{
width
:
245rem
/
$pxConvertRem
;
height
:
120rem
/
$pxConvertRem
;
vertical-align
:
top
;
margin-left
:
30rem
/
$pxConvertRem
;
float
:
left
;
}
}
.multi-brands
{
width
:
100%
;
height
:
270rem
/
$pxConvertRem
;
background
:
#fff
;
border
:
1px
solid
#e1e1e1
;
border-top
:
none
;
font-size
:
20px
;
text-align
:
center
;
padding-top
:
25rem
/
$pxConvertRem
;
margin-bottom
:
30rem
/
$pxConvertRem
;
overflow
:
hidden
;
h2
{
font-size
:
28rem
/
$pxConvertRem
;
}
}
.multi-browse
{
margin-top
:
50rem
/
$pxConvertRem
;
@extend
.swiper-container
}
.brand-img
{
margin-left
:
30rem
/
$pxConvertRem
;
width
:
30%
;
height
:
55%
;
overflow
:
hidden
;
padding-bottom
:
20rem
/
$pxConvertRem
;
float
:
left
;
p
{
font-size
:
25rem
/
$pxConvertRem
;
color
:
#b1b1b1
;
padding-top
:
10rem
/
$pxConvertRem
;
}
}
.spring
{
margin
:
0
;
overflow
:
hidden
;
li
{
width
:
50%
;
float
:
left
;
text-align
:
center
;
list-style
:
none
;
display
:
list-item
;
img
{
width
:
90%
;
border-radius
:
10rem
/
$pxConvertRem
;
vertical-align
:
top
;
}
}
}
.popularity-title
{
background
:
#fff
;
border-bottom
:
1px
solid
#e8e8e8
;
text-align
:
center
;
line-height
:
98rem
/
$pxConvertRem
;
font-size
:
0
.8rem
;
margin-top
:
1rem
;
position
:
relative
;
}
.more
{
position
:
absolute
;
right
:
.75rem
;
top
:
0
;
bottom
:
0
;
color
:
#b0b0b0
;
font-size
:
1
.25rem
;
font-family
:
"iconfont"
!
important
;
font-style
:
normal
;
text-decoration
:
none
;
}
.product-list
{
margin
:
0
;
padding
:
0
0
30rem
/
$pxConvertRem
30rem
/
$pxConvertRem
;
overflow
:
hidden
;
background
:
#fff
;
border-bottom
:
30rem
/
$pxConvertRem
solid
#f0f0f0
;
li
{
width
:
275rem
/
$pxConvertRem
;
height
:
368rem
/
$pxConvertRem
;
margin-top
:
50rem
/
$pxConvertRem
;
margin-right
:
30rem
/
$pxConvertRem
;
float
:
left
;
text-align
:
center
;
list-style
:
none
;
img
{
width
:
100%
;
vertical-align
:
top
;
}
}
}
.list-price
{
height
:
60rem
/
$pxConvertRem
;
background
:
#ABACAC
;
color
:
#FFFFFF
;
font-size
:
22rem
/
$pxConvertRem
;
margin-top
:
-60rem
/
$pxConvertRem
;
position
:
relative
;
opacity
:
0
.7
;
padding-left
:
15rem
/
$pxConvertRem
;
p
{
margin
:
0
;
line-height
:
32rem
/
$pxConvertRem
;
text-align
:
left
;
}
}
.red
{
color
:
red
;
}
.icon
{
position
:
relative
;
i
{
position
:
absolute
;
}
.up
{
top
:
-5rem
/
$pxConvertRem
;
left
:
8rem
/
$pxConvertRem
;
}
.down
{
top
:
8rem
/
$pxConvertRem
;
left
:
8rem
/
$pxConvertRem
;
}
}
.iconfont
{
color
:
#b1b1b1
;
}
.active
.cur
{
color
:
#000
;
}
.goods-container
{
position
:
relative
;
min-height
:
440rem
/
$pxConvertRem
;
padding-left
:
0
.375rem
;
padding-top
:
20rem
/
$pxConvertRem
;
border-bottom
:
1px
solid
#e0e0e0
;
}
.discount-area
{
@extend
.discount-page
;
.list-nav
li
{
display
:
block
;
height
:
28rem
/
$pxConvertRem
;
float
:
left
;
line-height
:
28rem
/
$pxConvertRem
;
width
:
24%
;
text-align
:
center
;
border-left
:
1px
solid
#e1e1e1
;
margin-top
:
30rem
/
$pxConvertRem
;
margin-bottom
:
30rem
/
$pxConvertRem
;
border-sizing
:
border-box
;
span
{
font-size
:
0
.7rem
;
}
&
:first-child
{
border-left
:
none
;
}
}
.list-nav
.icon
.up
{
top
:
-6rem
/
$pxConvertRem
;
}
.list-nav
.icon
.down
{
top
:
8rem
/
$pxConvertRem
;
}
.goods-container
{
padding-top
:
30rem
/
$pxConvertRem
;
padding-bottom
:
100rem
/
$pxConvertRem
;
}
.active
a
{
color
:
#b1b1b1
;
}
}
.search-area
{
@extend
.search-page
;
}
.hide
{
display
:
none
;
}
.nav-title
{
position
:
absolute
;
margin-left
:
200rem
/
$pxConvertRem
;
height
:
100%
;
font-size
:
36rem
/
$pxConvertRem
;
color
:
#fff
;
font-weight
:
bold
;
top
:
0
;
right
:
0
;
left
:
0
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-align
:
center
;
}
.shop-foot-wrapper
{
position
:
absolute
;
bottom
:
0
;
display
:
table
;
width
:
100%
;
height
:
2
.2rem
;
line-height
:
2
.2rem
;
font-size
:
0
.7rem
;
background
:
#fff
;
border-top
:
1px
solid
#eaeaea
;
ul
{
display
:
table-row
;
}
li
{
display
:
table-cell
;
text-align
:
center
;
.wall
{
width
:
0
;
height
:
0
.8rem
;
margin-top
:
0
.7rem
;
float
:
right
;
border-right
:
1px
solid
#eaeaea
;
display
:
inline-block
;
}
}
.sub-group
{
position
:
absolute
;
background
:
#fff
;
border-right
:
1px
solid
#eaeaea
;
border-radius
:
5px
;
bottom
:
2
.6rem
;
width
:
30%
;
dl
{
width
:
80%
;
margin
:
0
auto
;
}
dd
{
line-height
:
2rem
;
text-align
:
center
;
border-top
:
1px
solid
#eaeaea
;
}
dd
:first-child
{
border-top
:
0
;
}
}
.sharp
{
position
:
absolute
;
width
:
100%
;
height
:
8px
;
background
:
image-url
(
"/img/product/sharp.png"
)
no-repeat
center
center
;
}
}
.bytouch
{
background
:
#eee
;
}
}
\ No newline at end of file
static/sass/product/_shop-prodfile.css
View file @
071d4df
.shop-introduce
{
.shop-introduce
-page
{
.banner
{
margin
:
30px
auto
;
width
:
auto
;
...
...
@@ -9,18 +9,18 @@
.descripition
{
margin
:
40px
20px
0px
20px
;
font-size
:
16px
;
line-height
:
22px
;
padding
:
20px
0
;
font-size
:
22px
;
line-height
:
36px
;
padding
:
40px
20px
40px
20px
;
border-top
:
1px
solid
#e6e6e6
;
border-bottom
:
1px
solid
#e6e6e6
;
text-indent
:
2em
;
}
.sign-icon
{
font-size
:
20px
;
height
:
40px
;
line-height
:
40px
;
font-size
:
32px
;
height
:
80px
;
line-height
:
80px
;
text-align
:
center
;
font-weight
:
100
;
}
...
...
@@ -30,14 +30,14 @@
}
}
.brand
{
.brand
-shop-page
{
.brand-list{
margin-left
:
20px
;
font-size
:
18
px
;
font-size
:
36
px
;
border-bottom
:
1px
solid
#e6e6e6
;
text-align
:
left
;
height
:
44px
;
line-height
:
44px
;
height
:
70px
;
line-height
:
70px
;
vertical-align
:
middle
;
display
:
block
;
width
:
100%
;
...
...
template/m.yohobuy.com/actions/product/index/brand.phtml
View file @
071d4df
{
{>
layout/header
}
}
<div
class=
"brand"
>
<div
class=
"brand
-shop-page
"
>
{
{#
content
}
}
<a
class=
"brand-list"
href=
"{{url}}"
>
{
{brand_name
}
}
...
...
template/m.yohobuy.com/actions/product/index/category.phtml
View file @
071d4df
...
...
@@ -2,40 +2,41 @@
<div
class=
"product-category yoho-page"
>
<div
id=
"allproduct"
class=
"allproduct"
>
<div
class=
"allproduct"
>
<a
href=
{
{allproduct
}
}>
<p
class=
"allproductParagaraph"
>全部商品</p>
全部商品
<i
class=
"arrow-icon iconfont"
>
614
;</i>
</a>
</div>
<div
class=
"margin-under-allproduct"
>
</div>
<div
class=
"category-container clearfix"
>
<div
class=
"content"
>
{
{#
content
}
}
<ul
class=
"primary-level"
>
{
{#
class
}
}
<li
class=
"p-level-item"
>
{
{name
}
}
<div
class=
"primary-level-trilangle hide"
></div>
<!--
<img
class=
"primary-level-trilangle trilanglefont"
src=
"../static/img/product/arrow.jpg"
>
-->
</li>
{
{/
class
}
}
</ul>
<div
class=
"sub-level-container hide"
>
{
{#
category
}
}
<ul
class=
"sub-level"
>
{
{#
subcategory
}
}
<li>
<a
href=
{
{url
}
}>
{
{category_name
}
}
</a>
</li>
{
{/
subcategory
}
}
<ul
class=
"primary-level"
>
{
{#
class
}
}
<li
class=
"p-level-item"
>
{
{name
}
}
<div
class=
"primary-level-trilangle hide"
></div>
</li>
{
{/
class
}
}
</ul>
{
{/
category
}
}
</div>
{
{/
content
}
}
<div
class=
"sub-level-container hide"
>
{
{#
category
}
}
<ul
class=
"sub-level"
>
{
{#
subcategory
}
}
<li>
<a
href=
{
{url
}
}>
{
{category_name
}
}
</a>
</li>
{
{/
subcategory
}
}
</ul>
{
{/
category
}
}
</div>
{
{/
content
}
}
</div>
</div>
</div>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/product/index/intro.phtml
View file @
071d4df
{
{>
layout/header
}
}
<div
class=
"shop-introduce"
>
<div
class=
"shop-introduce
-page
"
>
<a
class=
"banner"
>
<img
src=
"{{content.shop_logo}}"
>
</a>
...
...
template/m.yohobuy.com/actions/product/index/shop.phtml
View file @
071d4df
...
...
@@ -30,29 +30,29 @@
<li
tab=
"new-arrival"
>上新</li>
<li
tab=
"popularity"
>人气</li>
<li>
<a
href=
"
#
"
target=
"_blank"
>全部商品</a>
<a
href=
"
{{allGoods}}
"
target=
"_blank"
>全部商品</a>
</li>
</ul>
<div
id=
"home-page"
class=
"main"
>
<div
id=
"nav-main"
>
{
{#if
brandList
}
}
{
{#if
brandList
}
}
<div
class=
"multi-brands"
>
<p>品牌一览</p>
<div
class=
"multi-browse"
>
<ul
class=
"swiper-wrapper"
>
{
{#each
list
}
}
<li
class=
"swiper-slide brand-img"
>
<a
href=
"{{url}}"
>
<img
src=
"{{img}}"
>
</a>
<p>
{
{brandName
}
}</p>
</li>
{
{/each
}
}
{
{#each
brandList.list
}
}
<li
class=
"swiper-slide brand-img"
>
<a
href=
"{{url}}"
>
<img
src=
"{{img}}"
>
</a>
<p>
{
{brandName
}
}</p>
</li>
{
{/each
}
}
</ul>
</div>
</div>
{
{/
unless
}
}
{
{/
if
}
}
<div
class=
"banner-area"
>
{
{#
bannerTop
}
}
...
...
template/m.yohobuy.com/actions/shop/index/brand.phtml
deleted
100644 → 0
View file @
e757dd2
{
{>
layout/header
}
}
{
{#
brands
}
}
<a
class=
"brand-list"
href=
"{{url}}"
>
{
{brandname
}
}
</a>
{
{/
brands
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
template/m.yohobuy.com/actions/shop/index/category.phtml
deleted
100644 → 0
View file @
e757dd2
{
{>
layout/header
}
}
<div
class=
"product-category yoho-page"
>
<div
id=
"allproduct"
class=
"allproduct"
>
<a
href=
{
{allproduct
}
}>
<p
class=
"allproductParagaraph"
>全部商品</p>
<i
class=
"arrow-icon iconfont"
>
614
;</i>
</a>
</div>
<div
class=
"margin-under-allproduct"
>
</div>
<div
class=
"category-container clearfix"
>
<div
class=
"content"
>
{
{#
content
}
}
<ul
class=
"primary-level"
>
{
{#
class
}
}
<li
class=
"p-level-item"
>
{
{name
}
}
<div
class=
"primary-level-trilangle trilanglefont hide"
>
64
a;</div>
</li>
{
{/
class
}
}
</ul>
<div
class=
"sub-level-container hide"
>
{
{#
category
}
}
<ul
class=
"sub-level"
>
{
{#
subcategory
}
}
<li>
<a
href=
{
{url
}
}>
{
{category_name
}
}
</a>
</li>
{
{/
subcategory
}
}
</ul>
{
{/
category
}
}
</div>
{
{/
content
}
}
</div>
</div>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
template/m.yohobuy.com/actions/shop/index/intro.phtml
deleted
100644 → 0
View file @
e757dd2
{
{>
layout/header
}
}
<div
class
='shop_introduation'>
<a
class=
"banner"
>
<img
src=
"{{content.shop_logo}}"
>
</a>
<div
class=
"descripition"
>
{
{content.shop_intro
}
}
</div>
<p
class=
"fo"
>
<span
class=
"iconfont"
>
649
;</span>
100
%品牌授权正品
</p>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
template/m.yohobuy.com/partials/product/shop-footer.phtml
View file @
071d4df
<div class="shop-foot-wrapper">
<ul>
<ul
{{#if brandList}} class="foot-list-3"{{/if}}
>
<li>
商品分类
{{#if shopCategory.url}}
<a href="{{shopCategory.url}}">商品分类</a>
{{^}}
商品分类
<div class="sub-group hide">
<dl>
{{# shopCategory.list}}
<dd><a href="{{url}}">{{name}}</a></dd>
{{/ shopCategory.list}}
</dl>
<div class="sharp"></div>
</div>
{{/if}}
<div class="wall"></div>
<div class="sub-group hide">
<dl>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
</dl>
<div class="sharp"></div>
</div>
</li>
{{#if brandList}}
<li>
品牌一览
{{#if brandList.url}}
<a href="{{shopCategory.url}}">品牌一览</a>
{{^}}
品牌一览
<div class="sub-group hide">
<dl>
{{# brandList.list}}
<dd><a href="{{url}}">{{brandName}}</a></dd>
{{/ brandList.list}}
</dl>
<div class="sharp"></div>
</div>
{{/if}}
<div class="wall"></div>
<div class="sub-group hide">
<dl>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
<dd><a href="/">套装</a></dd>
</dl>
<div class="sharp"></div>
</div>
</li>
{{/if}}
<li>
<a href="
/
">店铺简介</a>
<a href="
{{shopIntroHref}}
">店铺简介</a>
</li>
</ul>
</div>
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/models/Product/List.php
View file @
071d4df
...
...
@@ -15,7 +15,7 @@ use Plugin\Images;
/**
* 商品列表相关的模板数据模型
*
*
* @name ListModel
* @package models/Product
* @copyright yoho.inc
...
...
@@ -27,7 +27,7 @@ class ListModel
/**
* 获取品类商品列表数据
*
*
* @param array $condition 条件
* @return array | false
*
...
...
@@ -60,8 +60,7 @@ class ListModel
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存30分钟
}
...
...
@@ -72,7 +71,7 @@ class ListModel
/**
* 获取品牌信息
*
*
* @param int $id 唯一的ID
* @param int $uid 用户ID
* @param string $title 网站标题
...
...
@@ -103,7 +102,7 @@ class ListModel
/**
* 获取品牌商品列表数据
*
*
* @param array $condition 条件参数
* @param string $title 网站标题
* @return array
...
...
@@ -143,8 +142,7 @@ class ListModel
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存30分钟
}
...
...
@@ -155,7 +153,7 @@ class ListModel
/**
* 根据品牌ID获取品牌LOGO
*
*
* @param int $id 品牌ID
* @param string $title 品牌标题
* @return array | false
...
...
@@ -189,8 +187,7 @@ class ListModel
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
);
// 缓存1小时
}
...
...
@@ -201,7 +198,7 @@ class ListModel
/**
* 根据品牌ID获取品牌LOGO
*
*
* @param int $id 品牌ID
* @param string $title 品牌标题
* @return array | false
...
...
@@ -236,8 +233,7 @@ class ListModel
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
);
// 缓存1小时
}
...
...
@@ -248,7 +244,7 @@ class ListModel
/**
* 获取所有的品牌名称列表
*
*
* @return array(
* 品牌ID => 品牌域名(domain)
* )
...
...
@@ -287,8 +283,7 @@ class ListModel
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
);
}
...
...
@@ -299,7 +294,7 @@ class ListModel
/**
* 获取所有的品牌名称列表
*
*
* @return array(
* 品牌域名(domain) => 品牌名称(name)
* )
...
...
@@ -338,8 +333,7 @@ class ListModel
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
);
}
...
...
@@ -354,7 +348,7 @@ class ListModel
* @return array 返回的处理好的数据
* @author chengyao.guo
*/
public
static
function
categoryData
(
$data
,
$shop_id
)
public
static
function
categoryData
(
$data
,
$shop_id
)
{
$result
=
array
();
$result
[
'class'
]
=
array
();
...
...
@@ -372,9 +366,18 @@ class ListModel
}
array_push
(
$result
[
'category'
],
array
(
'subcategory'
=>
$item
[
'sub'
]));
}
$result
[
'allproduct'
]
=
Helpers
::
url
(
'/search/list'
,
array
(
'shop'
=>
$shop_id
,
));
return
$result
;
}
public
static
function
introData
(
&
$data
)
{
$data
[
'shop_logo'
]
=
Images
::
getImageUrl
(
$data
[
'shop_logo'
],
640
,
480
);
return
$data
;
}
/**
* 店铺所有品牌信息处理
* @author chengyao.guo
...
...
@@ -382,7 +385,7 @@ class ListModel
* @param $shop_id
* @return mixed
*/
public
static
function
brandData
(
$data
,
$shop_id
)
public
static
function
brandData
(
$data
,
$shop_id
)
{
// 处理图片链接
foreach
(
$data
as
&
$item
)
{
...
...
@@ -395,6 +398,7 @@ class ListModel
}
return
$data
;
}
/**
* 新店铺首页
* @param int $shopId 店铺id
...
...
@@ -430,7 +434,7 @@ class ListModel
public
static
function
brandShop
(
$brandId
)
{
$brandShop
=
ListData
::
getShopByBrandId
(
$brandId
);
print_r
(
$brandShop
);
exit
;
//
print_r($brandShop); exit;
}
}
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
071d4df
...
...
@@ -432,7 +432,7 @@ class IndexController extends AbstractAction
$result
=
array
();
$resource
=
ShopData
::
getShopIntro
(
$requestData
[
'shop_id'
]);
if
(
$resource
[
'code'
]
===
200
)
{
$result
=
$resource
[
'data'
]
;
$result
=
ListModel
::
introData
(
$resource
[
'data'
])
;
}
if
(
Mobile
::
isMobile
()){
$this
->
setTitle
(
'店铺简介'
);
...
...
@@ -453,13 +453,12 @@ class IndexController extends AbstractAction
{
$title
=
''
;
$domain
=
'vans'
;
$domain
=
'SIP'
;
//TODO
$brandLogo
=
ListModel
::
getBrandLogoByDomain
(
$domain
,
$title
);
$brandId
=
$brandLogo
[
'id'
];
$shop
=
ListModel
::
brandShop
(
$brandId
);
$shopId
=
0
;
$shopId
=
6
8
2
;
$shopId
=
6
7
2
;
$uid
=
$this
->
getUid
(
true
);
$data
=
ListModel
::
shopData
(
$shopId
,
$uid
);
$this
->
setTitle
(
$title
);
...
...
@@ -497,45 +496,48 @@ class IndexController extends AbstractAction
'branerImg'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026e96d1b403d28407650c7228bb4ca405.jpg?imageView2/2/w/640/h/200'
,
'logoImg'
=>
''
,
'storeName'
=>
'Vans专营店'
,
'allGoods'
=>
''
,
'goodList'
=>
'http://www.baidu.com'
,
'brands'
=>
false
,
'multiList'
=>
array
(
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re344565'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re344565'
'brandList'
=>
array
(
'list'
=>
array
(
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re344565'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re34456556900'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re344565'
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re344565'
)
),
array
(
'url'
=>
''
,
'img'
=>
'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403'
,
'brandName'
=>
'123re344565'
)
),
'url'
=>
''
),
'bannerTop'
=>
array
(
'list'
=>
array
(
array
(
...
...
yohobuy/m.yohobuy.com/application/modules/Shop/controllers/Index.php
deleted
100644 → 0
View file @
e757dd2
<?php
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/4/21
* Time: 11:11
*/
use
Action\AbstractAction
;
use
LibModels\Wap\Shop\ShopData
;
use
Plugin\Helpers
;
class
IndexController
extends
AbstractAction
{
/**
* 店铺品牌首页
*
* @return mixed
*/
public
function
brandAction
()
{
$result
=
array
();
// 假数据
$result
=
$this
->
getCategoryContent
();
$result2
=
IntroData
::
getShopIntro
(
356
);
return
$this
->
_view
->
display
(
'category'
,
array
(
'content'
=>
$result
,
));
}
/**
* 店铺品牌品类页,需要判断单品店还是多品店
*
* @return mixed
*/
public
function
categoryAction
()
{
$requestData
=
filter_input_array
(
INPUT_GET
,
array
(
'shop_id'
=>
FILTER_DEFAULT
,
));
if
(
empty
(
$requestData
[
'shop_id'
]))
{
$this
->
go
(
SITE_MAIN
);
}
$result
=
array
();
$resource
=
array
();
$resource
[
'category'
]
=
ShopData
::
getShopCategory
(
$requestData
[
'shop_id'
],
Helpers
::
getChannelByCookie
(),
Helpers
::
getGenderByCookie
());
$resource
[
'brands'
]
=
ShopData
::
getShopBrands
(
$requestData
[
'shop_id'
]);
if
(
$resource
[
'category'
][
'code'
]
===
200
)
{
$class
=
array
();
$category
=
array
();
foreach
(
$resource
[
'category'
][
'data'
]
as
&
$item
)
{
array_push
(
$class
,
array
(
'name'
=>
$item
[
'category_name'
]));
foreach
(
$item
[
'sub'
]
as
&
$item2
)
{
$item2
[
'url'
]
=
Helpers
::
url
(
''
);
// tar mark 还不知道链接是啥样的
}
array_push
(
$category
,
array
(
'subcategory'
=>
$item
[
'sub'
]));
}
$result
[
'class'
]
=
$class
;
$result
[
'category'
]
=
$category
;
}
if
(
$resource
[
'brands'
][
'code'
]
===
200
)
{
$result
[
'brands'
]
=
$resource
[
'brands'
][
'data'
];
}
// 处理图片链接
foreach
(
$result
[
'brands'
]
as
&
$item
)
{
$item
[
'brand_ico'
]
=
\Plugin\Images
::
getImageUrl
(
$item
[
'brand_ico'
],
0
,
0
);
}
// $result = $this->getCategoryContent();
ShopData
::
debugOut
(
$result
,
false
);
return
$this
->
_view
->
display
(
'category'
,
array
(
'productCategoryPage'
=>
true
,
'content'
=>
$result
,
));
}
/**
* 店铺简介页面
*
* @return mixed
*/
public
function
introAction
()
{
$requestData
=
filter_input_array
(
INPUT_GET
,
array
(
'shop_id'
=>
FILTER_DEFAULT
,
));
if
(
empty
(
$requestData
[
'shop_id'
]))
{
$this
->
go
(
SITE_MAIN
);
}
$result
=
array
();
$resource
=
ShopData
::
getShopIntro
(
$requestData
[
'shop_id'
]);
if
(
$resource
[
'code'
]
===
200
)
{
$result
=
$resource
[
'data'
];
}
return
$this
->
_view
->
display
(
'intro'
,
array
(
'content'
=>
$result
,
));
}
/**
* 店铺分类品类页数据模拟
*
* @return array
*/
public
function
getCategoryContent
()
{
return
array
(
// 数据模拟
'class'
=>
array
(
array
(
'name'
=>
'上衣'
,
),
array
(
'name'
=>
'裤装'
,
),
array
(
'name'
=>
'鞋靴'
,
),
array
(
'name'
=>
'包类'
,
)
),
'category'
=>
array
(
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'上衣衣1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'上衣衣2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'上衣衣3'
),
)
),
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'裤装1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'裤装2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'裤装3'
),
)
),
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'鞋靴1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'鞋靴2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'鞋靴3'
)
)
),
array
(
'subcategory'
=>
array
(
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'包类1'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'包类2'
),
array
(
'url'
=>
'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg'
,
'name'
=>
'包类3'
)
)
)
)
);
}
/**
* 店铺简介数据模拟
*
* @return array
*/
public
function
getIntroContent
()
{
return
array
(
// 数据模拟
);
}
}
\ No newline at end of file
Please
register
or
login
to post a comment