Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
1765c3dc
Commit
1765c3dc
authored
Sep 12, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页处理
parent
51db1a53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
JobTask.php
application/task/controller/JobTask.php
+7
-2
No files found.
application/task/controller/JobTask.php
View file @
1765c3dc
...
@@ -6,6 +6,7 @@ use app\index\service\ImageDepotService;
...
@@ -6,6 +6,7 @@ use app\index\service\ImageDepotService;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\GImageDepot
;
use
app\model\GImageDepot
;
use
think\Image
;
use
think\Image
;
use
think\Request
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
@@ -114,9 +115,13 @@ class JobTask
...
@@ -114,9 +115,13 @@ class JobTask
*/
*/
public
function
image
()
{
public
function
image
()
{
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
set_time_limit
(
0
);
// 取消脚本运行时间的超时上限
ini_set
(
'memory_limit'
,
'
512
M'
);
ini_set
(
'memory_limit'
,
'
256
M'
);
$depot
=
new
GImageDepot
();
$depot
=
new
GImageDepot
();
$image_data
=
$depot
->
getImageDepotList
(
'img_name'
,
[],
1
,
500
);
$param
=
Request
::
instance
()
->
param
();
$pageNo
=
empty
(
$param
[
'pageNo'
])
?
1
:
$param
[
'pageNo'
];
$pageSize
=
empty
(
$param
[
'pageSize'
])
?
10
:
$param
[
'pageSize'
];
$image_data
=
$depot
->
getImageDepotList
(
'img_name'
,
[],
$pageNo
,
$pageSize
);
$path
=
'./static/shop_image_depot/'
;
$path
=
'./static/shop_image_depot/'
;
foreach
(
$image_data
as
$k
=>
$v
)
{
foreach
(
$image_data
as
$k
=>
$v
)
{
$file_path
=
$path
.
$v
[
'img_name'
];
$file_path
=
$path
.
$v
[
'img_name'
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment