Commit 73638d20 authored by KeYong's avatar KeYong

修改跨域请求

parent a1a9a818
......@@ -37,9 +37,7 @@ import java.util.Map;
* @date 2020-03-30
*/
@RestController
@CrossOrigin
@RequestMapping(value = "/api/loginBytoken")
@Api(tags = "外部token登录Api")
public class TokenLoginController {
......@@ -68,6 +66,7 @@ public class TokenLoginController {
private String appKey;
@ApiOperation(value = "外部token登錄", notes = "查询设备指标")
@CrossOrigin
@GetMapping(value = "/{token}")
synchronized public ReginParams getBindEquipment(@PathVariable("token") String outToken) throws Exception {
if ( ObjectUtils.isEmpty(outToken)) {
......@@ -84,8 +83,8 @@ public class TokenLoginController {
if(reginParams == null){
reginParams = new ReginParams();
Map<String, String> param = new HashMap<>();
param.put("loginId",userId);
param.put("password",password);
param.put("loginId", userId);
param.put("password", password);
Object result = privilegeFeign.login(appKey, product, outToken, param).getResult();
if (ObjectUtils.isEmpty(result)){
throw new Exception("缺失登录信息");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment