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
郭成尧
9 years ago
Commit
b17f55cbc618662763e17f4353d95d6320627b98
1 parent
d7c6153b
'兼容templateName'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletions
library/Plugin/DataProcess/CouponFloorProcess.php
library/Plugin/DataProcess/CouponFloorProcess.php
View file @
b17f55c
...
...
@@ -13,6 +13,11 @@ use Plugin\Images;
class
CouponFloorProcess
{
// 兼容驼峰规则命名的 template_name,此处是以 templateName 命名的数据
private
static
$TEMPLATE_LIST
=
array
(
'single_image'
,
'focus'
);
/**
* 获取楼层数据
...
...
@@ -38,7 +43,7 @@ class CouponFloorProcess
continue
;
}
}
if
(
$fun
!==
'single_image'
)
{
if
(
!
in_array
(
$fun
,
self
::
$TEMPLATE_LIST
)
)
{
$fun
=
$v
[
'template_name'
];
}
if
(
empty
(
$v
[
'data'
])
||
!
is_callable
(
"self::
$fun
"
))
{
...
...
@@ -152,4 +157,22 @@ class CouponFloorProcess
$data
[
0
][
'isSingleImage'
]
=
true
;
return
$data
[
0
];
}
/**
*
* 辅助方法 Debug 数据输出
*
* @param $data
* @param bool $is_exit 输出后是否中断执行
*/
public
static
function
debugOut
(
$data
,
$is_exit
=
true
)
{
header
(
"Content-type:text/html;charset=utf-8"
);
echo
'<pre>'
;
print_r
(
$data
);
echo
'</pre>'
;
if
(
$is_exit
)
{
exit
;
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment