...
|
...
|
@@ -57,6 +57,8 @@ var Bll = { |
|
|
$.each(shopTemplates, function(_index, template) {
|
|
|
if(defaltFlag){
|
|
|
if(template.status == 2){
|
|
|
$("#timePublishBtn").hide();
|
|
|
$("#removePublishBtn").hide();
|
|
|
defaltFlag = false;
|
|
|
index = _index;
|
|
|
Bll.templateType = template.templateType;
|
...
|
...
|
@@ -89,6 +91,7 @@ var Bll = { |
|
|
Bll.validator = new validator({
|
|
|
shopId: Bll.shopId
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// 切换模板、执行模块的删除、上下移等动作时,需要重新加载模板装修内容
|
...
|
...
|
@@ -2006,6 +2009,17 @@ var publishDecoratorTemplate = function() { |
|
|
|
|
|
// 点击"应用",切换模板
|
|
|
var switchTemplate = function() {
|
|
|
var curTemplate = $('.selected-template').parent();
|
|
|
var status = $(curTemplate).data('status');
|
|
|
var isSystemTemplate = $(curTemplate).data('is-system-template');
|
|
|
if(isSystemTemplate && +isSystemTemplate == 1 || +status == 2) {
|
|
|
$("#timePublishBtn").hide();
|
|
|
$("#removePublishBtn").hide();
|
|
|
}else {
|
|
|
$("#timePublishBtn").show();
|
|
|
$("#removePublishBtn").show();
|
|
|
}
|
|
|
|
|
|
if(Bll.changedModuleMonitor > 0) {
|
|
|
common.dialog.confirm('温馨提示', '装修内容有更新,是否保存为模板?',
|
|
|
function() {
|
...
|
...
|
@@ -2425,4 +2439,43 @@ $(document).on('change', '.observe', function() { |
|
|
let value = +$(this).val();
|
|
|
|
|
|
Bll.recommendProduct[prop] = value;
|
|
|
}); |
|
|
\ No newline at end of file |
|
|
});
|
|
|
|
|
|
$(document).on('click', '#timePublishBtn', function() {
|
|
|
new common.dialog({
|
|
|
title: "设置模板定时发布时间",
|
|
|
width: "400px",
|
|
|
content: common.util.__template2($("#timePushDialog").html()),
|
|
|
button: [
|
|
|
{
|
|
|
value: "确认", css:"btn-primary",
|
|
|
callback: function () {
|
|
|
var curTemplate = $('.selected-template').parent();
|
|
|
var templateId = $(curTemplate).data('id');
|
|
|
var publishTime = $("#publishTime").val();
|
|
|
common.util.__ajax({
|
|
|
url: '/shop/ModularDecoratorRest/updatePublishTimeTask',
|
|
|
data: {
|
|
|
templateId: templateId,
|
|
|
publishTime: publishTime,
|
|
|
timeTaskFlag: 2
|
|
|
}
|
|
|
}, function () {
|
|
|
if (res.code == 200) {
|
|
|
} else {
|
|
|
common.util.__tip(res.message);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"value": "取消",
|
|
|
"css": "btn-info"
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
$("#publishTime").datetimepicker({
|
|
|
timeFormat: 'HH:mm:ss',
|
|
|
showSecond: true
|
|
|
}).data("datepicker");
|
|
|
}); |
...
|
...
|
|