修复下拉框选项问题

This commit is contained in:
liaozetao
2024-03-05 10:29:14 +08:00
parent 7971766283
commit 65d9dfb5f3

View File

@@ -307,6 +307,8 @@ export default {
},
initDeviateRangeSelect: function () {
let options = $('#deviateRange').children();
if (options.length <= 0) {
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
if (res.total > 0) {
var rows = res.rows;
@@ -317,9 +319,12 @@ export default {
}
}
});
}
},
initDiamondDeviateRangeSelect: function () {
let options = $('#diamondDeviateRange').children();
if (options.length <= 0) {
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
if (res.total > 0) {
var rows = res.rows;
@@ -330,9 +335,12 @@ export default {
}
}
});
}
},
initReplacePrizeSelect: function () {
let options = $('#replaceAwardChoose').children();
if (options.length <= 0) {
$.get('/admin/prize/list/type?prizeType=2', {}, function (res) {
$('#replaceAwardChoose').find('option').remove();
for (var i in res.data) {
@@ -341,6 +349,7 @@ export default {
}
});
}
}
};
main.init();