代码上传

This commit is contained in:
yangchunyu 2024-06-27 13:10:01 +08:00
parent 1a3bc7527e
commit 6bc462483b

View File

@ -41,16 +41,13 @@
</view> </view>
</view> </view>
<view class="driving-print"> <view class="driving-print">
<image :src="imageShow()" style="width: 400rpx; height: 48%;"></image> <image :src="imageShow()" style="width: 400rpx; height: 48%"></image>
<view class="text"> <view class="text"> 累计积分 </view>
累计积分
</view>
<view class="grade"> <view class="grade">
<text style="color: #84b520; font-size: 100rpx;">{{grade}}</text> <text style="color: #84b520; font-size: 100rpx">{{ grade }}</text
</view> >
<view class="describe">
正常
</view> </view>
<view class="describe"> 正常 </view>
</view> </view>
</view> </view>
<view class="drivingList"> <view class="drivingList">
@ -89,18 +86,16 @@
</template> </template>
<script setup> <script setup>
import { import { ref, onMounted } from "vue";
ref, import * as echarts from "echarts";
onMounted const gotoBack = () => {
} from "vue";
import * as echarts from "echarts";
const gotoBack = () => {
uni.navigateBack({ uni.navigateBack({
delta: 1, delta: 1,
}); });
}; };
const grade = ref(1) const grade = ref(1);
const drivingData = [{ const drivingData = [
{
title: "驾驶证号", title: "驾驶证号",
content: "2302**********1229", content: "2302**********1229",
}, },
@ -128,34 +123,34 @@
title: "数据更新时间", title: "数据更新时间",
content: "2023-08-30", content: "2023-08-30",
}, },
]; ];
const imageMap = { const imageMap = {
0: '../../../static/xp.png', 0: "../../../static/xp.png",
1: '../../../static/xl.png', 1: "../../../static/xl.png",
2: '../../../static/x5.png', 2: "../../../static/x5.png",
3: '../../../static/Rl.png', 3: "../../../static/Rl.png",
4: '../../../static/Rh1.png', 4: "../../../static/Rh1.png",
5: '../../../static/Rh.png', 5: "../../../static/Rh.png",
6: '../../../static/Rh.png', 6: "../../../static/Rh.png",
7: '../../../static/wN.png', 7: "../../../static/wN.png",
8: '../../../static/wj1.png', 8: "../../../static/wj1.png",
9: '../../../static/wF.png', 9: "../../../static/wF.png",
10: '../../../static/F-1.png', 10: "../../../static/F-1.png",
11: '../../../static/1e.png', 11: "../../../static/1e.png",
12 : '../../../static/l-1.png', 12: "../../../static/l-1.png",
}; };
const imageShow = () => { const imageShow = () => {
const url = imageMap[grade.value] || ''; // 使 || const url = imageMap[grade.value] || ""; // 使 ||
return url; return url;
}; };
// ECharts // ECharts
onMounted(() => {}); onMounted(() => {});
</script> </script>
<style lang="scss"> <style lang="scss">
.van-nav-bar__content { .van-nav-bar__content {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -175,9 +170,9 @@
.page-navbar { .page-navbar {
font-size: 1.1rem; font-size: 1.1rem;
} }
} }
.content { .content {
width: 689rpx; width: 689rpx;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: #f4f3f8; background-color: #f4f3f8;
@ -271,19 +266,19 @@
justify-content: space-between; justify-content: space-between;
} }
} }
} }
.image { .image {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
} }
.warning { .warning {
display: inline-block; display: inline-block;
margin-top: 20rpx; margin-top: 20rpx;
font-size: 25rpx; font-size: 25rpx;
color: #929196; color: #929196;
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
</style> </style>