Mike il y a 7 ans
Parent
commit
51621817a6

+ 1 - 1
miaomiao/www/chcp.json

xqd
@@ -1,5 +1,5 @@
 {
   "update": "now",
   "content_url": "http://i.9026.com/miaomiao/www",
-  "release": "2017.08.18-19.11.58"
+  "release": "2017.08.19-06.33.29"
 }

+ 2 - 2
miaomiao/www/chcp.manifest

xqd xqd
@@ -365,7 +365,7 @@
   },
   {
     "file": "js/config/config.js",
-    "hash": "2912f063f9c6351bd7e3b88951b73c84"
+    "hash": "8f4884a65c00024ae26f0202ed33cb3a"
   },
   {
     "file": "js/config/router.js",
@@ -385,7 +385,7 @@
   },
   {
     "file": "js/controllers/my.js",
-    "hash": "6f2e3fb8c1e987b871088374c421ad67"
+    "hash": "4cab83f9eae7ebd6518b5ef2379067cb"
   },
   {
     "file": "js/controllers/tabs.js",

+ 4 - 4
miaomiao/www/js/config/config.js

xqd
@@ -1,12 +1,12 @@
 (function (app) {
     //全局配置 
     app.constant("config", {
-         server: 'http://q8.9026.com/',
-         imgServer: 'http://q8.9026.com/attachment/'
+         // server: 'http://q8.9026.com/',
+         // imgServer: 'http://q8.9026.com/attachment/'
         //server: 'http://localhost:8092/',
         //imgServer: 'http://localhost:8092/attachment/'
 
-        // server: 'http://miao.beiyuesi.com/',
-        // imgServer: 'http://miao.beiyuesi.com/attachment/'
+        server: 'http://miao.beiyuesi.com/',
+        imgServer: 'http://miao.beiyuesi.com/attachment/'
     });
 })(angular.module('app'));

+ 3 - 2
miaomiao/www/js/controllers/my.js

xqd xqd
@@ -9,9 +9,10 @@
         });
         $scope.setAvator = function () {
             common.setAvator().then(function (result) {
+                console.log(response.data.file)
                 var response = JSON.parse(result.response);
                 $timeout(function () {
-                    $scope.user.avatar = config.imgServer + response.data.md5;
+                    $scope.user.avatar = config.imgServer + response.data.file;
                 });
             });
         };
@@ -25,7 +26,7 @@
                 common.setAvator().then(function (result) {
                     var response = JSON.parse(result.response);
                     $timeout(function () {
-                      $scope.vm.avatar = config.imgServer + response.data.md5;
+                        $scope.user.avatar = config.imgServer + response.data.file;
                     });
                 });
             };

+ 1 - 1
server/app/Http/Controllers/Api/V1/AuthController.php

xqd
@@ -288,7 +288,7 @@ class AuthController extends Controller
                 return $this->error(ErrorCode::SAVE_USER_FAILED);
             }
             $this->deleteAttachment($old_avatar);
-            return $this->api(['md5' => $result]);
+            return $this->api(['file' => $result]);
         }
         return $this->error($result);
     }