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 c82dd15..60e9c8f 100644 --- a/src/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper.js +++ b/src/assets/plugins/bootstrap-combobox/js/bootstrap-combobox-helper.js @@ -18,7 +18,7 @@ export default { setDef: function (idstr, defval) { for (let i = 0, len = $(idstr + ' option').length; i < len; i++) { let $option = $(idstr + ' option:eq(' + i + ')'); - if ($option.val() == defval) { + if ($option && $option.val() == defval) { $option.prop('selected', true); } else { $option.prop('selected', false); diff --git a/src/views/users/GiftManageView.vue b/src/views/users/GiftManageView.vue index 84133b0..d7aadf8 100644 --- a/src/views/users/GiftManageView.vue +++ b/src/views/users/GiftManageView.vue @@ -211,14 +211,14 @@
-
- +
@@ -227,7 +227,7 @@
- @@ -246,13 +246,13 @@
- +
- @@ -271,15 +271,15 @@
- +
- + - +
@@ -292,7 +292,7 @@
- +
@@ -696,6 +696,16 @@ export default { giftId: null, giftType: 2, subGiftType: 0, + baseGiftId: null, + unlockNum: 0, + sendDressType: '', + sendDressId: null, + sendDressTime: 0, + receiveDressType: '', + receiveDressId: null, + receiveDressTime: 0, + dressBanner: '', + bannerSkipUrl: '', }, }; }, @@ -742,7 +752,9 @@ export default { methods: { changeDressType(type) { let options = []; - let dressType = $('#' + type + 'DressType').val(); + console.log(type); + let dressType = this.gift[type + 'DressType']; + console.log(dressType); if (dressType == 'NAMEPLATE') { $.ajax({ type: "get", @@ -822,23 +834,27 @@ export default { } let $dressId = $('#' + type + 'DressId'); let dressId = $('#' + type + 'DressIdBak').val(); + console.log(dressId); $dressId.children().remove(); console.log(options); - if (options.length > 0) { - for (let j = 0; j < options.length; j++) { - var option = options[j]; - var $option = $('