baimeng 9 年之前
父節點
當前提交
f1200bddbc

+ 37 - 35
wl/config.xml

xqd xqd
@@ -7,46 +7,46 @@
   <author email="you@example.com" href="http://example.com.com/">
       Your Name Here
     </author>
-  <content src="index.html"/>
+  <content src="index.html" />
   <platform name="android">
-    <icon density="ldpi" src="resources/android/icon/icon.png"/>
-    <icon density="mdpi" src="resources/android/icon/icon.png"/>
-    <icon density="hdpi" src="resources/android/icon/icon.png"/>
-    <icon density="xhdpi" src="resources/android/icon/icon.png"/>
+    <icon density="ldpi" src="resources/android/icon/icon.png" />
+    <icon density="mdpi" src="resources/android/icon/icon.png" />
+    <icon density="hdpi" src="resources/android/icon/icon.png" />
+    <icon density="xhdpi" src="resources/android/icon/icon.png" />
   </platform>
   <platform name="ios">
-    <icon height="180" src="resources/android/icon/icon.png" width="180"/>
-    <icon height="60" src="resources/android/icon/icon.png" width="60"/>
-    <icon height="120" src="resources/android/icon/icon.png" width="120"/>
-    <icon height="76" src="resources/android/icon/icon.png" width="76"/>
-    <icon height="152" src="resources/android/icon/icon.png" width="152"/>
-    <icon height="40" src="resources/android/icon/icon.png" width="40"/>
-    <icon height="80" src="resources/android/icon/icon.png" width="80"/>
-    <icon height="57" src="resources/android/icon/icon.png" width="57"/>
-    <icon height="114" src="resources/android/icon/icon.png" width="114"/>
-    <icon height="72" src="resources/android/icon/icon.png" width="72"/>
-    <icon height="144" src="resources/android/icon/icon.png" width="144"/>
-    <icon height="29" src="resources/android/icon/icon.png" width="29"/>
-    <icon height="58" src="resources/android/icon/icon.png" width="58"/>
-    <icon height="50" src="resources/android/icon/icon.png" width="50"/>
-    <icon height="100" src="resources/android/icon/icon.png" width="100"/>
+    <icon height="180" src="resources/android/icon/icon.png" width="180" />
+    <icon height="60" src="resources/android/icon/icon.png" width="60" />
+    <icon height="120" src="resources/android/icon/icon.png" width="120" />
+    <icon height="76" src="resources/android/icon/icon.png" width="76" />
+    <icon height="152" src="resources/android/icon/icon.png" width="152" />
+    <icon height="40" src="resources/android/icon/icon.png" width="40" />
+    <icon height="80" src="resources/android/icon/icon.png" width="80" />
+    <icon height="57" src="resources/android/icon/icon.png" width="57" />
+    <icon height="114" src="resources/android/icon/icon.png" width="114" />
+    <icon height="72" src="resources/android/icon/icon.png" width="72" />
+    <icon height="144" src="resources/android/icon/icon.png" width="144" />
+    <icon height="29" src="resources/android/icon/icon.png" width="29" />
+    <icon height="58" src="resources/android/icon/icon.png" width="58" />
+    <icon height="50" src="resources/android/icon/icon.png" width="50" />
+    <icon height="100" src="resources/android/icon/icon.png" width="100" />
   </platform>
