From 5f3a2e98c54ce815f270d149872b2b3d0d008ff0 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期六, 13 一月 2024 16:17:54 +0800 Subject: [PATCH] 接口websocket --- jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java | 2 jcdm-framework/src/main/java/com/jcdm/framework/websocket/PostController.java | 31 +++ jcdm-main/pom.xml | 16 ++ jcdm-main/src/main/java/com/jcdm/main/webservice/Item.java | 25 +++ jcdm-main/src/main/java/com/jcdm/main/webservice/test.java | 93 +++++++++++ jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java | 63 +++++++ jcdm-main/src/main/java/com/jcdm/main/webservice/ItemList.java | 22 ++ jcdm-ui/src/views/main/kb/stationTerminal/index.vue | 175 +++++++++++++-------- jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java | 8 jcdm-framework/src/main/java/com/jcdm/framework/websocket/WebSocketServer.java | 13 + 10 files changed, 373 insertions(+), 75 deletions(-) diff --git a/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java b/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java index ea060a2..b562f88 100644 --- a/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java +++ b/jcdm-framework/src/main/java/com/jcdm/framework/config/SecurityConfig.java @@ -111,7 +111,7 @@ // 杩囨护璇锋眰 .authorizeRequests() // 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶 - .antMatchers("/login", "/register", "/captchaImage","/websocket/**").permitAll() + .antMatchers("/login", "/register", "/captchaImage","/websocket/**","/postWebsocket/**").permitAll() // 闈欐�佽祫婧愶紝鍙尶鍚嶈闂� .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() diff --git a/jcdm-framework/src/main/java/com/jcdm/framework/websocket/PostController.java b/jcdm-framework/src/main/java/com/jcdm/framework/websocket/PostController.java new file mode 100644 index 0000000..83126eb --- /dev/null +++ b/jcdm-framework/src/main/java/com/jcdm/framework/websocket/PostController.java @@ -0,0 +1,31 @@ +package com.jcdm.framework.websocket; + +import com.jcdm.common.core.domain.AjaxResult; +import com.jcdm.common.core.page.TableDataInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.websocket.Session; +import javax.websocket.server.PathParam; +import java.util.List; +import java.util.Map; + +@RestController("/socketController") +public class PostController { + + @GetMapping("/postWebsocket") + public AjaxResult list(@PathParam("locationCode") String locationCode) + { + Map<String, Session> map = WebSocketUsers.getUsers(); + //1銆佺洃鍚琸epserver鍦板潃 姣斿锛歄P.OP1010.START 銆丱P.OP1020.START 銆丱P.OP1030.START + //2銆佸綋鍏朵腑涓�涓偣浣嶅彂鐢熷彉鍖栨椂锛屽垽鏂鐐逛綅鏄摢涓�涓伐浣� + // + WebSocketUsers.sendMessageToUserByText(map.get(locationCode), "1"); + + return AjaxResult.success(); + } + + +} diff --git a/jcdm-framework/src/main/java/com/jcdm/framework/websocket/WebSocketServer.java b/jcdm-framework/src/main/java/com/jcdm/framework/websocket/WebSocketServer.java index b2a1b6a..57921d7 100644 --- a/jcdm-framework/src/main/java/com/jcdm/framework/websocket/WebSocketServer.java +++ b/jcdm-framework/src/main/java/com/jcdm/framework/websocket/WebSocketServer.java @@ -6,6 +6,7 @@ import javax.websocket.OnMessage; import javax.websocket.OnOpen; import javax.websocket.Session; +import javax.websocket.server.PathParam; import javax.websocket.server.ServerEndpoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -17,7 +18,7 @@ * @author ruoyi */ @Component -@ServerEndpoint("/websocket/message") +@ServerEndpoint("/websocket/message/{userId}") public class WebSocketServer { /** @@ -32,11 +33,14 @@ private static Semaphore socketSemaphore = new Semaphore(socketMaxOnlineCount); + /**鎺ユ敹userId*/ + private String userId=""; + /** * 杩炴帴寤虹珛鎴愬姛璋冪敤鐨勬柟娉� */ @OnOpen - public void onOpen(Session session) throws Exception + public void onOpen(Session session, @PathParam("userId") String userId) throws Exception { boolean semaphoreFlag = false; // 灏濊瘯鑾峰彇淇″彿閲� @@ -51,7 +55,8 @@ else { // 娣诲姞鐢ㄦ埛 - WebSocketUsers.put(session.getId(), session); +// WebSocketUsers.put(session.getId(), session); + WebSocketUsers.put(userId, session); LOGGER.info("\n 寤虹珛杩炴帴 - {}", session); LOGGER.info("\n 褰撳墠浜烘暟 - {}", WebSocketUsers.getUsers().size()); WebSocketUsers.sendMessageToUserByText(session, "杩炴帴鎴愬姛"); @@ -98,6 +103,6 @@ public void onMessage(String message, Session session) { String msg = message.replace("浣�", "鎴�").replace("鍚�", ""); - WebSocketUsers.sendMessageToUserByText(session, msg); +// WebSocketUsers.sendMessageToUserByText(session, msg); } } diff --git a/jcdm-main/pom.xml b/jcdm-main/pom.xml index f609140..655ff30 100644 --- a/jcdm-main/pom.xml +++ b/jcdm-main/pom.xml @@ -42,6 +42,22 @@ <artifactId>lombok</artifactId> <optional>true</optional> </dependency> + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>3.1</version> + </dependency> + <dependency> + <groupId>cn.hutool</groupId> + <artifactId>hutool-all</artifactId> + <version>5.7.4</version> + </dependency> + + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java index b30d012..5b5f8b7 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java @@ -1,7 +1,10 @@ package com.jcdm.main.sc.stationConf.controller; import java.util.List; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.jcdm.main.util.IpInfoUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -106,9 +109,10 @@ * 鑾峰彇宸ヤ綅缁堢閰嶇疆璇︾粏淇℃伅 */ @GetMapping(value = "/getIpv4") - public AjaxResult getIpv4() + public AjaxResult getIpv4(HttpServletRequest request) { - return success(scStationConfService.getIpv4()); + + return success(IpInfoUtils.getIpAddr(request)); } } diff --git a/jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java b/jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java new file mode 100644 index 0000000..93c7161 --- /dev/null +++ b/jcdm-main/src/main/java/com/jcdm/main/util/IpInfoUtils.java @@ -0,0 +1,63 @@ +package com.jcdm.main.util; + +import javax.servlet.http.HttpServletRequest; +import java.net.InetAddress; +import java.net.UnknownHostException; + +/** + * ip宸ュ叿绫� + * + * @author fengshuonan + * @Date 2018/9/27 涓婂崍10:47 + */ +public class IpInfoUtils { + + /** + * 鑾峰彇瀹㈡埛绔疘P鍦板潃 + */ + public static String getIpAddr(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + if (ip.equals("127.0.0.1")) { + //鏍规嵁缃戝崱鍙栨湰鏈洪厤缃殑IP + InetAddress inet = null; + try { + inet = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + ip = inet.getHostAddress(); + } + } + // 瀵逛簬閫氳繃澶氫釜浠g悊鐨勬儏鍐碉紝绗竴涓狪P涓哄鎴风鐪熷疄IP,澶氫釜IP鎸夌収','鍒嗗壊 + if (ip != null && ip.length() > 15) { + if (ip.indexOf(",") > 0) { + ip = ip.substring(0, ip.indexOf(",")); + } + } + + if ("0:0:0:0:0:0:0:1".equals(ip)) { + ip = "127.0.0.1"; + } + + return ip; + } + + /** + * 鑾峰彇瀹㈡埛绔富鏈哄悕绉� + */ + public static String getHostName() { + try { + return InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + } + return "鏈煡"; + } +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/webservice/Item.java b/jcdm-main/src/main/java/com/jcdm/main/webservice/Item.java new file mode 100644 index 0000000..b3ab39a --- /dev/null +++ b/jcdm-main/src/main/java/com/jcdm/main/webservice/Item.java @@ -0,0 +1,25 @@ +package com.jcdm.main.webservice; + +import lombok.Data; + +@Data +public class Item { + private String MAKTX; + private String FEVOR; + private String WERKS; + private String LGORT; + private String ZHTH; + private String GSTRP; + private String AUFNR; + private String PSMNG; + private String DISPO; + private String ZSCTZD; + private String PLNBEZ; + private String ZSTAT; + private String DAUAT; + private String ZWS; + private String KDAUF; + private String ZUSER; + private String ZDATE; + private String FERTH; +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/webservice/ItemList.java b/jcdm-main/src/main/java/com/jcdm/main/webservice/ItemList.java new file mode 100644 index 0000000..1a4af30 --- /dev/null +++ b/jcdm-main/src/main/java/com/jcdm/main/webservice/ItemList.java @@ -0,0 +1,22 @@ +package com.jcdm.main.webservice; + +import java.util.List; + +public class ItemList { + private List<Item> item; + + // 娣诲姞鏋勯�犲嚱鏁板拰getter/setter鏂规硶 + + // 鏋勯�犲嚱鏁� + public ItemList() { + } + + // Getter鍜孲etter鏂规硶 + public List<Item> getItem() { + return item; + } + + public void setItem(List<Item> item) { + this.item = item; + } +} diff --git a/jcdm-main/src/main/java/com/jcdm/main/webservice/test.java b/jcdm-main/src/main/java/com/jcdm/main/webservice/test.java new file mode 100644 index 0000000..30353ed --- /dev/null +++ b/jcdm-main/src/main/java/com/jcdm/main/webservice/test.java @@ -0,0 +1,93 @@ +package com.jcdm.main.webservice; + + +import java.io.InputStream; +import java.util.List; + +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import cn.hutool.json.XML; +import com.google.gson.Gson; +import com.google.gson.JsonObject; +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.UsernamePasswordCredentials; +import org.apache.commons.httpclient.auth.AuthScope; +import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.commons.httpclient.methods.RequestEntity; +import org.apache.commons.httpclient.methods.StringRequestEntity; +import org.apache.commons.io.IOUtils; + + +public class test { + + public static void main(String[] args) throws Exception { + String serviceUrl = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_MES_005_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; + + String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + + " <soapenv:Header/>\n" + + " <soapenv:Body>\n" + + " <urn:ZPP_CF_MES_005>\n" + + " <!--Optional:-->\n" + + " <IV_WERKS>1000</IV_WERKS>\n" + + " <!--Optional:-->\n" + + " <IV_ZSCTZD>A0055577</IV_ZSCTZD>\n" + + " </urn:ZPP_CF_MES_005>\n" + + " </soapenv:Body>\n" + + "</soapenv:Envelope>"; + // HttpClient鍙戦�丼OAP璇锋眰 + int timeout = 10000; + HttpClient client = new HttpClient(); + //濡傛灉闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉锛涗笉闇�瑕侀獙璇佺櫥褰曞垯涓嶉渶瑕佷互涓�4琛� + String username = "POMESUSER"; + String password = "12345tgb"; + UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password); + client.getState().setCredentials(AuthScope.ANY, creds); + + PostMethod postMethod = new PostMethod(serviceUrl); + // 璁剧疆杩炴帴瓒呮椂 + client.getHttpConnectionManager().getParams().setConnectionTimeout(timeout); + // 璁剧疆璇诲彇鏃堕棿瓒呮椂 + client.getHttpConnectionManager().getParams().setSoTimeout(timeout); + // 鐒跺悗鎶奡oap璇锋眰鏁版嵁娣诲姞鍒癙ostMethod涓� + RequestEntity requestEntity = new StringRequestEntity(content, "text/xml", "UTF-8"); + + // 璁剧疆璇锋眰澶撮儴锛屽惁鍒欏彲鑳戒細鎶� 鈥渘o SOAPAction header鈥� 鐨勯敊璇� + postMethod.setRequestHeader("SOAPAction", ""); + // 璁剧疆璇锋眰浣� + postMethod.setRequestEntity(requestEntity); + int status = client.executeMethod(postMethod); + + if (status == 200) {// 鎴愬姛 + InputStream is = postMethod.getResponseBodyAsStream(); + // 鑾峰彇璇锋眰缁撴灉瀛楃涓� + String result = IOUtils.toString(is); + String jsonStr = xmlToJSON2(result); + Gson gson = new Gson(); + // 灏唈son瀛楃涓茶浆鎹㈡垚瀵硅薄 + ItemList itemList = gson.fromJson(jsonStr, ItemList.class); + System.out.println("杩斿洖缁撴灉:" + result); + } else { + System.out.println("閿欒浠g爜锛�" + status + ":" + postMethod.getResponseBodyAsString()); + } + } + + /** + * 鏂瑰紡--璐� + * 浣跨敤hutool宸ュ叿鍖呬腑鐨勫伐鍏疯浆鍖� + * @param xmlStr + * @return + */ + public static String xmlToJSON2(String xmlStr){ + JSONObject jsonObject1 = cn.hutool.json.XML.toJSONObject(xmlStr, true); + + Gson gson = new Gson(); + JsonObject jsonObject2 = gson.fromJson(jsonObject1.toString(), JsonObject.class); + JsonObject etData = jsonObject2 + .getAsJsonObject("SOAP:Envelope") + .getAsJsonObject("SOAP:Body") + .getAsJsonObject("n0:ZPP_CF_MES_005.Response") + .getAsJsonObject("ET_DATA"); + return etData.toString(); + } + +} diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue index 859fdc5..87e0d4c 100644 --- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue @@ -96,6 +96,18 @@ </el-table> </el-col> <el-col :span="16"> +<!-- <el-input v-model="url" type="text" style="width: 20%" /> --> +<!-- <el-button @click="join" type="primary">杩炴帴</el-button>--> +<!-- <el-button @click="exit" type="danger">鏂紑</el-button>--> + +<!-- <br />--> +<!-- <el-input type="textarea" v-model="message" :rows="9" />--> +<!-- <el-button type="info" @click="send">鍙戦�佹秷鎭�</el-button>--> +<!-- <br />--> +<!-- <br />--> +<!-- <el-input type="textarea" v-model="text_content" :rows="9" /> 杩斿洖鍐呭--> +<!-- <br />--> +<!-- <br />--> <el-image style="height: 520px;width: 100%" :src="imgSrc"></el-image> </el-col> </el-tab-pane> @@ -156,6 +168,12 @@ pageSize: 10, sfcCode: null, }, + // 鏌ヨ鍙傛暟 + StationConfQueryParams: { + pageNum: 1, + pageSize: 10, + ipAddress: null, + }, cakeLamp: { plcState: 1, //plc scannerState: 1, //鎵爜鏋� @@ -165,11 +183,29 @@ release: 0 //鍏佽鏀捐 }, content: '', - activeName: 'first' + activeName: 'first', + url: "ws://192.168.10.196:8081/websocket/message/", + message: "", + text_content: "", + ws: null, } + }, + beforeDestroy() { + this.exit(); }, created() { this.getStationConfList(); + this.connectWebsocket(); + + + this.initStation(); + // this.getStationConfList(); + // setTimeout(() => { + // this.connectWebsocket(); + // }, 3000); + }, + mounted() { + }, methods: { changeMenu(tab, event) { @@ -204,23 +240,85 @@ this.$message('淇濆瓨鑺傛媿涓�'+this.workpieceInformation.beat+'绉�'); }, /** 鏌ヨ宸ヤ綅缁堢閰嶇疆鍒楄〃 */ - getStationConfList() { - let queryParams = { - ipAddress: null, - } - getIpv4().then(response => { - queryParams.ipAddress = response.msg + async getStationConfList() { + await getIpv4().then(response => { + this.StationConfQueryParams.ipAddress = response.msg + console.log('鏌ヨ鍒版湰宸ヤ綅IP涓�'+this.StationConfQueryParams.ipAddress) }); - listStationConf(queryParams).then(response => { + listStationConf(this.StationConfQueryParams).then(response => { let rows = response.rows[0] if(response.rows.length===0){ - this.$message('鏀筰p娌掓湁閰嶇疆宸ュ簭宸ヤ綅锛岃珛閲嶈│锛�'); + this.$message('璇ュ伐浣嶆病鏈夐厤缃甀P锛岃鑱旂郴绠$悊鍛橀厤缃甀P'); return } this.headContent.processesName = rows.processesName this.headContent.processesCode = rows.processesCode + console.log('璁剧疆宸ヤ綅缂栫爜'+this.headContent.processesCode) + }); }, + connectWebsocket() { + console.log('websocket杩炴帴宸ヤ綅涓�'+this.headContent.processesCode) + const wsuri = this.url + this.headContent.processesCode; + this.ws = new WebSocket(wsuri); + const self = this; + this.ws.onopen = function (event) { + // self.text_content = self.text_content + "宸茬粡鎵撳紑杩炴帴!" + "\n"; + this.$message('websocket杩炴帴鎴愬姛锛�'); + }; + this.ws.onmessage = function (event) { + self.text_content = event.data + "\n"; + console.log(event.data) + if(event.data === "1"){ + self.cakeLamp.InPlace = "1" + } + }; + }, + exit() { + if (this.ws) { + this.ws.close(); + this.ws = null; + } + }, + send() { + if (this.ws) { + this.ws.send(this.message); + } else { + alert("鏈繛鎺ュ埌鏈嶅姟鍣�"); + } + }, + async initStation(){ + await getIpv4().then(response => { + this.StationConfQueryParams.ipAddress = response.msg + console.log('鏌ヨ鍒版湰宸ヤ綅IP涓�'+this.StationConfQueryParams.ipAddress) + }); + await listStationConf(this.StationConfQueryParams).then(response => { + let rows = response.rows[0] + if(response.rows.length===0){ + this.$message('璇ュ伐浣嶆病鏈夐厤缃甀P锛岃鑱旂郴绠$悊鍛橀厤缃甀P'); + return + } + this.headContent.processesName = rows.processesName + this.headContent.processesCode = rows.processesCode + console.log('璁剧疆宸ヤ綅缂栫爜'+this.headContent.processesCode) + + }); + console.log('websocket杩炴帴宸ヤ綅涓�'+this.headContent.processesCode) + const wsuri = this.url + this.headContent.processesCode; + this.ws = new WebSocket(wsuri); + const self = this; + this.ws.onopen = function (event) { + // self.text_content = self.text_content + "宸茬粡鎵撳紑杩炴帴!" + "\n"; + this.$message('websocket杩炴帴鎴愬姛锛�'); + }; + this.ws.onmessage = function (event) { + self.text_content = event.data + "\n"; + console.log(event.data) + if(event.data === "1"){ + self.cakeLamp.InPlace = "1" + } + }; + } } } @@ -259,63 +357,4 @@ font-size: 15px; } </style> -<!--<template>--> -<!-- <div>--> -<!-- <el-input v-model="url" type="text" style="width: 20%" /> --> -<!-- <el-button @click="join" type="primary">杩炴帴</el-button>--> -<!-- <el-button @click="exit" type="danger">鏂紑</el-button>--> - -<!-- <br />--> -<!-- <el-input type="textarea" v-model="message" :rows="9" />--> -<!-- <el-button type="info" @click="send">鍙戦�佹秷鎭�</el-button>--> -<!-- <br />--> -<!-- <br />--> -<!-- <el-input type="textarea" v-model="text_content" :rows="9" /> 杩斿洖鍐呭--> -<!-- <br />--> -<!-- <br />--> -<!-- </div>--> -<!--</template>--> - -<!--<script>--> -<!--export default {--> -<!-- data() {--> -<!-- return {--> -<!-- url: "ws://127.0.0.1:8081/websocket/message",--> -<!-- message: "",--> -<!-- text_content: "",--> -<!-- ws: null,--> -<!-- };--> -<!-- },--> -<!-- methods: {--> -<!-- join() {--> -<!-- const wsuri = this.url;--> -<!-- this.ws = new WebSocket(wsuri);--> -<!-- const self = this;--> -<!-- this.ws.onopen = function (event) {--> -<!-- self.text_content = self.text_content + "宸茬粡鎵撳紑杩炴帴!" + "\n";--> -<!-- };--> -<!-- this.ws.onmessage = function (event) {--> -<!-- console.log("鍚庣鍙戣繃鏉ョ殑娑堟伅"+event.data)--> -<!-- self.text_content = event.data + "\n";--> -<!-- };--> -<!-- this.ws.onclose = function (event) {--> -<!-- self.text_content = self.text_content + "宸茬粡鍏抽棴杩炴帴!" + "\n";--> -<!-- };--> -<!-- },--> -<!-- exit() {--> -<!-- if (this.ws) {--> -<!-- this.ws.close();--> -<!-- this.ws = null;--> -<!-- }--> -<!-- },--> -<!-- send() {--> -<!-- if (this.ws) {--> -<!-- this.ws.send(this.message);--> -<!-- } else {--> -<!-- alert("鏈繛鎺ュ埌鏈嶅姟鍣�");--> -<!-- }--> -<!-- },--> -<!-- },--> -<!--};--> -<!--</script>--> -- Gitblit v1.9.3