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
hf
9 years ago
Commit
28a40f5c0328d8fb7e6ea120d899e48cb3dcbf19
2 parents
a2af35a0
5036538e
Merge branch 'develop' into test
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
136 additions
and
75 deletions
docs/data-structure.md
library/Action/AbstractAction.php
library/LibModels/Wap/Passport/LoginData.php
library/Plugin/DataProcess/ListProcess.php
library/Plugin/Helpers.php
static/js/me/pay.js
static/js/plugin/loading.js
static/js/product/detail/detail.js
static/sass/_loading.scss
static/sass/product/_comments-consults.scss
static/sass/product/_detail.scss
static/sass/product/_product-description.scss
template/m.yohobuy.com/actions/product/detail/consults.phtml
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/models/Product/List.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
docs/data-structure.md
View file @
28a40f5
...
...
@@ -1096,13 +1096,13 @@
'vipLevel' : {
'list' : [
{
'text' : '¥284.00'
'text' : '¥284.00',
'currentLevel':true
},
...
]
},
'goodsDiscount' : {
'listLength' : 2,
'list' : [
{
'text' : '【BACK TO SCHOOL】满¥499赠送Paul Franke帽子一个,多买多送!'
...
...
@@ -1234,12 +1234,29 @@
},
'cartInfo' : {
'numInCart' : 3,
'goodsInstore' : 0,
'isCollect':true//
'cartUrl':'购物车url',
'addToCartUrl':'添加购物车url',
'soldOut':'已售罄',
'notForSale':'非卖品'
},
'introUrl' : '',
'id' : '',
'preferenceUrl' :''
}
### 咨询列表页面
{
'link' : '咨询表单跳转url',
'consults':{
'list' :
[
{
'question':'',
'time':'',
'answer':''
}
...
]
}
}
### 支付中心
{
...
...
library/Action/AbstractAction.php
View file @
28a40f5
...
...
@@ -284,7 +284,7 @@ class AbstractAction extends Controller_Abstract
protected
function
getUid
(
$useSession
=
false
)
{
// @todo
$useSession
=
false
;
//
$useSession = false;
if
(
!
$this
->
_uid
)
{
$cookie
=
$this
->
getCookie
(
'_UID'
);
...
...
library/LibModels/Wap/Passport/LoginData.php
View file @
28a40f5
...
...
@@ -76,15 +76,4 @@ class LoginData
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
/**
* 登出SESSION会话
*
* @param string $token 会话
* @return array
*/
public
static
function
signoutSession
(
$token
)
{
return
Yohobuy
::
get
(
Helpers
::
logoutSession
(
$token
)
);
}
}
...
...
library/Plugin/DataProcess/ListProcess.php
View file @
28a40f5
...
...
@@ -42,7 +42,7 @@ class ListProcess
$products
=
array
();
foreach
(
$data
as
$value
)
{
$products
[]
=
Helpers
::
formatProduct
(
$value
,
true
,
true
,
true
);
$products
[]
=
Helpers
::
formatProduct
(
$value
,
true
,
true
,
true
,
235
,
314
);
}
return
$products
;
...
...
library/Plugin/Helpers.php
View file @
28a40f5
...
...
@@ -607,7 +607,7 @@ class Helpers
public
static
function
syncUserSession
(
$uid
,
$refer
=
''
,
$callback
=
'call'
)
{
return
'http://mapi.yohobuy.com/Passport/session/index?callback='
.
$callback
.
'&sign='
.
md5
(
$uid
.
'Js8Yn0!EwPM45-ws'
)
.
'&uid='
.
$uid
.
'&go='
.
$refer
;
.
'&sign='
.
md5
(
md5
(
$uid
.
'Js8Yn0!EwPM45-ws'
)
)
.
'&uid='
.
$uid
.
'&go='
.
$refer
;
}
/**
...
...
@@ -620,10 +620,10 @@ class Helpers
* @param string $callback 回调方法名
* @return string
*/
public
static
function
logoutSession
(
$token
,
$callback
=
'call'
)
public
static
function
logoutSession
(
$token
,
$
refer
=
''
,
$
callback
=
'call'
)
{
return
'http://mapi.yohobuy.com/Passport/session/logout?callback='
.
$callback
.
'&sign='
.
md5
(
'Js8Yn0!EwPM45-ws'
)
.
'&token='
.
$token
;
.
'&sign='
.
md5
(
md5
(
'Js8Yn0!EwPM45-ws'
))
.
'&token='
.
$token
.
'&go='
.
$refer
;
}
}
...
...
static/js/me/pay.js
View file @
28a40f5
...
...
@@ -92,7 +92,7 @@ function callpay(orderCode) {
function
isWXOpen
()
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
===
'micromessenger'
)
{
if
(
ua
.
match
(
/MicroMessenger/i
)
.
toString
()
===
'micromessenger'
)
{
return
true
;
}
else
{
return
false
;
...
...
static/js/plugin/loading.js
View file @
28a40f5
...
...
@@ -15,7 +15,11 @@ var $loading,
// 初始化
function
init
(
$container
)
{
var
html
=
'<div class="loading-mask hide"><div class="loading"></div></div>'
;
var
html
=
'<div class="loading-mask hide">'
+
'<div class="loading">'
+
'<div></div><div></div><div></div>'
+
'</div>'
+
'</div>'
;
hasInit
=
true
;
if
(
$container
===
undefined
)
{
...
...
static/js/product/detail/detail.js
View file @
28a40f5
...
...
@@ -16,6 +16,7 @@ var goodsDiscountEl = document.getElementById('goodsDiscount'),
goodsDiscountHammer
=
goodsDiscountEl
&&
new
Hammer
(
goodsDiscountEl
);
var
$cart
=
$
(
'.cart-bar'
);
var
UA
=
navigator
.
userAgent
.
toLowerCase
().
toString
();
require
(
'./desc'
);
require
(
'./comments-consults'
);
...
...
@@ -81,4 +82,7 @@ $.ajax({
}
});
if
(
UA
.
indexOf
(
'mqqbrowser'
)
>
-
1
)
{
$
(
'.detail > div'
).
removeClass
(
'column'
).
addClass
(
'oldbox'
);
}
require
(
'./like'
);
...
...
static/sass/_loading.scss
View file @
28a40f5
...
...
@@ -5,16 +5,73 @@
bottom
:
0
;
right
:
0
;
left
:
0
;
@-webkit-keyframes
scale
{
0
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
45
%
{
-webkit-transform
:
scale
(
0
.1
);
transform
:
scale
(
0
.1
);
opacity
:
0
.7
;
}
80
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
}
@keyframes
scale
{
0
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
45
%
{
-webkit-transform
:
scale
(
0
.1
);
transform
:
scale
(
0
.1
);
opacity
:
0
.7
;
}
80
%
{
-webkit-transform
:
scale
(
1
);
transform
:
scale
(
1
);
opacity
:
1
;
}
}
.loading
{
position
:
absolute
;
width
:
100rem
/
$pxConvertRem
;
height
:
40rem
/
$pxConvertRem
;
background
:
image-url
(
'loading.gif'
)
no-repeat
;
background-size
:
100%
100%
;
width
:
60px
;
height
:
20px
;
top
:
50%
;
left
:
50%
;
margin-left
:
-50rem
/
$pxConvertRem
;
margin-top
:
-20rem
/
$pxConvertRem
;
margin-top
:
-10px
;
margin-left
:
-30px
;
>
div
{
display
:
inline-block
;
background
:
#fff
;
width
:
15px
;
height
:
15px
;
@include
border-radius
(
100%
);
margin
:
2px
;
$init
:
0
.12
;
@for
$i
from
1
through
3
{
&
:nth-child
(
#{
$i
}
)
{
-webkit-animation
:
scale
.75s
#{
$init
}
s
infinite
cubic-bezier
(
.2
,.
68
,.
18
,
1
.08
);
animation
:
scale
.75s
#{
$init
}
s
infinite
cubic-bezier
(
.2
,.
68
,.
18
,
1
.08
);
}
$init
:
(
$i
+
1
)
*
0
.12
;
}
}
}
}
\ No newline at end of file
...
...
static/sass/product/_comments-consults.scss
View file @
28a40f5
...
...
@@ -280,7 +280,7 @@
}
}
}
.comment-content-footer
,
.consult-content-footer
{
min-height
:
pxToRem
(
88px
);
...
...
@@ -290,7 +290,7 @@
line-height
:
pxToRem
(
88px
);
font-size
:
pxToRem
(
28px
);
a
{
color
:
#
e0e0e
0
;
color
:
#
b0b0b
0
;
.iconfont
{
font-size
:
inherit
;
}
...
...
static/sass/product/_detail.scss
View file @
28a40f5
...
...
@@ -46,7 +46,7 @@ $basicBtnC:#eb0313;
.column
{
box-sizing
:
border-box
;
//padding: pxToRem(20px) pxToRem(12px);
padding
:
4%
3%
;
padding
:
pxToRem
(
6px
)
3%
;
width
:
49
.9%
;
border-bottom
:
pxToRem
(
4px
)
solid
#fff
;
border-right
:
pxToRem
(
4px
)
solid
#fff
;
...
...
@@ -64,6 +64,20 @@ $basicBtnC:#eb0313;
flex-basis
:
49
.9%
))
}
.oldbox
{
padding
:
pxToRem
(
6px
)
3%
;
width
:
49
.9%
;
background-color
:
$tableCellC
;
box-sizing
:
border-box
;
border-bottom
:
1px
solid
#fff
;
border-right
:
1px
solid
#fff
;
width
:
49
.9%
;
height
:
100%
;
float
:
left
;
text-overflow
:ellipsis
;
white-space
:nowrap
;
overflow
:hidden
;
}
}
}
}
...
...
@@ -202,7 +216,7 @@ $basicBtnC:#eb0313;
.goodsName
{
box-sizing
:
border-box
;
width
:
100%
;
min-height
:
pxToRem
(
8
3
px
);
min-height
:
pxToRem
(
8
8
px
);
font-size
:
pxToRem
(
28px
);
color
:
#fff
;
padding-left
:
pxToRem
(
28px
);
...
...
@@ -236,7 +250,7 @@ $basicBtnC:#eb0313;
.price-date
{
// width: 100%;
color
:
$subFontC
;
min-
height
:
pxToRem
(
88px
);
height
:
pxToRem
(
88px
);
padding-left
:
pxToRem
(
28px
);
padding-right
:
pxToRem
(
28px
);
background-color
:
#fff
;
...
...
static/sass/product/_product-description.scss
View file @
28a40f5
...
...
@@ -11,10 +11,6 @@
background-size
:
cover
;
}
.detail
{
// background-color: $tableCellC;
// &.table .inner-container{
// background-color: $tableCellC;
// }
margin-bottom
:
1px
;
}
.desc-text
{
...
...
@@ -42,30 +38,21 @@
.detail
{
.material-item
{
margin
:
pxToRem
(
10px
)
0
;
@include
flexbox
((
display
:
box
,
box-align
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
align-items
:
center
));
width
:
100%
;
height
:
auto
;
overflow
:
hidden
;
display
:
block
;
position
:
relative
;
img
{
margin
:
0
;
}
.material-image
{
width
:
23%
;
@include
flexbox
((
box-flex
:
1
.0
,
display
:
box
,
box-pack
:
center
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
flex-basis
:
23%
,
justify-content
:
center
));
position
:
absolute
;
left
:
0
;
top
:
50%
;
@include
transform
(
translateY
(
-50%
))
}
.material-desc
{
font-size
:
pxToRem
(
24px
);
...
...
@@ -76,15 +63,8 @@
line-height
:
pxToRem
(
38px
);
color
:
#4b4b4b
;
word-wrap
:
break-word
;
width
:
76
.9
;
@include
flexbox
((
box-flex
:
1
.0
,
display
:
box
)
,
$version
:
1
);
@include
flexbox
((
display
:
flex
,
flex-basis
:
76
.9%
));
width
:
76
.9%
;
float
:
right
;
}
&
:last-child
{
border-bottom
:
none
;
...
...
template/m.yohobuy.com/actions/product/detail/consults.phtml
View file @
28a40f5
...
...
@@ -22,13 +22,9 @@
<p>
{
{answer
}
}</p>
</div>
</div>
{
{/list
}
}
</div>
{
{/
consults
}
}
{
{#if
loadmore
}
}
<input
id=
"loadMoreUrl"
type=
"hidden"
value=
"{{loadMoreUrl}}"
>
{
{/if
}
}
</div>
{
{>
layout/footer
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
28a40f5
...
...
@@ -201,7 +201,7 @@ class UserModel
$datas
[]
=
$product
;
}
!
empty
(
$datas
)
&&
$result
[
'hasFavProduct'
]
=
$datas
;
}
else
if
(
$page
>
1
&&
isset
(
$favProduct
[
'code'
])
&&
$favProduct
[
'code'
]
===
500
)
{
}
else
if
(
$page
>
1
&&
(
!
$favProduct
||
(
isset
(
$favProduct
[
'code'
])
&&
$favProduct
[
'code'
]
===
500
))
)
{
$result
[
'end'
]
=
true
;
}
...
...
@@ -259,7 +259,7 @@ class UserModel
$datas
[]
=
$brand
;
}
!
empty
(
$datas
)
&&
$result
[
'hasFavBrand'
]
=
$datas
;
}
else
if
(
$page
>
1
&&
isset
(
$favBrand
[
'code'
])
&&
$favBrand
[
'code'
]
===
500
)
{
}
else
if
(
$page
>
1
&&
(
!
$favBrand
||
(
isset
(
$favBrand
[
'code'
])
&&
$favBrand
[
'code'
]
===
500
))
)
{
$result
[
'end'
]
=
true
;
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/List.php
View file @
28a40f5
...
...
@@ -213,7 +213,7 @@ class ListModel
}
// 调用接口查询数据
$brandLogo
=
BrandData
::
getBrandLogoByDomain
(
$domain
);
$brandLogo
=
BrandData
::
getBrandLogoByDomain
(
$domain
);
// 处理返回的数据
if
(
isset
(
$brandLogo
[
'data'
]))
{
$result
=
array
(
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
28a40f5
...
...
@@ -78,7 +78,7 @@ class LoginController extends AbstractAction
$refer
=
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
);
$token
=
$this
->
get
(
'token'
);
if
(
!
empty
(
$token
))
{
LoginData
::
signoutSession
(
$token
);
$this
->
go
(
Helpers
::
logoutSession
(
$token
,
$refer
)
);
}
$this
->
go
(
$refer
);
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
28a40f5
...
...
@@ -217,7 +217,7 @@ class IndexController extends AbstractAction
// 右下角的购物车链接
$data
[
'goodList'
][
'cartUrl'
]
=
Helpers
::
url
(
'/cart/index/index'
,
null
);
//
$data['goodList'] += $condition;
$data
[
'goodList'
]
+=
$condition
;
$data
[
'pageFooter'
]
=
true
;
if
(
$title
===
''
)
{
...
...
Please
register
or
login
to post a comment