Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
daiao 5 years ago
commit 019b0d5c30

@ -67,15 +67,11 @@ class ShixunsController < ApplicationController
## 排序参数
bsort = params[:sort] || 'desc'
case params[:order_by] || 'publish_time'
when 'new'
@shixuns = @shixuns.order("shixuns.status = 2 desc, shixuns.created_at #{bsort}")
case params[:order_by] || 'new'
when 'hot'
@shixuns = @shixuns.order("shixuns.status = 2 desc, shixuns.myshixuns_count #{bsort}")
when 'mine'
@shixuns = @shixuns.order("shixuns.created_at #{bsort}")
@shixuns = @shixuns.order("shixuns.public = 2 desc, shixuns.myshixuns_count #{bsort}")
else
@shixuns = @shixuns.order("shixuns.status = 2 desc, shixuns.publish_time #{bsort}")
@shixuns = @shixuns.order("shixuns.public = 2 desc, shixuns.publish_time #{bsort}")
end
# 用id计数会快10+MS左右,对于搜索的内容随着数据的增加,性能会提升一些。

@ -1450,7 +1450,6 @@ class PollNew extends Component {
//object 单个数组数据
Deleteadddomthree = (indexo, object,bool) => {
this.setState({
Newdisplay:false,
newoption: false,
})
// console.log("deleteadddom 349")
@ -1478,6 +1477,7 @@ class PollNew extends Component {
}
if (newarr[indexo].question.question_title === "") {
this.props.showNotification('题目不能为空!');
return
}
if (max > 0) {
@ -2016,7 +2016,11 @@ class PollNew extends Component {
if (result !== undefined) {
if (result.data.status === 0) {
this.props.showNotification(`已完成`);
thiss.thisinitializationdatanew();
this.setState({
Newdisplay:false,
})
// console.log("确认创建问题")
// console.log(result)
// try {

Loading…
Cancel
Save