Commit 5cbfc59c by 周志凯

second request

1 parent 9bd3736e
......@@ -1886,7 +1886,7 @@
}
var socketParameter = {
scheduleType: scheduleType,
callback: 'fetchApi',
// callback: 'fetchApi',
callbackUrlPath: urlPath,
callbackParam: parameter
}
......@@ -1896,11 +1896,10 @@
* websocket 连接
* @param {string} scheduleType
* @param {string} wsUrl
* @param {function} callback
* @param {string} callbackUrlPath
* @param {object} callbackParam
*/
onSocketConnect({ scheduleType, callback, callbackUrlPath, callbackParam }) {
onSocketConnect({ scheduleType, callbackUrlPath, callbackParam }) {
var self = this,
wsUrl = webSockUrl || window.location.host,
socketUrl = "ws://" + wsUrl + "/recal/schedule/" + scheduleType
......@@ -1912,7 +1911,7 @@
self.socket.onopen = function(ev) {
console.log('socket:onopen', ev)
self.startTiming = +new Date()
callback && self[callback] && self[callback](callbackUrlPath, callbackParam)
self.fetchApi(callbackUrlPath, callbackParam)
}
self.socket.onclose = function(ev) {
console.log('socket:onclose', ev)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!