|
@@ -17,16 +17,14 @@ package com.jfinal.club.reg;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jfinal.aop.Before;
|
|
|
import com.jfinal.aop.Inject;
|
|
|
+import com.jfinal.club.common.kit.IpKit;
|
|
|
import com.jfinal.club.util.HttpSender;
|
|
|
import com.jfinal.core.Controller;
|
|
|
-import com.jfinal.club.common.kit.IpKit;
|
|
|
import com.jfinal.kit.Ret;
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpSession;
|
|
|
-import java.util.*;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
@@ -125,18 +123,19 @@ public class RegController extends Controller {
|
|
|
Integer sendCoeds = (int) ((Math.random() * 9 + 1) * 100000);
|
|
|
String sendCoed = String.valueOf(sendCoeds);
|
|
|
|
|
|
- String urls = "http://api.uoleem.com.cn/sms/uoleemApi";// 应用地址
|
|
|
+//uoleem平台
|
|
|
+/* String urls = "http://api.uoleem.com.cn/sms/uoleemApi";// 应用地址
|
|
|
String username = "shjieguan";// 账号
|
|
|
String pwd = "Shjieguan";// 密码
|
|
|
String mobile = phone;// 手机号码,多个号码使用","分割
|
|
|
String content = "你的验证码为:" + sendCoed + ",该验证码5分钟内有效,请勿泄漏于他人。";
|
|
|
- String returnString = HttpSender.batchSend(urls, username, pwd, mobile, content);
|
|
|
+ String returnString = HttpSender.batchSend(urls, username, pwd, mobile, content);*/
|
|
|
|
|
|
-// String paramstring = "{\"code\":\"" + sendCoed + "\"}";
|
|
|
-// String templatecode = "SMS_123672940";
|
|
|
-// title = "获取密码";
|
|
|
-// String str = "你的验证码为:" + sendCoed + ",该验证码5分钟内有效,请勿泄漏于他人。\n";
|
|
|
-// boolean fag = HttpSender.sendSms("接米网络", templatecode, phone, paramstring);
|
|
|
+//阿里平台
|
|
|
+ String paramstring = "{\"code\":\"" + sendCoed + "\"}";
|
|
|
+ String templatecode = "SMS_180054910";
|
|
|
+ String str = "你的验证码为:" + sendCoed + ",该验证码5分钟内有效,请勿泄漏于他人。\n";
|
|
|
+ boolean fag = HttpSender.sendSms("铁嘴网", templatecode, phone, paramstring);
|
|
|
return sendCoed;
|
|
|
}
|
|
|
|