2024-12-13 15:30:11 +08:00
|
|
|
<template>
|
|
|
|
|
<!-- 我的 -->
|
2024-12-21 17:24:36 +08:00
|
|
|
<view class="h5-container">
|
|
|
|
|
<view class="user-info">
|
|
|
|
|
<view style="text-align: right; padding: 15px 15px 0 0">
|
|
|
|
|
<van-icon name="setting" size="22" @click="onJumpToMySetting" />
|
2024-12-13 15:30:11 +08:00
|
|
|
</view>
|
2024-12-21 17:24:36 +08:00
|
|
|
|
|
|
|
|
<view class="header-user">
|
|
|
|
|
<van-image
|
|
|
|
|
round
|
|
|
|
|
fit="cover"
|
|
|
|
|
width="68px"
|
|
|
|
|
height="68px"
|
2024-12-26 21:57:55 +08:00
|
|
|
:src="memberStore.userInfo.avatar"
|
2024-12-21 17:24:36 +08:00
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<view class="right-name">
|
|
|
|
|
<view class="name-box">
|
2024-12-24 18:05:34 +08:00
|
|
|
<text class="name"> {{ userInfo?.nickName }} </text>
|
|
|
|
|
<text class="company"> {{ userCompanyName }} </text>
|
2024-12-21 17:24:36 +08:00
|
|
|
</view>
|
|
|
|
|
|
2024-12-24 18:05:34 +08:00
|
|
|
<view> {{ userInfo?.phonenumber }} </view>
|
2024-12-21 17:24:36 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<van-cell-group inset>
|
|
|
|
|
<h2>我的订单</h2>
|
|
|
|
|
|
|
|
|
|
<van-grid clickable :column-num="2" :gutter="10">
|
2025-01-09 16:44:55 +08:00
|
|
|
<van-grid-item>
|
2025-01-03 21:53:56 +08:00
|
|
|
<view @click="onJumpMyOrder(1)">
|
2024-12-21 17:24:36 +08:00
|
|
|
<van-icon name="cart" />
|
|
|
|
|
<text>出租订单</text>
|
2025-01-03 21:53:56 +08:00
|
|
|
</view>
|
2024-12-21 17:24:36 +08:00
|
|
|
</van-grid-item>
|
2025-01-09 16:44:55 +08:00
|
|
|
<van-grid-item>
|
2025-01-03 21:53:56 +08:00
|
|
|
<view @click="onJumpMyDemand">
|
2025-01-02 18:02:58 +08:00
|
|
|
<van-icon name="cart" />
|
|
|
|
|
<text>我的需求</text>
|
2025-01-03 21:53:56 +08:00
|
|
|
</view>
|
2025-01-02 18:02:58 +08:00
|
|
|
</van-grid-item>
|
2025-01-09 16:44:55 +08:00
|
|
|
<van-grid-item @click="onJumpMyOrder(2)">
|
2025-01-03 21:53:56 +08:00
|
|
|
<view>
|
2024-12-21 17:24:36 +08:00
|
|
|
<van-icon name="cart" />
|
2024-12-26 22:09:57 +08:00
|
|
|
<text>承租订单</text>
|
2025-01-03 21:53:56 +08:00
|
|
|
</view>
|
2024-12-21 17:24:36 +08:00
|
|
|
</van-grid-item>
|
2025-06-02 17:07:05 +08:00
|
|
|
<!-- <van-grid-item @click="handleEquipment">
|
2025-02-24 15:18:10 +08:00
|
|
|
<view>
|
|
|
|
|
<van-icon name="coupon" />
|
|
|
|
|
<text>出租设备查询</text>
|
|
|
|
|
</view>
|
2025-06-02 17:07:05 +08:00
|
|
|
</van-grid-item> -->
|
2024-12-21 17:24:36 +08:00
|
|
|
</van-grid>
|
|
|
|
|
</van-cell-group>
|
2024-12-13 15:30:11 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2024-12-24 18:05:34 +08:00
|
|
|
import { ref } from 'vue'
|
2024-12-13 15:30:11 +08:00
|
|
|
import { useMemberStore } from '@/stores/index.js'
|
2024-12-24 18:05:34 +08:00
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
2024-12-13 15:30:11 +08:00
|
|
|
const memberStore = useMemberStore()
|
2024-12-24 18:05:34 +08:00
|
|
|
const userInfo = ref(null)
|
|
|
|
|
const userCompanyName = ref(null)
|
2024-12-13 15:30:11 +08:00
|
|
|
const onLogout = () => {
|
|
|
|
|
uni.navigateTo({ url: '/pages/login/index' })
|
|
|
|
|
}
|
2024-12-21 17:24:36 +08:00
|
|
|
|
|
|
|
|
const onJumpToMySetting = () => {
|
|
|
|
|
uni.navigateTo({ url: '/pages/my-setting/index' })
|
|
|
|
|
}
|
2024-12-24 18:05:34 +08:00
|
|
|
|
2025-01-03 21:53:56 +08:00
|
|
|
const onJumpMyOrder = (type) => {
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
uni.navigateTo({ url: '/pages/order-list/index?type=1' })
|
|
|
|
|
} else {
|
|
|
|
|
uni.navigateTo({ url: '/pages/order-list/index?type=2' })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const onJumpMyDemand = () => {
|
|
|
|
|
uni.navigateTo({ url: '/pages/my-demand/index' })
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-24 15:18:10 +08:00
|
|
|
// 出租设备查询
|
|
|
|
|
const handleEquipment = () => {
|
|
|
|
|
uni.navigateTo({ url: '/pages/my/leaseSearch' })
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-24 18:05:34 +08:00
|
|
|
onLoad(() => {
|
|
|
|
|
userInfo.value = memberStore.userInfo
|
|
|
|
|
userCompanyName.value = memberStore.userCompanyName
|
|
|
|
|
})
|
2024-12-13 15:30:11 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.user-info {
|
2024-12-21 17:24:36 +08:00
|
|
|
flex: 1;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
color: #333;
|
|
|
|
|
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
|
|
|
|
|
|
|
|
|
|
.header-user {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2025-01-09 16:44:55 +08:00
|
|
|
padding: 20px 0;
|
2024-12-21 17:24:36 +08:00
|
|
|
|
|
|
|
|
.right-name {
|
|
|
|
|
padding-left: 15px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
|
|
.name-box {
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.name {
|
2025-01-09 16:44:55 +08:00
|
|
|
font-size: 13px;
|
2024-12-21 17:24:36 +08:00
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.company {
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
background-color: #c4fbf5;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: #32b1a2;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
2025-01-09 16:44:55 +08:00
|
|
|
|
|
|
|
|
.name,
|
|
|
|
|
.company {
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
-webkit-line-clamp: 1;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
}
|
2024-12-21 17:24:36 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.van-cell-group--inset) {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 15px 0;
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
|
padding: 0 15px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.van-grid {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
:deep(.van-grid-item__content) {
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-03 21:53:56 +08:00
|
|
|
view {
|
2024-12-21 17:24:36 +08:00
|
|
|
width: 100%;
|
|
|
|
|
padding: 30px 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
background-color: #e8f2ef;
|
|
|
|
|
color: #4a4949;
|
2024-12-13 15:30:11 +08:00
|
|
|
|
2024-12-21 17:24:36 +08:00
|
|
|
text {
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
}
|
2024-12-13 15:30:11 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.van-hairline--top {
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|