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
ed9c662a
Commit
ed9c662a
authored
Oct 27, 2016
by
汪波
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.fingerage.com:999/xiabin/zuiketang
into dev
parents
b7c19b43
bac5a4fe
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
15 deletions
+67
-15
main.php
src/backend/config/main.php
+4
-0
SiteController.php
src/backend/controllers/SiteController.php
+1
-2
index.php
src/backend/views/course/index.php
+1
-1
Course.php
src/common/models/Course.php
+2
-2
m161026_085127_transcode_queue.php
src/console/migrations/m161026_085127_transcode_queue.php
+1
-1
m161026_111007_admin_users.php
src/console/migrations/m161026_111007_admin_users.php
+43
-0
index.php
src/environments/prod/backend/web/index.php
+2
-2
QiniuCallbackController.php
src/frontend/controllers/QiniuCallbackController.php
+1
-0
classCenter.php
src/frontend/views/layouts/classCenter.php
+12
-7
No files found.
src/backend/config/main.php
View file @
ed9c662a
...
...
@@ -20,6 +20,10 @@ return [
'identityClass'
=>
'backend\models\User'
,
'enableAutoLogin'
=>
true
,
'identityCookie'
=>
[
'name'
=>
'_identity-backend'
,
'httpOnly'
=>
true
],
'on afterLogin'
=>
function
(
$event
)
{
$event
->
identity
->
logged_at
=
time
();
$event
->
identity
->
update
();
}
],
'session'
=>
[
// this is the name of the session cookie used for login on the backend
...
...
src/backend/controllers/SiteController.php
View file @
ed9c662a
...
...
@@ -2,8 +2,6 @@
namespace
backend\controllers
;
use
backend\models\LoginForm
;
use
backend\models\User
;
use
common\libs\Utils
;
use
Yii
;
use
yii\web\Controller
;
use
yii\filters\AccessControl
;
...
...
@@ -82,6 +80,7 @@ class SiteController extends Controller
}
$model
=
new
LoginForm
();
if
(
$model
->
load
(
Yii
::
$app
->
request
->
post
())
&&
$model
->
login
())
{
return
$this
->
goBack
();
}
else
{
...
...
src/backend/views/course/index.php
View file @
ed9c662a
...
...
@@ -52,7 +52,7 @@ $qiniu = \Yii::$app->qiniu;
<th>
时长/秒
</th>
<th>
文件大小
</th>
<th>
原始格式
</th>
<th>
价格/
元
</th>
<th>
价格/
分钟
</th>
<th>
免费试看/秒
</th>
<th>
ACTION
</th>
</tr>
...
...
src/common/models/Course.php
View file @
ed9c662a
...
...
@@ -254,9 +254,9 @@ class Course extends \yii\db\ActiveRecord
return
self
::
find
()
->
where
(
$where
)
->
sum
(
'comment_count'
);
}
public
static
function
url
(
$courseId
,
$schema
=
false
)
public
static
function
url
(
$courseId
)
{
return
Url
::
to
([
'home/video'
,
'courseId'
=>
$courseId
],
$schema
);
return
\Yii
::
$app
->
params
[
'baseUrl'
]
.
Url
::
to
([
'home/video'
,
'courseId'
=>
$courseId
]
);
}
/**
...
...
src/console/migrations/m161026_085127_transcode_queue.php
View file @
ed9c662a
...
...
@@ -5,7 +5,7 @@ use yii\db\Migration;
class
m161026_085127_transcode_queue
extends
Migration
{
public
$table
=
'{{%ranscode_queue}}'
;
public
$table
=
'{{%
t
ranscode_queue}}'
;
public
function
up
()
{
...
...
src/console/migrations/m161026_111007_admin_users.php
0 → 100644
View file @
ed9c662a
<?php
use
yii\db\Migration
;
class
m161026_111007_admin_users
extends
Migration
{
public
$table
=
'{{%admin_users}}'
;
public
function
up
()
{
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
(
10
)
->
unsigned
()
->
notNull
(),
'username'
=>
$this
->
string
(
50
)
->
notNull
(),
'auth_key'
=>
$this
->
string
(
30
)
->
notNull
(),
'password_hash'
=>
$this
->
string
(
255
)
->
notNull
(),
'status'
=>
$this
->
smallInteger
(
2
)
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0正常, 1锁定'
),
'ip'
=>
$this
->
string
(
32
)
->
notNull
(),
'created_at'
=>
$this
->
integer
(
10
)
->
unsigned
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
(
10
)
->
unsigned
()
->
notNull
(),
'logged_at'
=>
$this
->
integer
(
10
)
->
unsigned
()
->
notNull
()
]);
$this
->
addCommentOnTable
(
$this
->
table
,
'管理员用户'
);
$this
->
createIndex
(
'uesrname'
,
$this
->
table
,
'username'
,
true
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
src/environments/prod/backend/web/index.php
View file @
ed9c662a
<?php
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
tru
e
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'
dev
'
);
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
fals
e
);
defined
(
'YII_ENV'
)
or
define
(
'YII_ENV'
,
'
prod
'
);
if
(
!
function_exists
(
'fnmatch'
))
{
function
fnmatch
(
$pattern
,
$string
)
{
...
...
src/frontend/controllers/QiniuCallbackController.php
View file @
ed9c662a
...
...
@@ -14,6 +14,7 @@ use common\models\Courseware;
use
common\models\TranscodeQueue
;
use
common\models\UploadPools
;
use
Yii
;
use
yii\log\Logger
;
use
yii\web\Response
;
class
QiniuCallbackController
extends
\yii\web\Controller
...
...
src/frontend/views/layouts/classCenter.php
View file @
ed9c662a
...
...
@@ -12,34 +12,39 @@ $this->beginContent('@app/views/layouts/center.php');
<div
class=
"logo"
><a
href=
"/"
><img
src=
"
<?=
Yii
::
$app
->
assetManager
->
baseUrl
?>
/img/logo.png"
></a></div>
<div
class=
"side-menu"
>
<!-- Contenedor -->
<ul
id=
"accordion"
class=
"accordion"
>
<ul
id=
"accordion"
class=
"accordion"
data-route=
"
<?=
Yii
::
$app
->
controller
->
id
?>
_
<?=
Yii
::
$app
->
requestedAction
->
id
?>
"
>
<li>
<div
class=
"link"
><i
class=
"icon-school"
></i>
我的课堂
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li
class=
"
active
"
><a
href=
"/classes-info"
>
课堂概况
</a></li>
<li><a
href=
"/teacher-manager"
>
讲师管理
</a></li>
<li
class=
"
RT_classes-info_index
"
><a
href=
"/classes-info"
>
课堂概况
</a></li>
<li
class=
"RT_teacher-manager_index RT_teacher-manager_edit RT_teacher-manager_add"
><a
href=
"/teacher-manager"
>
讲师管理
</a></li>
</ul>
</li>
<li>
<div
class=
"link"
><i
class=
"icon-play_circle_outline"
></i>
我的课程
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"/my-course/publish"
>
发布课程
</a></li>
<li><a
href=
"/my-course"
>
课程列表
</a></li>
<li
class=
"RT_my-course_publish RT_my-course_edit"
><a
href=
"/my-course/publish"
>
发布课程
</a></li>
<li
class=
"RT_my-course_index"
><a
href=
"/my-course"
>
课程列表
</a></li>
</ul>
</li>
<li>
<div
class=
"link"
><i
class=
"icon-person_pin"
></i>
我的会员
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"/my-member"
>
会员列表
</a></li>
<li
class=
"RT_my-member_index"
><a
href=
"/my-member"
>
会员列表
</a></li>
</ul>
</li>
<li>
<div
class=
"link"
><i
class=
"icon-layers"
></i>
知识有价
<i
class=
"icon-navigate_next"
></i></div>
<ul
class=
"submenu"
>
<li><a
href=
"/my-income"
>
购买记录
</a></li>
<li
class=
"RT_my-income_index"
><a
href=
"/my-income"
>
购买记录
</a></li>
</ul>
</li>
</ul>
<script>
var
accordion
=
$
(
"#accordion"
);
var
currentRoute
=
accordion
.
data
(
"route"
);
accordion
.
find
(
"li.RT_"
+
currentRoute
).
addClass
(
"active"
);
</script>
<a
class=
"loginout"
href=
"
<?=
\yii\helpers\Url
::
base
()
.
'/site/logout'
?>
"
><i
class=
"icon-power_settings_new"
></i>
退出登录
</a>
</div>
</div>
...
...
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