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
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
eaf0e380c77315340e9f0a16c61540025e7de40f
1 parent
76e17097
修改限购商品分享详情页的逻辑
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
56 deletions
template/m.yohobuy.com/actions/product/detail/limit.phtml
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
template/m.yohobuy.com/actions/product/detail/limit.phtml
View file @
eaf0e38
...
...
@@ -20,28 +20,24 @@
</div>
</div>
{
{#
attaches
}
}
<div
class=
"goodDesc"
>
{
{#mainImg
}
}
<img
class=
"lazy"
src=
"{{mainImg}}"
alt=
""
>
{
{/mainImg
}
}
{
{#img
}
}
<img
src=
"{{attachUrl}}"
alt=
"{{attachName}}"
>
{
{/img
}
}
{
{#goodDescription
}
}
<p
class=
"desc"
>
{
{goodDescription
}
}</p>
{
{/goodDescription
}
}
{
{#text
}
}
<p
class=
"desc"
>
{
{intro
}
}</p>
{
{/text
}
}
{
{#imgList
}
}
<img
class=
"lazy"
src=
"{{img}}"
alt=
""
>
{
{/imgList
}
}
{
{#vedio
}
}
{
{#video
}
}
<video
poster=
"{{img}}"
controls=
"controls"
controls=
"controls"
preload=
"metadata"
loop=
"loop"
width=
"100%"
name=
"media"
>
{
{#list
}
}
<source
src=
"{{src}}"
type=
"video/ogg;codecs="
theora,vorbis
""
media=
"screen"
/>
<source
src=
"{{src}}"
/>
{
{/list
}
}
<source
src=
"{{attachUrl}}"
type=
"video/ogg;codecs="
theora,vorbis
""
media=
"screen"
/>
<source
src=
"{{attachUrl}}"
/>
</video>
{
{/v
edi
o
}
}
{
{/v
ide
o
}
}
</div>
{
{/attaches
}
}
<div
class=
"bottom"
>
<div
class=
"logo"
></div>
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
eaf0e38
...
...
@@ -762,39 +762,6 @@ class DetailModel
}
$productData
=
DetailData
::
limitProductData
(
$uid
,
$productCode
);
/*$product = array(
"activityId" => null,
"attachment" => array(
array(
"attachName" => "",
"attachType" => 1,
"attachUrl" => "http://img10.static.yhbimg.com/yhb-img01/2016/03/03/17/012ddf849c5bd975452063594f36d21c37.png",
"id" => 445,
"intro" => "",
"isDefault" => 1,
"orderBy" => 0,
"productId" => 197,
"status" => 0
)
),
"batchNo" => "20160303171415",
"createTime" => 1456996513,
"dayFlag" => 1,
"description" => "",
"hotFlag" => 1,
"id" => 197,
"lastUpdateTime" => 1456998239,
"limitProductCode" => "2016030317150854",
"limitProductType" => 1,
"notSaleOrderBy" => 0,
"orderBy" => 72,
"price" => "¥65.00",
"productName" => "damao-已开售-码已发完-已售罄",
"productSkn" => 51147512,
"saleTime" => 1454342400,
"showFlag" => 1,
"status" => 1
);*/
if
(
empty
(
$productData
))
{
break
;
...
...
@@ -812,7 +779,7 @@ class DetailModel
// 附件
if
(
isset
(
$product
[
'attachment'
]))
{
foreach
(
$product
[
'attachment'
]
as
$item
)
{
$result
[
'attach'
][]
=
self
::
procLimitProductAttach
(
$item
);
$result
[
'attach
es
'
][]
=
self
::
procLimitProductAttach
(
$item
);
}
}
...
...
@@ -833,13 +800,24 @@ class DetailModel
switch
(
intval
(
$attachment
[
'attachType'
]))
{
case
1
:
// 大图文字
$result
[
'mainImg'
]
=
$attachment
[
'attachUrl'
];
$result
[
'goodDescription'
]
=
$attachment
[
'intro'
];
$result
[
'orderBy'
]
=
$attachment
[
'orderBy'
];
$result
[
'img'
]
=
array
(
'attachUrl'
=>
$attachment
[
'attachUrl'
],
'attachName'
=>
$attachment
[
'attachName'
],
'intro'
=>
$attachment
[
'intro'
],
'orderBy'
=>
$attachment
[
'orderBy'
]
);
break
;
case
2
:
// 图片列表
case
2
:
// 视频
$result
[
'video'
]
=
array
(
'attachUrl'
=>
$attachment
[
'attachUrl'
],
'orderBy'
=>
$attachment
[
'orderBy'
]
);
break
;
case
3
:
// 视频
case
3
:
// 文本类型
$result
[
'text'
]
=
array
(
'intro'
=>
$attachment
[
'intro'
],
'orderBy'
=>
$attachment
[
'orderBy'
]
);
break
;
default
:
break
;
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
eaf0e38
...
...
@@ -334,7 +334,7 @@ class DetailController extends AbstractAction
)
);*/
$productCode
=
$this
->
get
(
'code'
,
'2016030711
270231
'
);
$productCode
=
$this
->
get
(
'code'
,
'2016030711
453248
'
);
$uid
=
$this
->
getUid
();
$data
=
DetailModel
::
getLimitProductData
(
$uid
,
$productCode
);
...
...
Please
register
or
login
to post a comment