hasOne(SmsRule::class, 'alias', 'alias'); } public static function buyHouseCheck($key) { $arr = ['rs' => '15280619456', 'zj' => '15959855789', 'zr' => '13600796567']; if (empty($arr[$key])) { return false; } $smsService = new SmsService(); $smsService->sendSms($arr[$key], 'sms_buyhouse_check', ['var' => '您好']); return true; } }