You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
5 years ago
|
const app = getApp();
|
||
5 years ago
|
const { processObj, get, format } = require("../../../js/utils");
|
||
5 years ago
|
|
||
|
const ROUTE = {
|
||
5 years ago
|
Course:{
|
||
5 years ago
|
Exercise:{
|
||
|
__:"{exercise_cover}?exercise_id=${container_id}"
|
||
|
},
|
||
|
HomeworkCommon:{
|
||
|
__:"{course}?module_type=common_homework&course_id=${belong_container_id}",
|
||
|
practice: "{shixun_homework}?homework_id=${container_id}"
|
||
|
},
|
||
5 years ago
|
JoinCourse:{
|
||
|
__:"{teacher_apply}?course_id=${belong_container_id}"
|
||
|
},
|
||
|
StudentJoinCourse:{
|
||
|
__:"{students}?course_id=${belong_container_id}&course_identity=2"
|
||
|
},
|
||
5 years ago
|
StudentWork:{
|
||
|
__:"{course}?module_type=common_homework&course_id=${belong_container_id}",
|
||
|
}
|
||
5 years ago
|
}
|
||
|
}
|
||
5 years ago
|
processObj(ROUTE);
|
||
5 years ago
|
|
||
5 years ago
|
Component({
|
||
5 years ago
|
properties: {
|
||
|
data:Object
|
||
|
},
|
||
|
|
||
|
data: {
|
||
|
eduImgDir:global.config.eduImgDir
|
||
|
},
|
||
|
methods: {
|
||
5 years ago
|
enterDetail(){
|
||
|
let {data} = this.data;
|
||
5 years ago
|
let route = get(ROUTE,data.belong_container_type,{});
|
||
|
route = get(route, data.container_type,{});
|
||
|
route = get(route, data.homework_type);
|
||
|
if(!route) return;
|
||
|
let url = format(route, data);
|
||
5 years ago
|
app.navigateTo({url});
|
||
|
}
|
||
5 years ago
|
}
|
||
|
})
|