From f3eade4802fe45da78e6ad57c42f2c3d55b31ac7 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Mon, 10 Aug 2026 16:48:40 +0800 Subject: [PATCH] 1 --- components/tab-bar/myCenter.vue | 27 ++++- components/tab-bar/postList.vue | 192 ++++++++++++++++++++++++++------ components/tab-bar/release.vue | 30 ++--- 3 files changed, 201 insertions(+), 48 deletions(-) diff --git a/components/tab-bar/myCenter.vue b/components/tab-bar/myCenter.vue index 87d4341..7e4ce0e 100644 --- a/components/tab-bar/myCenter.vue +++ b/components/tab-bar/myCenter.vue @@ -776,6 +776,30 @@ uni.hideLoading() }) }, + checkMerchantRegister() { + return this.tui.request("/app/shop/getShopInfoByUserid", "GET", { + userId: uni.getStorageSync('id') + }, false, true).then((res) => { + if (res.code == 200) { + const shops = this.normalizeShopList(res.result) + uni.setStorageSync('schoolShop', shops) + const pendingShop = shops.find((item) => item && item.status == 0) + if (pendingShop) { + this.tui.toast((pendingShop.shopName || '店铺') + ' 正在审核中,暂时不能提交新店铺注册', 2000) + uni.hideLoading() + return + } + uni.navigateTo({ + url: '/package3/shop/merchantRegister' + }) + } else { + this.tui.toast(res.message) + } + uni.hideLoading() + }).catch(() => { + uni.hideLoading() + }) + }, showComingSoon(title) { this.tui.toast(title + '即将开放') }, @@ -907,7 +931,8 @@ } else if (e == 'goodsList') { url = '/package2/myCenter/goodsList' } else if (e == 'merchant') { - url = '/package3/shop/merchantRegister' + this.checkMerchantRegister() + return } else if (e == 'tuichu') { uni.showModal({ title: '确认退出', diff --git a/components/tab-bar/postList.vue b/components/tab-bar/postList.vue index c3b5fc1..0562f99 100644 --- a/components/tab-bar/postList.vue +++ b/components/tab-bar/postList.vue @@ -67,23 +67,25 @@ - - - - - {{item}} + + + + + + {{item}} + + + + 筛选 + - - - - 筛选 @@ -138,6 +140,30 @@ + + + + + 我的分类 + 点击进入分类 + + + + + + + + {{item}} + + + + { - const map = ['hot', 'latest', 'priceAsc', 'priceDesc'] - this.sortType = map[res.tapIndex] || 'hot' - this.reloadGoods() - } - }) - }, openBlindBox() { uni.showToast({ title: '幸运盲盒即将开放', @@ -528,7 +553,7 @@ const category = this.categories[this.categoryIndex] const categoryItem = this.categoryList.find(item => item.name == category) const area = this.getArea() - const sortType = category == '热门' ? 'favorite' : (category == '最新' ? 'latest' : (this.sortType || (category == '附近' ? 'school' : 'hot'))) + const sortType = category == '热门' ? 'favorite' : (category == '推荐' ? 'latest' : (this.sortType || (category == '附近' ? 'school' : 'hot'))) const query = { pageNum: this.pageNum, pageSize: this.pageSize, @@ -1014,8 +1039,13 @@ font-weight: 800; } - .category-row { + .category-section { + position: relative; margin-top: -15rpx; + background: rgba(247, 249, 247, 0.96); + } + + .category-row { height: 80rpx; display: flex; align-items: center; @@ -1064,17 +1094,115 @@ } .filter-button { - width: 94rpx; + min-width: 94rpx; height: 80rpx; display: flex; align-items: center; justify-content: flex-end; - gap: 5rpx; + gap: 4rpx; + padding-left: 10rpx; background: linear-gradient(90deg, rgba(247, 249, 247, 0.7), #f7f9f7 20%); color: #747d79; font-size: 22rpx; } + .filter-button--open { + color: #1f9f78; + } + + .category-popup-mask { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 10000; + display: flex; + align-items: center; + justify-content: center; + padding: 0 48rpx; + box-sizing: border-box; + background: rgba(12, 22, 19, 0.48); + } + + .category-popup { + width: 100%; + max-height: 68vh; + display: flex; + flex-direction: column; + border-radius: 28rpx; + background: #fff; + box-shadow: 0 24rpx 60rpx rgba(16, 40, 32, 0.22); + overflow: hidden; + } + + .category-popup-head { + flex-shrink: 0; + height: 92rpx; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 28rpx; + border-bottom: 1rpx solid #eef2f0; + } + + .category-popup-title-wrap { + display: flex; + align-items: baseline; + gap: 14rpx; + min-width: 0; + } + + .category-popup-title { + color: #17241f; + font-size: 32rpx; + font-weight: 900; + } + + .category-popup-tip { + color: #97a19d; + font-size: 22rpx; + } + + .category-popup-close { + width: 56rpx; + height: 56rpx; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: #f3f6f4; + flex-shrink: 0; + } + + .category-popup-body { + max-height: calc(68vh - 92rpx); + padding: 24rpx 24rpx 32rpx; + box-sizing: border-box; + } + + .category-popup-grid { + display: flex; + flex-wrap: wrap; + gap: 16rpx; + } + + .category-popup-item { + padding: 18rpx 28rpx; + border-radius: 16rpx; + background: #f4f7f5; + color: #2a3531; + font-size: 24rpx; + font-weight: 700; + line-height: 1.2; + } + + .category-popup-item--active { + background: #1f9f78; + color: #fff; + box-shadow: 0 8rpx 18rpx rgba(31, 159, 120, 0.22); + } + .goods-grid { display: flex; align-items: flex-start; diff --git a/components/tab-bar/release.vue b/components/tab-bar/release.vue index f7f0796..4fb08ea 100644 --- a/components/tab-bar/release.vue +++ b/components/tab-bar/release.vue @@ -51,17 +51,17 @@ 全部 最新 + :class="{ active: postSortType === 'hot' }" + @tap="selectHot" + >热门 {{sectionTitle}} {{sectionSubTitle}} - {{postSortType === 'latest' ? '最新优先' : (activeCategory === 'wall' ? '实时更新' : '热度优先')}} + {{postSortType === 'hot' ? '热度优先' : '最新优先'}} @@ -257,7 +257,7 @@ activeCategoryId: '', keyword: '', selectedTag: '', - postSortType: 'hot', + postSortType: 'latest', posts: [], pageNum: 1, pageSize: 10, @@ -308,9 +308,9 @@ return item ? item.name : '校园圈' }, sectionSubTitle() { - if (this.postSortType === 'latest') return '按发布时间倒序排列' - if (this.activeCategory === 'wall') return '按点赞和评论综合热度排序' + if (this.postSortType === 'hot') return '按点赞和评论综合热度排序' if (this.activeCategory === 'mine') return '我的发布、评论和聊天动态' + if (this.postSortType === 'latest') return '按发布时间倒序排列' return '支持关键词和热门标签模糊匹配' } }, @@ -524,19 +524,19 @@ this.activeCategory = tone this.activeCategoryId = '' this.selectedTag = '' - this.postSortType = 'hot' + this.postSortType = 'latest' this.reload() }, selectSecondCategory(id) { - if (this.activeCategoryId === id && this.postSortType !== 'latest') return + if (this.activeCategoryId === id && this.postSortType !== 'hot') return this.activeCategoryId = id - this.postSortType = 'hot' + this.postSortType = 'latest' this.reload() }, - selectLatest() { - if (this.postSortType === 'latest') return + selectHot() { + if (this.postSortType === 'hot') return this.activeCategoryId = '' - this.postSortType = 'latest' + this.postSortType = 'hot' this.reload() }, search() {