-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cb0ec79
Showing
86 changed files
with
4,374 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build app and deploy to aliyun | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: npm install | ||
run: npm install | ||
# 运行构建脚本 | ||
- name: Build VitePress site | ||
run: npm run docs:build | ||
# 部署到阿里云 | ||
- name: Deploy to Aliyun | ||
uses: easingthemes/ssh-deploy@main | ||
env: | ||
# 私钥 | ||
SSH_PRIVATE_KEY: ${{ secrets.BSF_SERVER_SECRET }} | ||
# scp参数 | ||
ARGS: "-avzr --delete" | ||
# 源目录,编译后生成的文件目录 | ||
SOURCE: "./docs/.vitepress/dist/" | ||
# 服务器ip:换成你的服务器IP | ||
REMOTE_HOST: "${{ secrets.BSF_SERVER_HOST }}" | ||
# 用户 | ||
REMOTE_USER: "root" | ||
# 目标地址 你在服务器上部署代码的地方 | ||
TARGET: "/www/byteee-fund-docs/cordova-plugin-wechat" |
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,3 @@ | ||
docs/.vitepress/cache | ||
node_modules | ||
.idea |
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,50 @@ | ||
English | [中文](README_zh.md) | ||
|
||
|
||
# About the Project | ||
|
||
`cordova-plugin-wechat` is a Cordova plugin developed based on WeChat (OpenSDK). This plugin implements all the interfaces of the official WeChat SDK and provides secondary encapsulation and optimization of WeChat's interfaces and parameters, allowing you to quickly implement and develop WeChat login, payment, sharing, mini-programs, and other features on platforms like Cordova. | ||
|
||
- [Homepage](https://byteee.fund/project/cordova-plugin-wechat) | ||
|
||
- [Documentation](https://byteee.fund/doc/cordova-plugin-wechat) | ||
|
||
- [DEMO](https://github.com/byteee-fund/cordova-plugin-wechat-demo) | ||
|
||
## SDK Versions | ||
|
||
- Cordova 12.x | ||
- WeChat OpenSDK Android 6.8.24, iOS 2.0.2 | ||
|
||
## Features | ||
|
||
- ✅ WeChat Login (Authorization Login, QR Code Login) | ||
|
||
- ✅ WeChat Payment | ||
|
||
- ✅ WeChat Sharing/Favorites (Text, Image, Webpage, Video, Music, Music Video, File, Emoji, Mini Program) | ||
|
||
- ✅ Launch WeChat Mini Program | ||
|
||
- ✅ Launch WeChat App | ||
|
||
- ✅ Launch WeChat Customer Service | ||
|
||
- ✅ One-time Subscription Message | ||
|
||
- ✅ Select Invoice | ||
|
||
- ✅ Check if WeChat App is Installed | ||
|
||
- ✅ Get WeChat SDK Version | ||
|
||
- ✅ Event Listening (Open App from WeChat, QR Code Scan Success, Authentication Completed, WeChat API Initialization) | ||
|
||
## Compatibility | ||
|
||
- ✅ Cordova | ||
- ✅ Ionic/Capacitor | ||
|
||
## License | ||
|
||
Apache 2.0 |
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,57 @@ | ||
[English](README.md) | 中文 | ||
|
||
# 关于项目 | ||
|
||
`cordova-plugin-wechat` 是一款基于微信(OpenSDK)开发的Cordova插件。该插件实现微信官方SDK的所有接口,并对微信的接口和参数进行了二次封装和优化,方便你快速在cordova等相关平台上可以快速实现微信登录,支付,分享,小程序等功能的接入和开发。 | ||
|
||
|
||
|
||
- [主页](https://byteee.fund/project/cordova-plugin-wechat) | ||
|
||
- [文档](https://byteee.fund/doc/cordova-plugin-wechat/) | ||
|
||
- [DEMO](https://github.com/byteee-fund/cordova-plugin-wechat-demo) | ||
|
||
|
||
|
||
## SDK版本 | ||
|
||
- Cordova 12.x | ||
- 微信 OpenSDK Android 6.8.24, IOS 2.0.2 | ||
|
||
|
||
|
||
## 功能列表 | ||
|
||
- ✅ 微信登录 (授权登录,扫码登录) | ||
|
||
- ✅ 微信支付 | ||
|
||
- ✅ 微信分享/收藏 (文本,图片,网页,视频,音乐,音乐视频,文件,表情,小程序) | ||
|
||
- ✅ 拉起微信小程序 | ||
|
||
- ✅ 拉起微信APP | ||
|
||
- ✅ 拉起微信客服 | ||
|
||
- ✅ 一次性订阅消息 | ||
|
||
- ✅ 选择发票 | ||
|
||
- ✅ 检查微信APP是否安装 | ||
|
||
- ✅ 获取微信SDK版本 | ||
|
||
- ✅ 事件监听(从微信打开APP,扫码成功,认证完成,微信API初始化) | ||
|
||
|
||
|
||
## 兼容性 | ||
|
||
- ✅ Cordova | ||
- ✅ Ionic/Capacitor | ||
|
||
## 软件协议 | ||
|
||
Apache 2.0 |
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,46 @@ | ||
import { defineConfig } from 'vitepress' | ||
import { | ||
navbarEn, | ||
navbarZh, | ||
sidebarEn, | ||
sidebarZh, | ||
} from "./configs"; | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "cordova-plugin-wechat", | ||
description: "cordova plugin for wechat opensdk", | ||
base: "/doc/cordova-plugin-wechat", | ||
themeConfig: { | ||
search: { | ||
provider: 'local' | ||
}, | ||
socialLinks: [ | ||
{ icon: {svg:"<svg class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"16068\" width=\"200\" height=\"200\"><path d=\"M512 901.746939c-13.583673 0-26.122449-4.179592-37.093878-13.061225-8.881633-7.314286-225.697959-175.020408-312.424489-311.379592C133.746939 532.37551 94.040816 471.24898 94.040816 384.522449c0-144.718367 108.146939-262.269388 240.326531-262.269388 67.395918 0 131.657143 30.82449 177.632653 84.636735 45.453061-54.334694 109.191837-84.636735 177.110204-84.636735 132.702041 0 240.326531 117.55102 240.326531 262.269388 0 85.159184-37.093878 143.673469-67.395919 191.216327l-1.044898 1.567346c-86.726531 136.359184-303.542857 304.587755-312.424489 311.379592-10.44898 8.359184-22.987755 13.061224-36.571429 13.061225z\" fill=\"#E5404F\" ></path></svg>"}, link: 'https://byteee.fund/project/cordova-plugin-wechat' }, | ||
{ icon: 'github', link: 'https://github.com/byteee-fund/cordova-plugin-wechat-doc' } | ||
], | ||
footer: { | ||
message: 'Apache 2.0 License.', | ||
copyright: 'Copyright © 2024. <a href="https://byteee.fund" target="_blank">BSF</a>' | ||
} | ||
}, | ||
locales: { | ||
root: { | ||
label: 'English', | ||
lang: 'en', | ||
themeConfig: { | ||
nav: navbarEn, | ||
sidebar:sidebarEn | ||
} | ||
}, | ||
zh: { | ||
label: '中文', | ||
lang: 'zh', | ||
themeConfig: { | ||
nav: navbarZh, | ||
sidebar:sidebarZh | ||
} | ||
}, | ||
}, | ||
lastUpdated: true | ||
}) |
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,2 @@ | ||
export * from './navbar' | ||
export * from './sidebar' |
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,42 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type NavItem = DefaultTheme.NavItem | ||
|
||
export const navbarEn: NavItem[] = [ | ||
{ | ||
text: 'Guide', | ||
link: "/guide" | ||
}, | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "Login", | ||
link: "/api/login.md" | ||
}, | ||
{ | ||
text: "Auth", | ||
link: "/api/login-scan.md" | ||
}, | ||
{ | ||
text: "RequestPayment", | ||
link: "/api/request-payment.md" | ||
}, | ||
{ | ||
text: "Share", | ||
link: "/api/share.md" | ||
}, | ||
{ | ||
text: "LaunchMiniprogram", | ||
link: "/api/launch-miniprogram.md" | ||
}, | ||
{ | ||
text: "OpenCustomerServiceChat", | ||
link: "/api/open-customer-service-chat.md" | ||
}, | ||
], | ||
}, | ||
{ | ||
text: 'Capacitor/Ionic', | ||
link: "/guide/capacitor.md" | ||
}, | ||
] |
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,2 @@ | ||
export * from './en' | ||
export * from './zh' |
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,42 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type NavItem = DefaultTheme.NavItem | ||
|
||
export const navbarZh: NavItem[] = [ | ||
{ | ||
text: '指南', | ||
link: "/zh/guide/index.md" | ||
}, | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "登录(login)", | ||
link: "/zh/api/login.md" | ||
}, | ||
{ | ||
text: "扫码登录(auth)", | ||
link: "/zh/api/login-scan.md" | ||
}, | ||
{ | ||
text: "支付(requestPayment)", | ||
link: "/zh/api/request-payment.md" | ||
}, | ||
{ | ||
text: "分享(share)", | ||
link: "/zh/api/share.md" | ||
}, | ||
{ | ||
text: "打开小程序(launchMiniprogram)", | ||
link: "/zh/api/launch-miniprogram.md" | ||
}, | ||
{ | ||
text: "拉起微信客服(openCustomerServiceChat)", | ||
link: "/zh/api/open-customer-service-chat.md" | ||
}, | ||
], | ||
}, | ||
{ | ||
text: 'Capacitor/Ionic', | ||
link: "/zh/guide/capacitor.md" | ||
}, | ||
] |
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,98 @@ | ||
import { DefaultTheme } from "vitepress" | ||
type Sidebar = DefaultTheme.Sidebar | ||
|
||
export const sidebarEn: Sidebar = { | ||
'/guide': [ | ||
{ | ||
text: 'Guide', | ||
items: [ | ||
{text: "About", link: "/guide/index.md"}, | ||
{text: "Quickstart", link: "/guide/quickstart.md"}, | ||
{text: "Capacitor/Ionic", link: "/guide/capacitor.md"}, | ||
{text: "Troubleshooting", link: "/guide/troubleshooting.md"}, | ||
{text: "Errcode", link: "/guide/errcode.md"}, | ||
{text: "Changelog", link: "/guide/changelog.md"}, | ||
{text: "Thanks", link: "/guide/thanks.md"} | ||
], | ||
}, | ||
], | ||
'/api/': [ | ||
{ | ||
text: 'API', | ||
items: [ | ||
{ | ||
text: "IsWXAppInstalled", | ||
link: "/api/has-installed.md" | ||
}, | ||
{ | ||
text: "Login", | ||
link: "/api/login.md" | ||
}, | ||
{ | ||
text: "Auth", | ||
link: "/api/login-scan.md" | ||
}, | ||
{ | ||
text: "RequestPayment", | ||
link: "/api/request-payment.md" | ||
}, | ||
{ | ||
text: "Share", | ||
link: "/api/share.md" | ||
}, | ||
{ | ||
text: "ShareText", | ||
link: "/api/share-text.md" | ||
}, | ||
{ | ||
text: "ShareWebpage", | ||
link: "/api/share-webpage.md" | ||
}, | ||
{ | ||
text: "ShareFile", | ||
link: "/api/share-file.md" | ||
}, | ||
{ | ||
text: "ShareImage", | ||
link: "/api/share-image.md" | ||
}, | ||
{ | ||
text: "ShareMiniProgram", | ||
link: "/api/share-miniprogram.md" | ||
}, | ||
{ | ||
text: "ShareMusic", | ||
link: "/api/share-music.md" | ||
}, | ||
{ | ||
text: "ShareMusicVideo", | ||
link: "/api/share-music-video.md" | ||
}, | ||
{ | ||
text: "ShareVideo", | ||
link: "/api/share-video.md" | ||
}, | ||
{ | ||
text: "ShareMotion", | ||
link: "/api/share-emotion.md" | ||
}, | ||
{ | ||
text: "LaunchMiniprogram", | ||
link: "/api/launch-miniprogram.md" | ||
}, | ||
{ | ||
text: "OpenCustomerServiceChat", | ||
link: "/api/open-customer-service-chat.md" | ||
}, | ||
{text: "LaunchWechatApp", link: "/api/launch-wechat-app.md"}, | ||
{text: "RequestSubscribeMessage", link: "/api/request-subscribe-message.md"}, | ||
{text: "ChooseInvoiceCard", link: "/api/choose-invoice-card.md"}, | ||
{text: "CheckUniversalLinkReady", link: "/api/check-universal-link.md"}, | ||
{text: "GetSDKVersion", link: "/api/get-sdk-version.md"}, | ||
{text: "StartLog", link: "/api/start-log.md"}, | ||
{text: "StopLog", link: "/api/stop-log.md"}, | ||
], | ||
}, | ||
], | ||
|
||
} |
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,2 @@ | ||
export * from './en' | ||
export * from './zh' |
Oops, something went wrong.