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.
48 lines
1.1 KiB
48 lines
1.1 KiB
const app = getApp();
|
|
const { processObj, get, format } = require("../../js/utils");
|
|
|
|
const ROUTE = {
|
|
Course:{
|
|
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}"
|
|
},
|
|
JoinCourse:{
|
|
__:"{teacher_apply}?course_id=${belong_container_id}"
|
|
},
|
|
StudentJoinCourse:{
|
|
__:"{students}?course_id=${belong_container_id}&course_identity=2"
|
|
},
|
|
StudentWork:{
|
|
__:"{course}?module_type=common_homework&course_id=${belong_container_id}",
|
|
}
|
|
}
|
|
}
|
|
processObj(ROUTE);
|
|
|
|
Component({
|
|
properties: {
|
|
data:Object
|
|
},
|
|
|
|
data: {
|
|
eduImgDir:global.config.eduImgDir
|
|
},
|
|
methods: {
|
|
enterDetail(){
|
|
let {data} = this.data;
|
|
let route = get(ROUTE,data.belong_container_type,{});
|
|
route = get(route, data.container_type,{});
|
|
route = get(route, data.homework_type);
|
|
console.log(route);
|
|
if(!route) return;
|
|
let url = format(route, data);
|
|
console.log("navutl", url);
|
|
app.navigateTo({url});
|
|
}
|
|
}
|
|
})
|