diff --git a/common/http.api.js b/common/http.api.js index 09ec723..168718d 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -24,22 +24,36 @@ let apiApp = { courseContentDetail:'/api/mobile/course/course-content-detail', courseContentForm:'/api/mobile/course/course-content-form', + // 资讯 courseNews: "/api/mobile/course/news", // 预约 scheduleIndex: '/api/mobile/schedule/index', scheduleSave: '/api/mobile/schedule/save', scheduleDetail: '/api/mobile/schedule/detail', - scheduleCheck: '/api/mobile/schedule/check', - scheduleCancel: '/api/mobile/schedule/cancel', + scheduleCheck: '/api/mobile/schedule/check', + scheduleCancel: '/api/mobile/schedule/cancel', // 其他 otherConfig: '/api/mobile/other/config', otherBanner: '/api/mobile/other/banner', otherUploadFile: '/api/mobile/upload-file', getparameter: '/api/admin/parameter/show', - updateDonates: '/api/mobile/user/update-donates', - uploadFile:'/api/mobile/upload-file' + updateDonates: '/api/mobile/user/update-donates', + uploadFile:'/api/mobile/upload-file', + + // 供应需求 + supplyDemandSave: '/api/mobile/supply-demand/save', + supplyDemandList: '/api/mobile/supply-demand/index', + supplyDemandDetail: '/api/mobile/supply-demand/detail', + supplyDemandMessageList: '/api/mobile/supply-demand/message-list', + supplyDemandSendMessage: '/api/mobile/supply-demand/send-message', + supplyDemandDialogues: '/api/mobile/supply-demand/dialogues', + + // 图书 + bookIndex: '/api/mobile/book/index', + bookDetail: '/api/mobile/book/detail', + bookOther: '/api/mobile/book/other', } // 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作 @@ -67,6 +81,7 @@ const install = (Vue, vm) => { 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); + // 资讯 @@ -76,9 +91,9 @@ const install = (Vue, vm) => { let scheduleIndex = (params = {}) => vm.$u.get(apiApp.scheduleIndex, params); let scheduleSave = (params = {}) => vm.$u.post(apiApp.scheduleSave, params); let scheduleDetail = (params = {}) => vm.$u.get(apiApp.scheduleDetail, params); - let scheduleCheck = (params = {}) => vm.$u.get(apiApp.scheduleCheck, params); - let scheduleCancel = (params = {}) => vm.$u.get(apiApp.scheduleCancel, params); - + let scheduleCheck = (params = {}) => vm.$u.get(apiApp.scheduleCheck, params); + let scheduleCancel = (params = {}) => vm.$u.get(apiApp.scheduleCancel, params); + // 其他 @@ -86,9 +101,23 @@ const install = (Vue, vm) => { let otherBanner = (params = {}) => vm.$u.get(apiApp.otherBanner, params); let otherUploadFile = (params = {}) => vm.$u.post(apiApp.otherUploadFile, params); let getparameter = (params = {}) => vm.$u.get(apiApp.getparameter, params); - let updateDonates = (params = {}) => vm.$u.post(apiApp.updateDonates, params); + let updateDonates = (params = {}) => vm.$u.post(apiApp.updateDonates, params); let uploadFile = (params = {}) => vm.$u.post(apiApp.uploadFile, params); + + // 供应需求 + let supplyDemandSave = (params = {}) => vm.$u.post(apiApp.supplyDemandSave, params); + let supplyDemandList = (params = {}) => vm.$u.get(apiApp.supplyDemandList, params); + let supplyDemandDetail = (params = {}) => vm.$u.get(apiApp.supplyDemandDetail, params); + let supplyDemandMessageList = (params = {}) => vm.$u.get(apiApp.supplyDemandMessageList, params); + let supplyDemandSendMessage = (params = {}) => vm.$u.post(apiApp.supplyDemandSendMessage, params); + let supplyDemandDialogues = (params = {}) => vm.$u.get(apiApp.supplyDemandDialogues, params); + + // 图书 + let bookIndex = (params = {}) => vm.$u.get(apiApp.bookIndex, params); + let bookDetail = (params = {}) => vm.$u.get(apiApp.bookDetail, params); + let bookOther = (params = {}) => vm.$u.get(apiApp.bookOther, params); + // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 vm.$u.api = { // 用户 @@ -118,7 +147,7 @@ const install = (Vue, vm) => { scheduleIndex, scheduleSave, scheduleDetail, - scheduleCheck, + scheduleCheck, scheduleCancel, // 资讯 courseNews, @@ -126,9 +155,22 @@ const install = (Vue, vm) => { otherConfig, otherBanner, otherUploadFile, - getparameter: getparameter, - updateDonates:updateDonates, - uploadFile:uploadFile + getparameter: getparameter, + updateDonates:updateDonates, + uploadFile:uploadFile, + + // 供应需求 + supplyDemandSave, + supplyDemandList, + supplyDemandDetail, + supplyDemandMessageList, + supplyDemandSendMessage, + supplyDemandDialogues, + + // 图书 + bookIndex, + bookDetail, + bookOther, }; } diff --git a/packages/chat/chatWindow.vue b/packages/chat/chatWindow.vue new file mode 100644 index 0000000..b6b2c99 --- /dev/null +++ b/packages/chat/chatWindow.vue @@ -0,0 +1,362 @@ + + + + + \ No newline at end of file diff --git a/packages/chat/index.vue b/packages/chat/index.vue new file mode 100644 index 0000000..671fbe8 --- /dev/null +++ b/packages/chat/index.vue @@ -0,0 +1,166 @@ + + + + + \ No newline at end of file diff --git a/packages/library/detail.vue b/packages/library/detail.vue new file mode 100644 index 0000000..bef0551 --- /dev/null +++ b/packages/library/detail.vue @@ -0,0 +1,274 @@ + + + + + diff --git a/packages/library/index.vue b/packages/library/index.vue new file mode 100644 index 0000000..38fa2ff --- /dev/null +++ b/packages/library/index.vue @@ -0,0 +1,322 @@ + + + + + \ No newline at end of file diff --git a/packages/supply/detail.vue b/packages/supply/detail.vue new file mode 100644 index 0000000..ba4481d --- /dev/null +++ b/packages/supply/detail.vue @@ -0,0 +1,213 @@ + + + + + \ No newline at end of file diff --git a/packages/supply/index.vue b/packages/supply/index.vue new file mode 100644 index 0000000..37109c2 --- /dev/null +++ b/packages/supply/index.vue @@ -0,0 +1,316 @@ + + + + + \ No newline at end of file diff --git a/packages/supply/publish.vue b/packages/supply/publish.vue new file mode 100644 index 0000000..81b9e30 --- /dev/null +++ b/packages/supply/publish.vue @@ -0,0 +1,281 @@ + + + + + \ No newline at end of file diff --git a/packages/surveyFill/index.vue b/packages/surveyFill/index.vue index 1e45a48..4190e6f 100644 --- a/packages/surveyFill/index.vue +++ b/packages/surveyFill/index.vue @@ -38,7 +38,7 @@ 授课时间 - {{survey.date}} {{survey.start_time}}-{{survey.end_time}} + {{survey.date}} {{survey.start_time?survey.start_time:''}}-{{survey.end_time?survey.end_time:''}} diff --git a/pages.json b/pages.json index d19a7a0..34d4692 100644 --- a/pages.json +++ b/pages.json @@ -20,7 +20,7 @@ } }, { "path": "pages/me/index", - "style": { + "style": { "navigationBarTitleText": "我的" } }], @@ -28,103 +28,103 @@ "root": "packages", "pages": [{ "path": "my/index", - "style": { + "style": { "navigationBarTitleText": "个人信息" } },{ "path": "course/detail", - "style": { + "style": { "navigationBarTitleText": "" } },{ "path": "course/freeDetail", - "style": { + "style": { "navigationBarTitleText": "" } },{ "path": "register/index", - "style": { + "style": { "navigationBarTitleText": "注册" } },{ "path": "register/login", - "style": { + "style": { "navigationBarTitleText": "登录", "navigationStyle": "custom" } },{ "path": "apply/index", - "style": { + "style": { "navigationBarTitleText": "在线报名" } },{ "path": "booksubmit/index", - "style": { + "style": { "navigationBarTitleText": "我要预约" } },{ "path": "booksubmit/appointment", - "style": { + "style": { "navigationBarTitleText": "场地预约" } },{ "path": "schoolmate/index", - "style": { + "style": { "navigationBarTitleText": "校友库" } },{ "path": "mycourse/index", - "style": { + "style": { "navigationBarTitleText": "我的课程" } },{ "path": "mycourse/detail", - "style": { + "style": { "navigationBarTitleText": "课程详情" } },{ "path": "mycourse/courseStatus", - "style": { + "style": { "navigationBarTitleText": "报名状态" } },{ "path": "mycourse/coursePay", - "style": { + "style": { "navigationBarTitleText": "报名缴费" } },{ "path": "mycourse/courseContents", - "style": { + "style": { "navigationBarTitleText": "" } },{ "path": "mycourse/courseTxl", - "style": { + "style": { "navigationBarTitleText": "本班通讯录" } },{ "path": "mybook/index", - "style": { + "style": { "navigationBarTitleText": "我的预约" } },{ "path": "mybook/detail", - "style": { + "style": { "navigationBarTitleText": "预约详情" } },{ "path": "donate/index", - "style": { + "style": { "navigationBarTitleText": "校友捐赠" } },{ "path": "webview/index", - "style": { + "style": { "navigationBarTitleText": "苏州科技商学院" } },{ "path": "avatarUpload/index", - "style": { + "style": { "navigationBarTitleText": "更换头像" } },{ @@ -140,7 +140,42 @@ },{ "path": "sign/index", "style": { - "navigationBarTitleText": "课程签到" + "navigationBarTitleText": "课程签到" + } + },{ + "path": "library/index", + "style": { + "navigationBarTitleText": "图书馆" + } + },{ + "path": "library/detail", + "style": { + "navigationBarTitleText": "图书详情" + } + },{ + "path": "supply/index", + "style": { + "navigationBarTitleText": "供需发布" + } + },{ + "path": "supply/publish", + "style": { + "navigationBarTitleText": "发布供需" + } + },{ + "path": "supply/detail", + "style": { + "navigationBarTitleText": "供需详情" + } + },{ + "path": "chat/index", + "style": { + "navigationBarTitleText": "校友私信" + } + },{ + "path": "chat/chatWindow", + "style": { + "navigationBarTitleText": "校友私信" } }] }], diff --git a/pages/book/index.vue b/pages/book/index.vue index a69d221..9535cd4 100644 --- a/pages/book/index.vue +++ b/pages/book/index.vue @@ -1,14 +1,37 @@ @@ -22,22 +45,20 @@ data() { return { user: {}, - can_appointment: false, - enter_schoolmate: 0, - door_appointments: false, // 当前是否有预约 + enter_schoolmate: 0 + } + }, + onShareAppMessage() { + return{ + title:"苏州科技商学院", + imageUrl:"/static/share.jpg" + } + }, + onShareTimeline() { + return{ + title:"苏州科技商学院", + imageUrl:"/static/share.jpg" } - }, - onShareAppMessage() { - return{ - title:"苏州科技商学院", - imageUrl:"/static/share.jpg" - } - }, - onShareTimeline() { - return{ - title:"苏州科技商学院", - imageUrl:"/static/share.jpg" - } }, onShow() { this.getUser() @@ -49,48 +70,47 @@ this.$u.api.user().then(res => { console.log("res", res) this.enter_schoolmate = res.enter_schoolmate - if (res.user.appointment_total - res.user.pass_appointments > 0) { - this.can_appointment = true - } else { - this.can_appointment = false - } - // this.door_appointments = res.door_appointments ? true : false this.$u.vuex('vuex_user', res.user) }) }, - async toUrl(type) { - if (type === 1) { - uni.navigateTo({ - url: '/packages/booksubmit/appointment' - }) - // await this.$u.api.user().then(res => { - // if (res.user.appointment_total - res.user.pass_appointments > 0) { - // this.can_appointment = true - // uni.navigateTo({ - // url: '/packages/booksubmit/appointment' - // }) - // } else { - // this.can_appointment = false - // this.base.toast("您当前没有可预约次数") - // } - // }) - } else if (type === 2) { - if (this.enter_schoolmate) { + goToProfile() { + uni.navigateTo({ + url: '/packages/chat/index' + }); + }, + handleButtonClick(type) { + switch (type) { + case 'alumni': + if (this.enter_schoolmate) { + uni.navigateTo({ + url: '/packages/schoolmate/index' + }) + } else { + this.base.toast("您还不是校友,无权查看", 1000, function() { + setTimeout(function() { + uni.switchTab({ + url: '/pages/course/index' + }) + }, 1000) + + }) + } + break; + case 'booking': uni.navigateTo({ - url: '/packages/schoolmate/index' + url: '/packages/booksubmit/appointment' }) - } else { - this.base.toast("您还不是校友,无权查看",1000,function(){ - setTimeout(function(){ - uni.switchTab({ - url: '/pages/course/index' - }) - },1000) - - }) - - } - + break; + case 'supply-demand': + uni.navigateTo({ + url: '/packages/supply/index' + }) + break; + case 'library': + uni.navigateTo({ + url: '/packages/library/index' + }) + break; } } }, @@ -103,6 +123,10 @@ width: 100%; height: 100vh; padding-bottom: 200rpx; + display: flex; + justify-content: center; + align-items: center; + position: relative; .cbg { position: absolute; @@ -110,34 +134,72 @@ left: 0; width: 100%; height: 100vh; - } - .btn{ - width:320rpx; - // height:136rpx; - position: absolute; - image{ - width:100%; - height:100%; - } - view{ - text-align: center; - margin-top:10rpx; - color:#806e5c; - font-size:30rpx; - } - } - .schoolmate{ - - top: 300rpx; - left: 40rpx; - } - .book{ - bottom: 300rpx; - right: 40rpx; - } + z-index: -1; + } + + .profile-icon { + position: absolute; + top: 80rpx; + right: 60rpx; + width: 60rpx; + height: 60rpx; + z-index: 10; + } + + .button-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 20rpx; + width: 100%; + padding: 0 40rpx; + box-sizing: border-box; + } + + .grid-item { + position: relative; + width: 100%; + padding-top: 127.8125%; + /* Creates a 320:409 aspect ratio */ + } + + .item-bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + + .item-content { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: flex-start; + padding: 60rpx 40rpx; + box-sizing: border-box; + } + .icon { + width: 90rpx; + height: 90rpx; + margin-bottom: 60rpx; + } - + .label-1 { + font-size: 34rpx; + font-weight: bold; + color: #4f4a7b; + } + .label-2 { + font-size: 34rpx; + font-weight: bold; + color: #8f6e4d; + } } \ No newline at end of file