Merge branch 'dev_aliyun' into develop

dev_hjm
daiao 6 years ago
commit 87aa6c8378

@ -1,5 +1,5 @@
class ChallengesController < ApplicationController class ChallengesController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth, except: [:index]
before_action :find_shixun, only: [:new, :create, :index] before_action :find_shixun, only: [:new, :create, :index]
skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer] skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer]
before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up, before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up,

@ -49,30 +49,12 @@ class CoursesController < ApplicationController
@user = current_user @user = current_user
# 根据分类查询课堂(全部,我的,最新,最热) # 根据分类查询课堂(全部,我的,最新,最热)
@order = params[:order].present? ? params[:order] : "all" @order = params[:order].present? ? params[:order] : "all"
order_str = @order != "course_members_count" && @order != "created_at" ? "updated_at" : @order if @order == "visits"
order_str = "courses.id = 1309 DESC, courses.visits DESC"
# if @order == "all" @courses = Course.where(is_delete: 0, is_hidden: 0)
# @course = Course.where(is_delete: 0, is_hidden: 0).select("select c.name, c.id, s.name, u.login, ifnull(concat(u.lastname,u.firstname),
# u.login), s.name from courses c, users u, user_extensions ue, schools s where c.is_delete=0 and
# c.tea_id=u.id and u.id=ue.user_id and ue.school_id=s.id")
# @courses = Course.where(is_delete: 0, is_hidden: 0)
# .order("courses.id = 1309 desc, courses.created_at desc")
# @courses = Course.where(is_delete: 0, is_hidden: 0).select("courses.id, courses.tea_id, courses.name, courses.exercises_count, courses.polls_count,
# courses.is_public, courses.is_end, courses.visits, courses.course_members_count,courses.homework_commons_count,(SELECT MAX(created_at)
# FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a")
# .order("courses.id = 1309 desc, a desc")
if @order == "mine"
tip_exception(401, "..") unless current_user.logged?
@courses = Course.joins(:course_members)
.where("is_delete = 0 AND is_hidden = 0 AND course_members.user_id = ?", @user.id).distinct
elsif @order == "created_at"
# REDO:Extension
@courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0).distinct
else else
# REDO:Extension order_str = "courses.id = 1309 DESC, courses.homepage_show DESC, courses.created_at desc"
@courses = Course.where(is_delete: 0, is_hidden: 0).distinct @courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0)
end end
# 根据搜索关键字进一步筛选 # 根据搜索关键字进一步筛选
@ -92,7 +74,7 @@ class CoursesController < ApplicationController
.where("#{sql}", keyword: "%#{params[:search]}%").distinct .where("#{sql}", keyword: "%#{params[:search]}%").distinct
end end
@courses_count = @courses.count("courses.id") @courses_count = @courses.count("courses.id")
@courses = @courses.order("courses.id = 1309 DESC, courses.#{order_str} DESC") @courses = @courses.order(order_str)
# 分页 # 分页
page = params[:page] || 1 page = params[:page] || 1

@ -1,5 +1,6 @@
class DiscussesController < ApplicationController class DiscussesController < ApplicationController
LIMIT = 10 LIMIT = 10
before_action :require_login, only: [:create, :reply, :hidden, :reward_code, :plus, :destroy]
before_action :find_container, only: [:index, :hidden] before_action :find_container, only: [:index, :hidden]
before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus] before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus]

@ -2,7 +2,8 @@ class ShixunsController < ApplicationController
include ShixunsHelper include ShixunsHelper
include ApplicationHelper include ApplicationHelper
before_action :require_login, :check_auth, except: [:download_file, :index, :menus] before_action :require_login, :check_auth, except: [:download_file, :index, :menus, :show, :show_right, :ranking_list,
:discusses, :collaborators, :fork_list, :propaedeutics]
before_action :check_account, only: [:new, :create, :shixun_exec] before_action :check_account, only: [:new, :create, :shixun_exec]

@ -1,5 +1,5 @@
class StagesController < ApplicationController class StagesController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth, except: [:index]
before_action :find_subject, only: [:create, :index] before_action :find_subject, only: [:create, :index]
before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position] before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position]
before_action :allowed, except: [:index] before_action :allowed, except: [:index]

@ -1,7 +1,7 @@
class SubjectsController < ApplicationController class SubjectsController < ApplicationController
before_action :require_login, :check_auth, except: [:index] before_action :require_login, :check_auth, except: [:index, :show]
# before_action :check_auth, except: [:index] # before_action :check_auth, except: [:index]
before_action :check_account, only: [:new, :create] before_action :check_account, except: [:index, :show]
before_action :find_subject, except: [:index, :create, :new, :append_to_stage] before_action :find_subject, except: [:index, :create, :new, :append_to_stage]
before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish, before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish,
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report, :search_members, :add_subject_members, :statistics, :shixun_report, :school_report,

