Commit 60de317b by 陈超

T

parent e2b98b3a
...@@ -322,12 +322,18 @@ ...@@ -322,12 +322,18 @@
}, },
created: function(){ created: function(){
document.title = "全部课程" document.title = "全部课程"
let p = {:json_encode($selCate)}; this.onInit()
console.log(p[this.cate])
this.onCondition(this.cate, p[this.cate].title, 'category')
}, },
methods: { methods: {
onInit: function() {
let p = {:json_encode($selCate)};
if(p[this.cate]) {
this.onCondition(this.cate, p[this.cate].title, 'category')
this.selected = this.conditions
}
},
//Helper //Helper
onCondition: function(id, title, key) { onCondition: function(id, title, key) {
let idx = this.conditions.hx_indexOf( r => { return r.type == key }) let idx = this.conditions.hx_indexOf( r => { return r.type == key })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment