Mike 9 anos atrás
pai
commit
3d6abeef19

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


+ 15 - 13
wl/platforms/android/assets/www/js/controllers/car.js

xqd
@@ -54,23 +54,25 @@
         
     }]);
     app.controller('carAddCtrl', ["$scope", "$state", "carService", "msg", function ($scope, $state, carService, msg) {
-        $scope.vm = { type: 1 };
-        $scope.vm.begin_addressPick = {
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) { 
+            $scope.vm = { type: 1 };
+            $scope.vm.begin_addressPick = {
 
-        }
-        $scope.vm.end_addressPick = {
+            }
+            $scope.vm.end_addressPick = {
 
-        }
-        $scope.vm.midway_addressPick = {
+            }
+            $scope.vm.midway_addressPick = {
 
-        }
-        $scope.truckOpt = [];
-        carService.listTrucks().then(function (result) {
-            angular.forEach(result.data.data, function (item) {
-                $scope.truckOpt.push({ id: item.id, name: item.name })
+            }
+            $scope.truckOpt = [];
+            carService.listTrucks().then(function (result) {
+                angular.forEach(result.data.data, function (item) {
+                    $scope.truckOpt.push({ id: item.id, name: item.name })
+                });
+            }, function (erro) {
+                msg.error(erro.data.message);
             });
-        }, function (erro) {
-            msg.error(erro.data.message);
         });
         $scope.save = function () {
             $scope.vm.type = 2;

+ 8 - 6
wl/platforms/android/assets/www/js/controllers/my.js

xqd xqd
@@ -61,11 +61,13 @@
         });
     }]);
     app.controller('mySetPasswordCtrl', ['$scope', '$state', 'myService', 'msg', function ($scope, $state, myService, msg) {
-        $scope.vm = {
-            oldpassword:'',
-            password: '',
-            password1: '',
-        };
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) {
+            $scope.vm = {
+                oldpassword:'',
+                password: '',
+                password1: '',
+            };
+        });
         $scope.submit = function (vm) {
             msg.loading('保存中...');
             var model = { old_password: vm.oldpassword, password: vm.password, password_confirmation: vm.password1 };
@@ -79,7 +81,7 @@
                 msg.success('密码修改成功');
             }, function (erro) {
                 msg.hide();
-                msg.error(erro);
+                msg.error(erro.message);
             });
         }
     }]);

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

xqd
@@ -48,8 +48,9 @@
     });
     module.filter('fullAddress', function () {
         return function (input) {
+           
             if (!input) return input;
-            return input.replace(',','-');
+            return input.replace(/,/g,'-');
         };
     });
 })(angular.module('app.filters'));

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

xqd
@@ -1,11 +1,11 @@
-<ion-view view-title="车源信息">
+<ion-view view-title="车源信息" cache-view="false">
     <ion-content>
         <div class="list">
             <img ng-src="{{vm.picUrl}}" style="width:100%;" />
             <div class="list">
                 <div class="item item-avatar" style="border-width:0">
                     <img ng-src="{{user.data.avatar | avator}}" />
-                    <h2 style="white-space:normal">【{{vm.begin_address | shortAddress}}】-【{{vm.end_address | shortAddress}}】的车源信息</h2>
+                    <h2 style="white-space:normal">【{{vm.begin_address | fullAddress}}】-【{{vm.end_address | fullAddress}}】的车源信息</h2>
                     <p>价格:<b style="color:red">¥{{vm.price}}</b></p>
                 </div>
 

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

xqd
@@ -1,11 +1,11 @@
-<ion-view view-title="货源信息">
+<ion-view view-title="货源信息" cache-view="false">
     <ion-content>
         <div class="list">
             <img  ng-src="{{vm.picUrl}}" style="width:100%;"/>
             <div class="list" >
                 <div class="item item-avatar" style="border-width:0">
                     <img ng-src="{{user.data.avatar | avator}}" />
-                    <h2 style="white-space:normal">【{{vm.begin_address | shortAddress}}】-【{{vm.end_address | shortAddress}}】的货源信息</h2>
+                    <h2 style="white-space:normal">【{{vm.begin_address | fullAddress}}】-【{{vm.end_address | fullAddress}}】的货源信息</h2>
                     <p>价格:<b style="color:red">¥{{vm.price}}</b></p>
                 </div>
                 <div class="item item-body">

BIN
wl/www/img/icon/new_icon.png


BIN
wl/www/img/icon/search.png


+ 15 - 13
wl/www/js/controllers/car.js

xqd
@@ -54,23 +54,25 @@
         
     }]);
     app.controller('carAddCtrl', ["$scope", "$state", "carService", "msg", function ($scope, $state, carService, msg) {
-        $scope.vm = { type: 1 };
-        $scope.vm.begin_addressPick = {
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) { 
+            $scope.vm = { type: 1 };
+            $scope.vm.begin_addressPick = {
 
-        }
-        $scope.vm.end_addressPick = {
+            }
+            $scope.vm.end_addressPick = {
 
-        }
-        $scope.vm.midway_addressPick = {
+            }
+            $scope.vm.midway_addressPick = {
 
-        }
-        $scope.truckOpt = [];
-        carService.listTrucks().then(function (result) {
-            angular.forEach(result.data.data, function (item) {
-                $scope.truckOpt.push({ id: item.id, name: item.name })
+            }
+            $scope.truckOpt = [];
+            carService.listTrucks().then(function (result) {
+                angular.forEach(result.data.data, function (item) {
+                    $scope.truckOpt.push({ id: item.id, name: item.name })
+                });
+            }, function (erro) {
+                msg.error(erro.data.message);
             });
-        }, function (erro) {
-            msg.error(erro.data.message);
         });
         $scope.save = function () {
             $scope.vm.type = 2;

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

xqd xqd
@@ -61,11 +61,13 @@
         });
     }]);
     app.controller('mySetPasswordCtrl', ['$scope', '$state', 'myService', 'msg', function ($scope, $state, myService, msg) {
-        $scope.vm = {
-            oldpassword:'',
-            password: '',
-            password1: '',
-        };
+        $scope.$on('$ionicView.beforeEnter', function (viewResult) {
+            $scope.vm = {
+                oldpassword:'',
+                password: '',
+                password1: '',
+            };
+        });
         $scope.submit = function (vm) {
             msg.loading('保存中...');
             var model = { old_password: vm.oldpassword, password: vm.password, password_confirmation: vm.password1 };
@@ -79,7 +81,7 @@
                 msg.success('密码修改成功');
             }, function (erro) {
                 msg.hide();
-                msg.error(erro);
+                msg.error(erro.message);
             });
         }
     }]);