import{_ as e,i as a,h as s,r as t,o as r,b as o,g as i,a as n,w as d,e as v,p as c,f as l}from"./index-ea5b20ee.js";import{a as m}from"./index-1ef15d1b.js";import{s as u}from"./store2-204267a2.js";const f={data:()=>({server:""}),methods:{startServer(){a.invoke(s.startJavaServer,{}).then((e=>{0!=e.code?this.$message.error(e.msg):(this.$message.info("异步启动"),u.set("javaService",e.server))}))},closeServer(){a.invoke(s.closeJavaServer,{}).then((e=>{0!=e.code&&this.$message.error(e.msg),this.$message.info("异步关闭"),u.remove("javaService")}))},sendRequest(){const e=u.get("javaService")||"";if(""==e)return void this.$message.error("服务未开启 或 正在启动中");m({method:"get",url:e+"/test1/get",params:{id:"1111111"},timeout:6e4}).then((e=>{const a=e.data||null;this.$message.info(`java服务返回: ${a}`)}))}}},h={id:"app-other"},g=(e=>(c("data-v-da7e5fd3"),e=e(),l(),e))((()=>i("div",{class:"one-block-1"},[i("span",null," 请求java服务接口 ")],-1))),p={class:"one-block-2"};const j=e(f,[["render",function(e,a,s,c,l,m){const u=t("a-button"),f=t("a-space");return r(),o("div",h,[g,i("div",p,[n(f,null,{default:d((()=>[n(u,{onClick:a[0]||(a[0]=e=>m.startServer())},{default:d((()=>[v(" 启动java项目 ")])),_:1}),n(u,{onClick:a[1]||(a[1]=e=>m.sendRequest())},{default:d((()=>[v(" 测试接口 ")])),_:1}),n(u,{onClick:a[2]||(a[2]=e=>m.closeServer())},{default:d((()=>[v(" 关闭java项目 ")])),_:1})])),_:1})])])}],["__scopeId","data-v-da7e5fd3"]]);export{j as default};
