小食分类新增icon
This commit is contained in:
parent
4ad3862704
commit
62254c9ed0
@ -10,7 +10,7 @@
|
||||
<el-form-item label="排序">
|
||||
<el-input-number v-model="editPram.sort" :min="0" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
<el-form-item
|
||||
label="分类图标(180*180)"
|
||||
:rules="[
|
||||
{ required: true, message: '请上传图标', trigger: ['blur', 'change'] }
|
||||
@ -24,7 +24,7 @@
|
||||
<i class="el-icon-camera cameraIconfont" />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态">
|
||||
<el-switch
|
||||
|
@ -24,7 +24,7 @@
|
||||
<el-tag type="danger" v-else>否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="icon" label="图标">
|
||||
<el-table-column prop="icon" label="图标">
|
||||
<template slot-scope="scope">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
@ -34,7 +34,7 @@
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -68,8 +68,7 @@ public class StoreSnackCategoryController {
|
||||
@Operation(summary = "新增小食分类表" , description = "新增小食分类表" )
|
||||
@PostMapping
|
||||
public R save(@RequestBody StoreSnackCategoryEntity storeSnackCategory) {
|
||||
String icon = systemAttachmentService.clearPrefix(storeSnackCategory.getIcon());
|
||||
storeSnackCategory.setIcon(icon);
|
||||
storeSnackCategory.setIcon(systemAttachmentService.clearPrefix(storeSnackCategory.getIcon()));
|
||||
return R.ok(storeSnackCategoryService.save(storeSnackCategory));
|
||||
}
|
||||
|
||||
@ -81,6 +80,7 @@ public class StoreSnackCategoryController {
|
||||
@Operation(summary = "修改小食分类表" , description = "修改小食分类表" )
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody StoreSnackCategoryEntity storeSnackCategory) {
|
||||
storeSnackCategory.setIcon(systemAttachmentService.clearPrefix(storeSnackCategory.getIcon()));
|
||||
return R.ok(storeSnackCategoryService.updateById(storeSnackCategory));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user