dgf 8 vuotta sitten
vanhempi
commit
4e08d59747

+ 16 - 0
lszw12345/src/js/controller/serviceController.js

@@ -0,0 +1,16 @@
+'use strict';
+
+angular.module('app').controller('ServiceController', ['$scope', 'messageService', function($scope, messageService) {
+    //lxtalkClient.Invoke('{FB60F992-A0FD-47B3-AAA7-E80DF209C5A4}', '_Register', '', $scope);
+    messageService.getCounty(function(response) {
+        console.log("Success", response);
+        $scope.branchs = response.data;
+    }, function(error) { console.log("error!"); });
+
+    $scope.listView = function(id) {
+        console.log(id);
+        messageService.getByBranch(id, function(response) {
+            console.log("Success", response);
+        }, function(error) { console.log("error!"); });
+    };
+}]);

+ 1 - 11
lszw12345/src/js/controller/webController.js

@@ -1,16 +1,6 @@
 'use strict';
 
-angular.module('app').controller('WebController', ['$scope', 'messageService', function($scope, messageService) {
+angular.module('app').controller('WebController', ['$scope', function($scope) {
     //lxtalkClient.Invoke('{FB60F992-A0FD-47B3-AAA7-E80DF209C5A4}', '_Register', '', $scope);
-    messageService.getCounty(function(response) {
-        console.log("Success", response);
-        $scope.branchs = response.data;
-    }, function(error) { console.log("error!"); });
 
-    $scope.listView = function(id) {
-        console.log(id);
-        messageService.getByBranch(id, function(response) {
-            console.log("Success", response);
-        }, function(error) { console.log("error!"); });
-    };
 }]);

+ 2 - 2
lszw12345/src/js/router.js

@@ -20,12 +20,12 @@ angular.module('app').run(['$rootScope', '$state', '$stateParams',
             .state('webChat.service', {
                 url: '/service',
                 templateUrl: 'templates/service.html',
-                controller: 'WebController'
+                controller: 'ServiceController'
             })
             .state('webChat.maxOne', {
                 url: '/maxOne',
                 templateUrl: 'templates/maxOne.html',
-                controller: 'WebController'
+                controller: 'ServiceController'
             })
             .state('webChat.guide', {
                 url: '/guide',

+ 1 - 0
lszw12345/src/less/app.main.less

@@ -51,3 +51,4 @@ body{
       margin-top: 2px;
   }
 }
+

+ 4 - 6
lszw12345/src/templates/service.html

@@ -1,9 +1,7 @@
-<div class="header">
-    <span onClick="javascript :history.back(-1);" class="glyphicon glyphicon-arrow-left"></span><span>服务事项</span><span ui-sref="home" class="glyphicon glyphicon-home"></span>
-</div>
-
 <div class="service-content">
-
+    <div class="header">
+        <span onClick="javascript :history.back(-1);" class="glyphicon glyphicon-arrow-left"></span><span>服务事项</span><span ui-sref="home" class="glyphicon glyphicon-home"></span>
+    </div>
 
     <p ng-repeat="branch in branchs track by $index" ng-click="listView(branch.GUID)"> <span class="glyphicon glyphicon-link"></span>&nbsp{{branch.ShortName}}</p>
     <!--<p> <span class="glyphicon glyphicon-link"></span>&nbsp市经信委</p>
@@ -13,6 +11,7 @@
     <P> <span class="glyphicon glyphicon-link"></span>&nbsp市民宗局</P>
     <p> <span class="glyphicon glyphicon-link"></span>&nbsp市公安局</p>
 
+
     <P> <span class="glyphicon glyphicon-link"></span>&nbsp市民政局</P>
     <p> <span class="glyphicon glyphicon-link"></span>&nbsp市司法局</p>
 
@@ -133,5 +132,4 @@
     <P> <span class="glyphicon glyphicon-link"></span>&nbsp党史方志办</P>
     <p> <span class="glyphicon glyphicon-link"></span>&nbsp丽水供电公司</p>-->
 
-
 </div>