From 4ff1eb18e4c7b72d9ec7c8d0225631070a6bb0cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?=
<15778543+xufeiyang6017@user.noreply.gitee.com>
Date: Wed, 25 Feb 2026 09:55:31 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88idcard=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
custom-tab-bar/index.js | 28 +++++++++++-----------------
pages/goods-detail/goods-detail.js | 16 ----------------
pages/profile/index.wxml | 2 +-
3 files changed, 12 insertions(+), 34 deletions(-)
diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js
index 0e3980b..7b66a6b 100644
--- a/custom-tab-bar/index.js
+++ b/custom-tab-bar/index.js
@@ -202,24 +202,18 @@ Component({
this.navigateLock(() => {
console.log('点击了估价按钮,跳转到evaluate2/one页面')
- // 判断idcardstatus是否为1
- const app = getApp()
- const userInfo = app.globalData.userInfo || wx.getStorageSync('userInfo') || {}
- const idcardstatus = userInfo.idcardstatus
-
- console.log('用户idcardstatus:', idcardstatus)
-
- // 如果idcardstatus不是1,提示用户并跳转到入驻页面
- if (idcardstatus !== 1) {
+ // 检查用户登录状态
+ const openid = wx.getStorageSync('openid');
+ const userId = wx.getStorageSync('userId');
- // 3秒后自动跳转到认证页面
- setTimeout(() => {
- wx.navigateTo({
- url: '/pages/profile/authentication/index'
- })
- })
-
- return
+ if (!openid || !userId) {
+ console.log('用户未登录,显示登录提示');
+ wx.showToast({
+ title: '请先登录',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
}
wx.switchTab({
diff --git a/pages/goods-detail/goods-detail.js b/pages/goods-detail/goods-detail.js
index c814e2a..782c2f1 100644
--- a/pages/goods-detail/goods-detail.js
+++ b/pages/goods-detail/goods-detail.js
@@ -3618,23 +3618,7 @@ Page({
console.log('用户身份证认证状态:', idcardstatus);
- if (idcardstatus !== 1) {
-
- //跳转到认证页面
- setTimeout(() => {
- wx.navigateTo({
- url: '/pages/profile/authentication/index',
- success: function() {
- console.log('成功跳转到认证页面');
- },
- fail: function(error) {
- console.error('跳转到认证页面失败:', error);
- }
- });
- });
- return;
- }
// 直接获取当前页面滚动位置
wx.createSelectorQuery().selectViewport().scrollOffset(function(res) {
diff --git a/pages/profile/index.wxml b/pages/profile/index.wxml
index 5dd1cd2..3b877c4 100644
--- a/pages/profile/index.wxml
+++ b/pages/profile/index.wxml
@@ -106,7 +106,7 @@
系统信息
- 当前版本:{{versionInfo.version || '2.6.223'}}
+ 当前版本:{{versionInfo.version || '2.6.225'}}
上次更新:{{versionInfo.lastUpdate || '2026-02-23'}}