Skip to content

Conversation

ClouderSky
Copy link
Contributor

对应Issue:#1262

添加开放平台的小程序信息设置系列接口。

Copy link
Collaborator

@overtrue overtrue left a 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,
Copy link
Collaborator

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(
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请改名为 updateSignature

Copy link
Collaborator

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)
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请改名为 deleteCategories

Copy link
Collaborator

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 = '',
Copy link
Collaborator

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 = '',
Copy link
Collaborator

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 = []
Copy link
Collaborator

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)
Copy link
Collaborator

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)
Copy link
Collaborator

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');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以考虑放在 Account

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个有考虑过,但该接口出现在开放平台文档的“代小程序实现业务”板块下,故对该接口的作用范围(即是否可以用于公众号等)并不确定,以致按照文档逻辑与其他小程序设置接口置于同处。希望可以获知更多相关信息。

Copy link
Collaborator

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

Copy link
Contributor Author

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下呢?

@ClouderSky
Copy link
Contributor Author

@overtrue 个人对overtrue/wechat的编码规范不够熟悉,造成了疏忽,感谢详细的指正。所有命名修改建议均已修改提交。

另外,新的提交中包含对测试脚本中原有错误的修复。对于提交PR之前没有运行测试检查的行为深感抱歉!

@overtrue
Copy link
Collaborator

overtrue commented Nov 2, 2018

@mingyoung 现在 OK 吗?

@mingyoung mingyoung merged commit 82014c1 into w7corp:master Nov 2, 2018
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.

3 participants