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 @@
+
+
+
+
+ {{ title }}
+ {{ title }}
+
+
+
+
+
+
+
+
\ 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 @@
-
-
-
+
{{ item.menuName }}
- 更多 >
+ 更多 >
-
+ { handleSpecialClick(item, 'my'); }">
@@ -95,6 +93,7 @@ import RecommendPoster from "@/components/RecommendPoster/index.vue";
import LineStyleCourse from '@/components/Course/lineStyleCourse.vue';
import SquareStyleCourse from '@/components/Course/squareStyleCourse.vue';
import OfflineStyleCourse from '@/components/Course/offlineStyleCourse.vue';
+import Advert from '@/components/Advert/index.vue';
const app = getApp();
export default {
@@ -104,6 +103,7 @@ import OfflineStyleCourse from '@/components/Course/offlineStyleCourse.vue';
LineStyleCourse,
SquareStyleCourse,
OfflineStyleCourse,
+ Advert,
},
data() {
return {
@@ -167,9 +167,15 @@ import OfflineStyleCourse from '@/components/Course/offlineStyleCourse.vue';
},
methods: {
getsearch(key){
- uni.navigateTo({
- url: `/pages/special/search?specialType=${key || ''}`
- })
+ if (key === 'offline_courses') {
+ uni.navigateTo({
+ url: `/pages/special/offlineCourseList?specialType=${key || ''}`
+ });
+ } else {
+ uni.navigateTo({
+ url: `/pages/special/search?specialType=${key || ''}`
+ });
+ }
},
showCateCourse(item) {
if (item.name === '全部分类') {
@@ -183,10 +189,10 @@ import OfflineStyleCourse from '@/components/Course/offlineStyleCourse.vue';
showLoginPage() {
this.$util.jumpLogin(this)
},
- handleSpecialClick(item) {
+ handleSpecialClick(item, type) {
const url = item.is_light
- ? '/pages/special/single_details?id=' + item.id
- : '/pages/special/details?id=' + item.id;
+ ? '/pages/special/single_details?id=' + (type ? item.s_id : item.id)
+ : '/pages/special/details?id=' + (type ? item.s_id : item.id);
// this.$util.checkLogin(() => {
uni.navigateTo({
diff --git a/pages/index/index.vue b/pages/index/index.vue
index af46b11..0ac20cd 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -4,7 +4,7 @@
@@ -555,6 +555,7 @@
import { getNews, getIndexData } from "@/api/index";
import { groupWorks, getSpecialList } from "@/api/special";
import { getGoodsList } from "@/api/store";
+import { unReadMsgNum } from '@/api/user';
import RecommendMaterial from "@/components/RecommendMaterial/index.vue";
import RecommendPoster from "@/components/RecommendPoster/index.vue";
import RecommendProblem from "@/components/RecommendProblem/index.vue";
@@ -600,6 +601,7 @@ export default {
specialList: [],
goodsList: [],
scrollTop: 0,
+ unReadMsgNum: 0,
};
},
onShow() {
@@ -617,17 +619,23 @@ export default {
this.getGoodsList();
this.getNewsList();
this.getgroupWork();
+ this.getUnReadMsgNum();
// console.log('获取定位=====》');
- // uni.getLocation({
- // type: 'gcj02',
- // geocode: true,
- // success: (res) => {
- // console.log(res);
- // },
- // fail: (e) => {
- // console.log(e);
- // }
- // })
+ // try{
+ // uni.getLocation({
+ // type: 'gcj02',
+ // geocode: true,
+ // success: (res) => {
+ // console.log(res);
+ // },
+ // fail: (e) => {
+ // console.log(e);
+ // }
+ // })
+ // }catch(e){
+ // console.log(e);
+ // //TODO handle the exception
+ // }
},
created() {
//#ifdef MP-WEIXIN
@@ -661,6 +669,14 @@ export default {
console.log(err);
}
},
+ async getUnReadMsgNum() {
+ try {
+ const { data } = await unReadMsgNum({});
+ this.unReadMsgNum = data.unReadMsgNum;
+ } catch (err) {
+ console.log(err);
+ }
+ },
handleSpecialClick(item) {
const url = item.is_light
? '/pages/special/single_details?id=' + item.id
@@ -860,6 +876,23 @@ export default {
})
}
},
+ toNoticeList() {
+ this.$util.checkLogin(
+ () => {
+ uni.navigateTo({
+ url: "/pages/my/noticeList",
+ });
+ },
+ () => {
+ this.$util.showMsg("请登录后再进行访问!");
+ }
+ );
+ },
+ toPosition() {
+ uni.navigateTo({
+ url: "/pages/index/position",
+ });
+ },
},
};
diff --git a/pages/index/position.vue b/pages/index/position.vue
new file mode 100644
index 0000000..105adf8
--- /dev/null
+++ b/pages/index/position.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+ 你所在地区
+
+ {{ position }}
+
+
+
+
+ 热门城市
+
+ {{ item.name }}
+
+
+
+
+ {{ item }}
+
+ {{ city.name }}
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/learning/index.vue b/pages/learning/index.vue
index e4a499f..91a11b0 100644
--- a/pages/learning/index.vue
+++ b/pages/learning/index.vue
@@ -44,7 +44,7 @@
打卡记录
- 查看 >
+ 查看 >
@@ -74,7 +74,7 @@
-
+
视频课
@@ -87,7 +87,7 @@
-
+
@@ -99,6 +99,7 @@
+
@@ -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 @@
+
+
+
+
+
+
+
+ 累计打卡
+ {{ totalClock }}天
+
+
+
+ 今日打卡
+ {{ todayClock ? '已打卡' : '暂未打卡' }}
+
+
+
+
+
+
+
+ —— 打卡记录 ——
+
+
+
+ {{ item.name }}
+ {{ item.score }}分
+
+
+ 用时:{{ item.time }}
+ {{ item.date }}
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+ {{ monthYear }}
+
+
+
+
+
+ 日
+ 一
+ 二
+ 三
+ 四
+ 五
+ 六
+
+
+
+ {{ item.month === 'current' ? item.date : '' }}
+
+
+
+
+
+
+
+
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 @@
-
@@ -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