From de938d821b3c5de8f3eba8e55adf0e4d054496b5 Mon Sep 17 00:00:00 2001 From: Default User Date: Wed, 31 Dec 2025 17:33:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=93=E7=AE=97=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=92=8CAPI=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/settlement/index.js | 9 ++++++++- utils/api.js | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/settlement/index.js b/pages/settlement/index.js index d38ee26..5aba878 100644 --- a/pages/settlement/index.js +++ b/pages/settlement/index.js @@ -801,8 +801,15 @@ Page({ applicationId: appId }); - // 调用API获取用户完整数据 - 异步执行,不影响跳转 + // 更新用户类型为seller const API = require('../../utils/api.js'); + API.updateUserType('seller').then(() => { + console.log('用户类型已更新为seller'); + }).catch(err => { + console.error('更新用户类型失败:', err); + }); + + // 调用API获取用户完整数据 - 异步执行,不影响跳转 API.getUserInfo().then(userRes => { console.log('用户完整数据:', userRes.data); }).catch(err => { diff --git a/utils/api.js b/utils/api.js index d3dece3..9225864 100644 --- a/utils/api.js +++ b/utils/api.js @@ -3043,6 +3043,7 @@ module.exports = { delete userInfoCopy.openid; // 不覆盖openid delete userInfoCopy.type; // 不覆盖type delete userInfoCopy.timestamp; // 不覆盖timestamp + delete userInfoCopy.partnerstatus; // 不覆盖partnerstatus字段,避免清空入驻状态 Object.assign(uploadData, userInfoCopy); }