|
@@ -81,7 +81,9 @@ function doConnect() {
|
|
|
}
|
|
|
};
|
|
|
wsss.onmessage = function (res) {
|
|
|
+ console.log('res', res)
|
|
|
var result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
|
|
|
+ console.log('result.type', result.type)
|
|
|
if (result.type === 'cutting') {
|
|
|
if (result.data.status === 0) {
|
|
|
$.toast('复制成功', "text");
|
|
@@ -121,6 +123,10 @@ function doConnect() {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+ if (result.type === 'payInitiateEvent') {
|
|
|
+ window.location.href = result.data.payUrl
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
$('body').on("click", function () {
|