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

Commit c3823be1 authored by dongchun's avatar dongchun

修改后台bug

parent 903201bb
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
/* 店铺审核:通过 */ /* 店铺审核:通过 */
function auditAccept(storeId) { function auditAccept() {
if (!acceptFlg) { if (!acceptFlg) {
$.modal.confirm("确认要通过该店铺申请吗?", function() { $.modal.confirm("确认要通过该店铺申请吗?", function() {
$.operate.post(prefix + "/audit/accept", { "storeId": storeId }); $.operate.post(prefix + "/audit/accept", { "storeId": storeId });
...@@ -250,13 +250,13 @@ ...@@ -250,13 +250,13 @@
} }
/* 店铺审核:驳回 */ /* 店铺审核:驳回 */
function auditReject(storeId) { function auditReject() {
if (!rejectFlg) { if (!rejectFlg) {
let value = $("#reason").val(); let value = $("#reason").val();
if (!value) { if (!value) {
return layer.msg('请填写原因!') return layer.msg('请填写原因!')
} }
$.operate.post(prefix + "/audit/reject", { "storeId": storeId, "reason": val }); $.operate.post(prefix + "/audit/reject", { "storeId": storeId, "reason": value });
} }
} }
......
...@@ -237,7 +237,14 @@ ...@@ -237,7 +237,14 @@
<span class="change${i+1}">票务名称</span>: <span class="change${i+1}">票务名称</span>:
</div> </div>
<div class="input-group iptOrSelect shwoSelect${i+1}""> <div class="input-group iptOrSelect shwoSelect${i+1}"">
<input id="ticketName${i+1}" type="text" data-id="${data[i].ticketId}" value="${data[i].ticketName}" class="form-control storeList quzhi" onFocus="focusMethod(this)" placeholder="请输入查询信息"> <input id="ticketName${i+1}" type="text" data-id="${data[i].ticketId}" value="${data[i].ticketName}" class="form-control storeList suggestIpt${i+1} quzhi" onFocus="focusMethod(this)" placeholder="请输入查询信息">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
<div class="input-group iptOrSelect shwoSelectTwo${i+1}"" style="dispaly:none;">
<input id="ticketNames${i+1}" type="text" data-id="${data[i].ticketId}" value="${data[i].ticketName}" class="form-control storeList2 suggestIpt${i+1} quzhi" onFocus="focusMethod(this)" placeholder="请输入查询信息">
<div class="input-group-btn"> <div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu"> <ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul> </ul>
...@@ -258,7 +265,7 @@ ...@@ -258,7 +265,7 @@
<input type="text" class="layui-input form-control timeEnd" id="endTime${i+1}" value="${data[i].endTime || ''}" autocomplete="off" placeholder="配置活动时间"> <input type="text" class="layui-input form-control timeEnd" id="endTime${i+1}" value="${data[i].endTime || ''}" autocomplete="off" placeholder="配置活动时间">
</div> </div>
</div> </div>
<div class="set_function_time" style="width: 40%;"> <div class="set_function_time pxBox" style="width: 40%;">
<div class="title"> <div class="title">
排序: 排序:
</div> </div>
...@@ -274,6 +281,10 @@ ...@@ -274,6 +281,10 @@
typeJump(type, i+1) typeJump(type, i+1)
common(num) common(num)
} }
if (type == 2) {
$('.del').hide();
$('.pxBox').hide();
}
}) })
// //
}) })
...@@ -321,6 +332,13 @@ ...@@ -321,6 +332,13 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="input-group iptOrSelect shwoSelectTwo${num}"" style="display:none">
<input id="ticketNames${num}" data-id="" value="" type="text" class="form-control storeList2 quzhi" onFocus="focusMethod(this)" placeholder="请输入查询信息">
<div class="input-group-btn">
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
<div class="iptOrSelect shwoH5${num}" style="display:none;"> <div class="iptOrSelect shwoH5${num}" style="display:none;">
<input id="ticketName${num}" data-id="" value="" type="text" class="layui-input form-control h5Url quzhi" placeholder="请输入活动链接"> <input id="ticketName${num}" data-id="" value="" type="text" class="layui-input form-control h5Url quzhi" placeholder="请输入活动链接">
</div> </div>
...@@ -336,7 +354,7 @@ ...@@ -336,7 +354,7 @@
<input type="text" class="layui-input form-control timeEnd" id="endTime${num}" autocomplete="off" placeholder="配置活动时间"> <input type="text" class="layui-input form-control timeEnd" id="endTime${num}" autocomplete="off" placeholder="配置活动时间">
</div> </div>
</div> </div>
<div class="set_function_time" style="width: 40%;"> <div class="set_function_time pxBox" style="width: 40%;">
<div class="title"> <div class="title">
排序: 排序:
</div> </div>
...@@ -348,8 +366,10 @@ ...@@ -348,8 +366,10 @@
</div>`; </div>`;
$("#bannerList").append(str); $("#bannerList").append(str);
common(num) common(num)
bsSuggestCommon(num)
if (type == 2) { if (type == 2) {
$('.del').hide(); $('.del').hide();
$('.pxBox').hide();
} }
} }
function save () { function save () {
...@@ -374,6 +394,9 @@ ...@@ -374,6 +394,9 @@
if (item.querySelector('#jumpSelect'+(index+1)+'').value == 2) { if (item.querySelector('#jumpSelect'+(index+1)+'').value == 2) {
obj.ticketId = item.querySelector('.h5Url').getAttribute('data-id'); obj.ticketId = item.querySelector('.h5Url').getAttribute('data-id');
obj.ticketName = item.querySelector('.h5Url').value; obj.ticketName = item.querySelector('.h5Url').value;
} else if (item.querySelector('#jumpSelect'+(index+1)+'').value == 3) {
obj.ticketId = item.querySelector('.storeList2').getAttribute('data-id');
obj.ticketName = item.querySelector('.storeList2').value;
} else { } else {
obj.ticketId = item.querySelector('.storeList').getAttribute('data-id'); obj.ticketId = item.querySelector('.storeList').getAttribute('data-id');
obj.ticketName = item.querySelector('.storeList').value; obj.ticketName = item.querySelector('.storeList').value;
...@@ -401,24 +424,52 @@ ...@@ -401,24 +424,52 @@
} }
function focusMethod(e) { function focusMethod(e) {
}
function delItem (num, mid) {
if (mid) {
let data = {
mid
}
promiseMethods('/frontBanner/delete','post',JSON.stringify(data),'application/json').then(res => {
if (res.code == 0) {
layer.msg('删除成功!');
} else {
layer.msg('删除失败!');
refreshItem()
}
})
}
$('#banner_item'+num+'').remove();
}
function changeJump(e) {
let index = $(e).attr('id').replace(/[^\d]/g,''); // 选中的是第几组 let index = $(e).attr('id').replace(/[^\d]/g,''); // 选中的是第几组
let jumpType = $(e).val(); // 选中的跳转类型
typeJump(jumpType, index)
}
function bsSuggestCommon(index) {
// let index = $(e).attr('id').replace(/[^\d]/g,''); // 选中的是第几组
let url = ''; let url = '';
let type = document.querySelector('#jumpSelect'+(index)+'').value; let type = document.querySelector('#jumpSelect'+(index)+'').value;
console.log(type)
let idField = ''; let idField = '';
let keyField = ''; let keyField = '';
let effectiveFields = []; let effectiveFields = [];
let dom = ''
if (type == 1) { if (type == 1) {
url = '/kylin/performances/recommend/performance/status?pageNum=1&pageSize=50&status=(3,6,7,8,9,10)&title='; url = '/kylin/performances/recommend/performance/status?pageNum=1&pageSize=50&status=(3,6,7,8,9,10)&title=';
idField = 'performancesId'; idField = 'performancesId';
keyField = 'title'; keyField = 'title';
effectiveFields[0] = 'title'; effectiveFields[0] = 'title';
dom = 'storeList'
} else if (type == 3) { } else if (type == 3) {
url = '/compilations/goodsList?name='; url = '/compilations/goodsList?name=';
idField = 'spuId'; idField = 'spuId';
keyField = 'name'; keyField = 'name';
effectiveFields[0] = 'name'; effectiveFields[0] = 'name';
dom = 'storeList2'
} }
$(".storeList").bsSuggest({ $('.'+dom+'').bsSuggest('init', {
idField, // data.value 的第几个数据,作为input输入框的内容 idField, // data.value 的第几个数据,作为input输入框的内容
keyField, // data.value 的第几个数据,作为input输入框的内容 keyField, // data.value 的第几个数据,作为input输入框的内容
allowNoKeyword: false, //是否允许无关键字时请求数据 allowNoKeyword: false, //是否允许无关键字时请求数据
...@@ -439,49 +490,30 @@ ...@@ -439,49 +490,30 @@
return data return data
} }
} }
}).on('onDataRequestSuccess', function (e, result) { })
}).on('onSetSelectValue', function (e, selectedData,selectedRawData ) { // 当前行的所有值都能拿到 console.log(url,dom, 'url')
}).on('onUnsetSelectValue', function (e) {
});;
}
function delItem (num, mid) {
if (mid) {
let data = {
mid
}
promiseMethods('/frontBanner/delete','post',JSON.stringify(data),'application/json').then(res => {
if (res.code == 0) {
layer.msg('删除成功!');
} else {
layer.msg('删除失败!');
refreshItem()
}
})
}
$('#banner_item'+num+'').remove();
}
function changeJump(e) {
let index = $(e).attr('id').replace(/[^\d]/g,''); // 选中的是第几组
let jumpType = $(e).val(); // 选中的跳转类型
typeJump(jumpType, index)
} }
function typeJump (jumpType, index) { function typeJump (jumpType, index) {
switch(jumpType.toString()) { switch(jumpType.toString()) {
case '1': case '1':
$('.shwoH5'+index+'').hide(); $('.shwoH5'+index+'').hide();
$('.shwoSelect'+index+'').show(); $('.shwoSelect'+index+'').show();
$('.shwoSelectTwo'+index+'').hide();
$(".change"+index+"").text('票务名称'); $(".change"+index+"").text('票务名称');
bsSuggestCommon(index)
break; break;
case '2': case '2':
$(".change"+index+"").text('活动链接'); $(".change"+index+"").text('活动链接');
$('.shwoH5'+index+'').show(); $('.shwoH5'+index+'').show();
$('.shwoSelect'+index+'').hide(); $('.shwoSelect'+index+'').hide();
$('.shwoSelectTwo'+index+'').hide();
break; break;
case '3': case '3':
$('.shwoH5'+index+'').hide(); $('.shwoH5'+index+'').hide();
$('.shwoSelect'+index+'').show(); $('.shwoSelect'+index+'').hide();
$('.shwoSelectTwo'+index+'').show();
$(".change"+index+"").text('商品名称'); $(".change"+index+"").text('商品名称');
bsSuggestCommon(index)
break; break;
default: default:
$('.shwoH5'+index+'').hide(); $('.shwoH5'+index+'').hide();
......
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