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

Commit 6c414603 authored by dongchun's avatar dongchun

编辑正在下单的skp接口数据格式,及修改金刚位页面逻辑

parent ad63c01b
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://172.16.2.214:8080/#/goods/home?place=admin" width="375" height="896" frameborder="0"></iframe> <iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://m.zhengzai.tv" width="375" height="896" frameborder="0"></iframe> <iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<div class="huDongBanner" onclick="goArea(2)"> <div class="huDongBanner" onclick="goArea(2)">
<span class="huDongBannerSp" onclick="delSp(2)">X</span> <span class="huDongBannerSp" onclick="delSp(2)">X</span>
</div> </div>
<iframe src="http://172.16.2.214:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> <iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
display: none !important; display: none !important;
} }
.ibox-content .imgBox { .ibox-content .imgBox {
width: 350px; max-width: 350px;
max-height: 180px; max-height: 180px;
} }
.jump, .ticket_name, .set_function_time { .jump, .ticket_name, .set_function_time {
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://m.zhengzai.tv" width="375" height="896" frameborder="0"></iframe> <iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
类型: 类型:
</div> </div>
<div class="iptOrSelect" style="margin-right: 12px;"> <div class="iptOrSelect" style="margin-right: 12px;">
<select id="jumpType${i}" onchange="changeJump(this)" value="${data[i].navigationType}" class="type form-control" data-first-title="请选择"> <select id="jumpType${i}" onchange="changeJump(this)" value="${data[i].navigationType}" class="typeSelect type form-control" data-first-title="请选择">
<option value="1">分类</option> <option value="1">分类</option>
<option value="2">专题页</option> <option value="2">专题页</option>
<option value="3">商品单品</option> <option value="3">商品单品</option>
...@@ -206,12 +206,12 @@ ...@@ -206,12 +206,12 @@
</div> </div>
<div class="typeSelect${i}" style="display:flex;flex:1"> <div class="typeSelect${i}" style="display:flex;flex:1">
<div class="iptOrSelect"> <div class="iptOrSelect">
<select id="jumpSelect${i}" class="type form-control" data-first-title="请选择"> <select id="jumpSelectOne${i}" onchange="selectFirst(this)" class="type1 form-control" data-first-title="请选择">
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
<div class="iptOrSelect"> <div class="iptOrSelect">
<select id="jumpSelect${i}" class="type form-control" data-first-title="请选择"> <select id="jumpSelectTwo${i}" class="type2 form-control" data-first-title="请选择">
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
...@@ -254,13 +254,13 @@ ...@@ -254,13 +254,13 @@
common(i) common(i)
// setTimeout(() => { // setTimeout(() => {
let type = data[i].navigationType; let type = data[i].navigationType;
console.log(type, i, '看看') showOrhide (type, i, data[i].categoryType)
showOrhide (type, i)
$("#jumpType"+i+" option[value="+type+"]").attr('selected','selected'); $("#jumpType"+i+" option[value="+type+"]").attr('selected','selected');
// }, 500); // }, 500);
} }
} else { } else {
console.log('?')
addItem (4); addItem (4);
} }
}) })
...@@ -298,7 +298,8 @@ ...@@ -298,7 +298,8 @@
类型: 类型:
</div> </div>
<div class="iptOrSelect" style="margin-right: 12px;"> <div class="iptOrSelect" style="margin-right: 12px;">
<select id="jumpType${i}" onchange="changeJump(this)" class="type form-control" data-first-title="请选择"> <select id="jumpType${i}" onchange="changeJump(this)" class="typeSelect type form-control" data-first-title="请选择">
<option value="">请选择</option>
<option value="1">分类</option> <option value="1">分类</option>
<option value="2">专题页</option> <option value="2">专题页</option>
<option value="3">商品单品</option> <option value="3">商品单品</option>
...@@ -311,12 +312,12 @@ ...@@ -311,12 +312,12 @@
</div> </div>
<div class="typeSelect${i}" style="display:flex;flex:1"> <div class="typeSelect${i}" style="display:flex;flex:1">
<div class="iptOrSelect"> <div class="iptOrSelect">
<select id="jumpSelect${i}" class="type form-control" data-first-title="请选择"> <select id="jumpSelectOne${i}" onchange="selectFirst(this)" class="type1 form-control" data-first-title="请选择">
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
<div class="iptOrSelect"> <div class="iptOrSelect">
<select id="jumpSelect${i}" class="type form-control" data-first-title="请选择"> <select id="jumpSelectTwo${i}" class="type2 form-control" data-first-title="请选择">
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
...@@ -355,14 +356,18 @@ ...@@ -355,14 +356,18 @@
let arr = []; let arr = [];
let obj = {}; let obj = {};
Array.prototype.forEach.call(itmeLength,function (item,index) { Array.prototype.forEach.call(itmeLength,function (item,index) {
let type = [];
if ($("#jumpType"+index+"").val() == 2) { if ($("#jumpType"+index+"").val() == 2) {
obj['activityUrl'] = item.querySelector(".linkUrl").value; obj['activityUrl'] = item.querySelector(".linkUrl").value;
obj['spuId'] = ''; obj['spuId'] = '';
} else if ($("#jumpType"+index+"").val() == 3) { } else if ($("#jumpType"+index+"").val() == 3) {
obj['activityUrl'] = ''; obj['activityUrl'] = '';
obj['spuId'] = item.querySelector(".storeList").getAttribute('data-id'); obj['spuId'] = item.querySelector(".storeList").getAttribute('data-id');
} else {
type.push(item.querySelector(".type1").value)
type.push(item.querySelector(".type2").value)
} }
obj['categoryType'] = ''; obj['categoryType'] = type.toString(); //
obj['createTime'] = ''; obj['createTime'] = '';
obj['delTag'] = '0'; obj['delTag'] = '0';
obj['displayType'] = hang; obj['displayType'] = hang;
...@@ -424,13 +429,52 @@ ...@@ -424,13 +429,52 @@
let jumpType = $(e).val(); // 选中的跳转类型 let jumpType = $(e).val(); // 选中的跳转类型
showOrhide (jumpType, index) showOrhide (jumpType, index)
} }
function showOrhide (jumpType, index) { function selectFirst(e) {
let index = $(e).attr('id').replace(/[^\d]/g,''); // 选中的是第几组
let jumpType = $(e).val(); // 选中的跳转类型
categoryMethods(jumpType,index, 3)
}
function categoryMethods(parentsId, num, type, categoryType) {
let data = {
cateId: parentsId,
grade: type - 1
}
$.ajax({
type: 'post',
url: '/goblin/category/filter',
data,
success: function(res) {
const { data } = res;
let str = '';
data.forEach(item => {
if (categoryType) {
let categoryTypeArr = categoryType.split(',');
if (item.cateId == categoryTypeArr[0] || item.cateId == categoryTypeArr[1]) {
str += `<option value="${item.cateId}" selected>${item.name}</option>`
categoryMethods(item.cateId, num, 3, categoryType)
} else {
str += `<option value="${item.cateId}">${item.name}</option>`
}
} else {
str += `<option value="${item.cateId}">${item.name}</option>`
}
})
if (!parentsId) {
$("#jumpSelectOne"+num+"").append(str);
} else {
$("#jumpSelectTwo"+num+"").append(str);
}
}
})
}
function showOrhide (jumpType, index, categoryType) {
switch(jumpType.toString()) { switch(jumpType.toString()) {
case '1': case '1':
$('.shwoSelect'+index+'').hide(); $('.shwoSelect'+index+'').hide();
$('.link'+index+'').hide(); $('.link'+index+'').hide();
$('.typeSelect'+index+'').show(); $('.typeSelect'+index+'').show();
$(".titleDiv"+index+"").text('选择分类:'); $(".titleDiv"+index+"").text('选择分类:');
categoryMethods('',index, 2, categoryType)
break; break;
case '2': case '2':
$('.shwoSelect'+index+'').hide(); $('.shwoSelect'+index+'').hide();
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<iframe src="http://m.zhengzai.tv" width="375" height="896" frameborder="0"></iframe> <iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
</div> </div>
<div class="function_area"> <div class="function_area">
<!-- <iframe src="http://m.zhengzai.tv" width="375" height="896" frameborder="0"></iframe> --> <iframe src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe>
</div> </div>
</div> </div>
</div> </div>
......
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