样式调整,bug修复

This commit is contained in:
dzl
2025-10-23 17:26:14 +08:00
parent db228d91ed
commit 545c90f13b
17 changed files with 72 additions and 62 deletions

BIN
public/imgs/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -540,6 +540,7 @@ export default {
object-fit: contain; object-fit: contain;
border-radius: 8px; border-radius: 8px;
z-index: 1; z-index: 1;
margin-left: -5px;
} }
.action-image3 { .action-image3 {

View File

@@ -12,7 +12,7 @@
<h1 class="nav-title">积分记录</h1> <h1 class="nav-title">积分记录</h1>
</div> </div>
<div class="nav-right"> <div class="nav-right">
<el-button type="text" @click="$router.push('/myshop')" class="shop-btn"> <el-button type="text" @click="$router.push('/shop')" class="shop-btn">
<el-icon><ShoppingBag /></el-icon> <el-icon><ShoppingBag /></el-icon>
商城 商城
</el-button> </el-button>
@@ -30,7 +30,7 @@
<div class="points-value">{{ userPoints }}</div> <div class="points-value">{{ userPoints }}</div>
<!-- <div class="points-label">当前积分</div> --> <!-- <div class="points-label">当前积分</div> -->
</div> </div>
<img src="/imgs/point.png" alt="我的积分图标" class="balance-image"> <!-- <img src="/imgs/point.png" alt="我的积分图标" class="balance-image"> -->
</div> </div>
<div class="points-stats"> <div class="points-stats">
<div class="stat-item"> <div class="stat-item">
@@ -119,8 +119,8 @@
<!-- 积分规则说明 --> <!-- 积分规则说明 -->
<div class="points-rules"> <div class="points-rules">
<el-collapse v-model="activeRules"> <el-collapse v-model="activeRules">
<el-collapse-item title="积分获取规则" name="earn"> <!-- <el-collapse-item title="积分获取规则" name="earn">
<!-- <div class="rules-content"> <div class="rules-content">
<div class="rule-item"> <div class="rule-item">
<el-icon><UserFilled /></el-icon> <el-icon><UserFilled /></el-icon>
<span>注册账户+100积分</span> <span>注册账户+100积分</span>
@@ -141,8 +141,8 @@
<el-icon><Trophy /></el-icon> <el-icon><Trophy /></el-icon>
<span>完成任务+50积分</span> <span>完成任务+50积分</span>
</div> </div>
</div> --> </div>
</el-collapse-item> </el-collapse-item> -->
<el-collapse-item title="积分使用规则" name="spend"> <el-collapse-item title="积分使用规则" name="spend">
<div class="rules-content"> <div class="rules-content">
<div class="rule-item"> <div class="rule-item">
@@ -209,8 +209,8 @@ const filterTabs = ref([
{ label: '全部', value: 'all' }, { label: '全部', value: 'all' },
{ label: '获得', value: 'earn' }, { label: '获得', value: 'earn' },
{ label: '消费', value: 'spend' }, { label: '消费', value: 'spend' },
{ label: '任务', value: 'task' }, // { label: '任务', value: 'task' },
{ label: '兑换', value: 'exchange' } // { label: '兑换', value: 'exchange' }
]) ])
// 计算属性 // 计算属性
@@ -486,16 +486,16 @@ onMounted(() => {
width: 100%; width: 100%;
} }
.overview-card { /* .overview-card {
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 24px;
color: white; color: white;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} } */
.transparent-card { .transparent-card {
background: rgba(255, 255, 255, 0.2); /* background: rgba(255, 255, 255, 0.2); */
box-shadow: none; box-shadow: none;
} }
@@ -511,7 +511,6 @@ onMounted(() => {
border-radius: 50%; border-radius: 50%;
width: 48px; width: 48px;
height: 48px; height: 48px;
background: rgba(255, 255, 255, 0.3);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -997,8 +996,10 @@ onMounted(() => {
position: relative; position: relative;
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 24px;
color: white;
width: 100%; width: 100%;
overflow: hidden; background-image: url('/imgs/background.png');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
} }
</style> </style>

View File

@@ -295,10 +295,10 @@ export default {
{text: '隐私政策', path: '', click: showPrivacyText}, {text: '隐私政策', path: '', click: showPrivacyText},
]); ]);
const functionItems = ref([ const functionItems = ref([
{image: "/imgs/mainpage/jiaoyijilu.png", text: "购物车", path: "/cart"}, {image: "/imgs/profile/icon/gouwuche.png", text: "购物车", path: "/cart"},
{image: "/imgs/mainpage/dingdanchaxun.png", text: "地址", path: "/address"}, {image: "/imgs/profile/icon/dizhi.png", text: "地址", path: "/address"},
{image: "/imgs/mainpage/kefuzhongxin.png", text: "收藏", path: ""}, // {image: "/imgs/mainpage/kefuzhongxin.png", text: "收藏", path: ""},
{image: "/imgs/mainpage/xitonggonggao.png", text: "卡包管理", path: "/couponmanage"}, {image: "/imgs/profile/icon/kabaoguanli.png", text: "卡包管理", path: "/couponmanage"},
]); ]);
// 加载账户信息 // 加载账户信息
@@ -828,7 +828,7 @@ export default {
.function-grid { .function-grid {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 15px; gap: 15px;
} }

View File

@@ -14,9 +14,9 @@
</div> </div>
<!-- 公告区域 --> <!-- 公告区域 -->
<div class="announcement-section"> <!-- <div class="announcement-section">
这里是公告内容 这里是公告内容
</div> </div> -->
<!-- 空白间隔 --> <!-- 空白间隔 -->
<div class="empty-spacer"> <div class="empty-spacer">

View File

@@ -40,7 +40,7 @@ const router = useRouter()
// 方法 // 方法
const goHome = () => { const goHome = () => {
router.push('/transfers') router.push('/mainpage')
} }
const goBack = () => { const goBack = () => {

View File

@@ -730,6 +730,7 @@ const fetchPaymentData = async () => {
throw new Error(response.data.message || '获取订单信息失败') throw new Error(response.data.message || '获取订单信息失败')
} }
} catch (error) { } catch (error) {
router.push('/shop')
ElMessage.error(error.message || '获取订单信息失败') ElMessage.error(error.message || '获取订单信息失败')
} finally { } finally {
loading.value = false loading.value = false
@@ -809,7 +810,7 @@ const confirmPayment = async () => {
amount: Math.round(discountedRMB * 100), amount: Math.round(discountedRMB * 100),
couponRecordId: selectedCoupon.value || undefined, couponRecordId: selectedCoupon.value || undefined,
coupon_id: selectedCoupon.value || undefined, coupon_id: selectedCoupon.value || undefined,
returnUrl: `http://192.168.0.26:5173/frontend/pay/${paymentData.value.orderId}` returnUrl: `http://192.168.0.11:5173/frontend/pay/${paymentData.value.orderId}`
}) })
if (response?.data?.success) { if (response?.data?.success) {

View File

@@ -249,7 +249,7 @@ onMounted(() => {
gap: 30px; gap: 30px;
margin-top: 5px; margin-top: 5px;
justify-content: center; justify-content: center;
background: #ffffff; background: #F5F8FF;
width: 100%; width: 100%;
top: 132px; top: 132px;
padding-top: 10px; padding-top: 10px;

View File

@@ -28,7 +28,7 @@
</div> </div>
<div :class="{'product-list1': !isGridStyle, 'product-list2': isGridStyle}"> <div :class="{'product-list1': !isGridStyle, 'product-list2': isGridStyle}">
<div v-for="product in filteredProducts" :key="product.id" :class="{'product-item1': !isGridStyle, 'product-item2': isGridStyle}" @click="$router.push(`/productsummary/${product.id}`)"> <div v-for="product in products" :key="product.id" :class="{'product-item1': !isGridStyle, 'product-item2': isGridStyle}" @click="$router.push(`/productsummary/${product.id}`)">
<img :src="product.image" :alt="product.name" :class="{'product-image1': !isGridStyle, 'product-image2': isGridStyle}"> <img :src="product.image" :alt="product.name" :class="{'product-image1': !isGridStyle, 'product-image2': isGridStyle}">
<div class="product-info"> <div class="product-info">
<div :class="{'product-content-name1': !isGridStyle, 'product-content-name2': isGridStyle}"> <div :class="{'product-content-name1': !isGridStyle, 'product-content-name2': isGridStyle}">
@@ -67,7 +67,7 @@ const searchKeyword = ref('')
const sortBy = ref('') const sortBy = ref('')
const products = ref([]) const products = ref([])
const filteredProducts = ref([]) // const filteredProducts = ref([])
const loading = ref(false) const loading = ref(false)
const loadingMore = ref(false) const loadingMore = ref(false)
const page = ref(1) const page = ref(1)
@@ -98,34 +98,36 @@ const switchFilter = (index) => {
}) })
const selectedFilter = filters.value[index] const selectedFilter = filters.value[index]
sortProducts(selectedFilter.sort) console.log(selectedFilter.sort)
getProducts(false, selectedFilter.sort)
// sortProducts(selectedFilter.sort)
} }
const sortProducts = (sortType) => { // const sortProducts = (sortType) => {
switch (sortType) { // switch (sortType) {
case 'null': // case 'null':
filteredProducts.value = products.value // // filteredProducts.value = products.value
break // break
case 'price_desc': // case 'price_desc':
filteredProducts.value = products.value.sort((a, b) => b.points_price - a.points_price) // // filteredProducts.value = products.value.sort((a, b) => b.points_price - a.points_price)
break // break
case 'price_asc': // case 'price_asc':
filteredProducts.value = products.value.sort((a, b) => a.points_price - b.points_price) // // filteredProducts.value = products.value.sort((a, b) => a.points_price - b.points_price)
break // break
case 'sales_desc': // case 'sales_desc':
filteredProducts.value = products.value.sort((a, b) => b.sales - a.sales) // // filteredProducts.value = products.value.sort((a, b) => b.sales - a.sales)
break // break
default: // default:
filteredProducts.value = products.value // // filteredProducts.value = products.value
break // break
} // }
} // }
const changeStyle = () => { const changeStyle = () => {
isGridStyle.value = !isGridStyle.value isGridStyle.value = !isGridStyle.value
} }
const getProducts = async (isLoadMore = false) => { const getProducts = async (isLoadMore = false, sort) => {
try { try {
if (!isLoadMore) { if (!isLoadMore) {
loading.value = true loading.value = true
@@ -140,7 +142,7 @@ const getProducts = async (isLoadMore = false) => {
limit: 20, limit: 20,
category: selectedCategory.value === 'all' ? '' : selectedCategory.value, category: selectedCategory.value === 'all' ? '' : selectedCategory.value,
search: searchKeyword.value, search: searchKeyword.value,
sort: sortBy.value sort: sort
} }
}) })
@@ -165,7 +167,7 @@ const getProducts = async (isLoadMore = false) => {
hasMore.value = data.data.hasMore hasMore.value = data.data.hasMore
page.value++ page.value++
filteredProducts.value = products.value // filteredProducts.value = products.value
} catch (error) { } catch (error) {
ElMessage.error('获取商品列表失败') ElMessage.error('获取商品列表失败')
console.error('获取商品列表失败:', error) console.error('获取商品列表失败:', error)

View File

@@ -2,7 +2,7 @@
<!-- 头部 --> <!-- 头部 -->
<div class="header"> <div class="header">
<span @click="$router.go(-1)"><返回</span> <span @click="$router.go(-1)"><返回</span>
<el-icon @click="$router.push(`/product/${firstProduct.id}`)" style="color: #ffffff;"><ShoppingCart /></el-icon> <el-icon @click="$router.push(`/cart`)" style="color: #ffffff;"><ShoppingCart /></el-icon>
</div> </div>
<div class="products-container"> <div class="products-container">

View File

@@ -63,15 +63,15 @@ const selectedCategory = ref('all')
const shopBarItems = [ const shopBarItems = [
{name: '商品分类',img: '/imgs/shop/1.png',path: '/productCategory'}, {name: '商品分类',img: '/imgs/shop/1.png',path: '/productCategory'},
{name: '观看直播',img: '/imgs/shop/2.png',path: ''}, // {name: '观看直播',img: '/imgs/shop/2.png',path: ''},
{name: '卡包管理',img: '/imgs/shop/3.png',path: '/couponmanage'}, {name: '卡包管理',img: '/imgs/shop/3.png',path: '/couponmanage'},
{name: '百亿补贴',img: '/imgs/shop/4.png',path: ''}, // {name: '百亿补贴',img: '/imgs/shop/4.png',path: ''},
{name: '现时秒杀',img: '/imgs/shop/5.png',path: ''}, // {name: '现时秒杀',img: '/imgs/shop/5.png',path: ''},
{name: '会员专区',img: '/imgs/shop/6.png',path: ''}, // {name: '会员专区',img: '/imgs/shop/6.png',path: ''},
{name: '商品收藏',img: '/imgs/shop/7.png',path: ''}, // {name: '商品收藏',img: '/imgs/shop/7.png',path: ''},
{name: '充值缴费',img: '/imgs/shop/8.png',path: ''}, // {name: '充值缴费',img: '/imgs/shop/8.png',path: ''},
{name: '资质认证',img: '/imgs/shop/9.png',path: ''}, // {name: '资质认证',img: '/imgs/shop/9.png',path: ''},
{name: '联系客服',img: '/imgs/shop/10.png',path: ''}, {name: '联系客服',img: '/imgs/shop/10.png',path: '/customerservice'},
] ]
const getProducts = async (isLoadMore = false) => { const getProducts = async (isLoadMore = false) => {
@@ -176,10 +176,15 @@ onMounted(() => {
.shop-bar { .shop-bar {
display: grid; display: grid;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(3, 1fr);
column-gap: 21px; column-gap: 21px;
row-gap: 12px; row-gap: 12px;
margin-top: 20px; margin-top: 20px;
background: #FFFFFF80;
border-radius: 10px;
width: 92%;
align-self: center;
padding: 12px 10px;
} }
.shop-bar-item { .shop-bar-item {
@@ -205,7 +210,7 @@ onMounted(() => {
margin-top: 15px; margin-top: 15px;
border-radius: 5px; border-radius: 5px;
height: 30px; height: 30px;
width: auto; width: 92%;
} }
.tips-imgs { .tips-imgs {

View File

@@ -15,7 +15,7 @@ export default defineConfig({
port: 5173, port: 5173,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://192.168.0.26:3000', target: 'http://192.168.0.11:3000',
changeOrigin: true, changeOrigin: true,
}, },
'/mid': { '/mid': {
@@ -24,7 +24,7 @@ export default defineConfig({
// rewrite: (path) => path.replace(/^\/mid/, '') // rewrite: (path) => path.replace(/^\/mid/, '')
}, },
'/uploads': { '/uploads': {
target: 'http://192.168.0.26:3000', target: 'http://192.168.0.11:3000',
changeOrigin: true changeOrigin: true
} }
} }