From 3a41bbed52705d5992475ee30bce568d34e2a4f0 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Mon, 24 Nov 2025 17:21:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=B5=84=E6=BA=90=E7=BB=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE):=20=E4=BF=AE=E5=A4=8D=E8=8D=A3=E8=AA=89=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E7=9A=84=E4=BF=9D=E5=AD=98=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/data/PropsRow/index.vue | 221 ++++++++++-------- .../props/props-source-group/form-edit.vue | 111 ++++++++- src/views/props/props-source-group/index.vue | 124 +++++----- 3 files changed, 306 insertions(+), 150 deletions(-) diff --git a/src/components/data/PropsRow/index.vue b/src/components/data/PropsRow/index.vue index da8fbe6..5933470 100644 --- a/src/components/data/PropsRow/index.vue +++ b/src/components/data/PropsRow/index.vue @@ -1,13 +1,36 @@ diff --git a/src/views/props/props-source-group/form-edit.vue b/src/views/props/props-source-group/form-edit.vue index 5ca276b..51d13fe 100644 --- a/src/views/props/props-source-group/form-edit.vue +++ b/src/views/props/props-source-group/form-edit.vue @@ -18,6 +18,7 @@ label-width="110px" style="margin-right:50px;" > + + + 上架 下架 + +
+
{{ index + 1 }}
+ +
+ + {{ getTypeName(item) }} + +
+ + +
+
{{ item.ext.title }}
+ + + + + + + + + + + + + +
+ +
+ +
{ + // 输入不合规 if (!valid) { console.error("error submit!!"); return; } + const item = that.form.tmpConfigList[0]; const itemExt = item.ext; that.form.rewardConfigList.push({ @@ -1122,6 +1164,8 @@ export default { that.form.tmpConfigList.splice(index, 1); }); }, + + //获取类型名称 getTypeName(item) { const typeData = this.propsTypeMap[item.detailType]; if (typeData) { @@ -1129,43 +1173,65 @@ export default { } return ""; }, + + //删除配置列表的项 deleteUpdateItem(index) { this.form.rewardConfigList.splice(index, 1); }, + + // 添加选项 addContent(type) { const that = this; + that.$refs.form.validate(valid => { + // 输入不合规 if (!valid) { console.error("error submit!!"); return; } + + // 达成条件直接保存 if (that.form.tmpConfigList && that.form.tmpConfigList.length > 0) { - that.submitItem(0); + that.submitItem(0); //保存配置 } + + //金币、钻石、靓号 if (that.isGoldOrDiamond(type) || type === "SPECIAL_ID") { that.addContentData(type); return; } + + // 游戏券 if (that.isGameCoupon(type)) { that.addContentData(type); return; } + + // 道具券 if (that.isPROPCOUPON(type)) { that.addContentData(type); return; } + + // 荣誉活动 // if (that.isHONORACTIVITY(type)) { // that.addContentData(type); // return; // } + + // 无需加载资源数据 if (that.propsTypeData[type].loadData === true) { that.addContentData(type); return; } + + // 需要加载资源数据 that.propsTypeData[type].loading = true; + // 礼物 if (that.isGift(type)) { that.disableAddContent = true; + // 获取指定平台礼物 listGiftBySysOrigin(that.form.sysOrigin) .then(res => { that.disableAddContent = false; @@ -1192,9 +1258,11 @@ export default { return; } + // 徽章类型 const badgeType = that.getBadgeType(type); if (badgeType) { that.disableAddContent = true; + // 获取平台徽章信息 listBadgePictureBySysOrigin(that.form.sysOrigin, badgeType) .then(res => { that.disableAddContent = false; @@ -1221,6 +1289,7 @@ export default { return; } + // VIP if (type === "NOBLE_VIP") { that.disableAddContent = true; listNotFamilyBySysOriginType(that.form.sysOrigin, "NOBLE_VIP") @@ -1249,6 +1318,7 @@ export default { return; } + //表情包 if (type === "EMOJI") { listGroupBySysOrigin(that.form.sysOrigin) .then(res => { @@ -1275,6 +1345,8 @@ export default { } that.disableAddContent = true; + + // 获取资源列表 listSysOriginTypeList(that.sysOrigin, type) .then(res => { that.disableAddContent = false; @@ -1301,6 +1373,8 @@ export default { }); }); }, + + // 获取徽章类型 getBadgeType(type) { if (this.isUserBadge(type)) { return "ACTIVITY"; @@ -1312,42 +1386,62 @@ export default { if (this.isHONORACTIVITY(type)) { return "HONOR_ACTIVITY"; + // return "BADGE"; } return null; }, + + // 是否为金币和钻石 isCurrency(type) { return type === "GOLD" || type === "DIAMOND"; }, + // 是否为游戏券 isGameCoupon(type) { return type === "GAME_COUPON"; }, + // 是否为道具券 isPROPCOUPON(type) { return type === "PROP_COUPON"; }, + // 是否为荣誉活动 isHONORACTIVITY(type) { return type === "HONOR_ACTIVITY"; }, + + // 是否为徽章 isBadge(type) { return this.isRoomBadge(type) || this.isUserBadge(type); }, + + // 是否为用户徽章 isUserBadge(type) { return type === "BADGE"; }, + + // 是否为自定义 isCustomize(type) { return type === "CUSTOMIZE"; }, + + // 是否为房间徽章 isRoomBadge(type) { return type === "ROOM_BADGE"; }, + + // 是否为礼物 isGift(type) { return type === "GIFT"; }, + + // 是否为主题 isTheme(type) { return type === "THEME"; }, + + // 添加可编辑的内容数据 addContentData(type) { const that = this; that.form.tmpConfigList.push({ @@ -1362,19 +1456,24 @@ export default { } }); }, + + // 是否为金币或者钻石 isGoldOrDiamond(type) { return type === "GOLD" || type === "DIAMOND"; }, + clickChangeSource() { this.isChangeSource = !this.isChangeSource; if (this.isChangeSource === true && this.isLoadSourceTypeList === false) { this.loadSourceType(); } }, + changeType(index) { this.selectType = this.sourceTypeList[index]; this.form.sourceId = this.selectType.id; }, + loadSourceType() { const that = this; that.listTypeLoading = true; @@ -1389,10 +1488,12 @@ export default { console.error(er); }); }, + handleCoverFileRemove(file, fileList) { this.form.cover = ""; this.coverUploadLoading = false; }, + sourceUpload(file) { const that = this; that.sourceUploadLoading = true; @@ -1406,13 +1507,18 @@ export default { that.sourceUploadLoading = false; }); }, + handleSourceFileRemove(file, fileList) { this.form.sourceUrl = ""; this.sourceUploadLoading = false; }, + + // 关闭窗口 handleClose() { this.$emit("close"); }, + + // 保存按钮 submitForm() { const that = this; that.$refs.form.validate(valid => { @@ -1453,6 +1559,7 @@ export default { }); }); }, + clickSvgaplayer() { this.svgaplayerVisable = true; } diff --git a/src/views/props/props-source-group/index.vue b/src/views/props/props-source-group/index.vue index fde9c0f..eb5ff0c 100644 --- a/src/views/props/props-source-group/index.vue +++ b/src/views/props/props-source-group/index.vue @@ -14,7 +14,9 @@ :label="item.label" :value="item.value" > - + + {{ item.label }} @@ -26,7 +28,12 @@ clearable @change="handleSearch" > - + - +