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