From 4c26c806f3e4c661a478a42b6ac1265b8de2cf14 Mon Sep 17 00:00:00 2001 From: monkeyhouyi Date: Fri, 11 Oct 2024 18:01:06 +0800 Subject: [PATCH] 活动参与,活动申请 --- pages.json | 3 ++- pages/activityAdd/activityAdd.scss | 6 +++++- pages/activityAdd/activityAdd.vue | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------- pages/participation/participation.scss | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------ pages/participation/participation.vue | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------- 5 files changed, 214 insertions(+), 178 deletions(-) diff --git a/pages.json b/pages.json index f499329..c41ba9f 100644 --- a/pages.json +++ b/pages.json @@ -111,7 +111,8 @@ "path": "pages/participation/participation", "style": { "navigationBarTitleText": "活动参与", - "navigationBarBackgroundColor": "#fff" + "navigationBarBackgroundColor": "#fff", + "enablePullDownRefresh": true } }, { diff --git a/pages/activityAdd/activityAdd.scss b/pages/activityAdd/activityAdd.scss index a9722a7..239be65 100644 --- a/pages/activityAdd/activityAdd.scss +++ b/pages/activityAdd/activityAdd.scss @@ -65,10 +65,14 @@ bottom: 0; display: flex; width: 100%; - height: 100rpx; + height: 120rpx; background-color: #FFFFFF; + padding: 20rpx 20rpx; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); + .u-btn { + flex: 1; + } .footer-buy{ display: flex; align-items: center; diff --git a/pages/activityAdd/activityAdd.vue b/pages/activityAdd/activityAdd.vue index c19be51..fe5a1a6 100644 --- a/pages/activityAdd/activityAdd.vue +++ b/pages/activityAdd/activityAdd.vue @@ -1,103 +1,45 @@ @@ -106,10 +48,52 @@ export default { data() { return { - + form: { + fileList: [], + name: '', + type: '', + num: 0, + startTime: '', + endTime: '', + }, + active: '', // 文件上传地址 + startShow: false, + endShow: false, + params: { + year: true, + month: true, + day: true, + hour: true, + minute: true, + second: true + }, + typeShow: false, + typeList: [{ value: '1', label: '类型1' }, { value: '2', label: '类型2' }], }; }, methods:{ + startTimeChange(val) { + this.form.startTime = this.timeChange(val); + this.form.endTime = ''; + }, + endTimeChange(val) { + const time = this.timeChange(val); + if(new Date(time).getTime() > new Date(this.form.startTime).getTime()) { + this.form.endTime = time + } else { + this.$refs.uToast.show({ + title: '结束时间不能小于开始时间', + type: 'error', + }) + } + }, + timeChange(val) { + const { year, month, day, hour, minute, second } = val; + return `${year}-${month}-${day} ${hour}:${minute}:${second}`; + }, + typeChange(val) { + this.form.type = val[0].name; + } } } diff --git a/pages/participation/participation.scss b/pages/participation/participation.scss index 19ee78a..add3268 100644 --- a/pages/participation/participation.scss +++ b/pages/participation/participation.scss @@ -4,39 +4,38 @@ top: 0; width: 100%; height: 100%; - padding: 0 40rpx; + padding: 0 24rpx; +} +.more { + width: 100%; + height: 74rpx; background-color: #fff; + border-radius: 21rpx; + padding: 24rpx 32rpx 18rpx; + margin-top: 26rpx; } .head-search{ - display: flex; - align-items: center; - justify-content: space-between; + display: flex; + align-items: center; + justify-content: space-between; + position: relative; + margin: 20rpx 0; + background-color: #FFFFFF; + border-radius: 35rpx; + padding: 0 10rpx; + border: 2rpx solid #E8E8E8; + .u-search { position: relative; - margin: 20rpx 0; - .search{ - - display: flex; - align-items: center; - width: 100%; - height: 72rpx; - - border: 2rpx solid #E8E8E8; - justify-content: space-between; - padding: 0 10rpx 0 30rpx; - .icon{ - display: flex; - align-items: center; - - margin-left: 20rpx; - margin-right: 15rpx; - image{ - width: 29rpx; - height: 29rpx; - } - } - - } } + .u-btn { + border: unset; + border: 0px transparent; + height: 46rpx; + width: 88rpx; + font-size: 24rpx; + border-radius: 35rpx; + } +} /* 订单列表 */ .screen-list { display: flex; @@ -66,9 +65,27 @@ .goods-data{ width: 100%; + // height: calc(100% - 300rpx - 120rpx); + // overflow-y: scroll; .goods-list{ width: 100%; - + // height: 100%; + .good-item { + .info { + margin: 20rpx 10rpx 26rpx; + .title { + line-height: 36rpx; + color: #000; + margin-bottom: 10rpx; + } + .name { + font-size: 24rpx; + line-height: 30rpx; + color: #3D3D3D; + margin-bottom: 12rpx; + } + } + } .list{ display: flex; margin-bottom: 40rpx; @@ -121,11 +138,15 @@ } /* 保存按钮 */ .page-footer{ + position: fixed; + left: 0; + bottom: 0; width: 100%; + height: 120rpx; background-color: #FFFFFF; + padding: 20rpx 20rpx; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); - margin:40rpx 0 80rpx 0; .footer-buy{ display: flex; align-items: center; diff --git a/pages/participation/participation.vue b/pages/participation/participation.vue index ef149cb..3ebb559 100644 --- a/pages/participation/participation.vue +++ b/pages/participation/participation.vue @@ -1,28 +1,28 @@ @@ -78,9 +62,46 @@ export default { data() { return { + keyword: '', // 搜索项 + status: 'loadmore', + list: 1, + page: 0, + total: 1, }; }, + onLoad() { + this.status = 'nomore'; + }, + onPullDownRefresh(e) { + let that = this + that.status = 'loading'; + this.page = 0; + setTimeout(() => { + that.list = 1; + that.status = that.list >= that.total ? 'nomore' : 'loadmore'; + uni.stopPullDownRefresh(); + }, 1000); + }, + onReachBottom(e) { + this.loading(); + }, methods: { + toMyAdd() { + // 跳转我的活动申请 + }, + search() { + // 搜索 + }, + loading() { + let that = this + if(that.status == 'nomore') return; + that.status = 'loading'; + that.page = ++that.page; + setTimeout(() => { + that.list += 10; + that.status = that.list >= that.total ? 'nomore' : 'loadmore'; + }, 300) + }, myativity() { uni.navigateTo({ url: '/pages/mycreated/mycreated' @@ -90,6 +111,11 @@ uni.navigateTo({ url: '/pages/mycreated/mycreated?id=1' }) + }, + toAdd() { + uni.navigateTo({ + url: '/pages/activityAdd/activityAdd' + }) } } } -- libgit2 0.21.4