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
0ef09e6bca532691ecbf0d585ee418ddd44fd2b6
2 parents
9e573015
9271c66b
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
173 additions
and
19 deletions
library/LibModels/Web/Home/IndexData.php
static/sass/me/_home.scss
template/www.yohobuy.com/partials/sale/brand-sale.phtml
web-static/sass/sale/_index.scss
yohobuy/www.yohobuy.com/application/controllers/Common.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Sale1.php
library/LibModels/Web/Home/IndexData.php
View file @
0ef09e6
...
...
@@ -42,4 +42,30 @@ class IndexData
$params
[
'client_secret'
]
=
Sign
::
getSign
(
$params
);
return
Yohobuy
::
get
(
Yohobuy
::
SERVICE_URL
.
self
::
URL_OPERATIONS_RESOURCE_GET
,
$params
);
}
/**
* 邮箱订阅
*
* @param string $email
* @param string $uid
* @return array
*/
public
static
function
emailSubscriber
(
$email
,
$uid
=
0
)
{
//TODO 走老接口
// 构建必传参数
$param
=
Yohobuy
::
param
();
$param
[
'page'
]
=
1
;
$param
[
'open_key'
]
=
'12345'
;
$param
[
'method'
]
=
'open.subscriber.subscriber'
;
$param
[
'email'
]
=
$email
;
$param
[
'uid'
]
=
$uid
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
unset
(
$param
[
'app_version'
]);
unset
(
$param
[
'client_type'
]);
unset
(
$param
[
'os_version'
]);
unset
(
$param
[
'screen_size'
]);
unset
(
$param
[
'v'
]);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
}
\ No newline at end of file
...
...
static/sass/me/_home.scss
View file @
0ef09e6
...
...
@@ -215,6 +215,7 @@
background-size
:
100%
100%
;
position
:
relative
;
top
:
.36rem
;
margin-right
:
pxToRem
(
12px
);
}
&
.highlight
{
background
:
#eee
;
...
...
template/www.yohobuy.com/partials/sale/brand-sale.phtml
View file @
0ef09e6
...
...
@@ -6,9 +6,9 @@
<div class="sale-group-big clearfix">
{{#brandSale}}
{{#big}}
<a class="item pull-left
{{#if @first}}first{{/if}} {{#if @last}}last{{/if}}
" href="{{link}}">
<a class="item pull-left" href="{{link}}">
<div class="pic">
<img
class=""
src="{{img}}">
<img src="{{img}}">
<div class="time">{{time}}</div>
</div>
<div class="detail">
...
...
@@ -24,6 +24,17 @@
</div>
</a>
{{/big}}
</div>
<div class="sale-group clearfix">
{{#normal}}
<a class="item pull-left" href="{{link}}">
<img class="pic" src="{{img}}">
<div class="detail">
<div class="title">{{title}}</div>
<div class="time">{{time}}</div>
</div>
</a>
{{/normal}}
{{/brandSale}}
</div>
...
...
web-static/sass/sale/_index.scss
View file @
0ef09e6
...
...
@@ -55,20 +55,13 @@
}
.brand-sale
{
.sale-group-big
{
.item
{
width
:
377px
;
margin-right
:
10px
;
&
.first
,
&
.last
{
width
:
376px
;
}
width
:
1150px
+
8px
;
&
.last
{
margin-right
:
0
;
}
.item
{
width
:
378px
;
margin-right
:
8px
;
margin-bottom
:
10px
;
}
.pic
{
...
...
@@ -95,7 +88,7 @@
}
.brand
{
margin
:
24px
10px
;
margin
:
24px
10px
0
;
}
.text
{
...
...
@@ -112,7 +105,36 @@
font-size
:
40px
;
}
}
}
.sale-group
{
width
:
1150px
+
8px
;
.item
{
width
:
185px
;
margin-right
:
8px
;
margin-bottom
:
10px
;
}
.pic
{
width
:
100%
;
display
:
block
;
}
.detail
{
padding
:
14px
10px
;
background
:
#f5f5f5
;
text-align
:
center
;
line-height
:
20px
;
}
.title
{
font-size
:
12px
;
}
.time
{
font-size
:
14px
;
}
}
}
}
...
...
yohobuy/www.yohobuy.com/application/controllers/Common.php
View file @
0ef09e6
...
...
@@ -6,6 +6,7 @@ use Plugin\Cache;
use
Configs\CacheConfig
;
use
Api\Yohobuy
;
use
Plugin\Images
;
use
Plugin\Helpers
;
class
CommonController
extends
WebAction
{
...
...
@@ -118,4 +119,24 @@ class CommonController extends WebAction
}
return
$this
->
helpJsonCallbackResult
(
$callback
,
$data
[
'code'
],
$data
[
'message'
],
$banner
);
}
/**
* 获取邮件订阅
*
* @return jsonp
*/
public
function
emailsubscriberAction
()
{
$callback
=
$this
->
get
(
'callback'
,
''
);
$email
=
$this
->
get
(
'email'
,
''
);
$uid
=
intval
(
$this
->
get
(
'uid'
,
'0'
));
$data
=
array
();
//验证邮件
if
(
Helpers
::
verifyEmail
(
$email
))
{
$data
=
IndexData
::
emailSubscriber
(
$email
,
$uid
);
return
$this
->
helpJsonCallbackResult
(
$callback
,
$data
[
'code'
],
$data
[
'message'
],
$data
[
'data'
]);
}
else
{
return
$this
->
helpJsonCallbackResult
(
$callback
,
403
,
'订阅失败'
,
''
);
}
}
}
\ No newline at end of file
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Sale1.php
View file @
0ef09e6
...
...
@@ -54,7 +54,7 @@ class Sale1Controller extends WebAction
'brandSale'
=>
array
(
'big'
=>
array
(
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/37
6
/h/400'
,
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/37
8
/h/400'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'brand'
=>
'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62'
,
...
...
@@ -62,7 +62,7 @@ class Sale1Controller extends WebAction
'discount'
=>
'70%'
,
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/37
6
/h/400'
,
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/37
8
/h/400'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'brand'
=>
'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62'
,
...
...
@@ -70,7 +70,7 @@ class Sale1Controller extends WebAction
'discount'
=>
'70%'
,
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/37
6
/h/400'
,
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/37
8
/h/400'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'brand'
=>
'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62'
,
...
...
@@ -78,7 +78,80 @@ class Sale1Controller extends WebAction
'discount'
=>
'70%'
,
)
),
'normal'
=>
array
()
'normal'
=>
array
(
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
),
array
(
'img'
=>
'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180'
,
'link'
=>
'http://www.yohobuy.com'
,
'time'
=>
'低于1小时'
,
'title'
=>
'2015春夏海量大促!'
)
)
)
);
$this
->
setWebNavHeader
();
...
...
Please
register
or
login
to post a comment