|
@@ -1,24 +1,24 @@
|
|
|
var IframeOnClick = {
|
|
|
- resolution: 200,
|
|
|
- iframes: [],
|
|
|
- interval: null,
|
|
|
- Iframe: function() {
|
|
|
- this.element = arguments[0];
|
|
|
- this.cb = arguments[1];
|
|
|
- this.hasTracked = false;
|
|
|
- },
|
|
|
- track: function(element, cb) {
|
|
|
- this.iframes.push(new this.Iframe(element, cb));
|
|
|
- var _this = this;
|
|
|
- this.interval = setInterval(function() { _this.checkClick(); }, this.resolution);
|
|
|
- },
|
|
|
- checkClick: function() {
|
|
|
- if (document.activeElement) {
|
|
|
- var activeElement = document.activeElement;
|
|
|
- for (var i in this.iframes) {
|
|
|
- if (activeElement === this.iframes[i].element) { // user is in this Iframe
|
|
|
- if (this.iframes[i].hasTracked == false) {
|
|
|
- this.iframes[i].cb.apply(window, []);
|
|
|
+ resolution: 200,
|
|
|
+ iframes: [],
|
|
|
+ interval: null,
|
|
|
+ Iframe: function() {
|
|
|
+ this.element = arguments[0];
|
|
|
+ this.cb = arguments[1];
|
|
|
+ this.hasTracked = false;
|
|
|
+ },
|
|
|
+ track: function(element, cb) {
|
|
|
+ this.iframes.push(new this.Iframe(element, cb));
|
|
|
+ var _this = this;
|
|
|
+ this.interval = setInterval(function() { _this.checkClick(); }, this.resolution);
|
|
|
+ },
|
|
|
+ checkClick: function() {
|
|
|
+ if (document.activeElement) {
|
|
|
+ var activeElement = document.activeElement;
|
|
|
+ for (var i in this.iframes) {
|
|
|
+ if (activeElement === this.iframes[i].element) { // user is in this Iframe
|
|
|
+ if (this.iframes[i].hasTracked == false) {
|
|
|
+ this.iframes[i].cb.apply(window, []);
|
|
|
this.iframes[i].hasTracked = true;
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
@@ -32,13 +32,13 @@ var IframeOnClick = {
|
|
|
console.log(res)
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.iframes[i].hasTracked = false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.iframes[i].hasTracked = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
var vm = new Vue({
|
|
|
el: '#select-meau',
|
|
@@ -359,43 +359,10 @@ var vm = new Vue({
|
|
|
_this.screenShow = true
|
|
|
} else {
|
|
|
_this.screenShow = false;
|
|
|
- (window.slotbydup = window.slotbydup || []).push({
|
|
|
- id: "u6603902",
|
|
|
- container: "_36y1d8lbx9n",
|
|
|
- async: true
|
|
|
- });
|
|
|
- (window.slotbydup = window.slotbydup || []).push({
|
|
|
- id: "u6603902",
|
|
|
- container: "_061vbh43quq3",
|
|
|
- async: true
|
|
|
- });
|
|
|
- _this.getAjaxAdv()
|
|
|
- setTimeout(() => {
|
|
|
- var frames = document.getElementById("iframeu6603902_0");
|
|
|
- console.log(frames, 'frames')
|
|
|
-
|
|
|
- IframeOnClick.track(frames, function() {
|
|
|
- jQuery(document).click();
|
|
|
- });
|
|
|
- }, 1000)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getAjaxAdv () {
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/publicapply/adLeague/exposure',
|
|
|
- data: {
|
|
|
- client: 'WX',
|
|
|
- id: 'ad6',
|
|
|
- position: '订阅推送列表页'
|
|
|
- },
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
selectedMoreConfirmed: function () {
|
|
|
this.$refs.moreDropdownItems.toggle(false)
|
|
|
if (this.screenShow) {
|