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

[咨询]这段代码不是很理解?是不是有bug? #679

Closed
ikilobyte opened this issue May 16, 2023 · 3 comments
Closed

[咨询]这段代码不是很理解?是不是有bug? #679

ikilobyte opened this issue May 16, 2023 · 3 comments
Labels

Comments

@ikilobyte
Copy link
Contributor

func (component *Component) RegisterMiniProgram(param *RegisterMiniProgramParam) error {
componentAK, err := component.GetComponentAccessToken()
if err != nil {
return nil
}
url := fmt.Sprintf(fastregisterweappURL+"?action=create&component_access_token=%s", componentAK)
data, err := util.PostJSON(url, param)
if err != nil {
return err
}
return util.DecodeWithCommonError(data, "component/fastregisterweapp?action=create")
}

其中第39行,err != nil ,返回一个nil 这是为什么?

@houseme
Copy link
Collaborator

houseme commented May 16, 2023

提 PR 修复一下,包括下面的方法也可以一起修复

@ikilobyte
Copy link
Contributor Author

pr #680

@houseme
Copy link
Collaborator

houseme commented May 16, 2023

pr #680

@silenceper 辛苦看下这个 pr

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

No branches or pull requests

3 participants