Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
6ce92f53a564533577286e7de27002411b55df37
2 parents
c01961d8
ad978eaa
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into feature/twocolumnbrand
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
56 deletions
library/Api/Yohobuy.php
library/Plugin/DataProcess/FloorProcess.php
static/js/index/channel.js
yohobuy/m.yohobuy.com/application/controllers/Home.php
library/Api/Yohobuy.php
View file @
6ce92f5
...
...
@@ -27,10 +27,10 @@ class Yohobuy
const
API_URL
=
'http://testapi.yoho.cn:28078/'
;
const
SERVICE_URL
=
'http://testservice.yoho.cn:28077/'
;
const
YOHOBUY_URL
=
'http://www.yohobuy.com/'
;
const
YOHOBUY_ORDER
=
'http://192.168.102.205:8084/order/'
;
//我的订单
const
API_URL_MYCENTER
=
'http://192.168.102.205:8081/users/'
;
// 我的个人中心接口URL
const
YOHOBUY_ORDER
=
'http://192.168.102.209:8084/order/'
;
//我的订单
const
API_URL_MYCENTER
=
'http://192.168.102.207:8081/users/'
;
// 我的个人中心接口URL
const
API_URL_SHOPINGCART
=
'http://192.168.102.213:8080/api-gateway-web/'
;
// 我的购物车接口URL
const
API_URL_PRODUCTDETAIL
=
'http://192.168.102.2
05
:8083/product/'
;
// 商品详情页
const
API_URL_PRODUCTDETAIL
=
'http://192.168.102.2
12
:8083/product/'
;
// 商品详情页
const
API_URL_LOGISTICS
=
'http://192.168.102.205:8080/gateway'
;
//查看物流接口URL
/**
...
...
library/Plugin/DataProcess/FloorProcess.php
View file @
6ce92f5
...
...
@@ -34,6 +34,10 @@ class FloorProcess
$build
=
array
();
foreach
(
$data
[
'list'
]
as
$v
)
{
if
(
empty
(
$v
))
{
continue
;
}
$fun
=
$v
[
'template_name'
];
if
(
empty
(
$v
[
'data'
])
||
!
is_callable
(
"self::
$fun
"
))
{
continue
;
...
...
static/js/index/channel.js
View file @
6ce92f5
...
...
@@ -10,23 +10,11 @@ var $searchBox = $('.search-box'),
$box
=
$
(
'.box'
),
$indexSearch
=
$
(
'.index-search'
),
$indexLogo
=
$
(
'.index-logo'
),
$channelLink
=
$
(
'.index-channel a'
),
$win
=
$
(
window
),
$doc
=
$
(
document
),
$appFloatLayer
=
$
(
'#float-layer-app'
);
$channelLink
=
$
(
'.index-channel a'
);
var
$search
=
$searchBox
.
children
(
'input[type="text"]'
),
$cancelSearch
=
$box
.
children
(
'.no-search'
),
$searchIcon
=
$searchBox
.
children
(
'.search-icon'
);
// variables for calculate the app download layer position
var
layerInit
=
false
,
windowViewHeight
=
0
,
layerContentHeight
=
$appFloatLayer
.
height
(),
layerPaddingTop
=
parseInt
(
$appFloatLayer
.
css
(
'padding-top'
)),
layerPaddingBottom
=
parseInt
(
$appFloatLayer
.
css
(
'padding-bottom'
)),
layerHeight
=
layerContentHeight
+
layerPaddingTop
+
layerPaddingBottom
,
layerNewPos
;
$cancelSearch
=
$box
.
children
(
'.no-search'
),
$searchIcon
=
$searchBox
.
children
(
'.search-icon'
);
require
(
'../common'
);
...
...
@@ -81,40 +69,3 @@ $channelLink.on('touchstart', function() {
borderColor
:
'#fff'
});
});
function
updateLayerPosition
()
{
var
winHeight
=
window
.
innerHeight
,
bodyHeight
=
$doc
.
height
(),
scrollTopPosition
=
$win
.
scrollTop
();
if
(
layerInit
)
{
//keyboard is shown
if
(
windowViewHeight
-
winHeight
>
200
)
{
if
(
scrollTopPosition
+
windowViewHeight
+
layerHeight
>=
bodyHeight
)
{
layerNewPos
=
0
;
}
else
{
layerNewPos
=
bodyHeight
-
windowViewHeight
-
scrollTopPosition
-
layerHeight
;
}
}
else
{
layerNewPos
=
bodyHeight
-
winHeight
-
scrollTopPosition
;
}
}
else
{
windowViewHeight
=
winHeight
;
layerNewPos
=
bodyHeight
-
winHeight
-
scrollTopPosition
+
layerHeight
;
layerInit
=
true
;
}
$appFloatLayer
.
css
({
position
:
'relative'
,
bottom
:
layerNewPos
+
'px'
});
}
$
(
window
).
scroll
(
function
()
{
window
.
requestAnimationFrame
(
updateLayerPosition
);
});
$doc
.
on
(
'ready'
,
updateLayerPosition
);
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
6ce92f5
...
...
@@ -51,8 +51,9 @@ class HomeController extends AbstractAction
$uid
=
$this
->
getUid
(
true
);
if
(
$uid
)
{
$data
[
'isLogin'
]
=
true
;
$udid
=
$this
->
getUdid
();
$data
+=
UserModel
::
getUserProfileData
(
$uid
);
$data
+=
UserModel
::
getInfoNumData
(
$uid
);
$data
+=
UserModel
::
getInfoNumData
(
$uid
,
$udid
);
}
$this
->
_view
->
display
(
'index'
,
$data
);
...
...
Please
register
or
login
to post a comment