From 4ed63675a473799723b1993a3d67112a7bd3d7f5 Mon Sep 17 00:00:00 2001
From: kk <875203880@qq.com>
Date: Wed, 29 Apr 2026 18:14:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B8=B8=E8=A7=81=E9=97=AE=E9=A2=98/=E8=81=94?=
=?UTF-8?q?=E7=B3=BB=E5=AE=A2=E6=9C=8D/=E5=85=AC=E4=BC=97=E5=8F=B7?=
=?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 7 ++
pages/faq/faq.vue | 172 ++++++++++++++++++++++++++++++++++++++++++
pages/index/index.vue | 96 ++++++++++++++++++++---
pages/mine/mine.vue | 2 +-
4 files changed, 265 insertions(+), 12 deletions(-)
create mode 100644 pages/faq/faq.vue
diff --git a/pages.json b/pages.json
index ab5672b..33aefb1 100644
--- a/pages.json
+++ b/pages.json
@@ -11,6 +11,13 @@
"style": {
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "pages/faq/faq",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "常见问题"
+ }
}
],
"globalStyle": {
diff --git a/pages/faq/faq.vue b/pages/faq/faq.vue
new file mode 100644
index 0000000..4609b96
--- /dev/null
+++ b/pages/faq/faq.vue
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+ {{ item.question }}
+ ›
+
+
+
+
+ {{ item.answer }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 3966112..3194c90 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -55,7 +55,7 @@
-
+
@@ -84,8 +94,7 @@ export default {
data() {
return {
currentTab: 'home',
- contentHeight: 0,
- areaHeight: 0,
+ showQrcodePopup: false,
productList: [
{ name: '君乐宝450ml悦鲜活', price: '0.01', image: '/static/c1.png' },
{ name: '白红(0.0.0.0-9.9.9)', price: '0.06', image: '/static/c2.png' },
@@ -100,11 +109,15 @@ export default {
{ name: '乐事薯片原味75g', price: '7.50', image: '/static/c6.png' }
],
userInfo: { nickname: '张三', phone: '13812345678' },
+ // 菜单:我的订单、常见问题、联系客服、公众号信息
menuList: [
- { title: '我的订单', page: '/pages/order/order' },
- { title: '收货地址', page: '/pages/address/address' },
- { title: '常见问题', page: '/pages/faq/faq' }
- ]
+ { title: '我的订单', action: 'order' },
+ { title: '常见问题', action: 'faq' },
+ { title: '联系客服', action: 'call' },
+ { title: '公众号信息', action: 'qrcode' }
+ ],
+ // 客服电话
+ servicePhone: '13264706088'
};
},
computed: {
@@ -113,15 +126,30 @@ export default {
return p ? p.substring(0,3) + '****' + p.substring(7) : '';
}
},
- mounted() {},
methods: {
switchTab(tab) { this.currentTab = tab; },
handleOpenDoor() {
uni.showModal({ title: '开门', content: '确认打开柜门?', success: r => r.confirm && uni.showToast({title:'柜门已打开', icon:'success'}) });
},
handleMenuClick(item) {
- if (item.page) {
- uni.showToast({title:'功能开发中', icon:'none'});
+ switch (item.action) {
+ case 'order':
+ uni.showToast({ title: '订单功能开发中', icon: 'none' });
+ break;
+ case 'faq':
+ uni.navigateTo({ url: '/pages/faq/faq' });
+ break;
+ case 'call':
+ // 拨打电话
+ uni.makePhoneCall({
+ phoneNumber: this.servicePhone,
+ fail: () => {}
+ });
+ break;
+ case 'qrcode':
+ // 显示公众号二维码弹窗
+ this.showQrcodePopup = true;
+ break;
}
},
handleNavPrev() {
@@ -149,7 +177,7 @@ page { height: 100%; background-color: #fff; }
.product-name { font-size: 24rpx; color: #333; padding: 10rpx 8rpx 6rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 30rpx; font-weight: bold; color: #e4393c; padding: 0 8rpx 16rpx; }
-/* 底部占位:给tab-bar和开门按钮留出空间 */
+/* 底部占位 */
.bottom-spacer { height: 160rpx; }
/* 底部导航栏 */
@@ -175,4 +203,50 @@ page { height: 100%; background-color: #fff; }
.menu-item:last-child { border-bottom: none; }
.menu-text { font-size: 30rpx; color: #333; }
.menu-arrow { font-size: 28rpx; color: #ccc; }
+
+/* ====== 公众号二维码弹窗 ====== */
+.qrcode-popup-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.55);
+ z-index: 2000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.qrcode-popup-content {
+ width: 560rpx;
+ background: #fff;
+ border-radius: 20rpx;
+ padding: 48rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+.qrcode-popup-title {
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 32rpx;
+}
+.qrcode-img {
+ width: 400rpx;
+ height: 400rpx;
+ margin-bottom: 24rpx;
+}
+.qrcode-popup-tip {
+ font-size: 26rpx;
+ color: #999;
+ margin-bottom: 32rpx;
+}
+.qrcode-popup-close {
+ font-size: 28rpx;
+ color: #2979ff;
+ padding: 16rpx 60rpx;
+ border: 2rpx solid #2979ff;
+ border-radius: 40rpx;
+}
\ No newline at end of file
diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue
index b60a1a2..82747ce 100644
--- a/pages/mine/mine.vue
+++ b/pages/mine/mine.vue
@@ -78,7 +78,7 @@ export default {
} else if (item.action === 'contact') {
uni.showModal({
title: '联系客服',
- content: '客服电话:400-123-4567',
+ content: '客服电话:13264706088',
showCancel: false
});
}