├── README.md ├── WebContent ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── lib │ │ ├── aopalliance-1.0.jar │ │ ├── aspectj-1.6.12.jar │ │ ├── aspectjweaver-1.6.2.jar │ │ ├── cglib-nodep-2.2.3.jar │ │ ├── commons-dbcp-1.4.jar │ │ ├── commons-fileupload-1.2.1.jar │ │ ├── commons-io-1.3.1.jar │ │ ├── commons-logging-1.1.1.jar │ │ ├── commons-pool-1.6.jar │ │ ├── fastjson-1.2.6.jar │ │ ├── jackson-annotations-2.7.3.jar │ │ ├── jackson-core-2.7.3.jar │ │ ├── jackson-databind-2.7.3.jar │ │ ├── jsqlparser-0.9.4.jar │ │ ├── jstl-1.2.jar │ │ ├── log4j-1.2.16.jar │ │ ├── mybatis-3.2.6.jar │ │ ├── mybatis-spring-1.1.1.jar │ │ ├── mysql-connector-java-5.1.20-bin.jar │ │ ├── org.eclipse.paho.client.mqttv3-1.2.0.jar │ │ ├── pagehelper-4.1.6.jar │ │ ├── slf4j-api-1.6.1.jar │ │ ├── slf4j-log4j12-1.6.1.jar │ │ ├── spring-aop-4.1.4.RELEASE.jar │ │ ├── spring-aspects-4.1.4.RELEASE.jar │ │ ├── spring-beans-4.1.4.RELEASE.jar │ │ ├── spring-context-4.1.4.RELEASE.jar │ │ ├── spring-context-support-4.1.4.RELEASE.jar │ │ ├── spring-core-4.1.4.RELEASE.jar │ │ ├── spring-expression-4.1.4.RELEASE.jar │ │ ├── spring-instrument-4.1.4.RELEASE.jar │ │ ├── spring-instrument-tomcat-4.1.4.RELEASE.jar │ │ ├── spring-jdbc-4.1.4.RELEASE.jar │ │ ├── spring-jms-4.1.4.RELEASE.jar │ │ ├── spring-messaging-4.1.4.RELEASE.jar │ │ ├── spring-orm-4.1.4.RELEASE.jar │ │ ├── spring-oxm-4.1.4.RELEASE.jar │ │ ├── spring-test-4.1.4.RELEASE.jar │ │ ├── spring-tx-4.1.4.RELEASE.jar │ │ ├── spring-web-4.1.4.RELEASE.jar │ │ ├── spring-webmvc-4.1.4.RELEASE.jar │ │ ├── spring-websocket-4.1.4.RELEASE.jar │ │ └── standard-1.1.2.jar │ ├── springmvc-servlet.xml │ └── web.xml ├── client │ └── client.jsp ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── layui.css │ └── seekBar.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ └── smartHome.jpg ├── index.jsp ├── js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── echarts.min.js │ ├── jquery-3.2.1.min.js │ ├── layui.all.js │ ├── npm.js │ └── seekBar.js ├── layui │ ├── css │ │ ├── global.css │ │ ├── layui.css │ │ ├── layui.mobile.css │ │ └── modules │ │ │ ├── code.css │ │ │ ├── laydate │ │ │ └── default │ │ │ │ └── laydate.css │ │ │ └── layer │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 8.gif │ │ │ └── 9.gif │ ├── lay │ │ └── modules │ │ │ ├── carousel.js │ │ │ ├── code.js │ │ │ ├── element.js │ │ │ ├── flow.js │ │ │ ├── form.js │ │ │ ├── jquery.js │ │ │ ├── laydate.js │ │ │ ├── layedit.js │ │ │ ├── layer.js │ │ │ ├── laypage.js │ │ │ ├── laytpl.js │ │ │ ├── mobile.js │ │ │ ├── table.js │ │ │ ├── tree.js │ │ │ ├── upload.js │ │ │ └── util.js │ ├── layui.all.js │ └── layui.js ├── login.jsp ├── menu.jsp ├── server │ └── server.jsp └── top.jsp └── src ├── applicationContext.xml ├── com └── ssm │ ├── client │ ├── controller │ │ └── ClientController.java │ ├── mapper │ │ ├── ClientMapper.java │ │ └── ClientMapper.xml │ └── service │ │ ├── IClientService.java │ │ └── impl │ │ └── ClientServiceImpl.java │ ├── mqtt │ ├── MessageHandUtil.java │ ├── MqttConsumer.java │ ├── MqttProducer.java │ └── SubscribeTopicThread.java │ ├── server │ ├── controller │ │ └── ServerController.java │ ├── mapper │ │ ├── ServerMapper.java │ │ └── ServerMapper.xml │ └── service │ │ ├── IServerService.java │ │ └── impl │ │ └── ServerServiceImpl.java │ └── util │ ├── DateUtliTools.java │ ├── JsonUtil.java │ ├── RunStart.java │ ├── SpringUtil.java │ └── StringUtil.java └── log4j.properties /README.md: -------------------------------------------------------------------------------- 1 | # smartHome 2 | 智能家居,毕业设计,课程设计,物联网,MQTT,JavaWeb 3 | 4 | ## 开发环境 5 | jdk1.8+tomcat8.5+mysql5.7 6 | 7 | ## 项目介绍 8 | 实现一个web应用,作为智能家居系统的服务端,接收来自客户端的数据,并能够通过web页面实时显示室内传感器的值,可以使用文本,建议使用曲线图;实现一个物联网客户端,模拟各种设备。客户端产生数据,发送至服务器,服务器根据协议对数据作出处理。 9 | 需要模拟的设备有: 10 | 温度传感器:数量1,采集房间温度信息。 11 | 湿度传感器:数量1,采集房间湿度信息。 12 | 空调:数量1,可以根据服务器发来的指令进行调节模式(制冷、制热、送风)、设置温度、风速;还可以根据服务器的指令上传子自己的当前状态:模式、温度、风速。 13 | 灯光:数量4,两盏只能开关,两盏调光模式,调光范围0到100。 14 | 门窗磁:可以根据服务器发来的指令打开或者关闭窗户。 15 | 要求: 16 | 1、设计通信协议完成数据的双向传输,应用层协议应包含首部和数据部分。 17 | 2、数据传输方式使用mqtt协议,需要安装EMQ消息服务器。 18 | 3、系统支持多客户端接入,在协议设计上能够区分来自不同客户端的消息,能够针对不同家庭进行控制设备。 19 | 20 | 21 | ## 开始使用 22 | 将项目导入eclipse后 23 | 修改文件src/applicationContext.xml 24 | ```sh 25 | 26 | 27 | 28 | 29 | 30 | 31 | ``` 32 | 放入tomcat运行即可 33 | 34 | ## 安装EMQX 35 | https://docs.emqx.io/broker/latest/cn/getting-started/install.html 36 | ## 关注公众号【HelloWeb烟梦网络】留言问题,及时为你解答。回复项目编号【2】,可获取数据库。 37 | ## 效果展示 38 | 39 | ![Image text](https://github.com/ytu-shh/images/blob/master/smartHome/client.png?raw=true) 40 | ![Image text](https://github.com/ytu-shh/images/blob/master/smartHome/server1.png?raw=true) 41 | ![Image text](https://github.com/ytu-shh/images/blob/master/smartHome/server2.png?raw=true) 42 | ![Image text](https://github.com/ytu-shh/images/blob/master/smartHome/server3.png?raw=true) 43 | ![Image text](https://github.com/ytu-shh/images/blob/master/smartHome/server4.png?raw=true) 44 | ![Image text](https://github.com/ytu-shh/images/blob/master/smartHome/emqx2.png?raw=true) 45 | 46 | -------------------------------------------------------------------------------- /WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/aopalliance-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/aopalliance-1.0.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/aspectj-1.6.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/aspectj-1.6.12.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/aspectjweaver-1.6.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/aspectjweaver-1.6.2.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/cglib-nodep-2.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/cglib-nodep-2.2.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-dbcp-1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/commons-dbcp-1.4.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-io-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/commons-io-1.3.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/commons-pool-1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/commons-pool-1.6.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/fastjson-1.2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/fastjson-1.2.6.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jackson-annotations-2.7.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/jackson-annotations-2.7.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jackson-core-2.7.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/jackson-core-2.7.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jackson-databind-2.7.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/jackson-databind-2.7.3.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jsqlparser-0.9.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/jsqlparser-0.9.4.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/log4j-1.2.16.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/log4j-1.2.16.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/mybatis-3.2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/mybatis-3.2.6.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/mybatis-spring-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/mybatis-spring-1.1.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/mysql-connector-java-5.1.20-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/mysql-connector-java-5.1.20-bin.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/org.eclipse.paho.client.mqttv3-1.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/org.eclipse.paho.client.mqttv3-1.2.0.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/pagehelper-4.1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/pagehelper-4.1.6.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/slf4j-api-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/slf4j-api-1.6.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/slf4j-log4j12-1.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/slf4j-log4j12-1.6.1.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-aop-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-aop-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-aspects-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-aspects-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-beans-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-beans-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-context-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-context-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-context-support-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-context-support-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-core-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-core-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-expression-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-expression-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-instrument-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-instrument-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-instrument-tomcat-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-instrument-tomcat-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-jdbc-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-jdbc-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-jms-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-jms-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-messaging-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-messaging-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-orm-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-orm-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-oxm-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-oxm-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-test-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-test-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-tx-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-tx-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-web-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-web-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-webmvc-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-webmvc-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/spring-websocket-4.1.4.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/spring-websocket-4.1.4.RELEASE.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/standard-1.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/WEB-INF/lib/standard-1.1.2.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/springmvc-servlet.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | 41 | 43 | 44 | 45 | application/json;charset=UTF-8 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | smartHome 7 | 8 | index.jsp 9 | 10 | 11 | 12 | springmvc 13 | org.springframework.web.servlet.DispatcherServlet 14 | 15 | 16 | springmvc 17 | *.do 18 | 19 | 20 | 21 | init 22 | com.ssm.util.RunStart 23 | 1 24 | 25 | 26 | 27 | CharacterEncodingFilter 28 | org.springframework.web.filter.CharacterEncodingFilter 29 | 30 | encoding 31 | UTF-8 32 | 33 | 34 | 35 | CharacterEncodingFilter 36 | /* 37 | 38 | -------------------------------------------------------------------------------- /WebContent/client/client.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | <% 3 | String contextPath = request.getContextPath(); 4 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 5 | + contextPath + "/"; 6 | 7 | %> 8 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 9 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 10 | 11 | 12 | 13 | 智能家居 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | 37 |
38 |
39 | 42 |
43 |
44 |
45 | 46 | 64 |
65 |
66 | 67 | 68 |
69 |
70 |
72 | 设备控制 73 |
74 |
75 | 76 |
77 | 81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | 温度当前温度: 89 | 90 |
91 |
92 |
93 | 94 |
95 | 96 |
97 | 98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | 湿度当前湿度:% 106 | 107 |
108 |
109 |
110 | 111 |
112 | 113 |
114 | 115 |
116 |
117 |
118 |
119 | 120 |
121 |
122 |
123 | 124 |
当前状态: 125 | 开/关:     126 | 模式:     127 | 风速:     128 | 温度:℃ 129 |
130 |
131 |
132 | 133 |
134 |
135 |
136 | 137 |
当前状态: 138 | 139 |
140 |
141 |
142 | 143 |
144 |
145 |
146 | 147 |
148 | 当前亮度 : 149 |
150 |
151 |
152 | 153 |
154 |
155 |
156 | 157 |
当前亮度 :
158 |
159 |
160 | 161 |
162 |
163 |
164 | 165 |
166 | 当前状态: 167 |
168 |
169 |
170 | 171 |
172 |
173 | 174 |
175 |
当前状态 :
176 |
177 |
178 |
179 |
180 |
181 |
182 | 183 | 184 | 187 | 188 | 189 | 193 |
194 | 416 | 417 | 418 | -------------------------------------------------------------------------------- /WebContent/css/seekBar.css: -------------------------------------------------------------------------------- 1 | /*当前未拖动进度条显示样式 */ 2 | .barProgress { 3 | display: inline-block; 4 | width: 200px; 5 | height: 10px; 6 | background: #ddd; 7 | border-radius: 4px; 8 | position: relative; 9 | } 10 | 11 | /*拖动按钮样式 */ 12 | .oldBar { 13 | display: inline-block; 14 | width: 15px; 15 | height: 15px; 16 | border-radius: 50% 50%; 17 | background: #ffffff; 18 | position: absolute; 19 | margin-top: -3px; 20 | cursor: pointer; 21 | box-shadow: 0px 0px 3px #177ad8; 22 | } 23 | 24 | /*拖动后进度条样式*/ 25 | .newBar { 26 | width: 0px; 27 | height: 10px; 28 | background-color: #2d8eff; 29 | border-radius: 4px; 30 | } 31 | 32 | /*显示拖动百分数的input样式*/ 33 | .barInput { 34 | border: 0px; 35 | width: 40px; 36 | font-size: 16px; 37 | font-weight: 600; 38 | text-align: center; 39 | vertical-align: top; 40 | } -------------------------------------------------------------------------------- /WebContent/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebContent/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebContent/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebContent/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /WebContent/images/smartHome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/images/smartHome.jpg -------------------------------------------------------------------------------- /WebContent/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 5 | + path + "/"; 6 | %> 7 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 8 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 9 | 10 | 11 | 12 | 13 | 14 | 校园即时服务平台 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 | 37 | 57 |
58 |
59 | 60 | 61 |
62 |
63 | 64 | 65 | 68 | 69 | 70 | 74 |
75 | 76 | 86 | 111 | 135 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /WebContent/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /WebContent/js/seekBar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 拖动条 3 | * @param openInput 显示进度数值input的id 4 | * @param openOld 拖动按钮id 5 | * @param openNew 拖动后的进度条id 6 | * @param openProgress 未拖动的进度条id 7 | */ 8 | var seekBar = function(openInput, openOld, openNew, openProgress) { 9 | this.openInput = document.getElementById(openInput); // input显示进度数值 10 | this.openOld = document.getElementById(openOld); // 拖动按钮 11 | this.openNew = document.getElementById(openNew); // 拖动后的进度条 12 | this.openProgress = document.getElementById(openProgress); // 未拖动的进度条 13 | this.initX(); 14 | } 15 | 16 | seekBar.prototype = { 17 | initX : function() { 18 | var xIsfalse = false, xf = this, xm = Math, xb = document.body, minOpen = 0, maxOpen = 100; 19 | // 当进度条上鼠标按下时 20 | xf.openOld.onmousedown = function(e) { 21 | xIsfalse = true; 22 | var X = e.clientX; // 获取当前元素相对于窗口的X左边 23 | var xoffleft = this.offsetLeft; // 当前元素相对于父元素的左边距 24 | var xmax = xf.openProgress.offsetWidth - this.offsetWidth; 25 | // 当鼠标移动时 26 | xb.onmousemove = function(e) { 27 | if (xIsfalse == false) { 28 | return; 29 | } 30 | var changeX = e.clientX; // 在移动的时候获取X坐标 31 | var moveX = xm.min(xmax, xm.max(-2, xoffleft + (changeX - X))); // 超过进度条宽度的取进度条最大宽,未超过按当前移动宽度 32 | xf.openInput.value = xm.round(xm.max(0, moveX / xmax) * 100); 33 | xf.openOld.style.marginLeft = xm.max(0, moveX) + "px"; 34 | xf.openNew.style.width = xm.max(0, moveX) + 10 + "px"; 35 | } 36 | } 37 | // 当鼠标抬起时 38 | xf.openOld.onmouseup = function() { 39 | xIsfalse = false; 40 | } 41 | // 当鼠标抬起时 42 | xb.onmouseup = function() { 43 | xIsfalse = false; 44 | } 45 | /* xf.openProgress.onclick = function(e) { 46 | var offsetX = e.offsetX; 47 | var xm = Math; 48 | offsetX = offsetX - 15 > xf.openProgress.offsetWidth ? xf.openProgress.offsetWidth : offsetX; 49 | xf.openOld.style.marginLeft = offsetX - 7.5 + "px"; 50 | xf.openNew.style.width = offsetX + "px"; 51 | xf.openInput.value = xm.round(xm.max(0, offsetX / xf.openProgress.offsetWidth) * 100); 52 | }*/ 53 | 54 | // input可输入数值,控制进度条 55 | xf.openInput.onblur = function() { 56 | var theV = this.value * 1; 57 | if (!(theV + '') || theV > maxOpen || theV < minOpen) { 58 | alert("输入的数值不正确"); 59 | xf.openInput.value = ""; 60 | xf.openOld.style.marginLeft = "0px"; 61 | xf.openNew.style.width = "0px"; 62 | return; 63 | } 64 | var xxx = theV / 100 * (xf.openProgress.offsetWidth -15); 65 | xf.openOld.style.marginLeft = xxx + "px"; 66 | xf.openNew.style.width = xxx + 10 + "px"; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /WebContent/layui/css/layui.mobile.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /WebContent/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /WebContent/layui/css/modules/laydate/default/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} -------------------------------------------------------------------------------- /WebContent/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /WebContent/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /WebContent/layui/css/modules/layer/default/layer.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} -------------------------------------------------------------------------------- /WebContent/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /WebContent/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /WebContent/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /WebContent/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/font/iconfont.eot -------------------------------------------------------------------------------- /WebContent/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /WebContent/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/font/iconfont.woff -------------------------------------------------------------------------------- /WebContent/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/0.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/1.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/10.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/11.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/12.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/13.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/14.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/15.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/16.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/17.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/18.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/19.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/2.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/20.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/21.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/22.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/23.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/24.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/25.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/26.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/27.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/28.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/29.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/3.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/30.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/31.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/32.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/33.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/34.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/35.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/36.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/37.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/38.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/39.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/4.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/40.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/41.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/42.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/43.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/44.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/45.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/46.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/47.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/48.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/49.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/5.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/50.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/51.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/52.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/53.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/54.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/55.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/56.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/57.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/58.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/59.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/6.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/60.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/61.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/62.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/63.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/64.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/65.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/66.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/67.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/68.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/69.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/7.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/70.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/71.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/8.gif -------------------------------------------------------------------------------- /WebContent/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytu-shh/smartHome/3de02c84a728789f10f40e045c41f3a5973786f5/WebContent/layui/images/face/9.gif -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(i){"use strict";var t=layui.$,a=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var a=this;return t.extend(!0,a.config,i),a},s.prototype.on=function(i,t){return layui.onevent.call(this,e,i,t)},s.prototype.tabAdd=function(i,a){var e=".layui-tab-title",l=t(".layui-tab[lay-filter="+i+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),c='
  • '+(a.title||"unnaming")+"
  • ";return s[0]?s.before(c):n.append(c),o.append('
    '+(a.content||"")+"
    "),y.hideTabMore(!0),y.tabAuto(),this},s.prototype.tabDelete=function(i,a){var e=".layui-tab-title",l=t(".layui-tab[lay-filter="+i+"]"),n=l.children(e),s=n.find('>li[lay-id="'+a+'"]');return y.tabDelete(null,s),this},s.prototype.tabChange=function(i,a){var e=".layui-tab-title",l=t(".layui-tab[lay-filter="+i+"]"),n=l.children(e),s=n.find('>li[lay-id="'+a+'"]');return y.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(i){i=i||{},v.on("click",i.headerElem,function(a){var e=t(this).index();y.tabClick.call(this,a,e,null,i)})},s.prototype.progress=function(i,a){var e="layui-progress",l=t("."+e+"[lay-filter="+i+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",a),s.text(a),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",f="layui-anim layui-anim-upbit",y={tabClick:function(i,a,s,o){o=o||{};var c=s||t(this),a=a||c.parent().children("li").index(c),r=o.headerElem?c.parent():c.parents(".layui-tab").eq(0),u=o.bodyElem?t(o.bodyElem):r.children(".layui-tab-content").children(".layui-tab-item"),d=c.find("a"),h=r.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(c.addClass(l).siblings().removeClass(l),u.eq(a).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+h+")",{elem:r,index:a})},tabDelete:function(i,a){var n=a||t(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),c=o.children(".layui-tab-content").children(".layui-tab-item"),r=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?y.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&y.tabClick.call(n.prev()[0],null,s-1)),n.remove(),c.eq(s).remove(),setTimeout(function(){y.tabAuto()},50),layui.event.call(this,e,"tabDelete("+r+")",{elem:o,index:s})},tabAuto:function(){var i="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;t(".layui-tab").each(function(){var s=t(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=t('');if(n===window&&8!=a.ie&&y.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=t(this);if(!i.find("."+l)[0]){var a=t('');a.on("click",y.tabDelete),i.append(a)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(r),s.attr("overflow",""),r.on("click",function(t){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(i){var a=t(".layui-tab-title");i!==!0&&"tabmore"===t(i.target).attr("lay-stope")||(a.removeClass("layui-tab-more"),a.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=t(this),a=i.parents(o),n=a.attr("lay-filter"),s=i.find("a"),c="string"==typeof i.attr("lay-unselect");i.find("."+d)[0]||("javascript:;"!==s.attr("href")&&"_blank"===s.attr("target")||c||(a.find("."+l).removeClass(l),i.addClass(l)),layui.event.call(this,e,"nav("+n+")",i))},clickChild:function(){var i=t(this),a=i.parents(o),n=a.attr("lay-filter");a.find("."+l).removeClass(l),i.addClass(l),layui.event.call(this,e,"nav("+n+")",i)},showChild:function(){var i=t(this),a=i.parents(o),e=i.parent(),l=i.siblings("."+d);a.hasClass(u)&&(l.removeClass(f),e["none"===l.css("display")?"addClass":"removeClass"](c+"ed"))},collapse:function(){var i=t(this),a=i.find(".layui-colla-icon"),l=i.siblings(".layui-colla-content"),s=i.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),c="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var r=s.children(".layui-colla-item").children("."+n);r.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),r.removeClass(n)}l[c?"addClass":"removeClass"](n),a.html(c?"":""),layui.event.call(this,e,"collapse("+o+")",{title:i,content:l,show:c})}};s.prototype.init=function(i,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){y.tabAuto.call({})},nav:function(){var i=200,e={},s={},p={},v=function(l,o,c){var r=t(this),y=r.find("."+d);o.hasClass(u)?l.css({top:r.position().top,height:r.children("a").height(),opacity:1}):(y.addClass(f),l.css({left:r.position().left+parseFloat(r.css("marginLeft")),top:r.position().top+r.height()-l.height()}),e[c]=setTimeout(function(){l.css({width:r.width(),opacity:1})},a.ie&&a.ie<10?0:i),clearTimeout(p[c]),"block"===y.css("display")&&clearTimeout(s[c]),s[c]=setTimeout(function(){y.addClass(n),r.find("."+h).addClass(h+"d")},300))};t(o+l).each(function(a){var l=t(this),o=t(''),f=l.find("."+c);l.find("."+r)[0]||(l.append(o),f.on("mouseenter",function(){v.call(this,o,l,a)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[a]),s[a]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+h).removeClass(h+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[a]),p[a]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},i)})),f.each(function(){var i=t(this),a=i.find("."+d);if(a[0]&&!i.find("."+h)[0]){var e=i.children("a");e.append('')}i.off("click",y.clickThis).on("click",y.clickThis),i.children("a").off("click",y.showChild).on("click",y.showChild),a.children("dd").off("click",y.clickChild).on("click",y.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";t(i+l).each(function(){var i=t(this),a="lay-separator",e=i.attr(a)||"/",l=i.find("a");l.next("span["+a+"]")[0]||(l.each(function(i){i!==l.length-1&&t(this).after(""+e+"")}),i.css("visibility","visible"))})},progress:function(){var i="layui-progress";t("."+i+l).each(function(){var a=t(this),e=a.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),a.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var i="layui-collapse";t("."+i+l).each(function(){var i=t(this).find(".layui-colla-item");i.each(function(){var i=t(this),a=i.find(".layui-colla-title"),e=i.find(".layui-colla-content"),l="none"===e.css("display");a.find(".layui-colla-icon").remove(),a.append(''+(l?"":"")+""),a.off("click",y.collapse).on("click",y.collapse)})})}};return s[i]?s[i]():layui.each(s,function(i,t){t()})},s.prototype.render=s.prototype.init;var p=new s,v=t(document);p.render();var b=".layui-tab-title li";v.on("click",b,y.tabClick),v.on("click",y.hideTabMore),t(window).on("resize",y.tabAuto),i(e,p)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('
    '+d+"
    ");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/form.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",u="layui-disabled",c=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};c.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},c.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},c.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},c.prototype.render=function(e,i){var n=this,c=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=c.find("select"),y=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},h=function(i,c,f){var h=t(this),p=i.find("."+n),m=p.find("input"),k=i.find("dl"),g=k.children("dd");if(!c){var x=function(){var e=i.offset().top+i.outerHeight()+5-v.scrollTop(),t=k.outerHeight();i.addClass(a+"ed"),g.removeClass(o),e+t>v.height()&&e>=t&&i.addClass(a+"up")},b=function(e){i.removeClass(a+"ed "+a+"up"),m.blur(),e||C(m.val(),function(e){e&&(d=k.find("."+s).html(),m&&m.val(d))})};p.on("click",function(e){i.hasClass(a+"ed")?b():(y(e,!0),x()),k.find("."+r).remove()}),p.find(".layui-edge").on("click",function(){m.focus()}),m.on("keyup",function(e){var t=e.keyCode;9===t&&x()}).on("keydown",function(e){var t=e.keyCode;9===t?b():13===t&&e.preventDefault()});var C=function(e,i,a){var n=0;layui.each(g,function(){var i=t(this),l=i.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&i[r?"addClass":"removeClass"](o)});var l=n===g.length;return i(l),l},w=function(e){var t=this.value,i=e.keyCode;return 9!==i&&13!==i&&37!==i&&38!==i&&39!==i&&40!==i&&(C(t,function(e){e?k.find("."+r)[0]||k.append('

    无匹配项

    '):k.find("."+r).remove()},"keyup"),void(""===t&&k.find("."+r).remove()))};f&&m.on("keyup",w).on("blur",function(t){e=m,d=k.find("."+s).html(),setTimeout(function(){C(m.val(),function(e){d||m.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=h.attr("lay-filter");return!e.hasClass(u)&&(e.hasClass("layui-select-tips")?m.val(""):(m.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),h.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:h[0],value:a,othis:i}),b(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",y).on("click",y)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),c=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),y=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var v="string"==typeof r.attr("lay-search"),p=y?y.value?i:y.innerHTML||i:i,m=t(['
    ','
    ','
    ','
    '+function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
    "+a.label+"
    "):t.push('
    '+a.innerHTML+"
    "):t.push('
    '+(a.innerHTML||i)+"
    ")}),0===t.length&&t.push('
    没有选项
    '),t.join("")}(r.find("*"))+"
    ","
    "].join(""));o[0]&&o.remove(),r.after(m),h.call(this,m,c,v)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=c.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var c=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+c[0]),f=t(['
    ',{_switch:""+((n.checked?s[0]:s[1])||"")+""}[r]||(n.title.replace(/\s/g,"")?""+n.title+"":"")+''+(r?"":"")+"","
    "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,c)})},radio:function(){var e="layui-form-radio",i=["",""],a=c.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,u=n.parents(r),c=n.attr("lay-filter"),d=u.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+c+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var c=t(['
    ',''+i[l.checked?0:1]+"","
    "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
    ","
    "].join(""));r.after(c),n.call(this,c)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",u={},c=e.parents(r),d=c.find("*[lay-verify]"),y=e.parents("form")[0],v=c.find("input,select,textarea"),h=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),u=r.attr("lay-verify").split("|"),c=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(u,function(e,t){var u,f="",y="function"==typeof a[t];if(a[t]){var u=y?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],u)return"tips"===c?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===c?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(v,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(u[t.name]=t.value)}}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:u})},f=new c,y=t(document),v=t(window);f.render(),y.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),y.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/layedit.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("#"+t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
    ','
    '+f+"
    ",'
    ','',"
    ","
    "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

    ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

    "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

    "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

    "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'"}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['"].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
      '),s=o(["
    • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
    • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
      '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
      ',"
      "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(f)||(e.elemFile.wrap(a),t.elem.next("."+f).append(function(){var e=[];return layui.each(t.data,function(i,t){e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){r.append(e,i)}),i.ajax({url:l.url,type:l.method,data:r,contentType:!1,processData:!1,dataType:"json",success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files}},y=function(){return"choose"===t?l.choose&&l.choose(g):(l.before&&l.before(g),a.ie?a.ie>9?u():c():void u())};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?Math.floor(t)+(t%1>0?t.toFixed(1):0)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); -------------------------------------------------------------------------------- /WebContent/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,o,a="layui-fixbar",r="layui-fixbar-top",n=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['
        ',e.bar1?'
      • '+c[0]+"
      • ":"",e.bar2?'
      • '+c[1]+"
      • ":"",'
      • '+c[2]+"
      • ","
      "].join("")),s=g.find("."+r),u=function(){var t=n.scrollTop();t>=e.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&g.css(e.css),l.append(g),u(),g.find("li").on("click",function(){var i=t(this),o=i.attr("lay-type");"top"===o&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,o)}),n.on("scroll",function(){clearTimeout(o),o=setTimeout(function(){u()},100)}))},countdown:function(e,t,i){var o=this,a="function"==typeof t,r=new Date(e).getTime(),n=new Date(!t||a?(new Date).getTime():t).getTime(),l=r-n,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var g=setTimeout(function(){o.countdown(e,n+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,g),l<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,o=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>6912e5?(a=new Date(e),o[0][0]=i.digit(a.getFullYear(),4),o[0][1]=i.digit(a.getMonth()+1),o[0][2]=i.digit(a.getDate()),t||(o[1][0]=i.digit(a.getHours()),o[1][1]=i.digit(a.getMinutes()),o[1][2]=i.digit(a.getSeconds())),o[0].join("-")+" "+o[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var o=e.length;o0;r--)if("interactive"===n[r].readyState){e=n[r].src;break}return e||n[o].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",util:"modules/util",flow:"modules/flow",carousel:"modules/carousel",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};o.prototype.cache=n,o.prototype.define=function(e,t){var o=this,r="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(o,r){e(o,r),n.callback[o]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?a.call(o):(o.use(e,a),o)},o.prototype.use=function(e,o,l){function s(e,t){var o="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||o.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*n.timeout/4?a(f+" is not a valid module"):void(n.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),o,l):"function"==typeof o&&o.apply(layui,l)}var y=this,p=n.dir=n.dir?n.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],n.host=n.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(n.modules[f])!function g(){return++m>1e3*n.timeout/4?a(f+" is not a valid module"):void("string"==typeof n.modules[f]&&n.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":n.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||i?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),n.modules[f]=h}return y},o.prototype.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},o.prototype.link=function(e,o,r){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof o&&(r=o);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof o?i:(function p(){return++y>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(c),"width"))?function(){o()}():setTimeout(p,100))}(),i)},n.callback={},o.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},o.prototype.addcss=function(e,t,o){return layui.link(n.dir+"css/"+e,t,o)},o.prototype.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,t(o)},void(o.onerror=function(e){o.onerror=null,n(e)}))},o.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},o.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),o.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},o.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(n.href=e=e.replace(/^#\//,""),e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},o.prototype.data=function(t,n,o){if(t=t||"layui",o=o||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete o[t];n="object"==typeof n?n:{key:n};try{var r=JSON.parse(o[t])}catch(a){var r={}}return"value"in n&&(r[n.key]=n.value),n.remove&&delete r[n.key],o[t]=JSON.stringify(r),n.key?r[n.key]:r}},o.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},o.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),o=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:o("micromessenger")};return t&&!r[t]&&(r[t]=o(t)),r.android=/android/.test(n),r.ios="ios"===r.os,r},o.prototype.hint=function(){return{error:a}},o.prototype.each=function(e,t){var n,o=this;if("function"!=typeof t)return o;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;na?1:r 2 | <% 3 | String path = request.getContextPath(); 4 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 5 | + path + "/"; 6 | %> 7 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 8 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 9 | 10 | 11 | 12 | 13 | 14 | 登录 15 | 16 | 17 | 18 | 19 | 20 | 23 | 25 | 26 | 27 | 28 |
      29 |
      30 | 31 | 32 | 35 | 39 |
      40 | 41 |
      42 |
      43 | 44 | 47 |
      48 |
      49 | 50 | 51 |
      52 | 53 |
      54 |
      55 |
      56 | 63 |
      65 | 登录 66 |
      67 |
      68 |
      69 | 70 |
      71 |
       
      72 |
      73 |
      74 | 输入信息 75 |
      76 |
      77 |
        78 |
      • 普通用户登录
      • 79 |
      • 管理员登录
      • 80 |
      81 |
      82 |
      83 |
      85 | 86 |
      87 | 88 |
      89 | 91 |
      92 |
      93 | 94 |
      95 | 96 |
      97 | 100 |
      101 |
      请务必记住密码
      102 |
      103 | 104 |
      105 | 107 |
      108 | 109 |
      110 |
      111 |
      112 |
      114 | 115 |
      116 | 117 |
      118 | 120 |
      121 |
      122 | 123 |
      124 | 125 |
      126 | 129 |
      130 |
      131 | 132 |
      133 | 135 |
      136 | 137 |
      138 |
      139 |
      140 |
      141 | 142 |
      143 |
      144 |
      145 |
      146 |
      147 |
      148 | 149 | 150 | 153 | 154 | 155 | 159 |
      160 | 161 | 162 | 163 | 164 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /WebContent/menu.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%> 2 | 3 | <%-- --%> 12 | -------------------------------------------------------------------------------- /WebContent/top.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Jacey 4 | Date: 2017/6/30 5 | Time: 9:30 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <% 9 | String path = request.getContextPath(); 10 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 11 | + path + "/"; 12 | %> 13 | <% 14 | String loginUserName = (String)request.getSession().getAttribute("loginUserName"); 15 | if(loginUserName == null){ 16 | loginUserName = URLDecoder.decode(""); 17 | } 18 | %> 19 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 20 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 21 | <%@ page import="java.net.URLDecoder" %> 22 | 23 | 24 |
      25 | <%-- 26 | 30 | --%> 31 |
      32 |
      33 | 34 | 65 | 66 |
      67 |
      68 |
      69 | -------------------------------------------------------------------------------- /src/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | dialect=mysql 38 | reasonable=true 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | 76 | 77 | 78 | 79 | 81 | 82 | 83 | 104857600 84 | 85 | 86 | 4096 87 | 88 | 89 | -------------------------------------------------------------------------------- /src/com/ssm/client/controller/ClientController.java: -------------------------------------------------------------------------------- 1 | package com.ssm.client.controller; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import com.alibaba.fastjson.JSONObject; 13 | import com.ssm.client.service.IClientService; 14 | import com.ssm.mqtt.MqttProducer; 15 | 16 | @Controller 17 | @RequestMapping(value = "client") 18 | public class ClientController { 19 | 20 | @Autowired 21 | IClientService clientService; 22 | 23 | 24 | /** 25 | * 查询所有设备状态和值 26 | * @param paramMap 27 | * @return 28 | */ 29 | @RequestMapping(value = "/queryDeviceValue.do", produces = "application/json;charset=UTF-8") 30 | @ResponseBody 31 | public List> queryDeviceValue(@RequestBody Map paramMap) { 32 | return clientService.queryDeviceValueByHomeId((String) paramMap.get("homeId")); 33 | } 34 | 35 | /** 36 | * 控制设备 37 | * @param paramMap 38 | * @return 39 | */ 40 | @RequestMapping(value = "/controlDevice.do", produces = "application/json;charset=UTF-8") 41 | @ResponseBody 42 | public String controlDevice(@RequestBody Map paramMap) { 43 | String deviceType = (String) paramMap.get("deviceType"); 44 | String homeId = (String) paramMap.get("homeId"); 45 | String deviceId = (String) paramMap.get("deviceId"); 46 | //Topic规则 smartHome/{deviceType}/{homeId}/{deviceId} 47 | String topic = "smartHome/" + deviceType + "/" + homeId + "/" + deviceId; 48 | String message = JSONObject.toJSONString(paramMap.get("instruct")); 49 | MqttProducer.sendMessage(topic, message); 50 | return "success"; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/ssm/client/mapper/ClientMapper.java: -------------------------------------------------------------------------------- 1 | package com.ssm.client.mapper; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface ClientMapper { 7 | /** 8 | * 修改空调值 9 | * @param pramMap 10 | * @return 11 | */ 12 | public int updateAirConditioner(Map pramMap); 13 | 14 | /** 15 | * 修改灯值 16 | * @param pramMap 17 | * @return 18 | */ 19 | public int updateLamp(Map pramMap); 20 | 21 | /** 22 | * 修改门状态 23 | * @param pramMap 24 | * @return 25 | */ 26 | public int updateDoor(Map pramMap); 27 | 28 | /** 29 | * 插入空调值 30 | * @param pramMap 31 | * @return 32 | */ 33 | public int insertAirConditioner(Map pramMap); 34 | 35 | 36 | /** 37 | * 插入灯值 38 | * @param pramMap 39 | * @return 40 | */ 41 | public int insertLamp(Map pramMap); 42 | 43 | 44 | /** 45 | * 插入门状态 46 | * @param pramMap 47 | * @return 48 | */ 49 | public int insertDoor(Map pramMap); 50 | 51 | /** 52 | * 通过家庭编号查询设备值 53 | * @param homeId 54 | * @return 55 | */ 56 | public List> queryDeviceValueByHomeId(String homeId); 57 | } 58 | -------------------------------------------------------------------------------- /src/com/ssm/client/mapper/ClientMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | INSERT INTO airConditioner ( 7 | airConditionerId, 8 | airConditionerMode, 9 | airConditionerDeviceId, 10 | airConditionerTemperature, 11 | airConditionerWindSpeed, 12 | airConditionerUpdateTime 13 | )VALUES( 14 | #{uuId}, 15 | #{airConditionerMode}, 16 | #{deviceId}, 17 | #{airConditionerTemperature}, 18 | #{airConditionerWindSpeed}, 19 | #{time} 20 | ) 21 | 22 | 23 | 24 | UPDATE airConditioner SET 25 | airConditionerStatus = #{airConditionerStatus}, 26 | airConditionerMode = #{airConditionerMode}, 27 | airConditionerTemperature = #{airConditionerTemperature}, 28 | airConditionerWindSpeed = #{airConditionerWindSpeed}, 29 | airConditionerUpdateTime = #{time} 30 | WHERE 31 | airConditionerDeviceId = #{deviceId} 32 | 33 | 34 | 35 | 36 | INSERT INTO lamp ( 37 | lampId, 38 | lampDeviceId, 39 | lampStatus, 40 | lampType, 41 | lampLighting, 42 | lampUpadteTime 43 | )VALUES( 44 | #{uuid}, 45 | #{deviceId}, 46 | #{lampStatus}, 47 | #{lampType}, 48 | #{lampLighting}, 49 | #{time} 50 | ) 51 | 52 | 53 | 54 | UPDATE lamp SET 55 | lampStatus = #{lampStatus}, 56 | lampLighting = #{lampLighting}, 57 | lampUpadteTime = #{time} 58 | WHERE 59 | lampDeviceId = #{deviceId} 60 | 61 | 62 | 63 | INSERT INTO door ( 64 | doorId, 65 | doorDeviceId, 66 | doorStatus, 67 | doorUpdateTime 68 | ) 69 | VALUES( 70 | #{uuid}, 71 | #{deviceId}, 72 | #{doorStatus}, 73 | #{time} 74 | ) 75 | 76 | 77 | 78 | UPDATE door SET doorStatus = #{doorStatus}, doorUpdateTime = #{time} 79 | WHERE doorDeviceId = #{deviceId} 80 | 81 | 82 | 204 | 205 | -------------------------------------------------------------------------------- /src/com/ssm/client/service/IClientService.java: -------------------------------------------------------------------------------- 1 | package com.ssm.client.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface IClientService { 7 | 8 | /** 9 | * 通过家庭编号查询设备值 10 | * @param homeId 11 | * @return 12 | */ 13 | public List> queryDeviceValueByHomeId(String homeId); 14 | 15 | /** 16 | * 修改空调值 17 | * @param pramMap 18 | * @return 19 | */ 20 | public int updateAirConditioner(Map pramMap); 21 | 22 | /** 23 | * 修改灯值 24 | * @param pramMap 25 | * @return 26 | */ 27 | public int updateLamp(Map pramMap); 28 | 29 | /** 30 | * 修改门状态 31 | * @param pramMap 32 | * @return 33 | */ 34 | public int updateDoor(Map pramMap); 35 | 36 | /** 37 | * 插入空调值 38 | * @param pramMap 39 | * @return 40 | */ 41 | public int insertAirConditioner(Map pramMap); 42 | 43 | 44 | /** 45 | * 插入灯值 46 | * @param pramMap 47 | * @return 48 | */ 49 | public int insertLamp(Map pramMap); 50 | 51 | 52 | /** 53 | * 插入门状态 54 | * @param pramMap 55 | * @return 56 | */ 57 | public int insertDoor(Map pramMap); 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/com/ssm/client/service/impl/ClientServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.ssm.client.service.impl; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.ssm.client.mapper.ClientMapper; 10 | import com.ssm.client.service.IClientService; 11 | @Service("clientService") 12 | public class ClientServiceImpl implements IClientService{ 13 | @Autowired 14 | private ClientMapper clientMapper; 15 | 16 | @Override 17 | public int updateAirConditioner(Map pramMap) { 18 | //先看看能否修改成功 19 | int count = clientMapper.updateAirConditioner(pramMap); 20 | //如果修改数量为0,则说明还没有数据,再新增 21 | if (count == 0) { 22 | count = clientMapper.insertAirConditioner(pramMap); 23 | } 24 | return count; 25 | } 26 | 27 | @Override 28 | public int updateLamp(Map pramMap) { 29 | //先看看能否修改成功 30 | int count = clientMapper.updateLamp(pramMap); 31 | //如果修改数量为0,则说明还没有数据,再新增 32 | if (count == 0) { 33 | count = clientMapper.insertLamp(pramMap); 34 | } 35 | return count; 36 | } 37 | 38 | @Override 39 | public int updateDoor(Map pramMap) { 40 | //先看看能否修改成功 41 | int count = clientMapper.updateDoor(pramMap); 42 | //如果修改数量为0,则说明还没有数据,再新增 43 | if (count == 0) { 44 | count = clientMapper.insertDoor(pramMap); 45 | } 46 | return count; 47 | } 48 | 49 | @Override 50 | public int insertAirConditioner(Map pramMap) { 51 | return 0; 52 | } 53 | 54 | @Override 55 | public int insertLamp(Map pramMap) { 56 | // TODO Auto-generated method stub 57 | return 0; 58 | } 59 | 60 | @Override 61 | public int insertDoor(Map pramMap) { 62 | // TODO Auto-generated method stub 63 | return 0; 64 | } 65 | 66 | @Override 67 | public List> queryDeviceValueByHomeId(String homeId) { 68 | return clientMapper.queryDeviceValueByHomeId(homeId); 69 | } 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/com/ssm/mqtt/MessageHandUtil.java: -------------------------------------------------------------------------------- 1 | package com.ssm.mqtt; 2 | /** 3 | * 消息处理 4 | */ 5 | import java.text.MessageFormat; 6 | import java.util.Date; 7 | import java.util.Map; 8 | import java.util.UUID; 9 | 10 | import org.eclipse.paho.client.mqttv3.MqttMessage; 11 | 12 | import com.alibaba.fastjson.JSONObject; 13 | import com.ssm.client.service.IClientService; 14 | import com.ssm.server.service.IServerService; 15 | import com.ssm.util.DateUtliTools; 16 | import com.ssm.util.SpringUtil; 17 | 18 | public class MessageHandUtil { 19 | private static IClientService getClientService() { 20 | return SpringUtil.getBean(IClientService.class); 21 | } 22 | 23 | private static IServerService getServerService() { 24 | return SpringUtil.getBean(IServerService.class); 25 | } 26 | 27 | public static void messageHand(String topic, MqttMessage message) { 28 | try { 29 | String[] topicList = topic.split("/"); 30 | String deviceType = topicList[1]; 31 | String deviceId = topicList[3]; 32 | 33 | Map pramMap = JSONObject.parseObject(new String(message.getPayload())); 34 | pramMap.put("deviceId", deviceId); 35 | pramMap.put("time", DateUtliTools.dateConvertString(DateUtliTools.SIMPLE_15TIME_FORMAT, new Date())); 36 | pramMap.put("uuid", UUID.randomUUID().toString().replace("-", "")); 37 | 38 | if("temperature".equals(deviceType)) { 39 | getServerService().insertTemperature(pramMap); 40 | } 41 | else if("humidity".equals(deviceType)) { 42 | getServerService().insertHumidity(pramMap); 43 | } 44 | else if("airConditioner".equals(deviceType)) { 45 | getClientService().updateAirConditioner(pramMap); 46 | 47 | } 48 | else if("lamp".equals(deviceType)) { 49 | getClientService().updateLamp(pramMap); 50 | } 51 | else if("door".equals(deviceType)) { 52 | getClientService().updateDoor(pramMap); 53 | } 54 | 55 | String theMsg = MessageFormat.format("{0} is arrived for topic {1}.", 56 | new String(message.getPayload()), topic); 57 | System.out.println("收到消息:" + theMsg); 58 | 59 | } catch (Exception e) { 60 | e.printStackTrace(); 61 | return ; 62 | } 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/com/ssm/mqtt/MqttConsumer.java: -------------------------------------------------------------------------------- 1 | package com.ssm.mqtt; 2 | 3 | import java.text.MessageFormat; 4 | import java.util.Date; 5 | import java.util.Map; 6 | import java.util.UUID; 7 | 8 | import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; 9 | import org.eclipse.paho.client.mqttv3.MqttCallback; 10 | import org.eclipse.paho.client.mqttv3.MqttClient; 11 | import org.eclipse.paho.client.mqttv3.MqttConnectOptions; 12 | import org.eclipse.paho.client.mqttv3.MqttException; 13 | import org.eclipse.paho.client.mqttv3.MqttMessage; 14 | import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; 15 | 16 | import com.alibaba.fastjson.JSONObject; 17 | import com.ssm.client.service.IClientService; 18 | import com.ssm.server.service.IServerService; 19 | import com.ssm.util.SpringUtil; 20 | import com.ssm.util.DateUtliTools; 21 | 22 | /** 23 | * mqtt 消息消费者 24 | * 25 | * @author shihonghao01 26 | * sdk文档https://docs.emqx.io/tutorial/latest/cn/client_dev/java.html 27 | */ 28 | public class MqttConsumer { 29 | 30 | /** 31 | * mqtt 订阅topic 32 | */ 33 | public static void subscribeTopic() { 34 | //mqtt消息中间件地址 35 | String broker = "tcp://127.0.0.1:1883"; 36 | //设备id 37 | String clientId = "smartHomeConsumer"; 38 | // Use the memory persistence 39 | MemoryPersistence persistence = new MemoryPersistence(); 40 | 41 | try { 42 | MqttClient sampleClient = new MqttClient(broker, clientId, persistence); 43 | MqttConnectOptions connOpts = new MqttConnectOptions(); 44 | connOpts.setCleanSession(false); 45 | System.out.println("开始连接emqx:" + broker); 46 | sampleClient.connect(connOpts); 47 | System.out.println("完成连接"); 48 | 49 | //Topic规则 smartHome/{deviceType}/{homeId}/{deviceId} 50 | String topic = "smartHome/+/+/+"; 51 | System.out.println("订阅主题:" + topic); 52 | sampleClient.subscribe(topic, 2); 53 | // 54 | sampleClient.setCallback(new MqttCallback() { 55 | public void messageArrived(String topic, MqttMessage message) throws Exception { 56 | //用工具类处理消息,防止抛出异常后,导致连接断开 57 | MessageHandUtil.messageHand(topic, message); 58 | } 59 | 60 | public void deliveryComplete(IMqttDeliveryToken token) { 61 | } 62 | 63 | public void connectionLost(Throwable throwable) { 64 | } 65 | }); 66 | } catch (MqttException me) { 67 | System.out.println("reason:" + me.getReasonCode()); 68 | System.out.println("msg:" + me.getMessage()); 69 | System.out.println("loc:" + me.getLocalizedMessage()); 70 | System.out.println("cause:" + me.getCause()); 71 | System.out.println("excep:" + me); 72 | me.printStackTrace(); 73 | } 74 | 75 | } 76 | 77 | public static void main(String[] args) { 78 | subscribeTopic(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/com/ssm/mqtt/MqttProducer.java: -------------------------------------------------------------------------------- 1 | package com.ssm.mqtt; 2 | 3 | import org.eclipse.paho.client.mqttv3.MqttClient; 4 | import org.eclipse.paho.client.mqttv3.MqttConnectOptions; 5 | import org.eclipse.paho.client.mqttv3.MqttException; 6 | import org.eclipse.paho.client.mqttv3.MqttMessage; 7 | import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; 8 | 9 | /** 10 | * mqtt 生产者 发送消息 11 | * @author shihonghao01 12 | * sdk文档https://docs.emqx.io/tutorial/latest/cn/client_dev/java.html 13 | * 14 | */ 15 | public class MqttProducer { 16 | 17 | /** 18 | * 发送MQTT消息 19 | * @param topic 20 | * @param message 21 | * @return 22 | */ 23 | public static boolean sendMessage(String topic, String message) { 24 | //mqtt消息中间件地址 25 | String broker = "tcp://127.0.0.1:1883"; 26 | //设备id 27 | String clientId = "smartHomeProducer"; 28 | MemoryPersistence persistence = new MemoryPersistence(); 29 | try { 30 | MqttClient sampleClient = new MqttClient(broker, clientId, persistence); 31 | MqttConnectOptions connOpts = new MqttConnectOptions(); 32 | connOpts.setCleanSession(true); 33 | sampleClient.connect(connOpts); 34 | //消息质量 35 | int qos = 2; 36 | //生成 message对象 37 | MqttMessage mqttMessage = new MqttMessage(message.getBytes()); 38 | //设置消息质量 39 | mqttMessage.setQos(qos); 40 | //发送消息 41 | sampleClient.publish(topic, mqttMessage); 42 | 43 | System.out.println("发送消息: topic=" + topic + ", mqttMessage=" + mqttMessage); 44 | //关闭连接 45 | sampleClient.disconnect(); 46 | //关闭资源 47 | sampleClient.close(); 48 | 49 | } catch (MqttException me) { 50 | System.out.println("reason:" + me.getReasonCode()); 51 | System.out.println("msg:" + me.getMessage()); 52 | System.out.println("loc:" + me.getLocalizedMessage()); 53 | System.out.println("cause:" + me.getCause()); 54 | System.out.println("excep:" + me); 55 | me.printStackTrace(); 56 | } 57 | return true; 58 | } 59 | 60 | public static void main(String[] args) { 61 | sendMessage("topic", "123"); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/com/ssm/mqtt/SubscribeTopicThread.java: -------------------------------------------------------------------------------- 1 | package com.ssm.mqtt; 2 | /** 3 | * mqtt 单启线程订阅Topic 4 | * @author shihonghao01 5 | * 6 | */ 7 | public class SubscribeTopicThread extends Thread{ 8 | public void run() { 9 | //多线程使用mqtt消费者订阅Topic 接收消息 10 | MqttConsumer.subscribeTopic(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/com/ssm/server/controller/ServerController.java: -------------------------------------------------------------------------------- 1 | package com.ssm.server.controller; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import com.alibaba.fastjson.JSONObject; 13 | import com.ssm.mqtt.MqttProducer; 14 | import com.ssm.server.service.IServerService; 15 | 16 | @Controller 17 | @RequestMapping(value = "server") 18 | public class ServerController { 19 | 20 | @Autowired 21 | private IServerService serverService; 22 | 23 | /** 24 | * 查询所有设备当前状态和值 25 | * @param paramMap 26 | * @return 27 | */ 28 | @RequestMapping(value = "/queryDeviceValue.do", produces = "application/json;charset=UTF-8") 29 | @ResponseBody 30 | public List> queryDeviceValue(@RequestBody Map paramMap) { 31 | return serverService.queryDeviceValueByHomeId((String) paramMap.get("homeId")); 32 | } 33 | 34 | /** 35 | * 查询历史温度-用于图表展示 36 | * @param paramMap 37 | * @return 38 | */ 39 | @RequestMapping(value = "/queryHistoryTemperature.do", produces = "application/json;charset=UTF-8") 40 | @ResponseBody 41 | public List> queryHistoryTemperature(@RequestBody Map paramMap) { 42 | String temperatureDeviceId = (String) paramMap.get("temperatureDeviceId"); 43 | return serverService.queryHistoryTemperature(temperatureDeviceId); 44 | } 45 | 46 | /** 47 | * 查询历史湿度-用于图表展示 48 | * @param paramMap 49 | * @return 50 | */ 51 | @RequestMapping(value = "/queryHistoryHumidity.do", produces = "application/json;charset=UTF-8") 52 | @ResponseBody 53 | public List> queryHistoryHumidity(@RequestBody Map paramMap) { 54 | String humidityDeviceId = (String) paramMap.get("humidityDeviceId"); 55 | return serverService.queryHistoryHumidity(humidityDeviceId); 56 | } 57 | 58 | /** 59 | * 控制设备 60 | * @param paramMap 61 | * @return 62 | */ 63 | @RequestMapping(value = "/controlDevice.do", produces = "application/json;charset=UTF-8") 64 | @ResponseBody 65 | public String controlDevice(@RequestBody Map paramMap) { 66 | String deviceType = (String) paramMap.get("deviceType"); 67 | String homeId = (String) paramMap.get("homeId"); 68 | String deviceId = (String) paramMap.get("deviceId"); 69 | //Topic规则 smartHome/{deviceType}/{homeId}/{deviceId} 70 | String topic = "smartHome/" + deviceType + "/" + homeId + "/" + deviceId; 71 | String message = JSONObject.toJSONString(paramMap.get("instruct")); 72 | MqttProducer.sendMessage(topic, message); 73 | return "success"; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/com/ssm/server/mapper/ServerMapper.java: -------------------------------------------------------------------------------- 1 | package com.ssm.server.mapper; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface ServerMapper { 7 | 8 | /** 9 | * 插入温度 10 | * @param pramMap 11 | * @return 12 | */ 13 | public int insertTemperature(Map pramMap); 14 | 15 | /** 16 | * 插入湿度 17 | * @param pramMap 18 | * @return 19 | */ 20 | public int insertHumidity(Map pramMap); 21 | 22 | 23 | /** 24 | * 插入空调值 25 | * @param pramMap 26 | * @return 27 | */ 28 | public int insertAirConditioner(Map pramMap); 29 | 30 | 31 | /** 32 | * 插入灯值 33 | * @param pramMap 34 | * @return 35 | */ 36 | public int insertLamp(Map pramMap); 37 | 38 | 39 | /** 40 | * 插入门状态 41 | * @param pramMap 42 | * @return 43 | */ 44 | public int insertDoor(Map pramMap); 45 | 46 | 47 | /** 48 | * 修改空调值 49 | * @param pramMap 50 | * @return 51 | */ 52 | public int updateAirConditioner(Map pramMap); 53 | 54 | /** 55 | * 修改灯值 56 | * @param pramMap 57 | * @return 58 | */ 59 | public int updateLamp(Map pramMap); 60 | 61 | /** 62 | * 修改门状态 63 | * @param pramMap 64 | * @return 65 | */ 66 | public int updateDoor(Map pramMap); 67 | 68 | /** 69 | * 通过家庭编号查询设备值 70 | * @param homeId 71 | * @return 72 | */ 73 | public List> queryDeviceValueByHomeId(String homeId); 74 | 75 | /** 76 | * 查询历史温度 最新20条 77 | * @return 78 | */ 79 | public List> queryHistoryTemperature(String temperatureDeviceId); 80 | 81 | 82 | /** 83 | * 查询历史湿度 最新20条 84 | * @return 85 | */ 86 | public List> queryHistoryHumidity(String humidityDeviceId); 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/com/ssm/server/mapper/ServerMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INSERT INTO temperature ( 6 | temperatureId, 7 | temperatureDeviceId, 8 | temperatureValue, 9 | temperatureTime 10 | )VALUES( 11 | #{uuid}, 12 | #{deviceId}, 13 | #{temperatureValue}, 14 | #{time} 15 | ) 16 | 17 | 18 | 19 | INSERT INTO humidity ( 20 | humidityId, 21 | humidityDeviceId, 22 | humidityValue, 23 | humidityTime 24 | )VALUES( 25 | #{uuid}, 26 | #{deviceId}, 27 | #{humidityValue}, 28 | #{time} 29 | ) 30 | 31 | 32 | 154 | 155 | 169 | 170 | 184 | 185 | -------------------------------------------------------------------------------- /src/com/ssm/server/service/IServerService.java: -------------------------------------------------------------------------------- 1 | package com.ssm.server.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.stereotype.Service; 7 | 8 | 9 | public interface IServerService { 10 | 11 | /** 12 | * 插入温度 13 | * @param pramMap 14 | * @return 15 | */ 16 | public int insertTemperature(Map pramMap); 17 | 18 | /** 19 | * 插入湿度 20 | * @param pramMap 21 | * @return 22 | */ 23 | public int insertHumidity(Map pramMap); 24 | 25 | 26 | /** 27 | * 通过家庭编号查询设备值 28 | * @param homeId 29 | * @return 30 | */ 31 | public List> queryDeviceValueByHomeId(String homeId); 32 | 33 | /** 34 | * 查询历史温度 最新20条 35 | * @return 36 | */ 37 | public List> queryHistoryTemperature(String temperatureDeviceId); 38 | 39 | 40 | /** 41 | * 查询历史湿度 最新20条 42 | * @return 43 | */ 44 | public List> queryHistoryHumidity(String humidityDeviceId); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/com/ssm/server/service/impl/ServerServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.ssm.server.service.impl; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.ssm.server.mapper.ServerMapper; 10 | import com.ssm.server.service.IServerService; 11 | @Service("serverService") 12 | public class ServerServiceImpl implements IServerService{ 13 | 14 | @Autowired ServerMapper serverMapper; 15 | 16 | @Override 17 | public int insertTemperature(Map pramMap) { 18 | return serverMapper.insertTemperature(pramMap); 19 | } 20 | 21 | @Override 22 | public int insertHumidity(Map pramMap) { 23 | return serverMapper.insertHumidity(pramMap); 24 | } 25 | 26 | 27 | @Override 28 | public List> queryDeviceValueByHomeId(String homeId) { 29 | return serverMapper.queryDeviceValueByHomeId(homeId); 30 | } 31 | 32 | @Override 33 | public List> queryHistoryTemperature(String temperatureDeviceId) { 34 | return serverMapper.queryHistoryTemperature(temperatureDeviceId); 35 | } 36 | 37 | @Override 38 | public List> queryHistoryHumidity(String humidityDeviceId) { 39 | return serverMapper.queryHistoryHumidity(humidityDeviceId); 40 | } 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/com/ssm/util/DateUtliTools.java: -------------------------------------------------------------------------------- 1 | package com.ssm.util; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | public class DateUtliTools { 7 | public static final String SIMPLE_DATE_FORMAT = "yyyy-MM-dd"; 8 | public static final String SIMPLE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; 9 | 10 | public static final String SIMPLE_15TIME_FORMAT = "yyyyMMdd HHmmss"; 11 | /** 12 | * Date类型转成String类型 13 | * @param String simpleDateFormat, Date date 14 | * @return Date 15 | */ 16 | public static String dateConvertString(String simpleDateFormat, Date date){ 17 | SimpleDateFormat df =new SimpleDateFormat(simpleDateFormat); 18 | String strDate =df.format(date); 19 | return strDate; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/com/ssm/util/JsonUtil.java: -------------------------------------------------------------------------------- 1 | package com.ssm.util; 2 | 3 | 4 | import java.beans.IntrospectionException; 5 | import java.beans.Introspector; 6 | import java.beans.PropertyDescriptor; 7 | import java.math.BigDecimal; 8 | import java.math.BigInteger; 9 | import java.util.List; 10 | import java.util.Map; 11 | import java.util.Set; 12 | 13 | public class JsonUtil { 14 | public static String object2json(Object obj) { 15 | StringBuilder json = new StringBuilder(); 16 | if (obj == null) { 17 | json.append("\"\""); 18 | } else if (obj instanceof String || obj instanceof Integer || obj instanceof Float 19 | || obj instanceof Boolean || obj instanceof Short || obj instanceof Double 20 | || obj instanceof Long || obj instanceof BigDecimal || obj instanceof BigInteger 21 | || obj instanceof Byte) { 22 | json.append("\"").append(string2json(obj.toString())).append("\""); 23 | } else if (obj instanceof Object[]) { 24 | json.append(array2json((Object[]) obj)); 25 | } else if (obj instanceof List) { 26 | json.append(list2json((List) obj)); 27 | } else if (obj instanceof Map) { 28 | json.append(map2json((Map) obj)); 29 | } else if (obj instanceof Set) { 30 | json.append(set2json((Set) obj)); 31 | } else { 32 | json.append(bean2json(obj)); 33 | } 34 | return json.toString(); 35 | } 36 | public static String bean2json(Object bean) { 37 | StringBuilder json = new StringBuilder(); 38 | json.append("{"); 39 | PropertyDescriptor[] props = null; 40 | try { 41 | props = Introspector.getBeanInfo(bean.getClass(), Object.class).getPropertyDescriptors(); 42 | } catch (IntrospectionException e) {} 43 | if (props != null) { 44 | for (int i = 0; i < props.length; i++) { 45 | try { 46 | String name = object2json(props[i].getName()); 47 | String value = object2json(props[i].getReadMethod().invoke(bean)); 48 | json.append(name); 49 | json.append(":"); 50 | json.append(value); 51 | json.append(","); 52 | } catch (Exception e) {} 53 | } 54 | json.setCharAt(json.length() - 1, '}'); 55 | } else { 56 | json.append("}"); 57 | } 58 | return json.toString(); 59 | } 60 | public static String list2json(List list) { 61 | StringBuilder json = new StringBuilder(); 62 | json.append("["); 63 | if (list != null && list.size() > 0) { 64 | for (Object obj : list) { 65 | json.append(object2json(obj)); 66 | json.append(","); 67 | } 68 | json.setCharAt(json.length() - 1, ']'); 69 | } else { 70 | json.append("]"); 71 | } 72 | return json.toString(); 73 | } 74 | public static String array2json(Object[] array) { 75 | StringBuilder json = new StringBuilder(); 76 | json.append("["); 77 | if (array != null && array.length > 0) { 78 | for (Object obj : array) { 79 | json.append(object2json(obj)); 80 | json.append(","); 81 | } 82 | json.setCharAt(json.length() - 1, ']'); 83 | } else { 84 | json.append("]"); 85 | } 86 | return json.toString(); 87 | } 88 | public static String map2json(Map map) { 89 | StringBuilder json = new StringBuilder(); 90 | json.append("{"); 91 | if (map != null && map.size() > 0) { 92 | for (Object key : map.keySet()) { 93 | json.append(object2json(key)); 94 | json.append(":"); 95 | json.append(object2json(map.get(key))); 96 | json.append(","); 97 | } 98 | json.setCharAt(json.length() - 1, '}'); 99 | } else { 100 | json.append("}"); 101 | } 102 | return json.toString(); 103 | } 104 | public static String set2json(Set set) { 105 | StringBuilder json = new StringBuilder(); 106 | json.append("["); 107 | if (set != null && set.size() > 0) { 108 | for (Object obj : set) { 109 | json.append(object2json(obj)); 110 | json.append(","); 111 | } 112 | json.setCharAt(json.length() - 1, ']'); 113 | } else { 114 | json.append("]"); 115 | } 116 | return json.toString(); 117 | } 118 | public static String string2json(String s) { 119 | if (s == null) 120 | return ""; 121 | StringBuilder sb = new StringBuilder(); 122 | for (int i = 0; i < s.length(); i++) { 123 | char ch = s.charAt(i); 124 | switch (ch) { 125 | case '"': 126 | sb.append("\\\""); 127 | break; 128 | case '\\': 129 | sb.append("\\\\"); 130 | break; 131 | case '\b': 132 | sb.append("\\b"); 133 | break; 134 | case '\f': 135 | sb.append("\\f"); 136 | break; 137 | case '\n': 138 | sb.append("\\n"); 139 | break; 140 | case '\r': 141 | sb.append("\\r"); 142 | break; 143 | case '\t': 144 | sb.append("\\t"); 145 | break; 146 | case '/': 147 | sb.append("\\/"); 148 | break; 149 | default: 150 | if (ch >= '\u0000' && ch <= '\u001F') { 151 | String ss = Integer.toHexString(ch); 152 | sb.append("\\u"); 153 | for (int k = 0; k < 4 - ss.length(); k++) { 154 | sb.append('0'); 155 | } 156 | sb.append(ss.toUpperCase()); 157 | } else { 158 | sb.append(ch); 159 | } 160 | } 161 | } 162 | return sb.toString(); 163 | } 164 | 165 | } 166 | -------------------------------------------------------------------------------- /src/com/ssm/util/RunStart.java: -------------------------------------------------------------------------------- 1 | package com.ssm.util; 2 | 3 | import javax.servlet.ServletException; 4 | import javax.servlet.http.HttpServlet; 5 | 6 | import com.ssm.mqtt.SubscribeTopicThread; 7 | 8 | /** 9 | * smartHome项目启动的时候执行的方法 10 | * @author shihonghao01 11 | * 12 | */ 13 | public class RunStart extends HttpServlet { 14 | 15 | private static final long serialVersionUID = -7827262224698296381L; 16 | 17 | // Servlet的init方法会在Tomcat启动的时候执行 18 | public void init() throws ServletException { 19 | // 启动线程订阅Topic 20 | new SubscribeTopicThread().run(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/com/ssm/util/SpringUtil.java: -------------------------------------------------------------------------------- 1 | package com.ssm.util; 2 | 3 | import org.springframework.beans.BeansException; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | import org.springframework.core.env.Environment; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.Map; 10 | 11 | /** 12 | * 静态类获取bean对象方法 13 | */ 14 | @Component 15 | public class SpringUtil implements ApplicationContextAware { 16 | 17 | private static ApplicationContext applicationContext; 18 | 19 | @Override 20 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { 21 | if (SpringUtil.applicationContext == null) { 22 | SpringUtil.applicationContext = applicationContext; 23 | } 24 | } 25 | 26 | //获取applicationContext 27 | public static ApplicationContext getApplicationContext() { 28 | return applicationContext; 29 | } 30 | 31 | //通过name获取 Bean. 32 | public static Object getBean(String name) { 33 | return getApplicationContext().getBean(name); 34 | } 35 | 36 | //通过class获取Bean. 37 | public static T getBean(Class clazz) { 38 | return getApplicationContext().getBean(clazz); 39 | } 40 | 41 | //通过name,以及Clazz返回指定的Bean 42 | public static T getBean(String name, Class clazz) { 43 | return getApplicationContext().getBean(name, clazz); 44 | } 45 | 46 | //通过Clazz返回指定的Beans 47 | public static Map getBeansByType(Class clazz) { 48 | return getApplicationContext().getBeansOfType(clazz); 49 | } 50 | 51 | //通过name,读取属性 52 | public static String getProperty(String name) { 53 | Environment environment = applicationContext.getEnvironment(); 54 | return environment.getProperty(name); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/ssm/util/StringUtil.java: -------------------------------------------------------------------------------- 1 | package com.ssm.util; 2 | 3 | public class StringUtil { 4 | /** 5 | * 判断字符串是否为空 6 | * @param str 7 | * @return 8 | */ 9 | public static boolean isEmpty(String str) { 10 | if(str != null && !str.replace(" ", "").equals("")){ 11 | return false; 12 | } 13 | else { 14 | return true; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=Console 2 | #Console 3 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 4 | log4j.appender.Console.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n 6 | log4j.logger.java.sql.ResultSet=INFO 7 | log4j.logger.org.apache=INFO 8 | log4j.logger.java.sql.Connection=DEBUG 9 | log4j.logger.java.sql.Statement=DEBUG 10 | log4j.logger.java.sql.PreparedStatement=DEBUG --------------------------------------------------------------------------------