Skip to content

Commit

Permalink
Merge pull request #38 from kbdxbt/master
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
jianyan74 authored Sep 1, 2019
2 parents 4cc9d65 + d169073 commit ee49944
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/modules/v1/controllers/MiniProgramController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function actionDecode()

// 插入到用户授权表
if (!($memberAuthInfo = Yii::$app->services->memberAuth->findOauthClient(Auth::CLIENT_MINI_PROGRAM, $userinfo['openId']))) {
Yii::$app->services->memberAuth->create([
$memberAuthInfo = Yii::$app->services->memberAuth->create([
'unionid' => $userinfo['unionId'] ?? '',
'oauth_client' => Auth::CLIENT_MINI_PROGRAM,
'oauth_client_user_id' => $userinfo['openId'],
Expand Down
3 changes: 3 additions & 0 deletions common/helpers/UploadHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ public function __construct(array $config, $type, $superaddition = false)
public function verifyFile()
{
$file = UploadedFile::getInstanceByName($this->uploadFileName);
if (!$file) {
throw new NotFoundHttpException('找不到上传文件');
}
if ($file->getHasError()) {
throw new NotFoundHttpException('上传失败,请检查文件');
}
Expand Down

0 comments on commit ee49944

Please sign in to comment.