| xqd
@@ -8,6 +8,7 @@ use App\Helper\SmsHelper;
|
|
|
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
|
|
use App\Models\UserInfoModel;
|
|
|
use Illuminate\Http\Request;
|
|
|
+use App\Models\BaseSettingsModel;
|
|
|
use App\Services\Base\ErrorCode;
|
|
|
use Validator, Auth, Cache;
|
|
|
|
| xqd
@@ -32,9 +33,11 @@ class AuthController extends Controller
|
|
|
|
|
|
public function info(Request $request){
|
|
|
if($request->type==1){
|
|
|
- return $this->api('用户隐私');
|
|
|
+ $data = BaseSettingsModel::where('category','miaomiao')->select('key','value')->first();
|
|
|
+ return $this->api($data);
|
|
|
}else if($request->type==2){
|
|
|
- return $this->api('用户隐私');
|
|
|
+ $data = BaseSettingsModel::where('category','miaomiao')->select('key','value')->first();
|
|
|
+ return $this->api($data);
|
|
|
}else if($request->type==3){
|
|
|
return $this->api('关于我们');
|
|
|
}
|
| xqd
@@ -341,19 +344,15 @@ class AuthController extends Controller
|
|
|
$msg = '【喵喵】您的验证码是:(' . $verify_code.')。5分钟内有效请及时验证';
|
|
|
|
|
|
if(env("APP_DEBUG")){
|
|
|
-// return $this->api(['verify_code' => $verify_code]);
|
|
|
+ return $this->api(['verify_code' => $verify_code]);
|
|
|
}else{
|
|
|
$result = $this->sendSms($msg, $phone);
|
|
|
}
|
|
|
-// $result = $this->sendSms($msg, $phone);
|
|
|
- /*if (!$result)
|
|
|
- $this->logger->Error("Send sms failed.");*/
|
|
|
+
|
|
|
if ($result!='success') {
|
|
|
- \Log::error("Send sms failed.");
|
|
|
+ \Log::error("Send sms failed.".$result);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// return $this->api(['verify_code' => $verify_code]);
|
|
|
}
|
|
|
|
|
|
|