From 6aa66ce311a47d0acb42c0b93ea9ecd90d66002c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E6=9D=B0?= <727475508@qq.com> Date: Wed, 10 Jun 2026 10:15:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=A0=B7=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E7=BB=84=E4=BB=B6=E9=A2=84=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dynamic-form/FormItemCheckbox.vue | 133 +- components/dynamic-form/FormItemImage.vue | 52 +- components/dynamic-form/FormItemNumber.vue | 52 +- components/dynamic-form/FormItemRadio.vue | 31 +- components/dynamic-form/FormItemRichtext.vue | 74 +- components/dynamic-form/FormItemSelect.vue | 63 +- components/dynamic-form/FormItemText.vue | 52 +- components/dynamic-form/FormItemTextarea.vue | 82 +- components/dynamic-form/FormItemVideo.vue | 78 +- components/dynamic-form/dynamic-form.vue | 451 ++++-- pages/artisan/service-list.vue | 383 ++--- pages/shop/add-service copy.vue | 1504 ++++++++++++++++++ pages/shop/add-service.vue | 28 +- 13 files changed, 2233 insertions(+), 750 deletions(-) create mode 100644 pages/shop/add-service copy.vue 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", {