diff --git a/src/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper.js b/src/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper.js index a2f4c5c..c82dd15 100644 --- a/src/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper.js +++ b/src/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper.js @@ -16,17 +16,15 @@ export default { }, // 设置默认值 setDef: function (idstr, defval) { - if (defval) { - for (let i = 0, len = $(idstr + ' option').length; i < len; i++) { - let $option = $(idstr + ' option:eq(' + i + ')'); - if ($option.val() == defval) { - $option.prop('selected', true); - } else { - $option.prop('selected', false); - } + for (let i = 0, len = $(idstr + ' option').length; i < len; i++) { + let $option = $(idstr + ' option:eq(' + i + ')'); + if ($option.val() == defval) { + $option.prop('selected', true); + } else { + $option.prop('selected', false); } - $(idstr).btComboBox('parse'); } + $(idstr).btComboBox('parse'); }, // 构建下拉组合框 build: function (val, idstr, defval) { diff --git a/src/views/car/CarGoodsAdminView.vue b/src/views/car/CarGoodsAdminView.vue index d2e7be4..00e69cf 100644 --- a/src/views/car/CarGoodsAdminView.vue +++ b/src/views/car/CarGoodsAdminView.vue @@ -587,6 +587,12 @@ export default { $("#nobleId").btComboBox('disable'); ComboboxHelper.setDef("#nobleId", '0'); ComboboxHelper.setDef("#enable", '2'); + $("input:radio[name='enable']")[0].checked = true; + $("input:radio[name='isSale']")[0].checked = true; + $("input:radio[name='isNobleLimit']")[0].checked = true; + $("input:radio[name='isMonsterLimit']")[0].checked = true; + $("input:radio[name='isWeekStarLimit']")[0].checked = true; + $("input:radio[name='isActivityLimit']")[0].checked = true; }); $("#nobleId").on('change', function () { if (ComboboxHelper.getSelected("#nobleId") != 0) { @@ -882,11 +888,6 @@ export default { $("#tipModal").modal('show'); return; } - if (!effect) { - $("#tipMsg").text("请上传动画图片"); - $("#tipModal").modal('show'); - return; - } if (!days || days <= 0) { $("#tipMsg").text("请输入合理的购买天数"); $("#tipModal").modal('show');