Browse Source

修改formatUserType方法,确保both类型显示为买卖家

pull/1/head
徐飞洋 3 months ago
parent
commit
c7329a730b
  1. 10
      pages/profile/index.js

10
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';
}
},
// 设置为买家

Loading…
Cancel
Save