@@ -44,7 +44,9 @@
- {{ form.subscript_text }}
+
+ {{ form.subscript_text }}
+
@@ -69,7 +73,8 @@
{{ item.show_price_unit }}
- {{ item.show_original_price_symbol }}{{ item.min_original_price }}
+ {{ item.show_original_price_symbol }}{{ item.min_original_price }}
{{ item.show_original_price_unit }}
@@ -90,20 +95,8 @@
-
-
+
+
@@ -112,7 +105,9 @@
- {{ form.subscript_text }}
+
+ {{ form.subscript_text }}
+
@@ -137,7 +134,8 @@
{{ item.show_price_unit }}
-
{{ item.show_original_price_symbol }}{{ item.min_original_price }}
+ {{ item.show_original_price_symbol }}{{ item.min_original_price }}
{{ item.show_original_price_unit }}
@@ -181,9 +179,9 @@ const props = defineProps({
});
const new_url = ref('');
onBeforeMount(async () => {
- const url = await online_url('/static/plugins/seckill/images/diy/').then(res => res);
+ const url = await online_url('/static/plugins/seckill/images/diy/').then((res) => res);
new_url.value = url + 'time.png';
-})
+});
const form = computed(() => props.value?.content || {});
const new_style = computed(() => props.value?.style || {});
const time_bg = computed(() => {
@@ -194,8 +192,8 @@ const time_bg = computed(() => {
});
// icon的渐变色处理
const icon_time_check = () => {
- return `${ time_bg.value };line-height: 1;background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;`;
-}
+ return `${time_bg.value};line-height: 1;background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;`;
+};
const slide_active_color = computed(() => {
const { progress_actived_color_list, progress_actived_direction } = new_style.value;
@@ -277,12 +275,12 @@ const time_config = reactive([
{ key: 'minute', value: '00' },
{ key: 'second', value: '00' },
]);
-const intervalId = ref(undefined);
+const intervalId = ref(undefined);
const seckill_time = ref({
endTime: '2024-09-04 18:51:00',
startTime: '2024-09-04 18:51:00',
status: 0,
- time_first_text: '距结束'
+ time_first_text: '距结束',
});
const updateCountdown = () => {
const now = new Date();
@@ -299,7 +297,9 @@ const updateCountdown = () => {
seckill_time.value.status = 1;
seckill_time.value.time_first_text = '距结束';
// 先执行一次倒计时,后续的等待倒计时执行
- setTimeout(() => { updateCountdown();}, 0);
+ setTimeout(() => {
+ updateCountdown();
+ }, 0);
intervalId.value = setInterval(updateCountdown, 1000);
}
return;
@@ -317,7 +317,7 @@ const updateCountdown = () => {
item.value = seconds < 10 ? '0' + seconds : seconds.toString();
}
});
-}
+};
// 更新倒计时函数
onBeforeMount(() => {
SeckillAPI.getSeckillList({}).then((res: any) => {
@@ -333,16 +333,18 @@ onBeforeMount(() => {
endTime: '2024-09-05 09:36:00',
startTime: '2024-09-05 09:33:00',
status: 0,
- time_first_text: time_first_text
- }
+ time_first_text: time_first_text,
+ };
// 先执行一次倒计时,后续的等待倒计时执行
- setTimeout(() => { updateCountdown();}, 0);
+ setTimeout(() => {
+ updateCountdown();
+ }, 0);
intervalId.value = setInterval(updateCountdown, 1000);
} else {
list.value = Array(4).fill(default_list);
}
});
-})
+});
// 商品间距
const content_outer_spacing = computed(() => new_style.value.content_outer_spacing);
// 圆角设置
@@ -443,16 +445,16 @@ const content_img_radius = computed(() => radius_computer(new_style.value.shop_i
// 左上角,右上角,右下角,左下角
const corner_marker = computed(() => {
const { seckill_subscript_location, shop_img_radius, seckill_subscript_bg_color, seckill_subscript_text_color } = new_style.value;
- let location = `background: ${ seckill_subscript_bg_color };color: ${seckill_subscript_text_color};`;
+ let location = `background: ${seckill_subscript_bg_color};color: ${seckill_subscript_text_color};`;
// 圆角根据图片的圆角来计算 对角线是同样的圆角
if (seckill_subscript_location == 'top-left') {
- location += `top: 0;left: 0;border-radius: ${ shop_img_radius.radius_top_left }px 0 ${ shop_img_radius.radius_top_left }px 0;`;
+ location += `top: 0;left: 0;border-radius: ${shop_img_radius.radius_top_left}px 0 ${shop_img_radius.radius_top_left}px 0;`;
} else if (seckill_subscript_location == 'top-right') {
- location += `top: 0;right: 0;border-radius: 0 ${ shop_img_radius.radius_top_right }px 0 ${ shop_img_radius.radius_top_right }px;`;
+ location += `top: 0;right: 0;border-radius: 0 ${shop_img_radius.radius_top_right}px 0 ${shop_img_radius.radius_top_right}px;`;
} else if (seckill_subscript_location == 'bottom-left') {
- location += `bottom: 0;left: 0;border-radius: 0 ${ shop_img_radius.radius_bottom_left }px 0 ${ shop_img_radius.radius_bottom_left }px;`;
+ location += `bottom: 0;left: 0;border-radius: 0 ${shop_img_radius.radius_bottom_left}px 0 ${shop_img_radius.radius_bottom_left}px;`;
} else if (seckill_subscript_location == 'bottom-right') {
- location += `bottom: 0;right: 0;border-radius: ${ shop_img_radius.radius_bottom_right }px 0 ${ shop_img_radius.radius_bottom_right }px 0;`;
+ location += `bottom: 0;right: 0;border-radius: ${shop_img_radius.radius_bottom_right}px 0 ${shop_img_radius.radius_bottom_right}px 0;`;
}
return location;
});