This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
更新 API #15
Open
HubertZhang
wants to merge
2
commits into
ant-mini-program:master
Choose a base branch
from
HubertZhang:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
更新 API #15
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
declare namespace my { | ||
interface IGetOpenUserInfoSuccessResult { | ||
/** | ||
* 获取用户信息后,应使用 `let userInfo = JSON.parse(res.response).response` 解析数据 | ||
* | ||
* 成功返回 res.response 报文格式示例如下: | ||
* ``` | ||
* `{"response": {"code": "10000","msg": "Success","countryCode": "CN","gender": "f","nickName": "XXX","avatar": "https://tfs.alipayobjects.com/images/partner/XXXXXXXX","city": "南通市","province": "江苏省"}}` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 要不也放一个 parse 后的类型? interface IGetOpenUserInfoSuccessParsedResult {
response: {
code: 1000 | xxxx;
...
}
} |
||
* ``` | ||
* | ||
* 未接入“获取用户基础信息”的功能包,返回 res.response 报文格式示例如下: | ||
* ``` | ||
* `{"response":{"code":"40006","msg":"Insufficient Permissions","subCode":"isv.insufficient-isv-permissions","subMsg":"ISV权限不足,建议在开发者中心检查对应功能是否已经添加"}}` | ||
* ``` | ||
*/ | ||
response: string; | ||
} | ||
interface IGetOpenUserInfoOptions { | ||
/** | ||
* 调用成功的回调函数 | ||
*/ | ||
success?(res: IGetOpenUserInfoSuccessResult): void; | ||
/** | ||
* 调用失败的回调函数 | ||
*/ | ||
fail?(): void; | ||
/** | ||
* 调用结束的回调函数(调用成功、失败都会执行) | ||
*/ | ||
complete?(): void; | ||
} | ||
/** | ||
* 获取支付宝会员的基础信息 | ||
*/ | ||
function getOpenUserInfo(option?: IGetOpenUserInfoOptions): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
declare namespace tinyapp { | ||
type OnShareAppMessageOptions = { | ||
from: 'button'; | ||
/** | ||
* 触发来源: | ||
* + button:页面分享按钮触发; | ||
* + menu:右上角分享按钮触发 | ||
* + code:执行my.showSharePanel 触发。 | ||
*/ | ||
from: 'button'|'menu'|'code'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 注意空格: 'button' | 'menu' | 'code' |
||
target: Record<string, any>; | ||
webViewUrl?: string; | ||
} | { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
文件名要不改成
getOpenUserInfo
吧。