Authored by 姜敏

资源位/逛--商品/组bug修复

... ... @@ -424,11 +424,17 @@ var goodsgird = new common.grid({
}, {
display: "产品图片",
render: function (item) {
console.log("item",item);
if (item.images_url) {
item.images_url = common.util.__joinImg("goodsimg", item.images_url);
}
else {
item.images_url = common.util.__joinImg("goodsimg", item.default_images);
if(item.default_images){
item.images_url = common.util.__joinImg("goodsimg", item.default_images);
}
else{
item.images_url=""
}
}
return "<img width=120 height=60 src='" + item.images_url + "?imageView/2/w/100/h/100'/>";
}
... ... @@ -587,7 +593,7 @@ $(document).on("click", "#submit", function () {
}else{
item1.src = item1.src + "?imageView/{mode}/w/{width}/h/{height}";
}
}
if (item1.cover) {
item1.cover.cover = item1.cover.cover + imgsTem;
... ...
... ... @@ -393,7 +393,7 @@ $(document).on("click", "#copyTab", function() {
data: {rId:resources[currIndex].resource.id}
}, function (res) {
//setTimeout(function() {
window.location.href = window.location.href;
window.location.href = window.location.href;
//}, 2000);
});
});
... ... @@ -415,7 +415,7 @@ $(document).on("click", "#saveTime", function() {
}
}, function (res) {
//setTimeout(function() {
window.location.href = window.location.href;
window.location.href = window.location.href;
//}, 2000);
});
});
... ... @@ -451,7 +451,7 @@ $(document).on("click", "#delTab", function() {
}
}, function (res) {
//setTimeout(function() {
window.location.href = window.location.href;
window.location.href = window.location.href;
//}, 2000);
});
... ... @@ -522,7 +522,7 @@ $(document).on("click", "#sub_btn", function () {
data: data
}, function (res) {
//setTimeout(function() {
window.location.href = window.location.href;
window.location.href = window.location.href;
//},1000)
});
... ... @@ -570,7 +570,12 @@ var goodsgird = new common.grid({
item.images_url = common.util.__joinImg("goodsimg", item.images_url);
}
else {
item.images_url = "";
if(item.default_images){
item.images_url = common.util.__joinImg("goodsimg", item.default_images);
}
else{
item.images_url=""
}
}
return "<img width=120 height=60 src='" + item.images_url + "?imageView/2/w/100/h/100'/>";
}
... ... @@ -634,8 +639,9 @@ $(document).on("click", "#goodsSelectBtn", function () {
});
//点击“添加组”按钮(添加商品组)
$(document).on("click", "#goodsaddBtn", function () {
var item = $.extend(true, {}, Button[5].data[0]);
if (Bll.module.contentData.data[0].list.length) {
Bll.module.contentData.data.push(Button[5].data[0]);
Bll.module.contentData.data.push(item);
}
Bll.__render("#groupsgoods", "template_dialog_remgoodsgroup", Bll.module);
});
... ...
... ... @@ -60,53 +60,56 @@
</div>
</script>
<!-- 一张图片 -->
<!-- 一张图片/两张小图 -->
<script type="text/template" id="template_dialog_grid">
<div class="rows">
<div id="grid-baseFrom">
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>地址</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><input type="file" name="file" id="src-0" value="[[contentData.data[0].src]]" data-field="0.src" data-index="0" required/></td>
<td>
<div class="form-group">
<div class="col-sm-10">
<select class="form-control observe" data-field="0.url.action" value='[[contentData.data[0].url.action]]'>
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" style="resize: none">[[contentData.data[0].url.url]]</textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" value="[[contentData.data[0].alt]]" placeholder="图片描述" data-field='0.alt' />
</div>
</div>
</td>
</tr>
<div id="grid-baseFrom">
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>地址</th>
</tr>
</thead>
<tbody>
[[each contentData.data as item index]]
<tr>
<td>[[index+1]]</td>
<td>
<input type="file" name="file" id="src-[[index]]" value="[[item.src]]"
data-field="[[index]].src" data-index="[[index]]" required/>
</td>
<td>
<div class="form-group">
<div class="col-sm-10">
<select class="form-control observe" data-field="[[index]].url.action"
value='[[item.url?item.url.action:""]]'>
[[layout action_template]]
</select>
</div>
</div>
</tbody>
</table>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url"
value="[[item.url?item.url.url:'']]"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" value="[[item.alt?item.alt:'']]" placeholder="图片描述"
data-field='[[index]].alt'/>
</div>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
</div>
</div>
</script>
<!-- 选择商品 -->
<script type="text/template" id="template_dialog_goods">
<div class="rows">
... ...