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
Rock Zhang
9 years ago
Commit
016d6b0c0c0f84ebdc80843e7f34cfb89b94d02c
2 parents
8a22257a
b6b0f7da
Merge branch 'develop' into test
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
17 deletions
static/js/passport/login/international.js
static/js/passport/login/login.js
static/js/passport/register/password.js
static/js/product/detail/detail.js
static/js/product/newsale/hot-rank.js
static/sass/product/_detail.scss
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
static/js/passport/login/international.js
View file @
016d6b0
...
...
@@ -83,12 +83,20 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'登录成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
});
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
location
.
href
=
res
.
href
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
...
...
static/js/passport/login/login.js
View file @
016d6b0
...
...
@@ -86,12 +86,21 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'登录成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
});
//1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
location
.
href
=
res
.
href
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
...
...
static/js/passport/register/password.js
View file @
016d6b0
...
...
@@ -46,12 +46,20 @@ $btnSure.on('touchstart', function() {
token
:
$
(
'#token'
).
val
()
},
success
:
function
(
data
)
{
var
res
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'注册成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
});
//1000ms后跳转页面
setTimeout
(
function
()
{
location
.
href
=
data
.
data
;
location
.
href
=
res
.
href
;
},
1000
);
}
else
{
showErrTip
(
data
.
message
);
...
...
static/js/product/detail/detail.js
View file @
016d6b0
...
...
@@ -38,7 +38,7 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
}
//goods-discount下拉按钮点击事件
$
(
'.goodsDiscount
.dropdown
'
).
on
(
'touchend'
,
function
(
e
)
{
$
(
'.goodsDiscount'
).
on
(
'touchend'
,
function
(
e
)
{
if
(
$discountFolder
.
is
(
':hidden'
))
{
$discountArrow
.
removeClass
(
'icon-down'
).
addClass
(
'icon-up'
).
html
(
''
);
$discountFolder
.
slideDown
();
...
...
static/js/product/newsale/hot-rank.js
View file @
016d6b0
...
...
@@ -12,8 +12,46 @@ var page = 1,
notab
=
0
,
sort
=
''
,
id
=
''
,
hotrankNav
,
noResult
=
'<p class="no-result">未找到相关搜索结果</p>'
;
// var renderRank = {
// errMsg: '<p class="no-result">未找到相关搜索结果</p>',
// navSelector: '.goods-nav',
// rankSelector: '#hotRank',
// navHTML: null,
// data: null,
// inited: 0,
// setData: function(data) {
// this.data = data;
// },
// showDataEmptyMsg: function() {
// $(this.rankSelector).append(this.errMsg);
// },
// isDataEmpty: function() {
// if (this.data.indexOf('>') === -1) {
// return true;
// } else {
// return false;
// }
// },
// appendData: function() {
// if (!this.inited) {
// this.inited = 1;
// }
// $(this.rankSelector).append(this.data);
// },
// render: function(data) {
// this.setData(data);
// if (!this.isDataEmpty()) {
// this.appendData();
// } else {
// this.showDataEmptyMsg();
// }
// }
// };
function
hotrank
(
page
,
sort
,
tabId
,
notab
)
{
loading
.
showLoadingMask
();
$
.
ajax
({
...
...
@@ -26,15 +64,47 @@ function hotrank(page, sort, tabId, notab) {
notab
:
notab
},
success
:
function
(
data
)
{
console
.
log
(
data
);
if
(
page
===
1
)
{
$
(
'.rank-main'
).
remove
();
}
if
(
data
===
' '
&&
$
(
'.rank-main ul li'
).
length
<
1
)
{
$
(
'#hotRank'
).
html
(
noResult
);
// if (page === 1) {
// $('.no-result').remove();
// $('.rank-main').remove();
// }
// if (notab === 1) {
// if (data === ' ' && $('.rank-main').length < 1) {
// var hotrankNav = $('.goods-nav').prop("outerHTML");
// $('#hotRank').html(hotrankNav + noResult);
// } else {
// $('#hotRank').append(data);
// }
// } else {
// if (data === ' ') {
// $('#hotRank').html(noResult);
// } else {
// $('#hotRank').append(data);
// }
// }
if
(
data
===
' '
)
{
if
(
$
(
'.rank-main'
).
length
<
1
&&
$
(
'.goods-nav'
).
length
<
1
)
{
$
(
'#hotRank'
).
html
(
noResult
);
}
else
{
if
(
page
===
1
)
{
hotrankNav
=
$
(
'.goods-nav'
).
prop
(
'outerHTML'
);
$
(
'#hotRank'
).
html
(
hotrankNav
+
noResult
);
}
}
}
else
{
$
(
'.no-result'
).
remove
();
$
(
'.rank-main'
).
remove
();
$
(
'#hotRank'
).
append
(
data
);
}
// renderRank.render(data);
lazyLoad
(
$
(
'img.lazy'
));
$
(
'.rank-main ul li:gt(2)'
).
find
(
'.item-content i'
).
removeClass
(
'top'
);
winH
=
$
(
window
).
height
();
...
...
@@ -83,7 +153,11 @@ hotnav.on('tap', function(e) {
id
=
target
.
getAttribute
(
'data-id'
)
?
target
.
getAttribute
(
'data-id'
)
:
''
;
sort
=
target
.
getAttribute
(
'data-sort'
)
?
target
.
getAttribute
(
'data-sort'
)
:
''
;
page
=
1
;
// notab = renderRank.inited;
notab
=
1
;
hotrank
(
page
,
sort
,
id
,
notab
);
}
});
...
...
static/sass/product/_detail.scss
View file @
016d6b0
...
...
@@ -31,6 +31,8 @@ $basicBtnC:#eb0313;
margin-bottom
:
pxToRem
(
20px
);
font-size
:
pxToRem
(
24px
);
line-height
:
pxToRem
(
36px
);
display
:
flex
;
flex-wrap
:
wrap
;
&
.table
{
width
:
100%
;
.column
{
...
...
@@ -42,6 +44,8 @@ $basicBtnC:#eb0313;
font-size
:
pxToRem
(
24px
);
background-color
:
$tableCellC
;
float
:
left
;
display
:
flex
;
align-items
:
center
;
}
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
016d6b0
...
...
@@ -602,9 +602,8 @@ class HomeController extends AbstractAction
//显示网站导航头部信息
$this
->
setNavHeader
(
'会员等级'
);
$gender
=
Helpers
::
getGenderByCookie
();
$channel
=
Helpers
::
getChannelByCookie
();
$data
=
GradeModel
::
getGrade
(
$
gender
,
$
channel
,
$this
->
_uid
);
$data
=
GradeModel
::
getGrade
(
$channel
,
$this
->
_uid
);
$data
[
'pageFooter'
]
=
true
;
$this
->
_view
->
display
(
'vip-grade'
,
$data
);
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
016d6b0
...
...
@@ -237,7 +237,7 @@ class UserModel
$product
=
array
();
foreach
(
$val
[
'new_product'
]
as
$one
)
{
$product
=
array
();
$product
[
'link'
]
=
isset
(
$val
[
'goods
Id'
])
?
Helpers
::
url
(
'/product/pro_'
.
$val
[
'product_id'
]
.
'_'
.
$val
[
'goodsI
d'
]
.
'/'
.
$val
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'link'
]
=
isset
(
$val
[
'goods
List'
][
0
])
?
Helpers
::
url
(
'/product/pro_'
.
$val
[
'product_id'
]
.
'_'
.
$val
[
'goodsList'
][
0
][
'i
d'
]
.
'/'
.
$val
[
'cnAlphabet'
]
.
'.html'
)
:
''
;
$product
[
'imgUrl'
]
=
(
isset
(
$one
[
'default_images'
])
&&
!
empty
(
$one
[
'default_images'
]))
?
Images
::
getImageUrl
(
$one
[
'default_images'
],
235
,
314
)
:
''
;
$product
[
'price'
]
=
!
empty
(
$one
[
'market_price'
])
?
'¥'
.
$one
[
'market_price'
]
:
0
;
$product
[
'discount'
]
=
!
empty
(
$one
[
'sales_price'
])
?
'¥'
.
$one
[
'sales_price'
]
:
0
;
...
...
yohobuy/m.yohobuy.com/application/models/Product/Newsale.php
View file @
016d6b0
...
...
@@ -23,16 +23,16 @@ class NewsaleModel
/* 男生频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_BOYS
=
'3cf2c1be5217fbab6009ce83959e1e12'
;
const
CODE_TOP_SALE_BOYS
=
'
153180b9a88c0b565848850c523bb637
'
;
const
CODE_TOP_SALE_BOYS
=
'
e9c9be32d72e2906d404a72ee24cb523
'
;
/* 女生频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_GIRLS
=
'1cf7f9f10e2a2670e73d05c568793ad9'
;
const
CODE_TOP_SALE_GIRLS
=
'
0b2d133419a0f7c381306fd3522365e1
'
;
const
CODE_TOP_SALE_GIRLS
=
'
785c0e6aab746949073c4ffb9d5106ac
'
;
/* 潮童频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_KIDS
=
'57457adececa6c748b29c90cad0ae940'
;
const
CODE_TOP_SALE_KIDS
=
'
de23648d28ee1e8a3f087a9dbac506f8
'
;
const
CODE_TOP_SALE_KIDS
=
'
ad1bb67a6007819c86f737d74172fd2e
'
;
/* 创意生活频道取新品到着及折扣专区数据的位置码 */
const
CODE_TOP_NEW_LIFESTYLE
=
'04953a61cbf1db426a681e55d496d2fe'
;
const
CODE_TOP_SALE_LIFESTYLE
=
'
01269e498ff5b07756e0733ec0e88c75
'
;
const
CODE_TOP_SALE_LIFESTYLE
=
'
8132c7db3adbeb7b0d0002de9691c753
'
;
/**
* 获取新品到着的焦点图资源数据
...
...
Please
register
or
login
to post a comment