This commit is contained in:
13713575202 2025-06-12 13:11:06 +08:00
commit 7c79202d8a
5 changed files with 27 additions and 5 deletions

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="c-goods-item-warp" @click="toDetail(data.id, data.parentId)"> <div class="c-goods-item-warp" @click="toDetail(data.id, data.parentId)">
<div class="goods-img"> <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" />--> <!-- <el-image :src="encodeURIComponent(data.goodUrl) ? encodeURIComponent(data.goodUrl) : ''" fit="cover" @error="handleImageError" />-->
</div> </div>
<div class="goods-name txt-ellipsis clamp2">{{ data.goodName }}</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 centerDialogVisible = ref(false);
const currentWeight = ref(0); const currentWeight = ref(0);
const handleImageError = (e) => { const handleImageError = (e) => {
@ -86,6 +97,8 @@ const buyCount = ref(1);
const methodsStore = useMethodsStore(); const methodsStore = useMethodsStore();
onMounted(() => {});
const buyGood = () => { const buyGood = () => {
ElMessageBox.confirm('是否确认直接购买该商品?', '请确认', { ElMessageBox.confirm('是否确认直接购买该商品?', '请确认', {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,

View File

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

View File

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