CarRental/pages/my.vue

292 lines
5.9 KiB
Vue
Raw Normal View History

2024-05-08 23:18:30 +08:00
<template>
<view class="page">
2025-01-06 11:51:31 +08:00
<view class="header">
<view class="header-left">
<image
src="https://lxnapi.ccttiot.com/bike/img/static/u3giTY4VkWYpnGWRuFHF"
class="avatar"
/>
<view class="userinfo">
<view class="username">
{{ formatName(userInfo.realName) }}
</view>
<view class="userphone">
{{ userInfo.phonenumber }}
</view>
</view>
2024-09-19 17:33:39 +08:00
</view>
2025-01-06 11:51:31 +08:00
<view class="header-right" @click="topage(0)">
<image
src="https://lxnapi.ccttiot.com/bike/img/static/uyb0iFo50FJ0MZg3RKkV"
class="code"
/>
2024-09-19 17:33:39 +08:00
</view>
</view>
2025-01-06 11:51:31 +08:00
<!-- <view class="tit">
我的设备
</view>
<view class="device_card">
<view class="car_item">
<view class="car_item_left">
<view class="car_name">
朵VFLU-1376
</view>
<view class="car_status">
车主
</view>
2024-09-30 18:02:38 +08:00
</view>
2025-01-06 11:51:31 +08:00
<view class="car_item_right">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uB1F5aibooguILH8uB4F" class="car_img"/>
</view>
<view class="dian">
2024-10-17 18:08:10 +08:00
</view>
2024-09-30 18:02:38 +08:00
</view>
2025-01-06 11:51:31 +08:00
</view> -->
<view class="tit">
管理与服务
</view>
<view class="content">
<view class="item" @click="topage(1)">
<image
src="https://lxnapi.ccttiot.com/bike/img/static/uVEbrRDbZXvELwK73KAi"
/>
我的订单
2024-09-30 18:02:38 +08:00
</view>
2025-01-06 11:51:31 +08:00
<view class="item" @click="topage(4)">
<image
src="https://lxnapi.ccttiot.com/bike/img/static/uO1ju1OpuA5jjMR7bLYh"
/>
帮助和客服
2024-09-30 18:02:38 +08:00
</view>
2025-01-06 11:51:31 +08:00
<view class="item" @click="topage(5)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uHNMNwTRw89NhtgZUNXK"/>
意见和反馈
2024-09-30 18:02:38 +08:00
</view>
2025-01-06 11:51:31 +08:00
<view class="item" v-if="userInfo.isAuthentication==false" @click="topage(3)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/unrltNyYYRXUutaqtuJY"/>
实名认证
2024-09-30 18:02:38 +08:00
</view>
2025-01-06 11:51:31 +08:00
<!-- <view class="item">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u1SsqJYSQ8jTK9PkhFtF"/>
设置
</view> -->
<view class="item" @click="topage(2)" v-if="userInfo.userType=='02'">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u1SsqJYSQ8jTK9PkhFtF"/>
商户端
2024-09-30 18:02:38 +08:00
</view>
</view>
2025-01-06 11:51:31 +08:00
<view class="" style="margin-left: -32rpx;">
<tab-bar :indexs='1'></tab-bar>
</view>
</view>
2024-05-08 23:18:30 +08:00
</view>
</template>
<script>
2025-01-06 11:51:31 +08:00
export default {
data() {
return {
background: {
backgroundColor: " ",
2024-06-24 17:59:49 +08:00
},
2025-01-06 11:51:31 +08:00
userInfo:{}
}
},
onShow() {
this.getUserInfo()
},
methods: {
formatName(name) {
if (!name) return '';
// 只返回第一个字符,后面用*代替
return name.charAt(0) + '*'.repeat(name.length - 1);
2024-06-24 17:59:49 +08:00
},
2025-01-06 11:51:31 +08:00
getUserInfo() {
this.$u.get('/getInfo').then((res) => {
if (res.code == 200) {
this.userInfo = res.user
2024-10-14 18:02:05 +08:00
}
2025-01-06 11:51:31 +08:00
})
},
topage(num){
if(num==0){
2024-10-31 17:47:13 +08:00
uni.navigateTo({
2025-01-06 11:51:31 +08:00
url: '/page_user/QrBind'
2024-09-30 18:02:38 +08:00
});
2025-01-06 11:51:31 +08:00
}else if(num==1){
uni.navigateTo({
url:'/page_user/OrderList'
})
}else if(num==2){
uni.navigateTo({
url:'/pages_store/storeIndex'
})
}else if(num==3){
uni.navigateTo({
url:'/pages_user/idTest'
})
}else if(num==4){
uni.navigateTo({
url: '/page_user/HelpCenter'
})
}else if(num==5){
uni.navigateTo({
url: '/page_user/feedback'
})
}
2024-05-08 23:18:30 +08:00
}
}
2025-01-06 11:51:31 +08:00
}
2024-05-08 23:18:30 +08:00
</script>
<style lang="scss">
2025-01-06 11:51:31 +08:00
page {
overflow-y: auto;
background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uYRs7Cv2Pbp95w3KjGO3');
background-size: cover;
/* 背景图片等比缩放以覆盖整个容器 */
background-position: center;
/* 背景图片居中显示 */
background-repeat: no-repeat;
/* 防止背景图片重复 */
min-height: 100vh;
/* 确保页面至少有 100% 的视窗高度,避免高度不足导致无法滚动 */
}
.page {
padding-top: 200rpx;
padding-left: 32rpx;
padding-right: 32rpx;
.device_card{
margin-top: 24rpx;
width: 688rpx;
padding: 22rpx;
background: #FFFFFF;
border-radius: 30rpx 30rpx 30rpx 30rpx;
.car_item{
2024-09-30 18:02:38 +08:00
position: relative;
2025-01-06 11:51:31 +08:00
display: flex;
flex-direction: row;
background: #EEF2FD;
border-radius: 28rpx 28rpx 28rpx 28rpx;
padding: 50rpx 38rpx 28rpx 38rpx;
.dian{
2024-09-30 18:02:38 +08:00
position: absolute;
2025-01-06 11:51:31 +08:00
left: 308rpx;
bottom: 8rpx;
width: 28rpx;
height: 8rpx;
background: #A2AFD4;
border-radius: 7rpx 7rpx 7rpx 7rpx;
2024-09-30 18:02:38 +08:00
}
2025-01-06 11:51:31 +08:00
.car_item_left{
2024-09-30 18:02:38 +08:00
display: flex;
2025-01-06 11:51:31 +08:00
flex-direction: column;
2024-09-30 18:02:38 +08:00
align-items: center;
2025-01-06 11:51:31 +08:00
margin-right: 50rpx;
.car_name{
font-weight: 700;
font-size: 40rpx;
color: #3D3D3D;
2024-09-30 18:02:38 +08:00
}
2025-01-06 11:51:31 +08:00
.car_status{
margin-right: auto;
margin-top: 26rpx;
display: inline-block;
padding: 6rpx 30rpx;
2024-09-30 18:02:38 +08:00
font-weight: 600;
2025-01-06 11:51:31 +08:00
font-size: 28rpx;
color: #4297F3;
background: #D2E8FF;
border-radius: 29rpx 29rpx 29rpx 29rpx;
2024-09-30 18:02:38 +08:00
}
}
2025-01-06 11:51:31 +08:00
.car_item_right{
.car_img{
width: 232rpx;
height: 180rpx;
2024-09-05 18:00:43 +08:00
}
}
2024-09-03 18:02:16 +08:00
}
2025-01-06 11:51:31 +08:00
}
.content{
margin-top: 24rpx;
width: 688rpx;
padding: 0 42rpx;
// height: 456rpx;
background: #FFFFFF;
border-radius: 30rpx 30rpx 30rpx 30rpx;
.item:last-child{
border-bottom: 0rpx solid #D8D8D8;
}
.item{
width:100%;
padding: 34rpx 0;
2024-09-19 17:33:39 +08:00
display: flex;
2025-01-06 11:51:31 +08:00
border-bottom: 1rpx solid #D8D8D8;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
image{
margin-top: 4rpx;
margin-right: 34rpx;
width: 38rpx;
height: 38rpx;
2024-09-02 18:02:31 +08:00
}
2025-01-06 11:51:31 +08:00
2024-09-02 18:02:31 +08:00
}
2025-01-06 11:51:31 +08:00
}
.tit{
margin-top: 40rpx;
font-weight: 700;
font-size: 36rpx;
color: #3D3D3D;
}
.header{
display: flex;
flex-direction: row;
justify-content: space-between;
.header-left{
display: flex;
2025-01-06 11:51:31 +08:00
flex-direction: row;
align-items: center;
2025-01-06 11:51:31 +08:00
.avatar{
width: 108rpx;
height: 108rpx;
border-radius: 50%;
2024-07-10 18:01:47 +08:00
}
2025-01-06 11:51:31 +08:00
.userinfo{
margin-left: 40rpx;
.username{
font-weight: 700;
font-size: 36rpx;
color: #3D3D3D;
2024-07-10 18:01:47 +08:00
}
2025-01-06 11:51:31 +08:00
.userphone{
2024-07-10 18:01:47 +08:00
font-weight: 400;
2025-01-06 11:51:31 +08:00
font-size: 28rpx;
color: #3D3D3D;
2024-07-10 18:01:47 +08:00
}
}
}
2025-01-06 11:51:31 +08:00
.header-right{
display: flex;
flex-direction: row;
align-items: center;
.code{
width: 40rpx;
height: 40rpx;
}
}
2024-05-08 23:18:30 +08:00
}
2025-01-06 11:51:31 +08:00
}
</style>