(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iot=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var ALIYUN_BROKER_METHODS_TEMPLATE=exports.ALIYUN_BROKER_METHODS_TEMPLATE={POST_PROPERY:"thing.event.property.post",POST_EVENT:"thing.event.%s.post",POST_TAGS:"thing.deviceinfo.update",DELETE_TAGS:"thing.deviceinfo.delete",GET_CONFIG:"thing.config.get",ADD_TOPO:"thing.topo.add",DELETE_TOPO:"thing.topo.delete",GET_TOPO:"thing.topo.get",SUBDEVICE_REGISTER:"thing.sub.register"};var ALIYUN_BROKER_TOPICS=exports.ALIYUN_BROKER_TOPICS={SERVICE_TOPIC:"/sys/%s/%s/thing/service/%s",SERVICE_REPLY_TOPIC:"/sys/%s/%s/thing/service/%s_reply",PROPERTY_POST_TOPIC:"/sys/%s/%s/thing/event/property/post",PROPERTY_POST_REPLY_TOPIC:"/sys/%s/%s/thing/event/property/post_reply",EVENT_WILDCARD_TOPIC:"/sys/%s/%s/thing/event/#",EVENT_POST_TOPIC:"/sys/%s/%s/thing/event/%s/post",EVENT_POST_REPLY_TOPIC:"/sys/%s/%s/thing/event/%s/post_reply",REPORT_SDK_INFO_TOPIC:"/sys/%s/%s/thing/deviceinfo/update",TAG_TOPIC:"/sys/%s/%s/thing/deviceinfo/update",TAG_REPLY_TOPIC:"/sys/%s/%s/thing/deviceinfo/update_reply",TAG_DELETE_TOPIC:"/sys/%s/%s/thing/deviceinfo/delete",TAG_DELETE_REPLY_TOPIC:"/sys/%s/%s/thing/deviceinfo/delete_reply",CONFIG_WILDCARD_TOPIC:"/sys/%s/%s/thing/config/#",CONFIG_TOPIC:"/sys/%s/%s/thing/config/get",CONFIG_REPLY_TOPIC:"/sys/%s/%s/thing/config/get_reply",CONFIG_SUBSCRIBE_TOPIC:"/sys/%s/%s/thing/config/push",CONFIG_SUBSCRIBE_RESP_TOPIC:"/sys/%s/%s/thing/config/push_reply",SHADOW_SUBSCRIBE_TOPIC:"/shadow/get/%s/%s",SHADOW_GET_TOPIC:"/shadow/update/%s/%s",SHADOW_POST_TOPIC:"/shadow/update/%s/%s",RRPC_REQ_TOPIC:"/sys/%s/%s/rrpc/request/+",RRPC_RESP_TOPIC:"/sys/%s/%s/rrpc/response/%s",ADD_TOPO_TOPIC:"/sys/%s/%s/thing/topo/add",ADD_TOPO_REPLY_TOPIC:"/sys/%s/%s/thing/topo/add_reply",DELETE_TOPO_TOPIC:"/sys/%s/%s/thing/topo/delete",DELETE_TOPO_REPLY_TOPIC:"/sys/%s/%s/thing/topo/delete_reply",GET_TOPO_TOPIC:"/sys/%s/%s/thing/topo/get",GET_TOPO_REPLY_TOPIC:"/sys/%s/%s/thing/topo/get_reply",LOGIN_TOPIC:"/ext/session/%s/%s/combine/login",LOGIN_REPLY_TOPIC:"/ext/session/%s/%s/combine/login_reply",LOGOUT_TOPIC:"/ext/session/%s/%s/combine/logout",LOGOUT_REPLY_TOPIC:"/ext/session/%s/%s/combine/logout_reply",SUBDEVICE_REGISTER_TOPIC:"/sys/%s/%s/thing/sub/register",SUBDEVICE_REGISTER_REPLY_TOPIC:"/sys/%s/%s/thing/sub/register_reply"}},{}],2:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Thing=require("./thing");var Device=function(_Thing){_inherits(Device,_Thing);function Device(){var config=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Device);var _this=_possibleConstructorReturn(this,(Device.__proto__||Object.getPrototypeOf(Device)).call(this,config));_this._createClient(_this.model);_this._subscribeClientEvent();return _this}return Device}(Thing);module.exports=Device},{"./thing":7}],3:[function(require,module,exports){"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined}else{return get(parent,property,receiver)}}else if("value"in desc){return desc.value}else{var getter=desc.get;if(getter===undefined){return undefined}return getter.call(receiver)}};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Thing=require("./thing");var SubDevice=require("./subdevice");var _require=require("./utils"),createDebug=_require.createDebug,signUtil=_require.signUtil,tripleExpectNotNull=_require.tripleExpectNotNull,tripleIgnoreCase=_require.tripleIgnoreCase,mqttMatch=_require.mqttMatch,mqttNotMatch=_require.mqttNotMatch;var debug=createDebug("gateway");var Gateway=function(_Thing){_inherits(Gateway,_Thing);function Gateway(config){_classCallCheck(this,Gateway);var _this=_possibleConstructorReturn(this,(Gateway.__proto__||Object.getPrototypeOf(Gateway)).call(this,config));_this._createClient(_this.model);_this._subscribeClientEvent();_this.subDevices=[];debug("debugger mode");return _this}_createClass(Gateway,[{key:"addTopo",value:function addTopo(devices,cb){var signed=devices.map(function(device){return signUtil(device)});this._publishAlinkMessage({method:this.model.ADD_TOPO_METHOD,pubTopic:this.model.ADD_TOPO_TOPIC,params:signed},cb)}},{key:"getTopo",value:function getTopo(cb){this._publishAlinkMessage({method:this.model.GET_TOPO_METHOD,pubTopic:this.model.GET_TOPO_TOPIC,params:{}},cb)}},{key:"removeTopo",value:function removeTopo(devices,cb){this._publishAlinkMessage({method:this.model.DELETE_TOPO_METHOD,pubTopic:this.model.DELETE_TOPO_TOPIC,params:devices},cb)}},{key:"login",value:function login(device,cb){var _this2=this;tripleIgnoreCase(device);tripleExpectNotNull(device);var subDevice=new SubDevice(device,this);this._addSubDevices(subDevice);this._publishAlinkMessage({params:signUtil(device),pubTopic:this.model.LOGIN_TOPIC},function(resp){cb(resp);if(resp.code===200){_this2._subscribePresetTopic(subDevice);subDevice.emit("connect")}else{subDevice.emit("error",resp)}});return subDevice}},{key:"logout",value:
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 课程设计 基于嵌入式阿里云物联网平台的微信小程序源码+详细文档+全部资料(优秀项目).zip 【备注】 1、该项目是个人高分项目源码,已获导师指导认可通过,答辩评审分达到95分 2、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 3、本项目适合计算机相关专业(如软件工程、计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载使用,也可作为毕业设计、课程设计、作业、项目初期立项演示等,当然也适合小白学习进阶。 4、如果基础还行,可以在此代码基础上进行修改,以实现其他功能,也可直接用于毕设、课设、作业等。 欢迎下载,沟通交流,互相学习,共同进步!
资源推荐
资源详情
资源评论
收起资源包目录
课程设计 基于嵌入式阿里云物联网平台的微信小程序源码+详细文档+全部资料(优秀项目).zip (29个子文件)
Wechat-Ali_IoT-main
sitemap.json 201B
project.private.config.json 325B
pages
index
index.wxml 5KB
index.js 8KB
index.json 27B
index.wxss 462B
.eslintrc.js 587B
app.json 313B
project.config.json 1KB
app.js 18B
utils
alibabacloud-iot-device-sdk.min.js 645KB
model.json 605B
util.js 474B
app.wxss 2KB
package.json 108B
colorui
components
cu-custom.json 48B
cu-custom.js 857B
cu-custom.wxml 859B
cu-custom.wxss 39B
main.wxss 63KB
animation.wxss 3KB
icon.wxss 70KB
package-lock.json 16KB
.gitignore 145B
images
Bg.png 242KB
tabbar
plugin.png 2KB
basics.png 3KB
plugin_cur.png 4KB
171265889347208773632.zip 416B
共 29 条
- 1
资源评论
不走小道
- 粉丝: 3223
- 资源: 5113
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功