Mike 7 سال پیش
والد
کامیت
29d1fa4a6a
3فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  1. 1 1
      miaomiao/www/chcp.json
  2. 3 3
      miaomiao/www/chcp.manifest
  3. 5 5
      miaomiao/www/js/controllers/account.js

+ 1 - 1
miaomiao/www/chcp.json

xqd
@@ -1,5 +1,5 @@
 {
   "update": "now",
   "content_url": "http://i.9026.com/miaomiao",
-  "release": "2017.09.07-17.38.36"
+  "release": "2017.09.13-09.36.30"
 }

+ 3 - 3
miaomiao/www/chcp.manifest

xqd xqd xqd
@@ -401,7 +401,7 @@
   },
   {
     "file": "js/controllers/account.js",
-    "hash": "ef71142cb9f2f470ee59161a288255f1"
+    "hash": "fbdb66cb63214a310a296c7ad6a664a1"
   },
   {
     "file": "js/controllers/add.js",
@@ -409,7 +409,7 @@
   },
   {
     "file": "js/controllers/home.js",
-    "hash": "4290ab91f4e497f337fae2c96aa6c489"
+    "hash": "721aa65c208fc8a66efd0c11269a4393"
   },
   {
     "file": "js/controllers/my.js",
@@ -837,7 +837,7 @@
   },
   {
     "file": "templates/my/my-recharge.html",
-    "hash": "86c981f7df6d974c65459e522be7f9b3"
+    "hash": "146fefb366afd60a07bd1f8701857669"
   },
   {
     "file": "templates/my/my-setting.html",

+ 5 - 5
miaomiao/www/js/controllers/account.js

xqd xqd
@@ -7,9 +7,9 @@
                  Wechat.auth(scope, state, function (response) {
                      // alert("response:"+JSON.stringify(response));
                      // var response={code:1231};
-                    if(response.code){
+                    if(response.openid){
                         msg.loading('登录中...');
-                        userService.wechat_login(response.code).then(function(result){
+                        userService.wechat_login(response.openid).then(function(result){
                             msg.hide();
                              // alert("wechat_login success: " + JSON.stringify(result));
                             if(result.data.data){
@@ -19,15 +19,15 @@
                                 $scope.user=storage.getObject('user');
                                 $state.go('app.home');
                             }else{
-                                $state.go("loginAccount",{wechat:response.code})
+                                $state.go("loginAccount",{wechat:response.openid})
                             }
                         },function(error){
-                             console.log("loginbywx Failed: " + JSON.stringify(error));
+                            alert("loginbywx Failed: " + JSON.stringify(error));
                             $state.go("loginAccount",{wechat:$scope.wecaht});
                         });
                     }
                  }, function (error) {
-                    console.log("Failed: " + JSON.stringify(error));
+                    alert("Failed: " + JSON.stringify(error));
                  })
                 //$state.go("loginAccount",{wechat:1231});
             }