-  <access origin="tel:*" launch-external="yes"/>
-  <access origin="*"/>
-  <allow-navigation href="*"/>
-  <allow-intent href="*"/>
-  <preference name="webviewbounce" value="false"/>
-  <preference name="UIWebViewBounce" value="false"/>
-  <preference name="DisallowOverscroll" value="true"/>
-  <preference name="android-minSdkVersion" value="16"/>
-  <preference name="BackupWebStorage" value="none"/>
-  <preference name="KeepRunning" value="True"/>
-  <preference name="ShowTitle" value="True"/>
-  <preference name="InAppBrowserStorageEnabled" value="True"/>
-  <preference name="SuppressesIncrementalRendering" value="True"/>
-  <preference name="windows-target-version" value="10.0"/>
+  <access origin="tel:*" launch-external="yes" />
+  <access origin="*" />
+  <allow-navigation href="*" />
+  <allow-intent href="*" />
+  <preference name="webviewbounce" value="false" />
+  <preference name="UIWebViewBounce" value="false" />
+  <preference name="DisallowOverscroll" value="true" />
+  <preference name="android-minSdkVersion" value="16" />
+  <preference name="BackupWebStorage" value="none" />
+  <preference name="KeepRunning" value="True" />
+  <preference name="ShowTitle" value="True" />
+  <preference name="InAppBrowserStorageEnabled" value="True" />
+  <preference name="SuppressesIncrementalRendering" value="True" />
+  <preference name="windows-target-version" value="10.0" />
   <feature name="StatusBar">
-    <param name="ios-package" onload="true" value="CDVStatusBar"/>
+    <param name="ios-package" onload="true" value="CDVStatusBar" />
   </feature>
   <preference name="KeepRunning" value="True" />
   <preference name="ShowTitle" value="True" />
@@ -62,4 +62,6 @@
   <plugin name="cordova-plugin-compat" version="1.0.0" />
   <plugin name="cordova-plugin-alipay" version="1.0.0" />
   <plugin name="cordova-plugin-appversion" version="1.0.0" />
+  <plugin name="cordova-plugin-file" version="4.2.0" />
+  <plugin name="cordova-plugin-file-transfer" version="1.5.1" />
 </widget>

二進制
wl/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock


二進制
wl/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin


二進制
wl/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin


+ 2 - 2
wl/platforms/android/assets/www/css/style.css

xqd
@@ -29,10 +29,10 @@
 .list-set-arrow .item-arrow-no, .item-arrow-no { background-image: none; padding-right: 15px; }
 
 .item-arrow-no .badge { right: 15px; }
-.list-user-set .item.item-icon-left { padding: 12px 16px 12px 54px; border-color: #EEE; }
+.list-user-set .item.item-icon-left { padding: 22px 16px 22px 54px; border-color: #EEE; }
 .list-user-set .item.item-icon-left i img { margin-top: 6px; }
 .list-user-set.list-set-arrow .item, .list-user-set .item.item-set-arrow { padding-right: 30px; }
-.i-user-phone, .i-user-info, .i-user-message, .i-user-order, .i-user-passsword, .i-user-set,.i-user-car { background: no-repeat center/32px auto; width: 32px; height:32px; position: absolute; left: 11px; top: 6px; vertical-align: middle; }
+.i-user-phone, .i-user-info, .i-user-message, .i-user-order, .i-user-passsword, .i-user-set,.i-user-car { background: no-repeat center/32px auto; width: 32px; height:32px; position: absolute; left: 11px; top: 15px; vertical-align: middle; }
 .item-icon-left i img { width: 32px; height: 32px; margin-top: 10px; }
 
 .i-user-info { background-image: url(../img/icon/i_user_info.png) }

+ 1 - 0
wl/platforms/android/assets/www/index.html

xqd
@@ -18,6 +18,7 @@
 <script src="js/platformOverrides.js"></script>
 <script src="lib/ionic/js/ionic.bundle.js"></script>
 <script src="lib/ionic-citypicker/dist/ionic-citypicker.min.js"></script>
+<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=0715086687d30a66050a5b7c5f1eed5d"></script> 
 <!--<script src="lib/ionic/js/ionic.bundle.min.js"></script>-->
 <script src="cordova.js"></script>
 <script src="js/app.js"></script>

+ 1 - 0
wl/platforms/android/assets/www/js/app.js

xqd
@@ -40,6 +40,7 @@
          $httpProvider.defaults.headers.common['Authorization'] = 'Bearer ' + token;
      }
      $httpProvider.interceptors.push('myHttpInterceptor');
+     
  }])
 .run(["$ionicPlatform", "$location", "msg", "$rootScope", "$timeout", "$ionicHistory", "userService", "$state", "$http",
     function ($ionicPlatform, $location, msg, $rootScope, $timeout, $ionicHistory, userService, $state, $http) {

+ 5 - 1
wl/platforms/android/assets/www/js/controllers/car.js

xqd
@@ -114,8 +114,12 @@
             });
         }
     }]);