@ -16,7 +16,7 @@ class CoursesHome extends Component{
this.state = { this.state = {
limit:16, limit:16,
page:1, page:1,
order:"all", order:"created_at",
coursesHomelist:undefined, coursesHomelist:undefined,
search:"", search:"",
} }
@ -118,25 +118,25 @@ class CoursesHome extends Component{
</div> </div>
<div className="mt20 educontent mb20 clearfix"> <div className="mt20 educontent mb20 clearfix">
<a className={ order == "all" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} {/*<a className={ order == "all" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}*/}
onClick={ () => this.changeStatus("all")}>全部</a> {/*onClick={ () => this.changeStatus("all")}>全部</a>*/}
<a className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} {/*<a className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}*/}
onClick={ () => this.changeStatus("mine")}>我的</a> {/*onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<a className={ order == "created_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} <a className={ order == "created_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("created_at")}>最新</a> onClick={ () => this.changeStatus("created_at")}>最新</a>
<a className={ order == "course_members_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} <a className={ order == "visits" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"}
onClick={ () => this.changeStatus("course_members_count")}>最热</a> onClick={ () => this.changeStatus("visits")}>最热</a>
<div className="fr mr5 search-new"> {/*<div className="fr mr5 search-new">*/}
{/* <Search {/*/!* <Search*/}
placeholder="课堂名称/教师姓名/学校名称" {/*placeholder="课堂名称/教师姓名/学校名称"*/}
id="subject_search_input" {/*id="subject_search_input"*/}
value={search} {/*value={search}*/}
onInput={this.inputSearchValue} {/*onInput={this.inputSearchValue}*/}
onSearch={this.searchValue} {/*onSearch={this.searchValue}*/}
autoComplete="off" {/*autoComplete="off"*/}
></Search> */} {/*></Search> *!/*/}
</div> {/*</div>*/}
</div> </div>

@ -122,16 +122,20 @@ class PathModal extends Component{
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
//滑动到底判断 //滑动到底判断
const {shixunmodallist} = this.state;
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
let {Searchvalue,type,page,shixunpathlist}=this.state; if(shixunmodallist.subject_list.length===0){
let newpage=page+1 return;
this.funshixunpathlist(Searchvalue,type,true,newpage) }else{
this.setState({ let {Searchvalue,type,page,shixunpathlist}=this.state;
page:newpage let newpage=page+1
}) this.funshixunpathlist(Searchvalue,type,true,newpage)
this.setState({
page:newpage
})
}
} }
} }

@ -100,17 +100,21 @@ class ShixunModal extends Component{
} }
contentViewScrolledit=(e)=>{ contentViewScrolledit=(e)=>{
const {shixunmodallist}=this.state;
//滑动到底判断 //滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){ if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight) {
let {Searchvalue,type,page}=this.state;
let newpage=page+1 if (shixunmodallist.shixun_list.length === 0) {
this.setupdatalist(Searchvalue,type,true,newpage) return;
this.setState({ } else {
page:newpage let {Searchvalue, type, page} = this.state;
}) let newpage = page + 1
} this.setupdatalist(Searchvalue, type, true, newpage)
this.setState({
page: newpage
})
}
}
} }
//搜索 //搜索

@ -477,9 +477,9 @@ a.white-btn.use_scope-btn:hover{
} }
.pathInfobox li{ .pathInfobox li{
margin-right: 20px; margin-right: 20px;
height: 15px; height: 20px;
/*overflow: hidden;*/ /*overflow: hidden;*/
line-height: 15px; line-height: 20px;
} }
.width70f{ .width70f{
width: 70px; width: 70px;

@ -526,7 +526,7 @@ class ExerciseReviewAndAnswer extends Component{
height: 28px; height: 28px;
} }
`}</style> `}</style>
<p style={{height:"60px"}}></p> {/*<p style={{height:"60px"}}></p>*/}
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}

@ -305,7 +305,7 @@ class PollInfo extends Component{
let isStudent=this.props.isStudent(); let isStudent=this.props.isStudent();
return( return(
<div className="newMain" style={{paddingTop:"0px"}}> <div className="newMain" style={{paddingTop:"0px"}}>
<p style={{height:"60px"}}></p> {/*<p style={{height:"60px"}}></p>*/}
<Modals <Modals
modalsType={modalsType} modalsType={modalsType}
modalsTopval={modalsTopval} modalsTopval={modalsTopval}

@ -122,8 +122,8 @@ class PollNew extends Component {
} }
} }
console.log("问卷返回");
// this.getPollInfo(); console.log(this.props);
} }
//获取权限 //获取权限

