From 37bbd05789b091462e2bb96b42d8a75c916a2042 Mon Sep 17 00:00:00 2001
From: Lj <1095098147@qq.com>
Date: Mon, 30 Jun 2025 15:38:00 +0800
Subject: [PATCH] =?UTF-8?q?=E2=80=98=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config.js | 2 +-
pages/component/home.vue | 115 +++++++++++++++---
pages/component/recycle.vue | 90 +++++++++++---
pages/index/index.vue | 2 +-
pages/subcomponent/promo-qrcode.vue | 170 +++++++++++++--------------
wxcomponents/privacy-popup/privacy-popup.vue | 6 +-
6 files changed, 260 insertions(+), 125 deletions(-)
diff --git a/config.js b/config.js
index a1172f2..b78c2f0 100644
--- a/config.js
+++ b/config.js
@@ -1,5 +1,5 @@
// config.js
-const type = 'local'
+const type = 'prod'
const config = {
local: {
diff --git a/pages/component/home.vue b/pages/component/home.vue
index 2d8e935..0266c69 100644
--- a/pages/component/home.vue
+++ b/pages/component/home.vue
@@ -3,11 +3,33 @@
+ style="width: 100%; height: 400rpx;">
-
+
+
+
+
+
+
+
+
@@ -171,6 +193,7 @@
processes: [],
priceList: [],
records: [],
+ videoPlayingStates: {}, // 记录每个视频的播放状态
destinations: [
// {
// icon: '/static/home/爱心援乡.png',
@@ -345,6 +368,30 @@
this.addressCion = address ? address.keyContent : '';
this.sbkCion = sbk ? sbk.keyContent : '';
},
+
+ // 视频相关方法
+ playVideo(item, index) {
+ const videoContext = uni.createVideoContext(`video-${index}`, this);
+ if (this.videoPlayingStates[index]) {
+ // 如果正在播放,暂停视频
+ videoContext.pause();
+ } else {
+ // 如果未播放,开始播放
+ videoContext.play();
+ }
+ },
+
+ onVideoPlay(index) {
+ this.$set(this.videoPlayingStates, index, true);
+ },
+
+ onVideoPause(index) {
+ this.$set(this.videoPlayingStates, index, false);
+ },
+
+ onFullscreenChange(e) {
+ console.log('全屏状态改变:', e.detail);
+ },
// 初始化页面数据的方法
initializePageData() {
const query = this.queryParams || {}
@@ -425,7 +472,7 @@
.banner {
width: 100%;
- height: 330rpx;
+ height: 400rpx;
position: relative;
overflow: hidden;
border-radius: 0 0 30rpx 30rpx;
@@ -434,12 +481,43 @@
width: 100%;
height: 100%;
}
+
+ .video-container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+
+ .video-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.3);
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ z-index: 10;
+
+ .play-button {
+ width: 120rpx;
+ height: 120rpx;
+ background: rgba(0, 0, 0, 0.6);
+ border-radius: 50%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ backdrop-filter: blur(10rpx);
+ }
+ }
+ }
}
.content {
// flex: 1;
width: 90%;
- margin: -70rpx auto 0;
+ margin: -80rpx auto 0;
position: relative;
z-index: 3;
padding-bottom: 20rpx;
@@ -672,39 +750,42 @@
background-color: #fff8ea;
.item-icon {
- width: 100rpx;
- height: 100rpx;
- margin-bottom: 10rpx;
+ width: 120rpx;
+ height: 120rpx;
+ margin-bottom: 12rpx;
&.placeholder {
- width: 80rpx;
- height: 80rpx;
- margin-bottom: 10rpx;
+ width: 120rpx;
+ height: 120rpx;
+ margin-bottom: 12rpx;
background: #f5f5f5;
border-radius: 16rpx;
}
}
.item-name {
- font-size: 26rpx;
+ font-size: 30rpx;
color: #333;
- margin-bottom: 6rpx;
+ margin-bottom: 8rpx;
+ font-weight: 500;
}
.item-price {
font-family: PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
+ font-weight: 600;
+ font-size: 28rpx;
line-height: 140%;
letter-spacing: 0%;
text-align: center;
+ color: #181818;
.item-price-right {
text-align: center;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #666;
line-height: 140%;
letter-spacing: 0%;
+ font-weight: 400;
}
}
}
diff --git a/pages/component/recycle.vue b/pages/component/recycle.vue
index 314c797..f7d952e 100644
--- a/pages/component/recycle.vue
+++ b/pages/component/recycle.vue
@@ -250,16 +250,15 @@
-