From 9083a8f3fad19a6175e7321b86ede2e9351c91c5 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Thu, 12 Mar 2026 18:12:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E8=85=BF=E4=BB=A3=E5=8F=96=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package1/group/groupBuyList.vue | 461 ++++++++++++------------------- package1/group/shopEvaluate.vue | 343 ++++++++++++++++++++++- package1/runErrand/runErrand.vue | 316 ++++++++++++++++++++- 3 files changed, 830 insertions(+), 290 deletions(-) diff --git a/package1/group/groupBuyList.vue b/package1/group/groupBuyList.vue index 7aff7c3..b36508d 100644 --- a/package1/group/groupBuyList.vue +++ b/package1/group/groupBuyList.vue @@ -20,39 +20,33 @@ - - - - - - - + {{item.name}} - + {{item.name}} - + 综合排序 - + 销量优先 - + 评分优先 @@ -61,307 +55,64 @@ 区域选择 - 最热 - 最新 - 最新 - 最新 + {{item.title}} - + - + - + - + - 牛仔农庄(医专店) + {{item.shopName}} - 4.3 - + {{item.shopScore}} + - 炒菜 + {{item.shopTypeTitle}} - 已拼 12 单 - - - 月售 100+ - - - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - - - - - 牛仔农庄(医专店) - - - - 4.3 - - - - - 炒菜 + + {{item.subtitle}} - - - - 已拼 12 单 - - 月售 100+ + 已拼 {{item.saleCount != null ? item.saleCount : 0}} - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - + + - + - 啤酒价格 + {{item1.productName}} - ¥90.00 + ¥{{item1.attributeListPrice | sliceMsg}} - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 - - - - - - - - - - 啤酒价格 - - - ¥90.00 - - - 拼团 ¥85.00 + 拼团 ¥{{item1.productGroupBuyPrices | slicePrice}} - + 当前2000名配送员在线 @@ -379,6 +130,27 @@ autoplay: true, interval: 4000, duration: 1000, + searchScore: false, + searchSale: false, + pageNum:1, + shopArea:[], + totalPages:1, + searchForm:{ + regionId:JSON.parse(uni.getStorageSync('area')).id, + shopType:'', + shopArea:'', + pageNum: 1, + pageSize: '10', + sort: "createTime", + order: "desc", + sortOrder:'shoprank', + orderOrder:'desc', + sortScore:'', + orderScore:'', + sortSale:'', + orderSale:'' + }, + shopList:[], menuBtn:[{ name:'美食', url:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d6b53eb217644e74bbf957ff7462c27b.png', @@ -405,7 +177,7 @@ url:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/8d2f7ffb67a4477ebe663f562b3bd018.png', index:6 },{ - name:'家常菜', + name:'烤肉拌饭', url:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/5e4fa14df92942eeb62254c8eb82f122.png', index:7 },{ @@ -426,18 +198,149 @@ }, components: { + }, + filters: { + sliceMsg(val) { + var name = '' + if (typeof(val) == 'string') { + let newObj = JSON.parse(val) + for (let as in newObj) { + name = newObj[as].specPrice + } + } + return name; + }, + slicePrice(val){ + let begin = '' + if(val != null){ + begin = val[0].groupPrice + for(let i = 0;i < val.length;i++){ + if(val[i].groupPrice < begin){ + begin = val[i].groupPrice + } + } + } + return begin; + } }, onLoad() { - + this.getEatType(); + this.getShopArea(); }, onShow() { this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() + uni.showLoading({ + title: '加载中...', + mask: true + }) + this.getShopList(); }, methods: { - goDetail(type){ - if(type == 'shopDetail'){ + searchShop(type,value){ + if(type == 'area'){ + this.searchForm.shopArea = value + }else if(type == 'score'){ + this.searchScore = !this.searchScore + this.searchSale = false + }else if(type == 'sale'){ + this.searchSale = !this.searchSale + this.searchScore = false + }else if(type == 'all'){ + this.searchForm.sortOrder = 'shoprank' + this.searchForm.orderOrder = 'desc' + this.searchForm.shopArea = '' + this.searchScore = false + this.searchSale = false + }else if(type == 'typeUp'){ + //TODO跳转新页面 + } + this.getShopList(); + }, + getEatType(){ + let that = this + that.tui.request("/dictData/getByCondition", "GET", { + sort:'sortOrder', + order:'asc', + dictId:'1712359407444168704' + }, false, true).then((res) => { + if (res.code == 200) { + for(let i = 0;i {}) + }, + getShopArea(){ + let that = this + that.tui.request("/app/shopArea/getByParentId/"+JSON.parse(uni.getStorageSync('area')).id, "GET", {}, false, true).then((res) => { + if (res.code == 200) { + if(res.result != null){ + for(let m = 0;m {}) + }, + getShopList(){ + if(this.searchSale){ + this.searchForm.sortSale = 'saleCount' + this.searchForm.orderSale = 'desc' + this.searchForm.sortOrder = '' + }else{ + this.searchForm.sortSale = '' + } + if(this.searchScore){ + this.searchForm.sortScore = 'shopScore' + this.searchForm.orderScore = 'desc' + this.searchForm.sortOrder = '' + }else{ + this.searchForm.sortScore = '' + } + let that = this + that.tui.request("/app/shop/getByCondition", "GET", this.searchForm, false, true).then((res) => { + if (res.code == 200) { + if (that.pageNum == 1) { + that.shopList = res.result.content + } else { + that.shopList = [...that.shopList, ...res.result.content] + } + that.totalPages = res.result.totalPages + this.isArea = false + that.$forceUpdate() + } else { + that.tui.toast(res.message) + return + } + uni.hideLoading() + }).catch((res) => {}) + }, + goDetail(type,item){ + if(type == 'shop'){ + uni.navigateTo({ + url:'/package1/group/groupBuySingle?type=shop&item=' + JSON.stringify(item) + }) + }else{ uni.navigateTo({ - url:'/package1/group/groupBuySingle' + url:'/package1/group/groupBuySingle?type=product&item=' + JSON.stringify(item) }) } }, @@ -670,6 +573,7 @@ } .shop-menu-price{ margin-top: 6rpx; + font-weight: 700; } .shop-menu-purchase{ display: flex; @@ -678,6 +582,7 @@ line-height: 36rpx; padding: 0 0 0 4rpx; border-radius: 8rpx; + font-weight: 700; margin-top: 10rpx; color: #777; } diff --git a/package1/group/shopEvaluate.vue b/package1/group/shopEvaluate.vue index f9b5f25..5c27a01 100644 --- a/package1/group/shopEvaluate.vue +++ b/package1/group/shopEvaluate.vue @@ -10,6 +10,97 @@ + + + + + 4.3 + + + + + + + + + 4.8 + + + 包装 + + + + + 4.8 + + + 品质 + + + + + + + + + {{item.name}}({{item.num}}) + + + + + + + + + + + + + 匿名用户 + + + 2026-03-12 + + + + + 商品 + 包装 4.8 品质 4.8 + + + + 配送超级好的环境,很开心,玩的很不错,以后还回来喜欢喜欢喜欢!配送超级好的环境,很开心,玩的很不错,以后还回来喜欢喜欢喜欢! + + + + + + + + + + + 商家回复 {{ replyText }} + + + 展开 + 收起 + + + + + + + + + + + + @@ -17,21 +108,48 @@ export default { data() { return { + isExpanded: false, + replyText: '感谢您的评价,希望可以带给您更好的体验。我们会继续努力,优化服务,欢迎再次光临!如果您有任何建议,也欢迎随时告诉我们。感谢您的支持与喜爱!', menuButtonInfo: {}, - isPintuan:true, - bigImg:'' + isPintuan: true, + bigImg: '', + menuList: [{ + name: '全部', + num: 31, + checked: true + }, { + name: '有图/视频', + num: 21, + checked: false + }, { + name: '中差评', + num: 10, + checked: false + }] } }, components: { - + }, onLoad() { - + }, onShow() { this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() }, methods: { + toggleReply() { + this.isExpanded = !this.isExpanded; + }, + checkTab(index) { + for (let i = 0; i < this.menuList.length; i++) { + if (i == index) { + this.menuList[i].checked = true + } else { + this.menuList[i].checked = false + } + } + }, //查看大图 largeImg(img) { this.bigImg = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/00b1f011787c4549bbea650d95a4eb39.png' @@ -41,7 +159,6 @@ uni.navigateBack() } } - } @@ -53,35 +170,239 @@ background: #F5F8F5; color: #00231C; } - + .page1 { width: 100%; height: 100%; font-size: 24rpx; position: relative; } - - .title{ + + .title { background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat; width: 100%; height: 54%; } - .title-sreach{ + + .title-sreach { width: 100%; display: flex; height: 200rpx; position: relative; } - .back-btn{ + + .back-btn { position: absolute; bottom: 0; left: 0; } - .title-name{ + + .title-name { padding-top: 55px; font-size: 36rpx; font-weight: 700; flex: 1; text-align: center; } + + .content { + position: absolute; + top: 100px; + width: 95%; + margin-left: 2.5%; + } + + .shop-rate { + display: flex; + padding-bottom: 15px; + } + + .rate-left { + display: flex; + flex: 1; + } + + .rate-num { + font-size: 43px; + font-weight: 700; + background: linear-gradient(90deg, rgba(255, 77, 0, 1), rgba(255, 184, 84, 1)); + background-clip: text; + color: transparent; + } + + .rate-right { + display: flex; + width: 80px; + height: 50px; + line-height: 20px; + font-size: 18px; + text-align: center; + font-weight: 700; + border-left: 1px solid #eee; + } + + .rate-star { + height: 50px; + padding: 16px 10px; + } + + .right1 { + margin: 10px 0 0 5%; + width: 45%; + } + + .menu-list { + height: 50px; + width: 100%; + display: flex; + overflow-y: hidden; + padding-top: 15px; + border-top: 1px solid #eee; + } + + .checked-img { + width: 100%; + height: 10px; + position: absolute; + bottom: 0; + left: 0; + } + + .menu1 { + width: 90px; + height: 35px; + position: relative; + margin-right: 10px; + line-height: 35px; + flex: 1; + } + + .evaluate-list { + margin-top: 20px; + } + + .eval-title { + width: 100%; + height: 40px; + display: flex; + } + + .eval-icon { + height: 40px; + width: 40px; + + img { + width: 100%; + height: 100%; + background-size: 100%; + } + } + + .eval-name { + margin-left: 10px; + } + + .name1 { + font-size: 14px; + line-height: 25px; + font-weight: 700; + } + + .eval-rate { + display: flex; + margin: 10px 0 0 50px; + height: 24px; + line-height: 20px; + } + + .eval-content { + margin-left: 50px; + font-size: 14px; + color: #777; + line-height: 24px; + } + + .eval-img { + display: flex; + width: 100%; + overflow-x: scroll; + margin-top: 10px; + + img { + width: 50px; + height: 50px; + background-size: 100%; + margin-right: 10px; + } + } + + /* 卡片整体样式(可根据需要调整外间距) */ + .reply-card { + border-radius: 12rpx; + background-color: #eee; + width: 100%; + box-sizing: border-box; + margin-top:10px; + } + + /* 标题行:左标签 + 右按钮 */ + .reply-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16rpx; + } + + .reply-label { + font-size: 28rpx; + font-weight: 500; + color: #333; + } + + .reply-expand-btn { + font-size: 12px; + padding: 4rpx 12rpx; + } + + /* 回复内容基础样式 */ + .reply-content { + font-size: 13px; + color: #555; + padding: 12rpx; + transition: all 0.2s; + height: 35px; + flex: 1; + } + + /* 折叠状态:单行省略 */ + .reply-content.collapsed { + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + } + + /* 展开状态:固定高度100px,可滚动 */ + .reply-content.expanded { + display: block; + height: 100px; + /* 固定高度100px */ + overflow-y: auto; + /* 内容超长时滚动 */ + /* 重置折叠相关属性 */ + -webkit-line-clamp: unset; + -webkit-box-orient: unset; + text-overflow: clip; + } + + /* 滚动条美化(可选) */ + .reply-content.expanded::-webkit-scrollbar { + width: 6px; + } + + .reply-content.expanded::-webkit-scrollbar-thumb { + background-color: #ccc; + border-radius: 10px; + } \ No newline at end of file diff --git a/package1/runErrand/runErrand.vue b/package1/runErrand/runErrand.vue index ce9ffef..0c30c02 100644 --- a/package1/runErrand/runErrand.vue +++ b/package1/runErrand/runErrand.vue @@ -1,9 +1,323 @@ - \ No newline at end of file