diff --git a/changelog.txt b/changelog.md similarity index 98% rename from changelog.txt rename to changelog.md index 33aefa6..eeabb0b 100644 --- a/changelog.txt +++ b/changelog.md @@ -1,9 +1,9 @@ -##v0.14.3 +## v0.14.3 * F 实训文件内容获取失败(文件path错误) * F 个人信息性别设置bug * D 删除实名认证界面 -##v0.14.2 +## v0.14.2 * F 签到界面无权限访问提示 * F 更改头像界面图片初次加载失败 * F 电脑端用户界面图标及文字位置不正确 diff --git a/miniprogram/app.js b/miniprogram/app.js index 048ae02..f4523d9 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -30,9 +30,6 @@ App({ } }) } - wx.reportAnalytics('version', { - app_version: global.config.version - }); this.api("users.system_update")().then(res => { if (res.system_update) { let { subject = "升级服务通知", system_score} = res; diff --git a/miniprogram/app.json b/miniprogram/app.json index b5f56c0..96282d5 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -82,6 +82,12 @@ "pages": [ "search" ] + },{ + "name":"feedback", + "root":"pages/feedback", + "pages":[ + "feedback" + ] } ], "preloadRule": { @@ -139,6 +145,9 @@ } ] }, + "useExtendedLib": { + "weui": true + }, "navigateToMiniProgramAppIdList": [ "wx2402d86a6b534f77" ], diff --git a/miniprogram/components/course-item/course-item.json b/miniprogram/components/course-item/course-item.json index cfe174d..2ea3b8c 100644 --- a/miniprogram/components/course-item/course-item.json +++ b/miniprogram/components/course-item/course-item.json @@ -1,7 +1,8 @@ { "component": true, "usingComponents": { - "iconfont":"../iconfont/iconfont" + "iconfont":"../iconfont/iconfont", + "mp-icon": "/weui-miniprogram/icon/icon" }, "navigationBarBackgroundColor": "#00b0f0", "navigationBarTextStyle": "white" diff --git a/miniprogram/components/course-item/course-item.wxml b/miniprogram/components/course-item/course-item.wxml index 1149a41..bd49c54 100644 --- a/miniprogram/components/course-item/course-item.wxml +++ b/miniprogram/components/course-item/course-item.wxml @@ -1,7 +1,7 @@ - + @@ -11,7 +11,7 @@ {{data.school}} {{data.creator}} - + {{data.course_members_count}} {{data.visits}} diff --git a/miniprogram/components/course-item/more.png b/miniprogram/components/course-item/more.png deleted file mode 100644 index 892de15..0000000 Binary files a/miniprogram/components/course-item/more.png and /dev/null differ diff --git a/miniprogram/components/modal/join-course/join-course.js b/miniprogram/components/modal/join-course/join-course.js index 5d2cac8..5ecce11 100644 --- a/miniprogram/components/modal/join-course/join-course.js +++ b/miniprogram/components/modal/join-course/join-course.js @@ -36,7 +36,11 @@ Component({ data: { identities:[], - hidden:true + hidden:true, + buttons:[ + {text:"取消"}, + {text:"提交"} + ] }, methods: { scan(){ @@ -88,9 +92,15 @@ Component({ } }) }, - cancel: function (event) { + cancel() { this.setData({ hidden: true }); }, + onTapButton({detail:{index}}){ + if(index==0) + this.cancel(); + else if(index==1) + this.join_course(); + }, update_invite_code: function ({ detail: { value } }) { console.log(value); this.setData({ invite_code: value }); @@ -103,7 +113,7 @@ Component({ console.log(data); this.setData(data) }, - join_course: function (event) { + join_course () { if(this.disabled) return; let { invite_code="", assistant_professor="", professor,student=""} = this.data; this.disabled = true; diff --git a/miniprogram/components/modal/join-course/join-course.json b/miniprogram/components/modal/join-course/join-course.json index e8cfaaf..90720fd 100644 --- a/miniprogram/components/modal/join-course/join-course.json +++ b/miniprogram/components/modal/join-course/join-course.json @@ -1,4 +1,6 @@ { "component": true, - "usingComponents": {} + "usingComponents": { + "mp-dialog": "/weui-miniprogram/dialog/dialog" + } } \ No newline at end of file diff --git a/miniprogram/components/modal/join-course/join-course.wxml b/miniprogram/components/modal/join-course/join-course.wxml index 98d32f2..3109f8c 100644 --- a/miniprogram/components/modal/join-course/join-course.wxml +++ b/miniprogram/components/modal/join-course/join-course.wxml @@ -1,12 +1,14 @@ - - - - - - - 身份: - 教师 - 助教 - 学生 - - \ No newline at end of file + + + + + + + + 身份: + 教师 + 助教 + 学生 + + + \ No newline at end of file diff --git a/miniprogram/course/components/file-item/file-item.js b/miniprogram/course/components/file-item/file-item.js index 3c47b35..bbbed66 100644 --- a/miniprogram/course/components/file-item/file-item.js +++ b/miniprogram/course/components/file-item/file-item.js @@ -23,6 +23,7 @@ Component({ success: (res) => { wx.openDocument({ filePath: res.tempFilePath, + showMenu:true, fail: app.showError }); }, diff --git a/miniprogram/course/images/more.png b/miniprogram/course/images/more.png deleted file mode 100644 index 127fd7a..0000000 Binary files a/miniprogram/course/images/more.png and /dev/null differ diff --git a/miniprogram/course/images/navigateback.png b/miniprogram/course/images/navigateback.png deleted file mode 100644 index 8ae910b..0000000 Binary files a/miniprogram/course/images/navigateback.png and /dev/null differ diff --git a/miniprogram/course/images/relaunch.png b/miniprogram/course/images/relaunch.png deleted file mode 100644 index a2943a0..0000000 Binary files a/miniprogram/course/images/relaunch.png and /dev/null differ diff --git a/miniprogram/course/images/svg/activity.svg b/miniprogram/course/images/svg/activity.svg new file mode 100644 index 0000000..dd6d97d --- /dev/null +++ b/miniprogram/course/images/svg/activity.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/activity_select.svg b/miniprogram/course/images/svg/activity_select.svg new file mode 100644 index 0000000..89080ba --- /dev/null +++ b/miniprogram/course/images/svg/activity_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/announcement.svg b/miniprogram/course/images/svg/announcement.svg new file mode 100644 index 0000000..14e2eea --- /dev/null +++ b/miniprogram/course/images/svg/announcement.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/announcement_select.svg b/miniprogram/course/images/svg/announcement_select.svg new file mode 100644 index 0000000..f10c265 --- /dev/null +++ b/miniprogram/course/images/svg/announcement_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/attachment.svg b/miniprogram/course/images/svg/attachment.svg new file mode 100644 index 0000000..686b6b1 --- /dev/null +++ b/miniprogram/course/images/svg/attachment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/attachment_select.svg b/miniprogram/course/images/svg/attachment_select.svg new file mode 100644 index 0000000..e25a29d --- /dev/null +++ b/miniprogram/course/images/svg/attachment_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/attendance.svg b/miniprogram/course/images/svg/attendance.svg new file mode 100644 index 0000000..2dfc626 --- /dev/null +++ b/miniprogram/course/images/svg/attendance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/attendance_select.svg b/miniprogram/course/images/svg/attendance_select.svg new file mode 100644 index 0000000..15859b5 --- /dev/null +++ b/miniprogram/course/images/svg/attendance_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/board.svg b/miniprogram/course/images/svg/board.svg new file mode 100644 index 0000000..704d2c7 --- /dev/null +++ b/miniprogram/course/images/svg/board.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/board_select.svg b/miniprogram/course/images/svg/board_select.svg new file mode 100644 index 0000000..f763336 --- /dev/null +++ b/miniprogram/course/images/svg/board_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/common_homework.svg b/miniprogram/course/images/svg/common_homework.svg new file mode 100644 index 0000000..31e8674 --- /dev/null +++ b/miniprogram/course/images/svg/common_homework.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/common_homework_select.svg b/miniprogram/course/images/svg/common_homework_select.svg new file mode 100644 index 0000000..146da95 --- /dev/null +++ b/miniprogram/course/images/svg/common_homework_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/course_group.svg b/miniprogram/course/images/svg/course_group.svg new file mode 100644 index 0000000..58c81b6 --- /dev/null +++ b/miniprogram/course/images/svg/course_group.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/course_group_select.svg b/miniprogram/course/images/svg/course_group_select.svg new file mode 100644 index 0000000..78e36b3 --- /dev/null +++ b/miniprogram/course/images/svg/course_group_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/exercise.svg b/miniprogram/course/images/svg/exercise.svg new file mode 100644 index 0000000..07db5ae --- /dev/null +++ b/miniprogram/course/images/svg/exercise.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/exercise_select.svg b/miniprogram/course/images/svg/exercise_select.svg new file mode 100644 index 0000000..d314e89 --- /dev/null +++ b/miniprogram/course/images/svg/exercise_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/graduation.svg b/miniprogram/course/images/svg/graduation.svg new file mode 100644 index 0000000..670e1de --- /dev/null +++ b/miniprogram/course/images/svg/graduation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/graduation_select.svg b/miniprogram/course/images/svg/graduation_select.svg new file mode 100644 index 0000000..de829d0 --- /dev/null +++ b/miniprogram/course/images/svg/graduation_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/group_homework.svg b/miniprogram/course/images/svg/group_homework.svg new file mode 100644 index 0000000..eb714e2 --- /dev/null +++ b/miniprogram/course/images/svg/group_homework.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/group_homework_select.svg b/miniprogram/course/images/svg/group_homework_select.svg new file mode 100644 index 0000000..537df55 --- /dev/null +++ b/miniprogram/course/images/svg/group_homework_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/module.svg b/miniprogram/course/images/svg/module.svg new file mode 100644 index 0000000..af520e1 --- /dev/null +++ b/miniprogram/course/images/svg/module.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/module_select.svg b/miniprogram/course/images/svg/module_select.svg new file mode 100644 index 0000000..09a6e6b --- /dev/null +++ b/miniprogram/course/images/svg/module_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/poll.svg b/miniprogram/course/images/svg/poll.svg new file mode 100644 index 0000000..a22c836 --- /dev/null +++ b/miniprogram/course/images/svg/poll.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/poll_select.svg b/miniprogram/course/images/svg/poll_select.svg new file mode 100644 index 0000000..7ea9b73 --- /dev/null +++ b/miniprogram/course/images/svg/poll_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/shixun_homework.svg b/miniprogram/course/images/svg/shixun_homework.svg new file mode 100644 index 0000000..eab3ffb --- /dev/null +++ b/miniprogram/course/images/svg/shixun_homework.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/shixun_homework_select.svg b/miniprogram/course/images/svg/shixun_homework_select.svg new file mode 100644 index 0000000..2303ee9 --- /dev/null +++ b/miniprogram/course/images/svg/shixun_homework_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/statistics.svg b/miniprogram/course/images/svg/statistics.svg new file mode 100644 index 0000000..d7fb741 --- /dev/null +++ b/miniprogram/course/images/svg/statistics.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/statistics_select.svg b/miniprogram/course/images/svg/statistics_select.svg new file mode 100644 index 0000000..d57e32b --- /dev/null +++ b/miniprogram/course/images/svg/statistics_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/video.svg b/miniprogram/course/images/svg/video.svg new file mode 100644 index 0000000..3732d13 --- /dev/null +++ b/miniprogram/course/images/svg/video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/images/svg/video_select.svg b/miniprogram/course/images/svg/video_select.svg new file mode 100644 index 0000000..20b7a57 --- /dev/null +++ b/miniprogram/course/images/svg/video_select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/miniprogram/course/modules/activity/activity.wxml b/miniprogram/course/modules/activity/activity.wxml index 9397824..540324c 100644 --- a/miniprogram/course/modules/activity/activity.wxml +++ b/miniprogram/course/modules/activity/activity.wxml @@ -1,5 +1,7 @@ + - + + diff --git a/miniprogram/course/modules/activity/activity.wxss b/miniprogram/course/modules/activity/activity.wxss index 350fd40..4c0e6b5 100644 --- a/miniprogram/course/modules/activity/activity.wxss +++ b/miniprogram/course/modules/activity/activity.wxss @@ -1,3 +1,6 @@ +.module{ + height: 100%; +} .activities{ background: white; height: 100%; diff --git a/miniprogram/course/modules/activity/activity_group/activity_group.wxml b/miniprogram/course/modules/activity/activity_group/activity_group.wxml index 790bacc..625b42c 100644 --- a/miniprogram/course/modules/activity/activity_group/activity_group.wxml +++ b/miniprogram/course/modules/activity/activity_group/activity_group.wxml @@ -1,6 +1,6 @@ {{_date}} - + \ No newline at end of file diff --git a/miniprogram/course/pages/course/course.js b/miniprogram/course/pages/course/course.js index 7423845..c8a93ea 100644 --- a/miniprogram/course/pages/course/course.js +++ b/miniprogram/course/pages/course/course.js @@ -1,178 +1,317 @@ const app = getApp(); //status:[0,401,409] -const defaultModules=[{type:"activity", name:"课堂动态"}]; -const supportModules = ["activity", "attachment", "exercise","shixun_homework", "attendance"]; +const defaultModules = [{ + type: "activity", + name: "课堂动态" +}]; +const supportModules = ["activity", "attachment", "exercise", "shixun_homework", "attendance"]; +const nosupportMsgs = { + video:"请使用网页版EduCoder" +}; + Component({ - properties:{ - course_id:Number, - module_type:{ - type:String, - observer:function(module){ - this.setModule(module,0); + properties: { + course_id: Number, + module_type: { + type: String, + observer: function (module) { + //this.setModule(module,0); } }, }, data: { - status:0, - refresh:0, - nav_type:"navigateback", - module:{ - type:"activity", - name:"课堂动态" + status: 0, + refresh: 0, + nav_type: "back", + current:0, + module: { + type: "activity", + name: "课堂动态" }, + tabbar_show:1, course: {}, - is_teacher: true, - course_modules: [], - hidden_modules: [] , - statusBarHeight:20, - windowWidth:375, + is_teacher: true, + course_modules: [], + hidden_modules: [], + statusBarHeight: 20, + windowWidth: 375, eduImgDir: global.config.eduImgDir, - scenes:{ - 401:{ - buttons:["点击登录","返回"] + scenes: { + 401: { + buttons: ["点击登录", "返回"] }, - 409:{ - message:"你不是该课堂的成员", - buttons:["加入课堂","返回"] + 409: { + message: "你不是该课堂的成员", + buttons: ["加入课堂", "返回"] }, - 404:{ - message:"该课堂已经被删除了", - buttons:["返回"] + 404: { + message: "该课堂已经被删除了", + buttons: ["返回"] } } }, - methods:{ - switchRole({target:{dataset:{role}}}){ - if(!role) return; - app.api("courses.switch_to_"+role)({course_id: this.data.course_id}) - .then(res=>{ - this.onPullDownRefresh(); - app.showMsg(res); - }).catch(app.showError) - }, - setModule({type,showToast=1}){ - for(var module of this.data.course_modules){ - if(module.type==type){ - if(supportModules.indexOf(type)==-1){ - if(showToast) - wx.showToast({ - title: `暂不支持${module.name}模块`,icon:"none" - }); - return false; + methods: { + switchRole({target: { dataset: {role}}}) { + if (!role) return; + app.api("courses.switch_to_" + role)({ + course_id: this.data.course_id + }) + .then(res => { + this.onPullDownRefresh(); + app.showMsg(res); + }).catch(app.showError) + }, + onModuleTap({currentTarget:{dataset:{type}}}){ + if(this.setModule({type: type})){ + this.setData({showModules:0}) + } + }, + onModuleChange({detail: {index,item}}) { + if (item.type == "more"){ + this.setData({ + showModules: 1, + current: this.data.current + }); + }else + this.setModule({ + type: item.type + }); + }, + setModule({type,showToast = 1}) { + for (var module of this.data.course_modules) { + if (module.type == type) { + if (supportModules.indexOf(type) == -1) { + if (showToast) + wx.showToast({ + title: nosupportMsgs[type]||`暂不支持${module.name},请使用网页版`, + icon: "none" + }); + this.setData({current: this.data.current}); + return false; + } + this.setData({ + module + }); } - this.setData({module}); - return true; } - } - return false; - }, - enterShare(){ - let {course_id, course} = this.data; - let url = `{course_invite}?course_id=${course_id}&invite_code=${course.invite_code}`; - app.navigateTo({url}); - }, - onTapCode() { - let { name, invite_code, code_halt} = this.data.course; - if(!code_halt) - wx.setClipboardData({data: `输入邀请码${invite_code}加入“${name}”吧`}) - else - wx.showActionSheet({ - itemList: ["启用邀请码"], - success:res=>{ - app.api("courses.set_invite_code_halt")({course_id: this.data.course_id}) - .then(res=>{ - app.showMsg(res); - this.refresh({refresh:0}); - }) + for (var i = 0; i < this.data.list.length; i++) { + if (this.data.list[i].type == type) { + this.setData({ + current: i + }); + return true; } - }) - }, - switchModule({currentTarget:{dataset:{type}}}){ - let list = this.data.course_modules.filter(item=>item.type==type); - if(list[0]&&list[0].type) - this.setModule({type:list[0].type}); - }, - navigateBack(){ - if(this.data.nav_type=="navigateback") - wx.navigateBack({ - delta:1 + } + this.setData({ + current: -1 }); - else - app.reLaunch({ - url: '{main}', + return true; + }, + enterShare() { + let { + course_id, + course + } = this.data; + let url = `{course_invite}?course_id=${course_id}&invite_code=${course.invite_code}`; + app.navigateTo({ + url }); - }, - async pullCourse(){ - let {course_id} = this.data; - let course = await app.api("courses.top_banner")({course_id}); - this.setData({course}); - return {course}; - }, - async pullModules(){ - let { course_id } = this.data; - let data = await app.api("courses.left_banner")({ course_id }); - data.course_modules = defaultModules.concat(data.course_modules); - this.setData(data); - return data; - }, - onTapError({detail:{status, target, current}}){ - console.log(target); - switch(status){ - case 401: - if(current==0) - return app.navigateTo({url:"{account}"}); - else if(current==1) - return this.navigateBack(); - case 409: - if(current==0) - return this.setData({show_join_course: 1}); - else if(current==1) + }, + onTapCode() { + let { + name, + invite_code, + code_halt + } = this.data.course; + if (!code_halt) + wx.setClipboardData({ + data: `输入邀请码${invite_code}加入“${name}”吧` + }) + else + wx.showActionSheet({ + itemList: ["启用邀请码"], + success: res => { + app.api("courses.set_invite_code_halt")({ + course_id: this.data.course_id + }) + .then(res => { + app.showMsg(res); + this.refresh({ + refresh: 0 + }); + }) + } + }) + }, + + navigateBack() { + if (this.data.nav_type == "back") + wx.navigateBack({ + delta: 1 + }); + else + app.reLaunch({ + url: '{main}', + }); + }, + async pullCourse() { + let { + course_id + } = this.data; + let course = await app.api("courses.top_banner")({ + course_id + }); + this.setData({ + course + }); + return { + course + }; + }, + async pullModules() { + let { + course_id + } = this.data; + let data = await app.api("courses.left_banner")({ + course_id + }); + let course_modules = defaultModules.concat(data.course_modules); + course_modules = course_modules.filter(i=>supportModules.indexOf(i.type)>-1); + this.setData({ + course_modules + }); + this.setTabbar({ + course_modules + }); + return course_modules; + }, + setTabbar({course_modules}) { + var base = "/course/images/svg/" + if (course_modules.length <= 5) { + var list = course_modules.map(m => { + return { + type: m.type, + text: m.name, + selectedIconPath: base + m.type + "_select.svg", + iconPath: base + m.type + ".svg" + }; + }) + } else { + var list = []; + for (var i = 0; i < 5; i++) { + if (i == 2) + list.push({ + type: "more", + text: "更多", + selectedIconPath: base + "module_select.svg", + iconPath: base + "module.svg" + }); + else { + var m = course_modules[i]; + list.push({ + type: m.type, + text: m.name, + selectedIconPath: base + m.type + "_select.svg", + iconPath: base + m.type + ".svg" + }); + } + } + } + this.setData({ + list + }); + return list; + }, + onTapError({ + detail: { + status, + target, + current + } + }) { + console.log(target); + switch (status) { + case 401: + if (current == 0) + return app.navigateTo({ + url: "{account}" + }); + else if (current == 1) + return this.navigateBack(); + case 409: + if (current == 0) + return this.setData({ + show_join_course: 1 + }); + else if (current == 1) + return this.navigateBack(); + case 404: return this.navigateBack(); - case 404: - return this.navigateBack(); - } - }, - refresh({ refresh = 1 } = {}) { - app.syncUser().then(res => { - this.pullCourse().then(res=>{ - this.setData({ status: 200, refresh}); + } + }, + refresh({ + refresh = 1 + } = {}) { + app.syncUser().then(res => { + this.pullCourse().then(res => { + this.setData({ + status: 200, + refresh + }); + }) + .catch(e => { + this.setData({ + status: e.code + }); + }); + this.pullModules() + .then(res => { + console.log(res); + }); }) - .catch(e=>{ - this.setData({status:e.code}); + }, + changeTabbar({show}){ + this.setData({tabbar_show:show}); + }, + onLoad: function () { + wx.getSystemInfo({ + success: res => { + let { + statusBarHeight, + windowWidth + } = res; + this.setData({ + statusBarHeight, + windowWidth + }) + }, }); - this.pullModules() - .then(res => { - console.log(res); + let pages = getCurrentPages(); + if (pages.length <= 1) + this.setData({ + nav_type: "home" }); - }) - }, - onLoad: function () { - wx.getSystemInfo({ - success:res=>{ - let { statusBarHeight, windowWidth} = res; - this.setData({ statusBarHeight, windowWidth}) - }, - }); - let pages = getCurrentPages(); - if(pages.length<=1) - this.setData({nav_type:"relaunch"}); - else - this.setData({nav_type:"navigateback"}) - this.refresh({refresh:0}); - }, - onShow: function () { - if(this.data.status!=200&&this.data.status!=0||this.data.status!=0){ - this.refresh(); - } - }, - onReady:function(){ + else + this.setData({ + nav_type: "back" + }) + this.refresh({ + refresh: 0 + }); + }, + onShow: function () { + if (this.data.status != 200 && this.data.status != 0 || this.data.status != 0) { + this.refresh(); + } + }, + onReady: function () { - }, - onPullDownRefresh(){ - this.refresh(); - }, - onShareAppMessage: function () { + }, + onPullDownRefresh() { + this.refresh(); + }, + onShareAppMessage: function () { - } + } } }) \ No newline at end of file diff --git a/miniprogram/course/pages/course/course.json b/miniprogram/course/pages/course/course.json index 18ccaef..0d02d0b 100644 --- a/miniprogram/course/pages/course/course.json +++ b/miniprogram/course/pages/course/course.json @@ -8,11 +8,14 @@ "activity":"/course/modules/activity/activity", "attendance":"/course/modules/attendance/attendance", "join-course":"/components/modal/join-course/join-course", - "error-page":"/components/error-page/error-page" + "error-page":"/components/error-page/error-page", + "mp-tabbar": "weui-miniprogram/tabbar/tabbar", + "mp-halfScreenDialog": "weui-miniprogram/half-screen-dialog/half-screen-dialog", + "mp-icon": "/weui-miniprogram/icon/icon" }, "navigationStyle": "custom", "navigationBarTextStyle": "white", "enablePullDownRefresh": true, "backgroundTextStyle": "light", - "backgroundColor": "#000541" + "backgroundColor": "#0080f0" } \ No newline at end of file diff --git a/miniprogram/course/pages/course/course.wxml b/miniprogram/course/pages/course/course.wxml index 21baf0c..2a12a93 100644 --- a/miniprogram/course/pages/course/course.wxml +++ b/miniprogram/course/pages/course/course.wxml @@ -1,71 +1,71 @@ - - - - - {{item.name}} - - - - + + + + + + + + {{course.name}}{{module_name}} + + + + + + + {{course.teacher_name}} + {{course.teacher_school}} + + + 教师{{course.teacher_count}} + | + 学生{{course.student_count}} + + | + 学分{{course.credit}} + + + + + + + + + + + + + 邀请成员 + + + | + + + 邀请码: + {{course.code_halt?'已停用':course.invite_code}} + + + + + + + + + + + + - - - - - - - - {{course.name}}{{module_name}} - - - - - - - {{course.teacher_name}} - {{course.teacher_school}} - - - 教师{{course.teacher_count}} - | - 学生{{course.student_count}} - - | - 学分{{course.credit}} - - - - - - - - - - - - - 邀请成员 - - | - - - 邀请码: - {{course.code_halt?'已停用':course.invite_code}} - - - - - - - - - - - - - + - - - {{user.name}} - - + + 完善个人信息 diff --git a/miniprogram/shixun_homework/pages/shixun_homework/shixun_homework.js b/miniprogram/shixun_homework/pages/shixun_homework/shixun_homework.js index 9faaecf..b93f6cb 100644 --- a/miniprogram/shixun_homework/pages/shixun_homework/shixun_homework.js +++ b/miniprogram/shixun_homework/pages/shixun_homework/shixun_homework.js @@ -16,7 +16,7 @@ Page({ this.setData(res); }) .catch(e=>{ - app.showEror(e); + app.showError(e); }) }, enterShixun(){ diff --git a/miniprogram/task/pages/task/task.wxml b/miniprogram/task/pages/task/task.wxml index e21da7c..30a36ef 100644 --- a/miniprogram/task/pages/task/task.wxml +++ b/miniprogram/task/pages/task/task.wxml @@ -11,11 +11,15 @@
- - +
diff --git a/project.config.json b/project.config.json index 7dfed1f..21a17e3 100644 --- a/project.config.json +++ b/project.config.json @@ -26,10 +26,11 @@ "disablePlugins": [], "outputPath": "" }, - "bundle": false + "bundle": false, + "skeletonGenerateFilesWithoutConfirm": true }, "compileType": "miniprogram", - "libVersion": "2.10.3", + "libVersion": "2.2.1", "appid": "wxc5c2b711f23f3a1d", "projectname": "educoder_weapp", "debugOptions": { @@ -105,17 +106,10 @@ "scene": null }, { - "id": -1, - "name": "course/pages/course_invite/course_invite", - "pathName": "course/pages/course_invite/course_invite", - "query": "", - "scene": null - }, - { - "id": -1, + "id": 7, "name": "course/pages/course/course", "pathName": "course/pages/course/course", - "query": "course_id=5141", + "query": "course_id=6708", "scene": null }, {