From 4c18892e9a0bb2f94be3c6ff913a8d395e3adb4f Mon Sep 17 00:00:00 2001
From: maclien <421129572@qq.com>
Date: Sat, 28 Jun 2025 18:15:31 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2):=20?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=AB=E7=A0=81=E5=8A=9F=E8=83=BD=E5=92=8C?=
=?UTF-8?q?=E7=A7=AF=E5=88=86=E4=BD=99=E9=A2=9D=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在页面顶部添加扫码按钮及处理逻辑
- 新增积分余额显示在菜单项右侧
- 扩展菜单数据包含积分余额、核销记录和联系客服
- 修改图标样式和尺寸
- 更新路由配置添加来源参数
---
commons/css/custom/customIcon.wxss | 5 +++--
pages/mine/index.js | 34 ++++++++++++++++++++++++++++--
pages/mine/index.wxml | 12 ++++++++---
project.private.config.json | 16 +++++++++++++-
4 files changed, 59 insertions(+), 8 deletions(-)
diff --git a/commons/css/custom/customIcon.wxss b/commons/css/custom/customIcon.wxss
index f2b556c..d94d625 100644
--- a/commons/css/custom/customIcon.wxss
+++ b/commons/css/custom/customIcon.wxss
@@ -3,6 +3,7 @@
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
+ display: inline-block;
}
.custom-icon-filtersearch{
width: 32rpx;
@@ -15,7 +16,7 @@
background-image: url('https://img.liche.cn/lichebao/icon-logout.png');
}
.custom-icon-scancode{
- width: 32rpx;
- height: 32rpx;
+ width: 24rpx;
+ height: 24rpx;
background-image: url('https://img.liche.cn/lichebao/icon-scancode.png');
}
\ No newline at end of file
diff --git a/pages/mine/index.js b/pages/mine/index.js
index 4181985..eea3b17 100644
--- a/pages/mine/index.js
+++ b/pages/mine/index.js
@@ -62,9 +62,26 @@ Page({
// }
]
}
+ // 20250624
+ let mock_data = [{
+ icon:'https://img.liche.cn/lichebao/menu-1.png',
+ title:'积分余额',
+ tip:'7999',
+ url:'/pages/customer/score/index'
+ },{
+ icon:'https://img.liche.cn/lichebao/menu-2.png',
+ title:'核销记录',
+ url:'/pages/customer/score/exchange'
+ },{
+ icon:'https://img.liche.cn/lichebao/menu-3.png',
+ title:'联系客服',
+ type:1,
+ url:'13455556666'
+ }]
+ let menu_list = mock_data.concat(list)
this.setData({
- list: list,
+ list: menu_list,
})
this.getUserInfo()
@@ -134,7 +151,12 @@ Page({
//推送链接-敬请期待
pushLinkMsg(e) {
- if (e.currentTarget.dataset.url) {
+ // 20250624
+ if(e.currentTarget.dataset.type == 1){
+ wx.makePhoneCall({
+ phoneNumber: e.currentTarget.dataset.url,
+ })
+ }else if (e.currentTarget.dataset.url) {
_.$router.openUrlScheme(e.currentTarget.dataset.url)
} else {
wx.showToast({
@@ -175,4 +197,12 @@ Page({
})
},
+ //20250624 扫码
+ bindScanCode(){
+ wx.scanCode({
+ success(res) {
+ console.log(res)
+ }
+ })
+ }
})
\ No newline at end of file
diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml
index 6767352..2913da2 100644
--- a/pages/mine/index.wxml
+++ b/pages/mine/index.wxml
@@ -14,7 +14,11 @@
{{userInfo.biz_name}}
-
+
+
+
+ 扫码
+
切换角色
@@ -29,16 +33,18 @@
-
+
{{item.title}}
+ {{item.tip}}
-
+
{{item.title}}
+ {{item.tip}}
diff --git a/project.private.config.json b/project.private.config.json
index 8717dfd..820e661 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -6,9 +6,23 @@
{
"name": "pages/customer/index",
"pathName": "pages/customer/score/exchange",
- "query": "",
+ "query": "source=shop",
"scene": null,
"launchMode": "default"
+ },
+ {
+ "name": "pages/mine/index",
+ "pathName": "pages/mine/index",
+ "query": "source=shop",
+ "launchMode": "default",
+ "scene": null
+ },
+ {
+ "name": "pages/mine/index",
+ "pathName": "pages/mine/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
}
]
}