diff --git a/app/Http/Admin/Services/Category.php b/app/Http/Admin/Services/Category.php
index 7819da30..af6087ca 100644
--- a/app/Http/Admin/Services/Category.php
+++ b/app/Http/Admin/Services/Category.php
@@ -43,7 +43,7 @@ class Category extends Service
public function getChildCategories($parentId)
{
- $deleted = $this->request->getQuery('deleted', ['int'], 0);
+ $deleted = $this->request->getQuery('deleted', 'int', 0);
$categoryRepo = new CategoryRepo();
diff --git a/app/Http/Admin/Services/Nav.php b/app/Http/Admin/Services/Nav.php
index 78c6e215..fceb868d 100644
--- a/app/Http/Admin/Services/Nav.php
+++ b/app/Http/Admin/Services/Nav.php
@@ -35,7 +35,7 @@ class Nav extends Service
return $navRepo->findAll([
'position' => NavModel::POS_TOP,
'parent_id' => 0,
- 'published' => 1,
+ 'deleted' => 0,
]);
}
diff --git a/app/Http/Admin/Services/Setting.php b/app/Http/Admin/Services/Setting.php
index a3f4104b..e6a18d10 100644
--- a/app/Http/Admin/Services/Setting.php
+++ b/app/Http/Admin/Services/Setting.php
@@ -114,20 +114,7 @@ class Setting extends Service
public function updateSmserSettings($section, $settings)
{
- $template = $settings['template'];
-
- $keys = array_keys($template['id']);
-
- $myTemplate = [];
-
- foreach ($keys as $key) {
- $myTemplate[$key] = [
- 'id' => $template['id'][$key],
- 'content' => $template['content'][$key],
- ];
- }
-
- $settings['template'] = kg_json_encode($myTemplate);
+ $settings['template'] = kg_json_encode($settings['template']);
$this->updateSectionSettings($section, $settings);
}
diff --git a/app/Http/Admin/Views/category/list.volt b/app/Http/Admin/Views/category/list.volt
index 76ca10d9..840af593 100644
--- a/app/Http/Admin/Views/category/list.volt
+++ b/app/Http/Admin/Views/category/list.volt
@@ -2,9 +2,9 @@
{% block content %}
- {% set back_url = url({'for':'admin.category.list'}) %}
+ {% set back_url = url({'for':'admin.category.list'},{'type':type}) %}
{% set add_url = url({'for':'admin.category.add'},{'type':type,'parent_id':parent.id}) %}
- {% set allow_add = (type == 'course' and parent.level < 2) or (type == 'help' and parent.level < 1) %}
+ {% set allow_add = (type == 1 and parent.level < 2) or (type == 2 and parent.level < 1) %}
@@ -46,7 +46,6 @@
{% for item in categories %}
- {% set show_child_url = item.type == 'course' and item.level < 2 %}
{% set child_url = url({'for':'admin.category.list'},{'type':item.type,'parent_id':item.id}) %}
{% set edit_url = url({'for':'admin.category.edit','id':item.id}) %}
{% set update_url = url({'for':'admin.category.update','id':item.id}) %}
@@ -54,10 +53,10 @@
{% set restore_url = url({'for':'admin.category.restore','id':item.id}) %}
{{ item.id }} |
- {% if show_child_url %}
+ {% if item.type == 1 and item.level < 2 %}
{{ item.name }} |
{% else %}
- {{ item.name }} |
+ {{ item.name }} |
{% endif %}
{{ item.level }} |
{{ item.child_count }} |
diff --git a/app/Http/Admin/Views/nav/list.volt b/app/Http/Admin/Views/nav/list.volt
index c20efa6c..2e6a65ab 100644
--- a/app/Http/Admin/Views/nav/list.volt
+++ b/app/Http/Admin/Views/nav/list.volt
@@ -72,10 +72,10 @@
{% set restore_url = url({'for':'admin.nav.restore','id':item.id}) %}
{{ item.id }} |
- {% if item.position == 'top' and item.level < 2 %}
+ {% if item.position == 1 and item.level < 2 %}
{{ item.name }} |
{% else %}
- {{ item.name }} |
+ {{ item.name }} |
{% endif %}
{{ item.level }} |
{{ item.child_count }} |
diff --git a/app/Http/Admin/Views/setting/smser.volt b/app/Http/Admin/Views/setting/smser.volt
index ce9f9e41..a9ba080c 100644
--- a/app/Http/Admin/Views/setting/smser.volt
+++ b/app/Http/Admin/Views/setting/smser.volt
@@ -47,26 +47,26 @@
身份验证 |
- |
- |
+ |
+ |
复制 |
订单通知 |
- |
- |
+ |
+ |
复制 |
退款通知 |
- |
- |
+ |
+ |
复制 |
直播通知 |
- |
- |
+ |
+ |
复制 |
diff --git a/db/migrations/20200827112717_insert_setting_data.php b/db/migrations/20200827112717_insert_setting_data.php
index 949f0af7..f20635f1 100644
--- a/db/migrations/20200827112717_insert_setting_data.php
+++ b/db/migrations/20200827112717_insert_setting_data.php
@@ -348,7 +348,7 @@ final class InsertSettingData extends AbstractMigration
[
'section' => 'smser',
'item_key' => 'template',
- 'item_value' => '{"verify":{"id":"561282","content":"验证码:{1},{2} 分钟内有效,如非本人操作请忽略。"},"order":{"id":"561954","content":"下单成功,商品名称:{1},订单序号:{2},订单金额:¥{3}"},"refund":{"id":"561286","content":"退款成功,商品名称:{1},订单序号:{2},退款金额:¥{3}"},"live":{"id":"561288","content":"直播预告,课程名称:{1},章节名称:{2},开播时间:{3}"}}',
+ 'item_value' => '{"verify":"561282","order":"561954","refund":"561286","live":"561288"}',
],
[
'section' => 'cos',