diff --git a/src/views/MyProfile.vue b/src/views/MyProfile.vue index c84cb05..e0013f8 100644 --- a/src/views/MyProfile.vue +++ b/src/views/MyProfile.vue @@ -63,7 +63,10 @@
我的余额 - ¥{{ accountInfo.balance }} +
+ 融豆 +
{{ Math.abs(accountInfo.balance) }}
+
@@ -614,4 +617,25 @@ export default { height: 178px; object-fit: cover; } + +.balance-content { + display: flex; + align-items: center; + gap: 8px; /* 控制图标和数值之间的间距 */ +} + +.bean-image { + width: 40px; + height: 40px; + flex-shrink: 0; /* 防止图片被压缩 */ +} + +.balance-value { + font-size: 28px; + font-weight: 600; + color: white; + letter-spacing: 0.5px; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + white-space: nowrap; /* 防止文本换行 */ +} \ No newline at end of file diff --git a/src/views/Shop.vue b/src/views/Shop.vue index 9554365..d81b0a5 100644 --- a/src/views/Shop.vue +++ b/src/views/Shop.vue @@ -276,13 +276,13 @@ const categories = ref([ //热销商品数据 const hotProducts = ref([ { id: '6', name: '1', discount: '100', points: '9999', originalPoints:'999999' }, - { id: '10', name: '2', discount: '100', points: '9999', originalPoints:'999999' } + { id: '6', name: '2', discount: '100', points: '9999', originalPoints:'999999' } ]) //秒杀推荐数据 const cheapProducts = ref([ - { id: '8', name: '1', discount: '100', points: '9999', originalPoints:'999999' }, - { id: '9', name: '2', discount: '100', points: '9999', originalPoints:'999999' } + { id: '6', name: '1', discount: '100', points: '9999', originalPoints:'999999' }, + { id: '6', name: '2', discount: '100', points: '9999', originalPoints:'999999' } ]) // 计算属性 @@ -482,20 +482,24 @@ const truncateText = (text, maxLength) => { //获取热销推荐商品 const getHotProducts = async () => { try { - const {data} =await api.get('') - hotProducts.value=data.data.products + const {data} = await api.get('') + hotProducts.value = data.data.products } catch (error) { console.log(error) + } finally { + console.log('热销:',hotProducts) } } //获取秒杀推荐商品 const getCheapProducts = async () => { try { - const {data} =await api.get('') - cheapProducts.value=data.data.products + const {data} = await api.get('') + cheapProducts.value = data.data.products } catch (error) { console.log(error) + } finally { + console.log('秒杀:',cheapProducts) } }