diff --git a/packages/chat/chatWindow.vue b/packages/chat/chatWindow.vue new file mode 100644 index 0000000..9cb0b26 --- /dev/null +++ b/packages/chat/chatWindow.vue @@ -0,0 +1,158 @@ + + + + + \ No newline at end of file diff --git a/packages/chat/index.vue b/packages/chat/index.vue new file mode 100644 index 0000000..30962b9 --- /dev/null +++ b/packages/chat/index.vue @@ -0,0 +1,123 @@ + + + + + \ No newline at end of file diff --git a/packages/library/index.vue b/packages/library/index.vue new file mode 100644 index 0000000..855e484 --- /dev/null +++ b/packages/library/index.vue @@ -0,0 +1,210 @@ + + + + + \ No newline at end of file diff --git a/packages/supply/detail.vue b/packages/supply/detail.vue new file mode 100644 index 0000000..56c75a7 --- /dev/null +++ b/packages/supply/detail.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file diff --git a/packages/supply/index.vue b/packages/supply/index.vue new file mode 100644 index 0000000..a1d54c3 --- /dev/null +++ b/packages/supply/index.vue @@ -0,0 +1,261 @@ + + + + + \ No newline at end of file diff --git a/packages/supply/publish.vue b/packages/supply/publish.vue new file mode 100644 index 0000000..4555753 --- /dev/null +++ b/packages/supply/publish.vue @@ -0,0 +1,267 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index d440f12..aa64e2e 100644 --- a/pages.json +++ b/pages.json @@ -20,7 +20,7 @@ } }, { "path": "pages/me/index", - "style": { + "style": { "navigationBarTitleText": "我的" } }], @@ -28,105 +28,135 @@ "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": "更换头像" } + },{ + "path": "library/index", + "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": "校友私信" + } }] }], "preloadRule": { 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