Merge remote-tracking branch 'origin/develop' into develop

courseware
杨树明 5 years ago
commit 39f968895e

@ -28,6 +28,7 @@ class Attachment < ApplicationRecord
scope :no_link, -> {where(link: nil)}
validates_length_of :description, maximum: 100, message: "不能超过100个字符"
validates :link, format: { with: CustomRegexp::URL, message: "必须为网址超链接" }, allow_blank: true
DCODES = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z)

@ -163,7 +163,7 @@ class Fileslists extends Component{
let list = response.data.course_modules;
let course_second_categoriess;
list.map((item, key) => {
course_second_categoriess = item.course_second_categories
course_second_categoriess = item.course_second_categories?item.course_second_categories:[]
})
this.setState({
@ -1002,7 +1002,7 @@ class Fileslists extends Component{
`}
</style>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'150px'}}>
{this.state.course_second_categories.length>10? <p className="drop_down_search">
{this.state.course_second_categories&&this.state.course_second_categories.length>10? <p className="drop_down_search">
<Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/>
</p>:""}
@ -1014,7 +1014,7 @@ class Fileslists extends Component{
{ course_modules&&course_modules.course_modules.map( (item,key) => {
return item.course_second_categories.filter((item)=> {
return item.course_second_categories&&item.course_second_categories.filter((item)=> {
return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
}).map((itm,k)=>{
return(
@ -1022,7 +1022,7 @@ class Fileslists extends Component{
)
})
})}
{this.state.course_second_categories.length===0?
{this.state.course_second_categories&&this.state.course_second_categories.length===0?
<div className={"courseSecond"}>暂无数据</div>:""}
{/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/}

Loading…
Cancel
Save