diff --git a/components/dynamic-form/FormItemCheckbox.vue b/components/dynamic-form/FormItemCheckbox.vue index 85dffca..d658b91 100644 --- a/components/dynamic-form/FormItemCheckbox.vue +++ b/components/dynamic-form/FormItemCheckbox.vue @@ -1,97 +1,86 @@ diff --git a/components/dynamic-form/FormItemImage.vue b/components/dynamic-form/FormItemImage.vue index 2d6396c..9bf1f8f 100644 --- a/components/dynamic-form/FormItemImage.vue +++ b/components/dynamic-form/FormItemImage.vue @@ -16,44 +16,44 @@ diff --git a/components/dynamic-form/FormItemRadio.vue b/components/dynamic-form/FormItemRadio.vue index 6d3c015..f07bedf 100644 --- a/components/dynamic-form/FormItemRadio.vue +++ b/components/dynamic-form/FormItemRadio.vue @@ -1,30 +1,22 @@ diff --git a/components/dynamic-form/FormItemSelect.vue b/components/dynamic-form/FormItemSelect.vue index 1e717cf..c3c3ce7 100644 --- a/components/dynamic-form/FormItemSelect.vue +++ b/components/dynamic-form/FormItemSelect.vue @@ -1,53 +1,29 @@ diff --git a/components/dynamic-form/FormItemTextarea.vue b/components/dynamic-form/FormItemTextarea.vue index 3783306..43b741d 100644 --- a/components/dynamic-form/FormItemTextarea.vue +++ b/components/dynamic-form/FormItemTextarea.vue @@ -1,56 +1,52 @@ + + + + \ No newline at end of file diff --git a/pages/shop/add-service.vue b/pages/shop/add-service.vue index 58feffd..1458dd4 100644 --- a/pages/shop/add-service.vue +++ b/pages/shop/add-service.vue @@ -151,20 +151,20 @@ export default { async getTemplate() { // 模拟数据 const mockFields = [ - { key: 'title', type: 'text', label: '服务名称', is_required: 1, placeholder: '请输入服务名称' }, - { key: 'service_price', type: 'number', label: '服务定价', is_required: 1, placeholder: '请输入定价,最多两位小数', tips: '(元)' }, - { key: 'sale_price', type: 'number', label: '服务售价', is_required: 1, placeholder: '请输入售价,最多两位小数', tips: '(元)' }, - { key: 'service_time', type: 'number', label: '服务时长', is_required: 1, placeholder: '请输入服务时间', tips: '(分钟)' }, - { key: 'effect', type: 'textarea', label: '服务功效', is_required: 1, placeholder: '请输入服务功效' }, - { key: 'crowd', type: 'textarea', label: '适用人群', is_required: 1, placeholder: '请输入不适用人群,例如:未成年人/孕妇不适用' }, - { key: 'product', type: 'textarea', label: '产品清单', is_required: 0, placeholder: '请输入产品清单' }, - { key: 'scope', type: 'textarea', label: '适用范围', is_required: 0, placeholder: '请输入使用时间/适用人数' }, - { key: 'tips_text', type: 'textarea', label: '温馨提示', is_required: 0, placeholder: '请输入其他注意事项' }, - { key: 'images', type: 'image_multi', label: '服务图片', is_required: 1, maxCount: 9 }, - { key: 'video', type: 'video', label: '上传短视频', is_required: 0 }, - { key: 'category', type: 'select', label: '服务分类', is_required: 1, placeholder: '请选择服务分类', options: [{ label: '美发', value: '1' }, { label: '美甲', value: '2' }, { label: '美容', value: '3' }] }, - { key: 'service_type', type: 'single_select', label: '服务类型', is_required: 1, options: [{ label: '到店服务', value: '1' }, { label: '上门服务', value: '2' }] }, - { key: 'features', type: 'multi_select', label: '服务特色', is_required: 0, options: [{ label: '一对一服务', value: '1' }, { label: '免费咨询', value: '2' }, { label: '售后保障', value: '3' }] }, + { key: 'title', type: 'text', label: '服务名称', is_required: true, placeholder: '请输入服务名称' }, + { key: 'service_price', type: 'number', label: '服务定价', is_required: true, placeholder: '请输入定价,最多两位小数', tips: '(元)', tip: '服务的基础定价,未参与任何优惠的价格' }, + { key: 'sale_price', type: 'number', label: '服务售价', is_required: true, placeholder: '请输入售价,最多两位小数', tips: '(元)', tip: '服务参与单品优惠后的价格' }, + { key: 'service_time', type: 'number', label: '服务时长', is_required: true, placeholder: '请输入服务时间', tips: '(分钟)' }, + { key: 'effect', type: 'textarea', label: '服务功效', is_required: true, placeholder: '请输入服务功效' }, + { key: 'crowd', type: 'textarea', label: '适用人群', is_required: true, placeholder: '请输入不适用人群,例如:未成年人/孕妇不适用' }, + { key: 'product', type: 'textarea', label: '产品清单', is_required: false, placeholder: '请输入产品清单' }, + { key: 'scope', type: 'textarea', label: '适用范围', is_required: false, placeholder: '请输入使用时间/适用人数' }, + { key: 'tips_text', type: 'textarea', label: '温馨提示', is_required: false, placeholder: '请输入其他注意事项' }, + { key: 'images', type: 'image_multi', label: '服务图片', is_required: true, maxCount: 9 }, + { key: 'video', type: 'video', label: '上传短视频', is_required: false }, + { key: 'service_type', type: 'single_select', label: '服务类型', is_required: true, options: ['到店服务', '上门服务'] }, + { key: 'features', type: 'multi_select', label: '服务特色', is_required: false, options: ['一对一服务', '免费咨询', '售后保障'], maxCount: 2 }, + { key: 'graphic_details', type: 'richtext_editor', label: '图文详情', is_required: false }, ]; try { const res = await request.post("/sj/servers/getTemplate", {