Skip to content

Commit

Permalink
Merge pull request #50 from Comsenz/master
Browse files Browse the repository at this point in the history
v2.1.201126
  • Loading branch information
yulei745 authored Nov 26, 2020
2 parents 8bf7c0f + 19538e4 commit 3cdafea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions app/Api/Controller/Posts/ListPostsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,14 @@ private function getCache($params, $filter, $document)

private function canCache($params)
{
//pc端倒序不允许使用缓存
if($params['sort'] == '-createdAt'){
return false;
}
if (isset($params['filter'])) {
if(!isset($params['filter']['isComment'])){
return false;
}
if (strtolower($params['filter']['isComment']) == 'yes') {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Commands/Question/CreateQuestionAnswer.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function handle(EventDispatcher $events, Censor $censor, Question $questi
// check
$content = $censor->checkText(Arr::get($this->data, 'attributes.content'));
if (count($censor->wordMod) > 0) {
throw new CensorNotPassedException('content_banned', $censor->wordMod);
throw new CensorNotPassedException('content_banned_show_words', $censor->wordMod);
}

$question->content = $content;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ export default {
window.open(routeData.href, '_blank');
},

editClick(id){
editClick(id,typeId){
let routeData = this.$router.resolve({
path: `/thread/post?type=1&operating=edit&threadId=${id}`
path: `/thread/post?type=${typeId}&operating=edit&threadId=${id}`
});
window.open(routeData.href, '_blank');
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
v-if="items.threadVideo && items.threadVideo._data.status == 2"
>转码失败</el-button>
<el-button type="text" @click="viewClick(items._data.id)">查看</el-button>
<el-button type="text" @click="editClick(items._data.id)">编辑</el-button>
<el-button type="text" @click="editClick(items._data.id,items._data.type)">编辑</el-button>
</div>
</div>
</ContArrange>
Expand Down

0 comments on commit 3cdafea

Please sign in to comment.