修复提示

This commit is contained in:
liaozetao
2024-01-30 18:49:19 +08:00
parent a4a12c7f89
commit 00593fc0ea

View File

@@ -201,7 +201,7 @@
<div class="form-group"> <div class="form-group">
<label for="subGiftType" class="col-sm-3 control-label">解锁礼物类型</label> <label for="subGiftType" class="col-sm-3 control-label">解锁礼物类型</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="subGiftType" id="subGiftType" data-btn-class="btn-warning" class="form-control" v-model="gift.subGiftType"> <select name="subGiftType" id="subGiftType" data-btn-class="btn-warning" class="form-control" v-model="gift.subGiftType" @change="giftUnlockList">
<option value=""></option> <option value=""></option>
<option value="0">基础解锁礼物</option> <option value="0">基础解锁礼物</option>
<option value="1">被解锁礼物</option> <option value="1">被解锁礼物</option>
@@ -211,8 +211,8 @@
<div class="form-group" v-if="gift.subGiftType == 1"> <div class="form-group" v-if="gift.subGiftType == 1">
<label for="baseGiftId" class="col-sm-3 control-label">需要的基础解锁礼物</label> <label for="baseGiftId" class="col-sm-3 control-label">需要的基础解锁礼物</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="baseGiftId" id="baseGiftId" data-btn-class="btn-warning" class="form-control" v-model="gift.baseGiftId"> <select name="baseGiftId" id="baseGiftId" data-btn-class="btn-warning" class="form-control">
<option v-for="(baseGift, index) in unlockList" :key="baseGift" :data-index="index" :value="baseGift.value">{{ baseGift.text }}</option>
</select> </select>
</div> </div>
</div> </div>
@@ -692,7 +692,6 @@ export default {
name: "GiftManageView", name: "GiftManageView",
data() { data() {
return { return {
unlockList: [],
giftLevel: [], giftLevel: [],
gift: { gift: {
giftId: null, giftId: null,
@@ -861,13 +860,15 @@ export default {
giftUnlockList() { giftUnlockList() {
getGiftUnlockList().then(res => { getGiftUnlockList().then(res => {
let data = res.data; let data = res.data;
let lockGifts = data.map(e => { let options = data.map(e => {
return { return {
text: e.giftName, text: e.giftName,
value: e.giftId, value: e.giftId,
}; };
}); });
this.unlockList = lockGifts; setTimeout(() => {
ComboboxHelper.build(options, '#baseGiftId', this.gift.baseGiftId);
}, 500);
}); });
}, },
levelList() { levelList() {
@@ -1192,6 +1193,10 @@ export default {
window.selectConsumeChange($("#consumeType")); window.selectConsumeChange($("#consumeType"));
$('#roomExcludeId').val(''); $('#roomExcludeId').val('');
$('#giftLevel').val(''); $('#giftLevel').val('');
$('#giftTag').val('');
$('#giftTagImage').attr("src", '');
$("#giftTagUploadInfo").html('');
$("#giftTagFile").val('');
$('#giftType').removeAttr('disabled'); $('#giftType').removeAttr('disabled');
$('#subGiftType').removeAttr('disabled'); $('#subGiftType').removeAttr('disabled');
$('#baseGiftId').removeAttr('disabled'); $('#baseGiftId').removeAttr('disabled');
@@ -1209,9 +1214,7 @@ export default {
$('#bannerSkipUrl').val(''); $('#bannerSkipUrl').val('');
$('#sendDressIdBak').val(''); $('#sendDressIdBak').val('');
$('#receiveDressIdBak').val(''); $('#receiveDressIdBak').val('');
setTimeout(() => { $this.giftUnlockList();
$this.giftUnlockList();
}, 1000);
$("#giftModal").modal('show'); $("#giftModal").modal('show');
}); });
$("#gift-version-save").click(function () { $("#gift-version-save").click(function () {
@@ -1605,8 +1608,8 @@ export default {
$('#baseGiftId').attr('disabled', 'disabled'); $('#baseGiftId').attr('disabled', 'disabled');
$('#unlockNum').attr('disabled', 'disabled'); $('#unlockNum').attr('disabled', 'disabled');
} }
$this.giftUnlockList();
}, 1000); }, 1000);
$this.giftUnlockList();
// 打开编辑弹窗 // 打开编辑弹窗
$("#giftModal").modal('show'); $("#giftModal").modal('show');
} else { } else {
@@ -1672,7 +1675,7 @@ export default {
$("#tipModal").modal('show'); $("#tipModal").modal('show');
TableHelper.doRefresh("#table"); TableHelper.doRefresh("#table");
} else { } else {
$("#tipMsg").text("保存失败." + json.msg); $("#tipMsg").text("保存失败." + json.message);
$("#tipModal").modal('show'); $("#tipModal").modal('show');
} }
} }