(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a5c902b2"],{"983d":function(e,t,n){"use strict";n("daea")},a358:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return r}));var o=n("cff8"),s=n.n(o),a=n("b775");const c={test:"controller.example.test",messageShow:"controller.example.messageShow",messageShowConfirm:"controller.example.messageShowConfirm",selectFolder:"controller.example.selectFolder",openDirectory:"controller.example.openDirectory",loadViewContent:"controller.example.loadViewContent",removeViewContent:"controller.example.removeViewContent",createWindow:"controller.example.createWindow",sendNotification:"controller.example.sendNotification",initPowerMonitor:"controller.example.initPowerMonitor",getScreen:"controller.example.getScreen",openSoftware:"controller.example.openSoftware",autoLaunch:"controller.example.autoLaunch",setTheme:"controller.example.setTheme",getTheme:"controller.example.getTheme",checkForUpdater:"controller.example.checkForUpdater",downloadApp:"controller.example.downloadApp",dbOperation:"controller.example.dbOperation",uploadFile:"controller.example.uploadFile",checkHttpServer:"controller.example.checkHttpServer",doHttpRequest:"controller.example.doHttpRequest",doSocketRequest:"controller.example.doSocketRequest",ipcInvokeMsg:"controller.example.ipcInvokeMsg",ipcSendSyncMsg:"controller.example.ipcSendSyncMsg",ipcSendMsg:"controller.example.ipcSendMsg",hello:"controller.example.hello"},l={appUpdater:"app.updater"},r=(e,t)=>{const n=s.a.get("httpServiceConfig"),o=n.server||"http://127.0.0.1:7071";let c=e.split(".").join("/");return c=o+"/"+c,console.log("url:",c),Object(a["b"])({url:c,method:"post",data:t,params:{},timeout:6e4})}},d44a:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app-base-socket-ipc"}},[e._m(0),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:e.handleInvoke}},[e._v("发送 - 回调")]),e._v(" 结果："+e._s(e.message1)+" ")],1),n("p"),n("a-space",[n("a-button",{on:{click:e.handleInvoke2}},[e._v("发送 - async/await")]),e._v(" 结果："+e._s(e.message2)+" ")],1)],1),e._m(1),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:e.handleSendSync}},[e._v("同步消息")]),e._v(" 结果："+e._s(e.message3)+" ")],1)],1),e._m(2),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:e.sendMsgStart}},[e._v("开始")]),n("a-button",{on:{click:e.sendMsgStop}},[e._v("结束")]),e._v(" 结果："+e._s(e.messageString)+" ")],1)],1)])},s=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"one-block-1"},[n("span",[e._v(" 1. 发送异步消息 ")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"one-block-1"},[n("span",[e._v(" 2. 同步消息（不推荐，阻塞执行） ")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"one-block-1"},[n("span",[e._v(" 3. 长消息： 服务端持续向前端页面发消息 ")])])}],a=n("a358"),c={data(){return{messageString:"",message1:"",message2:"",message3:""}},mounted(){this.init()},methods:{init(){const e=this;this.$ipc.removeAllListeners(a["a"].ipcSendMsg),this.$ipc.on(a["a"].ipcSendMsg,(t,n)=>{console.log("[ipcRenderer] [socketMsgStart] result:",n),e.messageString=n,t.sender.send(a["a"].hello,"electron-egg")})},sendMsgStart(){const e={type:"start",content:"开始"};this.$ipc.send(a["a"].ipcSendMsg,e)},sendMsgStop(){const e={type:"end",content:""};this.$ipc.send(a["a"].ipcSendMsg,e)},handleInvoke(){const e=this;this.$ipcInvoke(a["a"].ipcInvokeMsg,"异步-回调").then(t=>{console.log("r:",t),e.message1=t})},async handleInvoke2(){const e=await this.$ipcInvoke(a["a"].ipcInvokeMsg,"异步");console.log("msg:",e),this.message2=e},handleSendSync(){const e=this.$ipcSendSync(a["a"].ipcSendSyncMsg,"同步");this.message3=e}}},l=c,r=(n("983d"),n("2877")),i=Object(r["a"])(l,o,s,!1,null,"6f328a9e",null);t["default"]=i.exports},daea:function(e,t,n){}}]);
//# sourceMappingURL=chunk-a5c902b2.88e03c9b.js.map