mirror of
https://github.com/lkmio/gb-cms.git
synced 2026-04-22 23:17:22 +08:00
1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
webpackJsonp([14],{"03QG":function(s,t,e){var a=e("nhQh");"string"==typeof a&&(a=[[s.i,a,""]]),a.locals&&(s.exports=a.locals);e("rjj0")("1acc4367",a,!0,{})},"12Ve":function(s,t,e){"use strict";var a=function(){var s=this,t=s.$createElement,e=s._self._c||t;return e("div",{staticClass:"container-fluid no-padding box-cards"},[e("el-card",{staticClass:"box-card col-lg-6",attrs:{shadow:"never"}},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("div",{staticClass:"col-md-12 no-padding"},[e("h3",[s._v("信令服务")])])]),s._v(" "),e("div",{staticClass:"server-info"},[e("div",{staticClass:"box box-widget"},[e("div",{staticClass:"box-header"},[e("h4",[e("i",{staticClass:"fa fa-support"}),s._v(" 版本信息")])]),s._v(" "),e("div",{staticClass:"box-body table-responsive no-padding"},[e("table",{staticClass:"table table-striped"},[e("tbody",[e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("硬件信息")]),s._v(" "),e("td",[e("span",[s._v(s._s(s.serverInfo.Hardware))])])]),s._v(" "),e("tr",[e("td",[s._v("接口版本")]),s._v(" "),e("td",[e("span",{attrs:{id:"interface-info"}},[s._v(s._s(s.serverInfo.InterfaceVersion))])])]),s._v(" "),e("tr",[e("td",[s._v("运行时间")]),s._v(" "),e("td",[e("span",{attrs:{id:"running-time-info"}},[s._v(s._s(s.runningTime||s.serverInfo.RunningTime)+"\r\n "),s.userInfo?e("small",[s._v("\r\n "),e("a",{staticClass:"text-orange",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.restart(t)}}},[s._v("重启")])]):s._e()])])]),s._v(" "),e("tr",[e("td",[s._v("软件信息")]),s._v(" "),e("td",[e("span",{attrs:{id:"software-info"}},[s._v(s._s("LiveGBS"===s.serverInfo.LogoText?s.serverInfo.Server:(s.serverInfo.Server||"").replace("LiveCMS","CMS")))])])]),s._v(" "),!s.isDemoUser(s.serverInfo,s.userInfo)&&(s.debug||s.sharking||s.smsshark.output)?e("tr",[e("td",[s._v("网络抓包")]),s._v(" "),e("td",[e("el-input",{staticStyle:{"margin-bottom":"10px"},attrs:{placeholder:"过滤",size:"small",disabled:s.sharking,clearable:""},model:{value:s.filter,callback:function(t){s.filter="string"==typeof t?t.trim():t},expression:"filter"}},[e("el-select",{staticStyle:{width:"100px"},attrs:{slot:"prepend",placeholder:"选择网卡",disabled:s.sharking},slot:"prepend",model:{value:s.iface,callback:function(t){s.iface="string"==typeof t?t.trim():t},expression:"iface"}},[e("el-option",{attrs:{label:"所有网卡",value:"any"}}),s._v(" "),s._l(s.ifaces,function(t,a){return e("el-option",{key:a,attrs:{label:t.Name,value:t.Name}},[e("span",{staticStyle:{float:"left"}},[s._v(s._s(t.Name))]),s._v(" "),e("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[s._v(" "+s._s(t.IP))])])})],2)],1),s._v(" "),e("div",[s.sharking?s._e():e("button",{staticClass:"btn btn-sm btn-primary",attrs:{type:"button",disabled:s.bSubmitting},on:{click:function(t){t.preventDefault(),s.sharkStart(t)}}},[s._v("开始")]),s._v(" "),s.sharking?e("button",{staticClass:"btn btn-sm btn-danger",attrs:{type:"button",disabled:s.bSubmitting},on:{click:function(t){t.preventDefault(),s.sharkStop(t)}}},[s._v("停止")]):s._e(),s._v(" "),e("span",[s._v(" ")]),s._v(" "),s.sharking&&s.sharkSeconds?e("span",[s._v("\r\n 时长("+s._s(s.sharkSeconds)+"秒) 数量("+s._s(s.sharkCount)+") 大小("+s._s(s.sharkBytes)+")\r\n ")]):s._e()])],1)]):s._e()])])])]),s._v(" "),e("div",{staticClass:"box box-widget"},[e("div",{staticClass:"box-header"},[e("h4",[e("i",{staticClass:"fa",class:{"fa-key":!s.dongle,"fa-usb":s.dongle}}),s._v(" 授权信息 "),s.serverInfo.VersionType?e("span",[s._v("("+s._s(s.serverInfo.VersionType)+")")]):s._e(),s._v("\r\n \r\n "),s.canExpand?e("small",[e("a",{class:{fa:!0,"fa-plus":!s.expanded,"fa-chevron-down":s.expanded},staticStyle:{color:"#afa9a9"},attrs:{href:"#",title:s.expanded?"关闭激活码入口":"显示激活码入口"},on:{click:function(t){t.preventDefault(),s.toggleExpand(t)}}})]):s._e()])]),s._v(" "),e("div",{staticClass:"box-body table-responsive no-padding"},[e("table",{staticClass:"table table-striped"},[e("tbody",[e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("授权对象")]),s._v(" "),e("td",[s._v(s._s(s.serverInfo.Authorization))])]),s._v(" "),e("tr",[e("td",[s._v("授权时间")]),s._v(" "),s.actived?e("td",[s._v("永久授权")]):e("td",[!s.changed||s.serverInfo.RemainDays>0?e("span",[s._v("剩余期限"+s._s(s.serverInfo.RemainDays)+"天")]):s._e(),s._v(" "),s.changed?e("span",{staticStyle:{color:"red"}},[s._v("硬件信息变动 "+s._s(s.changed))]):s._e()])]),s._v(" "),(s.actived||s.expanded||s.serverInfo.RemainDays>30)&&s.serverInfo.ChannelCount>=0&&1e3!=s.serverInfo.ChannelCount?e("tr",[e("td",[s._v("通道数")]),s._v(" "),e("td",[s._v(s._s(s.serverInfo.ChannelCount))])]):s._e(),s._v(" "),!s.actived||s.expanded?e("tr",[e("td",[s._v("机器码")]),s._v(" "),e("td",[e("span",{attrs:{id:"key-info"}},[s._v("CMS"+s._s((s.serverInfo.Server||"").indexOf("Linux")>=0?"L":"W")+s._s(s.requestkey))]),s._v(" "),"LiveGBS"===s.serverInfo.LogoText?e("br"):s._e(),s._v(" "),"LiveGBS"===s.serverInfo.LogoText?e("span",{staticStyle:{color:"#bbb"}},[s._v("(通过邮箱:support@liveqing.com 向商务人员咨询永久授权信息)")]):s._e()])]):s._e(),s._v(" "),!s.actived||s.expanded?e("tr",[e("td",[s._v("提交激活码")]),s._v(" "),e("td",[e("el-input",{ref:"activationCode",staticStyle:{"margin-bottom":"10px"},attrs:{type:"textarea",rows:1,placeholder:"输入申请到的激活码",autosize:{minRows:1,maxRows:5}},model:{value:s.activationCode,callback:function(t){s.activationCode="string"==typeof t?t.trim():t},expression:"activationCode"}}),s._v(" "),e("div",[e("button",{staticClass:"btn btn-sm btn-primary",attrs:{type:"button",disabled:s.bSubmitting||!s.activationCode},on:{click:function(t){t.preventDefault(),s.checkCode(t)}}},[s._v(" 提交 ")])])],1)]):s._e()])])])])])]),s._v(" "),e("el-card",{staticClass:"box-card col-lg-6",attrs:{shadow:"never"}},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("div",{staticClass:"col-md-6 no-padding"},[e("h3",[s._v("流媒体服务")])]),s._v(" "),s.sms.Load?e("div",{staticClass:"col-md-6 no-padding"},[e("select",{directives:[{name:"model",rawName:"v-model.trim",value:s.smsserial,expression:"smsserial",modifiers:{trim:!0}}],staticStyle:{"margin-top":"23px",width:"100%"},on:{change:[function(t){var e=Array.prototype.filter.call(t.target.options,function(s){return s.selected}).map(function(s){return"_value"in s?s._value:s.value});s.smsserial=t.target.multiple?e:e[0]},s.smschange]}},s._l(s.smss,function(t,a){return e("option",{key:a,domProps:{value:t.Serial}},[s._v(" SMS-"+s._s(t.Serial))])}))]):s._e()]),s._v(" "),e("div",{staticClass:"server-info"},[s.smsserverinfo.Hardware?s._e():e("h4",{staticStyle:{"text-align":"center"}},[s._v(" SMS 流媒体服务尚未启动 ")]),s._v(" "),s.smsserverinfo.Hardware?e("div",{staticClass:"box box-widget"},[e("div",{staticClass:"box-header"},[e("h4",[e("i",{staticClass:"fa fa-support"}),s._v(" 版本信息")])]),s._v(" "),e("div",{staticClass:"box-body table-responsive no-padding"},[e("table",{staticClass:"table table-striped"},[e("tbody",[e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("硬件信息")]),s._v(" "),e("td",[e("span",[s._v(s._s(s.smsserverinfo.Hardware))])])]),s._v(" "),e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("负载")]),s._v(" "),e("td",[s.sms.Load>0&&!s.isMobile()&&s.hasAnyRole(s.serverInfo,s.userInfo,"超级管理员")?e("span",[e("a",{staticClass:"text-primary",attrs:{role:"button"},on:{click:function(t){t.preventDefault(),s.$emit("show-session-list","",s.sms.Serial)}}},[s._v(s._s(s.sms.Load))])]):e("span",[s._v(s._s(s.sms.Load))])])]),s._v(" "),(s.sms.H264Decoder||s.sms.HevcDecoder)&&s.sms.HWDecodeLoad?e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("硬解负载")]),s._v(" "),e("td",[e("span",[s._v(s._s(s.sms.HWDecodeLoad))])])]):s._e(),s._v(" "),(s.sms.H264Encoder||s.sms.HevcEncoder)&&s.sms.HWEncodeLoad?e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("硬编负载")]),s._v(" "),e("td",[e("span",[s._v(s._s(s.sms.HWEncodeLoad))])])]):s._e(),s._v(" "),e("tr",[e("td",[s._v("运行时间")]),s._v(" "),e("td",[e("span",{attrs:{id:"running-time-info"}},[s._v(s._s(s.runningSMSTime||s.smsserverinfo.RunningTime)+"\r\n "),s.userInfo?e("small",[s._v("\r\n "),e("a",{staticClass:"text-orange",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.restartSMS(t)}}},[s._v("重启")])]):s._e()])])]),s._v(" "),e("tr",[e("td",[s._v("软件信息")]),s._v(" "),e("td",[e("span",{attrs:{id:"software-info"}},[s._v(s._s("LiveGBS"===s.serverInfo.LogoText?s.smsserverinfo.Server:(s.smsserverinfo.Server||"").replace("LiveSMS","SMS")))])])]),s._v(" "),!s.isDemoUser(s.serverInfo,s.userInfo)&&(s.debug||s.sharking||s.smsshark.output)?e("tr",[e("td",[s._v("网络抓包")]),s._v(" "),e("td",[e("el-input",{staticStyle:{"margin-bottom":"10px"},attrs:{placeholder:"过滤",size:"small",disabled:!!s.smsshark.output,clearable:""},model:{value:s.smsshark.filter,callback:function(t){s.$set(s.smsshark,"filter","string"==typeof t?t.trim():t)},expression:"smsshark.filter"}},[e("el-select",{staticStyle:{width:"100px"},attrs:{slot:"prepend",placeholder:"选择网卡",disabled:!!s.smsshark.output},slot:"prepend",model:{value:s.smsshark.iface,callback:function(t){s.$set(s.smsshark,"iface","string"==typeof t?t.trim():t)},expression:"smsshark.iface"}},[e("el-option",{attrs:{label:"所有网卡",value:"any"}}),s._v(" "),s._l(s.smsshark.ifaces,function(t,a){return e("el-option",{key:a,attrs:{label:t.Name,value:t.Name}},[e("span",{staticStyle:{float:"left"}},[s._v(s._s(t.Name))]),s._v(" "),e("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[s._v(" "+s._s(t.IP))])])})],2)],1),s._v(" "),e("div",[s.smsshark.output?s._e():e("button",{staticClass:"btn btn-sm btn-primary",attrs:{type:"button",disabled:s.bSubmittingSMS},on:{click:function(t){t.preventDefault(),s.sharkStartSMS(t)}}},[s._v("开始")]),s._v(" "),s.smsshark.output?e("button",{staticClass:"btn btn-sm btn-danger",attrs:{type:"button",disabled:s.bSubmittingSMS},on:{click:function(t){t.preventDefault(),s.sharkStopSMS(t)}}},[s._v("停止")]):s._e(),s._v(" "),e("span",[s._v(" ")]),s._v(" "),s.smsshark.output&&s.smsshark.seconds?e("span",[s._v("\r\n 时长("+s._s(s.smsshark.seconds)+"秒) 数量("+s._s(s.smsshark.count)+") 大小("+s._s(s.smsshark.bytes)+")\r\n ")]):s._e()])],1)]):s._e()])])])]):s._e(),s._v(" "),s.smsrequestkey.RequestKey&&s.smsserverinfo.Authorization?e("div",{staticClass:"box box-widget"},[e("div",{staticClass:"box-header"},[e("h4",[e("i",{staticClass:"fa",class:{"fa-key":!s.smsrequestkey.Dongle,"fa-usb":!!s.smsrequestkey.Dongle}}),s._v(" 授权信息 "),s.smsserverinfo.VersionType?e("span",[s._v("("+s._s(s.smsserverinfo.VersionType)+")")]):s._e()])]),s._v(" "),e("div",{staticClass:"box-body table-responsive no-padding"},[e("table",{staticClass:"table table-striped"},[e("tbody",[e("tr",[e("td",{staticStyle:{width:"20%"}},[s._v("授权对象")]),s._v(" "),e("td",[s._v(s._s(s.smsserverinfo.Authorization))])]),s._v(" "),e("tr",[e("td",[s._v("授权时间")]),s._v(" "),s.activedsms?e("td",[s._v("永久授权")]):e("td",[!s.smsrequestkey.Changed||s.smsserverinfo.RemainDays>0?e("span",[s._v("剩余期限"+s._s(s.smsserverinfo.RemainDays)+"天")]):s._e(),s._v(" "),s.smsrequestkey.Changed?e("span",{staticStyle:{color:"red"}},[s._v("硬件信息变动 "+s._s(s.smsrequestkey.Changed))]):s._e()])]),s._v(" "),(s.activedsms||s.expanded)&&s.smsserverinfo.ChannelCount&&s.smsserverinfo.ChannelCount>=0&&1e3!=s.smsserverinfo.ChannelCount?e("tr",[e("td",[s._v("通道数")]),s._v(" "),e("td",[s._v(s._s(s.smsserverinfo.ChannelCount))])]):s._e(),s._v(" "),!s.activedsms||s.expanded?e("tr",[e("td",[s._v("机器码")]),s._v(" "),e("td",[e("span",{attrs:{id:"key-info"}},[s._v("SMS"+s._s((s.smsserverinfo.Server||"").indexOf("Linux")>=0?"L":"W")+s._s(s.smsrequestkey.RequestKey))]),s._v(" "),"LiveGBS"===s.serverInfo.LogoText?e("br"):s._e(),s._v(" "),"LiveGBS"===s.serverInfo.LogoText?e("span",{staticStyle:{color:"#bbb"}},[s._v("(通过邮箱:support@liveqing.com 向商务人员咨询永久授权信息)")]):s._e()])]):s._e(),s._v(" "),!s.activedsms||s.expanded?e("tr",[e("td",[s._v("提交激活码")]),s._v(" "),e("td",[e("el-input",{ref:"activationCodeSMS",staticStyle:{"margin-bottom":"10px"},attrs:{type:"textarea",rows:1,placeholder:"输入申请到的激活码",autosize:{minRows:1,maxRows:5}},model:{value:s.activationCodeSMS,callback:function(t){s.activationCodeSMS="string"==typeof t?t.trim():t},expression:"activationCodeSMS"}}),s._v(" "),e("div",[e("button",{staticClass:"btn btn-sm btn-primary",attrs:{type:"button",disabled:s.bSubmittingSMS||!s.activationCodeSMS},on:{click:function(t){t.preventDefault(),s.checkCodeSMS(t)}}},[s._v(" 提交 ")])])],1)]):s._e()])])])]):s._e()])])],1)},n=[],i={render:a,staticRenderFns:n};t.a=i},OjLt:function(s,t,e){"use strict";(function(s){Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=e[a])}return s},n=e("NYxO"),i=e("PJh5"),r=function(s){return s&&s.__esModule?s:{default:s}}(i);t.default={data:function(){return{timer:0,requestkey:"",activationCode:"",activationCodeSMS:"",bSubmitting:!1,bSubmittingSMS:!1,runningTime:"",runningSMSTime:"",smsserial:"",smss:[],sms:{},smsrequestkey:{},smsserverinfo:{},smsshark:{serial:"",output:"",count:0,seconds:0,bytes:"0B",iface:"any",ifaces:[],filter:""},expanded:!1,dongle:!1,changed:"",debug:!1,sharking:!1,sharkCount:0,sharkSeconds:0,sharkBytes:"0B",iface:"any",ifaces:[],filter:""}},computed:a({},(0,n.mapState)(["userInfo","serverInfo"]),{actived:function(){return 9999==this.serverInfo.RemainDays},activedsms:function(){return 9999==this.smsserverinfo.RemainDays},canExpand:function(){return!!(this.actived&&this.serverInfo.VersionType&&this.serverInfo.VersionType.indexOf("旗舰版")<0)||!!(this.actived&&this.serverInfo.ChannelCount&&this.serverInfo.ChannelCount>=0&&1e3!=this.serverInfo.ChannelCount)}}),created:function(){this.expanded="yes"==this.$getQueryString("expand"),this.debug="yes"==this.$getQueryString("debug")},mounted:function(){var t=this;this.timer=setInterval(function(){if(t.serverInfo&&t.serverInfo.StartUpTime){var e=(0,r.default)(t.serverInfo.StartUpTime,"YYYY-MM-DD HH:mm:ss"),a=(0,r.default)(),n=r.default.duration(a.diff(e));t.serverInfo.DiffDuration&&(n=n.add(t.serverInfo.DiffDuration)),t.runningTime=parseInt(n.asDays())+" Days "+n.hours()+" Hours "+n.minutes()+" Mins "+n.seconds()+" Secs"}if(t.smsserverinfo&&t.smsserverinfo.StartUpTime){var e=(0,r.default)(t.smsserverinfo.StartUpTime,"YYYY-MM-DD HH:mm:ss"),a=(0,r.default)(),n=r.default.duration(a.diff(e));t.smsserverinfo.DiffDuration&&(n=n.add(t.smsserverinfo.DiffDuration)),t.runningSMSTime=parseInt(n.asDays())+" Days "+n.hours()+" Hours "+n.minutes()+" Mins "+n.seconds()+" Secs"}t.sharking&&s.ajax({method:"GET",url:"/api/v1/shark/stats",global:!1}).then(function(s){t.sharking=!!s.Sharking,t.sharkCount=s.Count||0,t.sharkSeconds=s.Seconds||0,t.sharkBytes=s.HBytes||"0B"}),t.smsshark.serial&&t.smsshark.output&&s.ajax({method:"GET",url:"/sms/"+t.smsshark.serial+"/api/v1/shark/stats/"+t.smsshark.output,global:!1}).then(function(s){t.smsshark.count=s.Count||0,t.smsshark.seconds=s.Seconds||0,t.smsshark.bytes=s.HBytes||"0B"}).fail(function(s){t.smsshark.output="",t.smsshark.count=0,t.smsshark.seconds=0,t.smsshark.bytes="0B"})},1e3),s.get("/api/v1/getrequestkey").then(function(s){t.requestkey=s.RequestKey,t.dongle=!!s.Dongle,t.changed=s.Changed||""}),this.sharking=!!this.serverInfo.Sharking,this.getSMSList(),s(document).on("keydown",this.keyDown)},beforeDestroy:function(){this.timer&&(clearInterval(this.timer),this.timer=0),s(document).off("keydown",this.keyDown)},beforeRouteEnter:function(s,t,e){e(function(t){"yes"===s.query.expand&&(t.expanded=!0),"yes"===s.query.debug&&(t.debug=!0),(t.debug||t.sharking)&&t.getSharkDevs()})},methods:a({},(0,n.mapActions)(["getServerInfo"]),{restart:function(){var t=this;this.$confirm("此操作将重启信令服务, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",lockScroll:!1}).then(function(){s.post("/api/v1/restart").then(function(s){t.$message({type:"success",message:"重启成功!"}),setTimeout(function(){t.getServerInfo()},2e3)}).fail(function(){t.$message({type:"error",message:"重启失败!"})})}).catch(function(){})},restartSMS:function(){var t=this;this.$confirm("此操作将重启流媒体服务, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",lockScroll:!1}).then(function(){s.post("/api/v1/sms/restart",{serial:t.smsserial}).then(function(s){t.$message({type:"success",message:"重启成功!"}),setTimeout(function(){t.getSMSInfo()},2e3)}).fail(function(){t.$message({type:"error",message:"重启失败!"})})}).catch(function(){})},checkCode:function(){var t=this;""==this.activationCode?this.$message({type:"error",message:"请输入激活码"}):(this.bSubmitting=!0,s.post("/api/v1/verifyproductcode",{productcode:this.activationCode}).then(function(s){1==s.State?(t.$message({type:"success",message:"授权成功!"}),t.getServerInfo()):t.$message({type:"error",message:"输入有效激活码"})}).always(function(){t.activationCode="",t.bSubmitting=!1}))},getSharkDevs:function(){var t=this;s.ajax({method:"GET",url:"/api/v1/shark/devices",global:!1}).then(function(s){t.ifaces=s.List||[]})},getSMSSharkDevs:function(){var t=this;this.smsserial&&s.ajax({method:"GET",url:"/sms/"+this.smsserial+"/api/v1/shark/devices",global:!1}).then(function(s){t.smsshark.ifaces=s.List||[]})},sharkStart:function(){var t=this;this.bSubmitting=!0,s.ajax({method:"POST",url:"/api/v1/shark/start",global:!1,data:{iface:this.iface,filter:this.filter}}).then(function(s){t.sharking=!0}).fail(function(s){var e="操作失败";s&&s.responseText&&(e=s.responseText);try{e=JSON.parse(e)}catch(s){}"npcap not found"===e?t.$confirm("服务器上没有安装 npcap, 是否前往下载安装?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",lockScroll:!1}).then(function(){window.open("//npcap.com/#download","_blank")}).catch(function(){}):t.$message({type:"error",message:e})}).always(function(){t.bSubmitting=!1})},sharkStop:function(){var t=this;this.bSubmitting=!0,s.post("/api/v1/shark/stop").then(function(s){t.sharking=!1,t.sharkCount=0,t.sharkSeconds=0,t.sharkBytes="0B",s.Output&&window.open("/api/v1/shark/download/"+s.Output,"_blank")}).always(function(){t.bSubmitting=!1})},sharkStartSMS:function(){var t=this;this.bSubmittingSMS=!0,s.ajax({method:"POST",url:"/api/v1/sms/shark/start",global:!1,data:{serial:this.smsserial,iface:this.smsshark.iface,filter:this.smsshark.filter}}).then(function(s){t.smsshark.serial=t.smsserial,t.smsshark.output=s.Output||""}).fail(function(s){var e="操作失败";s&&s.responseText&&(e=s.responseText);try{e=JSON.parse(e)}catch(s){}"npcap not found"===e?t.$confirm("服务器上没有安装 npcap, 是否前往下载安装?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",lockScroll:!1}).then(function(){window.open("//npcap.com/#download","_blank")}).catch(function(){}):t.$message({type:"error",message:e})}).always(function(){t.bSubmittingSMS=!1})},sharkStopSMS:function(){var t=this;this.bSubmittingSMS=!0,s.post("/api/v1/sms/shark/stop",{serial:this.smsshark.serial}).then(function(s){t.smsshark.output="",t.smsshark.count=0,t.smsshark.seconds=0,t.smsshark.bytes="0B",s.Output&&window.open("/sms/"+t.smsshark.serial+"/api/v1/shark/download/"+s.Output,"_blank")}).always(function(){t.bSubmittingSMS=!1})},keyDown:function(s){if(s.altKey&&s.shiftKey)switch(s.key){case"D":s.preventDefault(),this.toggleDebug();break;case"E":s.preventDefault(),this.toggleExpand()}},toggleExpand:function(){this.expanded=!this.expanded},toggleDebug:function(){this.debug=!this.debug,!this.debug||this.ifaces&&this.ifaces.length||this.getSharkDevs(),!this.debug||this.smsshark.ifaces&&this.smsshark.ifaces.length||this.getSMSSharkDevs()},getSMSList:function(){var t=this;""==this.smsserial&&s.get("/api/v1/sms/list").then(function(s){t.smss=s,s.length>0&&(t.sms=s[0],t.smsserial=s[0].Serial),t.getSMSInfo()})},getSMSInfo:function(){var t=this;""!=this.smsserial&&(s.get("/api/v1/sms/getrequestkey",{serial:this.smsserial}).then(function(s){t.smsrequestkey=s}),s.get("/api/v1/sms/getserverinfo",{serial:this.smsserial}).then(function(s){t.smsserverinfo=s,t.smsshark.serial=t.smsserial,t.smsshark.output=s.SharkOutput||"",(t.debug||t.sharking||t.smsshark.output)&&(t.getSMSSharkDevs(),t.ifaces&&t.ifaces.length||t.getSharkDevs())}))},smschange:function(){var t=this;this.getSMSInfo(),s.get("/api/v1/sms/list").then(function(s){t.smss=s;for(var e=0;e<t.smss.length;e++)if(t.smss[e].Serial==t.smsserial){t.sms=t.smss[e];break}})},checkCodeSMS:function(){var t=this;""==this.activationCodeSMS?this.$message({type:"error",message:"请输入激活码"}):(this.bSubmittingSMS=!0,s.post("/api/v1/sms/verifyproductcode",{serial:this.smsserial,productcode:this.activationCodeSMS}).then(function(s){1==s.State?(t.$message({type:"success",message:"授权成功!"}),t.getSMSInfo()):t.$message({type:"error",message:"输入有效激活码"})}).always(function(){t.activationCodeSMS="",t.bSubmittingSMS=!1}))}})}}).call(t,e("0iPh"))},nhQh:function(s,t,e){t=s.exports=e("FZ+f")(!1),t.push([s.i,".container-fluid.no-padding.box-cards[data-v-8fcda100]{overflow:hidden}.container-fluid.no-padding.box-cards .box-card[class*=col-][data-v-8fcda100]{margin-bottom:-99999px;padding-bottom:99999px}",""])},sZXX:function(s,t,e){"use strict";function a(s){e("03QG")}Object.defineProperty(t,"__esModule",{value:!0});var n=e("OjLt"),i=e.n(n);for(var r in n)["default","default"].indexOf(r)<0&&function(s){e.d(t,s,function(){return n[s]})}(r);var o=e("12Ve"),c=e("VU/8"),l=a,d=c(i.a,o.a,!1,l,"data-v-8fcda100",null);t.default=d.exports}}); |