1.0.11 • Published 3 years ago

@cnwangzd/m3js v1.0.11

Weekly downloads
14
License
MIT
Repository
github
Last release
3 years ago

m3js

JavaScript library for M³ platform.The aim of the project is to create an easy to use, tool library with M³ platform.

Features

app

setAppAsHome
setAppAsHomeForAllUser
setTitle

Connect

Init

Dfs

dfsNew

dfsDelete

dfsRename

dfsUpdateAttr

Consolelog

consolelogTrace

consolelogDelete

consolelogTruncate

Job

Rule

ruleGet
ruleAdd

User

Install

npm install @cnwangzd/m3js

Usage

import

const m3 = require("@cnwangzd/m3js");
Vue.prototype.m3 = m3;

connect

if(process.env.NODE_ENV === "development"){

    this.m3.connect(http/https, address, port, company, username, password).then(()=>{
        // app
    }).catch((err)=>{
        console.log(err);
    });
  
} else {
  this.m3.init();
  // app
}

call api

    # no input param
    this.m3.callFS("/matrix/eventConsole/getEventList.js").then( (res)=>{
        console.log(res)
    }).catch( (err)=>{
        console.error(err)
    } );

    # input param
    let param = encodeURIComponent(JSON.stringify({term:'m3'}));
    this.m3.callFS("/matrix/eventConsole/getEventList.js", param).then( (res)=>{
        console.log(res)
    }).catch( (err)=>{
        console.error(err)
    } );
1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago