Skip to content

Commit

Permalink
屏蔽空工单回复提醒,修复我之前加的功能为摆设的问题(Markdown不提交,后端不接收)。
Browse files Browse the repository at this point in the history
  • Loading branch information
Colinwood11 committed Apr 29, 2019
1 parent eac0f88 commit 83c1142
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions app/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ public function ticket_add($request, $response, $args)
$ticket->datetime = time();
$ticket->save();

if(Config::get('mail_ticket') == 'true'){
if(Config::get('mail_ticket') == 'true' && $markdown !=''){
$adminUser = User::where("is_admin", "=", "1")->get();
foreach ($adminUser as $user) {
$subject = Config::get('appName') . "-新工单被开启";
Expand All @@ -1251,7 +1251,7 @@ public function ticket_add($request, $response, $args)
}
}

if(Config::get('useScFtqq') == 'true'){
if(Config::get('useScFtqq') == 'true' && $markdown !=''){
$ScFtqq_SCKEY = Config::get('ScFtqq_SCKEY');
$postdata = http_build_query(
array(
Expand All @@ -1278,6 +1278,7 @@ public function ticket_update($request, $response, $args)
$id = $args['id'];
$content = $request->getParam('content');
$status = $request->getParam('status');
$markdown = $request->getParam('markdown');

if ($content == "" || $status == "") {
$res['ret'] = 0;
Expand All @@ -1299,7 +1300,7 @@ public function ticket_update($request, $response, $args)
}

if ($status == 1 && $ticket_main->status != $status) {
if(Config::get('mail_ticket') == 'true'){
if(Config::get('mail_ticket') == 'true' && $markdown !=''){
$adminUser = User::where("is_admin", "=", "1")->get();
foreach ($adminUser as $user) {
$subject = Config::get('appName') . "-工单被重新开启";
Expand All @@ -1315,7 +1316,7 @@ public function ticket_update($request, $response, $args)
}
}
}
if(Config::get('useScFtqq') == 'true'){
if(Config::get('useScFtqq') == 'true' && $markdown !=''){
$ScFtqq_SCKEY = Config::get('ScFtqq_SCKEY');
$postdata = http_build_query(
array(
Expand All @@ -1333,7 +1334,7 @@ public function ticket_update($request, $response, $args)
$useScFtqq = Config::get('ScFtqq_SCKEY');
}
} else {
if(Config::get('mail_ticket') == 'true'){
if(Config::get('mail_ticket') == 'true' && $markdown !=''){
$adminUser = User::where("is_admin", "=", "1")->get();
foreach ($adminUser as $user) {
$subject = Config::get('appName') . "-工单被回复";
Expand All @@ -1349,7 +1350,7 @@ public function ticket_update($request, $response, $args)
}
}
}
if(Config::get('useScFtqq') == 'true'){
if(Config::get('useScFtqq') == 'true' && $markdown !=''){
$ScFtqq_SCKEY = Config::get('ScFtqq_SCKEY');
$postdata = http_build_query(
array(
Expand Down
2 changes: 1 addition & 1 deletion resources/views/material/admin/announcement/create.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
dataType: "json",
data: {
content: editor.getHTML(),
markdown: editor.getMarkdown(),
markdown: $('.editormd-markdown-textarea').val(),
vip: $$getValue('vip'),
issend,
PushBear,
Expand Down
2 changes: 1 addition & 1 deletion resources/views/material/user/ticket_create.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
dataType: "json",
data: {
content: editor.getHTML(),
markdown: editor.getMarkdown(),
markdown: $('.editormd-markdown-textarea').val(),
title: $("#title").val()
},
success: function (data) {
Expand Down

0 comments on commit 83c1142

Please sign in to comment.