-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add miniprogram setting client #1388
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢你的贡献,不过建议使用统一的编码规范,按我的建议修改,谢谢!
* @param int $bottom 剪裁框右下角y坐标(取值范围:[0, 1]) | ||
*/ | ||
public function modifyHeadImage( | ||
string $media_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请使用驼峰命名法
* @param int $right 剪裁框右下角x坐标(取值范围:[0, 1]) | ||
* @param int $bottom 剪裁框右下角y坐标(取值范围:[0, 1]) | ||
*/ | ||
public function modifyHeadImage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改名为 updateAvatar
* | ||
* @param string $signature 功能介绍(简介) | ||
*/ | ||
public function modifySignature($signature) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改名为 updateSignature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
并加上类型约束
* | ||
* @param array $categories 类目数组 | ||
*/ | ||
public function addCategory(array $categories) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改名为 addCategories
* @param int $first_id 一级类目ID | ||
* @param int $second_id 二级类目ID | ||
*/ | ||
public function deleteCategory(int $first_id, int $second_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改名为 deleteCategories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
变量统一使用驼峰命名法
*/ | ||
public function setNickname( | ||
string $nickname, | ||
string $idcard = '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idCardMediaId
public function setNickname( | ||
string $nickname, | ||
string $idcard = '', | ||
string $license = '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
licenseMediaId
string $nickname, | ||
string $idcard = '', | ||
string $license = '', | ||
array $stuff_list = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
驼峰,并改名为 otherStuffs
* | ||
* @param int $audit_id 审核单id | ||
*/ | ||
public function queryNickname($audit_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getNicknameAuditStatus
* | ||
* @param string $nickname 名称(昵称) | ||
*/ | ||
public function checkWxVerifyNickname($nickname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isAvailableNickname($nickname)
*/ | ||
public function getBasicInfo() | ||
{ | ||
return $this->httpPostJson('cgi-bin/account/getaccountbasicinfo'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以考虑放在 Account
下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个有考虑过,但该接口出现在开放平台文档的“代小程序实现业务”板块下,故对该接口的作用范围(即是否可以用于公众号等)并不确定,以致按照文档逻辑与其他小程序设置接口置于同处。希望可以获知更多相关信息。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以放在 OpenPlatform/Authorizer/MiniProgram/Account
下,参照公众号的 Account
,这是继承公用的 Account
的:
https://github.com/overtrue/wechat/blob/master/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有此先例,那便可行。不过从接口对应URL来看,属于cgi-bin/account
路径下的接口有getBasicInfo、updateAvatar、updateSignature,按你建议,是否需要将这三个接口一并移至新的Client下呢?
@overtrue 个人对overtrue/wechat的编码规范不够熟悉,造成了疏忽,感谢详细的指正。所有命名修改建议均已修改提交。 另外,新的提交中包含对测试脚本中原有错误的修复。对于提交PR之前没有运行测试检查的行为深感抱歉! |
@mingyoung 现在 OK 吗? |
对应Issue:#1262
添加开放平台的小程序信息设置系列接口。