记得上下班打卡 | git大法好,push需谨慎

Commit 539e80a5 authored by dongchun's avatar dongchun

动态修改iframe地址

parent 07743253
......@@ -153,7 +153,7 @@
</div>
<div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
<iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div>
</div>
</div>
......@@ -171,6 +171,14 @@
let updateTime = '';
$(function() {
// addItem (1);
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/goblin-front-cube/list', 'post').then(res => {
let { data } = res;
if (data && data.length > 0) {
......
......@@ -168,7 +168,7 @@
</div>
<div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
<iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div>
</div>
</div>
......@@ -184,6 +184,14 @@
let selectGoodsId = '';
let updateTime = '';
$(function() {
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/selectGoods/getList', 'post').then(res => {
console.log(res, 121212)
let { data } = res;
......
......@@ -138,7 +138,7 @@
<div class="huDongBanner" onclick="goArea(2)">
<span class="huDongBannerSp" onclick="delSp(2)">X</span>
</div>
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
<iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div>
</div>
......@@ -147,7 +147,14 @@
<script th:inline="javascript">
var prefix2 = ctx + "local";
$(function() {
console.log(window.location, ctx,window.location.hostname, 'ctx')
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
modalPx()
})
function goArea (num) {
......
......@@ -145,7 +145,7 @@
</div>
<div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
<iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div>
</div>
</div>
......@@ -159,7 +159,14 @@
let jumpType = 1;
let hang = 1;
$(function() {
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/navigation/list', 'post').then(res => {
let { data } = res;
if (data&&data.length>0) {
......
......@@ -114,7 +114,7 @@
</div>
<div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
<iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div>
</div>
</div>
......@@ -128,6 +128,14 @@
let hotWordId = '';
let updateTime = '';
$(function(){
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
promiseMethods('/hotWord/list', 'post').then(res => {
let data = res.data[0];
mid = data.mid;
......
......@@ -150,7 +150,7 @@
</div>
<div class="function_area">
<iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
<iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div>
</div>
</div>
......@@ -163,6 +163,14 @@
let num = 0;
let type = 0;
$(function(){
let url = window.location.hostname;
if (url.includes('test')) {
$("#iframe").attr('src', 'https://testm.zhengzai.tv/#/goods/home?place=admin');
} else if (!url.includes('test') && url.includes('admin')) {
$("#iframe").attr('src', 'https://m.zhengzai.tv/#/goods/home?place=admin');
} else {
}
let name = 'id';
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment