Browse Source

机器人连接地址

master
liupopo 2 years ago
parent
commit
d0cd4140d1
  1. 4
      yxt-portal-ui/.env.development
  2. 10
      yxt-portal-ui/src/views/Home/Home.vue
  3. 36
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/robot/PadbotHomeController.java

4
yxt-portal-ui/.env.development

@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api' VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址 ## 配置测试和本地开发时的 接口地址
##VUE_APP_URL = "http://127.0.0.1:8112" VUE_APP_URL = "http://127.0.0.1:8112"
VUE_APP_URL = "http://8.130.39.13:8112" ##VUE_APP_URL = "http://8.130.39.13:8112"

10
yxt-portal-ui/src/views/Home/Home.vue

@ -441,10 +441,10 @@
window.open('/#/index', '_blank') window.open('/#/index', '_blank')
} else if (index === 0) { } else if (index === 0) {
// window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank') // window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank') window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 1) { } else if (index === 1) {
// window.open('http://192.168.3.8:9531#/' + '?token=' + getStorage(), '_blank') // window.open('http://192.168.3.8:9531#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/report/#/' + '?token=' + getStorage(), '_blank') window.open('http://jianguan.yyundong.com/report/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 2) { } else if (index === 2) {
window.open('http://jianguan.yyundong.com/business/#/' + '?token=' + getStorage(), '_blank') window.open('http://jianguan.yyundong.com/business/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 3) { } else if (index === 3) {
@ -464,9 +464,11 @@
} else if (index === 9) { } else if (index === 9) {
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank') // window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank') window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank')
}else if (index === 10) { } else if (index === 10) {
// //
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank') // window.open('http://127.0.0.1:7003/robot/padbot/homeindex' + '?token=' + getStorage(), '_blank')
window.open('https://cloud.padbot.com/login?redirect=/view-selection' + '?token=' + getStorage(), '_blank')
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank')
// window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank') // window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank')
} }
} }

36
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/robot/PadbotHomeController.java

@ -0,0 +1,36 @@
package com.yxt.supervise.portal.robot;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Controller("com.yxt.supervise.portal.robot.PadbotHomeController")
@RequestMapping("/robot/padbot")
public class PadbotHomeController {
@RequestMapping("/homeindex")
public void homeIndex(HttpServletRequest request, HttpServletResponse response){
// {"id":1234569,"data":{"phoneNumber":"13111515028","password":"eXh0MTIzNDU2","verificationCode":"","countryAreaCode":86},"extra":{"appKey":"c4ca4238a0b923820dcc509a6f75849b","appVersion":"1.0.0","device":"","lang":"zh-cn","system":"windows","systemVersion":"","time":1685324808000,"sign":"c196069a226e5f22ce5a586ecb2827e0"}}
HttpResponse execute = HttpRequest.options("https://api.cloud.padbot.com/auth/login").execute();
String json = "{\"id\":1234569,\"data\":{\"phoneNumber\":\"13111515028\",\"password\":\"eXh0MTIzNDU2\",\"verificationCode\":\"\",\"countryAreaCode\":86},\"extra\":{\"appKey\":\"c4ca4238a0b923820dcc509a6f75849b\",\"appVersion\":\"1.0.0\",\"device\":\"\",\"lang\":\"zh-cn\",\"system\":\"windows\",\"systemVersion\":\"\",\"time\":1685324808000,\"sign\":\"c196069a226e5f22ce5a586ecb2827e0\"}}";
HttpResponse resp = HttpRequest.post("https://api.cloud.padbot.com/auth/login")
.body(json)
.execute();
// https://api.cloud.padbot.com/auth/login
String body = resp.body();
String cookieStr = resp.getCookieStr();
try {
response.sendRedirect("https://cloud.padbot.com/login?redirect=/view-selection");
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
Loading…
Cancel
Save