shish 6 лет назад
Родитель
Сommit
5aeb5663e5
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      app/mall/controllers/UserController.php

+ 3 - 0
app/mall/controllers/UserController.php

@@ -91,6 +91,9 @@ class UserController extends BaseController
 		}
 		$arr = Json::decode($result);
 		$mobile = isset($arr['purePhoneNumber']) ? $arr['purePhoneNumber'] : '';
+		if (empty($mobile)) {
+			util::fail('没有获取手机号,请重试');
+		}
 		$userId = $user['id'];
 		UserService::becomeVip($user, $merchant, ['mobile' => $mobile]);
 		util::success(['mobile' => $mobile]);