git пре 6 година
родитељ
комит
1f0288ea5a
42 измењених фајлова са 2467 додато и 1803 уклоњено
  1. BIN
      images/logo.png
  2. BIN
      images/rllogo1.png
  3. 4 1
      index.html
  4. 415 356
      pages/amap/amap.css
  5. 77 69
      pages/amap/amap.html
  6. 256 228
      pages/amap/amap.js
  7. 0 0
      pages/amap/navigation/navigation.css
  8. 3 0
      pages/amap/navigation/navigation.html
  9. 14 0
      pages/amap/navigation/navigation.js
  10. 100 0
      pages/amap/route/route.css
  11. 68 9
      pages/amap/route/route.html
  12. 93 81
      pages/amap/route/route.js
  13. 2 2
      pages/baojing/baojing.css
  14. 27 24
      pages/baojing/baojing.html
  15. 50 35
      pages/baojing/baojing.js
  16. 2 2
      pages/baojingindex/baojingindex.css
  17. 22 14
      pages/baojingindex/baojingindex.html
  18. 17 16
      pages/baojingindex/baojingindex.js
  19. 2 2
      pages/baojinginfo/baojinginfo.css
  20. 8 8
      pages/baojinginfo/baojinginfo.html
  21. 261 122
      pages/baojinginfo/baojinginfo.js
  22. 1 1
      pages/insure/insure.css
  23. 14 14
      pages/insure/insure.html
  24. 51 45
      pages/insure/insure.js
  25. 69 63
      pages/login/login.css
  26. 19 16
      pages/login/login.html
  27. 115 57
      pages/login/login.js
  28. 63 0
      pages/login_old/login.css
  29. 17 0
      pages/login_old/login.html
  30. 57 0
      pages/login_old/login.js
  31. 4 4
      pages/my/aboutadms/aboutadms.html
  32. 3 3
      pages/my/aboutlearun/aboutlearun.html
  33. 4 3
      pages/my/modifypassword/modifypassword.js
  34. 1 1
      pages/my/my.html
  35. 1 0
      pages/my/my.js
  36. 2 2
      pages/shezhi/shezhi.css
  37. 35 35
      pages/shezhi/shezhi.html
  38. 14 14
      pages/shezhi/shezhi.js
  39. 313 313
      pages/tongji/tongji.css
  40. 4 4
      pages/tongji/tongji.html
  41. 258 258
      pages/tongji/tongji.js
  42. 1 1
      scripts/index.js

BIN
images/rllogo1.png


+ 4 - 1
index.html

@@ -28,6 +28,9 @@
         <script type="text/javascript" src="config/config.js"></script>
         <script type="text/javascript" src="scripts/learun-custmerform.js"></script>
         <script type="text/javascript" src="scripts/index.js"></script>
-		<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=78735d0efd243f8085837edf355526cb"></script> 
+        <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=78735d0efd243f8085837edf355526cb"></script>
+        
+        <!-- ui组件库 -->
+        <script src="//webapi.amap.com/ui/1.0/main.js"></script>
     </body>
 </html>

Разлика између датотеке није приказан због своје велике величине
+ 415 - 356
pages/amap/amap.css


+ 77 - 69
pages/amap/amap.html

@@ -1,70 +1,78 @@
-<div class="lr-amap-page" >
-        <div id="amapcontainer" class="lr-amap-contarner">
-            <div class="map-panel">
-                <!-- 右上角功能面板 -->
-
-                <div style="z-index:555;flex: 0 0 auto;">
-                    <div class="top-right-panel">
-                        <div id="map-lelftright-func">
-                            <div id="layer-change">
-                                <svg class="icon" aria-hidden="true">
-                                    <use xlink:href="#icon-qiehuan1"></use>
-                                </svg>
-                            </div>
-                            <hr>
-                            <div id="route-situation">
-                                <svg class="icon" aria-hidden="true">
-                                    <use xlink:href="#icon-lukuang"></use>
-                                </svg>                           
-                            </div>
-                            <hr>
-                            <div id="user-change"><span class="iconfont icon-yonghuzuguanli"></span></div>
-                        </div>
-                    </div>
-                </div>
-
-                <!-- 内容占位 -->
-                <div style="flex: 1 0 auto"></div>
-
-                <div style="z-index:555;flex: 0 0 auto;">
-                    <!-- 用户定位 -->
-                    <div id="user-location">
-                        <div class="base-circle">
-                            <div class="big-circle">
-                                <div class="medium-circle">
-                                    <div class="small-circle"></div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                                       
-                    <!-- 底部功能面板 -->
-                    <div id="func-panel" >
-                        <div id="route-play" class="func-panel-bg">
-                            <div class="icon-circle-small"><span class="iconfont icon-guijichaxun"></span></div>
-                            <p>轨迹回放</p>
-                        </div>
-                        <div id="car-lock" class="func-panel-bg">
-                            <div class="icon-circle-large"><span id="lockStatus" class="iconfont icon-jiesuo"></span></div>
-                            <p>锁车</p>
-                        </div>
-                        <div id="electric-fence" class="func-panel-bg">
-                            <div class="icon-circle-small"><span class="iconfont icon-dianziweilan"></span></div>
-                            <p>电子围栏</p>
-                        </div>
-                    </div>
-                
-                    <!-- 底部面板 -->
-                    <div id="device-info-panel">
-                        <div style="width:50px;heght:30px;background: #fff">Logo</div>
-                        <p>离线23天......</p>
-                        <div class="delimite-line"></div>
-                        <p class="panel-right-content">GPS电量<span id="battery"></span></p>
-                    </div>
-                </div>
-            </div>
-        </div>
-        
-    </div>
-    
+<div class="lr-amap-page" >
+        <div id="amapcontainer" class="lr-amap-contarner">
+            <div class="map-panel">
+                <!-- 右上角功能面板 -->
+
+                <div style="z-index:555;flex: 0 0 auto;">
+                    <div class="top-right-panel">
+                        <div id="map-lelftright-func">
+                            <div id="layer-change">
+                                <svg class="icon" aria-hidden="true">
+                                    <use xlink:href="#icon-qiehuan1"></use>
+                                </svg>
+                            </div>
+                            <hr>
+                            <div id="route-situation">
+                                <svg class="icon" aria-hidden="true">
+                                    <use xlink:href="#icon-lukuang"></use>
+                                </svg>                           
+                            </div>
+                            <hr>
+                            <div id="user-change"><span class="iconfont icon-yonghuzuguanli"></span></div>
+                        </div>
+                    </div>
+                </div>
+
+                <!-- 内容占位 -->
+                <div style="flex: 1 0 auto"></div>
+
+                <div style="z-index:555;flex: 0 0 auto;">
+                    <!-- 用户定位 -->
+                    <div id="user-location">
+                        <div class="base-circle">
+                            <div class="big-circle">
+                                <div class="medium-circle">
+                                    <div class="small-circle"></div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                                       
+                    <!-- 底部功能面板 -->
+                    <div id="func-panel" >
+                        <div id="route-play" class="func-panel-bg">
+                            <div class="icon-circle-small"><span class="iconfont icon-guijichaxun"></span></div>
+                            <p>轨迹回放</p>
+                        </div>
+                        <div id="car-lock" class="func-panel-bg">
+                            <div class="icon-circle-large"><span id="lockStatus" class="iconfont icon-jiesuo"></span></div>
+                            <p>锁车</p>
+                        </div>
+                        <div id="electric-fence" class="func-panel-bg">
+                            <div class="icon-circle-small"><span class="iconfont icon-dianziweilan"></span></div>
+                            <p>电子围栏</p>
+                        </div>
+                    </div>
+                
+                    <!-- 底部面板 -->
+                    <div id="device-info-panel">
+                        <div style="width:50px;heght:30px;background: #fff">Logo</div>
+                        <p>离线23天......</p>
+                        <div class="delimite-line"></div>
+                        <p class="panel-right-content">GPS电量<span id="battery"></span></p>
+                    </div>
+
+                    <!-- 窗体模板 -->
+                    <script id="my-infowin-tpl" type="text/template">
+                        <div class="ract LeftBubble">
+                            <span>位置导航XX小区...</span>
+                        </div>
+                    </script>
+                    
+                </div>
+            </div>
+        </div>
+        
+    </div>
+    
     

Разлика између датотеке није приказан због своје велике величине
+ 256 - 228
pages/amap/amap.js


+ 0 - 0
pages/amap/navigation/navigation.css


+ 3 - 0
pages/amap/navigation/navigation.html

@@ -0,0 +1,3 @@
+<div class="lr-amap-page" >
+    <div id='navigation-map'></div>
+</div>

+ 14 - 0
pages/amap/navigation/navigation.js

@@ -0,0 +1,14 @@
+(function () {
+    var page = {
+        init: function ($page, param) {
+            //地图初始化
+            learun.routeMap = new AMap.Map('navigation-map', {
+                center: [117.000923, 36.675807],
+                zoom: 15
+            });
+            console.log(param);
+        }
+    };
+
+    return page;
+})();

+ 100 - 0
pages/amap/route/route.css

@@ -0,0 +1,100 @@
+body {
+}
+html{
+    -webkit-text-size-adjust:none;
+}
+
+.route-content{
+    width: 100%;
+    display: flex;
+    z-index: 555;
+    height: 100%;
+}
+.widthset{
+    width: 100%;
+    z-index: 555;
+    flex: 1 0 auto;
+    align-self: flex-end;
+}
+
+.panel-bottom-btn{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    
+}
+
+.lr-form-row .lr-btn{
+    margin-right: 15px;
+}
+
+.outcase{
+    display: none;
+    width: 100%;
+    z-index: 555;
+    flex: 1 0 auto;
+    align-self: flex-end;
+}
+
+.route-play-panel{
+    display: flex;
+    height: 150px;
+    background: #fff;
+    padding: 10px;
+    flex-direction: column;
+}
+
+.text-area{
+    display: flex;
+    flex-direction: column;
+}
+
+.button-area{
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    align-items: center;
+    height: 80px;
+    align-self: flex-end;
+}
+
+.speed-set{
+    display: flex;
+    flex-direction: column;
+    height: 40px;
+    align-items: center;
+}
+.speed-set span{
+    font-size: 1.2em;
+    color: gray;
+}
+
+.speed-levele{
+    margin: 0;
+    font-size:10px;
+    -webkit-transform:scale(0.8);
+    color: gray;
+}
+
+.play-control{
+    height: 80px;
+    display: flex;
+    justify-content: space-between;
+    width: 75%;
+    align-items: center;
+}
+
+.play-control .icon-shipin_shangyigewenjian,.icon-shipin_xiayigewenjian{
+    color: #2ea1ef;
+    font-size: 2em;
+}
+.play-control .icon-bofang{
+    color: #2ea1ef;
+    font-size: 3.5em;
+}
+.icon-bottom-word{
+    margin: 0;
+    font-size:10px;
+    -webkit-transform:scale(0.8);
+    color: gray;
+}

+ 68 - 9
pages/amap/route/route.html

@@ -1,10 +1,69 @@
-<div class="lr-amap-page" >
-    <div id="route-map" class="lr-amap-contarner">
-        <div id="test">
-            <button id='pause' style="z-index:555">pause</button>
-            <button id='up' style="z-index:555">up</button>
-            <button id='down' style="z-index:555">down</button>
-            <button id='reset' style="z-index:555">reset</button>
-        </div>
-    </div>
+<div class="lr-amap-page" >
+    <div id="route-map" class="lr-amap-contarner">
+        <!-- <div id="test">
+            <button id='pause' style="z-index:555">pause</button>
+            <button id='up' style="z-index:555">up</button>
+            <button id='down' style="z-index:555">down</button>
+            <button id='reset' style="z-index:555">reset</button>
+        </div> -->
+        <div class="route-content">
+            <!-- 内容占位 -->
+            <div style="flex: 1 0 auto"></div>
+            <!-- 日期选择面板 -->
+            <div class="widthset lr-form-container">
+                <div class="bottom-panel">
+                    <div class="lr-form-row">
+                        <label>自定义</label>
+                        <div id="date2"></div>
+                    </div>
+
+                    <div style="padding-left: 0;" class="panel-bottom-btn lr-form-row">
+                        <button type="button" class="lr-btn">取消</button>
+                        <button type="button" class="lr-btn-primary">确认</button>
+                    </div>
+                </div>  
+            </div>
+            <!-- 播放面板 -->
+            <div class="outcase">
+                <div class="route-play-panel">
+                    <div class="text-area">
+                        <p>1234567891012</p>
+                        
+                        <div class="time-speed">
+                            <span id="date-time">时间:</span>
+                            <span id="vehicle-speed">速度:</span>
+                        </div>
+
+                        <div class="address-line">
+                            <span>地址:</span>
+                            <p>年发电量大肆砍伐卢卡斯京东方都发dfdsafas大水发射点发射点</p>
+                        </div>
+                    </div>
+
+                    <div class="button-area">
+
+                        <div class="speed-set">
+                            <span class="iconfont icon-beisu1"></span>
+                            <p class="speed-levele">慢速</p>
+                        </div>
+
+                        <div class="play-control">
+                            <span class="iconfont icon-shipin_shangyigewenjian"></span>
+                            <span class="iconfont icon-bofang"></span>
+                            <span class="iconfont icon-shipin_xiayigewenjian"></span>
+                        </div>
+
+                        <div class="speed-set">
+                            <span class="iconfont icon-sheding"></span>
+                            <p class="icon-bottom-word">重设</p>
+                        </div>
+                    </div>
+                
+                </div>
+            </div>
+
+        </div>
+
+    </div>
+
 </div>

