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
2ae1e8b52fd584c6efcbd33f993dab0101dad658
2 parents
b96fce3d
3c2ff210
Merge branch 'master' of git.yoho.cn:fe/YOHOBUYWAP
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
72 deletions
compile/m.yohobuy.com/4.9.26/test.md
library/Plugin/DataProcess/ShopProcess.php
static/js/product/shop.js
static/package.json
yohobuy/m.yohobuy.com/configs/application.developer.ini
yohobuy/m.yohobuy.com/configs/application.preview.ini
yohobuy/m.yohobuy.com/configs/application.production.ini
yohobuy/m.yohobuy.com/configs/application.testing.ini
compile/m.yohobuy.com/4.9.26/test.md
0 → 100644
View file @
2ae1e8b
library/Plugin/DataProcess/ShopProcess.php
View file @
2ae1e8b
...
...
@@ -311,73 +311,22 @@ class ShopProcess
*/
private
static
function
hotProducts_APP
(
$data
)
{
$condition
[
'productSkn'
]
=
''
;
$productSkn
=
array
();
foreach
(
$data
as
$val
)
{
$
condition
[
'productSkn'
]
.=
$val
[
'productSkn'
]
.
','
;
$
productSkn
[]
=
$val
[
'productSkn'
]
;
}
/* tar modified 160826 根据资源位接口返回的 skn 去查数据,查到后取商品数据,查不到取资源位接口数据 */
$hotProducts
=
SearchData
::
searchBySkn
(
$condition
);
if
(
isset
(
$hotProducts
[
'code'
])
&&
$hotProducts
[
'code'
]
===
200
&&
isset
(
$hotProducts
[
'data'
][
'product_list'
]))
{
foreach
(
$hotProducts
[
'data'
][
'product_list'
]
as
$val
)
{
/* 取第一个设为默认商品 goods */
$defaultGoods
=
$val
[
'goods_list'
][
0
];
/* 判断是否设置了默认 goods,如果设置了就重新赋值 */
foreach
(
$val
[
'goods_list'
]
as
$key
=>
$goods
)
{
if
(
$goods
[
'is_default'
]
===
'Y'
)
{
$defaultGoods
=
$goods
;
}
}
$goodsCover
=
$val
[
'goods_list'
][
0
][
'images_url'
];
if
(
self
::
$channel
==
1
)
{
$goodsCover
=
empty
(
$defaultGoods
[
'cover_1'
])
?
$defaultGoods
[
'images_url'
]
:
$defaultGoods
[
'cover_1'
];
}
if
(
self
::
$channel
==
2
)
{
$goodsCover
=
empty
(
$defaultGoods
[
'cover_2'
])
?
$defaultGoods
[
'images_url'
]
:
$defaultGoods
[
'cover_2'
];
}
$product
=
DetailData
::
productBatch
(
$productSkn
);
if
(
$product
[
'code'
]
===
200
&&
isset
(
$product
[
'data'
][
'product_list'
]))
{
/* 如果还是没取到,取 product 默认图片 */
if
(
empty
(
$goodsCover
))
{
$goodsCover
=
$val
[
'default_images'
];
}
$goods
=
array
(
'url'
=>
Helpers
::
getUrlBySkc
(
$val
[
'product_id'
],
$val
[
'goods_list'
][
0
][
'goods_id'
],
$val
[
'cn_alphabet'
]),
'img'
=>
Helpers
::
getImageUrl
(
$goodsCover
,
235
,
314
),
'productName'
=>
$val
[
'product_name'
],
'salesPrice'
=>
'¥'
.
$val
[
'sales_price'
],
'presentPrice'
=>
'¥'
.
$val
[
'sales_price'
]
);
if
(
!
empty
(
self
::
$appVersion
))
{
$goods
[
'url'
]
.=
'?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":'
.
$val
[
'product_skn'
]
.
'}}'
;
}
foreach
(
$product
[
'data'
][
'product_list'
]
as
$key
=>
$value
)
{
$goods
=
Helpers
::
formatProduct
(
$value
,
false
,
false
,
false
,
235
,
314
,
self
::
$appVersion
);
//店铺人气商品不须要其它标签、即将售罄
$goods
[
'tags'
]
=
array
();
$goods
[
'is_soon_sold_out'
]
=
false
;
$goods
[
'tags'
][
'is_hot'
]
=
true
;
self
::
$shopData
[
'hotList'
][]
=
$goods
;
}
}
else
{
$productSkn
=
array
();
foreach
(
$data
as
$val
)
{
$productSkn
[]
=
$val
[
'productSkn'
];
}
$product
=
DetailData
::
productBatch
(
$productSkn
);
if
(
$product
[
'code'
]
===
200
&&
isset
(
$product
[
'data'
][
'product_list'
]))
{
foreach
(
$product
[
'data'
][
'product_list'
]
as
$key
=>
$value
)
{
$goods
=
Helpers
::
formatProduct
(
$value
,
false
,
false
,
false
,
235
,
314
,
self
::
$appVersion
);
//店铺人气商品不须要其它标签、即将售罄
$goods
[
'tags'
]
=
array
();
$goods
[
'is_soon_sold_out'
]
=
false
;
$goods
[
'tags'
][
'is_hot'
]
=
true
;
self
::
$shopData
[
'hotList'
][]
=
$goods
;
}
}
}
}
...
...
static/js/product/shop.js
View file @
2ae1e8b
...
...
@@ -218,7 +218,7 @@ function hotData(callback) {
req
.
callBack
=
function
(
data
)
{
$
(
'#popularity'
).
append
(
data
);
navInfo
.
hot
.
page
++
;
//
myScroll.refresh();
myScroll
.
refresh
();
lazyLoad
(
$
(
'#popularity .lazy'
));
scH
=
$
(
'#scroller'
).
outerHeight
();
searching
=
false
;
...
...
@@ -264,7 +264,7 @@ function tabChange(dom, index) {
$nav1
.
removeClass
(
'fixed-top absolute'
);
$nav2
.
removeClass
(
'fixed-top absolute'
);
}
//
myScroll && myScroll.refresh();
myScroll
&&
myScroll
.
refresh
();
scH
=
$
(
'#scroller'
).
outerHeight
();
if
(
!
$nav1
.
hasClass
(
'hide'
))
{
myScroll
&&
myScroll
.
scrollTo
(
0
,
0
-
imgH
);
...
...
@@ -442,9 +442,9 @@ document.addEventListener('touchmove', function(e) {
//window ready 后重新refresh iscroll
$
(
window
).
ready
(
function
()
{
myScroll
&&
myScroll
.
refresh
();
imgH
=
$
(
'#nav-top'
).
outerHeight
(
true
);
nav1H
=
$
(
'#nav'
).
outerHeight
(
true
);
main1H
=
$
(
'#nav-main'
).
height
(
true
);
imgH
=
$
(
'#nav-top'
).
outerHeight
();
nav1H
=
$
(
'#nav'
).
outerHeight
();
main1H
=
$
(
'#nav-main'
).
height
();
main1oH
=
$
(
'#nav-main'
).
outerHeight
(
true
);
nav2H
=
$
(
'#list-nav'
).
outerHeight
(
true
);
main2oH
=
$
(
'#goods-container'
).
outerHeight
(
true
);
...
...
@@ -913,7 +913,7 @@ function postCollect(info) {
}
setTimeout
(
function
()
{
//
myScroll.refresh();
myScroll
.
refresh
();
scH
=
$
(
'#scroller'
).
outerHeight
();
},
500
);
searching
=
false
;
...
...
static/package.json
View file @
2ae1e8b
{
"name"
:
"yohobuy"
,
"version"
:
"4.9.2
5
"
,
"version"
:
"4.9.2
6
"
,
"description"
:
"yohobuy statics"
,
"keywords"
:
[],
"homepage"
:
""
,
...
...
yohobuy/m.yohobuy.com/configs/application.developer.ini
View file @
2ae1e8b
...
...
@@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"4.9.2
5
"
application.version
=
"4.9.2
6
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货 | 潮流购物逛不停"
...
...
yohobuy/m.yohobuy.com/configs/application.preview.ini
View file @
2ae1e8b
...
...
@@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"4.9.2
5
"
application.version
=
"4.9.2
6
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货 | 潮流购物逛不停"
...
...
yohobuy/m.yohobuy.com/configs/application.production.ini
View file @
2ae1e8b
...
...
@@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"4.9.2
5
"
application.version
=
"4.9.2
6
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货 | 潮流购物逛不停"
...
...
yohobuy/m.yohobuy.com/configs/application.testing.ini
View file @
2ae1e8b
...
...
@@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path
=
ROOT_PATH "/assets"
; 应用的版本号
application.version
=
"4.9.2
5
"
application.version
=
"4.9.2
6
"
; 网站SEO信息
application.seo.title
=
"Yoho!Buy有货 | 潮流购物逛不停"
...
...
Please
register
or
login
to post a comment