Authored by yyq

del unuse

1 -export default [{  
2 - name: 'iframe',  
3 - path: '/xianyu/iframe',  
4 - component: () => import(/* webpackChunkName: "iframe" */ './page')  
5 -}];  
1 -<template>  
2 - <LayoutApp :title="title">  
3 - <iframe ref="iframe" :onload="onload()" :src="url" class="page"></iframe>  
4 - </LayoutApp>  
5 -</template>  
6 -  
7 -<script>  
8 -  
9 -export default {  
10 - name: "IframePage",  
11 - data() {  
12 - return {  
13 - show: false,  
14 - title: '',  
15 - // url: 'https://www.baidu.com',  
16 - url: 'http://activity.yoho.cn/feature/6823.html?title=一键领取680元神劵&nodownload=1'  
17 - };  
18 - },  
19 - mounted() {  
20 - this.show = true;  
21 - },  
22 - methods: {  
23 - onload() {  
24 - setTimeout(() => {  
25 - this.loadPage();  
26 - }, 100)  
27 - },  
28 - loadPage() {  
29 - console.log('onload');  
30 - console.log({...this.$refs});  
31 - if (!this.$refs.iframe) {  
32 - return;  
33 - }  
34 -  
35 - const elemIfram = this.$refs.iframe;  
36 -  
37 - const contentWindow = elemIfram.contentWindow;  
38 - // const iframeDocument = contentWindow.document;  
39 -console.log(contentWindow)  
40 - if (contentWindow.MutationObserver || contentWindow.webkitMutationObserver) {  
41 - console.log(11)  
42 - let observer;  
43 - // chrome  
44 - let callback = function(mutations) {  
45 - mutations.forEach(function(mutation) {  
46 - console.log(mutation.oldValue, mutation.target.src, mutation.target);  
47 - });  
48 - };  
49 - if (contentWindow.MutationObserver) {  
50 - observer = new MutationObserver(callback);  
51 - } else {  
52 - observer = new webkitMutationObserver(callback);  
53 - }  
54 - observer.observe(elemIfram, {  
55 - attributes: true,  
56 - attributeOldValue: true  
57 - });  
58 - } else if (elemIfram.addEventListener) {  
59 - console.log(22)  
60 - // Firefox, Opera and Safari  
61 - elemIfram.addEventListener("DOMAttrModified", function(event){  
62 - console.log(event.prevValue,event.newValue,event.target);  
63 - }, false);  
64 - }  
65 -  
66 - // console.log(iframeDocument.getElementsByTagName('a'));  
67 - }  
68 - }  
69 -};  
70 -</script>  
71 -  
72 -<style lang="scss" scoped>  
73 -.page {  
74 - width: 100%;  
75 - height: 100%;  
76 - position: absolute;  
77 - top: 0;  
78 - bottom: 0;  
79 -}  
80 -  
81 -</style>  
@@ -10,9 +10,9 @@ const isProduction = process.env.NODE_ENV === 'production'; @@ -10,9 +10,9 @@ const isProduction = process.env.NODE_ENV === 'production';
10 const isTest = process.env.NODE_ENV === 'test3'; 10 const isTest = process.env.NODE_ENV === 'test3';
11 11
12 const domains = { 12 const domains = {
13 - api: 'http://api.yoho.cn/',  
14 - service: 'http://service.yoho.cn/',  
15 - ufo: 'http://2.yohobuy.com', 13 + // api: 'http://api.yoho.cn/',
  14 + // service: 'http://service.yoho.cn/',
  15 + // ufo: 'http://2.yohobuy.com',
16 16
17 // liveApi: 'http://testapi.live.yohops.com:9999/', 17 // liveApi: 'http://testapi.live.yohops.com:9999/',
18 // singleApi: 'http://api-test3.yohops.com:9999/', 18 // singleApi: 'http://api-test3.yohops.com:9999/',
@@ -23,9 +23,9 @@ const domains = { @@ -23,9 +23,9 @@ const domains = {
23 23
24 // platformApi: 'http://172.16.6.210:8088/', 24 // platformApi: 'http://172.16.6.210:8088/',
25 25
26 - // api: 'http://api-test3.dev.yohocorp.com/',  
27 - // service: 'http://api-test3.dev.yohocorp.com/',  
28 - // ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/', 26 + api: 'http://api-test3.dev.yohocorp.com/',
  27 + service: 'http://api-test3.dev.yohocorp.com/',
  28 + ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
29 }; 29 };
30 30
31 module.exports = { 31 module.exports = {
@@ -33,11 +33,11 @@ module.exports = { @@ -33,11 +33,11 @@ module.exports = {
33 appVersion: '6.9.12', // 调用api的版本 33 appVersion: '6.9.12', // 调用api的版本
34 appName: 'xianyu-ufo-app-node', 34 appName: 'xianyu-ufo-app-node',
35 port: 6001, 35 port: 6001,
36 - siteUrl: '//m.yohobuy.com', 36 + siteUrl: '//xianyu.yohobuy.com',
37 assetUrl: '//m.yohobuy.com:5001/yohoapp-node/', 37 assetUrl: '//m.yohobuy.com:5001/yohoapp-node/',
38 testCode: 'yoho4946abcdef#$%&!@', 38 testCode: 'yoho4946abcdef#$%&!@',
39 domains, 39 domains,
40 - yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc', 40 + // yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc',
41 signExtend: { 41 signExtend: {
42 business_line: 'yohobuy', 42 business_line: 'yohobuy',
43 business_client: 'h5/xianyu', 43 business_client: 'h5/xianyu',