+ 93 - 81
pages/amap/route/route.js

@@ -1,81 +1,93 @@
-(function () {
-    var page = {
-        init: function ($page) {
-            //地图初始化
-            learun.routeMap = new AMap.Map('route-map', {
-                center: [117.000923, 36.675807],
-                zoom: 15
-            });
-            //起始点终点
-            // learun.startMarker = new AMap.Marker({
-            //     icon: "",
-            //     position: [117.000920, 36.675800],
-            // });
-            // learun.startMarker.setMap(routeMap);
-
-            //test
-            learun.initPage = function(PathSimplifier) {
-                //创建组件实例
-                learun.pathSimplifierIns = new PathSimplifier({
-                    zIndex: 100,
-                    map: learun.routeMap, //所属的地图实例
-                    getPath: function(pathData, pathIndex) {
-                        //返回轨迹数据中的节点坐标信息,[AMap.LngLat, AMap.LngLat...] 或者 [[lng|number,lat|number],...]
-                        return pathData.path;
-                    },
-                    renderOptions: {
-                        //轨迹线的样式
-                        pathLineStyle: {
-                            strokeStyle: 'red',
-                            lineWidth: 6,
-                            dirArrowStyle: true
-                        }
-                    }
-                });
-            
-                //这里构建两条简单的轨迹,仅作示例
-                learun.pathSimplifierIns.setData([{
-                    name: '轨迹0',
-                    path: [
-                        [100.340417, 27.376994],
-                        [108.426354, 37.827452],
-                        [113.392174, 31.208439],
-                        [124.905846, 42.232876]
-                    ]
-                }]);
-            
-                //创建一个巡航器
-                var navg0 = learun.pathSimplifierIns.createPathNavigator(0, //关联第1条轨迹
-                    {
-                        loop: true, //循环播放
-                        speed: 1000000
-                    });
-            
-                navg0.start();
-
-                $page.find('#pause').on('tap', function () {
-                    navg0.pause();
-                });
-            }
-            
-            AMapUI.load(['ui/misc/PathSimplifier'], function(PathSimplifier) {
-
-                if (!PathSimplifier.supportCanvas) {
-                    alert('当前环境不支持 Canvas!');
-                    return;
-                }
-            
-                //启动页面
-                console.log(PathSimplifier);
-                learun.initPage(PathSimplifier);
-            });
-
-
-            
-
-
-        }
-    };
-
-    return page;
-})();
+(function () {
+    var page = {
+        init: function ($page) {
+            //页面初始化
+            $page.find('#date2').lrdate({
+                type: 'date'
+            });
+
+            $page.find('.lr-btn-primary').on('tap', function(){
+                var date = $('#date2')[0].innerText;
+                console.log(date);
+                $('.widthset').hide();
+                $('.outcase').show();
+            });
+
+
+
+
+
+
+            //地图初始化
+            learun.routeMap = new AMap.Map('route-map', {
+                center: [117.000923, 36.675807],
+                zoom: 15
+            });
+            //test
+            learun.initPage = function(PathSimplifier) {
+                //创建组件实例
+                learun.pathSimplifierIns = new PathSimplifier({
+                    zIndex: 100,
+                    map: learun.routeMap, //所属的地图实例
+                    getPath: function(pathData, pathIndex) {
+                        //返回轨迹数据中的节点坐标信息,[AMap.LngLat, AMap.LngLat...] 或者 [[lng|number,lat|number],...]
+                        return pathData.path;
+                    },
+                    renderOptions: {
+                        //轨迹线的样式
+                        pathLineStyle: {
+                            strokeStyle: 'red',
+                            lineWidth: 6,
+                            dirArrowStyle: true
+                        }
+                    }
+                });
+            
+                //这里构建两条简单的轨迹,仅作示例
+                learun.pathSimplifierIns.setData([{
+                    name: '轨迹0',
+                    path: [
+                        [100.340417, 27.376994],
+                        [108.426354, 37.827452],
+                        [113.392174, 31.208439],
+                        [124.905846, 42.232876]
+                    ]
+                }]);
+            
+                //创建一个巡航器
+                var navg0 = learun.pathSimplifierIns.createPathNavigator(0, //关联第1条轨迹
+                    {
+                        loop: true, //循环播放
+                        speed: 1000000
+                    });
+                
+                var index
+                
+                navg0.start();
+
+                $page.find('#pause').on('tap', function () {
+                    navg0.pause();
+                });
+            }
+            
+            AMapUI.load(['ui/misc/PathSimplifier'], function(PathSimplifier) {
+
+                if (!PathSimplifier.supportCanvas) {
+                    alert('当前环境不支持 Canvas!');
+                    return;
+                }
+            
+                //启动页面
+                console.log(PathSimplifier);
+                learun.initPage(PathSimplifier);
+            });
+
+
+            
+
+
+        }
+    };
+
+    return page;
+})();

+ 2 - 2
pages/baojing/baojing.css

@@ -1,2 +1,2 @@
-body {
-}
+body {
+}

+ 27 - 24
pages/baojing/baojing.html

@@ -1,25 +1,28 @@
-<div style="margin-top:10px;" class="lr-form-container">
-    <div class="lr-form-row lr-form-row-title">
-        <label>选择车牌号</label>
-    </div>
-	<div class="lr-form-row">
-        <label>车牌选择</label>
-        <div id="plateselect"></div>
-    </div>
-    <div class="lr-form-row">
-        <label>手机号码</label>
-        <input id='mobile' type="text">
-    </div>
-	<div class="lr-form-row">
-        <label>选择日期</label>
-        <div id="date2"></div>
-    </div>
-    <div class="lr-form-row lr-form-row-multi">
-        <label>报警原因</label>
-        <!--<div class="lrtextarea"  contenteditable="true" ></div>-->
-        <textarea id="textarea"></textarea>
-    </div>
-</div>
-<div style="padding:10px;">
-<button type="button" class="lr-btn-primary lr-btn-block">报警</button>
+<div style="margin-top:10px;" class="lr-form-container">
+    <div class="lr-form-row lr-form-row-title">
+        <label>选择车牌号</label>
+    </div>
+	<!--<div class="lr-form-row">
+        <label>车牌选择</label>
+        <div id="plateselect"></div>
+    </div>-->
+	<div class="lr-list-item">
+        车牌号<span class="lr-badge" id='plate' style='background-color:white'></span>
+    </div>
+    <div class="lr-form-row">
+        <label>手机号码</label>
+        <input id='mobile' type="text">
+    </div>
+	<div class="lr-form-row">
+        <label>选择日期</label>
+        <div id="date2"></div>
+    </div>
+    <div class="lr-form-row lr-form-row-multi">
+        <label>报警原因</label>
+        <!--<div class="lrtextarea"  contenteditable="true" ></div>-->
+        <textarea id="textarea"></textarea>
+    </div>
+</div>
+<div style="padding:10px;">
+<button type="button" class="lr-btn-primary lr-btn-block">报警</button>
 </div>

+ 50 - 35
pages/baojing/baojing.js

