0.0.5 ā€¢ Published 4 years ago

@openapplus/cordova-openapplus-plugin v0.0.5

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
4 years ago

auto chart component for online editing, include a auto chart or combination chart to your react app

šŸ  Homepage

Prerequisites

  • node >=8.0.0

Install

* cordova create Cordova-Demo
* cordova platform add ios
* cd Cordova-Demo
* cordova plugin add @openapplus/cordova-openapplus-plugin (or cordova plugin add path/to/CordovaOpenApplusPlugin)

Usage

function onButtonClicked(){
    var CordovaOpenApplusPlugin = cordova.plugins.CordovaOpenApplusPlugin;
    CordovaOpenApplusPlugin.navigateToMiniProgram("openapplus://jsApp/{jskey}}");
}
var app = {
    // Application Constructor
    initialize: function() {
        document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
    },

    // deviceready Event Handler
    //
    // Bind any cordova events here. Common events are:
    // 'pause', 'resume', etc.
    onDeviceReady: function() {
        this.receivedEvent('deviceready');
        var CordovaOpenApplusPlugin = cordova.plugins.CordovaOpenApplusPlugin;
        CordovaOpenApplusPlugin.start("{appkey}","{appscret}");
        CordovaOpenApplusPlugin.enableLogging(true);

        document.querySelector('button').addEventListener('click', onButtonClicked);
    },

    // Update DOM on a Received Event
    receivedEvent: function(id) {
        var parentElement = document.getElementById(id);
        var listeningElement = parentElement.querySelector('.listening');
        var receivedElement = parentElement.querySelector('.received');

        listeningElement.setAttribute('style', 'display:none;');
        receivedElement.setAttribute('style', 'display:block;');

        console.log('Received Event: ' + id);
    }
};

app.initialize();

License

/*

  • GPLv3 License
  • cordova plugin for integerating openapplus
  • Copyright (C) 2020 linwaiwai(jiansihun@foxmail.com)
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version.
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License
  • along with this program. If not, see https://www.gnu.org/licenses/.
  • Note:
  • This library is using opensource license GPLv3.
  • If your want to have it for commerce use, please contract author to be granted.
  • */

Author

šŸ‘¤ linwaiwai

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!


This README was generated with ā¤ļø by readme-md-generator