diff --git a/app/Http/Admin/Controllers/UserController.php b/app/Http/Admin/Controllers/UserController.php
index e90039d3..d1482164 100644
--- a/app/Http/Admin/Controllers/UserController.php
+++ b/app/Http/Admin/Controllers/UserController.php
@@ -84,7 +84,7 @@ class UserController extends Controller
$roles = $userService->getRoles();
if ($user->admin_role == RoleModel::ROLE_ROOT) {
- $this->response->redirect(['action' => 'list']);
+ $this->response->redirect(['for' => 'admin.user.list']);
}
$this->view->setVar('user', $user);
diff --git a/app/Http/Admin/Views/nav/list.volt b/app/Http/Admin/Views/nav/list.volt
index 669a1eed..20bf8ba2 100644
--- a/app/Http/Admin/Views/nav/list.volt
+++ b/app/Http/Admin/Views/nav/list.volt
@@ -4,17 +4,17 @@
{%- macro position_info(value) %}
{% if value == 1 %}
- 顶部
+ 顶部
{% elseif value == 2 %}
- 底部
+ 底部
{% endif %}
{%- endmacro %}
{%- macro target_info(value) %}
{% if value == '_blank' %}
- 新窗口
+ 新窗口
{% elseif value == '_self' %}
- 原窗口
+ 原窗口
{% endif %}
{%- endmacro %}
diff --git a/app/Http/Admin/Views/order/macro.volt b/app/Http/Admin/Views/order/macro.volt
index f6ef13a7..6424d9f7 100644
--- a/app/Http/Admin/Views/order/macro.volt
+++ b/app/Http/Admin/Views/order/macro.volt
@@ -38,28 +38,28 @@
{%- macro item_type(value) %}
{% if value == 1 %}
- 课程
+ 课程
{% elseif value == 2 %}
- 套餐
+ 套餐
{% elseif value == 3 %}
- 赞赏
+ 赞赏
{% elseif value == 4 %}
- 会员
+ 会员
{% elseif value == 99 %}
- 测试
+ 测试
{% endif %}
{%- endmacro %}
{%- macro order_status(value) %}
{% if value == 1 %}
- 待支付
+ 待支付
{% elseif value == 2 %}
- 发货中
+ 发货中
{% elseif value == 3 %}
- 已完成
+ 已完成
{% elseif value == 4 %}
- 已关闭
+ 已关闭
{% elseif value == 5 %}
- 已退款
+ 已退款
{% endif %}
{%- endmacro %}
\ No newline at end of file
diff --git a/app/Http/Admin/Views/refund/macro.volt b/app/Http/Admin/Views/refund/macro.volt
index d377f90e..6320281f 100644
--- a/app/Http/Admin/Views/refund/macro.volt
+++ b/app/Http/Admin/Views/refund/macro.volt
@@ -1,16 +1,16 @@
{%- macro refund_status(value) %}
{% if value == 1 %}
- 待处理
+ 待处理
{% elseif value == 2 %}
- 已取消
+ 已取消
{% elseif value == 3 %}
- 已审核
+ 已审核
{% elseif value == 4 %}
- 已拒绝
+ 已拒绝
{% elseif value == 5 %}
- 已完成
+ 已完成
{% elseif value == 6 %}
- 已失败
+ 已失败
{% endif %}
{%- endmacro %}
diff --git a/app/Http/Admin/Views/role/list.volt b/app/Http/Admin/Views/role/list.volt
index b89a2d79..ab2dceab 100644
--- a/app/Http/Admin/Views/role/list.volt
+++ b/app/Http/Admin/Views/role/list.volt
@@ -3,10 +3,10 @@
{% block content %}
{%- macro type_info(value) %}
- {% if value == 'system' %}
- 内置
- {% elseif value == 'custom' %}
- 自定
+ {% if value == 1 %}
+ 内置
+ {% elseif value == 2 %}
+ 自定义
{% endif %}
{%- endmacro %}
@@ -43,7 +43,7 @@
{% set restore_url = url({'for':'admin.role.restore','id':item.id}) %}
{{ item.id }} |
- {{ item.name }} |
+ {{ item.name }} |
{{ type_info(item.type) }} |
diff --git a/app/Http/Admin/Views/slide/list.volt b/app/Http/Admin/Views/slide/list.volt
index fb832a23..919d8c0c 100644
--- a/app/Http/Admin/Views/slide/list.volt
+++ b/app/Http/Admin/Views/slide/list.volt
@@ -4,11 +4,11 @@
{%- macro target_info(value) %}
{% if value == 1 %}
- 课程
+ 课程
{% elseif value == 2 %}
- 单页
+ 单页
{% elseif value == 3 %}
- 链接
+ 链接
{% endif %}
{%- endmacro %}
diff --git a/app/Http/Admin/Views/student/list.volt b/app/Http/Admin/Views/student/list.volt
index 453db91d..bc673b7b 100644
--- a/app/Http/Admin/Views/student/list.volt
+++ b/app/Http/Admin/Views/student/list.volt
@@ -4,11 +4,11 @@
{%- macro source_type_info(value) %}
{% if value == 1 %}
- 免费
+ 免费
{% elseif value == 2 %}
付费
{% elseif value == 3 %}
- 导入
+ 导入
{% endif %}
{%- endmacro %}
diff --git a/app/Http/Admin/Views/templates/layer.volt b/app/Http/Admin/Views/templates/layer.volt
index 96287252..529288fe 100644
--- a/app/Http/Admin/Views/templates/layer.volt
+++ b/app/Http/Admin/Views/templates/layer.volt
@@ -1,7 +1,7 @@
-
+
diff --git a/app/Http/Admin/Views/templates/main.volt b/app/Http/Admin/Views/templates/main.volt
index 5e222058..3c1345f1 100644
--- a/app/Http/Admin/Views/templates/main.volt
+++ b/app/Http/Admin/Views/templates/main.volt
@@ -1,7 +1,7 @@
-
+
diff --git a/app/Http/Admin/Views/trade/macro.volt b/app/Http/Admin/Views/trade/macro.volt
index df25e586..331f7ad3 100644
--- a/app/Http/Admin/Views/trade/macro.volt
+++ b/app/Http/Admin/Views/trade/macro.volt
@@ -1,20 +1,20 @@
{%- macro channel_type(value) %}
{% if value == 1 %}
- 支付宝
+ 支付宝
{% elseif value == 2 %}
- 微信
+ 微信
{% endif %}
{%- endmacro %}
{%- macro trade_status(value) %}
{% if value == 1 %}
- 待支付
+ 待支付
{% elseif value == 2 %}
- 已完成
+ 已完成
{% elseif value == 3 %}
- 已关闭
+ 已关闭
{% elseif value == 4 %}
- 已退款
+ 已退款
{% endif %}
{%- endmacro %}
diff --git a/app/Http/Admin/Views/user/list.volt b/app/Http/Admin/Views/user/list.volt
index 837e94cb..19eac204 100644
--- a/app/Http/Admin/Views/user/list.volt
+++ b/app/Http/Admin/Views/user/list.volt
@@ -4,25 +4,25 @@
{%- macro gender_info(value) %}
{% if value == 1 %}
- 男
+ 男
{% elseif value == 2 %}
- 女
+ 女
{% elseif value == 3 %}
- 密
+ 密
{% endif %}
{%- endmacro %}
{%- macro edu_role_info(user) %}
{% if user.edu_role.id == 1 %}
- 学员
+ 学员
{% elseif user.edu_role.id == 2 %}
- 讲师
+ 讲师
{% endif %}
{%- endmacro %}
{%- macro admin_role_info(user) %}
- {% if user.admin_role.id %}
- {{ user.admin_role.name }}
+ {% if user.admin_role.id > 0 %}
+ {{ user.admin_role.name }}
{% endif %}
{%- endmacro %}
diff --git a/app/Http/Home/Controllers/AccountController.php b/app/Http/Home/Controllers/AccountController.php
index a0a22076..4e2fc3d0 100644
--- a/app/Http/Home/Controllers/AccountController.php
+++ b/app/Http/Home/Controllers/AccountController.php
@@ -7,11 +7,7 @@ use App\Services\Logic\Account\EmailUpdate as EmailUpdateService;
use App\Services\Logic\Account\PasswordReset as PasswordResetService;
use App\Services\Logic\Account\PasswordUpdate as PasswordUpdateService;
use App\Services\Logic\Account\PhoneUpdate as PhoneUpdateService;
-use Phalcon\Mvc\View;
-/**
- * @RoutePrefix("/account")
- */
class AccountController extends Controller
{
@@ -24,12 +20,12 @@ class AccountController extends Controller
$this->response->redirect('/');
}
+ $returnUrl = $this->request->getHTTPReferer();
+
$service = new AccountService();
$captcha = $service->getSettings('captcha');
- $returnUrl = $this->request->getHTTPReferer();
-
$this->view->setVar('return_url', $returnUrl);
$this->view->setVar('captcha', $captcha);
}
@@ -137,60 +133,6 @@ class AccountController extends Controller
$this->view->setVar('captcha', $captcha);
}
- /**
- * @Get("/password/edit", name="home.account.edit_pwd")
- */
- public function editPasswordAction()
- {
- if ($this->authUser->id == 0) {
- $this->response->redirect(['for' => 'home.account.login']);
- }
-
- $service = new AccountService();
-
- $captcha = $service->getSettings('captcha');
-
- $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
- $this->view->pick('account/edit_password');
- $this->view->setVar('captcha', $captcha);
- }
-
- /**
- * @Get("/phone/edit", name="home.account.edit_phone")
- */
- public function editPhoneAction()
- {
- if ($this->authUser->id == 0) {
- $this->response->redirect(['for' => 'home.account.login']);
- }
-
- $service = new AccountService();
-
- $captcha = $service->getSettings('captcha');
-
- $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
- $this->view->pick('account/edit_phone');
- $this->view->setVar('captcha', $captcha);
- }
-
- /**
- * @Get("/email/edit", name="home.account.edit_email")
- */
- public function editEmailAction()
- {
- if ($this->authUser->id == 0) {
- $this->response->redirect(['for' => 'home.account.login']);
- }
-
- $service = new AccountService();
-
- $captcha = $service->getSettings('captcha');
-
- $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
- $this->view->pick('account/edit_email');
- $this->view->setVar('captcha', $captcha);
- }
-
/**
* @Post("/password/reset", name="home.account.reset_pwd")
*/
@@ -219,7 +161,12 @@ class AccountController extends Controller
$service->handle();
- $content = ['msg' => '更新手机成功'];
+ $location = $this->url->get(['for' => 'home.uc.account']);
+
+ $content = [
+ 'location' => $location,
+ 'msg' => '更新手机成功',
+ ];
return $this->jsonSuccess($content);
}
@@ -233,7 +180,12 @@ class AccountController extends Controller
$service->handle();
- $content = ['msg' => '更新邮箱成功'];
+ $location = $this->url->get(['for' => 'home.uc.account']);
+
+ $content = [
+ 'location' => $location,
+ 'msg' => '更新邮箱成功',
+ ];
return $this->jsonSuccess($content);
}
@@ -247,7 +199,12 @@ class AccountController extends Controller
$service->handle();
- $content = ['msg' => '更新密码成功'];
+ $location = $this->url->get(['for' => 'home.uc.account']);
+
+ $content = [
+ 'location' => $location,
+ 'msg' => '更新密码成功',
+ ];
return $this->jsonSuccess($content);
}
diff --git a/app/Http/Home/Controllers/ImController.php b/app/Http/Home/Controllers/ImController.php
index a42f4066..f768edb4 100644
--- a/app/Http/Home/Controllers/ImController.php
+++ b/app/Http/Home/Controllers/ImController.php
@@ -24,7 +24,7 @@ class ImController extends Controller
}
/**
- * @Get("/index", name="home.im.index")
+ * @Get("/", name="home.im.index")
*/
public function indexAction()
{
diff --git a/app/Http/Home/Controllers/TeacherConsoleController.php b/app/Http/Home/Controllers/TeacherConsoleController.php
index d98b46c7..53164fe3 100644
--- a/app/Http/Home/Controllers/TeacherConsoleController.php
+++ b/app/Http/Home/Controllers/TeacherConsoleController.php
@@ -1,6 +1,5 @@
substr($pushUrl, $pos + 1),
];
- $this->view->pick('teacher/console/live_push');
+ $this->view->pick('teacher/console/live');
$this->view->setVar('qrcode', $qrcode);
$this->view->setVar('obs', $obs);
}
diff --git a/app/Http/Home/Controllers/UserConsoleController.php b/app/Http/Home/Controllers/UserConsoleController.php
index dd814a93..5e159e0e 100644
--- a/app/Http/Home/Controllers/UserConsoleController.php
+++ b/app/Http/Home/Controllers/UserConsoleController.php
@@ -34,7 +34,7 @@ class UserConsoleController extends Controller
}
/**
- * @Get("/index", name="home.uc.index")
+ * @Get("/", name="home.uc.index")
*/
public function indexAction()
{
@@ -61,9 +61,23 @@ class UserConsoleController extends Controller
{
$service = new AccountInfoService();
+ $captcha = $service->getSettings('captcha');
+
$account = $service->handle();
- $this->view->pick('user/console/account');
+ $type = $this->request->getQuery('type', 'string', 'info');
+
+ if ($type == 'info') {
+ $this->view->pick('user/console/account_info');
+ } elseif ($type == 'phone') {
+ $this->view->pick('user/console/account_phone');
+ } elseif ($type == 'email') {
+ $this->view->pick('user/console/account_email');
+ } elseif ($type == 'password') {
+ $this->view->pick('user/console/account_password');
+ }
+
+ $this->view->setVar('captcha', $captcha);
$this->view->setVar('account', $account);
}
@@ -183,8 +197,10 @@ class UserConsoleController extends Controller
$service->handle();
+ $location = $this->url->get(['for' => 'home.uc.profile']);
+
$content = [
- 'location' => $this->request->getHTTPReferer(),
+ 'location' => $location,
'msg' => '更新资料成功',
];
diff --git a/app/Http/Home/Views/account/edit_email.volt b/app/Http/Home/Views/account/edit_email.volt
deleted file mode 100644
index 9a9b1b09..00000000
--- a/app/Http/Home/Views/account/edit_email.volt
+++ /dev/null
@@ -1,42 +0,0 @@
-{% extends 'templates/layer.volt' %}
-
-{% block content %}
-
-
-
-{% endblock %}
-
-{% block include_js %}
-
- {{ js_include('https://ssl.captcha.qq.com/TCaptcha.js',false) }}
- {{ js_include('home/js/captcha.verify.js') }}
-
-{% endblock %}
\ No newline at end of file
diff --git a/app/Http/Home/Views/account/edit_password.volt b/app/Http/Home/Views/account/edit_password.volt
deleted file mode 100644
index b13a77d8..00000000
--- a/app/Http/Home/Views/account/edit_password.volt
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends 'templates/layer.volt' %}
-
-{% block content %}
-
-
-
-{% endblock %}
\ No newline at end of file
diff --git a/app/Http/Home/Views/account/edit_phone.volt b/app/Http/Home/Views/account/edit_phone.volt
deleted file mode 100644
index d24685ca..00000000
--- a/app/Http/Home/Views/account/edit_phone.volt
+++ /dev/null
@@ -1,42 +0,0 @@
-{% extends 'templates/layer.volt' %}
-
-{% block content %}
-
-
-
-{% endblock %}
-
-{% block include_js %}
-
- {{ js_include('https://ssl.captcha.qq.com/TCaptcha.js',false) }}
- {{ js_include('home/js/captcha.verify.js') }}
-
-{% endblock %}
\ No newline at end of file
diff --git a/app/Http/Home/Views/account/forget_password.volt b/app/Http/Home/Views/account/forget_password.volt
index d72ccd9d..e6db53df 100644
--- a/app/Http/Home/Views/account/forget_password.volt
+++ b/app/Http/Home/Views/account/forget_password.volt
@@ -16,20 +16,20 @@
|