Browse Source

取消idcard限制

Xfy
徐飞洋 1 week ago
parent
commit
4ff1eb18e4
  1. 28
      custom-tab-bar/index.js
  2. 16
      pages/goods-detail/goods-detail.js
  3. 2
      pages/profile/index.wxml

28
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({

16
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) {

2
pages/profile/index.wxml

@ -106,7 +106,7 @@
<view class="title">系统信息</view>
<view style="padding: 20rpx 0;">
<view style="font-size: 26rpx; color: #333; margin-bottom: 16rpx;">
当前版本:{{versionInfo.version || '2.6.223'}}
当前版本:{{versionInfo.version || '2.6.225'}}
</view>
<view style="font-size: 26rpx; color: #333; margin-bottom: 16rpx;">
上次更新:{{versionInfo.lastUpdate || '2026-02-23'}}

Loading…
Cancel
Save