const app = getApp(); Component({ properties: { data:Object }, data: { }, methods: { enterInvite(){ let {type, id} = this.data.data; let {envVersion} = global.config; if(envVersion!='develop'&&envVersion!='trial') return; if(type=='course') app.navigateTo({url:"{course_invite}?course_id="+id}); }, enterPage(){ let {type, id, identifier} = this.data.data; switch(type){ case 'shixun': return app.navigateTo({ url: "{shixun}?identifier=" + identifier}); case "course": return app.navigateTo({url:"{course}?course_id="+id}); case "subject": case "path": return app.navigateTo({url:"{path}?subject_id="+id}); } } } })