|
@@ -16,7 +16,9 @@ import javax.imageio.ImageIO;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
|
|
|
|
+import cn.hutool.core.lang.Assert;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
+import io.renren.common.config.YicProperties;
|
|
|
import io.renren.common.constant.WeChatConstant;
|
|
import io.renren.common.constant.WeChatConstant;
|
|
|
import io.renren.modules.qmjz.entity.ScoreStu;
|
|
import io.renren.modules.qmjz.entity.ScoreStu;
|
|
|
import io.renren.modules.qmjz.entity.TaskManage;
|
|
import io.renren.modules.qmjz.entity.TaskManage;
|
|
@@ -86,8 +88,8 @@ public class ApiAuthServiceImpl implements ApiAuthService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TaskManageService taskManageService;
|
|
private TaskManageService taskManageService;
|
|
|
|
|
|
|
|
- @Value("${yic.loginUrl}")
|
|
|
|
|
- private String yicLoginUrl;
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private YicProperties yicProperties;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void sendCode(String mobile) {
|
|
public void sendCode(String mobile) {
|
|
@@ -335,11 +337,11 @@ public class ApiAuthServiceImpl implements ApiAuthService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
private Map yicLogin(String mobile, String openId) {
|
|
private Map yicLogin(String mobile, String openId) {
|
|
|
- Map<String, Object> paramMap = new HashMap<>(2);
|
|
|
|
|
|
|
+ Map<String, String> paramMap = new HashMap<>(2);
|
|
|
paramMap.put("mobile", mobile);
|
|
paramMap.put("mobile", mobile);
|
|
|
paramMap.put("openId", openId);
|
|
paramMap.put("openId", openId);
|
|
|
try {
|
|
try {
|
|
|
- String resultStr = cn.hutool.http.HttpUtil.post(yicLoginUrl, paramMap);
|
|
|
|
|
|
|
+ String resultStr = cn.hutool.http.HttpUtil.post(yicProperties.getServerUrl() + yicProperties.getLoginUrl(), JSONObject.toJSONString(paramMap));
|
|
|
if (ObjectUtil.isNotNull(resultStr)) {
|
|
if (ObjectUtil.isNotNull(resultStr)) {
|
|
|
JSONObject result = JSONObject.parseObject(resultStr);
|
|
JSONObject result = JSONObject.parseObject(resultStr);
|
|
|
if (ObjectUtil.isNotNull(result) && result.getInteger("code") == 200) {
|
|
if (ObjectUtil.isNotNull(result) && result.getInteger("code") == 200) {
|