From 2d3306e82e34cd76ccb89d701206594b9a5a5457 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 3 Jan 2020 17:22:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/discusses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index e7d692de5..c2cc8f933 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -15,7 +15,7 @@ class DiscussesController < ApplicationController disscusses = Discuss.where(:dis_id => @container.id, :dis_type => @container.class.to_s, :root_id => nil) @discusses = disscusses.joins("left join games on discusses.challenge_id = games.challenge_id and discusses.user_id = games.user_id") - .select("discusses.*, games.identifier").includes(:user, :praise_treads) + .select("discusses.*, games.identifier").includes(:user, :praise_treads).limit(LIMIT).offset(offset) else disscusses = Discuss.where("dis_id = :dis_id and dis_type = :dis_type and root_id is null and (discusses.hidden = :hidden or discusses.user_id = :user_id)", From 21a57b274d2047ce07c93db5ae328e32f0628f3e Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 3 Jan 2020 19:02:54 +0800 Subject: [PATCH 2/2] optimize select style --- .../src/modules/developer/components/knowledge/index.js | 7 ++++--- .../developer/newOrEditTask/leftpane/editorTab/index.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/developer/components/knowledge/index.js b/public/react/src/modules/developer/components/knowledge/index.js index b287a42c9..680229b2d 100644 --- a/public/react/src/modules/developer/components/knowledge/index.js +++ b/public/react/src/modules/developer/components/knowledge/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-12-30 13:51:19 * @LastEditors : tangjiang - * @LastEditTime : 2020-01-03 09:32:24 + * @LastEditTime : 2020-01-03 18:56:36 */ import './index.scss'; import React, { useState, useEffect } from 'react'; @@ -49,7 +49,8 @@ function KnowLedge (props) { } // 过滤下拉列表项 const handleSelectChange = (value) => { - value = +value.join(''); + // value = +value.join(''); + value = +value; const tempArr = [...selectValue]; const _result = selectOptions.filter(item => { if (item.id === value && tempArr.findIndex(t => t.id === value) === -1) { @@ -103,7 +104,7 @@ function KnowLedge (props) { return (