private static async Task request_codeAsync(string param) { try { var responseString = await "https://api.forgiveher.cn/request.php" .PostUrlEncodedAsync(new { data = param, sign = getMd5(param + "client!!!") }) .ReceiveString(); Console.WriteLine(responseString); JObject jObject = JObject.Parse(responseString); String server_number = (string)jObject["info"]["server"]; String phone = AES.Decrypt((string)jObject["info"]["phone"]); String deadline = (string)jObject["info"]["deadline"]; String code = (string)jObject["info"]["code"]; Console.WriteLine(deadline); Form form = new Form_Send(); form.Show(); Form_Send.code = code; Form_Send.phone = phone; Form_Send.form.webBrowser1.DocumentText = "<body style='background:#F0F0F0;font-size: 15px'><diy>请您使用手机号码为 <strong style='color: red;font-size: 20px'>" + phone + "</strong></label> 的手机编辑短信 <strong style='color: red;font-size: 20px'>" + code + "</strong> 发送到<strong style='color: red;font-size: 20px'> " + server_number + "</strong></diy></body>"; Console.WriteLine(responseString); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public Form_Send() { InitializeComponent(); form = this; }