diff --git a/docs/.vuepress/configs/sidebar/zh.ts b/docs/.vuepress/configs/sidebar/zh.ts index ef9c9f1..d79e082 100644 --- a/docs/.vuepress/configs/sidebar/zh.ts +++ b/docs/.vuepress/configs/sidebar/zh.ts @@ -10,6 +10,7 @@ export const sidebarZh: SidebarConfig = { 'errcode.md', 'troubleshooting.md', 'changelog.md', + 'thanks.md', ], }, ], diff --git a/docs/changelog.md b/docs/changelog.md index d15e34f..09c20ec 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,11 @@ # 更新日志 +## 4.1.3 (2024-01-29) + +### 功能 + +- 修改capacitor适配 + ## 4.1.0 (2024-01-15) ### 功能 diff --git a/docs/old.md b/docs/old.md new file mode 100644 index 0000000..2959cf3 --- /dev/null +++ b/docs/old.md @@ -0,0 +1,3 @@ +# 旧版本 + +- diff --git a/docs/quickstart.md b/docs/quickstart.md index 5f8e2a4..0d3718c 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -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) diff --git a/docs/thanks.md b/docs/thanks.md new file mode 100644 index 0000000..c68ac26 --- /dev/null +++ b/docs/thanks.md @@ -0,0 +1,5 @@ +# 特别鸣谢 + + + +本项目基于原项目[cordova-plugin-wechat](https://github.com/xu-li/cordova-plugin-wechat) 进行升级和改造,特别感谢原作者和其他维护者的付出。