@ -1608,7 +1608,7 @@ class Listofworksstudentone extends Component {
} }
paginationonChanges = (pageNumber) => { paginationonChangestwo = (pageNumber) => {
this.setState({ this.setState({
page: pageNumber, page: pageNumber,
loadingstate: true, loadingstate: true,
@ -2495,7 +2495,10 @@ class Listofworksstudentone extends Component {
// console.log(datajs); // console.log(datajs);
// console.log("2202"); // console.log("2202");
// console.log(this.props.isAdmin()); // console.log(this.props.isAdmin());
// console.log("2498");
// console.log(data);
// console.log(datas);
// console.log(this.props.isAdmin());
return ( return (
this.props.isAdmin() === true ? this.props.isAdmin() === true ?
( (
@ -2776,13 +2779,13 @@ class Listofworksstudentone extends Component {
} }
.edu-table thead th,.edu-table tbody tr:last-child td{ .edu-table thead th,.edu-table tbody tr:last-child td{
border-bottom: none!important; border-bottom: none!important;
height: 85px; height: 58px;
} }
.ant-tables .ant-table-tbody > tr > td { .ant-tables .ant-table-tbody > tr > td {
height: 85px; height: 58px;
} }
.ysltableo .ant-table-thead > tr > th{ .ysltableo .ant-table-thead > tr > th{
height: 85px; height: 58px;
} }
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 9px;
@ -2927,8 +2930,8 @@ class Listofworksstudentone extends Component {
<span className="fl color-grey-6 font-12"> <span className="fl color-grey-6 font-12">
<span <span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span className="color-orange-tip">{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}</span><span
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span> className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span> <span className="ml20">{teacherdata.left_time.status}</span>
} }
@ -2969,11 +2972,17 @@ class Listofworksstudentone extends Component {
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot { .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;} top: 72%;}
} }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableow .ant-table-thead > tr > th{ .ysltableow .ant-table-thead > tr > th{
height: 85px; height: 58px;
} }
.ysltableow .ant-table-tbody > tr > td{ .ysltableow .ant-table-tbody > tr > td{
height: 85px; height: 58px;
} }
.ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 9px;
@ -3033,7 +3042,7 @@ class Listofworksstudentone extends Component {
} }
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<div className="edu-back-white"> <div >
<style> <style>
{ {
` `
@ -3054,11 +3063,17 @@ class Listofworksstudentone extends Component {
<style> <style>
{ {
` `
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableows .ant-table-thead > tr > th{ .ysltableows .ant-table-thead > tr > th{
height: 85px; height: 58px;
} }
.ysltableows .ant-table-tbody > tr > td{ .ysltableows .ant-table-tbody > tr > td{
height: 85px; height: 58px;
} }
.ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 9px;
@ -3077,16 +3092,16 @@ class Listofworksstudentone extends Component {
</div> </div>
{JSON.stringify(datas) !== "[]" ? {JSON.stringify(datas) !== "[]" ?
<div> <div>
<div id="graduation_work_list" style={{ <div id="graduation_work_list" className="edu-back-white" style={{
padding: '20px 20px 10px 20px', padding: '20px 20px 10px 20px',
marginBottom: "10px" marginBottom: "10px"
}}> }}>
<div className="clearfix"> <div className="clearfix">
<span className="fl color-grey-6 font-12"> <span className="fl color-grey-6 font-12">
<span className="color-orange-tip"> <span className="color-orange-tip">
{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count} {teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}
</span> </span>
<span className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span> <span className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span>} <span className="ml20">{teacherdata.left_time.status}</span>}
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
@ -3181,11 +3196,17 @@ class Listofworksstudentone extends Component {
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot { .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;} top: 72%;}
} }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.ysltableowss .ant-table-thead > tr > th{ .ysltableowss .ant-table-thead > tr > th{
height: 85px; height: 58px;
} }
.ysltableowss .ant-table-tbody > tr > td{ .ysltableowss .ant-table-tbody > tr > td{
height: 85px; height: 58px;
} }
.ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 9px;
@ -3205,7 +3226,7 @@ class Listofworksstudentone extends Component {
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center ysyslxh mt30"> <div className="edu-txt-center ysyslxh mt30">
<Pagination showQuickJumper current={page} <Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit} onChange={this.paginationonChangestwo} pageSize={limit}
total={teacherdata.work_count}></Pagination> total={teacherdata.work_count}></Pagination>
</div> </div>
: "" : ""

@ -783,7 +783,9 @@ class ShixunStudentWork extends Component {
<CheckboxGroup onChange={this.groupgroup} <CheckboxGroup onChange={this.groupgroup}
value={this.state.group_infolist} value={this.state.group_infolist}
style={{paddingTop: '4px'}}> style={{paddingTop: '4px',float: 'left',
maxWidth: '1020px'}}
>
{data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => { {data&&data.group_info === undefined ? "" : data&&data.group_info.map((item, key) => {
return ( return (
<span key={key}> <span key={key}>

@ -75,10 +75,15 @@ class ShixunWorkReport extends Component {
let homeworkid=this.props.match.params.homeworkid; let homeworkid=this.props.match.params.homeworkid;
let url = `/student_works/${homeworkid}/shixun_work_report.json` let url = `/student_works/${homeworkid}/shixun_work_report.json`
axios.get(url).then((result) => { axios.get(url).then((result) => {
if (result.data.status === 403||result.data.status === 401||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({ this.setState({
data:result.data, data:result.data,
spinning:false spinning:false
}) })
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({
@ -109,8 +114,15 @@ class ShixunWorkReport extends Component {
this.props.history.push(this.props.current_user.first_category_url); this.props.history.push(this.props.current_user.first_category_url);
} }
} }
goback = () => {
this.props.history.goBack()
}
render() { render() {
let{data} =this.state; let{data} =this.state;
console.log(data)
console.log(this.props)
let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id; let homework_common_id=data===undefined?"":data.homework_common_id;
let homeworkid=this.props.match.params.homeworkid; let homeworkid=this.props.match.params.homeworkid;
@ -147,9 +159,10 @@ class ShixunWorkReport extends Component {
{/*className="fr color-blue font-16"*/} {/*className="fr color-blue font-16"*/}
{/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/} {/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/}
{/*>导出实训报告数据</a> : ""}*/} {/*>导出实训报告数据</a> : ""}*/}
{/*<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a>*/}
</div> </div>
<div className="stud-class-set bor-bottom-greyE"> <div className="stud-class-set">
<div className="clearfix edu-back-white poll_list"> <div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">总体评价</div> <div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">总体评价</div>

@ -195,7 +195,7 @@ class ShixunWorkModal extends Component{
// message:"提示", // message:"提示",
// description: response.data.message // description: response.data.message
// }); // });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`); window.location.href=`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`;
}else if(response.data.status === -1){ }else if(response.data.status === -1){
notification.open({ notification.open({
message:"提示", message:"提示",

@ -79,14 +79,14 @@ class TraineetraininginformationModal extends Component {
return str; return str;
} }
render() { render() {
console.log(83); // console.log(83);
console.log(this.props.boolgalist); // console.log(this.props.boolgalist);
const columns = [ const columns = [
{ {
title: '关卡', title: '关卡',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
width: 92, width:"91px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -98,7 +98,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 130, width:"150px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -113,7 +113,7 @@ class TraineetraininginformationModal extends Component {
title: '', title: '',
dataIndex: 'complete_status', dataIndex: 'complete_status',
key: 'complete_status', key: 'complete_status',
width: 100, width:"87px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -127,7 +127,7 @@ class TraineetraininginformationModal extends Component {
title: '耗时', title: '耗时',
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
width: 92, width:"150px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -138,7 +138,7 @@ class TraineetraininginformationModal extends Component {
{ {
title: '经验值', title: '经验值',
key: 'classroom', key: 'classroom',
width: 92,
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
@ -147,7 +147,7 @@ class TraineetraininginformationModal extends Component {
</span> </span>
), ),
} }
] ];
const columnss = [ const columnss = [
{ {
@ -155,7 +155,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
align: "center", align: "center",
width: "117px", width:"119px",
render: (text, record) => ( render: (text, record) => (
<span > <span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a> <a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
@ -166,7 +166,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: "203px", width:"174px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span >
@ -179,7 +179,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: "center", align: "center",
width: "117px", width:"119px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a> <a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
@ -191,14 +191,14 @@ class TraineetraininginformationModal extends Component {
key: 'classroom', key: 'classroom',
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
width: "117px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a> <a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>
</span> </span>
), ),
} }
] ];
return ( return (
<div> <div>
@ -209,6 +209,8 @@ class TraineetraininginformationModal extends Component {
visible={this.props.visible} visible={this.props.visible}
footer={null} footer={null}
onCancel={this.Cancel} onCancel={this.Cancel}
maskClosable={false}
destroyOnClose={true}
> >
<div style={{width:"100%" }} > <div style={{width:"100%" }} >
<div style={{"width": "100%","text-align": "left","clear": "both"}}> <div style={{"width": "100%","text-align": "left","clear": "both"}}>
@ -252,7 +254,18 @@ class TraineetraininginformationModal extends Component {
{ {
` .ant-table-body{ ` .ant-table-body{
overflow: hidden !important; overflow: hidden !important;
}` }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
} }
</style> </style>
@ -263,24 +276,33 @@ class TraineetraininginformationModal extends Component {
columns={columns} columns={columns}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
/>} />}
</div> </div>
: :
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
<div className={"both"}></div> <div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table {this.props.game_list === undefined ? "" : <Table
className="mt20" className="mt20"
dataSource={this.props.game_list} dataSource={this.props.game_list}
columns={columns} columns={columns}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }} scroll={{ y: 300 }}
/>} />}
</div> </div>
@ -302,7 +324,15 @@ class TraineetraininginformationModal extends Component {
{ {
` .ant-table-body{ ` .ant-table-body{
overflow: hidden !important; overflow: hidden !important;
}` }
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
`
} }
</style> </style>
@ -313,24 +343,32 @@ class TraineetraininginformationModal extends Component {
columns={columnss} columns={columnss}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
/>} />}
</div> </div>
: :
<div className="edu-table edu-back-white "> <div className="edu-table edu-back-white ">
<style>
{
`
.edu-table .ant-table-tbody > tr > td {
height: 58px;
}
.edu-table .ant-table-thead > tr > th{
height: 58px;
}
.edu-table .ant-table-header {
overflow: hidden !important;
}
`
}
</style>
<div className={"both"}></div> <div className={"both"}></div>
{this.props.game_list === undefined ? "" : <Table {this.props.game_list === undefined ? "" : <Table
className="mt20" className="mt20"
dataSource={this.props.game_list} dataSource={this.props.game_list}
columns={columnss} columns={columnss}
pagination={{ //分页
total: this.props.game_list.length, //数据总数量
pageSize: this.props.game_list.length, //一页显示几条
current: 1,
}}
loading={false} loading={false}
pagination={false} pagination={false}
onChange={this.TablePagination}
scroll={{ y: 300 }} scroll={{ y: 300 }}
/>} />}
</div> </div>

@ -44,7 +44,7 @@ class Coursesshixundetails extends Component {
data&&data.forEach((item,key)=>{ data&&data.forEach((item,key)=>{
datas.push({ datas.push({
number: item.position, number: item.position,
name: item.output_detail name: item.output_detail=== ""||item.output_detail===null?"暂无数据":item.output_detail
}) })
}) })

@ -177,6 +177,8 @@ class OfficialAcademicTranscript extends Component {
} }
.TaskForms{ .TaskForms{
width: 500px; width: 500px;
text-align: left !important;
padding: 16px !important;
} }
.TaskForms.ant-table-header-column{ .TaskForms.ant-table-header-column{
width: 100%; width: 100%;

@ -12,6 +12,7 @@ function startechart(data){
var option = { var option = {
title: { title: {
text: '工作效率', text: '工作效率',
subtext: '工作效率=log(实训总得分/实训总耗时)'
}, },
grid:{ grid:{
left: '3%', left: '3%',
@ -61,7 +62,7 @@ function startechart(data){
yAxis: [ yAxis: [
{ {
type : "value", type : "value",
name : " 实训总得分/实训总耗时", name : " ",
nameGap: 20, nameGap: 20,
nameTextStyle: { nameTextStyle: {
color: '#000', color: '#000',
@ -169,6 +170,7 @@ function startechart(data){
var option1 = { var option1 = {
title: { title: {
text: '能力值', text: '能力值',
subtext: '能力值(实训获得经验值/实训评测次数)'
}, },
backgroundColor: '#fff', backgroundColor: '#fff',
color: [ color: [
@ -212,7 +214,7 @@ function startechart(data){
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: " 实训获得经验值/实训评测次数", name: " ",
nameLocation: 'end', nameLocation: 'end',
nameGap: 20, nameGap: 20,
nameTextStyle: { nameTextStyle: {
@ -356,7 +358,7 @@ class Shixunechart extends Component {
`} `}
</style> </style>
<div className="fl with24 ml50"> <div className="fl ml50">
<div className="bor-grey-e bor-radius4 clearfix mt100 colorE6F3FF pd10"> <div className="bor-grey-e bor-radius4 clearfix mt100 colorE6F3FF pd10">
<div className="fl with25 colorE6F3FF" style={{textAlign:"right",paddingRight:"5%"}}> <div className="fl with25 colorE6F3FF" style={{textAlign:"right",paddingRight:"5%"}}>
<li className="mt5 mb5 color-grey-9">姓名</li> <li className="mt5 mb5 color-grey-9">姓名</li>

@ -308,7 +308,7 @@ class MessagSub extends Component{
//记得跳评阅页面 //记得跳评阅页面
default : default :
// 课堂-试卷列表详情 :id = container_id // 课堂-试卷列表详情 :id = container_id
return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}`) return window.open(`/courses/${item.belong_container_id}/exercises/${item.container_id}/student_exercise_list?tab=0`);
} }
case 'StudentGraduationTopic' : case 'StudentGraduationTopic' :
//课堂-毕业选题详情 :id = parent_container_id //课堂-毕业选题详情 :id = parent_container_id

@ -193,12 +193,20 @@ class DetailCards extends Component{
} }
startgameid=(id)=>{ startgameid=(id)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
}) })
return return
} }
let url = "/shixuns/" + id + "/shixun_exec.json"; let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {

@ -326,6 +326,15 @@ class PathDetailIndex extends Component{
return( return(
<div className="newContainer"> <div className="newContainer">
<style>
{
`
.head-right{
line-height: 30px;
}
`
}
</style>
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
modalsTopval={Modalstopval} modalsTopval={Modalstopval}
@ -417,7 +426,7 @@ class PathDetailIndex extends Component{
</div> </div>
} }
{ {
detailInfoList === undefined ? "" : detailInfoList.progress === null ? "" : this.props.checkIfLogin()===false?"":detailInfoList === undefined ? "" : detailInfoList.progress === null ? "" :
<div className="edu-back-white myProgress padding40-20 mb10"> <div className="edu-back-white myProgress padding40-20 mb10">
<p className="mb20"> <p className="mb20">
<span className="font-16 mr10">我的进展</span> <span className="font-16 mr10">我的进展</span>

@ -148,13 +148,9 @@ class addCollaborators extends Component{
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state; let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
return( return(
<div className="edu-back-white bor-top-greyE addTeamMember"> this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
{ <div className="edu-back-white bor-top-greyE addTeamMember">
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true? <a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
<a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
:""
}
<Modal <Modal
keyboard={false} keyboard={false}
title="添加合作者" title="添加合作者"
@ -209,7 +205,8 @@ class addCollaborators extends Component{
</div> </div>
</div> </div>
</Modal> </Modal>
</div> </div>:""
) )
} }
} }

@ -27,9 +27,27 @@ class sendPanel extends Component{
//发送至 //发送至
SentToLesson =() =>{ SentToLesson =() =>{
this.setState({ let id=this.props.detailInfoList.id;
sentShixunPath:true let url="/paths/"+id+"/choose_course.json";
}) axios.get(url).then((result)=>{
if(result.status==200){
if (result.data.status === 403||result.data.status === 402||result.data.status === 407||result.data.status === 408) {
}else{
this.setState({
sendToCourseList:result.data,
sentShixunPath:true
})
}
}
}).catch((error)=>{
console.log(error);
})
// this.setState({
// sentShixunPath:true
// })
} }
//隐藏发送至弹框 //隐藏发送至弹框
hideSenttothevalue =()=>{ hideSenttothevalue =()=>{
@ -99,17 +117,17 @@ class sendPanel extends Component{
} }
componentDidMount(){ componentDidMount(){
let id=this.props.detailInfoList.id; // let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json"; // let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{ // axios.get(url).then((result)=>{
if(result.status==200){ // if(result.status==200){
this.setState({ // this.setState({
sendToCourseList:result.data // sendToCourseList:result.data
}) // })
} // }
}).catch((error)=>{ // }).catch((error)=>{
console.log(error); // console.log(error);
}) // })
} }
cardsModalcancel=()=>{ cardsModalcancel=()=>{

@ -14,7 +14,7 @@ class ShixunPathSearch extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
order:"publish_time", order:"updated_at",
select:0, select:0,
search:"", search:"",
page:1, page:1,
@ -126,20 +126,20 @@ class ShixunPathSearch extends Component{
</div> </div>
</div> </div>
<div className="mt20 educontent mb20 clearfix"> <div className="mt20 educontent mb20 clearfix">
<a href="javascript:void(0)" className={ order == "publish_time" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("publish_time")}>全部</a> {/*<a href="javascript:void(0)" className={ order == "publish_time" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("publish_time")}>全部</a>*/}
<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a> {/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
<a href="javascript:void(0)" className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a> <a className={ order == "updated_at" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("updated_at")}>最新</a>
<a href="javascript:void(0)" className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a> <a className={ order == "myshixun_count" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("myshixun_count")}>最热</a>
<div className="fr mr5 search-new"> {/*<div className="fr mr5 search-new">*/}
{/* <Search {/*/!* <Search*/}
placeholder="请输入路径名称进行搜索" {/*placeholder="请输入路径名称进行搜索"*/}
id="subject_search_input" {/*id="subject_search_input"*/}
value={search} {/*value={search}*/}
onInput={this.inputSearchValue} {/*onInput={this.inputSearchValue}*/}
onSearch={this.searchValue} {/*onSearch={this.searchValue}*/}
autoComplete="off" {/*autoComplete="off"*/}
></Search> */} {/*></Search> *!/*/}
</div> {/*</div>*/}
</div> </div>
<PathCard {...this.props} {...this.state}></PathCard> <PathCard {...this.props} {...this.state}></PathCard>
{ {

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
// /images/educoder/icon/search.svg // /images/educoder/icon/search.svg
import { getImageUrl, toPath } from 'educoder' import { getImageUrl, toPath ,trigger,broadcastChannelPostMessage} from 'educoder'
import axios from 'axios'; import axios from 'axios';
@ -30,8 +30,6 @@ import 'antd/lib/input/style/index.css';
import './TPMIndex.css'; import './TPMIndex.css';
import { trigger, broadcastChannelPostMessage } from 'educoder';
const $ = window.$ const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用 // TODO 这部分脚本从公共脚本中直接调用
@ -316,6 +314,7 @@ class NewHeader extends Component {
// this.setState({ // this.setState({
// isRender:true // isRender:true
// }) // })
broadcastChannelPostMessage('refreshPage')
window.location.href = "/"; window.location.href = "/";
} }
}).catch((error) => { }).catch((error) => {
@ -881,9 +880,9 @@ submittojoinclass=(value)=>{
/>:""} />:""}
{/* /courses/join_course_multi_role */} {/* /courses/join_course_multi_role */}
{/*<li>*/} <li>
<a onClick={this.tojoinitem}>加入项目</a> <a onClick={this.tojoinitem}>加入项目</a>
{/*</li>*/} </li>
{tojoinitemtype===true?<Modal {tojoinitemtype===true?<Modal
keyboard={false} keyboard={false}
title="加入项目" title="加入项目"

@ -172,7 +172,17 @@ class TPMBanner extends Component {
* 发送至按钮 * 发送至按钮
* */ * */
Senttothe=()=>{ Senttothe=()=>{
let id = this.props.match.params.shixunId; if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let id = this.props.match.params.shixunId;
let url="/shixuns/" + id +"/search_user_courses.json"; let url="/shixuns/" + id +"/search_user_courses.json";
this.setState({ this.setState({
Senttothetype:true Senttothetype:true
@ -384,6 +394,11 @@ class TPMBanner extends Component {
//开始实战按钮 //开始实战按钮
startshixunCombat=(id, reset)=>{ startshixunCombat=(id, reset)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true

@ -220,6 +220,13 @@ class Challenges extends Component {
//开始实战按钮 //开始实战按钮
startshixunCombat = (type, ids, id) => { startshixunCombat = (type, ids, id) => {
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.current_user&&this.props.current_user.profile_completed===false){ if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({ this.setState({
AccountProfiletype:true AccountProfiletype:true
@ -227,7 +234,7 @@ class Challenges extends Component {
return return
} }
debugger
let { ChallengesDataList } = this.state; let { ChallengesDataList } = this.state;
// let id = this.props.match.params.shixunId; // let id = this.props.match.params.shixunId;
this.setState({ this.setState({

@ -64,9 +64,9 @@ class ShixunCardList extends Component {
let type; let type;
if(id==="all"){ // if(id==="all"){
type="publish_time"; // type="publish_time";
} // }
if(id==="hot"){ if(id==="hot"){
type="hot"; type="hot";
}else if(id==="new"){ }else if(id==="new"){
@ -166,16 +166,16 @@ class ShixunCardList extends Component {
<div className="educontent mt20"> <div className="educontent mt20">
<div className="clearfix"> <div className="clearfix">
<div className="fl mr20 font-16 bestChoose shixun_repertoire active" {/*<div className="fl mr20 font-16 bestChoose shixun_repertoire active"*/}
id={"all"} {/*id={"all"}*/}
onClick={(e)=>this.latestHot(e,1)}>全部 {/*onClick={(e)=>this.latestHot(e,1)}>全部*/}
</div> {/*</div>*/}
<div className="fl mr20 font-16 bestChoose shixun_repertoire" {/*<div className="fl mr20 font-16 bestChoose shixun_repertoire"*/}
id={mine} {/*id={mine}*/}
onClick={(e)=>this.onSwitchChange(e,2)}>我的 {/*onClick={(e)=>this.onSwitchChange(e,2)}>我的*/}
</div> {/*</div>*/}
<div className="fl mr20 font-16 bestChoose shixun_repertoire" <div className="fl mr20 font-16 bestChoose shixun_repertoire active"
id="new" id="new"
onClick={(e)=>this.latestHot(e,4)}>最新 onClick={(e)=>this.latestHot(e,4)}>最新
</div> </div>
@ -186,26 +186,26 @@ class ShixunCardList extends Component {
</div> </div>
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1" {/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
style={{display:upcircle===true?"block":"none"}} {/*style={{display:upcircle===true?"block":"none"}}*/}
// onClick={()=>this.upcircles("asc")} {/*// onClick={()=>this.upcircles("asc")}*/}
> {/*>*/}
<Tooltip placement="bottom" title={"升序"}> {/*<Tooltip placement="bottom" title={"升序"}>*/}
<Icon type="up-circle" theme="twoTone" /> {/*<Icon type="up-circle" theme="twoTone" />*/}
{/*<Icon type="sort-descending" />*/} {/*/!*<Icon type="sort-descending" />*!/*/}
</Tooltip> {/*</Tooltip>*/}
</div> {/*</div>*/}
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1" {/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
// onClick={()=>this.upcircles("desc")} {/*// onClick={()=>this.upcircles("desc")}*/}
style={{display:upcircle===true?"none":"block"}} {/*style={{display:upcircle===true?"none":"block"}}*/}
> {/*>*/}
<Tooltip placement="bottom" title={"降序"}> {/*<Tooltip placement="bottom" title={"降序"}>*/}
<Icon type="down-circle" theme="twoTone" /> {/*<Icon type="down-circle" theme="twoTone" />*/}
{/*<Icon type="sort-ascending" />*/} {/*/!*<Icon type="sort-ascending" />*!/*/}
</Tooltip> {/*</Tooltip>*/}
</div> {/*</div>*/}
<div className="fr mt3"> {/*<div className="fr mt3">*/}
{/*<Search*/} {/*<Search*/}
{/*style={{ width: 300 }}*/} {/*style={{ width: 300 }}*/}
{/*className="search-new-input fl"*/} {/*className="search-new-input fl"*/}
@ -225,11 +225,11 @@ class ShixunCardList extends Component {
onSearch={value => this.Input_search(value)} onSearch={value => this.Input_search(value)}
autoComplete="off" autoComplete="off"
></Search> */} ></Search> */}
</div> {/*</div>*/}
<div className="fr"> {/*<div className="fr">*/}
<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{ {/*<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{*/}
this.props.search_tags === null ? "" : this.props.search_tags {/*this.props.search_tags === null ? "" : this.props.search_tags*/}
}</span> {/*}</span>*/}
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/} {/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
{/*/!* <div className="controlblue"></div>*/} {/*/!* <div className="controlblue"></div>*/}
{/*<span className="controlring"></span> *!/*/} {/*<span className="controlring"></span> *!/*/}
@ -242,8 +242,8 @@ class ShixunCardList extends Component {
{/*</div>*/} {/*</div>*/}
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/} {/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
</div> {/*</div>*/}
<span className="fr color-grey-6 mr30 font-16" id="search_name"></span> {/*<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>*/}
</div> </div>
</div> </div>
); );

@ -28,7 +28,7 @@ class ShixunsIndex extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state={ this.state={
order_by: "publish_time", order_by: "new",
page:1, page:1,
limit:16, limit:16,
keyword:"", keyword:"",
@ -115,10 +115,9 @@ class ShixunsIndex extends Component {
} }
allUpdatashixunlist=()=>{ allUpdatashixunlist=()=>{
let{sort}=this.state; let{sort,order_by}=this.state;
this.setState({ this.setState({
order_by: 'publish_time',
tag_level: 1, tag_level: 1,
tag_id:'', tag_id:'',
page: 1, page: 1,
@ -129,7 +128,7 @@ class ShixunsIndex extends Component {
}) })
let params={ let params={
order_by: 'publish_time', order_by:order_by,
tag_level: 1, tag_level: 1,
tag_id:'', tag_id:'',
page: 1, page: 1,

Loading…
Cancel
Save