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
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
eb9f727d22870634601b358d824b2668d3ec4232
1 parent
d7ffda0b
do modify template name use _ to -
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
35 deletions
template/m.yohobuy.com/actions/index/home/suggest-sub.phtml
template/m.yohobuy.com/partials/product/product-description.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/index/home/suggest-sub.phtml
0 → 100644
View file @
eb9f727
{
{>
layout/header
}
}
<div
class=
"yoho-suggest-sub-page yoho-page"
>
{
{#
suggestSub
}
}
<div
class=
"suggest-sub-form"
>
<textarea
name=
""
id=
"suggest-textarea"
placeholder=
"请输入意见反馈,我们会以消息形式回复您的建议或意见,改进产品体验,谢谢!"
></textarea>
<div
id=
"img-form"
class=
"img-form"
>
<ul
class=
"upload-img-list"
></ul>
<span
class=
"img-add"
>
<input
id=
"upload-img"
type=
"file"
/>
</span>
</div>
</div>
{
{/
suggestSub
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
template/m.yohobuy.com/partials/product/product-description.phtml
View file @
eb9f727
...
...
@@ -14,9 +14,7 @@
{
{/detail
}
}
<div
class=
"desc-text"
>
{
{desc
}
}</div>
</div>
{
{/goodsDescription
}
}
<!--
<div
class=
"gap-block"
></div>
-->
{
{/goodsDescription
}
}
{
{#sizeInfo
}
}
<div
class=
"size-info page-block"
>
...
...
@@ -43,8 +41,6 @@
</div>
{
{/sizeInfo
}
}
<!--
<div
class=
"gap-block"
></div>
-->
{
{#measurementMethod
}
}
<div
class=
"measurement-method page-block"
>
<h
1
class=
"title"
>
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
eb9f727
...
...
@@ -193,7 +193,7 @@ class DetailModel
if
(
is_numeric
(
$productSkn
))
{
// 调用服务
$sizeInfo
=
DetailData
::
sizeInfo
(
$productSkn
);
var_dump
(
$sizeInfo
);
exit
;
$sizeInfo
=
DetailData
::
sizeInfo
(
$productSkn
);
// 商品信息
if
(
isset
(
$sizeInfo
[
'productDescBo'
][
'erpProductId'
]))
{
...
...
@@ -201,14 +201,16 @@ class DetailModel
'title'
=>
'商品信息'
,
'enTitle'
=>
'PRODUCT INFO'
,
'detail'
=>
array
(
array
(
'param'
=>
'编号:'
.
$sizeInfo
[
'productDescBo'
][
'erpProductId'
]),
array
(
'param'
=>
'颜色:'
.
$sizeInfo
[
'productDescBo'
][
'colorName'
]),
'list'
=>
array
(
array
(
'param'
=>
'编号:'
.
$sizeInfo
[
'productDescBo'
][
'erpProductId'
]),
array
(
'param'
=>
'颜色:'
.
$sizeInfo
[
'productDescBo'
][
'colorName'
]),
)
),
);
}
if
(
!
empty
(
$sizeInfo
[
'productDescBo'
][
'standardBos'
]))
{
foreach
(
$sizeInfo
[
'productDescBo'
][
'standardBos'
]
as
$value
)
{
$result
[
'goodsDescription'
][
'detail'
][
]
=
$value
[
'standardName'
]
.
':'
.
$value
[
'standardVal'
]
;
$result
[
'goodsDescription'
][
'detail'
][
'list'
][]
=
array
(
'param'
=>
$value
[
'standardName'
]
.
':'
.
$value
[
'standardVal'
])
;
}
}
if
(
isset
(
$sizeInfo
[
'phrase'
]))
{
...
...
@@ -216,28 +218,28 @@ class DetailModel
}
// 尺码信息
if
(
!
empty
(
$sizeInfo
[
'
productIntroBo'
][
'
sizeInfoBo'
]))
{
if
(
!
empty
(
$sizeInfo
[
'sizeInfoBo'
]))
{
$result
[
'sizeInfo'
]
=
array
(
'title'
=>
'尺码信息'
,
'enTitle'
=>
'SIZE INFO'
,
'detail'
=>
array
(
'list'
=>
array
()),
);
$sizeNameList
=
array
(
0
=>
array
(
'param'
=>
'吊牌尺码'
)
)
;
// 尺码名称
$sizeNameList
=
array
(
0
=>
array
(
'param'
=>
'吊牌尺码'
)
)
;
// 尺码名称
$sizeBoGroup
=
array
();
// 尺码按ID分组
foreach
(
$sizeInfo
[
'productIntroBo'
][
'sizeInfoBo'
][
'sizeAttributeBos'
]
as
$attr
)
{
$sizeBoGroup
[
$attr
[
'id'
]
][
0
]
=
array
(
'param'
=>
$value
[
'attributeName'
]);
foreach
(
$sizeInfo
[
'sizeInfoBo'
][
'sizeAttributeBos'
]
as
$attr
)
{
$sizeBoGroup
[
$attr
[
'id'
]
][
0
]
=
array
(
'param'
=>
$attr
[
'attributeName'
]);
}
foreach
(
$sizeInfo
[
'productIntroBo'
][
'sizeInfoBo'
][
'sizeBoList'
]
as
$value
)
{
foreach
(
$sizeInfo
[
'sizeInfoBo'
][
'sizeBoList'
]
as
$value
)
{
$sizeNameList
[]
=
array
(
'param'
=>
$value
[
'sizeName'
]);
foreach
(
$value
[
'sortAttributes'
]
as
$attr
)
{
$sizeBoGroup
[
$attr
[
'id'
]
][]
=
array
(
'param'
=>
$attr
[
'sizeValue'
]);
$sizeNameList
[]
=
array
(
'param'
=>
$value
[
'sizeName'
]);
}
}
// 根据模板页面的显示,按表格一列一列来显示
$result
[
'
detail'
][
'list'
][
0
]
=
$sizeNameList
;
$result
[
'
sizeInfo'
][
'detail'
][
'list'
][
0
][
'params'
]
=
$sizeNameList
;
foreach
(
$sizeBoGroup
as
$value
)
{
$result
[
'
detail'
][
'list'
][
]
=
$value
;
$result
[
'
sizeInfo'
][
'detail'
][
'list'
][][
'params'
]
=
$value
;
}
}
...
...
@@ -250,28 +252,28 @@ class DetailModel
);
}
// 模特试穿
// 模特试穿
, 竖着输出排列显示
if
(
!
empty
(
$sizeInfo
[
'modelBos'
]))
{
$result
[
'reference'
]
=
array
(
'title'
=>
'模特试穿'
,
'enTitle'
=>
'REFERENCE'
,
'detail'
=>
array
(
'list'
=>
array
()),
);
$result
[
'reference'
][
'detail'
][
'list'
][
0
]
=
array
(
0
=>
array
(
'param'
=>
''
));
// 头像列表
$result
[
'reference'
][
'detail'
][
'list'
][
1
]
=
array
(
0
=>
array
(
'param'
=>
'模特'
));
// 模特名字列表
$result
[
'reference'
][
'detail'
][
'list'
][
2
]
=
array
(
0
=>
array
(
'param'
=>
'身高'
));
// 身高列表
$result
[
'reference'
][
'detail'
][
'list'
][
3
]
=
array
(
0
=>
array
(
'param'
=>
'体重'
));
// 体重列表
$result
[
'reference'
][
'detail'
][
'list'
][
4
]
=
array
(
0
=>
array
(
'param'
=>
'三围'
));
// 三围列表
$result
[
'reference'
][
'detail'
][
'list'
][
5
]
=
array
(
0
=>
array
(
'param'
=>
'吊牌尺码'
));
// 吊牌尺码
$result
[
'reference'
][
'detail'
][
'list'
][
6
]
=
array
(
0
=>
array
(
'param'
=>
'试穿描述'
));
// 试穿描述
$result
[
'reference'
][
'detail'
][
'list'
][
0
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
''
));
// 头像列表
$result
[
'reference'
][
'detail'
][
'list'
][
1
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'模特'
));
// 模特名字列表
$result
[
'reference'
][
'detail'
][
'list'
][
2
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'身高'
));
// 身高列表
$result
[
'reference'
][
'detail'
][
'list'
][
3
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'体重'
));
// 体重列表
$result
[
'reference'
][
'detail'
][
'list'
][
4
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'三围'
));
// 三围列表
$result
[
'reference'
][
'detail'
][
'list'
][
5
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'吊牌尺码'
));
// 吊牌尺码
$result
[
'reference'
][
'detail'
][
'list'
][
6
][
'params'
]
=
array
(
0
=>
array
(
'param'
=>
'试穿描述'
));
// 试穿描述
foreach
(
$sizeInfo
[
'modelBos'
]
as
$value
)
{
$result
[
'reference'
][
'detail'
][
'list'
][
0
][]
=
array
(
'param'
=>
$value
[
'avatar'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
1
][]
=
array
(
'param'
=>
$value
[
'modelName'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
2
][]
=
array
(
'param'
=>
$value
[
'height'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
3
][]
=
array
(
'param'
=>
$value
[
'weight'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
4
][]
=
array
(
'param'
=>
$value
[
'vitalStatistics'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
5
][]
=
array
(
'param'
=>
$value
[
'fitModelBo'
][
'fit_size'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
6
][]
=
array
(
'param'
=>
$value
[
'fitModelBo'
][
'feel'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
0
][
'params'
][]
=
array
(
'param'
=>
$value
[
'avatar'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
1
][
'params'
][]
=
array
(
'param'
=>
$value
[
'modelName'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
2
][
'params'
][]
=
array
(
'param'
=>
$value
[
'height'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
3
][
'params'
][]
=
array
(
'param'
=>
$value
[
'weight'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
4
][
'params'
][]
=
array
(
'param'
=>
$value
[
'vitalStatistics'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
5
][
'params'
][]
=
array
(
'param'
=>
$value
[
'fitModelBo'
][
'fit_size'
]);
$result
[
'reference'
][
'detail'
][
'list'
][
6
][
'params'
][]
=
array
(
'param'
=>
$value
[
'fitModelBo'
][
'feel'
]);
}
}
...
...
@@ -316,7 +318,7 @@ class DetailModel
}
}
return
$result
;
}
...
...
yohobuy/m.yohobuy.com/application/modules/Product/controllers/Detail.php
View file @
eb9f727
...
...
@@ -49,11 +49,11 @@ class DetailController extends AbstractAction
public
function
introAction
()
{
$productSkn
=
$this
->
param
(
'productSkn'
);
$productSkn
=
50027
715
;
$productSkn
=
50027
562
;
if
(
!
is_numeric
(
$productSkn
))
{
$this
->
error
();
}
$data
=
\Product\DetailModel
::
getSizeInfo
(
$productSkn
);
var_dump
(
$data
);
$data
=
\Product\DetailModel
::
getSizeInfo
(
$productSkn
);
if
(
array
()
===
$data
)
{
echo
' '
;
exit
();
...
...
Please
register
or
login
to post a comment