1
0
Fork 0
PhizClip RN 运行环境,让小程序在 RN 应用中无缝运行 / ReactNative DEMO for PhizClip
 
 
 
 
 
Go to file
sannilake 369f63c51c 英文版readme翻译 2023-11-09 15:01:31 +08:00
.github/workflows Create pull_request.yml 2022-02-08 14:38:52 +08:00
__tests__ initial commit 2020-04-13 19:06:07 +08:00
android feat: 更新文档;更新 ID 2022-04-21 19:01:24 +08:00
docs 英文版readme翻译 2023-11-09 15:01:31 +08:00
ios feat: update rn sdk version 2022-09-22 17:53:28 +08:00
.buckconfig initial commit 2020-04-13 19:06:07 +08:00
.editorconfig chore: 更新项目 demo 2021-08-31 14:27:39 +08:00
.eslintrc.js initial commit 2020-04-13 19:06:07 +08:00
.flowconfig chore: 更新项目 demo 2021-08-31 14:27:39 +08:00
.gitattributes chore: 更新项目 demo 2021-08-31 14:27:39 +08:00
.gitignore initial commit 2020-04-13 19:06:07 +08:00
.prettierrc.js chore: 更新项目 demo 2021-08-31 14:27:39 +08:00
.watchmanconfig initial commit 2020-04-13 19:06:07 +08:00
App.js feat: 更新文档;更新 ID 2022-04-21 19:01:24 +08:00
Gemfile feat: new demo init 2022-04-21 13:55:54 +08:00
Gemfile.lock feat: new demo init 2022-04-21 13:55:54 +08:00
README.md 英文版readme翻译 2023-11-09 15:01:31 +08:00
app.json feat: new demo init 2022-04-21 13:55:54 +08:00
babel.config.js initial commit 2020-04-13 19:06:07 +08:00
index.js initial commit 2020-04-13 19:06:07 +08:00
metro.config.js feat: new demo init 2022-04-21 13:55:54 +08:00
package-lock.json feat: update rn sdk version 2022-09-22 17:53:28 +08:00
package.json feat: update rn sdk version 2022-09-22 17:53:28 +08:00
readme_en.md 英文版readme翻译 2023-11-09 15:01:31 +08:00
scanner.js feat: new demo init 2022-04-21 13:55:54 +08:00
yarn.lock feat: new demo init 2022-04-21 13:55:54 +08:00

readme_en.md

PhizClip ReactNative DEMO

👉 https://www.phizclip.com/ 👈


🤔 What is PhizClip?

Have you ever thought that the developed WeChat Mini-App can be put in your own APP to run directly, and you only need to develop the Mini-App once, and then you can open it in different applications, isn't it incredible?

Have you ever tried to introduce an SDK in your own APP, and you can not only open the Mini-App in the app, but also customize the Mini-App interface and modify the Mini-App style, don't you think it is more incredible?

This is PhizClip, with much INCREDIBLE !

🤩 Effect preview

This project is a DEMO demonstration of integrating and running the PhizClip applet on the basis of the ReactNative project. You can test according to the process below to verify the actual effect of the PhizClip applet in the ReactNative environment.

Lets take a look at the running effect first~

⚙️ Steps

1. Introduce plug-ins

Introduce mini program engine plug-in.

Introduce the mini program ReactNative plug-in into the package.json file

"react-native-mopsdk": "^1.0.3"

Install plugin

$ npm install react-native-mopsdk --save
$ react-native link react-native-mopsdk

2. Initialize engine

import MopSDK from 'react-native-mopsdk';
// 1. introduce NativeModules, NativeEventEmitter
import { NativeModules, NativeEventEmitter } from 'react-native';

// 2. mop initialization
const eventEmitter = new NativeEventEmitter(NativeModules.FINMopSDK);
  MopSDK.initialize({
    appkey:
      'Ev7QHvml1UcW98Y1GaLfRz34ReffbDESaTXbCoFyKhEm0a3gam0elOOOdZ6Twpa3HkBzlvOwJ2cyhOrMVWuuGw==',
    secret: '16f2d2700453ae51',
    apiServer: 'https://api.phizclip.com',
    apiPrefix: '/api/v1/mop/',
    nativeEventEmitter: eventEmitter,
    finMopSDK: NativeModules.FINMopSDK,
  }).then(res => {
    console.log('Initialization successful')
  }).catch(err => {
    console.log('Initialization failed')
  })

3. Open the applet

MopSDK.openApplet({appId: 'xxxx'});
  • SDK KEY and SDK SECRET can be obtained from PhizClip, click here Register an account;
  • After entering the platform, add your own package name on the "Application Management" page and click "Copy" to get the key\secret\apisever field;
  • apiServer and apiPrefix are fixed fields, please refer to this DEMO directly;
  • Mini Program ID is the Mini Program APP ID listed in the management background. It needs to be created in "Mini Program Management" and associated in "Application Management";

The Mini Program ID is different from the WeChat Mini Program ID! (This refers specifically to the ID of the PhizClip platform)

📋 Interface documentation

Click here Check out the React Native quick integration documentation

The following is information on common questions and guidelines for your development and experience with PhizClip

☎️ Contact

Scan the QR code below with WeChat and follow the official public number Finogeeks for more exciting content.

Scan the QR code below with WeChat and invite into the official WeChat exchange group (add friend note: finclip consulting) to get more exciting content.

Stargazers

Stargazers repo roster for @finogeeks/finclip-react-native-demo

Forkers

Forkers repo roster for @finogeeks/finclip-react-native-demo

🌏 Languages