@@ -1,36 +1,51 @@
-(function () {
-    var page = {
-        isScroll: true,
-        init: function ($page) {
-			var userinfo = learun.storage.get('userinfo');
-			learun.http.get("http://czapp.rltest.cn/?s=api/get_user_platenumber&userid="+userinfo.baseinfo.userId,{}, function (res) {
-                if (res) {
-					var platedata = [];
-					$.each(res.data, function (_index, _item) {
-                        platedata.push({value:_index,text:_item.LicensePlate});
-						$page.find('#plateselect').lrpicker({
-						placeholder: '请选择(必填)',
-						data: platedata
-                    });	
-            });
-                }
-            });
-			//var platedata = [{value:"123123122223",text:"bj123123"},{value:"123123122223",text:"bj123124"},{value:"1231122223",text:"bj123125"}];
-			
-            $page.find('#date2').lrdate({
-                type: 'date'
-            });
-			
-			
-			$page.find('.lr-btn-block').on('tap', function () {
-				var plate = $('#plateselect').children("div").text();
-				var mobile = $('#mobile').val();
-				var date = $('#date2').children("div").text();
-				var reason = $('#textarea').val();
-				console.log(reason);
-				//learun.nav.go({ path: 'demo/success', title: '提交成功', type: 'right' });
-			})
-        }
-    };
-    return page;
+(function () {
+    var page = {
+        isScroll: true,
+        init: function ($page) {
+			var userinfo = learun.storage.get('userinfo');
+			/*learun.http.get("http://czapp.rltest.cn/?s=api/get_user_platenumber&userid="+userinfo.baseinfo.userId,{}, function (res) {
+                if (res) {
+					var platedata = [];
+					$.each(res.data, function (_index, _item) {
+                        platedata.push({value:_index,text:_item.LicensePlate});
+						$page.find('#plateselect').lrpicker({
+						placeholder: '请选择(必填)',
+						data: platedata
+                    });	
+            });
+                }
+            });*/
+			
+			//var platedata = [{value:"123123122223",text:"bj123123"},{value:"123123122223",text:"bj123124"},{value:"1231122223",text:"bj123125"}];
+			$page.find('#plate').html(userinfo.baseinfo.plate);
+			$page.find('#mobile').html(userinfo.baseinfo.mobile);
+            $page.find('#date2').lrdate({
+                type: 'date'
+            });
+			
+			
+			$page.find('.lr-btn-block').on('tap', function () {
+				//var plate = $('#plateselect').children("div").text();
+				var mobile = $('#mobile').val();
+				var date = $('#date2').children("div").text();
+				var reason = $('#textarea').val();
+				var policedata = {
+						userid: userinfo.baseinfo.userId,
+                        LicensePlate: userinfo.baseinfo.plate,
+                        UserPhone: mobile,
+                        StolenDate: date,
+						WoContent: reason
+                    };
+				learun.http.post("http://czapp.rltest.cn/?s=api/submit_add_baojing", policedata, function(res) {
+					if(res.success == true){
+						learun.layer.toast('提交成功');
+						learun.nav.go({ path: 'amap', title: '地图', type: 'right', isBack: false });
+					}else{
+						learun.layer.warning(res.message, function () { }, '提示', '关闭');
+					}
+				})
+			})
+        }
+    };
+    return page;
 })();

+ 2 - 2
pages/baojingindex/baojingindex.css

@@ -1,2 +1,2 @@
-body {
-}
+body {
+}

+ 22 - 14
pages/baojingindex/baojingindex.html

@@ -1,14 +1,22 @@
-<div id="picture1" ></div>
-<div class="lr-grid" style="margin-top:10px;">
-    <div class="lr-grid-item">
-        <div><i class="iconfont icon-home"></i></div>
-        <span>电话报警</span>
-    </div>
-    <div class="lr-grid-item">
-        <div></div>
-    </div>
-    <div class="lr-grid-item">
-        <div><i class="iconfont icon-message_light"></i></div>
-        <span>自助报警</span>
-    </div>
-</div>
+<img id="picture1" style='width:100%' ></img>
+<div style="padding:10px;">
+    <button type="button" class="lr-btn-danger lr-btn-block call-baojing">
+        电话报警
+    </button>
+    <button type="button" class="lr-btn-primary lr-btn-block auto-baojing">
+        自助报警
+    </button>
+</div>
+<!--<div class="lr-grid" style="margin-top:10px;">
+    <div class="lr-grid-item">
+        <div><i class="iconfont icon-home"></i></div>
+        <span>电话报警</span>
+    </div>
+    <div class="lr-grid-item">
+        <div></div>
+    </div>
+    <div class="lr-grid-item">
+        <div><i class="iconfont icon-message_light"></i></div>
+        <span>自助报警</span>
+    </div>
+</div>-->

+ 17 - 16
pages/baojingindex/baojingindex.js

@@ -1,17 +1,18 @@
-(function () {
-    var page = {
-        isScroll: true,
-        init: function ($page) {
-            $page.find('#picture1').slider({ data: ['images/tubiao1.png'], indicator: true });//
-			
-			$page.find('.icon-home').on('tap', function () {
-				learun.tab.go('demo/baojing');
-			});
-			$page.find('.icon-message_light').on('tap', function () {
-				learun.nav.go({ path: 'baojing', title: '自助报警', type: 'right' });
-			});
-        }
-		
-    };
-    return page;
+(function () {
+    var page = {
+        isScroll: true,
+        init: function ($page) {
+            //$page.find('#picture1').slider({ data: ['images/tubiao1.png'], indicator: true });//
+            $page.find('#picture1').attr('src','images/tubiao1.png');
+			
+			$page.find('.call-baojing').on('tap', function () {
+				learun.tab.go('demo/baojing');
+			});
+			$page.find('.auto-baojing').on('tap', function () {
+				learun.nav.go({ path: 'baojing', title: '自助报警', type: 'right' });
+			});
+        }
+		
+    };
+    return page;
 })();

+ 2 - 2
pages/baojinginfo/baojinginfo.css

@@ -1,2 +1,2 @@
-body {
-}
+body {
+}

+ 8 - 8
pages/baojinginfo/baojinginfo.html

@@ -1,8 +1,8 @@
-<div id="toptab" >
-</div>
-
-<!-- <div class="lr-list"> -->
-    <!-- <div class="lr-list-item"> -->
-        <!-- 第一行 -->
-    <!-- </div> -->
-<!-- </div> -->
+<div id="toptab" >
+</div>
+
+<!-- <div class="lr-list"> -->
+    <!-- <div class="lr-list-item"> -->
+        <!-- 第一行 -->
+    <!-- </div> -->
+<!-- </div> -->

+ 261 - 122
pages/baojinginfo/baojinginfo.js

@@ -1,123 +1,262 @@
-(function () {
-	/*function list(data, $page) {
-		$.each(data, function (_index, _item) {
-			learun.httpget(config.webapi + "learun/adms/desktop/data", { type: 'list', id: _item.F_Id }, function(data) {
-				if (data) {
-					var html = '';
-					$.each(data.value, function (_j, _jitem) {	
-						html += '\
-							<div class="lr-list-item lr-dtlist-item">\
-								<div class="lr-ellipsis">'+ _jitem.f_title + '</div>\
-								<div class="date">'+ learun.date.format(_jitem.f_time, 'yyyy-MM-dd') + '</div>\
-							</div>';
-					});
-					console.log(html);
-				}
-				 $page.find('#lr_desktop_msg_content').append(html);
-			});
-		});
-	}*/
-	
-	var page = {
-        isScroll: false,
-        init: function ($page) {
-            $page.find('#toptab').toptab(['告警', '公告']).each(function (index) {
-                var $this = $(this);
-                switch (index) {
-                    case 0:
-					var msg_html = '';
-					msg_html += '\
-								<div class="f-page-body f-scroll-wrapper">\
-									<div class="f-scroll" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
-					var baojing_info = '';
-					
-					if(baojing_info){
-						baojinginfo = JSON.parse(baojing_info);
-						$.each(baojinginfo, function (_index, _item) {
-							msg_html += '\
-								<div class="lr-list">\
-										<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
-											<h4>'+ _item.time +'</h4>\
-											<p class="lr-ellipsis">'+ _item.data +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.time +'</span></p>\
-											<a class="lr-nav-right">'+ _item.msg +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
-										</div>\
-									</div>';
-						});
-						msg_html += '\
-									</div>\
-									<div class="f-scrollbar f-scrollbar-vertical">\
-										<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
-										</div>\
-									</div>\
-								</div>';
-							$this.html(msg_html);
-					}else{
-						msg_html += '<h4>暂无消息</h4>'
-						$this.html(msg_html);
-					}
-						/*$('.lr-nav-right').on('tap', function () {
-							var path = 'demo/test/map-detail';
-							console.log(path);
-							var title = '告警详情';
-							learun.nav.go({ path: path, title: title, type: 'right' });
-						});*/
-                        break;
-                    case 1:
-                        var msg_html = '';
-						msg_html += '\
-									<div class="f-page-body f-scroll-wrapper">\
-										<div class="f-scroll" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
-						var baojing_info = '{"0":{"data":"1111","msg":"公告","time":"2/28"},"1":{"data":"2222","msg":"公告","time":"2/29"}}';
-						
-						if(baojing_info){
-							baojinginfo = JSON.parse(baojing_info);
-							$.each(baojinginfo, function (_index, _item) {
-								msg_html += '\
-									<div class="lr-list">\
-											<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
-												<h4>'+ _item.time +'</h4>\
-												<p class="lr-ellipsis">'+ _item.data +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.time +'</span></p>\
-												<a class="lr-nav-right">'+ _item.msg +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
-											</div>\
-										</div>';
-							});
-							msg_html += '\
-										</div>\
-										<div class="f-scrollbar f-scrollbar-vertical">\
-											<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
-											</div>\
-										</div>\
-									</div>';
-								$this.html(msg_html);
-							}else{
-								msg_html += '<h4>暂无消息</h4>'
-								$this.html(msg_html);
-						}
-							/*$('.lr-nav-right').on('tap', function () {
-								var path = 'demo/test/map-detail';
-								console.log(path);
-								var title = '公告详情';
-								learun.nav.go({ path: path, title: title, type: 'right' });
-							});*/
-                        break;
-                }
-                $this = null;
-            });
-        }
-    };
-    return page;
-	
-    /*var page = {
-        isScroll: false,
-        init: function ($page) {
-			learun.clientdata.get('desktop', {
-				callback: function (data) {
-					console.log(data);
-					list(data.list || [], $page);
-				}
-			});
-			
-        }
-    };
-    return page;*/
+(function () {
+	/*function list(data, $page) {
+		$.each(data, function (_index, _item) {
+			learun.httpget(config.webapi + "learun/adms/desktop/data", { type: 'list', id: _item.F_Id }, function(data) {
+				if (data) {
+					var html = '';
+					$.each(data.value, function (_j, _jitem) {	
+						html += '\
+							<div class="lr-list-item lr-dtlist-item">\
+								<div class="lr-ellipsis">'+ _jitem.f_title + '</div>\
+								<div class="date">'+ learun.date.format(_jitem.f_time, 'yyyy-MM-dd') + '</div>\
+							</div>';
+					});
+					console.log(html);
+				}
+				 $page.find('#lr_desktop_msg_content').append(html);
+			});
+		});
+	}*/
+	
+	var page = {
+        isScroll: false,
+        init: function ($page,param) {
+            $page.find('#toptab').toptab(['告警', '公告']).each(function (index) {
+                var $this = $(this);
+                switch (index) {
+                    case 0:
+						var msg_html = '';
+						msg_html += '\
+									<div class="f-page-body f-scroll-wrapper">\
+										<div class="f-scroll" id="gaojinginfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
+						
+						//var baojing_info = '';
+						
+						learun.http.get("http://czapp.rltest.cn/?s=api/get_baojing_info", {}, function(res) {
+							if(res){
+								$.each(res.data, function (_index, _item) {
+									msg_html += '\
+										<div class="lr-list">\
+												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
+													<h4>'+ _item.AddTime +'</h4>\
+													<p class="lr-ellipsis">'+ _item.DeviceNumber +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.AddTime +'</span></p>\
+													<a class="lr-nav-right">'+ _item.Comment +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
+												</div>\
+											</div>';
+								});
+								
+							}else{
+								msg_html += '<h4>暂无消息</h4>';	
+							}
+							$page.find('#gaojinginfo').html(msg_html);
+							});
+						
+						msg_html += '\
+										</div>\
+										<div class="f-scrollbar f-scrollbar-vertical">\
+											<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
+											</div>\
+										</div>\
+									</div>';
+						$this.html(msg_html);
+						
+							
+							/*var pageobj = $('#gaojinginfo').lrpagination({
+								lclass: "lr-list",
+								rows: 10,                            // 每页行数
+								getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
+									// param:   page: 当前页,rows:行数
+									setTimeout(function () {
+										var gaojing_data = [];
+										learun.http.get("http://czapp.rltest.cn/?s=api/get_baojing_info", {}, function(res) {
+											if(res){
+												$.each(res.data, function (_index, _item) {
+													gaojing_data = _item;
+													console.log(gaojing_data);
+													//gaojing_data.push({ data: _item });
+												})
+											}
+										})
+										console.log(gaojing_data);
+										callback(gaojing_data, 20);
+									}, 1000);
+								},
+								renderData: function (_index, _item) {// 渲染数据模板
+								console.log(_item);
+									var _html = '\
+										<div class="lr-list">\
+												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
+													<h4>'+ _item.AddTime +'</h4>\
+													<p class="lr-ellipsis">'+ _item.DeviceNumber +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.AddTime +'</span></p>\
+													<a class="lr-nav-right">'+ _item.Comment +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
+												</div>\
+											</div>';
+									return _html;
+								},
+								down: {
+									contentinit: '下拉可以刷新',
+									contentdown: '下拉可以刷新',
+									contentover: '释放立即刷新',
+									contentrefresh: '正在刷新...'
+								},
+								up: {
+									contentinit: '上拉显示更多',
+									contentdown: '上拉显示更多',
+									contentrefresh: '正在加载...',
+									contentnomore: '没有更多数据了'
+								},
+								click: function (item, $item) {// 列表行点击事件
+									
+								}
+							});*/
+							
+							
+							
+							
+						
+						
+						
+						/*$('.lr-nav-right').on('tap', function () {
+							var path = 'demo/test/map-detail';
+							console.log(path);
+							var title = '告警详情';
+							learun.nav.go({ path: path, title: title, type: 'right' });
+						});*/
+                        break;
+                    case 1:
+                        var msg_html = '';
+						msg_html += '\
+									<div class="f-page-body f-scroll-wrapper">\
+										<div class="f-scroll" id="gonggaoinfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
+						//var baojing_info = '{"0":{"data":"1111","msg":"公告","time":"2/28"},"1":{"data":"2222","msg":"公告","time":"2/29"}}';
+						
+						learun.http.get("http://czapp.rltest.cn/?s=api/get_baojing_info", {}, function(res) {
+							if(res){
+								$.each(res.data, function (_index, _item) {
+									msg_html += '\
+										<div class="lr-list">\
+												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
+													<h4>'+ _item.AddTime +'</h4>\
+													<p class="lr-ellipsis">'+ _item.DeviceNumber +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.AddTime +'</span></p>\
+													<a class="lr-nav-right">'+ _item.Comment +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
+												</div>\
+											</div>';
+								});
+								
+							}else{
+								msg_html += '<h4>暂无消息</h4>';	
+							}
+							$page.find('#gonggaoinfo').html(msg_html);
+						});
+						msg_html += '\
+									</div>\
+									<div class="f-scrollbar f-scrollbar-vertical">\
+										<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
+										</div>\
+									</div>\
+								</div>';
+						$this.html(msg_html);
+							/*$('.lr-nav-right').on('tap', function () {
+								var path = 'demo/test/map-detail';
+								console.log(path);
+								var title = '公告详情';
+								learun.nav.go({ path: path, title: title, type: 'right' });
+							});*/
+                        break;
+                }
+                $this = null;
+            });
+        }
+		/*reload: function ($page, pageinfo) {
+			if (learun.isOutLogin) {// 如果是重新登录的情况刷新下桌面数据
+                learun.isOutLogin = false;
+			$page.find('#toptab').toptab(['告警', '公告']).each(function (index) {
+                var $this = $(this);
+                switch (index) {
+                    case 0:
+						var msg_html = '';
+						msg_html += '\
+									<div class="f-page-body f-scroll-wrapper">\
+										<div class="f-scroll" id="gaojinginfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
+						learun.http.get("http://czapp.rltest.cn/?s=api/get_baojing_info", {}, function(res) {
+							if(res){
+								$.each(res.data, function (_index, _item) {
+									msg_html += '\
+										<div class="lr-list">\
+												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
+													<h4>'+ _item.AddTime +'</h4>\
+													<p class="lr-ellipsis">'+ _item.DeviceNumber +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.AddTime +'</span></p>\
+													<a class="lr-nav-right">'+ _item.Comment +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
+												</div>\
+											</div>';
+								});
+								
+							}else{
+								msg_html += '<h4>暂无消息</h4>';	
+							}
+							$page.find('#gaojinginfo').html(msg_html);
+							});
+						
+						msg_html += '\
+										</div>\
+										<div class="f-scrollbar f-scrollbar-vertical">\
+											<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
+											</div>\
+										</div>\
+									</div>';
+						$this.html(msg_html);
+                        break;
+                    case 1:
+                        var msg_html = '';
+						msg_html += '\
+									<div class="f-page-body f-scroll-wrapper">\
+										<div class="f-scroll" id="gonggaoinfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';						
+						learun.http.get("http://czapp.rltest.cn/?s=api/get_baojing_info", {}, function(res) {
+							if(res){
+								$.each(res.data, function (_index, _item) {
+									msg_html += '\
+										<div class="lr-list">\
+												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
+													<h4>'+ _item.AddTime +'</h4>\
+													<p class="lr-ellipsis">'+ _item.DeviceNumber +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.AddTime +'</span></p>\
+													<a class="lr-nav-right">'+ _item.Comment +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
+												</div>\
+											</div>';
+								});
+								
+							}else{
+								msg_html += '<h4>暂无消息</h4>';	
+							}
+							$page.find('#gonggaoinfo').html(msg_html);
+						});
+						msg_html += '\
+									</div>\
+									<div class="f-scrollbar f-scrollbar-vertical">\
+										<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
+										</div>\
+									</div>\
+								</div>';
+						$this.html(msg_html);
+                        break;
+                }
+                $this = null;
+            });
+			}
+		}*/
+    };
+    return page;
+	
+    /*var page = {
+        isScroll: false,
+        init: function ($page) {
+			learun.clientdata.get('desktop', {
+				callback: function (data) {
+					console.log(data);
+					list(data.list || [], $page);
+				}
+			});
+			
+        }
+    };
+    return page;*/
 })();

+ 1 - 1
pages/insure/insure.css

@@ -1 +1 @@
-
+

+ 14 - 14
pages/insure/insure.html

@@ -1,15 +1,15 @@
-<div style="margin-top:10px;" class="lr-form-container">
-<div class="lr-form-row lr-form-row-title">
-	<label>支付金额给商户</label>
-</div>
-<div class="lr-form-row">
-	<label><span style='color:red'>*</span><b>地区选择</b></label>
-	<div id="select3"></div>
-</div>
-<div class="lr-form-row">
-	<label>保险套餐选择</label>
-	<div id="checkbox1"></div>
-</div>
-</div>
-<div style="padding:10px;" id='insure-button'>
+<div style="margin-top:10px;" class="lr-form-container">
+<div class="lr-form-row lr-form-row-title">
+	<label>支付金额给商户</label>
+</div>
+<div class="lr-form-row">
+	<label><span style='color:red'>*</span><b>地区选择</b></label>
+	<div id="select3"></div>
+</div>
+<div class="lr-form-row">
+	<label>保险套餐选择</label>
+	<div id="checkbox1"></div>
+</div>
+</div>
+<div style="padding:10px;" id='insure-button'>
 </div>

+ 51 - 45
pages/insure/insure.js

@@ -1,46 +1,52 @@
-(function () {
-    var page = {
-        isScroll: true,
-        init: function ($page) {
-			$page.find('#select3').lrpicker({
-                placeholder: '请选择(必填)',
-                data: cityData,
-                level: 3
-            });
-			var cityid = 10;
-			learun.http.get("http://czapp.rltest.cn/?s=api/get_insure_info&cityid="+cityid,{}, function (res) {
-                if (res) {
-					var insuredata = [];
-					$.each(res.data, function (_index, _item) {
-						//console.log(_item);
-                        insuredata.push({value:_index,text:_item.InsuranceName});
-						$page.find('#checkbox1').lrcheckbox({
-							data:insuredata
-						});	
-					});
-                }
-            });
-			
-			var $this = $(this);
-			var html = '';
-			var insure_info = '{"0":{"data":"人车险","price":"100元"},"1":{"data":"被盗险","price":"110元"}}'
-			if(insure_info){
-				insureinfo = JSON.parse(insure_info);
-				$.each(insureinfo, function (_index, _item) {
-					html += '<button type="button" class="lr-btn lr-btn-block">'+ _item.data +'</button>';
-				});
-				html += '<button type="button" class="lr-btn-primary lr-btn-block">立即支付</button>\
-						<button type="button" class="lr-btn-primary lr-btn-block">查看订单</button>';
-				$page.find('#insure-button').append(html);
-				$('.lr-btn-block').on('click',function () {
-					$(".lr-btn-block").attr("lr-btn","lr-btn-primary");
-				});
-			}else{
-				html += '<h4>暂无保险</h4>'
-				$page.find('#insure-button').append(html);
-			}
-			
-        }
-    };
-    return page;
+(function () {
+    var page = {
+        isScroll: true,
+        init: function ($page) {
+			$page.find('#select3').lrpicker({
+                placeholder: '请选择(必填)',
+                data: cityData,
+                level: 3
+            });
+			var cityid = 10;
+			learun.http.get("http://czapp.rltest.cn/?s=api/get_insure_info&cityid="+cityid,{}, function (res) {
+                if (res) {
+					var insuredata = [];
+					$.each(res.data, function (_index, _item) {
+						//console.log(_item);
+                        insuredata.push({value:_index,text:_item.InsuranceName});
+						$page.find('#checkbox1').lrcheckbox({
+							data:insuredata
+						});	
+					});
+                }
+            });
+			
+			/*var $this = $(this);
+			var html = '';
+			var insure_info = '{"0":{"data":"人车险","price":"100元"},"1":{"data":"被盗险","price":"110元"}}'
+			if(insure_info){
+				insureinfo = JSON.parse(insure_info);
+				$.each(insureinfo, function (_index, _item) {
+					html += '<button type="button" class="lr-btn lr-btn-block">'+ _item.data +'</button>';
+				});
+				html += '<button type="button" class="lr-btn-primary lr-btn-block">立即支付</button>\
+						<button type="button" class="lr-btn-primary lr-btn-block">查看订单</button>';
+				$page.find('#insure-button').append(html);
+				$('.lr-btn-block').on('click',function () {
+					$(".lr-btn-block").attr("lr-btn","lr-btn-primary");
+				});
+			}else{
+				html += '<h4>暂无保险</h4>'
+				$page.find('#insure-button').append(html);
+			}*/
+			var html = '';
+			html += '<button type="button" class="lr-btn-primary lr-btn-block">立即支付</button>\
+						<button type="button" class="lr-btn-primary lr-btn-block">查看订单</button>';
+				$page.find('#insure-button').append(html);
+			$('.lr-btn-block').on('click',function () {
+				$(".lr-btn-block").attr("lr-btn","lr-btn-primary");
+			});
+        }
+    };
+    return page;
 })();

+ 69 - 63
pages/login/login.css

@@ -1,63 +1,69 @@
-.lr-login-page {
-    position: relative;
-    height: 100%;
-    width: 100%;
-    background-color: #fff;
-}
-
-    .lr-login-page .login-content {
-        position: absolute;
-        width: 100%;
-        height: 280px;
-        top: 50%;
-        margin-top: -210px;
-        text-align: center;
-    }
-
-        .lr-login-page .login-content > img {
-            width: 60px;
-            height: 60px;
-            border-radius: 50%;
-            margin-bottom: 60px;
-        }
-
-    .lr-login-page .line {
-        position: relative;
-        margin: auto;
-        width: 92%;
-        height: 35px;
-        line-height: 35px;
-        border-bottom: 1px solid #eeeeee;
-        padding-left: 35px;
-    }
-
-        .lr-login-page .line i {
-            position: absolute;
-            left: 10px;
-            font-size: 18px;
-            color: #666;
-        }
-
-        .lr-login-page .line input {
-            position: relative;
-            line-height: 20px;
-            width: 100%;
-            background: transparent;
-            border: none;
-            font-size: 14px;
-        }
-
-    .lr-login-page button {
-        margin: auto;
-        margin-top: 25px;
-        width: 92%;
-    }
-
-    .lr-login-page .version {
-        position: absolute;
-        width: 100%;
-        bottom: 5px;
-        text-align: center;
-        font-size: 12px;
-        color: #ccc;
-    }
+.lr-login-page {
+    position: relative;
+    height: 100%;
+    width: 100%;
+    background-color: #fff;
+}
+
+    .lr-login-page .login-content {
+        position: absolute;
+        width: 100%;
+        height: 280px;
+        top: 50%;
+        margin-top: -210px;
+        text-align: center;
+    }
+
+        .lr-login-page .login-content > img {
+            width: 60px;
+            height: 60px;
+            border-radius: 50%;
+            margin-bottom: 60px;
+        }
+
+    .lr-login-page .line {
+        position: relative;
+        margin: auto;
+        width: 92%;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 1px solid #eeeeee;
+        padding-left: 35px;
+    }
+
+        .lr-login-page .line i {
+            position: absolute;
+            left: 10px;
+            font-size: 18px;
+            color: #666;
+        }
+
+        .lr-login-page .line input {
+            position: relative;
+            line-height: 20px;
+            width: 100%;
+            background: transparent;
+            border: none;
+            font-size: 14px;
+        }
+
+    .lr-login-page .lr-btn-block {
+        margin: auto;
+        margin-top: 25px;
+        width: 92%;
+    }
+
+    .lr-login-page .lr-btn-password {
+        position: absolute;
+        top: 3px;
+        right: 0;
+    }
+
+    .lr-login-page .version {
+        position: absolute;
+        width: 100%;
+        bottom: 5px;
+        text-align: center;
+        font-size: 12px;
+        color: #ccc;
+    }

+ 19 - 16
pages/login/login.html

@@ -1,17 +1,20 @@
-<div class="lr-login-page">
-    <div class="login-content">
-        <img src="images/logo.png" />
-        <div class="line">
-            <i class="iconfont icon-friend_light"></i>
-            <input id="account" type="text" placeholder="手机号/账号">
-        </div>
-        <div class="line">
-            <i class="iconfont icon-lock"></i>
-            <input id="password" type="password" placeholder="密码">
-        </div>
-        <button id="loginBtn" type="button" class="lr-btn-primary lr-btn-block">
-            登录
-        </button>
-    </div>
-    <div class="version">Copyright © 2019 内蒙古璟意中联科技有限公司</div>
+<div class="lr-login-page">
+    <div class="login-content">
+        <img src="images/logo.png" />
+        <div class="line">
+            <i class="iconfont icon-friend_light"></i>
+            <input id="account" type="text" placeholder="手机号">
+        </div>
+        <div class="line">
+            <i class="iconfont icon-lock"></i>
+            <input id="password" type="password" placeholder="密码">
+            <!--<button type="button" class="lr-btn  lr-btn-password" id="login_password_btn">
+                获取短信验证码
+            </button>-->
+        </div>
+        <button id="loginBtn" type="button" class="lr-btn-primary lr-btn-block">
+            登录
+        </button>
+    </div>
+    <div class="version">Copyright © 2019 内蒙古璟意中联科技有限公司</div>
 </div>

+ 115 - 57
pages/login/login.js

@@ -1,57 +1,115 @@
-(function () {
-    var page = {
-        headColor:'#ffffff',
-        init: function ($page) {
-            $page.find('#loginBtn').on('tap', function () {
-                var account = $('#account').val();
-                var password = $('#password').val();
-                
-                if (account === "") {
-                    learun.layer.warning('用户名不能为空!', function () { }, '力软提示', '关闭');
-                } else if (password === "") {
-                    learun.layer.warning('密码不能为空!', function () { }, '力软提示', '关闭');
-                } else {
-                    var data = {
-                        username: account,
-                        password: $.md5(password)
-                    };
-                    var postdata = {
-                        token: '',
-                        loginMark: learun.deviceId(),// 正式请换用设备号
-                        data: JSON.stringify(data)
-                    };
-                    var path = config.webapi;
-                    //learun.layer.loading(true, "正在登录,请稍后");
-					//learun.tab.go('workspace');
-					
-					learun.nav.go({ path: 'amap', title: '地图', type: 'right', isBack: false });
-					/*
-                    learun.http.post(path + "learun/adms/user/login", postdata, (res) => {
-                        learun.layer.loading(false);
-                        if (res === null) {
-                            learun.layer.warning('无法连接服务器,请检测网络!', function () { }, '力软提示', '关闭');
-                            return;
-                        }
-
-                        if (res.code === 200) {
-                            var logininfo = {
-                                account: account,
-                                token: res.data.baseinfo.token,
-                                date: learun.date.format(new Date(),'yyyy-MM-dd hh:mm:ss')
-                            };
-                            learun.storage.set('logininfo', logininfo);
-                            learun.storage.set('userinfo', res.data);
-                            $('#account').val('');
-                            $('#password').val('');
-                            learun.tab.go('workspace');
-                        } else {
-                            learun.layer.warning(res.info, function () { }, '力软提示', '关闭');
-                        }
-                    });
-					*/
-                } 
-            });
-        }
-    };
-    return page;
-})();
+(function () {
+    var page = {
+        headColor:'#ffffff',
+        init: function ($page) {
+            var url = 'http://www.learun.cn/webapi';
+
+            /*var getSecurityCode = function () {
+                var moblieCode = $.trim($page.find('#account').val()).split('/')[0];
+                var reg = /^(\+\d{2,3}\-)?\d{11}$/;
+                if (reg.test(moblieCode)) {
+
+                    function request(d) { for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { var b = c[a].split("="); if (b[0] == d) if ("undefined" == unescape(b[1])) break; else return unescape(b[1]) } return "" };
+                    var _fuid = request('fuid');
+
+                    var _data = {
+                        mobileCode: moblieCode,
+                        sourceUrl: "移动端" + _fuid
+                    };
+                    setPasswordTime();
+                    learun.http.get(url + '/securitycode', { loginMark: learun.deviceId(), data: JSON.stringify(_data) }, function (res) {
+                        if (res.code !== 200) {
+                            learun.layer.warning(res.info, function () { }, '提示', '关闭');
+                        }
+                    });
+                }
+                else {
+                    learun.layer.warning("请输入正确手机号码!", function () { }, '提示', '关闭');
+                }
+            };*/
+
+            /*var _time = 60;
+            function setPasswordTime() {
+                var $this = $page.find('#login_password_btn');
+                $this.text(_time + 's重新获取验证码');
+                $this.unbind('tap');
+                if (_time === 0) {
+                    $this.html('获取短信验证码');
+                    $this.on('tap', getSecurityCode);
+                    _time = 60;
+                }
+                else {
+                    _time--;
+                    setTimeout(setPasswordTime, 1000);
+                }
+                $this = null;
+            }
+            // 点击获取短信验证码
+            $page.find('#login_password_btn').on('tap', getSecurityCode);
+*/
+            $page.find('#loginBtn').on('tap', function () {
+				
+                
+				
+				var account = $('#account').val();
+                var password = $('#password').val();
+                if(account == 'a'){
+					learun.nav.go({ path: 'amap', title: '地图', type: 'right', isBack: false });
+				}
+                if (account === "") {
+                    learun.layer.warning('手机号不能为空!', function () { }, '提示', '关闭');
+                } else if (password === "") {
+                    learun.layer.warning('密码不能为空!', function () { }, '提示', '关闭');
+                } else {
+                    var data = {
+                        username: account,
+                        password: $.md5(password)
+                    };
+                    var postdata = {
+                        token: '',
+                        loginMark: learun.deviceId(),// 正式请换用设备号
+                        data: data
+                    };
+					//console.log(postdata);
+                    var path = config.webapi;
+                    learun.layer.loading(true, "正在登录,请稍后");
+                    learun.http.post("http://czapp.rltest.cn/?s=api/login", postdata, function(res) {
+                    //learun.http.post("/php/user/login.php", postdata, function(res) {
+                        learun.layer.loading(false);
+
+                        if (res === null) {
+                            learun.layer.warning('无法连接服务器,请检测网络!', function () { }, '提示', '关闭');
+                            return;
+                        }
+						
+                        if (res.success === true) {
+                            var logininfo = {
+                                account: account,
+                                token: res.data.baseinfo.token,
+                                date: learun.date.format(new Date(), 'yyyy-MM-dd hh:mm:ss')
+                            };
+							
+                            learun.storage.set('logininfo', logininfo);
+                            learun.storage.set('userinfo', res.data);
+							learun.nav.go({ path: 'amap', title: '地图', type: 'right', isBack: false });
+                            //learun.http.get("http://www.learun.cn/webapi/info", { data: account.split('/')[0] }, function (_res) {
+                            /*learun.http.get("/php/webapi/info.php", { data: account.split('/')[0] }, function (_res) {
+                                $('#account').val('');
+                                $('#password').val('');
+                                if (_res.code === 200 && _res.data.EnabledMark == -1) {
+                                    learun.nav.go({ path: 'info', isBack: false, title: '填写信息', param: account.split('/')[0]});
+                                }
+                                else {
+                                    learun.tab.go('workspace');
+                                }
+                            });*/
+                        } else {
+                            learun.layer.warning(res.message, function () { }, '提示', '关闭');
+                        }
+                    });
+                } 
+            });
+        }
+    };
+    return page;
+})();

+ 63 - 0
pages/login_old/login.css

@@ -0,0 +1,63 @@
+.lr-login-page {
+    position: relative;
+    height: 100%;
+    width: 100%;
+    background-color: #fff;
+}
+
+    .lr-login-page .login-content {
+        position: absolute;
+        width: 100%;
+        height: 280px;
+        top: 50%;
+        margin-top: -210px;
+        text-align: center;
+    }
+
+        .lr-login-page .login-content > img {
+            width: 60px;
+            height: 60px;
+            border-radius: 50%;
+            margin-bottom: 60px;
+        }
+
+    .lr-login-page .line {
+        position: relative;
+        margin: auto;
+        width: 92%;
+        height: 35px;
+        line-height: 35px;
+        border-bottom: 1px solid #eeeeee;
+        padding-left: 35px;
+    }
+
+        .lr-login-page .line i {
+            position: absolute;
+            left: 10px;
+            font-size: 18px;
+            color: #666;
+        }
+
+        .lr-login-page .line input {
+            position: relative;
+            line-height: 20px;
+            width: 100%;
+            background: transparent;
+            border: none;
+            font-size: 14px;
+        }
+
+    .lr-login-page button {
+        margin: auto;
+        margin-top: 25px;
+        width: 92%;
+    }
+
+    .lr-login-page .version {
+        position: absolute;
+        width: 100%;
+        bottom: 5px;
+        text-align: center;
+        font-size: 12px;
+        color: #ccc;
+    }

+ 17 - 0
pages/login_old/login.html

@@ -0,0 +1,17 @@
+<div class="lr-login-page">
+    <div class="login-content">
+        <img src="images/logo.png" />
+        <div class="line">
+            <i class="iconfont icon-friend_light"></i>
+            <input id="account" type="text" placeholder="手机号/账号">
+        </div>
+        <div class="line">
+            <i class="iconfont icon-lock"></i>
+            <input id="password" type="password" placeholder="密码">
+        </div>
+        <button id="loginBtn" type="button" class="lr-btn-primary lr-btn-block">
+            登录
+        </button>
+    </div>
+    <div class="version">Copyright © 2019 内蒙古璟意中联科技有限公司</div>
+</div>

+ 57 - 0
pages/login_old/login.js

@@ -0,0 +1,57 @@
+(function () {
+    var page = {
+        headColor:'#ffffff',
+        init: function ($page) {
+            $page.find('#loginBtn').on('tap', function () {
+                var account = $('#account').val();
+                var password = $('#password').val();
+                
+                if (account === "") {
+                    learun.layer.warning('用户名不能为空!', function () { }, '力软提示', '关闭');
+                } else if (password === "") {
+                    learun.layer.warning('密码不能为空!', function () { }, '力软提示', '关闭');
+                } else {
+                    var data = {
+                        username: account,
+                        password: $.md5(password)
+                    };
+                    var postdata = {
+                        token: '',
+                        loginMark: learun.deviceId(),// 正式请换用设备号
+                        data: JSON.stringify(data)
+                    };
+                    var path = config.webapi;
+                    //learun.layer.loading(true, "正在登录,请稍后");
+					//learun.tab.go('workspace');
+					
+					learun.nav.go({ path: 'amap', title: '地图', type: 'right', isBack: false });
+					/*
+                    learun.http.post(path + "learun/adms/user/login", postdata, (res) => {
+                        learun.layer.loading(false);
+                        if (res === null) {
+                            learun.layer.warning('无法连接服务器,请检测网络!', function () { }, '力软提示', '关闭');
+                            return;
+                        }
+
+                        if (res.code === 200) {
+                            var logininfo = {
+                                account: account,
+                                token: res.data.baseinfo.token,
+                                date: learun.date.format(new Date(),'yyyy-MM-dd hh:mm:ss')
+                            };
+                            learun.storage.set('logininfo', logininfo);
+                            learun.storage.set('userinfo', res.data);
+                            $('#account').val('');
+                            $('#password').val('');
+                            learun.tab.go('workspace');
+                        } else {
+                            learun.layer.warning(res.info, function () { }, '力软提示', '关闭');
+                        }
+                    });
+					*/
+                } 
+            });
+        }
+    };
+    return page;
+})();

+ 4 - 4
pages/my/aboutadms/aboutadms.html

@@ -1,8 +1,8 @@
 <div class="lr-aboutadms-page">
     <div>
-        <div class="title">关注微信公众号<br>获取更多框架信息</div>
-        <div class="img"><img src="images/wechat.jpg" /></div>
-        <div class="des">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;移动端框架是一款基于jQuery的超简单好用的移动端开发框架;通过cordova封装原生组件,让移动端框架实现用开发网页的方式开发接近原生体验的应用</div>
-        <div class="ver">当前版本:v7.0.3</div>
+        <div class="title">xxx<br>xxxx</div>
+        <div class="img"><img src="" /></div>
+        <div class="des">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
+        <div class="ver">当前版本:v1.0.0</div>
     </div>
 </div>

Разлика између датотеке није приказан због своје велике величине
+ 3 - 3
pages/my/aboutlearun/aboutlearun.html


+ 4 - 3
pages/my/modifypassword/modifypassword.js

@@ -21,12 +21,13 @@
                     //learun.httppost(config.webapi + "learun/adms/user/modifypw", req, function(data,info){
                     learun.http.post('http://czapp.rltest.cn/?s=api/modifypassword', req, function(data,info){
                         learun.layer.loading(false);
-                        if (data) {// 表单数据保存成功,发起流程
+                        if (data.success === true) {// 表单数据保存成功,发起流程
                             learun.layer.toast(info);
                             learun.storage.set('logininfo', null);
                             learun.nav.go({ path: 'login', isBack: false, isHead: false });
-                        }
-                        return false;
+                        }else{
+							learun.layer.warning(data.message, function () { }, '提示', '关闭');
+						}
                     });
                 }
                 else {

+ 1 - 1
pages/my/my.html

@@ -23,7 +23,7 @@
     <div class="lr-list" style="margin-top:15px;">
         <div class="lr-list-item lr-list-item-icon" data-value="aboutlearun">
             <i class="iconfont icon-home"></i>
-            <a class="lr-nav-right">关于任联</a>
+            <a class="lr-nav-right">关于我们</a>
         </div>
         <div class="lr-list-item lr-list-item-icon" data-value="aboutadms">
             <i class="iconfont icon-info"></i>

Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
pages/my/my.js


+ 2 - 2
pages/shezhi/shezhi.css

@@ -1,2 +1,2 @@
-body {
-}
+body {
+}

+ 35 - 35
pages/shezhi/shezhi.html

@@ -1,36 +1,36 @@
-<div style="margin-top:10px;" class="lr-form-container">
-    <div class="lr-form-row lr-form-row-title">
-        <label>告警设置</label>
-    </div>
-    <div class="lr-form-row">
-        <label>断电告警</label>
-        <div id="switch1"></div>
-    </div>
-	<div class="lr-form-row">
-        <label>震动告警</label>
-        <div id="switch2"></div>
-    </div>
-	<div class="lr-form-row">
-        <label>围栏告警</label>
-        <div id="switch3"></div>
-    </div>
-	<div class="lr-form-row">
-        <label>低电量告警</label>
-        <div id="switch4"></div>
-    </div>
-	<div class="lr-form-row">
-        <label>公告</label>
-        <div id="switch5"></div>
-    </div>
-	<div class="lr-form-row lr-form-row-title">
-        <label>声音设置</label>
-    </div>
-	<div class="lr-form-row">
-        <label>声音</label>
-        <div id="switch6"></div>
-    </div>
-	<div class="lr-form-row">
-        <label>震动</label>
-        <div id="switch7"></div>
-    </div>
+<div style="margin-top:10px;" class="lr-form-container">
+    <div class="lr-form-row lr-form-row-title">
+        <label>告警设置</label>
+    </div>
+    <div class="lr-form-row">
+        <label>断电告警</label>
+        <div id="switch1"></div>
+    </div>
+	<div class="lr-form-row">
+        <label>震动告警</label>
+        <div id="switch2"></div>
+    </div>
+	<div class="lr-form-row">
+        <label>围栏告警</label>
+        <div id="switch3"></div>
+    </div>
+	<div class="lr-form-row">
+        <label>低电量告警</label>
+        <div id="switch4"></div>
+    </div>
+	<div class="lr-form-row">
+        <label>公告</label>
+        <div id="switch5"></div>
+    </div>
+	<div class="lr-form-row lr-form-row-title">
+        <label>声音设置</label>
+    </div>
+	<div class="lr-form-row">
+        <label>声音</label>
+        <div id="switch6"></div>
+    </div>
+	<div class="lr-form-row">
+        <label>震动</label>
+        <div id="switch7"></div>
+    </div>
 </div>

+ 14 - 14
pages/shezhi/shezhi.js

@@ -1,15 +1,15 @@
-(function () {
-    var page = {
-        isScroll: true,
-        init: function ($page) {
-            $page.find('#switch1').lrswitch();
-			$page.find('#switch2').lrswitch();
-			$page.find('#switch3').lrswitch();
-			$page.find('#switch4').lrswitch();
-			$page.find('#switch5').lrswitch();
-			$page.find('#switch6').lrswitch();
-			$page.find('#switch7').lrswitch();
-        }
-    };
-    return page;
+(function () {
+    var page = {
+        isScroll: true,
+        init: function ($page) {
+            $page.find('#switch1').lrswitch();
+			$page.find('#switch2').lrswitch();
+			$page.find('#switch3').lrswitch();
+			$page.find('#switch4').lrswitch();
+			$page.find('#switch5').lrswitch();
+			$page.find('#switch6').lrswitch();
+			$page.find('#switch7').lrswitch();
+        }
+    };
+    return page;
 })();

+ 313 - 313
pages/tongji/tongji.css

@@ -1,314 +1,314 @@
-.lr-workspace-header {
-    padding:6px 40px;
-}
-    .lr-workspace-header .scanner {
-        position: absolute;
-        top: 10px;
-        left: 10px;
-        color: #fff;
-    }
-        .lr-workspace-header .scanner .iconfont {
-            font-size: 20px;
-            font-weight: 100;
-        }
-    .lr-workspace-header .searchBox {
-        position: relative;
-        width: 100%;
-        height: 100%;
-        background-color: #0C86D8;
-    }
-
-        .lr-workspace-header .searchBox i {
-            position: absolute;
-            top: 8px;
-            left: 10px;
-            color: #fff;
-            z-index: 1;
-            font-size: 12px;
-        }
-
-        .lr-workspace-header .searchBox .search {
-            position: relative;
-            width: 100%;
-            height: 100%;
-            border-radius: 3px;
-            line-height: 30px;
-            font-size: 14px;
-            background-color: #3d9ee0;
-            padding-left: 30px;
-            color: #fff;
-        }
-
-
-
-    .lr-workspace-header .message {
-        position: absolute;
-        top: 10px;
-        right: 10px;
-        color: #fff;
-    }
-        .lr-workspace-header .message .iconfont {
-            font-size: 22px;
-            font-weight: 100;
-        }
-
-.lr-workspace-page {
-    position: relative;
-    width: 100%;
-    height:100%;
-    padding-top: 210px;
-}
-    .lr-workspace-page .head {
-        position: absolute;
-        width: 100%;
-        height:150px;
-        top:0;
-        left:0;
-    }
-
-    .lr-workspace-page .banner {
-        position: relative;
-        width: 100%;
-        height: 120px;
-        /*background: url(images/banner.png);*/
-        background-size: 100% 100%;
-    }
-        .lr-workspace-page .banner img {
-            height: 120px;
-        }
-
-    .lr-workspace-page .news {
-        position: relative;
-        height: 30px;
-        background-color: #FFFEEC;
-        padding:0 10px;
-    }
-        .lr-workspace-page .news:after {
-            position: absolute;
-            right: 0;
-            bottom: 0;
-            left: 0;
-            height: 1px;
-            content: '';
-            -webkit-transform: scaleY(.5);
-            transform: scaleY(.5);
-            background-color: #f2f2f2;
-        }
-
-        .lr-workspace-page .news .left {
-            margin-right: 7px;
-            font-size: 25px;
-            float: left;
-            color: #F77338;
-            line-height: 23px;
-        }
-        .lr-workspace-page .news .middle {
-            float: left;
-            width: 70%;
-            display: inline-block;
-            font-size: 12px;
-            color: #F4520C;
-            line-height: 30px;
-        }
-        .lr-workspace-page .news .right {
-            float: right;
-            margin-top: 5px;
-            padding: 0 6px;
-            font-size: 10px;
-            color: #F77338;
-            border: 1px solid #F66323;
-            border-radius: 3px;
-        }
-
-
-
-
-    .lr-workspace-page .appbox {
-        position: absolute;
-        top: 120px;
-        left: 0;
-        width: 100%;
-        min-height: 90px;
-        background-color: #fff;
-        padding: 10px 5px 0 5px;
-        display: -webkit-box;
-        display: -webkit-flex;
-        display: -ms-flexbox;
-        display: flex;
-        -webkit-flex-wrap: wrap;
-        -ms-flex-wrap: wrap;
-        flex-wrap: wrap;
-        text-align: center;
-        -webkit-box-pack: start;
-        -webkit-justify-content: flex-start;
-        -ms-flex-pack: start;
-        justify-content: flex-start;
-    }
-    .lr-workspace-page .appitem {
-        -webkit-box-flex: 0;
-        -webkit-flex: 0 0 25%;
-        -ms-flex: 0 0 25%;
-        flex: 0 0 25%;
-        padding-bottom: 10px;
-    }
-        .lr-workspace-page .appitem > div{
-            margin:auto;
-            margin-bottom:5px;
-            height: 45px;
-            width: 45px;
-            line-height: 45px;
-            text-align: center;
-            border-radius: 50%;
-        }
-
-        .lr-workspace-page .appitem:nth-child(7n+1) > div {
-            background-color: #62bbff;
-        }
-        .lr-workspace-page .appitem:nth-child(7n+2) > div {
-            background-color: #7bd2ff;
-        }
-        .lr-workspace-page .appitem:nth-child(7n+3) > div {
-            background-color: #ffd761;
-        }
-        .lr-workspace-page .appitem:nth-child(7n+4) > div {
-            background-color: #fe955c;
-        }
-        .lr-workspace-page .appitem:nth-child(7n+5) > div {
-            background-color: #ff6283;
-        }
-        .lr-workspace-page .appitem:nth-child(7n+6) > div {
-            background-color: #60e3f3;
-        }
-        .lr-workspace-page .appitem:nth-child(7n) > div {
-            background-color: #acc8fe;
-        }
-
-
-
-        .lr-workspace-page .appitem i{
-            color: #fff;
-            font-size: 26px;
-        }
-        .lr-workspace-page .appitem > span {
-            font-size: 12px;
-            color: #333;
-        }
-
-
-.lr-desktop-msg {
-    position:relative;
-    width:100%;
-    height:100%;
-}
-
-/**/
-.lr-black-panel {
-    position: relative;
-    width: 100%;
-    background-color: #fff;
-    margin-bottom:10px;
-}
-    .lr-black-panel .lr-title {
-        position: relative;
-        width: 100%;
-        height: 35px;
-        line-height: 35px;
-        font-family: PingFangSC-Regular;
-        font-size: 14px;
-        color: #333333;
-        padding-left:10px;
-    }
-
-        .lr-black-panel .lr-title:after {
-            position: absolute;
-            right: 0;
-            bottom: 0;
-            left: 0;
-            height: 1px;
-            content: '';
-            -webkit-transform: scaleY(.5);
-            transform: scaleY(.5);
-            background-color: #c8c7cc;
-        }
-
-    .lr-black-panel .lr-content {
-        position: relative;
-        width: 100%;
-    }
-    .lr-black-panel .lr-flex-content {
-        display: -webkit-box;
-        display: -webkit-flex;
-        display: -ms-flexbox;
-        display: flex;
-        -webkit-flex-wrap: wrap;
-        -ms-flex-wrap: wrap;
-        flex-wrap: wrap;
-        text-align: center;
-        -webkit-box-pack: start;
-        -webkit-justify-content: flex-start;
-        -ms-flex-pack: start;
-        justify-content: flex-start;
-    }
-        .lr-black-panel .lr-flex-content .targetItem {
-            -webkit-box-flex: 0;
-            -webkit-flex: 0 0 33.33%;
-            -ms-flex: 0 0 33.33%;
-            flex: 0 0 33.33%;
-            height: 80px;
-            padding-top: 10px;
-            position: relative;
-        }
-
-            .lr-black-panel .lr-flex-content .targetItem:before {
-                position: absolute;
-                right: 0;
-                bottom: 0;
-                top: 0;
-                width: 1px;
-                content: '';
-                -webkit-transform: scaleX(.5);
-                transform: scaleX(.5);
-                background-color: #c8c7cc;
-            }
-            .lr-black-panel .lr-flex-content .targetItem:nth-of-type(3n):before {
-                display: none;
-            }
-
-            .lr-black-panel .lr-flex-content .targetItem:after {
-                position: absolute;
-                right: 0;
-                bottom: 0;
-                left: 0;
-                height: 1px;
-                content: '';
-                -webkit-transform: scaleY(.5);
-                transform: scaleY(.5);
-                background-color: #c8c7cc;
-            }
-.targetItem .name {
-    font-family: PingFangSC-Regular;
-    font-size: 12px;
-    color: #666666;
-    margin-bottom:5px;
-}
-.targetItem .number {
-    font-family: PingFangSC-Regular;
-    font-size: 24px;
-    color: #0188D2;
-}
-.lr-dtlist-item {
-    padding-right:90px;
-}
-.lr-dtlist-item .date {
-    position: absolute;
-    right: 10px;
-    top: 0;
-}
-.lr-chart-content {
-    height:220px;
-}
-.lr-chart-container {
-    position:relative;
-    width:100%;
-    height:100%;
+.lr-workspace-header {
+    padding:6px 40px;
+}
+    .lr-workspace-header .scanner {
+        position: absolute;
+        top: 10px;
+        left: 10px;
+        color: #fff;
+    }
+        .lr-workspace-header .scanner .iconfont {
+            font-size: 20px;
+            font-weight: 100;
+        }
+    .lr-workspace-header .searchBox {
+        position: relative;
+        width: 100%;
+        height: 100%;
+        background-color: #0C86D8;
+    }
+
+        .lr-workspace-header .searchBox i {
+            position: absolute;
+            top: 8px;
+            left: 10px;
+            color: #fff;
+            z-index: 1;
+            font-size: 12px;
+        }
+
+        .lr-workspace-header .searchBox .search {
+            position: relative;
+            width: 100%;
+            height: 100%;
+            border-radius: 3px;
+            line-height: 30px;
+            font-size: 14px;
+            background-color: #3d9ee0;
+            padding-left: 30px;
+            color: #fff;
+        }
+
+
+
+    .lr-workspace-header .message {
+        position: absolute;
+        top: 10px;
+        right: 10px;
+        color: #fff;
+    }
+        .lr-workspace-header .message .iconfont {
+            font-size: 22px;
+            font-weight: 100;
+        }
+
+.lr-workspace-page {
+    position: relative;
+    width: 100%;
+    height:100%;
+    padding-top: 210px;
+}
+    .lr-workspace-page .head {
+        position: absolute;
+        width: 100%;
+        height:150px;
+        top:0;
+        left:0;
+    }
+
+    .lr-workspace-page .banner {
+        position: relative;
+        width: 100%;
+        height: 120px;
+        /*background: url(images/banner.png);*/
+        background-size: 100% 100%;
+    }
+        .lr-workspace-page .banner img {
+            height: 120px;
+        }
+
+    .lr-workspace-page .news {
+        position: relative;
+        height: 30px;
+        background-color: #FFFEEC;
+        padding:0 10px;
+    }
+        .lr-workspace-page .news:after {
+            position: absolute;
+            right: 0;
+            bottom: 0;
+            left: 0;
+            height: 1px;
+            content: '';
+            -webkit-transform: scaleY(.5);
+            transform: scaleY(.5);
+            background-color: #f2f2f2;
+        }
+
+        .lr-workspace-page .news .left {
+            margin-right: 7px;
+            font-size: 25px;
+            float: left;
+            color: #F77338;
+            line-height: 23px;
+        }
+        .lr-workspace-page .news .middle {
+            float: left;
+            width: 70%;
+            display: inline-block;
+            font-size: 12px;
+            color: #F4520C;
+            line-height: 30px;
+        }
+        .lr-workspace-page .news .right {
+            float: right;
+            margin-top: 5px;
+            padding: 0 6px;
+            font-size: 10px;
+            color: #F77338;
+            border: 1px solid #F66323;
+            border-radius: 3px;
+        }
+
+
+
+
+    .lr-workspace-page .appbox {
+        position: absolute;
+        top: 120px;
+        left: 0;
+        width: 100%;
+        min-height: 90px;
+        background-color: #fff;
+        padding: 10px 5px 0 5px;
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display: flex;
+        -webkit-flex-wrap: wrap;
+        -ms-flex-wrap: wrap;
+        flex-wrap: wrap;
+        text-align: center;
+        -webkit-box-pack: start;
+        -webkit-justify-content: flex-start;
+        -ms-flex-pack: start;
+        justify-content: flex-start;
+    }
+    .lr-workspace-page .appitem {
+        -webkit-box-flex: 0;
+        -webkit-flex: 0 0 25%;
+        -ms-flex: 0 0 25%;
+        flex: 0 0 25%;
+        padding-bottom: 10px;
+    }
+        .lr-workspace-page .appitem > div{
+            margin:auto;
+            margin-bottom:5px;
+            height: 45px;
+            width: 45px;
+            line-height: 45px;
+            text-align: center;
+            border-radius: 50%;
+        }
+
+        .lr-workspace-page .appitem:nth-child(7n+1) > div {
+            background-color: #62bbff;
+        }
+        .lr-workspace-page .appitem:nth-child(7n+2) > div {
+            background-color: #7bd2ff;
+        }
+        .lr-workspace-page .appitem:nth-child(7n+3) > div {
+            background-color: #ffd761;
+        }
+        .lr-workspace-page .appitem:nth-child(7n+4) > div {
+            background-color: #fe955c;
+        }
+        .lr-workspace-page .appitem:nth-child(7n+5) > div {
+            background-color: #ff6283;
+        }
+        .lr-workspace-page .appitem:nth-child(7n+6) > div {
+            background-color: #60e3f3;
+        }
+        .lr-workspace-page .appitem:nth-child(7n) > div {
+            background-color: #acc8fe;
+        }
+
+
+
+        .lr-workspace-page .appitem i{
+            color: #fff;
+            font-size: 26px;
+        }
+        .lr-workspace-page .appitem > span {
+            font-size: 12px;
+            color: #333;
+        }
+
+
+.lr-desktop-msg {
+    position:relative;
+    width:100%;
+    height:100%;
+}
+
+/**/
+.lr-black-panel {
+    position: relative;
+    width: 100%;
+    background-color: #fff;
+    margin-bottom:10px;
+}
+    .lr-black-panel .lr-title {
+        position: relative;
+        width: 100%;
+        height: 35px;
+        line-height: 35px;
+        font-family: PingFangSC-Regular;
+        font-size: 14px;
+        color: #333333;
+        padding-left:10px;
+    }
+
+        .lr-black-panel .lr-title:after {
+            position: absolute;
+            right: 0;
+            bottom: 0;
+            left: 0;
+            height: 1px;
+            content: '';
+            -webkit-transform: scaleY(.5);
+            transform: scaleY(.5);
+            background-color: #c8c7cc;
+        }
+
+    .lr-black-panel .lr-content {
+        position: relative;
+        width: 100%;
+    }
+    .lr-black-panel .lr-flex-content {
+        display: -webkit-box;
+        display: -webkit-flex;
+        display: -ms-flexbox;
+        display: flex;
+        -webkit-flex-wrap: wrap;
+        -ms-flex-wrap: wrap;
+        flex-wrap: wrap;
+        text-align: center;
+        -webkit-box-pack: start;
+        -webkit-justify-content: flex-start;
+        -ms-flex-pack: start;
+        justify-content: flex-start;
+    }
+        .lr-black-panel .lr-flex-content .targetItem {
+            -webkit-box-flex: 0;
+            -webkit-flex: 0 0 33.33%;
+            -ms-flex: 0 0 33.33%;
+            flex: 0 0 33.33%;
+            height: 80px;
+            padding-top: 10px;
+            position: relative;
+        }
+
+            .lr-black-panel .lr-flex-content .targetItem:before {
+                position: absolute;
+                right: 0;
+                bottom: 0;
+                top: 0;
+                width: 1px;
+                content: '';
+                -webkit-transform: scaleX(.5);
+                transform: scaleX(.5);
+                background-color: #c8c7cc;
+            }
+            .lr-black-panel .lr-flex-content .targetItem:nth-of-type(3n):before {
+                display: none;
+            }
+
+            .lr-black-panel .lr-flex-content .targetItem:after {
+                position: absolute;
+                right: 0;
+                bottom: 0;
+                left: 0;
+                height: 1px;
+                content: '';
+                -webkit-transform: scaleY(.5);
+                transform: scaleY(.5);
+                background-color: #c8c7cc;
+            }
+.targetItem .name {
+    font-family: PingFangSC-Regular;
+    font-size: 12px;
+    color: #666666;
+    margin-bottom:5px;
+}
+.targetItem .number {
+    font-family: PingFangSC-Regular;
+    font-size: 24px;
+    color: #0188D2;
+}
+.lr-dtlist-item {
+    padding-right:90px;
+}
+.lr-dtlist-item .date {
+    position: absolute;
+    right: 10px;
+    top: 0;
+}
+.lr-chart-content {
+    height:220px;
+}
+.lr-chart-container {
+    position:relative;
+    width:100%;
+    height:100%;
 }

+ 4 - 4
pages/tongji/tongji.html

@@ -1,4 +1,4 @@
-<div class="lr-desktop-msg" id="lr_desktop_msg">
-	<div id="lr_desktop_msg_content" style="padding-top:10px;">
-	</div>
-</div>
+<div class="lr-desktop-msg" id="lr_desktop_msg">
+	<div id="lr_desktop_msg_content" style="padding-top:10px;">
+	</div>
+</div>

+ 258 - 258
pages/tongji/tongji.js

@@ -1,259 +1,259 @@
-(function () {
-
-    var custmerform = {};
-    var $scroll = '';
-	
-	var chartMap = {};
-    // 图表数据
-    function chart(data, $page) {
-		
-        if (data.length > 0) {
-            chartMap = {};
-            $.each(data, function (_index, _item) {
-                var _html = '\
-                <div class="lr-black-panel">\
-                    <div class="lr-title">'+ _item.F_Name + '</div>\
-                    <div class="lr-content lr-chart-content">\
-                        <div class="lr-chart-container" id="'+ _item.F_Id + '"  data-desktop="' + _item.F_Type + '" ></div>\
-                    </div>\
-                </div>';
-				
-                $page.find('#lr_desktop_msg_content').append(_html);
-                chartMap[_item.F_Id] = echarts.init(document.getElementById(_item.F_Id));
-
-                // 获取后台数据
-				var data = '{"Id":"1064e045-f075-42a2-8431-ba717e1539b3","value":[{"name":"2017.07.13","value":9000.00},{"name":"2017.08.11","value":100900.00},{"name":"2017.09.25","value":0.00},{"name":"2018.04.03","value":100.00},{"name":"2018.05.21","value":2.00}]}';
-                //learun.httpget("", { type: 'chart', id: _item.F_Id }, function(data) {
-				data = JSON.parse(data);
-                    if (data) {
-                        var type = $('#' + data.Id).attr('data-desktop');
-                        var legendData = [];
-                        var valueData = [];
-                        $.each(data.value, function (_index, _item) {
-                            legendData.push(_item.name);
-                            valueData.push(_item.value);
-                        });
-                        var option = {};
-						option.tooltip = {
-							trigger: 'item',
-							formatter: "{a} <br/>{b}: {c} ({d}%)"
-						};
-						console.log(option.tooltip);
-						option.legend = {
-							orient: 'vertical',
-							left: 'left',
-							data: legendData
-						};
-						console.log(option.legend);
-						option.series = [{
-							name: '占比',
-							type: 'pie',
-							radius: ['50%', '70%'],
-							avoidLabelOverlap: false,
-							label: {
-								normal: {
-									show: false,
-									position: 'center'
-								},
-								emphasis: {
-									show: true,
-									textStyle: {
-										fontSize: '30',
-										fontWeight: 'bold'
-									}
-								}
-							},
-							labelLine: {
-								normal: {
-									show: false
-								}
-							},
-							data: data.value
-						}];
-						console.log(option.series);
-						option.color = ['#df4d4b', '#304552', '#52bbc8', 'rgb(224,134,105)', '#8dd5b4', '#5eb57d', '#d78d2f'];
-						console.log(option);
-                        chartMap[data.Id].setOption(option);
-                    }
-                //});
-            });
-        }
-    }
-
-    // 统计数据
-    function target(data, $page) {
-        if (data.length > 0) {
-            var _html = '\
-            <div class="lr-black-panel">\
-                <div class="lr-title">统计数据</div>\
-                <div class="lr-content lr-flex-content">\
-                </div>\
-            </div>';
-            $page.find('#lr_desktop_msg_content').append(_html);
-            //var $content = $desktop.find('.lr-flex-content');
-            $.each(data, function (_index, _item) {
-                var _itemHtml = '\
-                    <div class="targetItem">\
-                        <div class="name">'+ _item.F_Name + '</div>\
-                        <div class="number" data-number="'+ _item.F_Id + '" ></div>\
-                    </div>';
-				$('#lr_desktop_msg_content').find('.lr-flex-content').append(_itemHtml);
-                //$content.append(_itemHtml);
-                // 获取后台数据
-                learun.httpget(config.webapi + "learun/adms/desktop/data", { type: 'Target', id: _item.F_Id }, function(data){
-                    if (data) {
-                        $('[data-number="' + data.Id + '"]').text(data.value);
-                    }
-                });
-
-            });
-
-        }
-    }
-
-
-    function refreshDeskTop($page) {
-        learun.clientdata.get('desktop', {
-            callback: function (data) {
-                //var $desktop = $('#lr_desktop_msg_content');
-                //$desktop.html('');
-				chart(data.chart || [], $page);
-                target(data.target || [], $page);
-
-                /*if (self) {
-                    self.refresh(true);
-                    self.endPulldownToRefresh();
-                }*/
-            }
-        });
-    }
-
-    var page = {
-        init: function ($page) {
-            // 基础数据初始化
-            learun.clientdata.init();
-            refreshDeskTop($page);
-           
-            $scroll = $page.find('#lr_desktop_msg').pullRefresh({
-                down: {
-                    height: 30,
-                    contentinit: '下拉可以刷新',
-                    contentdown: '下拉可以刷新',
-                    contentover: '松开立即刷新',
-                    contentrefresh: '正在刷新...',
-                    callback: function () {
-                        refreshDeskTop($page);
-                    }
-                }
-            });
-
-            // 加载功能列表
-            learun.clientdata.get('module', {
-                callback: function (data) {
-                    learun.myModule.get(data, function (myModules) {
-                        var mylen = parseInt((myModules.length + 1) / 4) + ((myModules.length + 1) % 4 > 0 ? 1 : 0);
-                        switch (mylen) {
-                            case 1:
-                                $page.find('.lr-workspace-page').css('padding-top', '210px');
-                                break;
-                            case 2:
-                                $page.find('.lr-workspace-page').css('padding-top', '290px');
-                                break;
-                            case 3:
-                                $page.find('.lr-workspace-page').css('padding-top', '370px');
-                                break;
-                        }
-
-                        var map = {};
-                        $.each(data, function (_index, _item) {
-                            map[_item.F_Id] = _item;
-                        });
-                        var $appbox = $page.find('.appbox');
-                        var $last = null;
-                        $.each(myModules, function (_index, _id) {
-                            var item = map[_id];
-                            if (item) {
-                                var _html = '\
-                                        <div class="appitem appitem2" data-value="'+ item.F_Id + '">\
-                                            <div><i class="'+ item.F_Icon + '"></i></div>\
-                                            <span>'+ item.F_Name + '</span>\
-                                        </div>';
-                                var _$html = $(_html);
-                                _$html[0].item = item;
-                                if ($last === null) {
-                                    $appbox.prepend(_$html);
-                                }
-                                else {
-                                    $last.after(_$html);
-                                }
-                                $last = _$html;
-
-                            }
-                        });
-                        $last = null;
-                    });
-                }
-            });
-        },
-        reload: function ($page, pageinfo) {
-            if (learun.isOutLogin) {// 如果是重新登录的情况刷新下桌面数据
-                learun.isOutLogin = false;
-                refreshDeskTop($page);
-                learun.clientdata.clear('module');
-                learun.myModule.states = -1;
-            }
-            // 加载功能列表
-            learun.clientdata.get('module', {
-                callback: function (data) {
-                    learun.myModule.get(data, function (myModules) {
-                        var mylen = parseInt((myModules.length + 1) / 4) + ((myModules.length + 1) % 4 > 0 ? 1 : 0);
-                        switch (mylen) {
-                            case 1:
-                                $page.find('.lr-workspace-page').css('padding-top', '210px');
-                                break;
-                            case 2:
-                                $page.find('.lr-workspace-page').css('padding-top', '290px');
-                                break;
-                            case 3:
-                                $page.find('.lr-workspace-page').css('padding-top', '370px');
-                                break;
-                        }
-
-                        var map = {};
-                        $.each(data, function (_index, _item) {
-                            map[_item.F_Id] = _item;
-                        });
-                        var $appbox = $page.find('.appbox');
-                        var $last = null;
-                        $appbox.find(".appitem2").remove();
-                        $.each(myModules, function (_index, _id) {
-                            var item = map[_id];
-                            if (item) {
-                                var _html = '\
-                                        <div class="appitem appitem2" data-value="'+ item.F_Id + '">\
-                                            <div><i class="'+ item.F_Icon + '"></i></div>\
-                                            <span>'+ item.F_Name + '</span>\
-                                        </div>';
-                                var _$html = $(_html);
-                                _$html[0].item = item;
-                                if ($last === null) {
-                                    $appbox.prepend(_$html);
-                                }
-                                else {
-                                    $last.after(_$html);
-                                }
-                                $last = _$html;
-
-                            }
-                        });
-                        $last = null;
-                    });
-                }
-            });
-            $.each(chartMap, function (id, obj) {
-                obj.resize();
-            });
-        }
-    };
-    return page;
+(function () {
+
+    var custmerform = {};
+    var $scroll = '';
+	
+	var chartMap = {};
+    // 图表数据
+    function chart(data, $page) {
+		
+        if (data.length > 0) {
+            chartMap = {};
+            $.each(data, function (_index, _item) {
+                var _html = '\
+                <div class="lr-black-panel">\
+                    <div class="lr-title">'+ _item.F_Name + '</div>\
+                    <div class="lr-content lr-chart-content">\
+                        <div class="lr-chart-container" id="'+ _item.F_Id + '"  data-desktop="' + _item.F_Type + '" ></div>\
+                    </div>\
+                </div>';
+				
+                $page.find('#lr_desktop_msg_content').append(_html);
+                chartMap[_item.F_Id] = echarts.init(document.getElementById(_item.F_Id));
+
+                // 获取后台数据
+				var data = '{"Id":"1064e045-f075-42a2-8431-ba717e1539b3","value":[{"name":"2017.07.13","value":9000.00},{"name":"2017.08.11","value":100900.00},{"name":"2017.09.25","value":0.00},{"name":"2018.04.03","value":100.00},{"name":"2018.05.21","value":2.00}]}';
+                //learun.httpget("", { type: 'chart', id: _item.F_Id }, function(data) {
+				data = JSON.parse(data);
+                    if (data) {
+                        var type = $('#' + data.Id).attr('data-desktop');
+                        var legendData = [];
+                        var valueData = [];
+                        $.each(data.value, function (_index, _item) {
+                            legendData.push(_item.name);
+                            valueData.push(_item.value);
+                        });
+                        var option = {};
+						option.tooltip = {
+							trigger: 'item',
+							formatter: "{a} <br/>{b}: {c} ({d}%)"
+						};
+						console.log(option.tooltip);
+						option.legend = {
+							orient: 'vertical',
+							left: 'left',
+							data: legendData
+						};
+						console.log(option.legend);
+						option.series = [{
+							name: '占比',
+							type: 'pie',
+							radius: ['50%', '70%'],
+							avoidLabelOverlap: false,
+							label: {
+								normal: {
+									show: false,
+									position: 'center'
+								},
+								emphasis: {
+									show: true,
+									textStyle: {
+										fontSize: '30',
+										fontWeight: 'bold'
+									}
+								}
+							},
+							labelLine: {
+								normal: {
+									show: false
+								}
+							},
+							data: data.value
+						}];
+						console.log(option.series);
+						option.color = ['#df4d4b', '#304552', '#52bbc8', 'rgb(224,134,105)', '#8dd5b4', '#5eb57d', '#d78d2f'];
+						console.log(option);
+                        chartMap[data.Id].setOption(option);
+                    }
+                //});
+            });
+        }
+    }
+
+    // 统计数据
+    function target(data, $page) {
+        if (data.length > 0) {
+            var _html = '\
+            <div class="lr-black-panel">\
+                <div class="lr-title">统计数据</div>\
+                <div class="lr-content lr-flex-content">\
+                </div>\
+            </div>';
+            $page.find('#lr_desktop_msg_content').append(_html);
+            //var $content = $desktop.find('.lr-flex-content');
+            $.each(data, function (_index, _item) {
+                var _itemHtml = '\
+                    <div class="targetItem">\
+                        <div class="name">'+ _item.F_Name + '</div>\
+                        <div class="number" data-number="'+ _item.F_Id + '" ></div>\
+                    </div>';
+				$('#lr_desktop_msg_content').find('.lr-flex-content').append(_itemHtml);
+                //$content.append(_itemHtml);
+                // 获取后台数据
+                learun.httpget(config.webapi + "learun/adms/desktop/data", { type: 'Target', id: _item.F_Id }, function(data){
+                    if (data) {
+                        $('[data-number="' + data.Id + '"]').text(data.value);
+                    }
+                });
+
+            });
+
+        }
+    }
+
+
+    function refreshDeskTop($page) {
+        learun.clientdata.get('desktop', {
+            callback: function (data) {
+                //var $desktop = $('#lr_desktop_msg_content');
+                //$desktop.html('');
+				chart(data.chart || [], $page);
+                target(data.target || [], $page);
+
+                /*if (self) {
+                    self.refresh(true);
+                    self.endPulldownToRefresh();
+                }*/
+            }
+        });
+    }
+
+    var page = {
+        init: function ($page) {
+            // 基础数据初始化
+            learun.clientdata.init();
+            refreshDeskTop($page);
+           
+            $scroll = $page.find('#lr_desktop_msg').pullRefresh({
+                down: {
+                    height: 30,
+                    contentinit: '下拉可以刷新',
+                    contentdown: '下拉可以刷新',
+                    contentover: '松开立即刷新',
+                    contentrefresh: '正在刷新...',
+                    callback: function () {
+                        refreshDeskTop($page);
+                    }
+                }
+            });
+
+            // 加载功能列表
+            learun.clientdata.get('module', {
+                callback: function (data) {
+                    learun.myModule.get(data, function (myModules) {
+                        var mylen = parseInt((myModules.length + 1) / 4) + ((myModules.length + 1) % 4 > 0 ? 1 : 0);
+                        switch (mylen) {
+                            case 1:
+                                $page.find('.lr-workspace-page').css('padding-top', '210px');
+                                break;
+                            case 2:
+                                $page.find('.lr-workspace-page').css('padding-top', '290px');
+                                break;
+                            case 3:
+                                $page.find('.lr-workspace-page').css('padding-top', '370px');
+                                break;
+                        }
+
+                        var map = {};
+                        $.each(data, function (_index, _item) {
+                            map[_item.F_Id] = _item;
+                        });
+                        var $appbox = $page.find('.appbox');
+                        var $last = null;
+                        $.each(myModules, function (_index, _id) {
+                            var item = map[_id];
+                            if (item) {
+                                var _html = '\
+                                        <div class="appitem appitem2" data-value="'+ item.F_Id + '">\
+                                            <div><i class="'+ item.F_Icon + '"></i></div>\
+                                            <span>'+ item.F_Name + '</span>\
+                                        </div>';
+                                var _$html = $(_html);
+                                _$html[0].item = item;
+                                if ($last === null) {
+                                    $appbox.prepend(_$html);
+                                }
+                                else {
+                                    $last.after(_$html);
+                                }
+                                $last = _$html;
+
+                            }
+                        });
+                        $last = null;
+                    });
+                }
+            });
+        },
+        reload: function ($page, pageinfo) {
+            if (learun.isOutLogin) {// 如果是重新登录的情况刷新下桌面数据
+                learun.isOutLogin = false;
+                refreshDeskTop($page);
+                learun.clientdata.clear('module');
+                learun.myModule.states = -1;
+            }
+            // 加载功能列表
+            learun.clientdata.get('module', {
+                callback: function (data) {
+                    learun.myModule.get(data, function (myModules) {
+                        var mylen = parseInt((myModules.length + 1) / 4) + ((myModules.length + 1) % 4 > 0 ? 1 : 0);
+                        switch (mylen) {
+                            case 1:
+                                $page.find('.lr-workspace-page').css('padding-top', '210px');
+                                break;
+                            case 2:
+                                $page.find('.lr-workspace-page').css('padding-top', '290px');
+                                break;
+                            case 3:
+                                $page.find('.lr-workspace-page').css('padding-top', '370px');
+                                break;
+                        }
+
+                        var map = {};
+                        $.each(data, function (_index, _item) {
+                            map[_item.F_Id] = _item;
+                        });
+                        var $appbox = $page.find('.appbox');
+                        var $last = null;
+                        $appbox.find(".appitem2").remove();
+                        $.each(myModules, function (_index, _id) {
+                            var item = map[_id];
+                            if (item) {
+                                var _html = '\
+                                        <div class="appitem appitem2" data-value="'+ item.F_Id + '">\
+                                            <div><i class="'+ item.F_Icon + '"></i></div>\
+                                            <span>'+ item.F_Name + '</span>\
+                                        </div>';
+                                var _$html = $(_html);
+                                _$html[0].item = item;
+                                if ($last === null) {
+                                    $appbox.prepend(_$html);
+                                }
+                                else {
+                                    $last.after(_$html);
+                                }
+                                $last = _$html;
+
+                            }
+                        });
+                        $last = null;
+                    });
+                }
+            });
+            $.each(chartMap, function (id, obj) {
+                obj.resize();
+            });
+        }
+    };
+    return page;
 })();

+ 1 - 1
scripts/index.js

@@ -72,7 +72,7 @@
 		*/
         var logininfo = learun.storage.get('logininfo');
         if (logininfo) {// 有登录的token
-            learun.tab.go('workspace');
+			learun.nav.go({ path: 'amap', title: '地图', type: 'right', isBack: false });
         }
         else {
             learun.nav.go({ path: 'login', isBack: false, isHead: false });