Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
a57c0755
Commit
a57c0755
authored
Nov 05, 2016
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
94d7c0c4
4bad8618
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
63 deletions
+89
-63
composer.json
src/composer.json
+5
-1
composer.lock
src/composer.lock
+27
-19
TaskController.php
src/console/controllers/TaskController.php
+17
-8
TestController.php
src/console/controllers/TestController.php
+2
-15
index.php
src/frontend/views/my-income/index.php
+13
-10
index.php
src/frontend/views/my-member/index.php
+16
-9
style.css
src/frontend/web/css/style.css
+9
-1
No files found.
src/composer.json
View file @
a57c0755
...
...
@@ -19,7 +19,7 @@
"light/yii2-xmlparser"
:
"*"
,
"2amigos/yii2-qrcode-helper"
:
"*"
,
"mobiledetect/mobiledetectlib"
:
"^2.8"
,
"hellogerard/jobby"
:
"
^3.2
"
"hellogerard/jobby"
:
"
3.0.3
"
},
"require-dev"
:
{
"yiisoft/yii2-codeception"
:
"*"
,
...
...
@@ -37,6 +37,10 @@
}
},
"repositories"
:
{
"0"
:
{
"type"
:
"vcs"
,
"url"
:
"https://github.com/xiabin/jobby"
},
"packagist"
:
{
"type"
:
"composer"
,
"url"
:
"https://packagist.phpcomposer.com"
...
...
src/composer.lock
View file @
a57c0755
...
...
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "
98389e30accec6e0214a5c62f63fa0c7
",
"content-hash": "
6e4bc99038d76cec792f6922d0ec044b
",
"hash": "
17e02f1f07eb6d2fc16836b687cf5b9a
",
"content-hash": "
0e835b46915328a107628b0a6e87c672
",
"packages": [
{
"name": "2amigos/yii2-qrcode-helper",
...
...
@@ -528,16 +528,16 @@
},
{
"name": "hellogerard/jobby",
"version": "v3.
2.1
",
"version": "v3.
0.3
",
"source": {
"type": "git",
"url": "https://github.com/
jobbyphp
/jobby.git",
"reference": "
9cb65663d35f6abba7e2d28347d74d501ce94861
"
"url": "https://github.com/
xiabin
/jobby.git",
"reference": "
4701b60aeb36f7b90052d17dcd998171d11448c4
"
},
"dist": {
"type": "zip",
"url": "https://
packagist.phpcomposer.com/files/jobbyphp/jobby/9cb65663d35f6abba7e2d28347d74d501ce94861.zip
",
"reference": "
9cb65663d35f6abba7e2d28347d74d501ce94861
",
"url": "https://
api.github.com/repos/xiabin/jobby/zipball/4701b60aeb36f7b90052d17dcd998171d11448c4
",
"reference": "
4701b60aeb36f7b90052d17dcd998171d11448c4
",
"shasum": ""
},
"require": {
...
...
@@ -557,7 +557,11 @@
"Jobby\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"autoload-dev": {
"psr-4": {
"Jobby\\Tests\\": "tests"
}
},
"license": [
"MIT"
],
...
...
@@ -574,7 +578,10 @@
],
"description": "Manage all your cron jobs without modifying crontab. Handles locking, logging, error emails, and more.",
"homepage": "https://github.com/jobbyphp/jobby",
"time": "2016-09-15 20:29:16"
"support": {
"source": "https://github.com/xiabin/jobby/tree/v3.0.3"
},
"time": "2016-07-11 13:54:34"
},
{
"name": "jeremeamia/SuperClosure",
...
...
@@ -881,16 +888,16 @@
},
{
"name": "qiniu/php-sdk",
"version": "v7.
0.8
",
"version": "v7.
1.1
",
"source": {
"type": "git",
"url": "https://github.com/qiniu/php-sdk.git",
"reference": "
d1bca450b56d85beb7ba21f374a47bfeb59c288b
"
"reference": "
e9cdc254c95188c8d13e0f04fab9648d790c42f9
"
},
"dist": {
"type": "zip",
"url": "https://packagist.phpcomposer.com/files/qiniu/php-sdk/
d1bca450b56d85beb7ba21f374a47bfeb59c288b
.zip",
"reference": "
d1bca450b56d85beb7ba21f374a47bfeb59c288b
",
"url": "https://packagist.phpcomposer.com/files/qiniu/php-sdk/
e9cdc254c95188c8d13e0f04fab9648d790c42f9
.zip",
"reference": "
e9cdc254c95188c8d13e0f04fab9648d790c42f9
",
"shasum": ""
},
"require": {
...
...
@@ -928,7 +935,7 @@
"sdk",
"storage"
],
"time": "2016-
07-19 06:18:08
"
"time": "2016-
11-02 03:10:06
"
},
{
"name": "swiftmailer/swiftmailer",
...
...
@@ -1142,16 +1149,16 @@
},
{
"name": "yiisoft/yii2",
"version": "2.0.
9
",
"version": "2.0.
10
",
"source": {
"type": "git",
"url": "https://github.com/yiisoft/yii2-framework.git",
"reference": "
2b75151ea60e1fd820046416eee2e89c3dda1133
"
"reference": "
5bfcb7a6dfa9771e2248eb8c4448613330f343ff
"
},
"dist": {
"type": "zip",
"url": "https://packagist.phpcomposer.com/files/yiisoft/yii2-framework/
2b75151ea60e1fd820046416eee2e89c3dda1133
.zip",
"reference": "
2b75151ea60e1fd820046416eee2e89c3dda1133
",
"url": "https://packagist.phpcomposer.com/files/yiisoft/yii2-framework/
5bfcb7a6dfa9771e2248eb8c4448613330f343ff
.zip",
"reference": "
5bfcb7a6dfa9771e2248eb8c4448613330f343ff
",
"shasum": ""
},
"require": {
...
...
@@ -1232,7 +1239,7 @@
"framework",
"yii2"
],
"time": "2016-
07-11 13:36:42
"
"time": "2016-
10-20 12:02:50
"
},
{
"name": "yiisoft/yii2-bootstrap",
...
...
@@ -1587,6 +1594,7 @@
"codeception",
"yii2"
],
"abandoned": "codeception/codeception",
"time": "2016-03-17 03:41:26"
},
{
...
...
src/console/controllers/TaskController.php
View file @
a57c0755
...
...
@@ -16,11 +16,20 @@ class TaskController extends Controller
{
public
function
actionIndex
()
{
$jobby
=
new
Jobby
();
$yiiCommand
=
$_SERVER
[
'SCRIPT_FILENAME'
];
if
(
YII_ENV_DEV
)
{
$phpBin
=
'php '
;
}
else
{
$phpBin
=
'/usr/local/webserver/php537/bin/php -c /usr/local/webserver/php537/etc/crontab.ini '
;
}
$jobby
=
new
Jobby
(
[
'phpBinary'
=>
$phpBin
]
);
$yiiCommand
=
realpath
(
$_SERVER
[
'SCRIPT_FILENAME'
]);
$output
=
Yii
::
getAlias
(
'@runtime'
)
.
"/logs/jobs-"
.
date
(
'Y-m-d'
)
.
".log"
;
if
(
YII_DEBUG
)
{
if
(
YII_ENV_DEV
)
{
$time
=
date
(
'Y-m-d H:i:s'
);
$jobby
->
add
(
'CommandExample'
,
[
...
...
@@ -43,17 +52,17 @@ class TaskController extends Controller
//minute hour mday month wday [year]
$jobby
->
add
(
'WithdrawSettle'
,
[
'command'
=>
"
$yiiCommand
withdraw/settle"
,
'command'
=>
"
$
phpBin
$
yiiCommand
withdraw/settle"
,
'schedule'
=>
'30 8 * * 1-5'
,
//每周一到周五上午8:30
'output'
=>
$output
,
'enabled'
=>
true
'enabled'
=>
TRUE
]);
$jobby
->
add
(
'ClearUploadPool'
,
[
'command'
=>
"
$yiiCommand
maintain/clear-upload-pool"
,
'command'
=>
"
$
phpBin
$
yiiCommand
maintain/clear-upload-pool"
,
'schedule'
=>
'15 */2 * * *'
,
//每隔两小时的第15分钟
'output'
=>
$output
,
'enabled'
=>
true
'enabled'
=>
TRUE
]);
$jobby
->
run
();
...
...
src/console/controllers/TestController.php
View file @
a57c0755
...
...
@@ -10,25 +10,12 @@ namespace console\controllers;
use
yii\console\Controller
;
use
yii\log\Logger
;
class
TestController
extends
Controller
{
public
function
actionIndex
(){
$t
=
mktime
();
set_time_limit
(
1000
);
$myFile
=
"./insert.sql"
;
$fhandler
=
fopen
(
$myFile
,
'wb'
);
if
(
$fhandler
){
$sql
=
"268
\t
2
\t
'0,262,268,'
\t
0
\t
'2342'
\t
'423423'
\t
'123123'
\t
'23423423'
\t
'2012-01-09 09:55:43'
\t
'upload/product/20111205153432_53211.jpg'
\t
'upload/product/thumb_20111205153432_53211.jpg'
\t
NULL
\t
NULL
\t
38
\t
'件'
\t
''
\t
123
\t
123
\t
0"
;
$i
=
0
;
while
(
$i
<
10
)
//1,000,000
{
$i
++
;
fwrite
(
$fhandler
,
$sql
.
"
\r\n
"
);
}
echo
"写入成功,耗时:"
,
mktime
()
-
$t
;
}
\Yii
::
getLogger
()
->
log
(
'test/index'
,
Logger
::
LEVEL_INFO
);
}
}
\ No newline at end of file
src/frontend/views/my-income/index.php
View file @
a57c0755
...
...
@@ -43,7 +43,9 @@ AppAsset::addScript($this, '@web/assets/my_income.js');
<ul
class=
"user-list-main"
id=
"userList"
>
<?php
foreach
(
$data
as
$row
)
{
?>
<li>
<div
class=
"reg-time"
><a
href=
"
<?=
\common\models\Course
::
url
(
$row
[
'order'
][
'course_id'
])
?>
"
target=
"_blank"
></a>
课程:
<?=
$row
[
'order'
][
'course'
][
'name'
]
?>
<span>
价格 ¥
<?=
$row
[
'order'
][
'credit'
]
?>
</span></div>
<div
class=
"reg-time"
>
<a
href=
"
<?=
\common\models\Course
::
url
(
$row
[
'order'
][
'course_id'
])
?>
"
target=
"_blank"
></a>
课程:
<?=
$row
[
'order'
][
'course'
][
'name'
]
?>
<span>
价格 ¥
<?=
$row
[
'order'
][
'credit'
]
?>
</span></div>
<div
class=
"user-detail-box"
>
<div
class=
"txt"
>
<p>
用户:
<?=
$row
[
'order'
][
'user'
][
'username'
]
?>
/
<?=
$row
[
'order'
][
'user'
][
'telephone'
]
?>
</p>
...
...
@@ -60,18 +62,19 @@ AppAsset::addScript($this, '@web/assets/my_income.js');
<?php
}
?>
</ul>
<script
type=
'text/javascript'
>
$
(
"#userList li .reg-time"
).
click
(
function
(){
var
activeindex
=
$
(
"#userList li"
).
find
(
".reg-time"
).
index
(
this
);
$
(
"#userList li"
).
find
(
".user-detail-box"
).
eq
(
activeindex
).
toggle
();
$
(
"#userList li"
).
find
(
".reg-time span"
).
eq
(
activeindex
).
toggle
();
});
</script>
<div
class=
"text-center"
>
<?=
\yii\widgets\LinkPager
::
widget
([
'pagination'
=>
$pagination
])
?>
</div>
</div>
<?php
}
else
{
?>
<div
class=
"empty-data"
style=
"margin-top:80px;"
>
您还没有卖出课程的记录!
</div>
<?php
}
?>
\ No newline at end of file
<?php
}
?>
<script
type=
'text/javascript'
>
$
(
"#userList li .reg-time"
).
click
(
function
(){
var
activeindex
=
$
(
"#userList li"
).
find
(
".reg-time"
).
index
(
this
);
$
(
"#userList li"
).
find
(
".user-detail-box"
).
eq
(
activeindex
).
toggle
();
$
(
"#userList li"
).
find
(
".reg-time span"
).
eq
(
activeindex
).
toggle
();
$
(
"#userList li"
).
find
(
".reg-time b"
).
eq
(
activeindex
).
toggle
();
});
</script>
src/frontend/views/my-member/index.php
View file @
a57c0755
...
...
@@ -38,8 +38,13 @@ $this->title = '我的会员';
<div
class=
"txt"
>
<p>
来自:推广
</p>
<p>
时间:
<?=
date
(
'Y年m月d日'
,
$row
[
'user'
][
'created_at'
])
?>
</p>
<?php
if
(
!
empty
(
$row
[
'first_order'
]))
{
?>
<p>
首次购买:
<a
target=
"_blank"
href=
"
<?=
\common\models\Course
::
url
(
$row
[
'first_order'
][
'course_id'
],
true
)
?>
"
>
《
<?=
$row
[
'first_order'
][
'course'
][
'name'
]
?>
》
</a></p>
<?php
}
else
{
?>
<p>
首次购买:无
</p>
<?php
}
?>
</div>
<div
class=
"consume"
>
<div
class=
"consume"
style=
"padding-top: 20px;"
>
累计消费
<br/>
<?=
$row
[
'credit_total'
]
?>
</div>
...
...
@@ -48,13 +53,7 @@ $this->title = '我的会员';
<?php
}
?>
</ul>
<?php
}
?>
<script
type=
'text/javascript'
>
$
(
"#userList li .reg-time"
).
click
(
function
(){
var
activeindex
=
$
(
"#userList li"
).
find
(
".reg-time"
).
index
(
this
);
$
(
"#userList li"
).
find
(
".user-detail-box"
).
eq
(
activeindex
).
toggle
();
$
(
"#userList li"
).
find
(
".reg-time span"
).
eq
(
activeindex
).
toggle
();
});
</script>
<div
class=
"text-center hide"
>
<?=
\yii\widgets\LinkPager
::
widget
([
'pagination'
=>
$pagination
])
?>
...
...
@@ -62,4 +61,12 @@ $this->title = '我的会员';
</div>
<?php
}
else
{
?>
<div
class=
"empty-data"
style=
"margin-top:80px;"
>
您还没有会员!
</div>
<?php
}
?>
\ No newline at end of file
<?php
}
?>
<script
type=
'text/javascript'
>
$
(
"#userList li .reg-time"
).
click
(
function
(){
var
activeindex
=
$
(
"#userList li"
).
find
(
".reg-time"
).
index
(
this
);
$
(
"#userList li"
).
find
(
".user-detail-box"
).
eq
(
activeindex
).
toggle
();
$
(
"#userList li"
).
find
(
".reg-time span"
).
eq
(
activeindex
).
toggle
();
});
</script>
src/frontend/web/css/style.css
View file @
a57c0755
...
...
@@ -1610,7 +1610,12 @@ textarea.input-r-control {
right
:
0
;
top
:
0
;
padding
:
0
20px
;
color
:
red
;
}
.user-list-main
li
div
.reg-time
b
{
font-weight
:
normal
;
}
.user-list-main
li
div
.reg-time
b
i
{
padding-left
:
10px
;
}
.user-list-main
li
div
.user-detail-box
{
...
...
@@ -1770,6 +1775,9 @@ textarea.input-r-control {
.buy-recode-top
.col-md-4
{
border-bottom
:
1px
solid
#f3f3f3
;
}
.buy-recode-top
.col-md-4
:last-child
{
border-bottom
:
none
;
}
}
.menu-mask
{
...
...
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