Skip to content

Commit

Permalink
修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonz1987 committed Jan 13, 2024
1 parent 8ddbba6 commit 12a1957
Show file tree
Hide file tree
Showing 32 changed files with 323 additions and 101 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

- [文档](https://www.byteee.fund/cordova-plugin-wechat/)

- [DEMO](https://github.com/byteee-fund/cordova-plugin-wechat-demo)



## SDK版本

Expand All @@ -25,7 +27,9 @@

- [x] 微信分享/收藏 (文本,图片,网页,视频,音乐,音乐视频,文件,表情,小程序)

- [x] 拉起小程序
- [x] 拉起微信小程序

- [x] 拉起微信APP

- [x] 拉起微信客服

Expand All @@ -35,6 +39,10 @@

- [x] 检查微信APP是否安装

- [x] 获取微信SDK版本

- [x] 事件监听(从微信打开APP,扫码成功,认证完成,微信API初始化)



## 兼容性
Expand All @@ -49,6 +57,13 @@
| | 9 (API 28) ||
| | 8 (API 26,27) ||
| | 7 (API 24,25) ||
| IOS | 17 ||
| | 16 ||
| | 15 ||
| | 14 ||
| | 13 ||
| | 12 ||
| | 11 ||


## 软件协议
Expand Down
8 changes: 7 additions & 1 deletion docs/.vuepress/configs/navbar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const navbarZh: NavbarConfig = [
'/api/login.md',
'/api/login-scan.md',
'/api/request-payment.md',
'/api/share.md',
'/api/share-text.md',
'/api/share-image.md',
'/api/share-video.md',
Expand All @@ -26,10 +27,15 @@ export const navbarZh: NavbarConfig = [
'/api/share-miniprogram.md',
'/api/share-file.md',
'/api/share-emotion.md',
'/api/launch-wechat-app.md',
'/api/launch-miniprogram.md',
'/api/open-customer-service-chat.md',
'/api/request-subscribe-message.md',
'/api/choose-invoice-card.md',
'/api/get-sdk-version.md',
'/api/start-log.md',
'/api/stop-log.md',
'/api/check-universal-link.md',
],
},
{
Expand All @@ -38,6 +44,6 @@ export const navbarZh: NavbarConfig = [
},
{
text: 'Github',
link: 'https://github.com/byteee-fund/cordova-plugin-wechat',
link: 'https://github.com/byteee-fund/cordova-plugin-wechat-doc',
},
]
7 changes: 7 additions & 0 deletions docs/.vuepress/configs/sidebar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const sidebarZh: SidebarConfig = {
children: [
'README.md',
'quickstart.md',
'errcode.md',
'troubleshooting.md',
'changelog.md',
],
Expand All @@ -20,6 +21,7 @@ export const sidebarZh: SidebarConfig = {
'/api/login.md',
'/api/login-scan.md',
'/api/request-payment.md',
'/api/share.md',
'/api/share-text.md',
'/api/share-image.md',
'/api/share-video.md',
Expand All @@ -29,10 +31,15 @@ export const sidebarZh: SidebarConfig = {
'/api/share-miniprogram.md',
'/api/share-file.md',
'/api/share-emotion.md',
'/api/launch-wechat-app.md',
'/api/launch-miniprogram.md',
'/api/open-customer-service-chat.md',
'/api/request-subscribe-message.md',
'/api/choose-invoice-card.md',
'/api/get-sdk-version.md',
'/api/start-log.md',
'/api/stop-log.md',
'/api/check-universal-link.md',
],
},
],
Expand Down
27 changes: 21 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# 软件介绍
# 关于项目

`cordova-plugin-wechat` 是一款基于微信(OpenSDK)开发的Cordova插件。他实现微信官方SDK的所有接口,并在参数上进行了优化,方便你快速在cordova平台上可以快速实现微信登录,支付,分享,小程序等功能的接入和开发。
`cordova-plugin-wechat` 是一款基于微信(OpenSDK)开发的Cordova插件。该插件实现微信官方SDK的所有接口,并对微信的接口和参数进行了二次封装和优化,方便你快速在cordova等相关平台上可以快速实现微信登录,支付,分享,小程序等功能的接入和开发。



- [主页](https://www.byteee.fund/project/cordova-plugin-wechat)
- [主页](https://byteee.fund/cordova-plugin-wechat)

- [文档](https://www.byteee.fund/doc/cordova-plugin-wechat/)
- [文档](https://byteee.fund/cordova-plugin-wechat/)

- [DEMO](https://github.com/byteee-fund/cordova-plugin-wechat-demo)



## SDK版本

Expand All @@ -25,16 +27,22 @@

- [x] 微信分享/收藏 (文本,图片,网页,视频,音乐,音乐视频,文件,表情,小程序)

- [x] 拉起小程序
- [x] 拉起微信小程序

- [x] 拉起微信APP

- [x] 拉起微信客服

- [x] 一次性订阅消息

- [x] 发票
- [x] 选择发票

- [x] 检查微信APP是否安装

- [x] 获取微信SDK版本

- [x] 事件监听(从微信打开APP,扫码成功,认证完成,微信API初始化)



## 兼容性
Expand All @@ -49,6 +57,13 @@
| | 9 (API 28) ||
| | 8 (API 26,27) ||
| | 7 (API 24,25) ||
| IOS | 17 ||
| | 16 ||
| | 15 ||
| | 14 ||
| | 13 ||
| | 12 ||
| | 11 ||


## 软件协议
Expand Down
26 changes: 26 additions & 0 deletions docs/api/check-universal-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 自检(checkUniversalLinkReady)

> 此接口仅限IOS下使用
>
> 此接口仅为了方便调试使用,生成环境请勿开启。


## 参数




## 示例

```javascript
window.Wechat.checkUniversalLinkReady(
function(res) {
console.log('check universal link success:', res);
},
function(err) {
console.error(err);
}
)
```
2 changes: 1 addition & 1 deletion docs/api/choose-invoice-card.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 发票
# 选取发票(chooseInvoiceCard)



Expand Down
30 changes: 30 additions & 0 deletions docs/api/get-sdk-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 获取SDK版本(getSDKVersion)

获取微信SDK版本号(非微信APP版本号)



## 参数




## 返回

版本号



## 示例

```javascript
window.Wechat.getSDKVersion(
function(res) {
console.log('get sdk version:', res);
},
function(err) {
console.error(err);
}
)
```
4 changes: 2 additions & 2 deletions docs/api/has-installed.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 是否安装
# 是否安装(isWXAppInstalled)

判断微信客户端是否有安装

Expand All @@ -19,7 +19,7 @@
## 示例

```javascript
window.Wechat.hasWechatInstall(
window.Wechat.isWXAppInstalled(
function(res) {
console.log('wechat installed result:', res);
},
Expand Down
28 changes: 0 additions & 28 deletions docs/api/launch-mini-program.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/api/launch-miniprogram.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 拉起微信小程序
# 拉起微信小程序(launchMiniProgram)


跳转微信获取微信登录态



Expand Down
22 changes: 22 additions & 0 deletions docs/api/launch-wechat-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 拉起微信App(launchWechatApp)





## 参数




## 示例

```javascript
window.Wechat.launchWechatApp(function(res) {
console.log('launch wechat app success!');
}, function(err) {
console.error(err);
}
);
```
4 changes: 2 additions & 2 deletions docs/api/login-scan.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 扫码登录
# 扫码登录(auth)



Expand Down Expand Up @@ -27,7 +27,7 @@
## 示例

```javascript
window.Wechat.loginByScan({
window.Wechat.auth({
scope: "snsapi_userinfo",
nonceStr: "wechat_sdk_demo_test",
timeStamp: "1111111111",
Expand Down
2 changes: 1 addition & 1 deletion docs/api/login.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 登录
# 登录(login)

跳转微信获取微信登录态

Expand Down
10 changes: 5 additions & 5 deletions docs/api/open-customer-service-chat.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 拉起微信客服
# 拉起微信客服(openCustomerServiceChat)


跳转微信获取微信登录态



## 参数

| 属性 | 类型 | 默认值 | 必填 | 说明 |
| ------ | ------ | ------ | ---- | ------------------------------------------------------------ |
| corpId | string | | | 企业id 开发者需前往微信客服官网完成移动应用(appid)和企业id的绑定。 |
| url | string | | | 客服URL |
| corpId | string | | | 企业id 开发者需前往微信客服官网完成移动应用(appid)和企业id的绑定。 |
| url | string | | | 客服URL |



## 示例

```javascript
window.Wechat.login({
window.Wechat.openCustomerServiceChat({
corpId: "xxxx",
url: "https://work.weixin.qq.com/kfid/kfcxxxxx"
}, function(res) {
Expand Down
2 changes: 1 addition & 1 deletion docs/api/request-payment.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 支付
# 支付(requestPayment)



Expand Down
4 changes: 2 additions & 2 deletions docs/api/request-subscribe-message.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 一次性订阅消息
# 一次性订阅消息(requestSubscribeMessage)

跳转微信获取一次性订阅消息

##




Expand Down
Loading

0 comments on commit 12a1957

Please sign in to comment.