refactor(goods): clean up components, update imports and add album page

- replace scoped SCSS styles with inline utility classes for goods components
- move LocationCard to goods subdirectory and update relative imports
- fix DebounceUtils import path in FooterSection
- update goods index page: replace scroll wrapper, switch to vue-router composable, replace uni modal with vant showDialog
- add new album page component
- remove unused PNG assets, old README and deprecated style files
- update global type declarations for vant showDialog
This commit is contained in:
duanshuwen
2026-05-27 22:17:57 +08:00
parent cd39a9a65c
commit 479c5175ec
17 changed files with 133 additions and 594 deletions

View File

@@ -1,80 +0,0 @@
<template>
<div class="store-address">
<div class="text-container" @click.stop="openMap">
<span class="location-label">位于 {{ orderData.oneLevelAddress }}</span>
<span class="address-text">{{ orderData.commodityAddress }}</span>
</div>
<div class="actions">
<div>
<div class="actions-btn" @click.stop="openMap">
<uni-icons type="paperplane-filled" size="16" color="#171717" />
</div>
<span class="actions-text">导航</span>
</div>
<div>
<div class="actions-btn" @click.stop="callPhone">
<uni-icons type="phone-filled" size="16" color="#171717" />
</div>
<span class="actions-text">电话</span>
</div>
</div>
</div>
</template>
<script setup>
import { defineProps } from "vue";
const props = defineProps({
orderData: {
type: Object,
required: true,
default: () => ({}),
},
});
// 打开地图
const openMap = () => {
const address = props.orderData.commodityAddress;
const latitude = Number(props.orderData.commodityLatitude);
const longitude = Number(props.orderData.commodityLongitude);
uni.getLocation({
type: "gcj02",
success: () => {
uni.openLocation({
latitude: latitude,
longitude: longitude,
address: address,
});
},
fail: () => {
uni.openLocation({
latitude: latitude,
longitude: longitude,
address: address,
});
},
});
};
// 拨打电话
const getPhoneNumber = () => {
const o = props.orderData || {};
return o.commodityPhone || o.phone || o.contactPhone || "15608199221";
};
const callPhone = () => {
const phone = getPhoneNumber();
if (!phone) {
uni.showToast({ title: "未提供电话号码", icon: "none" });
return;
}
uni.makePhoneCall({ phoneNumber: String(phone) });
};
</script>
<style scoped lang="scss">
@import "./styles/index.scss";
</style>

View File

@@ -1,56 +0,0 @@
.store-address {
display: flex;
align-items: center;
margin-top: 12px;
padding: 12px;
background-color: #ffffff;
border-top: 1px solid #e0e0e0;
// 左侧文本容器
.text-container {
display: flex;
flex-direction: column;
flex: 1;
}
.location-label {
color: $text-color-800;
font-size: 14px;
font-weight: 500;
}
.address-text {
margin-top: 4px;
color: $text-color-600;
font-size: 12px;
font-weight: 400;
}
// 右侧操作按钮组
.actions {
display: flex;
align-items: center;
gap: 10px;
margin-left: 16px;
}
.actions-btn {
width: 28px;
height: 28px;
border-radius: 10px;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
}
.actions-icon {
font-size: 16px;
line-height: 16px;
}
.actions-text {
font-size: 12px;
color: $text-color-600;
}
}