-    app.controller('carDetailCtrl', ["$scope", '$stateParams', 'msg', 'orderService', '$state', function ($scope, $stateParams, msg, orderService, $state) {
+    app.controller('carDetailCtrl', ["$scope", '$stateParams', 'msg', 'orderService', '$state', 'userService',
+        function ($scope, $stateParams, msg, orderService, $state, userService) {
         $scope.vm = $stateParams.item;
+        userService.getMapPic($scope.vm.begin_address).then(function (result) {
+            $scope.vm.picUrl = result;
+        });
         //下单
         $scope.bill = function () {
             msg.confirm('下单提示', '确定下单?').then(function (res) {

+ 33 - 2
wl/platforms/android/assets/www/js/controllers/goods.js

xqd xqd xqd
@@ -1,5 +1,6 @@
 (function (app) {
     app.controller('goodsCtrl', ["$scope", "$state", 'goodsService', '$ionicSideMenuDelegate', 'msg', function ($scope, $state, goodsService, $ionicSideMenuDelegate, msg) {
+
         $scope.filter = {
             hasMore: false,
             pageIndex: 0,
@@ -44,6 +45,33 @@
             $state.go('wl.car');
         }
         $scope.load(true);
+        $scope.getLocation = function () {
+            //http://lbs.amap.com/api/javascript-api/reference/plugin/#m_AMap.Geolocation
+           var mapObj = new AMap.Map('iCenter');
+            mapObj.plugin('AMap.Geolocation', function () {
+                geolocation = new AMap.Geolocation({
+                    enableHighAccuracy: true,//是否使用高精度定位,默认:true
+                    timeout: 10000,          //超过10秒后停止定位,默认:无穷大
+                    maximumAge: 0,           //定位结果缓存0毫秒,默认:0
+                    convert: true,           //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
+                    showButton: true,        //显示定位按钮,默认:true
+                    buttonPosition: 'LB',    //定位按钮停靠位置,默认:'LB',左下角
+                    buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
+                    showMarker: true,        //定位成功后在定位到的位置显示点标记,默认:true
+                    showCircle: true,        //定位成功后用圆圈表示定位精度范围,默认:true
+                    panToLocation: true,     //定位成功后将定位到的位置作为地图中心点,默认:true
+                    zoomToAccuracy: true      //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
+                });
+                mapObj.addControl(geolocation);
+                AMap.event.addListener(geolocation, 'complete', function (result) {
+                    alert('sucess:' + JSON.stringify(result));
+                });//返回定位信息
+                AMap.event.addListener(geolocation, 'error', function (error) {
+                    alert('error:' + JSON.stringify(error));
+                });      //返回定位出错信息
+            });
+        }
+      //  $scope.getLocation();
     }]);
     app.controller('goodsAddCtrl', ["$scope", "$state", "goodsService", "msg", function ($scope, $state, goodsService, msg) {
 
@@ -98,9 +126,12 @@
             });
         }
     }]);
-    app.controller('goodsDetailCtrl', ["$scope", '$stateParams', 'msg', 'orderService', '$state', function ($scope, $stateParams, msg, orderService, $state) {
+    app.controller('goodsDetailCtrl', ["$scope", '$stateParams', 'msg', 'orderService', '$state', 'userService'
+        , function ($scope, $stateParams, msg, orderService, $state, userService) {
         $scope.vm = $stateParams.item;
-        
+        userService.getMapPic($scope.vm.begin_address).then(function (result) {
+            $scope.vm.picUrl = result;
+        });
         //下单
         $scope.bill = function () {
             msg.confirm('下单提示', '确定下单?').then(function (res) {

+ 130 - 29
wl/platforms/android/assets/www/js/controllers/my.js

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -1,5 +1,11 @@
 (function (app) {
-    app.controller('myCtrl', ["$scope","$state", function ($scope,$state) {
+    app.controller('myCtrl', ["$scope", "$state", 'userService', 'msg', function ($scope, $state, userService,msg) {
+        $scope.user = {};
+        userService.getUser().then(function (result) {
+            $scope.user = result.data.data;
+        }, function (erro) {
+            msg.error(erro.data.message);
+        });
         $scope.toProfile = function () {
             $state.go('wl.my_profile');
         }
@@ -40,6 +46,10 @@
             $scope.modal1.remove();
             $scope.modal2.remove();
         });
+        $scope.appversion = '1.0.0';
+        if (!!window.AppVersion) {
+            $scope.appversion = AppVersion.version;
+        }
     }]);
     app.controller('mySetPasswordCtrl', ['$scope', '$state', function ($scope,$state) {
         $scope.vm = {
@@ -53,7 +63,7 @@
         }
     }]);
     
-    app.controller('myProfileCtrl', ['$scope', 'userService', 'msg', 'util','data', function ($scope, userService, msg, util,data) {
+    app.controller('myProfileCtrl', ['$scope','$ionicActionSheet','$ionicPopup','$timeout','userService', 'msg', 'util','data', function ($scope,$ionicActionSheet,$ionicPopup,$timeout, userService, msg, util,data) {
         $scope.user = data.getObject('user');
         $scope.genderOpt = [
               { name: "男", value: 1 },
@@ -65,35 +75,83 @@
             msg.error(erro);
         });
         $scope.setAvator = function () {
-            var options = {
-                quality: 50,
-                destinationType: 1,
-                sourceType: 0,
-                encodingType: 0,
-                saveToPhotoAlbum: false,
-                allowEdit:true
-            };//https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/
-            navigator.camera.getPicture(function (imageUri) {
-                $scope.user.avatar = imageUri;
+            var sheet = $ionicActionSheet.show({
+                buttons: [{ text: '<b>拍照</b> 上传' }, { text: '从 <b>相册</b> 中选' }],
+                titleText: '图片上传',
+                cancelText: '取 消',
+                cancel: function() { return true; },
+                buttonClicked: function(index) {
+                    var options = { quality: 50, targetHeight: 112, targetWidth: 112, allowEdit: true};
+                    if (index == 0) options.sourceType = 1;
+                    else options.sourceType = 2;
+                    navigator.camera.getPicture(function(imageUri) {
+                        if (imageUri == undefined) {
+                            var alertPopup = $ionicPopup.alert({
+                               title: '提示',
+                               template: '图片未找到!'
+                             });
+                             alertPopup.then(function(res) {
+                               console.log('1111');
+                             });
+                        }else {
+                            $timeout(function() {
+                                $scope.user.avatar = imageUri;
+                            });
+                            var uploadOptions = new FileUploadOptions();
+                            uploadOptions.fileKey = "photo";
+                            uploadOptions.fileName = "avatar.jpg";
+                            uploadOptions.mimeType = "image/jpeg";
+                            uploadOptions.httpMethod = 'post';
+                            uploadOptions.chunkedMode = true;
+                            var token='Bearer ' + localStorage['token'];
+                            uploadOptions.headers = { "Authorization": token };
+                            console.log("setAvator uploadOptions:"+JSON.stringify(uploadOptions));
+                            var ft = new FileTransfer();
+                            ft.upload(imageUri, encodeURI(config.server+"api/user"), function(sucess) {
+                                console.log("setAvator sucess:"+JSON.stringify(sucess));
+                                // alert(JSON.stringify(sucess));
+                            }, function (fail) {
+                                console.log("setAvator fail:"+JSON.stringify(fail));
+                                // alert(JSON.stringify(fail));
+                            }, uploadOptions); 
+
+                        }
+                    }, function(err) { 
+                        var alertPopup = $ionicPopup.alert({
+                           title: '提示',
+                           template: err
+                         });
+                         alertPopup.then(function(res) {
+                           console.log('1111');
+                         });
+                    }, options);
+
+                    return true;
+                }
+            });
+         
+            //https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/
+            // navigator.camera.getPicture(function (imageUri) {
+            //     $scope.user.avatar = imageUri;
 
-                var uploadOptions = new FileUploadOptions();
-                uploadOptions.fileKey = "avatar";
-                uploadOptions.fileName = "avatar.jpg";
-                uploadOptions.mimeType = "image/jpeg";
-                uploadOptions.httpMethod = 'post';
-                var token='Bearer ' + localStorage['token'];
-                alert(token);
-                uploadOptions.headers = { "Authorization": token };
-                var ft = new FileTransfer();
-                ft.upload(imageUri, encodeURI("http://120.25.204.211/api/user"), function(sucess) {
-                    alert(JSON.stringify(sucess));
-                }, function (fail) {
-                    alert(JSON.stringify(fail));
-                }, options); 
+            //     var uploadOptions = new FileUploadOptions();
+            //     uploadOptions.fileKey = "avatar";
+            //     uploadOptions.fileName = "avatar.jpg";
+            //     uploadOptions.mimeType = "image/jpeg";
+            //     uploadOptions.httpMethod = 'post';
+            //     var token='Bearer ' + localStorage['token'];
+            //     alert(token);
+            //     uploadOptions.headers = { "Authorization": token };
+            //     var ft = new FileTransfer();
+            //     ft.upload(imageUri, encodeURI("http://120.25.204.211/api/user"), function(sucess) {
+            //         alert(JSON.stringify(sucess));
+            //     }, function (fail) {
+            //         alert(JSON.stringify(fail));
+            //     }, options); 
              
-            }, function (erro) {
-                alert(erro);
-            }, options);
+            // }, function (erro) {
+            //     alert(erro);
+            // }, options);
         }
         $scope.save = function () {
             data.updateObject('user', $scope.user);
@@ -132,6 +190,23 @@
         $scope.detail = function (item) {
             $state.go('wl.my_truck_add', {item:item});
         }
+        $scope.delete = function (item, $event) {
+            $event.stopPropagation();
+            msg.confirm('删除提示', '确定删除?').then(function (res) {
+                if (res) {
+                    msg.loading('删除中...');
+                    myService.deleteTruck(item.id).then(function (result) {
+                        msg.hide();
+                        $scope.load(true);
+                    }, function (erro) {
+                        msg.hide();
+                        msg.error(erro.data.message);
+                    })
+                } else {
+
+                }
+            });
+        }
         $scope.load(true);
     }]);
     app.controller('myTruckAddCtrl', ['$scope', 'myService', 'msg', '$state', '$stateParams', function ($scope, myService, msg, $state, $stateParams) {
@@ -170,6 +245,10 @@
                 msg.error(erro.data.message);
             });
         }
+        //上传图片
+        $scope.setPhoto = function () {
+
+        }
      
     }]);
     app.controller('myTruckDetailCtrl', ['$scope', function ($scope) {
@@ -192,6 +271,7 @@
                 var more = (result.data.data.length >= $scope.filter.pageSize);
                 $scope.filter.hasMore = more;
                 $scope.items = $scope.items.concat(result.data.data);
+                 
                 if (init) {
                     $scope.$broadcast('scroll.refreshComplete');
                 } else {
@@ -228,6 +308,7 @@
                 var more = (result.data.data.length >= $scope.filter.pageSize);
                 $scope.filter.hasMore = more;
                 $scope.items = $scope.items.concat(result.data.data);
+                debugger;
                 if (init) {
                     $scope.$broadcast('scroll.refreshComplete');
                 } else {
@@ -237,7 +318,27 @@
                 msg.error(erro.data.message);
             });
         }
+        $scope.pay = function (item,$event) {
+            $event.stopPropagation();
+            //to do 
+        }
+        $scope.delete = function (item,$event) {
+            $event.stopPropagation();
+            msg.confirm('删除提示', '确定删除?').then(function (res) {
+                if (res) {
+                    msg.loading('删除中...');
+                    myService.deleteOrder(item.id).then(function (result) {
+                        msg.hide();
+                        $scope.load(true);
+                    }, function (erro) {
+                        msg.hide();
+                        msg.error(erro.data.message);
+                    })
+                } else {
 
+                }
+            });
+        }
         $scope.detail = function (item) {
             $state.go('wl.my_order_detail', { item: item });
         }

+ 8 - 1
wl/platforms/android/assets/www/js/filters/filter.js

xqd
@@ -31,7 +31,14 @@
             return input;
         };
     });
-
+    module.filter('truckPhoto', function () {
+        return function (input) {
+            if (!input || input.length === 0) {
+                return "img/demo/defaultcar.png";
+            }
+            return input;
+        };
+    });
     module.filter('shortAddress', function () {
         return function (input) {
             if (!input) return input;

+ 1 - 1
wl/platforms/android/assets/www/js/services/carservice.js

xqd
@@ -11,7 +11,7 @@
             },
             //车源列表
             listCars: function (model) {
-                var condition = util.format("?include=user&type={0}&begin_address={1}&end_address={2}&midway_address={3}&page={4}"
+                var condition = util.format("?include=user,truck&type={0}&begin_address={1}&end_address={2}&midway_address={3}&page={4}"
                   , model.type, model.begin_address ? model.begin_address : '', model.end_address ? model.end_address : '', model.midway_address ? model.midway_address : '', model.pageIndex);
                 return $http({
                     url: config.server + 'api/messages/search' + condition,

+ 7 - 2
wl/platforms/android/assets/www/templates/car/detail.html

xqd xqd xqd
@@ -1,6 +1,7 @@
-<ion-view view-title="源信息">
+<ion-view view-title="源信息">
     <ion-content>
         <div class="list">
+            <img ng-src="{{vm.picUrl}}" style="width:100%;" />
             <div class="list card">
                 <div class="item item-avatar">
                     <img ng-src="{{user.data.avatar | avator}}"/>
@@ -12,6 +13,10 @@
                     <p>出发地:{{vm.begin_address | fullAddress}}</p>
                     <p>途经:{{vm.midway_address | fullAddress}}</p>
                     <p>目的地:{{vm.end_address | fullAddress}}</p>
+                    <p>车名:{{vm.truck.data.name}}</p>
+                    <p>车类型:{{vm.truck.data.type}}</p>
+                    <p>车牌:{{vm.truck.data.truck_no}}</p>
+                    <p>载重:{{vm.truck.data.load_weight}}</p>
                     <p>
                         {{vm.detail}}
                     </p>
@@ -26,7 +31,7 @@
                     <button type="button" ng-click="bill()" class="button button-full button-positive">立马拍单</button>
                 </div>
                 <div class="col-50">
-                    <a href="tel:{{vm.contact_phone}}" class="button button-full button-energized">拨打电话</a>
+                    <a ng-href="tel:{{vm.contact_phone}}" class="button button-full button-energized">拨打电话</a>
                 </div>
             </div>
         </div>   

+ 2 - 1
wl/platforms/android/assets/www/templates/goods/detail.html

xqd xqd
@@ -1,6 +1,7 @@
 <ion-view view-title="货源信息">
     <ion-content>
         <div class="list">
+            <img  ng-src="{{vm.picUrl}}" style="width:100%;"/>
             <div class="list card">
                 <div class="item item-avatar">
                     <img ng-src="{{user.data.avatar | avator}}" />
@@ -27,7 +28,7 @@
                     <button type="button" ng-click="bill()" class="button button-full button-positive">立马拍单</button>
                 </div>
                 <div class="col-50">
-                    <a href="tel:{{vm.contact_phone}}" class="button button-full button-energized">拨打电话</a>
+                    <a ng-href="tel:{{vm.contact_phone}}" class="button button-full button-energized">拨打电话</a>
                 </div>
             </div>
         </div>   

+ 1 - 1
wl/platforms/android/assets/www/templates/goods/index.html

xqd
@@ -8,7 +8,7 @@
                 <!--下拉刷新-->
                 <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
                 </ion-refresher>
-              
+              <div id="iCenter"></div>
                 <div class="row app-link headbck">
                     <div class="col-33">
                         <a ng-click="add()">

+ 1 - 1
wl/platforms/android/assets/www/templates/home/index.html

xqd
@@ -62,7 +62,7 @@
         </div>
         <div class="list" ng-if="vm.showIndex==2">
             <a class="item item-thumbnail-left" ng-repeat="item in cars" ng-click="detail(item)">
-                <img src="img/demo/defaultcar.png" />
+                <img ng-src="{{item.truck.data.photo | truckPhoto}}" />
                 <h2 style="white-space:normal">【{{item.begin_address | shortAddress}}】-【{{item.end_address | shortAddress}}】<span style="color:gray;">({{item.title}})</span></h2>
                 <p><span style="float:left"><b style="color:orangered">¥{{item.price}}</b><em style="padding-left:3px;font-size:0.75em">起</em></span></p>
                 <p><span style="float:left">联系人:{{item.contact_name}}</span> <span style="float:right">电话:{{item.contact_phone}}</span></p>

+ 2 - 2
wl/platforms/android/assets/www/templates/my/setting.html

xqd xqd
@@ -7,7 +7,7 @@
             
             <div class="user-info">
                 <div><span style="color: #444;">掌上物流网</span></div>
-                <div><span style="color: #444;">版本V1.0.0</span></div>
+                <div><span style="color: #444;">版本V{{appversion}}</span></div>
             </div>
         </div>
         <div class="list">
@@ -17,7 +17,7 @@
             </label>
             <label class="item item-input " ng-click="openModal1()">
                 <span class="input-label">法律条文
-                </span></a>
+                </span> 
             </label>
         </div>
          <div class="padding">

+ 11 - 10
wl/platforms/android/res/xml/config.xml

xqd xqd xqd
@@ -1,12 +1,22 @@
 <?xml version='1.0' encoding='utf-8'?>
 <widget id="com.uhisport.football" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <preference name="loglevel" value="DEBUG" />
+    <feature name="RareloopAppVersion">
+        <param name="android-package" value="com.rareloop.cordova.appversion.RareloopAppVersion" />
+    </feature>
     <feature name="Camera">
         <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
     </feature>
     <feature name="Device">
         <param name="android-package" value="org.apache.cordova.device.Device" />
     </feature>
+    <feature name="File">
+        <param name="android-package" value="org.apache.cordova.file.FileUtils" />
+        <param name="onload" value="true" />
+    </feature>
+    <feature name="FileTransfer">
+        <param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
+    </feature>
     <feature name="StatusBar">
         <param name="android-package" value="org.apache.cordova.statusbar.StatusBar" />
         <param name="onload" value="true" />
@@ -19,16 +29,6 @@
         <param name="android-package" value="io.ionic.keyboard.IonicKeyboard" />
         <param name="onload" value="true" />
     </feature>
-    <feature name="File">
-        <param name="android-package" value="org.apache.cordova.file.FileUtils" />
-        <param name="onload" value="true" />
-    </feature>
-    <feature name="FileTransfer">
-        <param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
-    </feature>
-    <feature name="RareloopAppVersion">
-        <param name="android-package" value="com.rareloop.cordova.appversion.RareloopAppVersion" />
-    </feature>
     <icon density="ldpi" src="resources/android/icon/icon.png" />
     <icon density="mdpi" src="resources/android/icon/icon.png" />
     <icon density="hdpi" src="resources/android/icon/icon.png" />
@@ -41,6 +41,7 @@
       Your Name Here
     </author>
     <content src="index.html" />
+    <access launch-external="yes" origin="tel:*" />
     <access origin="*" />
     <allow-navigation href="*" />
     <allow-intent href="*" />

二進制
wl/platforms/cli-version


+ 1 - 1
wl/platforms/platforms.json

xqd
@@ -1,3 +1,3 @@
 {
-    "ios": "3.9.2"
+    "android": "5.1.1"
 }

+ 43 - 0
wl/plugins/android.json

xqd
@@ -0,0 +1,43 @@
+{
+    "prepare_queue": {
+        "installed": [],
+        "uninstalled": []
+    },
+    "config_munge": {
+        "files": {}
+    },
+    "installed_plugins": {
+        "cordova-plugin-appversion": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-camera": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-console": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-device": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-file": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-file-transfer": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-statusbar": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "cordova-plugin-whitelist": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        },
+        "ionic-plugin-keyboard": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        }
+    },
+    "dependent_plugins": {
+        "cordova-plugin-compat": {
+            "PACKAGE_NAME": "com.uhisport.football"
+        }
+    }
+}

+ 3 - 1
wl/taco.json

xqd
@@ -1 +1,3 @@
-{}
+{
+  "cordova-cli": "6.1.1"
+}

+ 1 - 0
wl/www/index.html

xqd
@@ -18,6 +18,7 @@
 <script src="js/platformOverrides.js"></script>
 <script src="lib/ionic/js/ionic.bundle.js"></script>
 <script src="lib/ionic-citypicker/dist/ionic-citypicker.min.js"></script>
+<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=0715086687d30a66050a5b7c5f1eed5d"></script> 
 <!--<script src="lib/ionic/js/ionic.bundle.min.js"></script>-->
 <script src="cordova.js"></script>
 <script src="js/app.js"></script>

+ 28 - 0
wl/www/js/controllers/goods.js

xqd xqd
@@ -1,5 +1,6 @@
 (function (app) {
     app.controller('goodsCtrl', ["$scope", "$state", 'goodsService', '$ionicSideMenuDelegate', 'msg', function ($scope, $state, goodsService, $ionicSideMenuDelegate, msg) {
+
         $scope.filter = {
             hasMore: false,
             pageIndex: 0,
@@ -44,6 +45,33 @@
             $state.go('wl.car');
         }
         $scope.load(true);
+        $scope.getLocation = function () {
+            //http://lbs.amap.com/api/javascript-api/reference/plugin/#m_AMap.Geolocation
+           var mapObj = new AMap.Map('iCenter');
+            mapObj.plugin('AMap.Geolocation', function () {
+                geolocation = new AMap.Geolocation({
+                    enableHighAccuracy: true,//是否使用高精度定位,默认:true
+                    timeout: 10000,          //超过10秒后停止定位,默认:无穷大
+                    maximumAge: 0,           //定位结果缓存0毫秒,默认:0
+                    convert: true,           //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
+                    showButton: true,        //显示定位按钮,默认:true
+                    buttonPosition: 'LB',    //定位按钮停靠位置,默认:'LB',左下角
+                    buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
+                    showMarker: true,        //定位成功后在定位到的位置显示点标记,默认:true
+                    showCircle: true,        //定位成功后用圆圈表示定位精度范围,默认:true
+                    panToLocation: true,     //定位成功后将定位到的位置作为地图中心点,默认:true
+                    zoomToAccuracy: true      //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
+                });
+                mapObj.addControl(geolocation);
+                AMap.event.addListener(geolocation, 'complete', function (result) {
+                    alert('sucess:' + JSON.stringify(result));
+                });//返回定位信息
+                AMap.event.addListener(geolocation, 'error', function (error) {
+                    alert('error:' + JSON.stringify(error));
+                });      //返回定位出错信息
+            });
+        }
+      //  $scope.getLocation();
     }]);
     app.controller('goodsAddCtrl', ["$scope", "$state", "goodsService", "msg", function ($scope, $state, goodsService, msg) {
 

+ 1 - 1
wl/www/templates/goods/index.html

xqd
@@ -8,7 +8,7 @@
                 <!--下拉刷新-->
                 <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
                 </ion-refresher>
-              
+              <div id="iCenter"></div>
                 <div class="row app-link headbck">
                     <div class="col-33">
                         <a ng-click="add()">