Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update lang is zh_CN and make it as parameter #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fangjj
Copy link

@fangjj fangjj commented Apr 19, 2018

lang 参数写错,是zh_CN非zh-CN,且暴露参数lang在ServiceConfiguration中,可以设置成en等。
image

@fangjj
Copy link
Author

fangjj commented Apr 19, 2018

暴露whitelistedFields参数后,在用户登录时候,对用户的profile进行更新。

  const {user, type, } = options;
  if(type === WeChatMP.serviceName) {
    //重新微信登录
    let profile = _.get(user, 'services.wechat-mp');
    profile = _.pick(profile, WeChatMP.whitelistedFields);
    //每次登录,更新用户的头像
    Meteor.users.update(user._id, {
      $set: {
        profile,
        nickname: _.get(user, 'services.wechat-mp.nickname'),
        avatar: _.get(user, 'services.wechat-mp.headimgurl')
      }
    })
  }
});

@zhaoyao91
Copy link
Owner

@fangjj 感谢关注。由于工作原因,现在暂时没有精力更新meteor包。麻烦fork一份更新使用好吗,谢谢。

@fangjj
Copy link
Author

fangjj commented Apr 19, 2018

嗯。已fork。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants