Skip to content

Commit

Permalink
修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonz1987 committed Jan 29, 2024
1 parent f2c30b6 commit 170b092
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/configs/sidebar/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const sidebarZh: SidebarConfig = {
'errcode.md',
'troubleshooting.md',
'changelog.md',
'thanks.md',
],
},
],
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 更新日志

## 4.1.3 (2024-01-29)

### 功能

- 修改capacitor适配

## 4.1.0 (2024-01-15)

### 功能
Expand Down
3 changes: 3 additions & 0 deletions docs/old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 旧版本

-
42 changes: 42 additions & 0 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,45 @@ cordova plugin rm cordova-plugin-wechat --variable APP_ID=你的微信APPID



## Capictor/Ionic适配

```shell
npm install 本地插件目录
```



由于capacitor 不支持cordova插件的变量配置,需要手动进行适配

### 修改capacitor.config.json文件

```typescript
const config: CapacitorConfig = {
// 其他配置
...

// cordova相关配置
cordova: {
preferences: {
wechat_app_id: "wxc04a4b5e1607572b",
wechat_universal_link: "https://xxx"
}
},
ios: {
cordovaLinkerFlags: ["-ObjC", "-all_load"]
}

}
```

### 修改IOS工程配置

[微信官方文档](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html)

1、在 Xcode 中,选择你的工程设置项,选中“TARGETS”一栏,在“info”标签栏的“URL type“添加“URL scheme”为你所注册的应用程序 id(如下图所示)。

![img](https://res.wx.qq.com/op_res/NFS7xqSfwkeorZKhFhAaA5JlwLGitxOtyG9c6F2UfF6nggDUCq7zzVW0cq0mOmVq)

2、在Xcode中,选择你的工程设置项,选中“TARGETS”一栏,在“info”标签栏的“LSApplicationQueriesSchemes”添加weixin、weixinULAPI、weixinURLParamsAPI(如下图所示)。

![img](https://res.wx.qq.com/op_res/UA9NqONywI8DFeIMFMdND1tBAozE7hWe0fnrY88k68I0Rqq6Q60XCm2ZG9I7PfuzQIqbdsHIdVDiMjRPafZTig)
5 changes: 5 additions & 0 deletions docs/thanks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 特别鸣谢



本项目基于原项目[cordova-plugin-wechat](https://github.com/xu-li/cordova-plugin-wechat) 进行升级和改造,特别感谢原作者和其他维护者的付出。

0 comments on commit 170b092

Please sign in to comment.