diff --git a/src/components/base/margin/index.vue b/src/components/base/margin/index.vue index 57c2b7ff..2a775352 100644 --- a/src/components/base/margin/index.vue +++ b/src/components/base/margin/index.vue @@ -50,27 +50,27 @@ const margin_event = (val: number | undefined) => { form.value.margin_bottom = Number(val); form.value.margin_left = Number(val); form.value.margin_right = Number(val); - emit('update:value', form); + emit('update:value', form.value); }; const pt_event = (val: number | undefined) => { form.value.margin_top = Number(val); form.value.margin = 0; - emit('update:value', form); + emit('update:value', form.value); }; const pb_event = (val: number | undefined) => { form.value.margin_bottom = Number(val); form.value.margin = 0; - emit('update:value', form); + emit('update:value', form.value); }; const pl_event = (val: number | undefined) => { form.value.margin_left = Number(val); form.value.margin = 0; - emit('update:value', form); + emit('update:value', form.value); }; const pr_event = (val: number | undefined) => { form.value.margin_right = Number(val); form.value.margin = 0; - emit('update:value', form); + emit('update:value', form.value); }; //#region 展开收起 onBeforeMount(() => { diff --git a/src/components/base/padding/index.vue b/src/components/base/padding/index.vue index 0eb5aba2..a151fe40 100644 --- a/src/components/base/padding/index.vue +++ b/src/components/base/padding/index.vue @@ -56,27 +56,27 @@ const padding_event = (val: number | undefined) => { form.value.padding_bottom = Number(val); form.value.padding_left = Number(val); form.value.padding_right = Number(val); - emit('update:value', form); + emit('update:value', form.value); }; const pt_event = (val: number | undefined) => { form.value.padding_top = Number(val); form.value.padding = 0; - emit('update:value', form); + emit('update:value', form.value); }; const pb_event = (val: number | undefined) => { form.value.padding_bottom = Number(val); form.value.padding = 0; - emit('update:value', form); + emit('update:value', form.value); }; const pl_event = (val: number | undefined) => { form.value.padding_left = Number(val); form.value.padding = 0; - emit('update:value', form); + emit('update:value', form.value); }; const pr_event = (val: number | undefined) => { form.value.padding_right = Number(val); form.value.padding = 0; - emit('update:value', form); + emit('update:value', form.value); }; //#region 展开收起 onBeforeMount(() => { diff --git a/src/components/model-seckill/index.vue b/src/components/model-seckill/index.vue index 0b67736a..5eda6672 100644 --- a/src/components/model-seckill/index.vue +++ b/src/components/model-seckill/index.vue @@ -382,18 +382,20 @@ const init = (data: any) => { } else { list.value = Array(4).fill(default_list); } - const { status, time_first_text } = data.current.time; + const { status = '1', time_first_text = '已结束' } = data?.current?.time || {}; seckill_time.value = { endTime: data.current.time_end, startTime: data.current.time_start, status: status, time_first_text: time_first_text, }; - // 先执行一次倒计时,后续的等待倒计时执行 - setTimeout(() => { - updateCountdown(); - }, 0); - intervalId.value = setInterval(updateCountdown, 1000); + if (time_first_text !== '已结束') { + // 先执行一次倒计时,后续的等待倒计时执行 + setTimeout(() => { + updateCountdown(); + }, 0); + intervalId.value = setInterval(updateCountdown, 1000); + } } else { list.value = Array(4).fill(default_list); } diff --git a/src/config/const/realstore.ts b/src/config/const/realstore.ts index 20caafc9..cfbf6a24 100644 --- a/src/config/const/realstore.ts +++ b/src/config/const/realstore.ts @@ -200,11 +200,11 @@ const defaultRealstore: defaultRealstore = { realstore_background_img: [], // 图片圆角 realstore_img_radius: { - radius: 0, - radius_top_left: 0, - radius_top_right: 0, - radius_bottom_left: 0, - radius_bottom_right: 0, + radius: 4, + radius_top_left: 4, + radius_top_right: 4, + radius_bottom_left: 4, + radius_bottom_right: 4, }, realstore_margin: { margin: 0, diff --git a/src/config/const/shop.ts b/src/config/const/shop.ts index ceb7dff9..6b14f65c 100644 --- a/src/config/const/shop.ts +++ b/src/config/const/shop.ts @@ -99,11 +99,11 @@ const defaultRealstore: defaultRealstore = { shop_background_img: [], // 图片圆角 shop_img_radius: { - radius: 0, - radius_top_left: 0, - radius_top_right: 0, - radius_bottom_left: 0, - radius_bottom_right: 0, + radius: 4, + radius_top_left: 4, + radius_top_right: 4, + radius_bottom_left: 4, + radius_bottom_right: 4, }, shop_margin: { margin: 0, diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index 4ecafb8d..6cc49d94 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -27,6 +27,7 @@ import { cloneDeep, isEmpty, omit } from 'lodash'; import DiyAPI, { diyData, headerAndFooter, diyConfig } from '@/api/diy'; import CommonAPI from '@/api/common'; import { commonStore } from '@/store'; +import { de } from 'element-plus/es/locale'; const common_store = commonStore(); interface diy_data_item { id: string; @@ -442,6 +443,11 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_ .catch((err) => { // 失败的时候关闭弹出框 ElMessage.closeAll(); + if (err == 'canceled') { + console.log('请求已取消'); + } else { + ElMessage.error(err || '系统出错'); + } save_disabled.value = false; }); };