GithubHelp home page GithubHelp logo

apicloudmodule's Introduction

APICloudModule

免费的APICloud 自定义模块集群

  • moduleAppInfo
  • moduleCustomWebView
  • moduleRhymingVoice
  • moduleScanner
  • moduleVibration
  • modulechoosepicture
  • moduleWXMiniProgramPay

moduleAppInfo

获取Android手机应用列表

var moduleAppInfo;

function apiready() {
  moduleAppInfo = api.require('moduleAppInfo');
}

function startRecord() {
  moduleAppInfo.appinfo({},function(ret,err){
    //ret返回AppInifo列表
  });
}

moduleCustomWebView

自定义应用内打开网页

var moduleCustomWebView;

function apiready() {
  moduleCustomWebView = api.require('moduleCustomWebView');
}

function startRecord() {
  moduleCustomWebView.openWebView({
    url:'http://www.baidu.com',//打开Web页url
		isShowNavigation:false, //是否显示标题栏
		isShowBackItem:true, // 是否显示返回按钮
		title:'标题', // 栏标题文字
  },function(ret,err){
    
  });
}

moduleRhymingVoice

监听手机音乐音量频率

var moduleRhymingVoice;

function apiready() {
  moduleRhymingVoice = api.require('moduleRhymingVoice');
}

function startRecord() {
  moduleRhymingVoice.startRecord({},function(ret,err){
    
  });
}

moduleScanner

自定义扫一扫二维码、条形码

var moduleScanner;

function apiready() {
  moduleScanner = api.require('moduleScanner');
}

function scanHandle() {
  moduleScanner.scanHandle({
    isLight:true,//是否打开闪光灯
    cancelText:"Cancel",//设置取消按钮文字
    cancelColor:"000000",//设置取消按钮颜色
    scanPrompt:"请将二维码放入扫描框内"
  },function(ret,err){
    
  });
}

moduleVibration

手机振动

var moduleVibration;

function apiready() {
  moduleVibration = api.require('moduleVibration');
}

function vibrationHandle() {
  moduleVibration.vibrationHandle({
    time:3000 //振动3s,time参数只对android有效
  },function(ret,err){
    
  });
}

modulechoosepicture

手机相册多图、视频选择

var moduleGetPicture;

function choosePicture(){
    moduleGetPicture.getPictureHandle({
        maximages:"6", //最多只能选6张图片
        targetWidth:"800",//限制图片的宽度
        targetHeight:"1024",//限制图片的高度
    },function(ret,err){
    	//反回结束 {code:"1",images:[“imageURL1","imageURL2"]}
    });
}

function apiready() {
    moduleGetPicture = api.require('GetPicture');
}

moduleWXMiniProgramPay

微信小程序支付

var huijuPayModule;
function apiready() {
    huijuPayModule= api.require('huijuPayModule');
}

//微信小程序支付
function pay(){
			huijuPayModule.toSmall({
						   userName:'gh_*****',
						   payee_name:'商品名称',
						   original_id:'gh_268a4c909296',
                           product_name:'网上购物-*****',//商品名称
                           order_amout:'0.01',
                           app_id:'52642300', //APPID
                           trx_no:'6436354011324773',
                           order_no:'345456341315282'
			},function(ret,err){
				var msg = "点击了第个按钮";
				api.toast({
					msg:msg
				});
			});
		}

//内置微信分享
huijuPayModule.openWebView({
						   url:'http://www.baidu.com',
						   isShowNavigation:false,
						   isShowBackItem:true,
						   title:'helloworld',
			},function(ret,err){

			});

如果您需要自定义APICloud模块,请咨询QQ:1274336210 或微信:DeqiuTseng

其它问题欢迎加入我的QQ技术交流群:474691105

apicloudmodule's People

Contributors

deqiutseng avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.