任务奖励列表增加图片展示

This commit is contained in:
YeMingfei666 2024-12-25 13:40:38 +08:00
parent 698f8ae186
commit f1f6605617
2 changed files with 13 additions and 2 deletions

View File

@ -30,6 +30,7 @@
<el-radio-group v-model="form.type">
<el-radio :label="1">金币</el-radio>
<el-radio :label="2">现金</el-radio>
<el-radio :label="3">虚拟物品</el-radio>
<el-radio :label="9">大转盘抽奖次数</el-radio>
</el-radio-group>
</el-form-item>

View File

@ -18,6 +18,15 @@
<span>{{ returnTypeName(scope.row.type) }}</span>
</template>
</el-table-column>
<el-table-column label="奖励类型">
<template slot-scope="scope">
<el-image
style="width: 50px; height: 50px"
:src="scope.row.img"
:preview-src-list="[scope.row.img]"
></el-image>
</template>
</el-table-column>
<el-table-column label="数量">
<template slot-scope="scope">
<span>{{ scope.row.number }}</span>
@ -106,15 +115,16 @@ export default {
const $types = {
1: "金币",
2: "现金红包",
3: "虚拟物品",
9: "大转盘抽奖次数",
};
return $types[type] ? $types[type] : "";
},
//
async init() {
const {id}=this.renwu;
const { id } = this.renwu;
const { data } = await $api.getList({
taskId:id,
taskId: id,
page: this.page,
limit: this.limit,
});