Mike 7 years ago
parent
commit
fdf8436fe1

+ 0 - 1
miaomiao/www/js/controllers/account.js

@@ -29,7 +29,6 @@
                  //}, function (error) {
                  //}, function (error) {
                  //   console.log("Failed: " + JSON.stringify(error));
                  //   console.log("Failed: " + JSON.stringify(error));
                  //});
                  //});
-                $state.go("loginAccount",{wechat:'orrk51inhmfmQRXA8VvGEQfow3Es'});
                 userService.isTest().then(function(res){
                 userService.isTest().then(function(res){
                    if(res.data.data){
                    if(res.data.data){
                        Wechat.auth(scope, state, function (response) {
                        Wechat.auth(scope, state, function (response) {

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

@@ -208,7 +208,7 @@ class AuthController extends Controller
             UserInfoModel::create([
             UserInfoModel::create([
                 'wechat'=>$openid,
                 'wechat'=>$openid,
                 'nickname'=>$userInfo['nickname'],
                 'nickname'=>$userInfo['nickname'],
-                'nickname'=>$userInfo['headimgurl'],
+                'avatar'=>$userInfo['headimgurl'],
                 'status'=>1,
                 'status'=>1,
                 'password'=>bcrypt(123456)
                 'password'=>bcrypt(123456)
             ]);
             ]);