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