Commit 8914dfb1 authored by 王炽's avatar 王炽

积分页面处理

parent 1e4ac7fc
...@@ -80,11 +80,23 @@ ...@@ -80,11 +80,23 @@
<!-- 进度条 --> <!-- 进度条 -->
<view class="progress-bar-container"> <view class="progress-bar-container">
<view class="progress-bar-bg"></view> <!-- 进度条背景图片 -->
<view <image
class="progress-bar-fill" :src="`/static/integral/${tupianBanben}/barBgVip${index}.png`"
:style="{ width: '60%' }" class="progress-bar-bg"
></view> mode="aspectFit"
@error="onProgressBarError"
/>
<!-- 进度条填充图片 -->
<view class="progress-bar-mask">
<image
:src="`/static/integral/${tupianBanben}/barVip${index}.png`"
class="progress-bar-fill"
mode="aspectFit"
:style="{ transform: `translateX(${(6000/10000)*100 -100}%)` }"
@error="onProgressBarError"
/>
</view>
</view> </view>
</view> </view>
<!-- <view class="vip-info"> <!-- <view class="vip-info">
...@@ -438,6 +450,11 @@ ...@@ -438,6 +450,11 @@
import RegisterLayer from "../components/RegisterLayer.vue"; import RegisterLayer from "../components/RegisterLayer.vue";
import md from '../md'; import md from '../md';
// 进度条图片加载错误处理
const onProgressBarError = (e) => {
console.error('进度条图片加载失败:', e)
// 可以设置默认样式或显示错误提示
}
const integralData = ref({ const integralData = ref({
"tupianBanben": "1013", "tupianBanben": "1013",
...@@ -1962,7 +1979,7 @@ ...@@ -1962,7 +1979,7 @@
// 积分进度条样式 // 积分进度条样式
.jifen-progressbar { .jifen-progressbar {
position: absolute; position: absolute;
top: 209rpx; top: 207rpx;
width: 320rpx; width: 320rpx;
left: 40rpx; left: 40rpx;
...@@ -2002,9 +2019,7 @@ ...@@ -2002,9 +2019,7 @@
.progress-bar-container { .progress-bar-container {
position: relative; position: relative;
width: 100%; width: 100%;
height: 12rpx; height: 7rpx;
background: #f5f3f0;
border-radius: 6rpx;
overflow: hidden; overflow: hidden;
margin-top: 10rpx; margin-top: 10rpx;
...@@ -2014,19 +2029,26 @@ ...@@ -2014,19 +2029,26 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f5f3f0; z-index: 1;
border-radius: 6rpx; }
.progress-bar-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 2;
} }
.progress-bar-fill { .progress-bar-fill {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%;
height: 100%; height: 100%;
background: #8b4513; transition: transform 0.3s ease;
border-radius: 6rpx;
transition: width 0.3s ease;
box-shadow: 0 1rpx 3rpx rgba(139, 69, 19, 0.3);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment