Browse Source

微信界面

dgf 8 years ago
parent
commit
94176b5693

+ 1 - 0
ApabiReader1.7.8/apabiReader.html

@@ -21,6 +21,7 @@
             <p id="load">
                 <a href="http://www.apabi.cn/download/product/ApabiReaderforAndroid/ApabiReader1.7.8.apk"><img border="0" src="djxz.jpg" alt="下载文件"></a>
             </p>
+            <p>(通过在浏览器打开)</p>
         </div>
     </div>
 </body>

BIN
dist/img/webChatImg/易拉宝1.jpg


BIN
dist/img/webChatImg/绿茶 - 副本.jpg


BIN
dist/img/webChatImg/绿茶.jpg


File diff suppressed because it is too large
+ 1 - 0
dist/web12345-pageView/app-56b253ceef.js


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


File diff suppressed because it is too large
+ 0 - 1
dist/web12345-pageView/app-f22b6ec9e6.js


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

@@ -8,7 +8,7 @@
     <!-- 新 Bootstrap 核心 CSS 文件 -->
     <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="app-e9403b1fe7.css">
+    <link rel="stylesheet" href="app-9dcd625cf6.css">
 
     <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
     <script src="http://webapi.amap.com/maps?v=1.3&key=d7455920303550a45cb4e1a27bdbfc86"></script>
@@ -20,7 +20,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-f22b6ec9e6.js"></script>
+    <script src="app-56b253ceef.js"></script>
 </head>
 
 <body ng-app="app">

+ 45 - 36
web12345-pageView/src/js/controller/pageViewController.js

@@ -1,11 +1,8 @@
 'use strict';
 
