lqq vor 8 Jahren
Ursprung
Commit
bacbc7a2ba

+ 2 - 1
web12345-new/src/js/controller/homeController.js

@@ -92,6 +92,7 @@ angular.module('app').controller('HomeController', ['$scope', '$state', '$timeou
         console.log($scope.sdk);
         
         var activeClick = $(e.target);
+        //activeClick[0].parentElement.dataset.target = "#phoneLoginModal";
         if (!$scope.getAddSuccess) {
             alert("获取地址失败,请开启手机GPS定位功能,并允许获取地理位置授权");
             window.location.reload();
@@ -109,7 +110,7 @@ angular.module('app').controller('HomeController', ['$scope', '$state', '$timeou
     $scope.onlineService = function() {
         //console.log($scope.mobile, $scope.sdk);
         if ($scope.currentUser.Mobile.length == 11 && $scope.sdk) {
-            userService.update();
+            userService.update($scope.currentUser);
             ysf.config({
                 uid: $scope.currentUser.Id, // 用户Id
                 name: $scope.currentUser.Nickname, // 用户名称

+ 9 - 9
web12345-new/src/js/service/auth2Service.js

@@ -5,9 +5,9 @@
         .module('app')
         .service('auth2Service', auth2Service);
 
-    auth2Service.$inject = ['$cookies', '$http'];
+    auth2Service.$inject = ['$cookies', '$http', '$location'];
 
-    function auth2Service($cookies, $http) {
+    function auth2Service($cookies, $http, $location) {
         this.checkAuthByResponse = checkAuthByResponse;
         this.checkAuthByCookie = checkAuthByCookie;
         this.checkAuthByServer = checkAuthByServer;
@@ -19,16 +19,16 @@
         }
 
         function checkAuthByServer() {
-            $http.get('/api/auth/check').then(
-                function () {
-
-                },
-                checkAuthByResponse
-            );
+            $http.get($cookies.get('BaseUrl') + '/api/auth/check').then(
+                function () {
+
+                },
+                checkAuthByResponse
+            );
         }
 
         function checkAuthByCookie() {
-            return $cookies.user != "" || $cookies.user != undefined;
+            return $cookies.get('User') != "" || $cookies.get('User') != undefined;
         }
     }
 })();

+ 10 - 2
web12345-new/src/js/service/messageService.js

@@ -1,10 +1,18 @@
 'use strict';
 
-angular.module('app').service('messageService', ['$http', '$cookies', 'userService', function($http, $cookies, userService) {
+angular.module('app').service('messageService', ['$http', '$cookies', '$location', 'userService', function($http, $cookies, $location, userService) {
     var self = this;
 
     this.submit = function(bundle, successCallback, failsCallback) {
         bundle.userId = userService.getMe().Id;
-        $http.post('/api/bundle', bundle).then(successCallback, failsCallback);
+        $http.post($cookies.get('BaseUrl') + '/api/bundle', bundle).then(successCallback, failsCallback);
+    }
+
+    this.getAll = function (successCallback, failsCallback) {
+        $http.get($cookies.get('BaseUrl') + '/api/bundle/all').then(successCallback, failsCallback);
+    }
+
+    this.getDe = function (bundleId, successCallback, failsCallback) {
+        $http.get($cookies.get('BaseUrl') + '/api/bundle/detail/' + bundleId).then(successCallback, failsCallback);
     }
 }]);

+ 5 - 4
web12345-new/src/js/service/userService.js

@@ -22,7 +22,7 @@
             }
 
             if (this.me === undefined)
-                $http.get('/api/user').then(
+                $http.get($cookies.get('BaseUrl') + '/api/user').then(
                     function(response) {
                         this.me = response.data;
                     },
@@ -31,11 +31,12 @@
                         auth2Service.checkAuthByResponse(response);
                     }
                 );
+            return this.me;
         }
 
-        function update() {
-            if (this.me.Id != undefined)
-                $http.post('/api/user', this.me).then(
+        function update(u) {
+            if (u.Id != undefined)
+                $http.post($cookies.get('BaseUrl') + '/api/user', u).then(
                     function (response) {
                         console.log(response.data)
                     },

+ 4 - 0
web12345-new/src/less/app.home.less

@@ -127,6 +127,10 @@ html {
         }
     }
 }
+.info {
+    top: 10% !important;
+    background-color: transparent !important;
+}
 .fade {
     top: 0%;
     margin: 0px;

+ 10 - 4
web12345-new/src/templates/home.html

@@ -43,13 +43,13 @@
                     <img class="breath size3" ng-click="onOnlineClick($event)" src="../img/webChatImg/在线服务.png" alt=""><span ng-click="onOnlineClick($event)" class="explain">在线服务</span>
                 </a>
             </div>
-            <div class="email" ng-cloak onclick="alert('此功能正在全力开放中,敬请期待')">
-                <a ui-sref="webChat.online">
+            <div class="email" ng-cloak >
+                <a data-toggle="modal" data-target="#info" href=""><!--ui-sref="webChat.online"-->
                     <img class="breath size4" src="../img/webChatImg/网上信箱.png" alt="" ><span class="explain">网上信箱</span>
                 </a>
             </div>
-            <div class="result" ng-cloak onclick="alert('此功能正在全力开放中,敬请期待')">
-                <a href="">
+            <div class="result" ng-cloak >
+                <a data-toggle="modal" data-target="#info" href="">
                     <img class="breath size5" src="../img/webChatImg/结果查询.png" alt=""><span class="explain">结果查询</span>
                 </a>
             </div>
@@ -59,6 +59,12 @@
             </div>
         </div>
     </footer>
+        <div class="modal fade info" id="info" tabindex="-2" data-backdrop="static" role="dialog" aria-labelledby="infoModalLabel" aria-hidden="true">
+        <div class="modal-info">
+            <p>此功能正在全力开发中,敬请期待</p>
+            <a href="" data-dismiss="modal" style="color:#888;">关闭</a>
+        </div>
+    </div>
     <div class="modal fade errorLogin" id="errorLoginModal" tabindex="-2" data-backdrop="static" role="dialog" aria-labelledby="errorLoginModalLabel" aria-hidden="true">
         <div class="modal-info">
             <p>{{addr.regeocode.addressComponent.district}}暂不支持此功能</p>

+ 2 - 2
web12345-new/src/templates/webChat-5.html

@@ -38,8 +38,8 @@
                 <p style="margin:-5px auto 0px;">&nbsp正在上传数据 . . .</p>
             </div>
             <div class="modal-info success" ng-show="successed">
-                <p>上传成功</p>
-                <a data-dismiss="modal" ng-click="successed=flase">确定</a>
+                <p>此功能暂未开放,敬请期待</p>
+                <a data-dismiss="modal" ng-click="successed=false">确定</a>
             </div>
         </div>
         <div class="modal fade viewModal" id="viewModal" tabindex="-2" data-backdrop="static" role="dialog" aria-labelledby="viewModalLabel" aria-hidden="true">