소스 검색

Merge branch 'master' of http://git.9026.com/baimeng/wuliu.git

baimeng 9 년 전
부모
커밋
01cdd90a51

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


+ 7 - 4
wl/platforms/android/assets/www/js/controllers/my.js

xqd
@@ -65,14 +65,17 @@
             oldpassword:'',
             password: '',
             password1: '',
-            isloading: false,
-
         };
-        $scope.submit = function () {
+        $scope.submit = function (vm) {
             msg.loading('保存中...');
-            var model = { old_password: $scope.vm.oldpassword, password: $scope.vm.password, password_confirmation: $scope.vm.password1 };
+            var model = { old_password: vm.oldpassword, password: vm.password, password_confirmation: vm.password1 };
             myService.resetPassword(model).then(function () {
                 msg.hide();
+                $scope.data = {
+                    oldpassword:'',
+                    password: '',
+                    password1: '',
+                };
                 msg.success('密码修改成功');
             }, function (erro) {
                 msg.hide();

+ 4 - 4
wl/www/js/controllers/account.js

xqd
@@ -138,20 +138,20 @@
                 msg.error(erro);
             });
         }
-        $scope.reset = function () {
-            if ($scope.vm.password != $scope.vm.password1) {
+        $scope.reset = function (vm) {
+            if (vm.password != vm.password1) {
                 msg.text('密码前后输入不一致');
                 return;
             }
             msg.loading('请稍等...');
-            var model = { phone: $scope.vm.mobile, verifyCode: $scope.vm.code, password: $scope.vm.password };
+            var model = { phone: vm.mobile, verifyCode: vm.code, password:vm.password };
             userService.resetPassword(model).then(function () {
                 msg.hide();
                 msg.success('密码找回成功');
                 $state.go('login');
             }, function (erro) {
                 msg.hide();
-                msg.error(erro);
+                msg.error(erro.message);
             });
         }
         var wait = function (seconds) {

+ 1 - 0
wl/www/js/controllers/my.js

xqd
@@ -190,6 +190,7 @@
         $scope.vm = {};
         if ($stateParams.item) {
             $scope.vm = $stateParams.item;
+            $scope.vm.type = 1;
             $scope.vm.begin_use_date = new Date($scope.vm.begin_use_date);
             $scope.vm.expire_date = new Date($scope.vm.expire_date);
         }

+ 1 - 1
wl/www/js/services/userservice.js

xqd
@@ -17,7 +17,7 @@
             update:function (model) {
                 return $http({
                     url: config.server + 'api/user',
-                    method: "put",
+                    method: "post",
                     data: model
                 })
             },

+ 2 - 2
wl/www/templates/account/forgetPassword.html

xqd xqd
@@ -6,7 +6,7 @@
                 <button ng-click="getVerifyCode()" class="button button-assertive" style="margin-right:5px">{{vm.waitSeconds}}</button>
             </div>
             <label class="item item-input">
-                <input type="password"  ng-model="vm.code" placeholder="手机验证码">
+                <input type="text"  ng-model="vm.code" placeholder="手机验证码">
             </label>
             <label class="item item-input">
                 <input type="password"  ng-model="vm.password" placeholder="输入新密码">
@@ -17,7 +17,7 @@
 
         </div>
         <div class="padding">
-            <button ng-click="reset()" class="button button-block button-positive">重置密码</button>
+            <button ng-click="reset(vm)" class="button button-block button-positive">重置密码</button>
         </div>
     </ion-content>
 </ion-view>