From 738b12d41a1aa51d287a0ad16f3784fa37dc58d3 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 20:13:00 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat(=E4=BB=B7=E6=A0=BC=E6=98=BE=E7=A4=BA):?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E4=BB=B7=E6=A0=BC=E5=8C=BA=E9=97=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD=E5=B9=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在回收组件中添加maxPrice字段用于价格区间计算 - 修改价格显示逻辑,支持显示价格范围 - 更新取消按钮的背景颜色样式 - 重构总价计算逻辑,基于实际价格区间计算 --- pages/component/recycle.vue | 1 + pages/index/index.vue | 1 + pages/subcomponent/pickup.vue | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pages/component/recycle.vue b/pages/component/recycle.vue index 0a261b5..314c797 100644 --- a/pages/component/recycle.vue +++ b/pages/component/recycle.vue @@ -734,6 +734,7 @@ export default { icon: item.image, quantity: item.quantity, unitPrice: item.price, + maxPrice : item.maxPrice, desc: item.brandName ? `品牌:${item.brandName}` : '允许脏破烂,160码以上' } diff --git a/pages/index/index.vue b/pages/index/index.vue index 1b277c9..72a2ebc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -301,6 +301,7 @@ .cancel-btn { background-color: rgba(255, 253, 249); color: #f7990c; + background-color: #f9ece5; border: 1px solid rgba(249, 178, 71); } diff --git a/pages/subcomponent/pickup.vue b/pages/subcomponent/pickup.vue index b0ce214..fe39e5e 100644 --- a/pages/subcomponent/pickup.vue +++ b/pages/subcomponent/pickup.vue @@ -66,9 +66,9 @@ - ¥{{ item.unitPrice }}/件 + ¥{{ item.price || item.unitPrice }}~{{ item.maxPrice || item.unitPrice }}/件 x{{ item.quantity }} - ¥{{ item.unitPrice * item.quantity }} + ¥{{ ((item.price || item.unitPrice) * item.quantity).toFixed(2) }}~{{ ((item.maxPrice || item.unitPrice) * item.quantity).toFixed(2) }} @@ -240,8 +240,18 @@ export default { }, totalPriceRange() { if (this.selectedItems.length === 0) return '0-0' - const total = this.selectedItems.reduce((sum, item) => sum + (item.unitPrice * item.quantity), 0) - return `${(total * 0.92).toFixed(2)}~${(total * 1.1).toFixed(2)}` + + let minTotal = 0 + let maxTotal = 0 + + this.selectedItems.forEach(item => { + const minPrice = item.price || item.unitPrice || 0 + const maxPrice = item.maxPrice || item.unitPrice || 0 + minTotal += minPrice * item.quantity + maxTotal += maxPrice * item.quantity + }) + + return `${minTotal.toFixed(2)}~${maxTotal.toFixed(2)}` }, canSubmit() { return this.agreed && this.selectedItems.length > 0 && this.selectedTime && this.displayAddress From 5dd36958cfd1ad9c9627d8362fe8b9e9f6a43e6b Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 20:23:03 +0800 Subject: [PATCH 2/6] 1 --- pages/component/home.vue | 42 ++++++++++++++++---------------- pages/subcomponent/inspection-report.vue | 8 ++++-- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/pages/component/home.vue b/pages/component/home.vue index 91830fb..a3aabe1 100644 --- a/pages/component/home.vue +++ b/pages/component/home.vue @@ -17,7 +17,6 @@ 回收流程 - @@ -172,26 +171,27 @@ processes: [], priceList: [], records: [], - destinations: [{ - icon: '/static/home/爱心援乡.png', - title: '爱心援乡', - description: '精准帮扶贫困群体' - }, - { - icon: '/static/home/回塑新源.png', - title: '回塑新源', - description: '塑料的第二次成型' - }, - { - icon: '/static/home/织物出海.png', - title: '织物出海', - description: '分拣出最高价值' - }, - { - icon: '/static/home/碳循再生.png', - title: '碳循再生', - description: '减碳从出发生系统' - } + destinations: [ + // { + // icon: '/static/home/爱心援乡.png', + // title: '爱心援乡', + // description: '精准帮扶贫困群体' + // }, + // { + // icon: '/static/home/回塑新源.png', + // title: '回塑新源', + // description: '塑料的第二次成型' + // }, + // { + // icon: '/static/home/织物出海.png', + // title: '织物出海', + // description: '分拣出最高价值' + // }, + // { + // icon: '/static/home/碳循再生.png', + // title: '碳循再生', + // description: '减碳从出发生系统' + // } ], bannerList: [], pricePreviewList: [], diff --git a/pages/subcomponent/inspection-report.vue b/pages/subcomponent/inspection-report.vue index 3b721a5..b36ed02 100644 --- a/pages/subcomponent/inspection-report.vue +++ b/pages/subcomponent/inspection-report.vue @@ -98,7 +98,8 @@ export default { problemList: [], // 质量问题 reportData: null, showQualified: false, - showProblem: false + showProblem: false, + orderId : 0, } }, computed: { @@ -122,6 +123,7 @@ export default { this.navBarTotalHeight = this.statusBarHeight + this.navBarHeight // 获取 orderId const orderId = options.orderId + this.orderId = orderId if (orderId) { this.fetchQualityReport(orderId) } @@ -129,7 +131,9 @@ export default { methods: { async fetchQualityReport(orderId) { // 调用订单详情接口 - this.$api && this.$api('getOrderDetail', { orderId }, res => { + this.$api && this.$api('getOrderDetail', { + orderId : this.orderId + }, res => { if (res && res.code === 200 && res.result) { this.reportData = res.result // 解析嵌套的订单数据 From 23381018134a186a45c2a682aa788ce1bd281ad4 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 20:52:46 +0800 Subject: [PATCH 3/6] 1 --- pages/baoyou-city/baoyou-city.vue | 382 ++++++++++++++++++++------------------ 1 file changed, 204 insertions(+), 178 deletions(-) diff --git a/pages/baoyou-city/baoyou-city.vue b/pages/baoyou-city/baoyou-city.vue index e883fff..4432c1f 100644 --- a/pages/baoyou-city/baoyou-city.vue +++ b/pages/baoyou-city/baoyou-city.vue @@ -1,185 +1,211 @@ \ No newline at end of file + .byc-container { + min-height: 100vh; + background: #f8f8f8; + padding-bottom: env(safe-area-inset-bottom); + } + + .nav-bar { + + background: #2180ee; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 999; + // padding: 0 30rpx; + } + + .back { + width: 100%; + padding: 10rpx; + color: #fff; + // margin-left: -20rpx; + left: 0; + display: flex; + align-items: center; + // justify-content: center; + } + + .byc-banner { + margin: 0; + // border-radius: 24rpx; + overflow: hidden; + box-shadow: 0 4rpx 24rpx rgba(60, 167, 250, 0.10); + background: none; + position: relative; + z-index: 1; + } + + .byc-banner-left { + flex: 1; + } + + .byc-banner-title { + color: #fff; + font-size: 44rpx; + font-weight: bold; + margin-bottom: 16rpx; + text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.12); + } + + .byc-banner-desc { + color: #e3f2fd; + font-size: 28rpx; + margin-top: 4rpx; + } + + .byc-banner-img { + width: 100%; + display: block; + } + + .byc-main-card { + background: #fff; + border-radius: 36rpx; + margin: -60rpx 0 0 0; + box-shadow: 0 8rpx 32rpx rgba(60, 167, 250, 0.08); + padding: 48rpx 32rpx 32rpx 32rpx; + position: relative; + z-index: 2; + } + + .byc-main-title { + font-size: 36rpx; + font-weight: bold; + color: #222; + margin-bottom: 24rpx; + } + + .byc-main-desc { + color: #888; + font-size: 28rpx; + line-height: 1.7; + margin-bottom: 32rpx; + } + + .byc-dashed-line { + border-bottom: 2rpx dashed #e5e5e5; + margin-bottom: 32rpx; + } + + .byc-province-list { + .byc-province-item { + margin-bottom: 36rpx; + + &:last-child { + margin-bottom: 0; + } + } + + .byc-province-name { + font-size: 32rpx; + font-weight: bold; + color: #222; + margin-bottom: 12rpx; + } + + .byc-city-list { + display: flex; + flex-wrap: wrap; + font-size: 28rpx; + color: #999; + line-height: 1.7; + } + + .byc-city { + margin-right: 18rpx; + display: flex; + align-items: center; + } + + .byc-dot { + margin-right: 8rpx; + color: #bbb; + font-size: 28rpx; + } + } + \ No newline at end of file From 2e53c5bbf0c0cf2092c34793aa8b10a396247686 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 21:09:17 +0800 Subject: [PATCH 4/6] 1 --- pages/component/my.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/component/my.vue b/pages/component/my.vue index ac19a7e..c8695c7 100644 --- a/pages/component/my.vue +++ b/pages/component/my.vue @@ -365,9 +365,7 @@ export default { return item ? item.keyContent : '' }, userTypeText() { - if (this.userInfo.isTuiType === 0) return '推广官' - if (this.userInfo.isTuiType === 1) return '推广达人' - if (this.userInfo.isTuiType === 2) return '推广大使' + if (this.userInfo.isUser == 'Y') return this.userInfo.isTuiTypeTitle return '普通用户' } }, From 5748886a3d35e7911c67296706248cfb4e962591 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 21:14:29 +0800 Subject: [PATCH 5/6] 1 --- pages/component/home.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/component/home.vue b/pages/component/home.vue index a3aabe1..2d8e935 100644 --- a/pages/component/home.vue +++ b/pages/component/home.vue @@ -323,7 +323,7 @@ }, goToInspectionReport(item) { uni.navigateTo({ - url: `/pages/subcomponent/inspection-report?id=${item.orderId}` + url: `/pages/subcomponent/inspection-report?orderId=${item.orderId}` }) }, getFreeCityList() { From 6f172bf62e6eaef23e3b3571301a06e0d118ea85 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 21:55:55 +0800 Subject: [PATCH 6/6] 1 --- App.vue | 4 +- config.js | 5 +- pages/subcomponent/promo-qrcode.vue | 420 ++++++++++++++++++++---------------- 3 files changed, 236 insertions(+), 193 deletions(-) diff --git a/App.vue b/App.vue index 90b210a..f1cec1b 100644 --- a/App.vue +++ b/App.vue @@ -166,8 +166,8 @@ uni.getImageInfo({ src: `${config.baseUrl}/recycle-admin/applet/promotion/getInviteCode?token=${uni.getStorageSync('token')}`, success: res => { - getApp().globalData.configData.qr_path = res.path - console.log(getApp().globalData.configData.qr_path, 'qr_path') + getApp().globalData.qr_path = res.path + console.log(getApp().globalData.qr_path, 'qr_path') this.updateProgress() resolve() }, diff --git a/config.js b/config.js index 081fdcd..a1172f2 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,10 @@ // config.js -const type = 'dev' +const type = 'local' const config = { + local: { + baseUrl: 'http://127.0.0.1:8002', + }, dev: { baseUrl: 'http://h5.xzaiyp.top', }, diff --git a/pages/subcomponent/promo-qrcode.vue b/pages/subcomponent/promo-qrcode.vue index 4dbff79..2041e37 100644 --- a/pages/subcomponent/promo-qrcode.vue +++ b/pages/subcomponent/promo-qrcode.vue @@ -1,197 +1,237 @@ \ No newline at end of file + .promo-modal-page { + min-height: 100vh; + background: linear-gradient(to bottom, #f6fff2 0%, #fff 100%); + display: flex; + flex-direction: column; + align-items: center; + position: relative; + + .nav-bar { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; + width: 100vw; + background: linear-gradient(to right, #b2f08d 0%, #39e9d2 100%); + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03); + + .nav-bar-inner { + display: flex; + align-items: center; + height: 44px; + width: 100vw; + position: relative; + } + + .back-icon, + .nav-bar-right { + width: 44px; + height: 44px; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: 0; + } + + .back-icon { + left: 0; + } + + .nav-bar-right { + right: 0; + } + + .nav-bar-title { + flex: 1; + text-align: center; + font-size: 36rpx; + font-weight: bold; + color: #222; + letter-spacing: 2rpx; + line-height: 44px; + } + } + + .user-info-modal { + display: flex; + flex-direction: column; + align-items: center; + + .avatar-frame { + width: 104rpx; + height: 104rpx; + border-radius: 10rpx; + overflow: hidden; + background: #f2f2f2; + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.10); + + .avatar-img { + width: 104rpx; + height: 104rpx; + object-fit: cover; + display: block; + } + } + + .nickname { + margin-top: 24rpx; + font-size: 32rpx; + font-weight: bold; + color: #222; + text-align: center; + } + } + + .qrcode-modal-section { + margin-top: 48rpx; + width: 300rpx; + display: flex; + flex-direction: column; + align-items: center; + + .qrcode-img { + width: 100%; + height: 100%; + background: #fff; + border-radius: 24rpx; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); + } + + .invite-code { + margin-top: 32rpx; + font-size: 30rpx; + color: #222; + font-weight: bold; + text-align: center; + } + } + + .bottom-btns-modal { + position: fixed; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: space-between; + padding: 24rpx 32rpx calc(env(safe-area-inset-bottom) + 24rpx) 32rpx; + background: #fff; + z-index: 100; + + .btn { + flex: 1; + height: 88rpx; + border-radius: 44rpx; + font-size: 32rpx; + font-weight: bold; + margin: 0 12rpx; + border: none; + + &.gray { + background: linear-gradient(90deg, #f7f7f7, #f2f2f2); + color: #888; + } + + &.green { + background: linear-gradient(90deg, #b2f08d, #39e9d2); + color: #fff; + } + } + } + } + \ No newline at end of file