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

Commit 6c414603 authored by dongchun's avatar dongchun

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

parent ad63c01b
......@@ -153,7 +153,7 @@
</div>
<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>
......
......@@ -168,7 +168,7 @@
</div>
<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>
......
......@@ -138,7 +138,7 @@
<div class="huDongBanner" onclick="goArea(2)">
<span class="huDongBannerSp" onclick="delSp(2)">X</span>
</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>
......
......@@ -87,7 +87,7 @@
display: none !important;
}
.ibox-content .imgBox {
width: 350px;
max-width: 350px;
max-height: 180px;
}
.jump, .ticket_name, .set_function_time {
......@@ -145,7 +145,7 @@
</div>
<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>
......@@ -193,7 +193,7 @@
类型:
</div>
<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="2">专题页</option>
<option value="3">商品单品</option>
......@@ -206,12 +206,12 @@
</div>
<div class="typeSelect${i}" style="display:flex;flex:1">
<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>
</select>
</div>
<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>
</select>
</div>
......@@ -254,13 +254,13 @@
common(i)
// setTimeout(() => {
let type = data[i].navigationType;
console.log(type, i, '看看')
showOrhide (type, i)
showOrhide (type, i, data[i].categoryType)
$("#jumpType"+i+" option[value="+type+"]").attr('selected','selected');
// }, 500);
}
} else {
console.log('?')
addItem (4);
}
})
......@@ -298,7 +298,8 @@
类型:
</div>
<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="2">专题页</option>
<option value="3">商品单品</option>
......@@ -311,12 +312,12 @@
</div>
<div class="typeSelect${i}" style="display:flex;flex:1">
<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>
</select>
</div>
<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>
</select>
</div>
......@@ -355,14 +356,18 @@
let arr = [];
let obj = {};
Array.prototype.forEach.call(itmeLength,function (item,index) {
let type = [];
if ($("#jumpType"+index+"").val() == 2) {
obj['activityUrl'] = item.querySelector(".linkUrl").value;
obj['spuId'] = '';
} else if ($("#jumpType"+index+"").val() == 3) {
obj['activityUrl'] = '';
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['delTag'] = '0';
obj['displayType'] = hang;
......@@ -424,13 +429,52 @@
let jumpType = $(e).val(); // 选中的跳转类型
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()) {
case '1':
$('.shwoSelect'+index+'').hide();
$('.link'+index+'').hide();
$('.typeSelect'+index+'').show();
$(".titleDiv"+index+"").text('选择分类:');
categoryMethods('',index, 2, categoryType)
break;
case '2':
$('.shwoSelect'+index+'').hide();
......
......@@ -114,7 +114,7 @@
</div>
<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>
......
......@@ -150,7 +150,7 @@
</div>
<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>
......
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