haifmMain.htm 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>慧牧科技</title>
  5. <style type="text/css">
  6. /* 底部导航栏定义 */
  7. /*
  8. .nav-pills > li:not(:last-child){
  9. border-right: 1px #ddd;
  10. }
  11. .nav-pills > li {
  12. width:24.5%;
  13. height:40px;
  14. background-color:#d3d3d3;
  15. text-align:center;
  16. font-size:14px;
  17. }
  18. */
  19. @media (device-height:568px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone5 */
  20. #yjts{
  21. height:35% !important;
  22. }
  23. #mcgk .list-group-item{
  24. height: 32px !important;
  25. line-height: 32px !important;
  26. }
  27. .row>.navbar-fixed-bottom{
  28. font-size: 12px;
  29. }
  30. }
  31. @media (device-height:640px) and (-webkit-min-device-pixel-ratio:2){/* 兼容Galaxy S5 */
  32. }
  33. @media (device-height:667px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone6*/
  34. }
  35. @media (device-height:736px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone6 Plus */
  36. #mcgk .list-group-item{
  37. height: 42px !important;
  38. line-height: 42px !important;
  39. }
  40. }
  41. @media (device-height:1024px) and (-webkit-min-device-pixel-ratio:2){/* 兼容ipad */
  42. #mcgk .list-group-item{
  43. height: 65px !important;
  44. line-height: 65px !important;
  45. }
  46. #yjts .list-group-item{
  47. height: 65px !important;
  48. line-height: 65px !important;
  49. }
  50. #scxx .list-group-item{
  51. height: 65px !important;
  52. line-height: 65px !important;
  53. }
  54. .row>.navbar-fixed-bottom{
  55. font-size: 20px !important;
  56. }
  57. #mcgk{
  58. font-size: 22px !important;
  59. }
  60. #yjts{
  61. font-size: 22px !important;
  62. }
  63. #scxx{
  64. font-size: 22px !important;
  65. }
  66. }
  67. .container{
  68. width: 100% !important;
  69. }
  70. .nav-justified {
  71. width: 100%;
  72. border-bottom: 0;
  73. }
  74. .nav-justified > li {
  75. float: none;
  76. }
  77. .nav-justified > li > a {
  78. margin-bottom: 5px;
  79. text-align: center;
  80. }
  81. .nav-justified > .dropdown .dropdown-menu {
  82. top: auto;
  83. left: auto;
  84. }
  85. .nav-justified > li {
  86. text-align: center;
  87. }
  88. .nav-justified > li > a {
  89. margin-bottom: 0;
  90. padding:0 0;
  91. }
  92. .nav-justified > li > a {
  93. margin-right: 0;
  94. }
  95. .nav-pills > li:not(:last-child) {
  96. border-right: 1px #ddd;
  97. }
  98. /* 定义轮播图片大小 */
  99. .carousel-inner > .item > img {
  100. width: 100%;
  101. }
  102. /* 定义轮播字体位置 */
  103. .carousel-caption {
  104. bottom: 0;
  105. padding-bottom: 5px;
  106. }
  107. /* 定义资讯消息内部样式间隔 */
  108. .media {
  109. margin-top: 5px;
  110. }
  111. .media:not(:last-child) {
  112. padding-bottom: 5px;
  113. border-bottom: 1px solid #ddd;
  114. }
  115. /* 定义导航箭头图标 */
  116. .glyphicon-chevron-right {
  117. float: right;
  118. margin-right: 5px;
  119. }
  120. .glyphicon-chevron-right + .badge {
  121. margin-right: 5px;
  122. }
  123. /* 列表分割线 */
  124. .list-group-item {
  125. border: 0;
  126. height: 38px;
  127. line-height: 38px;
  128. padding: 0px;
  129. }
  130. .list-group-item:not(:first-child) {
  131. border-top: 1px solid #ddd;
  132. }
  133. /* 缩小面板内间隔 */
  134. .panel-body {
  135. padding: 0px 5px 0px 5px;
  136. }
  137. /* footer的图标 */
  138. .nav>li>span{
  139. width: 40px;
  140. height: 35px;
  141. display: inline-block;
  142. background-size: 400%;
  143. margin-top: 5px;
  144. }
  145. .mcsy{
  146. background: url(views/haifmp/img/btnbg.png) no-repeat 0px -45px;
  147. }
  148. .sjlr{
  149. background: url(views/haifmp/img/btnbg.png) no-repeat -40px 0px;
  150. }
  151. .jrmc{
  152. background: url(views/haifmp/img/btnbg.png) no-repeat -123px 0px;
  153. }
  154. /* footer的默认字体颜色 */
  155. .nav>li>a{
  156. color: #555;
  157. }
  158. /* footer的点击字体颜色 */
  159. .textColor{
  160. color: #2385E2 !important;
  161. }
  162. .nav-pills>li.active>a, .nav-pills>li.active>a:hover, .nav-pills>li.active>a:focus{
  163. text-decoration: none;
  164. background-color: #f6f6f6 !important;
  165. }
  166. .nav>li>a {
  167. margin-bottom: 0 !important;
  168. padding:0 !important;
  169. background-color: #f6f6f6 !important;
  170. }
  171. /* 滚动条样式 */
  172. .iScrollVerticalScrollbar {
  173. position: absolute;
  174. z-index: 9999;
  175. width: 3px;
  176. bottom: 2px;
  177. top: 2px;
  178. right: 2px;
  179. overflow: hidden;
  180. }
  181. .iScrollVerticalScrollbar.iScrollBothScrollbars {
  182. bottom: 18px;
  183. }
  184. .iScrollIndicator {
  185. position: absolute;
  186. right: 0;
  187. background: rgba(0, 0, 0);
  188. border: 2px solid rgba(0, 0, 0, 0.5);
  189. border-radius: 8px;
  190. }
  191. </style>
  192. <script type="text/javascript">
  193. $(function () {
  194. $("#mcid").val($("#symcid").val());
  195. $("#selectMc").bind("change", function () {
  196. $("#symcid").val($("#selectMc").val());
  197. $("#mcid").val($("#symcid").val());
  198. loadSy(1);
  199. });
  200. //滚动区域事件
  201. iscrollBig = new IScroll(".iscrollBig",{
  202. scrollbars: true,
  203. fadeScrollbars:true,
  204. click:true,
  205. scrollbars: 'custom',
  206. shrinkScrollbars:'clip',
  207. tap:true
  208. });
  209. //滚动区域的刷新事件
  210. setTimeout(function () {
  211. iscrollBig.refresh();
  212. }, 100);
  213. //touchmove的阻止浏览器或者屏幕滚动默认事件
  214. document.addEventListener('touchmove', function(event) {
  215. event.preventDefault();
  216. }, false);
  217. //localstorage.clear();
  218. document.cookie = "name=0" ;
  219. loadSy(0);
  220. //获取屏幕高度并赋值;
  221. var scrollHeight = window.screen.height;
  222. $(".iscrollBox").css("height",scrollHeight);
  223. //获取imgBox高度并赋值img;
  224. var imgHeight = $(".imgBox").height();
  225. $(".imgBox img").css("height",imgHeight - 10);
  226. });
  227. function hideMenu() {
  228. $("#jg").hide();
  229. $("#sy").addClass("hidden").removeClass("show");
  230. $("#fb").addClass("hidden").removeClass("show");
  231. $("#tl").addClass("hidden").removeClass("show");
  232. $("#mc").addClass("hidden").removeClass("show");
  233. $("#menu > li").removeClass("active");
  234. }
  235. function loadSy(flag) {
  236. if (flag == 1) {
  237. $("#sy").html("");
  238. haifm.loadMobilePage("haifm", "haifmvMain.htm?uuid=" + $("#uuid").val() + "&mcid=" + $("#mcid").val());
  239. }
  240. $("#sy").addClass("show").removeClass("hidden");
  241. loadSyYjts();
  242. //loadSyMcgk();
  243. /* 移除数据录入竖屏代码 */
  244. var portrait = $("link[id='portrait']");
  245. if(portrait.length >= 1){
  246. $("link[id='portrait']").remove();
  247. }
  248. /* 移除数据录入横屏代码 */
  249. var landscape = $("link[id='landscape']");
  250. if(landscape.length >= 1){
  251. $("link[id='landscape']").remove();
  252. }
  253. }
  254. function loadSjlr() {
  255. $("#sy").html("");
  256. $("#sjlr").addClass("show").removeClass("hidden");
  257. haifm.loadMobilePage("sjlr", "haifmvMain.htm?mcid=" + $("#mcid").val() + "&devType=" + $("#devType").val());
  258. //响应页面布局
  259. setTimeout(function () {
  260. $("#hiddenBoxPig div").on("click",function() {
  261. $(".fo").css("display","none");
  262. });
  263. }, 50);
  264. }
  265. function loadMc() {
  266. $("#mc").addClass("show").removeClass("hidden");
  267. haifm.loadMobilePage("haifm", "mcHaifmIndex.htm?from=sy");
  268. /* 移除数据录入竖屏代码 */
  269. var portrait = $("link[id='portrait']");
  270. if(portrait.length >= 1){
  271. $("link[id='portrait']").remove();
  272. }
  273. /* 移除数据录入横屏代码 */
  274. var landscape = $("link[id='landscape']");
  275. if(landscape.length >= 1){
  276. $("link[id='landscape']").remove();
  277. }
  278. }
  279. function loadSyZxxx() {
  280. haifm.loadMobilePage("zxxx", "syZxxx.htm");
  281. }
  282. function loadSyMcgk() {
  283. haifm.loadMobilePage("mcgk", "syMcgk.htm?mcid="+ $("#mcid").val());
  284. }
  285. function loadSyYjts() {
  286. haifm.loadMobilePage("yjts", "syYjts.htm?mcid=" + $("#mcid").val());
  287. }
  288. function loadSyScxx() {
  289. haifm.loadMobilePage("scxx", "syScxx.htm?mcid=" + $("#mcid").val());
  290. }
  291. //图标坐标
  292. function pig(e) {
  293. $('.row .nav li').eq(0).find('span').css('background-position','0px 0px');
  294. $('.row .nav li').eq(1).find('span').css('background-position','-40px 0px');
  295. $('.row .nav li').eq(2).find('span').css('background-position','-123px 0px');
  296. $('.row .nav li a').eq(0).removeClass('textColor');
  297. $('.row .nav li a').eq(1).removeClass('textColor');
  298. $('.row .nav li a').eq(2).removeClass('textColor');
  299. switch(e) {
  300. case 0:
  301. $('.row .nav li').eq(0).find('span').css('background-position','0px -45px');
  302. $('.row .nav li a').eq(0).addClass('textColor');
  303. break;
  304. case 1:
  305. $('.row .nav li').eq(1).find('span').css('background-position','-40px -45px');
  306. $('.row .nav li a').eq(1).addClass('textColor');
  307. break;
  308. case 2:
  309. $('.row .nav li').eq(2).find('span').css('background-position','-123px -45px');
  310. $('.row .nav li a').eq(2).addClass('textColor');
  311. break;
  312. }
  313. };
  314. </script>
  315. </head>
  316. <body>
  317. <div class="container">
  318. <div class="row hidden" id="sy">
  319. <div>
  320. <div class="navbar-fixed-top">
  321. <span class="logo" style="margin:0 10px;"><img src="views/haifm/images/logo.png"></span>
  322. <input type="hidden" id="symcid" value="$!mcid" />
  323. <h4>
  324. <!-- <button data-toggle="dropdown" class="btn btn-default dropdown-toggle mcSelect" type="button" onclick="javascript:selctMc();">&nbsp;<span id="qytext">区域</span>&nbsp;&nbsp;<span class="caret"></span></button> -->
  325. #if ($mcdaList.size() == 1)
  326. #foreach ($!obj in $mcdaList)
  327. <input type="hidden" id="selectMc" value="$!obj.id"/>#if ("$!gh" == "h000") ****** #else $!obj.mcmc #end
  328. #end
  329. #else
  330. <select id="selectMc" class="form-control">
  331. #foreach ($!obj in $mcdaList)
  332. <option value="$!obj.id" #if("$!obj.id" == "$!mcid") selected="selected" #end)>#if ("$!gh" == "h000") ****** #else $!obj.mcmc #end</option>
  333. #end
  334. </select>
  335. #end
  336. </h4>
  337. <span class="placeholder"></span>
  338. </div>
  339. </div>
  340. <div class="iscrollBig" style="overflow: hidden;position: absolute;top:38px;bottom: 65px;width: 100%;">
  341. <div class="iscrollBox">
  342. <div class="imgBox" style="height: 25%;">
  343. <div data-ride="carousel" data-interval="3000" class="carousel slide" id="carousel-container">
  344. <!-- 图片轮播 -->
  345. <div class="carousel-inner">
  346. <div class="item active">
  347. <img alt="第一张图" src="views/haifm/images/1.jpg"/>
  348. <div class="carousel-caption">
  349. <p1></p1>
  350. </div>
  351. </div>
  352. <div class="item">
  353. <img alt="第二张图" src="views/haifm/images/2.jpg"/>
  354. <div class="carousel-caption">
  355. <p1></p1>
  356. </div>
  357. </div>
  358. <div class="item">
  359. <img alt="第三张图" src="views/haifm/images/3.jpg"/>
  360. <div class="carousel-caption">
  361. <p1></p1>
  362. </div>
  363. </div>
  364. </div>
  365. <!-- 圆圈切换 -->
  366. <ol class="carousel-indicators">
  367. <li data-slide-to="0" data-target="#carousel-container" class="active"></li>
  368. <li data-slide-to="1" data-target="#carousel-container"></li>
  369. <li data-slide-to="2" data-target="#carousel-container"></li>
  370. </ol>
  371. <!-- 左右按钮控制 -->
  372. <a data-slide="prev" href="#carousel-container" class="left carousel-control">
  373. <span class="glyphicon glyphicon-chevron-left"></span>
  374. </a>
  375. <a data-slide="next" href="#carousel-container" class="right carousel-control">
  376. <span class="glyphicon glyphicon-chevron-right"></span>
  377. </a>
  378. </div>
  379. </div>
  380. <!-- <div class="col-md-12" id="zxxx"></div> -->
  381. <div class="wrapper" id="yjts" style="margin: 0px 10px 0 10px;height: 35%;"></div>
  382. <div class="wrapper" id="mcgk" style="margin: 0px 10px 0 10px;height: 25%;"></div>
  383. <div class="wrapper" id="scxx" style="margin: 0px 10px 0 10px;height: 40%;"></div>
  384. </div>
  385. </div>
  386. </div>
  387. <div class="row" id="sjlr" style="display:none"></div>
  388. <div class="row" id="mc" style="display:none"></div>
  389. <!--
  390. <div class="alert alert-warning fade in" style="display:none;" id="jg">
  391. <button data-dismiss="alert" class="close" type="button">×</button>
  392. <h4>警告</h4>
  393. <p>页面开发中。。。</p>
  394. </div> -->
  395. <div class="row fo">
  396. <ul class="nav nav-pills navbar-fixed-bottom nav-justified" id="menu" style="z-index: 1;border-top: 1px solid #ccc;background-color: #f6f6f6;display: -webkit-box;-webkit-box-pack: justify;-webkit-box-align: center;">
  397. <li onclick="hideMenu(),loadSy(1),pig(0)"><span class="mcsy"></span><a href="#" class="textColor">牧场首页</a></li>
  398. <li onclick="hideMenu(),loadSjlr(),pig(1)"><span class="sjlr"></span><a href="#">数据录入</a></li>
  399. <li onclick="hideMenu(),loadMc(),pig(2)"><span class="jrmc"></span><a href="#">进入牧场</a></li>
  400. </ul>
  401. </div>
  402. </div>
  403. </body>
  404. </html>