|
@@ -1,27 +1,27 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class="address-container">
|
|
|
- <view class="address-header">
|
|
|
- <!-- 左侧默认标签-->
|
|
|
- <up-tag text="默认" type="error" style="width: 40rpx; height: 30rpx; margin-right: 10rpx;"></up-tag>
|
|
|
-
|
|
|
- <!-- 中间收货人信息 -->
|
|
|
- <view class="contact-info">
|
|
|
- {{listData.address.name}}
|
|
|
- {{listData.address.telephone}}
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 右侧图标 -->
|
|
|
- <up-icon name="arrow-right" class="arrow-icon"></up-icon>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 下方地址信息 -->
|
|
|
- <view class="address-detail">
|
|
|
- {{listData.address.provinceName}}
|
|
|
- {{listData.address.cityName}}
|
|
|
+ <view class="address-container">
|
|
|
+ <view class="address-header">
|
|
|
+ <!-- 左侧默认标签-->
|
|
|
+ <up-tag text="默认" type="error" style="width: 40rpx; height: 30rpx; margin-right: 10rpx;"></up-tag>
|
|
|
+
|
|
|
+ <!-- 中间收货人信息 -->
|
|
|
+ <view class="contact-info">
|
|
|
+ {{listData.address.name}}
|
|
|
+ {{listData.address.telephone}}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 右侧图标 -->
|
|
|
+ <up-icon name="arrow-right" class="arrow-icon"></up-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 下方地址信息 -->
|
|
|
+ <view class="address-detail">
|
|
|
+ {{listData.address.provinceName}}
|
|
|
+ {{listData.address.cityName}}
|
|
|
{{listData.address.districtName}}
|
|
|
- </view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
|
|
|
<view>
|
|
|
<up-card title="志愿者介绍" :head-style="{ height: '80rpx', padding: '20rpx',}">
|
|
@@ -50,7 +50,8 @@
|
|
|
<up-card title="证书" :head-style="{ height: '80rpx', padding: '20rpx',}">
|
|
|
<template #body>
|
|
|
<view class="certificate">
|
|
|
- <image v-for="item in certificationPictures" :key="item" :src="item" mode="" style="width: 100%;" class="certificate-img"></image>
|
|
|
+ <image v-for="item in certificationPictures" :key="item" :src="item" mode=""
|
|
|
+ style="width: 100%;" class="certificate-img"></image>
|
|
|
</view>
|
|
|
</template>
|
|
|
</up-card>
|
|
@@ -64,20 +65,20 @@
|
|
|
|
|
|
</view>
|
|
|
<view class="list-item">
|
|
|
- <image :src="listData.volunteerInfo.volunteerPicture" mode="aspectFill" class="item-image"></image>
|
|
|
+ <image :src="listData.volunteerInfo.volunteerPicture" mode="aspectFill" class="item-image">
|
|
|
+ </image>
|
|
|
<!-- 状态:orderStatus: 0未开始 ,1进行中,2已完成-->
|
|
|
<!-- score如果=null,显示待评价, -->
|
|
|
|
|
|
<view class="item-info">
|
|
|
- <view class="info-line">类别:{{ listData.volunteerInfo.projectName }}-{{ listData.volunteerInfo.serviceSubjectName }}</view>
|
|
|
+ <view class="info-line">
|
|
|
+ 类别:{{ listData.volunteerInfo.projectName }}-{{ listData.volunteerInfo.serviceSubjectName }}
|
|
|
+ </view>
|
|
|
<text>开始日期:{{item.workDate}}</text>
|
|
|
<text>开始时间: {{item.workStartTime}}</text>
|
|
|
</view>
|
|
|
- <view class="item-right">
|
|
|
- <view class="rating" v-if="score === null">待评价</view>
|
|
|
- <up-tag v-if="item.orderStatus === '0'">未开始</up-tag>
|
|
|
- <up-tag v-else-if="item.orderStatus === '1'">进行中</up-tag>
|
|
|
- <up-tag v-else-if="item.orderStatus === '2'">已完成</up-tag>
|
|
|
+ <view class="status-tags">
|
|
|
+ {{dictSortMap[item.orderStatus]}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</up-list-item>
|
|
@@ -99,18 +100,40 @@
|
|
|
orderInfomainOrderId
|
|
|
} from "@/api/userList.js";
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ const props = defineProps({
|
|
|
+ dataList: {
|
|
|
+ typeof: Array,
|
|
|
+ default: () => [],
|
|
|
+ },
|
|
|
+ dictSort: {
|
|
|
+ type: Array,
|
|
|
+ default: () => [], // 默认值
|
|
|
+ },
|
|
|
+ fetchData: Function, // 刷新数据的方法
|
|
|
+ })
|
|
|
+ console.log(props,"props?????????props")
|
|
|
const listData = ref(); //志愿者详情数据
|
|
|
const orderStatus = ref(0)
|
|
|
const score = ref(null)
|
|
|
const mainOrderId = ref(''); //志愿者ID
|
|
|
|
|
|
- const certificationPictures =computed(()=>{
|
|
|
- if(listData.value.volunteerInfo.certificationPicture){
|
|
|
+ const certificationPictures = computed(() => {
|
|
|
+ if (listData.value.volunteerInfo.certificationPicture) {
|
|
|
return listData.value.volunteerInfo.certificationPicture.split(',')
|
|
|
}
|
|
|
return []
|
|
|
})
|
|
|
|
|
|
+ const dictSortMap = computed(() => {
|
|
|
+ let mapObj = {}
|
|
|
+ props.dictSort.forEach((item => {
|
|
|
+ mapObj[item.dictValue] = item.dictLabel
|
|
|
+ }))
|
|
|
+ return mapObj
|
|
|
+ })
|
|
|
+
|
|
|
// 获取传递的参数
|
|
|
onLoad(async (options) => {
|
|
|
mainOrderId.value = options.mainOrderId;
|
|
@@ -121,32 +144,34 @@
|
|
|
|
|
|
<style scoped>
|
|
|
.address-container {
|
|
|
- padding: 20rpx;
|
|
|
- border: 1rpx solid #eee;
|
|
|
- border-radius: 10rpx;
|
|
|
+ padding: 20rpx;
|
|
|
+ border: 1rpx solid #eee;
|
|
|
+ border-radius: 10rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.address-header {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 10rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.contact-info {
|
|
|
- flex: 1; /* 占据剩余空间 */
|
|
|
- font-size: 28rpx;
|
|
|
- margin-left: 25rpx;
|
|
|
+ flex: 1;
|
|
|
+ /* 占据剩余空间 */
|
|
|
+ font-size: 28rpx;
|
|
|
+ margin-left: 25rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.arrow-icon {
|
|
|
- margin-left: auto; /* 将图标推到最右侧 */
|
|
|
+ margin-left: auto;
|
|
|
+ /* 将图标推到最右侧 */
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.address-detail {
|
|
|
- font-size: 26rpx;
|
|
|
- color: #666;
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #666;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.card-container {
|
|
|
display: flex;
|
|
|
position: relative;
|
|
@@ -266,11 +291,13 @@
|
|
|
margin-top: 18rpx;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.certificate {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
.certificate-img {
|
|
|
margin-bottom: 24rpx;
|
|
|
}
|