diff --git a/common/http.api.js b/common/http.api.js
index 168718d..77aad60 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -19,10 +19,10 @@ let apiApp = {
courseUpdateSign: "/api/mobile/course/update-sign",
courseContent: '/api/mobile/course/contents',
courseUserList: "/api/mobile/course/user-list",
- courseGetSign: "/api/mobile/course/get-sign",
- myCourseContent:'/api/mobile/course/my-course-content',
-
- courseContentDetail:'/api/mobile/course/course-content-detail',
+ courseGetSign: "/api/mobile/course/get-sign",
+ myCourseContent:'/api/mobile/course/my-course-content',
+
+ courseContentDetail:'/api/mobile/course/course-content-detail',
courseContentForm:'/api/mobile/course/course-content-form',
// 资讯
@@ -54,6 +54,14 @@ let apiApp = {
bookIndex: '/api/mobile/book/index',
bookDetail: '/api/mobile/book/detail',
bookOther: '/api/mobile/book/other',
+
+ // 日历
+ calendarsGet:'/api/mobile/course/calendars',
+
+ // 签到
+ signGet:'/api/mobile/course/content-check-list',
+ signCheck:'/api/mobile/course/content-check',
+ signDistance:'/api/mobile/course/distance',
}
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作
@@ -77,10 +85,10 @@ const install = (Vue, vm) => {
let courseUpdateSign = (params = {}) => vm.$u.post(apiApp.courseUpdateSign, params);
let courseContent = (params = {}) => vm.$u.get(apiApp.courseContent, params);
let courseUserList = (params = {}) => vm.$u.get(apiApp.courseUserList, params);
- let courseGetSign = (params = {}) => vm.$u.get(apiApp.courseGetSign, params);
- let myCourseContent = (params = {}) => vm.$u.get(apiApp.myCourseContent, params);
- let courseContentDetail = (params = {}) => vm.$u.get(apiApp.courseContentDetail, params);
- let courseContentForm = (params = {}) => vm.$u.post(apiApp.courseContentForm, params);
+ let courseGetSign = (params = {}) => vm.$u.get(apiApp.courseGetSign, params);
+ let myCourseContent = (params = {}) => vm.$u.get(apiApp.myCourseContent, params);
+ let courseContentDetail = (params = {}) => vm.$u.get(apiApp.courseContentDetail, params);
+ let courseContentForm = (params = {}) => vm.$u.post(apiApp.courseContentForm, params);
@@ -118,6 +126,13 @@ const install = (Vue, vm) => {
let bookDetail = (params = {}) => vm.$u.get(apiApp.bookDetail, params);
let bookOther = (params = {}) => vm.$u.get(apiApp.bookOther, params);
+ // 日历
+ let calendarsGet = (params = {}) => vm.$u.get(apiApp.calendarsGet, params);
+ // 签到
+ let signGet = (params = {}) => vm.$u.get(apiApp.signGet, params);
+ let signCheck = (params = {}) => vm.$u.get(apiApp.signCheck, params);
+ let signDistance = (params = {}) => vm.$u.get(apiApp.signDistance, params);
+
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = {
// 用户
@@ -139,9 +154,9 @@ const install = (Vue, vm) => {
courseUpdateSign,
courseContent,
courseUserList,
- courseGetSign,
- myCourseContent,
- courseContentDetail,
+ courseGetSign,
+ myCourseContent,
+ courseContentDetail,
courseContentForm,
// 预约
scheduleIndex,
@@ -171,6 +186,12 @@ const install = (Vue, vm) => {
bookIndex,
bookDetail,
bookOther,
+ // 日历
+ calendarsGet,
+ // 签到
+ signGet,
+ signCheck,
+ signDistance,
};
}
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 531b9d4..6de59ed 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -37,7 +37,7 @@ async function getToken() {
resolve(result.data.token);
},
fail(err) {
- console.log("login-error",err)
+ console.log("login-error",err)
reject(err);
}
@@ -61,9 +61,13 @@ async function getUserInfo(tokenResult) {
'vuex_token': tokenResult,
"vuex_user": result1.data.user
})
- uni.reLaunch({
- url: '/pages/index/index'
- });
+ // 登录成功后跳回之前的页面(带参),若无则回首页
+ const redirect = uni.getStorageSync('redirect_after_login')
+ uni.removeStorageSync('redirect_after_login')
+ const target = redirect || '/pages/index/index'
+ uni.reLaunch({
+ url: target
+ });
},
fail(err) {
console.log("uesr-error",err)
@@ -104,7 +108,23 @@ const install = (Vue, vm) => {
console.log('res-http', res)
if (res.statusCode === 200) {
if (res.data.hasOwnProperty("errcode")) {
- if (res.data?.errcode === 40001) {
+ if (res.data?.errcode === 40001) {
+ // 记录当前页面完整路径,登录成功后跳回
+ try {
+ const pages = getCurrentPages()
+ if (pages && pages.length) {
+ const current = pages[pages.length - 1]
+ const route = current.route || current.$page?.fullPath || ''
+ let url = '/' + route
+ if (current.options) {
+ const qs = Object.keys(current.options)
+ .map(k => `${k}=${encodeURIComponent(current.options[k])}`)
+ .join('&')
+ if (qs) url += '?' + qs
+ }
+ uni.setStorageSync('redirect_after_login', url)
+ }
+ } catch (e) {}
uni.showModal({
title: '用户信息已失效',
confirmText: '重新获取',
diff --git a/components/calendar-grid/calendar-grid.vue b/components/calendar-grid/calendar-grid.vue
new file mode 100644
index 0000000..2719dae
--- /dev/null
+++ b/components/calendar-grid/calendar-grid.vue
@@ -0,0 +1,497 @@
+
+
+
+
+
+ {{ d }}
+
+
+
+
+
+
+ {{ cell.date }}
+
+
+ {{ ev.title }}
+
+
+
+
+
+
+
+
+ {{ seg.title }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/manifest.json b/manifest.json
index 78242a7..1146275 100644
--- a/manifest.json
+++ b/manifest.json
@@ -85,7 +85,7 @@
"disableHostCheck" : true,
"https" : false
},
- "title" : "蟹太太",
+ "title" : "苏州科技商学院",
"sdkConfigs" : {
"maps" : {}
}
diff --git a/packages/courseCalendar/calendar.vue b/packages/courseCalendar/calendar.vue
new file mode 100644
index 0000000..de19082
--- /dev/null
+++ b/packages/courseCalendar/calendar.vue
@@ -0,0 +1,709 @@
+
+
+
+
+
+
+
+
+
+
+
+
{{ date.getDate() }}
+
+
+
+
+
+
+
+ {{ event.title }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/courseCalendar/index.vue b/packages/courseCalendar/index.vue
index a0e727f..af2c448 100644
--- a/packages/courseCalendar/index.vue
+++ b/packages/courseCalendar/index.vue
@@ -1,7 +1,7 @@
-
-
+
本月暂无日程
@@ -74,37 +79,22 @@
- 课程类型
+ 日程类型
{{ getCourseTypeName(detailData.type) }}
- 开课时间
- {{ formatDateTime(detailData.start) }}
+ 开始时间
+ {{ formatDateTime(detailData.start_time) }}
- 课程地点
- {{ detailData.location }}
-
-
- 主讲老师
- {{ detailData.teacher }}
+ 结束时间
+ {{ formatDateTime(detailData.end_time) }}
- 课程简介
- {{ detailData.description }}
-
-
- VIP专享内容
-
- 课程大纲:
- 模块一:人工智能基础理论
- 模块二:具身智能技术应用
- 模块三:产业落地实践
- 课程资料:
- 课程讲义下载
- 案例分析材料
- 实践项目指导
+ 日程详情
+
+
@@ -118,10 +108,10 @@