-angular.module('app').controller('PageViewController', ['$scope', '$filter', function($scope, $filter) {
+angular.module('app').controller('PageViewController', ['$scope', function($scope) {
 
     //lxtalkClient.Invoke('{FB60F992-A0FD-47B3-AAA7-E80DF209C5A4}', '_Register', '', $scope);
-    $scope.now = new Date();
-    $scope.nowDate = $filter("date")($scope.now, "yyyy-MM-dd HH:mm:ss");
-    $scope.createDate = $scope.nowDate;
     $scope.user = {
         name: '客服一',
         password: '12345678',
@@ -18,46 +15,58 @@ angular.module('app').controller('PageViewController', ['$scope', '$filter', fun
 
     $scope.$on('$viewContentLoaded', function() {
         var clientWidth = document.documentElement.clientWidth || window.innerWidth;
-        var innerWidth = Math.max(Math.min(clientWidth, 640), 320);
+        var innerWidth = Math.max(Math.min(clientWidth, 600), 320);
+        var imgNum = $("#imgpreview").find('img').length;
         console.log(innerWidth);
-        if (innerWidth > 640) {
-            angular.element(".userInfo>div>span").addClass("font-14");
-            angular.element(".certificate").addClass("font-14");
-            angular.element(".userInfo .input-sm ").addClass("font-13");
-            angular.element(".userInfo .text-message").addClass("font-13");
-        } else {
+        if (innerWidth > 480) {
+            angular.element(".font-13").removeClass("font-13");
+            angular.element("#content >p ").addClass("font-14");
+            angular.element("#content .text-message").addClass("font-14");
+            angular.element(".thumbnail").addClass("img-pc");
+        } else if (innerWidth >= 350 && innerWidth <= 480) {
+            angular.element(".font-14").removeClass("font-14");
+            angular.element(".thumbnail").removeClass("img-pc");
+            angular.element("#content >p ").addClass("font-13");
+            angular.element("#content .text-message").addClass("font-13");
+            angular.element(".viewModal").addClass("phone");
+            if (imgNum == 0) {
+                angular.element(".images").addClass("one");
+            } else if (imgNum == 1) {
+                angular.element(".images").removeClass("one");
+                angular.element(".images").addClass("two");
+            } else if (imgNum >= 2) {
+                angular.element(".images").removeClass("two");
+                angular.element(".images").addClass("three");
+            }
+        } else if (innerWidth < 350) {
             angular.element(".font-13").removeClass("font-13");
             angular.element(".font-14").removeClass("font-14");
+            angular.element(".thumbnail").removeClass("img-pc");
+            angular.element(".viewModal").addClass("phone");
+            if (imgNum == 0) {
+                angular.element(".images").addClass("one");
+            } else if (imgNum == 1) {
+                angular.element(".images").removeClass("one");
+                angular.element(".images").addClass("two");
+            } else if (imgNum >= 2) {
+                angular.element(".images").removeClass("two");
+                angular.element(".images").addClass("three");
+            }
         }
     });
 
-    $scope.imgPreview = function(fileDom) {
-        //判断是否支持FileReader
-        if (window.FileReader) {
-            var reader = new FileReader();
+    $scope.imgView = function(event) {
+        angular.element(".onView").removeClass("onView");
+        var img = $(event.target);
+        img[0].className = "onView";
+        if (img[0].naturalWidth > img[0].naturalHeight) {
+            angular.element(".image-view").addClass("width-Img");
         } else {
-            alert("您的设备不支持图片预览功能,如需该功能请升级您的设备!");
-        }
-
-        //获取文件
-        var file = fileDom.files[0];
-        var imageType = /^image\//;
-        //是否是图片
-        if (!imageType.test(file.type)) {
-            alert("请选择图片!");
-            return;
+            angular.element(".image-view").removeClass("width-Img");
         }
-        //读取完成
-        console.log(file);
-        reader.onload = function(e) {
-            // //获取图片dom
-            // var img = document.getElementById("preview");
-            // //图片路径设置为读取的图片
-            //img.src = e.target.result;
-            console.log("e.target.result");
-            $("#imgadd").append('<a href="#" class="thumbnail"><img src="' + e.target.result + '"></a>');
-        };
-        reader.readAsDataURL(file);
+        $scope.imgUrl = img[0].src;
+        $(".image-big").remove();
+        $(".image-view").append('<img class="image-big" src="' + $scope.imgUrl + '" data-dismiss="modal">');
     };
 
 }]);

+ 48 - 35
web12345-pageView/src/js/directive/webChat.js

@@ -12,18 +12,19 @@
             restrict: 'E',
             template: '<div id="container"></div>',
             replace: true,
-            scope: {
-                options: '='
-            }
+            scope: false
+                // scope: {
+                //     options: '='
+                // }
         };
         return directive;
 
-        function link($scope, element, attrs) {
+        function link(scope, element, attrs) {
             var map, geolocation, marker, geocoder;
             //加载地图,调用浏览器定位服务
             map = new AMap.Map('container', {
                 resizeEnable: true,
-                zoom: 18
+                zoom: 17
             });
             map.plugin('AMap.Geolocation', function() {
                 geolocation = new AMap.Geolocation({
@@ -42,42 +43,54 @@
                 });
                 map.addControl(geolocation);
                 geolocation.getCurrentPosition();
+                AMap.event.addListener(geolocation, 'complete', onComplete); //返回定位信息
+                AMap.event.addListener(geolocation, 'error', onError); //返回定位出错信息
 
-                // AMap.event.addListener(geolocation, 'complete', function(ret) {
-                //     console.log(ret.message);
-                // }); //返回定位信息
-                // AMap.event.addListener(geolocation, 'error', function(ret) {
-                //     console.log(ret.message);
-                // }); //返回定位出错信息
+                function onComplete(data) {
+                    map.clearMap();
+                    scope.mapPosition = data;
+                    var geocoder = new AMap.Geocoder({
+                        radius: 1000,
+                        extensions: "all"
+                    });
+                    var marker = new AMap.Marker({
+                        map: map,
+                        bubble: false,
+                        visible: true
+                    });
 
-                // marker = new AMap.Marker({
-                //     map: map,
-                //     bubble: true,
-                //     content: '<div class="marker-route marker-marker-bus-from"></div>' //自定义点标记覆盖物内容,
-                // });
+                    geocoder.getAddress(data.position, function(status, result) {
+                        if (status == 'complete' && result.info === 'OK') {
+                            //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;
+                        } else {
+                            alert("错误A:定位失败");
+                        }
+                    });
 
-                // marker.setLabel({
-                //     offset: new AMap.Pixel(20, 0),
-                //     content: "我在这里"
-                // });
-                // //geocoder = new AMap.Geocoder({});
-                // map.on('click', function(e) {
-                //     marker.setPosition(e.lnglat);
-                //     geocoder.getAddress(e.lnglat, function(status, result) {
-                //         if (status == 'complete') {
-                //             document.getElementById('input').value = result.regeocode.formattedAddress
-                //         }
-                //     });
-                // });
+                    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"));
+                                //var sub = result.regeocode.formattedAddress.indexOf(result.regeocode.aois[0].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;
+                            } else {
+                                alert("错误B:定位失败");
+                            }
+                        });
+                    });
+                }
+
+                function onError(data) {}
 
             });
 
-            // $scope.$watch("options", function(newValue, oldValue) {
-            //     if ($scope.options) {
-            //         map.setCenter([$scope.options.lng, $scope.options.lat]);
-            //         marker.setPosition([$scope.options.lng, $scope.options.lat]);
-            //     }
-            // }, true);
         }
     }
 })();

+ 110 - 40
web12345-pageView/src/less/app.main.less

@@ -2,32 +2,14 @@
 /* 滚动槽 */::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px #FFFFFF; border-radius: 3px;}
 /* 滚动条滑块 */::-webkit-scrollbar-thumb { border-radius: 3px; background: #ccc; -webkit-box-shadow: inset 0 0 6px transparent;}::-webkit-scrollbar-thumb:window-inactive { background: transparent;}
 
-/*.fadeOutLeftBig {
-	-webkit-animation-name: fadeOutLeftBig;
-	animation-name: fadeOutLeftBig;
-}
-.fadeInRightBig {
-	-webkit-animation-name: fadeInRightBig;
-	animation-name: fadeInRightBig;
-}
-
-.fade-in-right-big.ng-enter {
-  -webkit-animation: fadeInRightBig 5s;
-          animation: fadeInRightBig 5s;
-}
-
-.fade-in-right-big.ng-leave {
-  -webkit-animation: fadeOutLeftBig 1s;
-          animation: fadeOutLeftBig 1s;
-}*/
 body {
     height: 100%;
     width: 100%;
 }
 
 .pageView {
-    height: 100%;
-    margin: 15px 5%;
+    ::-webkit-scrollbar { width: 6px;}
+    margin: 15px 5% 50px;
     font-family: "微软雅黑","宋体";
     font-size: 12px;
     #title {
@@ -35,32 +17,120 @@ body {
         font-size: 15px;
         font-weight: bold;
     }
+    #content {
+        >p {
+            font-weight: bold;
+        }
+        span {
+            font-weight: normal;
+        }
+        .font-13 {
+            font-size: 13px;
+        }
+        .font-14 {
+            font-size: 14px;
+        }
+        #imgpreview {
+            padding: 0px;
+            max-width: 100%;
+            white-space: normal;
+            .thumbnail {
+                display: inline-block;
+                margin: 2px 0px;
+                padding: 3px;
+                &.img-pc {
+                    max-width: 250px;
+                }
+            }
+            .one {
+                width: 100%;
+            }
+            .two {
+                width: 50%;
+            }
+            .three {
+                width: 32.5%;
+            }
+        }
+        .text-map {
+            width: 100%;
+            height: 205px;
+            margin-top: 2px;
+            padding: 2px 5px;
+            background-color: #FFF;
+            color: #444;
+            border: 1px solid #ddd;
+            font-weight: 500;
+            &:focus {
+                outline: none;
+                border: 1px solid #5bc0de;
+            }
+        }
+        #result {
+            width: 100%;
+            padding: 2px 0px; 
+            border: none;
+            outline: none;
+            box-shadow: none;
+            border-radius: 0px;
+            color: #000;
+        }
+        .cover-white {
+            height:20px;
+            width:20px;
+            font-size: 14px;
+            background-color: #FFF;
+            color: #3FA1E6;
+            float: right;
+            padding: 3px 3px 0px 0px;
+            margin-top: -22px;
+        }
+    }
+    .viewModal {
+        overflow: hidden;
+        top: 0px;
+        margin: 0px;
+        padding: 0px 3px !important;
+        width: 100%;
+        height: 100%;
+        .thumbnail {
+            margin-top: 15px;
+            padding: 0px;
+            text-align: center;
+            width: 100%;
+            height: 100%;
+            background-color: transparent;
+            border: none;
+            border-radius: 0px;
+            >img {
+                max-width: 70%;
+                max-height: 96%;
+            }
+        }
+    }
+    .phone {
+        background-color: #000;
+        .thumbnail {
+            background-color: #000;
+            >img {
+                max-width: 100%;
+                max-height: 96%;
+            }
+        }
+        .width-Img {
+            margin-top: 30%;
+        }
+    }
 }
 
-.container {
-    height: 180px;
-}
-
-.amap-marker-label {
-    border: 0px;
-    color: #0bc00f;
-    background: rgba(255, 255, 255, 0);
+#container {
+    height: 200px;
 }
 
-.amap-marker .marker-route {
-    position: absolute;
-    width: 40px;
-    height: 44px;
-    color: #e90000;
-    background: url(http://webapi.amap.com/theme/v1.3/images/newpc/poi-1.png 
-
-) no-repeat;
-    cursor: pointer;
+.amap-geolocation-con {
+    z-index: 999 !important;
 }
 
-.amap-marker .marker-marker-bus-from {
-    background-position: -334px -18px;
-}
 .amap-logo {
     right: 0 !important;
     left: auto !important;

File diff suppressed because it is too large
+ 19 - 11
web12345-pageView/src/templates/pageView.html