|
|
@@ -1,31 +1,41 @@
|
|
|
function handleQuit() {
|
|
|
- $.actions({
|
|
|
- actions: [{
|
|
|
- text: "退出",
|
|
|
- onClick: function () {
|
|
|
- quit();
|
|
|
- }
|
|
|
- }, {
|
|
|
- text: "退出并下机",
|
|
|
- onClick: function () {
|
|
|
- $.ajax({
|
|
|
- url: baseUrl + '/api/resources/yearMember/downline?userCardId=' + userCardId,
|
|
|
- headers: {
|
|
|
- Authorization: token
|
|
|
- },
|
|
|
- type: 'get',
|
|
|
- dataType: 'json',
|
|
|
- function(res) {
|
|
|
- if (res.status === 0) {
|
|
|
- quit();
|
|
|
- } else {
|
|
|
- $.toast(res.msg, 'text');
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- }]
|
|
|
- });
|
|
|
+ if (sourceType === 5) {
|
|
|
+ $.actions({
|
|
|
+ actions: [{
|
|
|
+ text: "退出",
|
|
|
+ onClick: function () {
|
|
|
+ decodeWoker.postMessage('close');
|
|
|
+ decodeWoker.terminate();
|
|
|
+ quit();
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: "退出并下机",
|
|
|
+ onClick: function () {
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + '/api/resources/yearMember/downline?userCardId=' + userCardId,
|
|
|
+ headers: {
|
|
|
+ Authorization: token
|
|
|
+ },
|
|
|
+ type: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ function(res) {
|
|
|
+ if (res.status === 0) {
|
|
|
+ decodeWoker.postMessage('close');
|
|
|
+ decodeWoker.terminate();
|
|
|
+ quit();
|
|
|
+ } else {
|
|
|
+ $.toast(res.msg, 'text');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ decodeWoker.postMessage('close');
|
|
|
+ decodeWoker.terminate();
|
|
|
+ quit();
|
|
|
+ }
|
|
|
}
|
|
|
var residueTime = 0, residueTimer, isShowCountdown = +parameters['isShowCountdown'], isShowRule = +parameters['isShowRule'];
|
|
|
if (isShowCountdown) {
|
|
|
@@ -52,6 +62,8 @@ if (sourceType === 5) {
|
|
|
$('.count').text(residueTimeStamp(residueTime))
|
|
|
} else {
|
|
|
clearInterval(residueTimer);
|
|
|
+ decodeWoker.postMessage('close');
|
|
|
+ decodeWoker.terminate();
|
|
|
quit();
|
|
|
}
|
|
|
}, 1000);
|