代码上传

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