'send', 'userid' => self::$userid, 'timestamp' => $time, 'sign' => md5(self::$username . self::$passwd . $time), 'mobile' => $phone, 'content' => $content, 'sendTime' => '', 'extno' => '', 'rt' => 'json', ]; $gets = json_decode(HttpService::postRequest($target, $data), true);$target = "http://sms.izjun.cn/v2sms.aspx"; // $company = Sys_config('site_name'); $company = "星拼乐"; switch ($template) { case 'PAY_SUCCESS_CODE': break; case 'DELIVER_GOODS_CODE': break; case 'TAKE_DELIVERY_CODE': break; case 'ADMIN_PLACE_ORDER_CODE': break; case 'ADMIN_RETURN_GOODS_CODE': break; case 'ADMIN_PAY_SUCCESS_CODE': break; case 'ADMIN_TAKE_DELIVERY_CODE': break; default: $content = sprintf('【%s】您的验证码为:%d 。验证码有效期为%d分钟,请尽快填写!', $company, $code, 5); } $time = date("YmdHis", time()); $data = [ 'action' => 'send', 'userid' => self::$userid, 'timestamp' => $time, 'sign' => md5(self::$username . self::$passwd . $time), 'mobile' => $phone, 'content' => $content, 'sendTime' => '', 'extno' => '', 'rt' => 'json', ]; $gets = json_decode(HttpService::postRequest($target, $data), true); if ($gets) { return ['status' => 200, 'msg' => '短信发送成功']; } else { return ['status' => 400, 'msg' => '发送失败']; } } }