diff --git a/yxt-portal-ui/.env.development b/yxt-portal-ui/.env.development index ca74176f..bee6aa64 100644 --- a/yxt-portal-ui/.env.development +++ b/yxt-portal-ui/.env.development @@ -5,5 +5,5 @@ ENV = 'development' VUE_APP_BASE_API = '/api' ## 配置测试和本地开发时的 接口地址 -##VUE_APP_URL = "http://127.0.0.1:8112" -VUE_APP_URL = "http://8.130.39.13:8112" +VUE_APP_URL = "http://127.0.0.1:8112" +##VUE_APP_URL = "http://8.130.39.13:8112" diff --git a/yxt-portal-ui/src/views/Home/Home.vue b/yxt-portal-ui/src/views/Home/Home.vue index 6703c6dc..e9bf4dd6 100644 --- a/yxt-portal-ui/src/views/Home/Home.vue +++ b/yxt-portal-ui/src/views/Home/Home.vue @@ -441,10 +441,10 @@ window.open('/#/index', '_blank') } else if (index === 0) { // 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) { // 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) { window.open('http://jianguan.yyundong.com/business/#/' + '?token=' + getStorage(), '_blank') } else if (index === 3) { @@ -464,9 +464,11 @@ } else if (index === 9) { // window.open('http://192.168.3.8:9532/#/' + '?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') } } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/robot/PadbotHomeController.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/robot/PadbotHomeController.java new file mode 100644 index 00000000..dd46ac8f --- /dev/null +++ b/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); + } + } +}