diff --git a/pages/profile/index.js b/pages/profile/index.js index 3895419..0e5d1bf 100644 --- a/pages/profile/index.js +++ b/pages/profile/index.js @@ -221,9 +221,15 @@ Page({ this.updateUserTags(userId, serverType) }, - // 格式化用户类型显示 - 直接返回数据库中的type字段值 + // 格式化用户类型显示 formatUserType(type) { - return type || 'not_set' + switch (type) { + case 'buyer': return '买家'; + case 'seller': return '卖家'; + case 'both': return '买卖家'; + case 'buyer+seller': return '买卖家'; + default: return type || 'not_set'; + } }, // 设置为买家