const app = getApp(); Component({ properties: { course_id: Number, id_: Number, course_identity:Number, refresh: { type: Number, observer: function (r) { if (r) { this.refresh(); this.setData({ refresh: false }); } } } }, data: { }, attached(){ this.refresh(); }, pageLifetimes: { show: function () { this.refresh(); } }, methods: { onChoose(e){ ; }, refresh(){ let {course_id,course_identity} = this.data; app.api("weapps.courses.teachers")({course_id,limit:1000}).then(res=>{ ; let {teacher_list, teacher_list_size, apply_size} = res; this.setData({teacher_list, teacher_list_size, apply_size}); }) let ext = {course_id, course_identity}; this.setData({ext}); } } })