2025-6-11-4

This commit is contained in:
姚俊旭 2025-06-11 17:37:35 +08:00
parent d0e8ac75fe
commit 7119494d12
5 changed files with 27 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="brand-system">
<h2>品牌制度</h2>
<h2>品牌使用管理</h2>
<!-- 制度列表 -->
<div class="system-list">

View File

@ -44,7 +44,7 @@
:class="[index === currentWeight ? 'act' : 'normal']"
@click="currentWeight = index"
>
{{ item.goodSpecs }}{{ item.unit }}
{{ item.goodSpecs }}
</div>
</div>
<div class="goods-num">

View File

@ -1,7 +1,7 @@
<template>
<div class="c-goods-item-warp" @click="toDetail(data.id, data.parentId)">
<div class="goods-img">
<img :src="data.goodUrl ? data.goodUrl : ''" alt="" style="width: 100%" />
<img :src="processedGoodUrl" alt="" style="width: 100%" />
<!-- <el-image :src="encodeURIComponent(data.goodUrl) ? encodeURIComponent(data.goodUrl) : ''" fit="cover" @error="handleImageError" />-->
</div>
<div class="goods-name txt-ellipsis clamp2">{{ data.goodName }}</div>
@ -74,6 +74,17 @@ const props = defineProps({
},
});
const processedGoodUrl = computed(() => {
if (!props.data?.goodUrl) return '';
// URL
if (props.data.goodUrl.includes(',')) {
return props.data.goodUrl.split(',')[0].trim();
}
return props.data.goodUrl;
});
const centerDialogVisible = ref(false);
const currentWeight = ref(0);
const handleImageError = (e) => {
@ -86,6 +97,8 @@ const buyCount = ref(1);
const methodsStore = useMethodsStore();
onMounted(() => {});
const buyGood = () => {
ElMessageBox.confirm('是否确认直接购买该商品?', '请确认', {
distinguishCancelAndClose: true,

View File

@ -44,7 +44,7 @@
:class="[index === currentWeight ? 'act' : 'normal']"
@click="currentWeight = index"
>
{{ item.goodSpecs }}{{ item.unit }}
{{ item.goodSpecs }}
</div>
</div>
<div class="goods-num">

View File

@ -5,7 +5,7 @@
<div>
<el-card shadow="hover" style="border-radius: 16px">
<h1>{{ detailInfo.title }}</h1>
<div style="margin: 30px 0; font-weight: bold; font-size: 18px">
<div class="subTitle" style="margin: 30px 0; font-weight: bold; font-size: 18px">
<span>日期 {{ detailInfo.date }}</span>
<span>作者{{ detailInfo.author }}</span>
<span>来源 {{ detailInfo.source }}</span>
@ -61,7 +61,16 @@ const changeSize = (size) => {
</script>
<style lang="scss" scoped>
.subTitle {
span {
margin: 0 10px;
}
}
.content {
font-family:
PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-indent: 2em;
text-align: left;
color: #5a5a5a;