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

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

Loading…
Cancel
Save