Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
hf
9 years ago
Commit
af3f56b93efeb160186b45f57db9ca967b64c677
2 parents
a2769059
48b5ebf8
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
100 additions
and
36 deletions
library/LibModels/Wap/Product/SearchData.php
static/js/category/brand.js
static/js/common.js
static/js/index/search.js
static/js/me/pay.js
static/js/product/detail/comments-consults.js
static/js/product/detail/detail.js
static/sass/me/_order.scss
static/sass/me/_pay.scss
static/sass/me/_vip-grade.scss
static/sass/product/_comments-consults.scss
static/sass/product/_detail.scss
yohobuy/m.yohobuy.com/application/models/Category/Class.php
yohobuy/m.yohobuy.com/application/models/Guang/Index.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
library/LibModels/Wap/Product/SearchData.php
View file @
af3f56b
...
...
@@ -144,6 +144,7 @@ class SearchData
$param
=
array
();
$param
[
'status'
]
=
1
;
// 是否上架,1表示在架,2表示不在
$param
[
'sales'
]
=
'Y'
;
// 只搜索销售的产品
$param
[
'stocknumber'
]
=
1
;
// 过滤掉已售罄的商品
// $param['needFilter'] = 1; // 是否需要返回筛选条件
if
(
!
isset
(
$condition
[
'order'
]))
{
$param
[
'order'
]
=
$orderMaps
[
's_t_desc'
];
...
...
static/js/category/brand.js
View file @
af3f56b
...
...
@@ -129,10 +129,10 @@ function searchResult() {
brandHtml
.
push
(
'<p><a href="'
+
brand
.
url
+
'">'
+
brand
.
name
);
if
(
brand
.
isNew
)
{
brandHtml
.
push
(
'<i class="icon-
hot">HOT
</i>'
);
brandHtml
.
push
(
'<i class="icon-
new">NEW
</i>'
);
}
if
(
brand
.
isHot
)
{
brandHtml
.
push
(
'<i class="icon-
new">NEW
</i>'
);
brandHtml
.
push
(
'<i class="icon-
hot">HOT
</i>'
);
}
brandHtml
.
push
(
'</a></p>'
);
});
...
...
static/js/common.js
View file @
af3f56b
...
...
@@ -95,11 +95,15 @@ function getShoppingKey() {
//根据页面内容重新设置通用底部的显示
function
rePosFooter
()
{
var
winH
;
if
(
$footer
.
length
===
0
)
{
return
;
}
if
(
$
(
'body'
).
height
()
<=
$
(
window
).
height
()
-
parseInt
(
$footer
.
css
(
'height'
),
0
))
{
winH
=
Math
.
min
(
$
(
window
).
height
(),
window
.
screen
.
availHeight
);
if
(
$
(
'body'
).
height
()
<=
winH
-
parseInt
(
$footer
.
css
(
'height'
),
0
))
{
$footer
.
addClass
(
'bottom'
);
}
else
{
$footer
.
removeClass
(
'bottom'
);
...
...
static/js/index/search.js
View file @
af3f56b
...
...
@@ -31,6 +31,8 @@ chHammer.on('tap', function() {
localStorage
.
removeItem
(
'historys'
);
$history
.
html
(
''
);
window
.
rePosFooter
();
});
$input
.
on
(
'input'
,
function
()
{
...
...
@@ -78,6 +80,8 @@ $('#search').on('touchend', function() {
$history
.
html
(
html
);
$clearHistory
.
removeClass
(
'hide'
);
window
.
rePosFooter
();
}
}
}());
...
...
static/js/me/pay.js
View file @
af3f56b
...
...
@@ -103,7 +103,7 @@ function hideWeChatPay() {
var
$payApps
=
$
(
'.app'
);
$payApps
.
each
(
function
(
idx
,
app
)
{
if
(
$
(
app
).
attr
(
'id'
)
===
'weixin'
)
{
if
(
$
(
app
).
parent
().
attr
(
'id'
)
===
'weixin'
)
{
$
(
app
).
parent
().
css
(
'display'
,
'none'
);
return
false
;
}
...
...
static/js/product/detail/comments-consults.js
View file @
af3f56b
...
...
@@ -16,7 +16,9 @@ var consultFooterEle = document.getElementById('consult-content-footer'),
navtabHammer
=
navtabEle
&&
new
Hammer
(
navtabEle
),
gotoConsultEle
=
document
.
getElementById
(
'goto-consult'
),
gotoConsultHammer
=
gotoConsultEle
&&
new
Hammer
(
gotoConsultEle
);
gotoConsultHammer
=
gotoConsultEle
&&
new
Hammer
(
gotoConsultEle
),
$gotoConsult
=
$
(
'#goto-consult'
);
...
...
@@ -77,4 +79,22 @@ if (gotoConsultHammer) {
gotoConsultHammer
.
on
(
'tap'
,
function
()
{
location
.
href
=
$
(
gotoConsultEle
).
find
(
'a'
).
attr
(
'href'
);
});
}
\ No newline at end of file
}
function
fixConsultBar
()
{
if
(
$
(
window
).
scrollTop
()
>
$
(
'#yoho-header'
).
outerHeight
())
{
$gotoConsult
.
css
(
'position'
,
'fixed'
);
$gotoConsult
.
css
(
'top'
,
'0'
);
}
else
{
$gotoConsult
.
css
(
'position'
,
'static'
);
}
}
//滚动时顶部固定 我要咨询
function
scrollHandler
()
{
fixConsultBar
();
}
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
scrollHandler
);
});
...
...
static/js/product/detail/detail.js
View file @
af3f56b
...
...
@@ -15,7 +15,10 @@ var goodsSwiper,
var
goodsDiscountEl
=
document
.
getElementById
(
'goodsDiscount'
),
goodsDiscountHammer
=
goodsDiscountEl
&&
new
Hammer
(
goodsDiscountEl
);
var
$cart
=
$
(
'.cart-bar'
);
var
$cart
=
$
(
'.cart-bar'
),
$goodsSubtitle
=
$
(
'.goodsSubtitle'
),
divH
,
$goodsSubtitleSpan
;
require
(
'./desc'
);
require
(
'./comments-consults'
);
...
...
@@ -82,4 +85,12 @@ $.ajax({
}
});
//限制goodsSubtitle为两行
if
(
$goodsSubtitle
[
0
])
{
divH
=
$goodsSubtitle
.
height
();
$goodsSubtitleSpan
=
$goodsSubtitle
.
find
(
'span'
);
while
(
$goodsSubtitleSpan
.
outerHeight
()
>
divH
)
{
$goodsSubtitleSpan
.
text
(
$goodsSubtitleSpan
.
text
().
replace
(
/
(\s)
*
([
a-zA-Z0-9
]
+|
\W)(\.\.\.)?
$/
,
'...'
));
}
}
require
(
'./like'
);
...
...
static/sass/me/_order.scss
View file @
af3f56b
...
...
@@ -84,7 +84,7 @@
display
:
block
;
color
:
#b0b0b0
;
font-size
:
24rem
/
$pxConvertRem
;
margin
:
30rem
/
$pxConvertRem
0
11
0rem
/
$pxConvertRem
;
margin
:
30rem
/
$pxConvertRem
0
8
0rem
/
$pxConvertRem
;
}
.walk-way
{
...
...
@@ -185,6 +185,12 @@
.name
{
font-size
:
28rem
/
$pxConvertRem
;
max-width
:
70%
;
text-overflow
:
-
o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.row
:nth-child
(
2
)
{
...
...
static/sass/me/_pay.scss
View file @
af3f56b
...
...
@@ -36,7 +36,7 @@
>
div
{
width
:
60rem
/
$pxConvertRem
;
height
:
60rem
/
$pxConvertRem
;
background-image
:
url(http://localhost:8000/img/layout/pay-icon.png
)
;
background-image
:
image-url
(
"/img/layout/pay-icon.png"
);
background-size
:
90%
;
background-position-y
:
8rem
/
$pxConvertRem
;
background-position-x
:
center
;
...
...
static/sass/me/_vip-grade.scss
View file @
af3f56b
...
...
@@ -20,10 +20,10 @@
display
:
block
;
}
span
{
float
:
left
;
overflow
:
hidden
;
}
.user-name
{
float
:
left
;
max-width
:
240rem
/
$pxConvertRem
;
text-overflow
:ellipsis
;
white-space
:nowrap
;
...
...
@@ -32,6 +32,7 @@
}
.vip-icon
{
float
:
left
;
width
:
pxToRem
(
72px
);
height
:
pxToRem
(
32px
);
line-height
:
36rem
/
$pxConvertRem
;
...
...
static/sass/product/_comments-consults.scss
View file @
af3f56b
...
...
@@ -41,6 +41,8 @@
.goods-consults-page
{
background-color
:
#f0f0f0
;
.goto-consult
{
width
:
100%
;
box-sizing
:border-box
;
padding
:
0
pxToRem
(
28px
);
height
:
pxToRem
(
120px
);
background-color
:
#ffffff
;
...
...
static/sass/product/_detail.scss
View file @
af3f56b
...
...
@@ -211,14 +211,19 @@ $basicBtnC:#eb0313;
background-color
:
#515150
;
}
.goodsSubtitle
{
min-height
:
pxToRem
(
87
px
);
height
:
pxToRem
(
88
px
);
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
36px
);
color
:
$subFontC
;
padding-left
:
pxToRem
(
28px
);
padding-right
:
pxToRem
(
28px
);
padding-top
:
pxToRem
(
14px
);
border-bottom
:
1px
solid
$borderC
;
background-color
:
#f4f4f4
;
span
{
display
:
block
;
line-height
:
pxToRem
(
36px
);
margin
:
0
;
}
}
.price-date
{
// width: 100%;
...
...
@@ -253,8 +258,7 @@ $basicBtnC:#eb0313;
line-height
:
pxToRem
(
88px
);
}
}
.goodsName
,
.goodsSubtitle
{
.goodsName
{
// width: 100%;
display
:
table
;
span
{
...
...
yohobuy/m.yohobuy.com/application/models/Category/Class.php
View file @
af3f56b
...
...
@@ -43,6 +43,7 @@ class ClassModel
break
;
}
$genderArr
=
array
(
'boy'
=>
'1,3'
,
'girl'
=>
'2,3'
,
'kids'
=>
'1,2,3'
,
'lifestyle'
=>
'1,2,3'
);
$oneClass
=
array
();
$item
=
array
();
foreach
(
$data
[
'data'
]
as
$k
=>
$v
)
{
...
...
@@ -59,7 +60,8 @@ class ClassModel
'id'
=>
$item
[
'id'
],
'url'
=>
Helpers
::
url
(
'/'
,
array
(
'sort'
=>
$item
[
'id'
],
'sort_name'
=>
$item
[
'name'
]),
'list'
)
'sort_name'
=>
$item
[
'name'
],
'gender'
=>
$genderArr
[
$k
]),
'list'
)
);
$subitem
=
array
();
...
...
@@ -69,7 +71,8 @@ class ClassModel
$subitem
[
'id'
]
=
$value
[
'relation_parameter'
][
'sort'
];
$subitem
[
'url'
]
=
Helpers
::
url
(
'/'
,
array
(
'sort'
=>
$value
[
'relation_parameter'
][
'sort'
],
'sort_name'
=>
$value
[
'category_name'
]
'sort_name'
=>
$value
[
'category_name'
],
'gender'
=>
$genderArr
[
$k
]
),
'list'
);
$item
[
'sub'
][]
=
$subitem
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Guang/Index.php
View file @
af3f56b
...
...
@@ -179,6 +179,9 @@ class IndexModel
}
}
// 分页需要参数
$data
[
'guang'
][
'gender'
]
=
$gender
;
// 显示底部
$data
[
'pageFooter'
]
=
true
;
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
af3f56b
...
...
@@ -102,7 +102,7 @@ class DetailModel
if
(
isset
(
$baseInfo
[
'promotionBoList'
]))
{
$build
=
array
();
foreach
(
$baseInfo
[
'promotionBoList'
]
as
$value
)
{
$build
[
'text'
]
=
$value
[
'promotionTitle'
];
$build
[
'text'
]
=
'【'
.
$value
[
'promotionType'
]
.
'】'
.
$value
[
'promotionTitle'
];
$result
[
'goodsDiscount'
][
'list'
][]
=
$build
;
}
}
...
...
@@ -165,26 +165,31 @@ class DetailModel
foreach
(
$baseInfo
[
'goodsList'
]
as
$value
)
{
$colorId
=
intval
(
$value
[
'colorId'
]);
// 商品按颜色进行分类分组
foreach
(
$value
[
'goodsImagesList'
]
as
$goods
)
{
$goodsList
[
$goods
[
'goodsId'
]]
=
$colorId
;
$goodsGroup
[
$colorId
][]
=
array
(
'goodsId'
=>
$goods
[
'goodsId'
],
'img'
=>
$goods
[
'imageUrl'
],
);
$colorGroup
[
$colorId
]
=
array
(
'colorId'
=>
$colorId
,
'colorName'
=>
$value
[
'colorName'
],
'colorImage'
=>
Helpers
::
getImageUrl
(
$value
[
'colorImage'
],
60
,
60
),
);
}
if
(
isset
(
$value
[
'goodsImagesList'
]))
{
foreach
(
$value
[
'goodsImagesList'
]
as
$goods
)
{
$goodsList
[
$goods
[
'goodsId'
]]
=
$colorId
;
$goodsGroup
[
$colorId
][]
=
array
(
'goodsId'
=>
$goods
[
'goodsId'
],
'img'
=>
$goods
[
'imageUrl'
],
);
$colorGroup
[
$colorId
]
=
array
(
'colorId'
=>
$colorId
,
'colorName'
=>
$value
[
'colorName'
],
'colorImage'
=>
Helpers
::
getImageUrl
(
$value
[
'colorImage'
],
60
,
60
),
);
}
}
// 商品的尺码列表
foreach
(
$value
[
'goodsSizeBoList'
]
as
$size
)
{
$sizeGroup
[
$colorId
]
=
array
(
'sizeName'
=>
$size
[
'sizeName'
],
'sizeSku'
=>
$size
[
'goodsSizeSkuId'
],
'sizeStorage'
=>
$size
[
'goodsSizeStorageNum'
],
);
}
if
(
isset
(
$value
[
'goodsSizeBoList'
]))
{
foreach
(
$value
[
'goodsSizeBoList'
]
as
$size
)
{
$sizeGroup
[
$colorId
]
=
array
(
'sizeName'
=>
$size
[
'sizeName'
],
'sizeSku'
=>
$size
[
'goodsSizeSkuId'
],
'sizeStorage'
=>
$size
[
'goodsSizeStorageNum'
],
);
}
}
}
// 商品图
...
...
Please
register
or
login
to post a comment