Bladeren bron

微信界面

dgf 8 jaren geleden
bovenliggende
commit
d52affc538

File diff suppressed because it is too large
+ 33 - 23
dist/web12345-new/app-cf557bfa80.js


File diff suppressed because it is too large
+ 1 - 1
dist/web12345-new/app-1c7bf992dc.css


+ 2 - 2
dist/web12345-new/index.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
     <link rel="stylesheet" href="../bower_components/animate.css/animate.min.css">
     <link rel="stylesheet" href="../bower_components/swiper/dist/css/swiper.min.css">
-    <link rel="stylesheet" href="app-1c7bf992dc.css">
+    <link rel="stylesheet" href="app-8a7c769e0b.css">
 
     <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
     <!--<script src="js/jquery.min.js"></script>-->
@@ -24,7 +24,7 @@
     <script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
     <script src="../bower_components/angular-animate/angular-animate.min.js"></script>
 
-    <script src="app-cf557bfa80.js"></script>
+    <script src="app-08ab8a7bcf.js"></script>
 </head>
 
 <body ng-app="app">

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

@@ -91,7 +91,7 @@ angular.module('app').controller('HomeController', ['$scope', '$state', '$timeou
         console.log($scope.sdk);
         $scope.mobile = "";
         var activeClick = $(e.target);
-        console.log(activeClick);
+        //console.log(activeClick);
         if (!$scope.getAddSuccess) {
             alert("获取地址失败,请开启手机GPS定位功能,并允许获取地理位置授权");
             window.location.reload();
@@ -107,7 +107,7 @@ angular.module('app').controller('HomeController', ['$scope', '$state', '$timeou
     };
 
     $scope.onlineService = function() {
-        console.log($scope.mobile, $scope.sdk);
+        //console.log($scope.mobile, $scope.sdk);
         if ($scope.mobile.length == 11 && $scope.sdk) {
             ysf.config({
                 uid: $scope.mobile, // 用户Id

+ 10 - 5
web12345-new/src/js/controller/webController.js

@@ -95,6 +95,7 @@ angular.module('app').controller('WebController', ['$scope', '$timeout', 'userSe
     // };
 
     $scope.submit = function() {
+        $scope.submiting = true;
         var imgs = $(".images");
         for (var i = 0, len = imgs.length; i < len; i++) {
             $scope.bundle.imgSources.push({ type: 1, source: imgs[i].firstElementChild.src });
@@ -102,12 +103,16 @@ angular.module('app').controller('WebController', ['$scope', '$timeout', 'userSe
         $scope.bundle.descr = $(".descr")[0].textContent;
         $scope.bundle.position = $scope.position;
         console.log($scope.bundle);
+        $timeout(function() {
+            $scope.submiting = false;
+            $scope.successed = true;
+        }, 3000);
         //messageService.submit($scope.bundle, "successCallback", "failsCallback");
-        $scope.bundle.uesrName = "";
-        $scope.bundle.uesrMobile = "";
-        $scope.bundle.descr = $(".descr")[0].textContent = "";
-        $scope.bundle.position = {};
-        $scope.bundle.imgSources = [];
+        // $scope.bundle.uesrName = "";
+        // $scope.bundle.uesrMobile = "";
+        // $scope.bundle.descr = $(".descr")[0].textContent = "";
+        // $scope.bundle.position = {};
+        // $scope.bundle.imgSources = [];
     };
 
     $scope.imgPreview = function(fileDom) {

+ 20 - 15
web12345-new/src/js/directive/webChat.js

@@ -12,9 +12,10 @@
             restrict: 'E',
             template: '<div id="container"></div>',
             replace: true,
-            // scope: {
-            //     options: '='
-            // }
+            scope: false
+                // scope: {
+                //     options: '='
+                // }
         };
         return directive;
 
@@ -46,32 +47,36 @@
                 AMap.event.addListener(geolocation, 'error', onError); //返回定位出错信息
 
                 function onComplete(data) {
+                    map.clearMap();
                     scope.position = data;
                     var geocoder = new AMap.Geocoder({
                         radius: 1000,
                         extensions: "all"
                     });
+                    var marker = new AMap.Marker({
+                        map: map,
+                        bubble: false,
+                        visible: true
+                    });
+
                     geocoder.getAddress(data.position, function(status, result) {
                         if (status == 'complete' && result.info === 'OK') {
-                            console.log(result);
-                            $("#result")[0][0].innerHTML = result.regeocode.formattedAddress.substring(6);
-                            $("#result")[0][1].innerHTML = result.regeocode.pois[0].name;
-                            $("#result")[0][2].innerHTML = result.regeocode.pois[1].name;
+                            //console.log(result);
+                            $("#result")[0][0].textContent = result.regeocode.formattedAddress.substring(6);
+                            $("#result")[0][1].textContent = result.regeocode.pois[0].name;
+                            $("#result")[0][2].textContent = result.regeocode.pois[1].name;
                         }
                     });
-                    var marker = new AMap.Marker({
-                        map: map,
-                        bubble: true,
-                    });
+
                     map.on('click', function(e) {
                         marker.setPosition(e.lnglat);
                         geocoder.getAddress(e.lnglat, function(status, result) {
                             if (status == 'complete' && result.info === 'OK') {
-                                console.log($("#result"));
+                                //console.log($("#result"));
                                 //var sub = result.regeocode.formattedAddress.indexOf(result.regeocode.aois[0].name)
-                                $("#result")[0][0].innerHTML = result.regeocode.formattedAddress.substring(6);
-                                $("#result")[0][1].innerHTML = result.regeocode.pois[0].name;
-                                $("#result")[0][2].innerHTML = result.regeocode.pois[1].name;
+                                $("#result")[0][0].textContent = result.regeocode.formattedAddress.substring(6);
+                                $("#result")[0][1].textContent = result.regeocode.pois[0].name;
+                                $("#result")[0][2].textContent = result.regeocode.pois[1].name;
                                 $("#result")[0].selectedIndex = 0;
                             }
                         })

+ 52 - 32
web12345-new/src/less/app.main.less

@@ -157,6 +157,7 @@ content {
     }
     .userInfo {
         background-color: #FFF;
+        margin-top: -2px;
         >div {
             margin: 15px 10%;
             line-height: normal;
@@ -347,46 +348,65 @@ content {
                     color: #999;
                 }
             }
-
-            >.modal-info {
-                &.ng-hide {
-                    opacity: 0;
-                }
-                opacity: 1;
-                transition: all linear 0.1s;
-                -webkit-transition: all linear 0.1s;
-                position: absolute;
+            >.sure {
                 top: 180px;
-                width: 80%;
-                margin: 0px 10%;
-                padding: 5%;
                 text-align: left;
-                font-family: "Arial","Microsoft YaHei","宋体",sans-serif;
-                box-shadow: 0px 1px 1px #888;
-                background-color: #FFF;
-                border-radius: 4px;
+            }
+        }
+        .information {
+            top: 0%;
+            margin: 0px;
+            padding: 0px;
+            background-color: transparent;
+            >.submit {
+                width: 100%;
+                margin: 0%;
+                padding: 25px 5%;
+                border-radius: 0px;
                 >p {
-                    font-size: 16px;
-                    color: #000;
-                    margin-bottom: 20px;
-                }
-                >a {
-                    float: right;
                     font-size: 15px;
-                    margin: 10px 10px 0px 15px;
-                    color: #03AD46;
-                    &:hover,&:focus {
-                        text-decoration: none;
-                    }
-                    &:active, .open>.dropdown-toggle.btn-default{
-                        text-decoration: none;
-                        color: #999;
-                    }
+                }
+            }
+        }
+        .modal-info {
+            &.ng-hide {
+                opacity: 0;
+            }
+            opacity: 1;
+            transition: all linear 0.25s;
+            -webkit-transition: all linear 0.25s;
+            position: absolute;
+            top: 220px;
+            width: 80%;
+            margin: 0px 10%;
+            padding: 5%;
+            text-align: center;
+            font-family: "Arial","Microsoft YaHei","宋体",sans-serif;
+            box-shadow: 0px 1px 1px #888;
+            border-top: 1px solid #ddd;
+            background-color: #FFF;
+            border-radius: 4px;
+            >p {
+                font-size: 16px;
+                color: #000;
+                margin-bottom: 20px;
+            }
+            >a {
+                float: right;
+                font-size: 15px;
+                margin: 10px 10px 0px 15px;
+                color: #03AD46;
+                &:hover,&:focus {
+                    text-decoration: none;
+                }
+                &:active, .open>.dropdown-toggle.btn-default{
+                    text-decoration: none;
+                    color: #999;
                 }
             }
         }
         .button-bottom{
-            margin: 0px 10% 20px;
+            margin: 0px 10% 15px;
             .btn-default{
                 line-height: normal;
                 height: 36px;

+ 13 - 3
web12345-new/src/templates/webChat-5.html

@@ -26,16 +26,26 @@
             </select>
             <div class="glyphicon glyphicon-map-marker cover-white"></div>
             <div class="text-map">
-                <gaode-map options="mapOptions" style="height:180px"></gaode-map>
+                <gaode-map id="container"></gaode-map>
             </div>
         </div>
         <div class="button-bottom">
-            <button type="button" class="btn btn-default" ng-click="submit()">提交</button>
+            <button type="button" class="btn btn-default" ng-click="submit()" data-toggle="modal" data-target="#information">提交</button>
+        </div>
+        <div class="modal fade information" id="information" tabindex="-2" data-backdrop="static" role="dialog" aria-labelledby="infoModalLabel" aria-hidden="true">
+            <div class="modal-info submit" ng-show="submiting">
+                <p>&nbsp<img src="../img/Loading.gif" alt="">&nbsp&nbsp&nbsp</p>
+                <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>
+            </div>
         </div>
         <div class="modal fade viewModal" id="viewModal" tabindex="-2" data-backdrop="static" role="dialog" aria-labelledby="viewModalLabel" aria-hidden="true">
             <button type="button" class="close" aria-hidden="true" ng-click="sure=true"><span class="glyphicon glyphicon-trash"></span></button>
             <a class="thumbnail image-view"></a>
-            <div class="modal-info" ng-show="sure">
+            <div class="modal-info sure" ng-show="sure">
                 <p>确定删除?</p>
                 <a data-dismiss="modal" ng-click="delSure()">确定</a>
                 <a ng-click="sure=flase" style="color:#888;">取消</a>