|
@@ -11,7 +11,8 @@
|
|
|
<view class="card-title"> 基本信息</view>
|
|
|
<view class="card-item" v-for="item in list" :key="item.key">
|
|
|
<view class="card-lable">{{ item.label }}</view>
|
|
|
- <view class="card-text"> {{item.key ==='sex'? sex_status[details[item.key]] ||'-' : details[item.key] || '-'}} </view>
|
|
|
+ <view class="card-text"> {{ item.key === 'sex' ? sex_status[details[item.key]] || '-' :
|
|
|
+ details[item.key] || '-'}} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -23,7 +24,8 @@
|
|
|
<view class="status-card">
|
|
|
<view class="card-title">用户头像</view>
|
|
|
<view class="card-imgs">
|
|
|
- <img class="upload-img" v-for="(item,index) in volunteerPicture_img" :key="index+ 'userimg'" :src="item" :alt="item.fileName" srcset="">
|
|
|
+ <img class="upload-img" v-for="(item, index) in volunteerPicture_img" :key="index + 'userimg'"
|
|
|
+ :src="item" :alt="item.fileName" srcset="">
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -31,17 +33,18 @@
|
|
|
<view class="status-card">
|
|
|
<view class="card-title">身份证</view>
|
|
|
<view class="card-imgs">
|
|
|
- <img class="upload-img" v-for="(item,index) in idCardPicture_img" :key="index+ 'card'" :src="item" :alt="item.fileName" srcset="">
|
|
|
+ <img class="upload-img" v-for="(item, index) in idCardPicture_img" :key="index + 'card'" :src="item"
|
|
|
+ :alt="item.fileName" srcset="">
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
<view class="status-card">
|
|
|
<view class="card-title">资格证书</view>
|
|
|
<view class="card-imgs">
|
|
|
- <view v-for="(item,index) in certificationPicture_img" :key="index+ 'cer'">
|
|
|
- <img class="upload-img" :src="item" :alt="item.fileName" srcset="" >
|
|
|
+ <view v-for="(item, index) in certificationPicture_img" :key="index + 'cer'">
|
|
|
+ <img class="upload-img" :src="item" :alt="item.fileName" srcset="">
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
@@ -61,11 +64,17 @@ import { onLoad } from '@dcloudio/uni-app';
|
|
|
import { add, getVolunteerInfo } from "@/api/volunteer";
|
|
|
import Picker from '@/components/picker/index.vue'
|
|
|
import { getTreeList } from '@/api/volunteer'
|
|
|
+import { useDict } from '@/utils/dict.js';
|
|
|
+// import DictTag from '@/components/DictTag/index.vue'
|
|
|
const details = ref({});
|
|
|
-const data =ref({});
|
|
|
+const data = ref({});
|
|
|
const options = ref([])
|
|
|
const pickerRef = ref(null);
|
|
|
|
|
|
+// const {
|
|
|
+// volunteer_app_status
|
|
|
+// } = useDict('volunteer_app_status');
|
|
|
+
|
|
|
const list = [
|
|
|
{
|
|
|
label: "姓名",
|
|
@@ -97,35 +106,44 @@ const list = [
|
|
|
},
|
|
|
]
|
|
|
const sex_status = {
|
|
|
- 0:'男',
|
|
|
- 1:'女'
|
|
|
+ 0: '男',
|
|
|
+ 1: '女'
|
|
|
}
|
|
|
//头像
|
|
|
-const volunteerPicture_img = computed(() => {
|
|
|
- return details.value.volunteerPicture?details.value.volunteerPicture.split(','):[]
|
|
|
+const volunteerPicture_img = computed(() => {
|
|
|
+ return details.value.volunteerPicture ? details.value.volunteerPicture.split(',') : []
|
|
|
})
|
|
|
|
|
|
//个人身份证
|
|
|
-const idCardPicture_img = computed(() => {
|
|
|
- return details.value.idCardPicture?details.value.idCardPicture.split(','):[]
|
|
|
+const idCardPicture_img = computed(() => {
|
|
|
+ return details.value.idCardPicture ? details.value.idCardPicture.split(',') : []
|
|
|
})
|
|
|
//职业、资质证书
|
|
|
-const certificationPicture_img = computed(() => {
|
|
|
- return details.value.certificationPicture?details.value.certificationPicture.split(','):[]
|
|
|
+const certificationPicture_img = computed(() => {
|
|
|
+ return details.value.certificationPicture ? details.value.certificationPicture.split(',') : []
|
|
|
})
|
|
|
|
|
|
+const status_e = {
|
|
|
+ 1: '申请成功',
|
|
|
+ 2: '注册成功',
|
|
|
+ 3: '申请失败'
|
|
|
+}
|
|
|
+
|
|
|
const statusData = computed(() => {
|
|
|
+ // console.log('volunteer_app_status',volunteer_app_status.value);
|
|
|
+ // const parmas = volunteer_app_status.value.find(item => item.value === details.value.appStatus)
|
|
|
if (details.value.appStatus === 3) {
|
|
|
return {
|
|
|
img: '/static/serverImg/home/no.png',
|
|
|
- text: '注册失败',
|
|
|
- rejectReason: details.value.rejectReason || '暂无原因'
|
|
|
+ text: status_e[details.value.appStatus],
|
|
|
+ rejectReason: details.value.rejectReason
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
- img: '/static/serverImg/home/ok.png',
|
|
|
- text: '注册成功'
|
|
|
+ img: '/static/serverImg/home/yes.png',
|
|
|
+ text: status_e[details.value.appStatus],
|
|
|
+ rejectReason: details.value.rejectReason
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -158,18 +176,18 @@ async function getRegister() {
|
|
|
const op_res = await getTreeList({ parentId: data.value.key });
|
|
|
const res = await getVolunteerInfo({ serviceCategory: data.value.key });
|
|
|
if (res.data) {
|
|
|
- const names = idToIndexs(op_res.data,res.data.businessManagementId + '')
|
|
|
- console.log('res',res,names);
|
|
|
+ const names = idToIndexs(op_res.data, res.data.businessManagementId + '')
|
|
|
+ console.log('res', res, names);
|
|
|
details.value = {
|
|
|
...res.data,
|
|
|
businessManagementId: names
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
getTreeList({ parentId: data.value.key }).then(res => {
|
|
|
options.value = res.data;
|
|
|
- })
|
|
|
+ })
|
|
|
} catch (error) {
|
|
|
console.log('error', error);
|
|
|
uni.showToast({
|
|
@@ -183,8 +201,8 @@ async function getRegister() {
|
|
|
|
|
|
const startSubmit = () => {
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages_home/pages/register/index?data=${encodeURIComponent(JSON.stringify(data.value))}`
|
|
|
- })
|
|
|
+ url: `/pages_home/pages/register/index?data=${encodeURIComponent(JSON.stringify(data.value))}`
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
onLoad((options) => {
|
|
@@ -286,36 +304,35 @@ onLoad((options) => {
|
|
|
color: rgba(17, 24, 39, 1);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.status-btn {
|
|
|
- width: 716rpx;
|
|
|
- height: 96rpx;
|
|
|
- border-radius: 16rpx;
|
|
|
- background: rgba(51, 102, 255, 1);
|
|
|
+ width: 716rpx;
|
|
|
+ height: 96rpx;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ background: rgba(51, 102, 255, 1);
|
|
|
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
|
|
|
- font-size: 32rpx;
|
|
|
- font-weight: 400;
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
- margin-bottom: 68rpx;
|
|
|
- }
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ margin-bottom: 68rpx;
|
|
|
+ }
|
|
|
|
|
|
- .card-imgs {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- margin-right: 32rpx;
|
|
|
- }
|
|
|
+ .card-imgs {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin-right: 32rpx;
|
|
|
+ }
|
|
|
|
|
|
- .upload-img{
|
|
|
- height: 136rpx;
|
|
|
- width: 136rpx;
|
|
|
- margin-right: 24rpx;
|
|
|
- }
|
|
|
+ .upload-img {
|
|
|
+ height: 136rpx;
|
|
|
+ width: 136rpx;
|
|
|
+ margin-right: 24rpx;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
</style>
|