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
a5b9c702
Commit
a5b9c702
authored
Oct 26, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课堂申请成功后的优化
parent
af24c146
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
UserCenterController.php
src/frontend/controllers/UserCenterController.php
+19
-0
userCenter.php
src/frontend/views/layouts/userCenter.php
+1
-1
No files found.
src/frontend/controllers/UserCenterController.php
View file @
a5b9c702
...
...
@@ -12,6 +12,7 @@ namespace frontend\controllers;
use
common\libs\Test
;
use
common\libs\Utils
;
use
common\models\BrowseRecord
;
use
common\models\Classes
;
use
common\models\Favorite
;
use
common\models\Orders
;
use
common\models\UploadPools
;
...
...
@@ -46,6 +47,24 @@ class UserCenterController extends Controller
];
}
/**
* 获取课堂状态
* @return string
*/
public
static
function
getClassStatus
()
{
$classInfo
=
Classes
::
getUserClass
(
Yii
::
$app
->
user
->
id
);
if
(
$classInfo
===
NULL
)
{
$status
=
"申请课堂"
;
}
else
if
(
$classInfo
[
'status'
]
===
'0'
)
{
$status
=
"课堂审核中…"
;
}
else
if
(
$classInfo
[
'status'
]
===
'1'
)
{
$status
=
"我的课堂"
;
}
else
if
(
$classInfo
[
'status'
]
===
'2'
)
{
$status
=
"申请课堂"
;
}
return
$status
;
}
/**
* 个人信息页面
...
...
src/frontend/views/layouts/userCenter.php
View file @
a5b9c702
...
...
@@ -38,7 +38,7 @@ $this->beginContent('@app/views/layouts/center.php');
</ul>
<div
class=
"apply-class"
>
<button
class=
"btn btn-danger"
onclick=
"location.href='/classes-info/apply';"
>
申请课堂
</button>
<button
class=
"btn btn-danger"
onclick=
"location.href='/classes-info/apply';"
>
<?=
\frontend\controllers\UserCenterController
::
getClassStatus
()
?>
</button>
</div>
<a
class=
"loginout"
href=
"
<?=
$baseUrl
.
'/site/logout'
?>
"
><i
class=
"icon-power_settings_new"
></i>
退出登录
</a>
...
...
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