Selaa lähdekoodia

弹窗全遮cs

zhouna 3 vuotta sitten
vanhempi
commit
6c97cad9ee
3 muutettua tiedostoa jossa 9 lisäystä ja 2 poistoa
  1. 2 0
      src/js/index.js
  2. 3 2
      src/js/modal.js
  3. 4 0
      src/js/utils.js

+ 2 - 0
src/js/index.js

@@ -597,6 +597,8 @@ window.addEventListener('message', e => {
       width: '470',
       time: 1000,
       cancalText: '我知道了',
+	  isFather: true,
+	  fatherWrapper: $("#mainBox", parent.document),
       sureBtn: false,
       message: data.data || '登录过期',
       callback: function () {

+ 3 - 2
src/js/modal.js

@@ -21,8 +21,8 @@ const jQuery = require('jquery');
             gobackText: '我知道了',
             message: '<p class="tip">内容</p>',
             time: 1500,
-            isFather: false,
-            fatherWrapper: '',
+		    isFather: true,
+		    fatherWrapper: $("#mainBox", parent.document),
             type: 'modal', //tip,loading
             callback: null
         };
@@ -91,6 +91,7 @@ const jQuery = require('jquery');
             //console.log('bbbbbbb')
             ops.fatherWrapper.append(box)
         } else {
+          console.log()
             $("body").append(box)
         }
         if (ops.type == 'tip') {

+ 4 - 0
src/js/utils.js

@@ -208,6 +208,8 @@ const post = function (url, data, opts) {
             width: '470',
             time: 1000,
             cancalText: '我知道了',
+			isFather: true,
+            fatherWrapper: $("#mainBox", parent.document),
             sureBtn: false,
             message: jsonres.msg || '登录过期',
             callback: function () {
@@ -257,6 +259,8 @@ const post = function (url, data, opts) {
             width: '470',
             time: 1000,
             cancalText: '我知道了',
+			isFather: true,
+			fatherWrapper: $("#mainBox", parent.document),
             sureBtn: false,
             message: errorCode.msg || '登录过期',
             callback: function () {