📖 code review:店铺装修逻辑

This commit is contained in:
YunaiV
2023-12-19 23:10:58 +08:00
parent df1c565cd9
commit b86f082306
19 changed files with 23 additions and 23 deletions

View File

@ -27,10 +27,11 @@
</DiyEditor>
</template>
<script setup lang="ts">
// TODO @疯狂:要不要建个 decorate 目录,然后挪进去,改成 index.vue这样可以更明确看到是个独立界面哈更好找
import * as DiyTemplateApi from '@/api/mall/promotion/diy/template'
import * as DiyPageApi from '@/api/mall/promotion/diy/page'
import { useTagsViewStore } from '@/store/modules/tagsView'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // 商城的 DIY 组件,在 DiyEditor 目录下
import { toNumber } from 'lodash-es'
/** 装修模板表单 */
@ -51,7 +52,7 @@ const formData = ref<DiyTemplateApi.DiyTemplatePropertyVO>()
const formRef = ref() // 表单 Ref
// 当前编辑的属性
const currentFormData = ref<DiyTemplateApi.DiyTemplatePropertyVO | DiyPageApi.DiyPageVO>()
// 商城H5预览地址
// 商城 H5 预览地址
const previewUrl = ref('')
// 获取详情

View File

@ -205,7 +205,7 @@ const handleUse = async (row: DiyTemplateApi.DiyTemplateVO) => {
// 使用模板的二次确认
await message.confirm(`是否使用模板“${row.name}”?`)
// 发起删除
await DiyTemplateApi.useDiyTemplate(row.id)
await DiyTemplateApi.useDiyTemplate(row.id!)
message.success('使用成功')
// 刷新列表
await getList()