diff --git a/api/index.js b/api/index.js index 0225b49..5036d37 100644 --- a/api/index.js +++ b/api/index.js @@ -38,3 +38,6 @@ export function agreeMa(params) { return http.get("/index/agreeMa",params); } +export function city_list(params) { + return http.get("/index/city_list",params); +} \ No newline at end of file diff --git a/api/user.js b/api/user.js index 8b3831d..b96397c 100644 --- a/api/user.js +++ b/api/user.js @@ -204,4 +204,16 @@ export function helpCenter(){ export function addFeedback(){ return http.post("/my/addfeedback"); +} + +export function unReadMsgNum(params) { + return http.get("/my/unReadMsgNum",params); +} + +export function setReaded(params) { + return http.get("/my/setReaded",params); +} + +export function messageList(params) { + return http.get("/my/messageList",params); } \ No newline at end of file diff --git a/components/Message/index.vue b/components/Message/index.vue new file mode 100644 index 0000000..1f50469 --- /dev/null +++ b/components/Message/index.vue @@ -0,0 +1,98 @@ + + + + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index ee37377..c64ff3b 100644 --- a/manifest.json +++ b/manifest.json @@ -123,7 +123,12 @@ "minified" : true }, "usingComponents" : true, - "libVersion" : "latest" + "libVersion" : "latest", + "permission" : { + "scope.userLocation" : { + "desc" : "用于小程序首页位置展示" + } + } }, "mp-alipay" : { "usingComponents" : true diff --git a/pages.json b/pages.json index 283f8df..d7a9668 100644 --- a/pages.json +++ b/pages.json @@ -96,6 +96,12 @@ "style": { "navigationBarTitleText": "购物车" } + }, + { + "path": "pages/index/position", + "style": { + "navigationBarTitleText": "城市列表" + } } ], "subPackages": [ @@ -278,6 +284,12 @@ "style": { "navigationBarTitleText": "赠送礼物" } + }, + { + "path": "offlineCourseList", + "style": { + "navigationBarTitleText": "线下课堂" + } } ] }, @@ -514,6 +526,12 @@ "style": { "navigationBarTitleText": "刷题过关" } + }, + { + "path": "clockRecord", + "style": { + "navigationBarTitleText": "打卡记录" + } } ] }, diff --git a/pages/course/special_cate.vue b/pages/course/special_cate.vue index 7d91745..2d0f659 100644 --- a/pages/course/special_cate.vue +++ b/pages/course/special_cate.vue @@ -29,17 +29,15 @@ - + @@ -108,12 +109,14 @@ import { getSpecialIndexData } from "@/api/special"; import Advert from '@/components/Advert/index.vue'; import SquareStyleCourse from '@/components/Course/squareStyleCourse.vue'; import OfflineStyleCourse from '@/components/Course/offlineStyleCourse.vue'; +import MessageBox from '@/components/Message/index.vue'; export default { components: { Advert, SquareStyleCourse, OfflineStyleCourse, + MessageBox, }, data() { return { @@ -227,6 +230,11 @@ import OfflineStyleCourse from '@/components/Course/offlineStyleCourse.vue'; url: `/pages/special/offline_details?id=${item.id}`, }); }, + checkRecord() { + uni.navigateTo({ + url: '/pages/learningCenter/clockRecord', + }) + }, }, }; diff --git a/pages/learningCenter/clockRecord.vue b/pages/learningCenter/clockRecord.vue new file mode 100644 index 0000000..d0070a5 --- /dev/null +++ b/pages/learningCenter/clockRecord.vue @@ -0,0 +1,181 @@ + + + + + \ No newline at end of file diff --git a/pages/learningCenter/components/calendar.vue b/pages/learningCenter/components/calendar.vue new file mode 100644 index 0000000..56328e3 --- /dev/null +++ b/pages/learningCenter/components/calendar.vue @@ -0,0 +1,335 @@ + + + + + diff --git a/pages/mine/index.vue b/pages/mine/index.vue index f616a8d..b47dee8 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -20,9 +20,9 @@ - + - 6 + {{ unReadMsgNum }} @@ -132,7 +132,8 @@ getMenus, getCopyrightInfo, getUserBaseData, - saveUserInfo + saveUserInfo, + unReadMsgNum } from "@/api/user"; import { VALID_LOGIN_STATUS } from "@/store/types/action-types"; import { getMerchantApplyStatus } from "@/api/merchant"; @@ -182,7 +183,8 @@ userid: 0, teacherInfo: null, TOUTIAO_STATUS:false, - imId:'' + imId:'', + unReadMsgNum: 0, }; }, computed: { @@ -196,6 +198,7 @@ this.getQuestion(); this.getMenu(); this.get_copyright(); + this.getUnReadMsgNum(); if (uni.getUserProfile) { this.canUseGetUserProfile = true } @@ -206,10 +209,19 @@ watch: { isLogin() { this.getMenu(); - this.getUserBaseData(); + this.getUserBaseData(); + this.getUnReadMsgNum(); } }, methods: { + async getUnReadMsgNum() { + try { + const { data } = await unReadMsgNum({}); + this.unReadMsgNum = data.unReadMsgNum; + } catch (err) { + console.log(err); + } + }, async childClick(e) { console.log(e) const result = await saveUserInfo({ @@ -344,6 +356,18 @@ } ); }, + toNoticeList() { + this.$util.checkLogin( + () => { + uni.navigateTo({ + url: "/pages/my/noticeList", + }); + }, + () => { + this.$util.showMsg("请登录后再进行访问!"); + } + ); + }, //所有插件回调处理事件 changeVal: function (opt) { if (typeof opt != "object") opt = {}; diff --git a/pages/my/noticeDetail.vue b/pages/my/noticeDetail.vue index 7a0100f..8a38d94 100644 --- a/pages/my/noticeDetail.vue +++ b/pages/my/noticeDetail.vue @@ -21,6 +21,7 @@ diff --git a/pages/my/noticeList.vue b/pages/my/noticeList.vue index 8d92f75..14f845f 100644 --- a/pages/my/noticeList.vue +++ b/pages/my/noticeList.vue @@ -3,32 +3,65 @@ - + - {{ item.title }} + {{ item.message_types.name }} {{ item.content }} {{ item.time }} - {{ item.num }} + {{ item.count }} + {{ loadTitle }} + + 暂无课程 + 暂无消息 + + + \ No newline at end of file diff --git a/pages/special/search.vue b/pages/special/search.vue index 51c2fcd..298926c 100644 --- a/pages/special/search.vue +++ b/pages/special/search.vue @@ -62,14 +62,8 @@ export default { finished: false, singleDetailsURL: "/pages/special/single_details", detailsURL: "/pages/special/details", - isEmpty: false, }; }, - watch: { - specialList(val) { - this.isEmpty = !val.length; - }, - }, onShareAppMessage() { return {}; }, @@ -82,6 +76,10 @@ export default { this.special_type = options.specialType || ''; this.getSpecialList(); }, + + onReachBottom() { + this.getSpecialList(); + }, methods: { getJumpUrl(item) { return item.is_light ? this.singleDetailsURL : this.detailsURL + "?id=" + item.id; diff --git a/pages/special/specialCateCourse.vue b/pages/special/specialCateCourse.vue index 1294ebd..1f7f8f4 100644 --- a/pages/special/specialCateCourse.vue +++ b/pages/special/specialCateCourse.vue @@ -9,7 +9,7 @@ - 加载更多 + 加载更多 @@ -49,9 +49,15 @@ }, methods: { loadMore(key) { - uni.navigateTo({ - url: `/pages/special/search?gradeId=${this.gradeId}&subjectId=${this.subjectId}&specialCate=${key}` - }) + if (key === 'offline_courses') { + uni.navigateTo({ + url: `/pages/special/offlineCourseList?gradeId=${this.gradeId}&subjectId=${this.subjectId}&specialCate=${key}` + }) + } else { + uni.navigateTo({ + url: `/pages/special/search?gradeId=${this.gradeId}&subjectId=${this.subjectId}&specialCate=${key}` + }) + } }, handleSpecialClick(item) { const url = item.is_light diff --git a/static/images/learning/record-bg.png b/static/images/learning/record-bg.png new file mode 100644 index 0000000..fe9b9bf Binary files /dev/null and b/static/images/learning/record-bg.png differ diff --git a/static/images/message.png b/static/images/message.png new file mode 100644 index 0000000..59ff94e Binary files /dev/null and b/static/images/message.png differ