Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

移动校园 JS-SDK 使用说明

移动校园 JS-SDK 旨在为iframe、独立webview(iab) 形式集成入移动校园的h5应用, 提供简单、快速, 包含授权用户token、拍照、扫码、获取定位信息等API能力.

Tips: 以上API能力均需h5应用被APP授权验证.

参考资源:

快速集成

安装:

请在 <head> 标签中添加 sdk <script> (请查看最近的sdk发行版)


<script src="https://gitee.com/lantu/mc-sdk-insight-public/raw/v2.0.1/mc-sdk.2.0.1.js?appkey=9f46f04c"></script>

示例

注: appkey 需要你联系相关项目经理, 提供你网页应用所在的url源(location.origin), 进行申请.



使用:

((MCK) => {

	MCK.ready(MCReady);

	function MCReady(sdk){

		// 验证通过回调, 此处可以放心调用API
		// 这里 sdk 即是 MCK
		// MCK === sdk, 为true

		// 调用通信 API
		sdk.h5.call("getUserInfo", function(userData){
			// userData 为APP中传入的 用户数据
			console.log(JSON.stringify(userData));
		});

	}

})(window.MCK);

更多 API, 请查看 Wiki 文档

Comments ( 0 )

Sign in for post a comment

About

js-SDK @LantuMobileCampus Hybrid spread retract
JavaScript and 3 more languages
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more