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

Commit 994ea8bc authored by dongchun's avatar dongchun

修改首页排版金刚位和魔方无法修改问题

parent f5c98313
...@@ -253,7 +253,72 @@ ...@@ -253,7 +253,72 @@
$("input[name=optionsRadios]").change(function(e){ $("input[name=optionsRadios]").change(function(e){
$("#bannerList").empty(); $("#bannerList").empty();
count = e.target.value; count = e.target.value;
addItem (count); promiseMethods('/goblin-front-cube/list', 'post').then(res => {
let { data } = res;
if (data && data.length > 0) {
let arr = data[0].spuId.split(',');
if (count == data[0].rowType) {
for (var i = 0; i < data.length; i++) {
let str = '';
str += `<div class="items" data-id="${data[i].mid}">
<div class="first_content">
<div class="hot_title">
页面属性:
</div>
<div class="tags">
<label>
<input type="radio" checked value="1" id="pageAttribute${i}" name="pageAttribute${i}"><span>单商品</span></label>
</div>
</div>
<div class="first_content" style="align-items: flex-start;">
<div class="hot_title">
选择商品:
</div>
<div class="tags_content" style="width: 553px;">
<div class="input-group">
<input id="goodsName${i}" data-id="${arr[i]}" type="text" class="form-control storeList" placeholder="${data[i].goblinGoods.name}">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
<div class="img_box">
<img id="goodsImg${i}" src="${data[i].goblinGoods.coverPic}" alt="" style="max-height: 180px;max-width:180px;margin: 12px 0;">
<p id="goodsTitle${i}" style="width:180px;">${data[i].goblinGoods.name}</p>
<p id="goodsPrice${i}">${data[i].goblinGoods.priceLe}</p>
</div>
<button id="del${i}" type="button" class="btn btn-danger" style="width: 60px;" onclick="del('${i}')">删除</button>
</div>
</div>
<div class="first_content" style="align-items: flex-start;">
<div class="hot_title">
推荐文案:
</div>
<div class="tags">`;
if (i == 0) {
str+= `<textarea id="text${i}" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">${data[i].informationA}</textarea>`
} else if (i == 1) {
str+= `<textarea id="text${i}" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">${data[i].informationB}</textarea>`
} else if (i == 2) {
str+= `<textarea id="text${i}" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">${data[i].informationC}</textarea>`
} else {
str+= `<textarea id="text${i}" class="form-control txtIpt" value="" name="" style="width: 553px;height: 150px;">${data[i].informationD}</textarea>`
}
str+=`</div>
</div>
</div>`
$("#bannerList").append(str);
common(i)
}
} else {
addItem (count);
}
} else {
addItem (count);
}
// refreshItem()
})
}) })
function addItem (num) { function addItem (num) {
let str = ''; let str = '';
......
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