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