Mike пре 9 година
родитељ
комит
f83cb78595

BIN
wl/platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock


BIN
wl/platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin


BIN
wl/platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin


+ 3 - 5
wl/platforms/android/assets/www/css/style.css

xqd
@@ -103,14 +103,12 @@
 input.ion-amap-place[readonly] { background-color: transparent; cursor: text; }
 .bar-button-selftest {
     font-weight:bold;
-   
+    height: 38px;
+    padding-top: 5px;
 } 
 .bar-button-selftest .button.button-calm.button-outline { border-color: #FFF; color:#0c60ee; }
 .bar-button-selftest .button.button-positive.button-outline { border-bottom: 3px solid #1e90ff;}
 .home a{font-size: 18px}
 .loginform input {height:50px;width:auto   }
 .loginform i { color:orange;width: 30px;font-size: 25px;}
-.headbck { background-color:#FC810E;}
-.item-myselect select {
-    border:none
-}
+.headbck { background-color:#FC810E;}

+ 1 - 6
wl/platforms/android/assets/www/js/controllers/account.js

xqd
@@ -12,12 +12,7 @@
                 data.setObject('user', result.data.user);
                 data.set('token', result.data.token);
                 $http.defaults.headers.common["Authorization"] = 'Bearer ' + result.data.token;
-                if (result.data.user.type == 1) {//托运方
-                    $state.go('wl.car');
-                }
-                if (result.data.user.type == 2) {//承运方
-                    $state.go('wl.goods');
-                }
+                $state.go('wl.home');
             }, function (erro) {
                 msg.hide();
                 // msg.error(erro.data.message);

+ 22 - 9
wl/platforms/android/assets/www/js/controllers/my.js

xqd xqd xqd xqd xqd xqd
@@ -13,9 +13,9 @@
             }, function (erro) {
                 msg.error(erro.data.message);
             });
-            $scope.toProfile = function () {
-                $state.go('wl.my_profile');
-            }
+        }
+        $scope.toProfile = function () {
+            $state.go('wl.my_profile');
         }
     }]);
     app.controller('mySettingCtrl', ['$scope', 'data', '$state', '$http','$ionicModal','myService', function ($scope, data, $state, $http,$ionicModal,myService) {
@@ -87,10 +87,22 @@
     }]);
     
     app.controller('myProfileCtrl', ['$scope', '$ionicActionSheet', '$ionicPopup', '$timeout', 'userService', 'msg', 'util', 'data', 'camera','config', function ($scope, $ionicActionSheet, $ionicPopup, $timeout, userService, msg, util, data, camera,config) {
-        $scope.user = data.getObject('user');
+        // $scope.user = data.getObject('user');
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) {
+            $scope.load(true);
+        });
+        $scope.load = function (init) {
+            userService.getUser().then(function (result) {
+                $timeout(function () {
+                    $scope.user = result.data.data; 
+                });
+            }, function (erro) {
+                msg.error(erro.data.message);
+            });
+        }
         $scope.genderOpt = [
-              { name: "男", value: 1 },
-              { name: "女", value: 0 }
+              { name: "男", value: "1" },
+              { name: "女", value: "0" }
         ];
         $scope.host = config.server +'/upload/avatar/';
      
@@ -184,7 +196,7 @@
                 }
             });
         }
-        $scope.$on('$ionicView.beforEnter', function (viewResult) {
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) {
             $scope.load(true);
         });
     }]);
@@ -281,7 +293,7 @@
     app.controller('myTruckDetailCtrl', ['$scope', function ($scope) {
 
     }]);
-    app.controller('myMessageCtrl', ['$scope', 'myService', 'msg', '$state', function ($scope, myService, msg, $state) {
+    app.controller('myMessageCtrl', ['$scope', 'myService', 'msg', '$state','config', function ($scope, myService, msg, $state,config) {
         $scope.filter = {
             hasMore: false,
             page: 0,
@@ -289,6 +301,7 @@
         }
         $scope.shouldShowDelete = false;
         $scope.items = [];
+        $scope.host = config.server +'/upload/photo/';
         $scope.load = function (init) {
             if (init) {
                 $scope.filter.pageIndex = 1;
@@ -323,7 +336,7 @@
         $scope.closeItem = function (item, $index) {
             $scope.items.splice($index, 1);
             item.state = 10;
-            myService.updateMessage(item).then(function () {
+            myService.deleteMessage(item).then(function () {
             }, function (erro) {
                 msg.error(erro.data.message);
             });

+ 28 - 4
wl/platforms/android/assets/www/templates/car/detail.html

xqd xqd
@@ -10,8 +10,35 @@
                 </div>
 
                 <div class="item item-body">
+                    <p> 
+                     发布时间:{{vm.created_at}}
+                    </p>
                     <p>车牌号:{{vm.truck.data.truck_no}}</p>
-                    <p>车类型:{{vm.truck.data.type}}</p>
+                    <p>车类型:{{vm.truck.data.type}}
+<element ng-switch="vm.truck.data.type">
+  <element ng-switch-when="1">厢式货车</element>
+  <element ng-switch-when="2">面包车</element>
+  <element ng-switch-when="3">金杯车</element>
+  <element ng-switch-when="4">中巴货车</element>
+  <element ng-switch-when="5">高栏车</element>
+  <element ng-switch-when="6">低栏车</element>
+  <element ng-switch-when="7">平板车</element>
+  <element ng-switch-when="8">高低板车</element>
+  <element ng-switch-when="9">半挂车</element>
+  <element ng-switch-when="10">自卸车</element>
+  <element ng-switch-when="11">冷藏车</element>
+  <element ng-switch-when="12">保温车</element>
+  <element ng-switch-when="13">罐式车</element>
+  <element ng-switch-when="14">铁笼车</element>
+  <element ng-switch-when="15">集装箱运输车</element>
+  <element ng-switch-when="16">大件运输车</element>
+  <element ng-switch-when="17">危险品车</element>
+  <element ng-switch-when="18">全挂车</element>
+  <element ng-switch-when="19">加长挂车</element>
+  <element ng-switch-when="20">其他</element>
+  <element ng-switch-default>厢式货车</element>
+</element>
+</p>
                     <p>出发地:{{vm.begin_address | fullAddress}}</p>
                     <p>途经:{{vm.midway_address | fullAddress}}</p>
                     <p>目的地:{{vm.end_address | fullAddress}}</p>
@@ -38,9 +65,6 @@
                     <p>开始使用日期:{{vm.truck.data.begin_use_date}}</p>
                     <p>报废日期:{{vm.truck.data.expire_date}}</p>
                     
-                    <p> 
-                     {{vm.created_at}}
-                    </p>
                 </div>
 
             </div>

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

xqd xqd
@@ -9,6 +9,9 @@
                     <p>价格:<b style="color:red">¥{{vm.price}}</b></p>
                 </div>
                 <div class="item item-body">
+                    <p> 
+                     发布时间:{{vm.created_at}}
+                    </p>
                     <p>出发地:{{vm.begin_address | fullAddress}}</p>
                     <p>途经:{{vm.midway_address | fullAddress}}</p>
                     <p>目的地:{{vm.end_address | fullAddress}}</p>
@@ -24,9 +27,6 @@
                     <p>联系电话:{{vm.contact_phone}}</p>
                     <p>信息有效期:{{vm.expiry_date}}</p>
             
-                    <p> 
-                     {{vm.created_at}}
-                    </p>
                 </div>
             </div>
             <div class="row padding">

+ 2 - 1
wl/www/css/style.css

xqd
@@ -103,7 +103,8 @@
 input.ion-amap-place[readonly] { background-color: transparent; cursor: text; }
 .bar-button-selftest {
     font-weight:bold;
-   
+    height: 38px;
+    padding-top: 5px;
 } 
 .bar-button-selftest .button.button-calm.button-outline { border-color: #FFF; color:#0c60ee; }
 .bar-button-selftest .button.button-positive.button-outline { border-bottom: 3px solid #1e90ff;}

+ 1 - 6
wl/www/js/controllers/account.js

xqd
@@ -12,12 +12,7 @@
                 data.setObject('user', result.data.user);
                 data.set('token', result.data.token);
                 $http.defaults.headers.common["Authorization"] = 'Bearer ' + result.data.token;
-                if (result.data.user.type == 1) {//托运方
-                    $state.go('wl.car');
-                }
-                if (result.data.user.type == 2) {//承运方
-                    $state.go('wl.goods');
-                }
+                $state.go('wl.home');
             }, function (erro) {
                 msg.hide();
                 // msg.error(erro.data.message);

+ 21 - 8
wl/www/js/controllers/my.js

xqd xqd xqd xqd xqd
@@ -13,9 +13,9 @@
             }, function (erro) {
                 msg.error(erro.data.message);
             });
-            $scope.toProfile = function () {
-                $state.go('wl.my_profile');
-            }
+        }
+        $scope.toProfile = function () {
+            $state.go('wl.my_profile');
         }
     }]);
     app.controller('mySettingCtrl', ['$scope', 'data', '$state', '$http','$ionicModal','myService', function ($scope, data, $state, $http,$ionicModal,myService) {
@@ -87,10 +87,22 @@
     }]);
     
     app.controller('myProfileCtrl', ['$scope', '$ionicActionSheet', '$ionicPopup', '$timeout', 'userService', 'msg', 'util', 'data', 'camera','config', function ($scope, $ionicActionSheet, $ionicPopup, $timeout, userService, msg, util, data, camera,config) {
-        $scope.user = data.getObject('user');
+        // $scope.user = data.getObject('user');
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) {
+            $scope.load(true);
+        });
+        $scope.load = function (init) {
+            userService.getUser().then(function (result) {
+                $timeout(function () {
+                    $scope.user = result.data.data; 
+                });
+            }, function (erro) {
+                msg.error(erro.data.message);
+            });
+        }
         $scope.genderOpt = [
-              { name: "男", value: 1 },
-              { name: "女", value: 0 }
+              { name: "男", value: "1" },
+              { name: "女", value: "0" }
         ];
         $scope.host = config.server +'/upload/avatar/';
      
@@ -281,7 +293,7 @@
     app.controller('myTruckDetailCtrl', ['$scope', function ($scope) {
 
     }]);
-    app.controller('myMessageCtrl', ['$scope', 'myService', 'msg', '$state', function ($scope, myService, msg, $state) {
+    app.controller('myMessageCtrl', ['$scope', 'myService', 'msg', '$state','config', function ($scope, myService, msg, $state,config) {
         $scope.filter = {
             hasMore: false,
             page: 0,
@@ -289,6 +301,7 @@
         }
         $scope.shouldShowDelete = false;
         $scope.items = [];
+        $scope.host = config.server +'/upload/photo/';
         $scope.load = function (init) {
             if (init) {
                 $scope.filter.pageIndex = 1;
@@ -323,7 +336,7 @@
         $scope.closeItem = function (item, $index) {
             $scope.items.splice($index, 1);
             item.state = 10;
-            myService.updateMessage(item).then(function () {
+            myService.deleteMessage(item).then(function () {
             }, function (erro) {
                 msg.error(erro.data.message);
             });

+ 2 - 2
wl/www/js/services/mapservice.js

xqd
@@ -9,13 +9,13 @@
                 if (!input) return defaultPath;
                 var arr = input.split(',');
                
-                var keywords = arr[arr.length - 1];
+                var keywords = arr[arr.length - 2]+arr[arr.length - 1];
                 var url = 'http://restapi.amap.com/v3/place/text?key=' + key + '&keywords=' + keywords + "&callback=JSON_CALLBACK";
                 $http.jsonp(url).then(function (result) {
                     var p = result.data.pois[0];
                     if (p) {
                         var l = p.location;
-                        var m = "http://restapi.amap.com/v3/staticmap?location=" + l + "&zoom=10&size=720*180&markers=mid,,A:" + l + "&key=" + key;
+                        var m = "http://restapi.amap.com/v3/staticmap?location=" + l + "&zoom=10&size=720*280&markers=mid,,A:" + l + "&key=" + key;
                         deferred.resolve(m);
                     } else {
                         deferred.resolve(defaultPath);

+ 8 - 1
wl/www/js/services/myservice.js

xqd xqd
@@ -31,7 +31,7 @@
             },
             listMessages: function () {
                 return $http({
-                    url: config.server + 'api/user/messages',
+                    url: config.server + 'api/user/messages?include=truck,user',
                     method: "get"
                 })
             },
@@ -42,6 +42,13 @@
                     data: model
                 })
             },
+            deleteMessage:function (model) {
+                return $http({
+                    url: config.server + 'api/messages/'+model.id,
+                    method: "delete",
+                    data: model
+                })
+            },
             listOrders: function (filter) {
                 return $http({
                     url: config.server + 'api/user/orders?include=message,user&page=' + filter.page,

+ 28 - 4
wl/www/templates/car/detail.html

xqd xqd
@@ -10,8 +10,35 @@
                 </div>
 
                 <div class="item item-body">
+                    <p> 
+                     发布时间:{{vm.created_at}}
+                    </p>
                     <p>车牌号:{{vm.truck.data.truck_no}}</p>
-                    <p>车类型:{{vm.truck.data.type}}</p>
+                    <p>车类型:{{vm.truck.data.type}}
+<element ng-switch="vm.truck.data.type">
+  <element ng-switch-when="1">厢式货车</element>
+  <element ng-switch-when="2">面包车</element>
+  <element ng-switch-when="3">金杯车</element>
+  <element ng-switch-when="4">中巴货车</element>
+  <element ng-switch-when="5">高栏车</element>
+  <element ng-switch-when="6">低栏车</element>
+  <element ng-switch-when="7">平板车</element>
+  <element ng-switch-when="8">高低板车</element>
+  <element ng-switch-when="9">半挂车</element>
+  <element ng-switch-when="10">自卸车</element>
+  <element ng-switch-when="11">冷藏车</element>
+  <element ng-switch-when="12">保温车</element>
+  <element ng-switch-when="13">罐式车</element>
+  <element ng-switch-when="14">铁笼车</element>
+  <element ng-switch-when="15">集装箱运输车</element>
+  <element ng-switch-when="16">大件运输车</element>
+  <element ng-switch-when="17">危险品车</element>
+  <element ng-switch-when="18">全挂车</element>
+  <element ng-switch-when="19">加长挂车</element>
+  <element ng-switch-when="20">其他</element>
+  <element ng-switch-default>厢式货车</element>
+</element>
+</p>
                     <p>出发地:{{vm.begin_address | fullAddress}}</p>
                     <p>途经:{{vm.midway_address | fullAddress}}</p>
                     <p>目的地:{{vm.end_address | fullAddress}}</p>
@@ -38,9 +65,6 @@
                     <p>开始使用日期:{{vm.truck.data.begin_use_date}}</p>
                     <p>报废日期:{{vm.truck.data.expire_date}}</p>
                     
-                    <p> 
-                     发布时间:{{vm.created_at}}
-                    </p>
                 </div>
 
             </div>

+ 1 - 1
wl/www/templates/car/success.html

xqd
@@ -3,7 +3,7 @@
         <div class="card">
             <div class="item item-text-wrap">
                 <p><img src="img/icon/ok_apply.png" /></p>
-                <p>价格:<b style="color:red">¥{{vm.begin_address}}</b></p>
+                <p>价格:<b style="color:red">¥{{vm.price}}</b></p>
                 <p>从{{vm.begin_address}}到{{vm.end_address}},途径{{vm.midway_address}}</p>
                 <p>联系人:{{vm.contact_name}},联系电话:{{vm.contact_phone}}</p>
             </div>

+ 3 - 3
wl/www/templates/goods/detail.html

xqd xqd
@@ -9,6 +9,9 @@
                     <p>价格:<b style="color:red">¥{{vm.price}}</b></p>
                 </div>
                 <div class="item item-body">
+                    <p> 
+                     发布时间:{{vm.created_at}}
+                    </p>
                     <p>出发地:{{vm.begin_address | fullAddress}}</p>
                     <p>途经:{{vm.midway_address | fullAddress}}</p>
                     <p>目的地:{{vm.end_address | fullAddress}}</p>
@@ -24,9 +27,6 @@
                     <p>联系电话:{{vm.contact_phone}}</p>
                     <p>信息有效期:{{vm.expiry_date}}</p>
             
-                    <p> 
-                     发布时间:{{vm.created_at}}
-                    </p>
                 </div>
             </div>
             <div class="row padding">

+ 80 - 13
wl/www/templates/my/message-detail.html

xqd
@@ -7,19 +7,86 @@
                     <h2 style="white-space:normal">【{{vm.begin_address | shortAddress}}】-【{{vm.end_address | shortAddress}}】的货源信息</h2>
                     <p>价格:<b style="color:red">¥{{vm.price}}</b></p>
                 </div>
-                <div class="item item-body">
-                    <p>出发地:{{vm.begin_address | fullAddress}}</p>
-                    <p>途经:{{vm.midway_address | fullAddress}}</p>
-                    <p>目的地:{{vm.end_address | fullAddress}}</p>
-                    <p>货物名称:{{vm.title}}</p>
-                    <p>联系人:{{vm.contact_name}}</p>
-                    <p>联系电话:{{vm.contact_phone}}</p>
-                    <p>
-                        {{vm.detail}}
-                    </p>
-                    <p style="color:red">
-                        有效期:{{vm.created_at}}
-                    </p>
+                 <div ng-if="vm.type==2">
+                    <div class="item item-body">
+                        <p> 
+                         发布时间:{{vm.created_at}}
+                        </p>
+                        <p>车牌号:{{vm.truck.data.truck_no}}</p>
+                        <p>车类型:
+<element ng-switch="vm.truck.data.type">
+  <element ng-switch-when="1">厢式货车</element>
+  <element ng-switch-when="2">面包车</element>
+  <element ng-switch-when="3">金杯车</element>
+  <element ng-switch-when="4">中巴货车</element>
+  <element ng-switch-when="5">高栏车</element>
+  <element ng-switch-when="6">低栏车</element>
+  <element ng-switch-when="7">平板车</element>
+  <element ng-switch-when="8">高低板车</element>
+  <element ng-switch-when="9">半挂车</element>
+  <element ng-switch-when="10">自卸车</element>
+  <element ng-switch-when="11">冷藏车</element>
+  <element ng-switch-when="12">保温车</element>
+  <element ng-switch-when="13">罐式车</element>
+  <element ng-switch-when="14">铁笼车</element>
+  <element ng-switch-when="15">集装箱运输车</element>
+  <element ng-switch-when="16">大件运输车</element>
+  <element ng-switch-when="17">危险品车</element>
+  <element ng-switch-when="18">全挂车</element>
+  <element ng-switch-when="19">加长挂车</element>
+  <element ng-switch-when="20">其他</element>
+  <element ng-switch-default>厢式货车</element>
+</element>
+</p>
+                        <p>出发地:{{vm.begin_address | fullAddress}}</p>
+                        <p>途经:{{vm.midway_address | fullAddress}}</p>
+                        <p>目的地:{{vm.end_address | fullAddress}}</p>
+                        <p>
+                          备注:{{vm.detail}}
+                        </p>
+
+                    </div>
+
+                    <div class="item item-body">
+                        <p>联系人:{{vm.contact_name}}</p>
+                        <p>联系电话:{{vm.contact_phone}}</p>
+                        <p>信息有效期:{{vm.expiry_date}}</p>
+                    </div>
+
+                    <div class="item item-body">
+                        <p>车名:{{vm.truck.data.name}}</p>
+                        <p>载重:{{vm.truck.data.load_weight}}</p>
+                        <p>车长:{{vm.truck.data.length}}</p>
+                        <p>车宽:{{vm.truck.data.width}}</p>
+                        <p>车高:{{vm.truck.data.height}}</p>
+                        <p>容量:{{vm.truck.data.capacity}}</p>
+                        <p>自重:{{vm.truck.data.truck_weight}}</p>
+                        <p>开始使用日期:{{vm.truck.data.begin_use_date}}</p>
+                        <p>报废日期:{{vm.truck.data.expire_date}}</p>
+                        
+                    </div>
+                </div>
+                <div ng-if="vm.type==1">
+                   <div class="item item-body">
+                        <p> 
+                         发布时间:{{vm.created_at}}
+                        </p>
+                        <p>出发地:{{vm.begin_address | fullAddress}}</p>
+                        <p>途经:{{vm.midway_address | fullAddress}}</p>
+                        <p>目的地:{{vm.end_address | fullAddress}}</p>
+                        <p>货物名称:{{vm.title}}</p>
+                        <p>
+                            {{vm.detail}}
+                        </p>
+                    </div>
+
+
+                    <div class="item item-body">
+                        <p>联系人:{{vm.contact_name}}</p>
+                        <p>联系电话:{{vm.contact_phone}}</p>
+                        <p>信息有效期:{{vm.expiry_date}}</p>
+                
+                    </div>
                 </div>
             </div>
         </div>

+ 2 - 2
wl/www/templates/my/message.html

xqd xqd
@@ -3,7 +3,7 @@
         <ion-nav-back-button>
         </ion-nav-back-button>
         <ion-nav-buttons side="right">
-            <button class="button  button-clear icon-left ion-ios-trash-outline" ng-click="close()">{{shouldShowDelete?'取消':'关闭'}}
+            <button class="button  button-clear icon-left ion-ios-trash-outline" ng-click="close()">{{shouldShowDelete?'取消':'删除'}}
             </button>
         </ion-nav-buttons>
     </ion-nav-bar>
@@ -25,7 +25,7 @@
                     </ion-delete-button>
                 </ion-item>
                 <ion-item class="item item-thumbnail-left" ng-if="item.type==2" ng-click="detail(item)">
-                    <img ng-src="{{item.truck.data.photo | truckPhoto}}" />
+                    <img ng-src="{{host}}{{item.truck.data.photo | truckPhoto}}" />
                     <h2 style="white-space:normal">【{{item.begin_address | fullAddress}}】-【{{item.end_address | fullAddress}}】<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/www/templates/my/order-detail.html

xqd
@@ -4,14 +4,14 @@
             <div class="list card">
                 <div class="item item-avatar">
                     <img ng-src="{{wm.user.data.avatar | avator}}" />
-                    <h2 style="white-space:normal">【{{vm.message.data.begin_address | shortAddress}}】-【{{vm.message.data.end_address | shortAddress}}】</h2>
+                    <h2 style="white-space:normal">【{{vm.message.data.begin_address | fullAddress}}】-【{{vm.message.data.end_address | fullAddress}}】</h2>
                     <p>价格:<b style="color:red">¥{{vm.message.data.price}}</b></p>
                 </div>
                 <div class="item item-body">
                     <p>出发地:{{vm.message.data.begin_address | fullAddress}}</p>
                     <p>途经:{{vm.message.data.midway_address | fullAddress}}</p>
                     <p>目的地:{{vm.message.data.end_address | fullAddress}}</p>
-                    <p>货物名称:{{vm.message.data.title}}</p>
+                    <p ng-if="vm.message.data.title">货物名称:{{vm.message.data.title}}</p>
                     <p>联系人:{{vm.message.data.contact_name}}</p>
                     <p>联系电话:{{vm.message.data.contact_phone}}</p>
                     <p>

+ 1 - 1
wl/www/templates/my/order.html

xqd
@@ -6,7 +6,7 @@
         <div style="color:gray;text-align:center;font-size:15px;margin:10px 0 10px 0">订单问题请联系客服</div>
         <div class="list">
             <div class="item" ng-repeat="item in items" ng-click="detail(item)">
-                <h2>【{{item.message.data.begin_address | shortAddress}}】-【{{item.message.data.end_address | shortAddress}}】</h2>
+                <h2>【{{item.message.data.begin_address | fullAddress}}】-【{{item.message.data.end_address | fullAddress}}】</h2>
                 <p>
                     <span style="float:left"><b style="color:orangered">¥{{item.message.data.price}}</b><em style="padding-left:3px;font-size:0.75em">起</em></span>
                     <span style="float:right">途经:{{item.message.data.midway_address | shortAddress}}</span>