Bladeren bron

fix: 志愿者注册调整

chenjj 3 weken geleden
bovenliggende
commit
ddb18c00e9

+ 2 - 2
components/Client/new_file.vue

@@ -142,7 +142,7 @@
 		key: 4
 	},
 	{
-		icon: '/static/serverImg/home/icon/icon2.png',
+		icon: '/static/serverImg/home/icon/icon3.png',
 		name: '家庭清洁',
 		key: 5
 	},
@@ -366,7 +366,7 @@
 	height: 96rpx;
 	opacity: 1;
 	border-radius: 8rpx;
-	background: rgba(0, 122, 255, 0.1);
+	background: rgba(251, 229, 225, 1);;
 	display: flex;
 	align-items: center;
 	justify-content: center;

+ 4 - 4
manifest.json

@@ -50,17 +50,17 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxed3f482559db6196",
+        "appid" : "wxf8cc1f7fffc41354",
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,
             "minified" : false
         },
         "usingComponents" : true,
-        "optimization": {
-            "subPackages": true 
+        "optimization" : {
+            "subPackages" : true
         },
-        "lazyCodeLoading": "requiredComponents"
+        "lazyCodeLoading" : "requiredComponents"
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 2 - 2
pages/classify.vue

@@ -3,10 +3,10 @@
 		<!-- 志愿者 -->
 		<view class="classify-main" v-if="userType == '2'">
 			<up-tabs :list="column" :scrollable="false" @change="onChange" :activeStyle="{
-				color: 'rgba(51, 102, 255, 1)',
+				color: 'rgba(221, 94, 69, 1)',
 				fontWeight: 'bold',
 				transform: 'scale(1.05)'
-			}" lineColor="rgba(51, 102, 255, 1)" v-model:current="tabKey">
+			}" lineColor="rgba(221, 94, 69, 1)" v-model:current="tabKey">
 			</up-tabs>
 			<view class="list">
 				<List :data="data" v-if="data.length > 0" />

+ 2 - 11
pages/common/orderList/index.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="list-page">
-        <up-list @scrolltolower="scrolltolower" style="height: 100%;" v-if="type === 'ordinary'">
+        <up-list @scrolltolower="scrolltolower" style="height: 100%;">
             <up-list-item v-for="(item, index) in data" :key="index" >
                 <ListItem :data="item" />
             </up-list-item>
@@ -10,22 +10,13 @@
 				></up-loadmore>
         </up-list>
 
-        <up-list @scrolltolower="scrolltolower" style="height: 100%;" v-else>
-            <up-list-item v-for="(item, index) in data" :key="index" >
-                <RankingItem :data="item" />
-            </up-list-item>
-            <up-loadmore
-					:line="true"
-					status="nomore"
-				></up-loadmore>
-        </up-list>
+    
       
     </view>
 </template>
 
 <script setup>
 import ListItem from './listItem.vue';
-import RankingItem from './rankingItem.vue';
 
 
 const props = defineProps({

+ 10 - 6
pages/common/orderList/listItem.vue

@@ -28,8 +28,12 @@
                 <view class="item-price"><span class="item-price-yuan">¥</span> {{ data.serviceOnePrice || 0 }}</view>
                 <view class="item-btns">
                     <view class="btn-s" @click="onClick(1)">查看</view>
-                    <view class="btn-m" @click="onClick(2)"><img src="/static/serverImg/list/mess.png" alt=""
-                            style="width: 28rpx;height: 28rpx;margin-right: 8rpx;margin-top: 6rpx;">沟通</view>
+                    <view class="btn-m" @click="onClick(2)">
+
+                        <up-icon name="chat" color="#ffffff" size="20" ></up-icon>
+                        <!-- <img src="/static/serverImg/list/mess.png" alt=""
+                            style="width: 28rpx;height: 28rpx;margin-right: 8rpx;margin-top: 6rpx;"> -->
+                            <text style="margin-left: 8rpx;">沟通</text></view>
                 </view>
             </view>
         </view>
@@ -132,7 +136,7 @@ function onClick(type) {
                 font-weight: 400;
                 letter-spacing: 0rpx;
                 line-height: 45rpx;
-                color: rgba(255, 59, 48, 1);
+                color: rgba(203, 26, 28, 1);
             }
 
             .item-btns {
@@ -144,7 +148,7 @@ function onClick(type) {
                     font-size: 26rpx;
                     font-weight: 400;
                     line-height: 39rpx;
-                    color: rgba(51, 102, 255, 1);
+                    color: rgba(221, 94, 69, 1);
                     text-align: center;
                     padding: 16rpx 0;
                     width: 156.03rpx;
@@ -152,14 +156,14 @@ function onClick(type) {
                     background: rgba(0, 0, 0, 0);
                     display: flex;
                     justify-content: center;
-                    border: 0rpx solid rgba(51, 102, 255, 1);
+                    border: 0rpx solid rgba(221, 94, 69, 1);
                 }
 
                 .btn-m {
                     width: 188.03rpx;
                     border-radius: 8rpx;
                     font-size: 26rpx;
-                    background: rgba(51, 102, 255, 1);
+                    background: rgba(221, 94, 69, 1);
 
                     text-align: left;
                     margin-left: 24rpx;

+ 0 - 194
pages/common/orderList/rankingItem.vue

@@ -1,194 +0,0 @@
-<template>
-    <view class="item">
-        <view class="item-img">
-            <img src="/static/img/dd.png" alt="" />
-        </view>
-        <view class="item-info">
-            <view class="item-title-box">
-                <view class="item-title">
-                    <view class="item-name">
-                        <!-- <dict-tag :options="lrr_service_category" :value="data.serviceCategory" /> -->
-                        姓名: {{ }}
-                    </view>
-                    <dict-tag :options="lrr_service_status" :value="data.orderStatus" />
-                </view>
-                <view class="item-de">类别:</view>
-                <view class="item-de">综合评分:</view>
-                <view class="item-de">技能简介:</view>
-
-                <!-- <view class="item-de">
-                    服务地址:{{ data.address }}
-                </view> -->
-            </view>
-            <view class="item-box">
-                <view>
-                    <dict-tag :options="lrr_study" :value="data.serviceType" v-if="data.serviceCategory === 2" />
-                    <dict-tag :options="lrr_chitchat" :value="data.serviceType" v-if="data.serviceCategory === 1" />
-                </view>
-                <view class="rank-num">
-                   <!-- <label class="rank-label">No.</label>11 -->
-                    <img src="/static/img/no1.png" alt="" class="no-img" />
-                </view>
-
-            </view>
-        </view>
-    </view>
-</template>
-
-<script setup>
-import { inject } from 'vue';
-import DictTag from '@/components/DictTag/index.vue'
-import { computed } from 'vue';
-
-const props = defineProps({
-    data: {
-        type: Object,
-        default: () => {
-            return {}
-        }
-    },
-});
-
-const inject_click = inject('onClick');
-
-const lrr_chitchat = inject('lrr_chitchat');
-const lrr_study = inject('lrr_study');
-const lrr_service_status = inject('lrr_service_status');
-
-const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;
-
-/**
- * 1: 查看
- * 2:沟通
- * 3:上传照片
- */
-function onClick() {
-    inject_click(props.data, 1);
-}
-</script>
-
-<style lang="scss" scoped>
-.item {
-    height: 120px;
-    border-radius: 10px;
-    background: rgba(255, 255, 255, 1);
-    padding: 12px;
-    margin-bottom: 12px;
-    display: flex;
-
-    .item-img {
-        width: 96px;
-        height: 96px;
-        margin-right: 12px;
-
-        image {
-            height: 100%;
-            width: 100%;
-        }
-    }
-
-    .item-info {
-        flex: 1;
-        display: flex;
-        // flex-direction: column;
-        align-items: center;
-        justify-content: space-between;
-
-        .item-title-box {
-            .item-title {
-                font-size: 14px;
-                font-weight: 700;
-                letter-spacing: 0px;
-                // line-height: 20.27px;
-                color: rgba(51, 51, 51, 1);
-                text-align: left;
-                vertical-align: top;
-                margin-bottom: 10px;
-
-                display: flex;
-                align-content: center;
-                justify-content: space-between;
-
-                .item-name {
-                    flex: 1;
-                    display: flex;
-                    // display: -webkit-box;
-                    // -webkit-box-orient: vertical;
-                    // -webkit-line-clamp: 1;
-                    // overflow: hidden;
-                    // text-overflow: ellipsis;
-                    // word-break: break-all;
-                }
-
-                .item-tag {
-                    //    color: #3c9cff;
-                }
-
-            }
-
-            .item-de {
-                font-size: 12px;
-                font-weight: 500;
-                letter-spacing: 0px;
-                line-height: 21.38px;
-                color: rgba(153, 153, 153, 1);
-                text-align: left;
-                vertical-align: top;
-
-                display: -webkit-box;
-                -webkit-box-orient: vertical;
-                -webkit-line-clamp: 2;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                word-break: break-all;
-            }
-        }
-
-        .item-box {
-            display: flex;
-            align-content: flex-end;
-            justify-content: space-between;
-
-            .item-price {
-                font-size: 18px;
-                font-weight: 500;
-                letter-spacing: 0px;
-                line-height: 21.09px;
-                color: rgba(246, 74, 31, 1);
-                text-align: center;
-                vertical-align: top;
-
-                .item-price-yuan {
-                    font-size: 13px;
-                    font-weight: 700;
-                    letter-spacing: 0px;
-                    line-height: 21.09px;
-                    color: rgba(246, 74, 31, 1);
-                }
-            }
-
-            .item-btns {
-                display: flex;
-            }
-        }
-    }
-
-
-    .no-img {
-        width: 47px;
-        height: 36px;
-    }
-    .rank-num {
-        font-size: 20px;
-        font-weight: 700;
-        line-height: 23.44px;
-        color: rgba(51, 51, 51, 1);
-    }
-    .rank-label{
-        font-size: 14px;
-        font-weight: 500;
-        line-height: 16.41px;
-        color: rgba(153, 153, 153, 1);
-    }
-}
-</style>

+ 2 - 2
pages/common/rankingList/index.vue

@@ -91,12 +91,12 @@ const datas = [
                 height: 46rpx;
                 opacity: 1;
                 border-radius: 19998rpx;
-                background: rgba(0, 122, 255, 0.1);
+                background:  rgba(251, 229, 225, 1);;
                 margin-bottom: 16rpx;
                 font-size: 24rpx;
                 font-weight: 400;
                 line-height: 32rpx;
-                color: rgba(0, 122, 255, 1);
+                color: rgba(221, 94, 69, 1);
 
 
             }

+ 2 - 1
pages/index.vue

@@ -7,7 +7,8 @@
 				<text>{{ data.address }}</text>
 			</view>
 			<view>
-				<img src="/static/serverImg/home/message.png" alt="" style="width: 50rpx;height: 50rpx;">
+				<up-icon name="bell" :size="25" color="rgba(46, 46, 46, 1)"></up-icon>
+				<!-- <img src="/static/serverImg/home/message.png" alt="" style="width: 50rpx;height: 50rpx;"> -->
 			</view>
 		</view>
 		<view class="home-main">

+ 45 - 34
pages/mine.vue

@@ -3,6 +3,7 @@
 
 		<view class="mine-header">
 			<img :src="userInfo.avatar" alt="" style="width: 136rpx;height: 136rpx;">
+
 			<view class="header-info">
 				<text class="info-name">{{ userInfo.nickName }}</text>
 				<text class="info-id">ID: {{ data.volunteerId }}</text>
@@ -17,7 +18,7 @@
 					<view class="price-name flex-center"> {{ item.name }} </view>
 					<view class="price-data flex-center">
 						{{ index === 0 ? '¥' : '' }}<up-count-to :startVal="0" :endVal="data[item.key]"
-							:decimals="item.decimals"></up-count-to>
+							:decimals="item.decimals" ></up-count-to>
 					</view>
 					<text class="grid-min-price" v-if="item.key === 'balance'">待入账 ¥{{ data[item.balance] }}</text>
 				</view>
@@ -28,7 +29,8 @@
 				<view class="status-card-item" v-for="(listItem, listIndex) in adminList" :key="listIndex"
 					@click="onClick(listItem)">
 					<view class="grid-img-box">
-						<img :src="listItem.iconName" alt="" style="width: 52rpx;height: 52rpx;">
+						<!-- <img :src="listItem.iconName" alt="" style="width: 52rpx;height: 52rpx;"> -->
+						<up-icon :name="listItem.iconName" color="rgba(51, 51, 51, 1)" size="25" ></up-icon>
 					</view>
 					<text class="grid-text">{{ listItem.name }}</text>
 				</view>
@@ -47,8 +49,8 @@
 			<view class="mine-card count-card" v-if="userType == 2">
 				<view class="count-title">订单统计</view>
 				<view class="count-list">
-					<view class="count-item" v-for="(item, index) in orderList" :key="index">
-						<up-count-to :startVal="0" :endVal="data[item.key]"></up-count-to>
+					<view class="count-item" v-for="(item, index) in orderList" :key="index" @click="onClick(item)">
+						<up-count-to :startVal="0" :endVal="data[item.key]" :color="data[item.key]>0 && 'rgba(221, 94, 69, 1)'" ></up-count-to>
 						<text class="count-item-text">{{ item.name }}</text>
 					</view>
 				</view>
@@ -83,7 +85,15 @@ import { getVolunteerAccountInfo,volunteerOrderStatistics } from "@/api/mine";
 const userInfo = ref({
 	avatar: '/static/serverImg/mine/user.png'
 })
-
+const data = ref({
+	balance: 0.0,
+	reservationCount: 0,
+	doingCount:0,
+	finishedCount:0,
+	cancelCount:0,
+	orderCount:0,
+	orderFrozenBalance:0
+});
 const rateValue = ref(3)
 const priceList = [{
 	name: '账户余额',
@@ -100,33 +110,33 @@ const priceList = [{
 ]
 const orderList = ref([{
 	name: '预约单',
-	key: 'reservationCount'
+	key: 'reservationCount',
+	switchPage:'/pages/classify',
+	value:1
 },
 
 {
 	name: '进行单',
-	key: 'doingCount'
+	key: 'doingCount',
+	switchPage:'/pages/classify',
+	value:2
 
 },
 {
 	name: '完成单',
-	key: 'finishedCount'
+	key: 'finishedCount',
+	switchPage:'/pages/classify',
+	value:3
 
 },
 {
 	name: '取消单',
-	key: 'cancelCount'
-
+	key: 'cancelCount',
+	switchPage:'/pages/classify',
+	value:4
 }
 ]);
-const data = ref({
-	balance: 0.0,
-	reservationCount: 0,
-	doingCount:0,
-	finishedCount:0,
-	cancelCount:0,
-	orderCount:0,
-});
+
 
 const userType = uni.getStorageSync('userType') //读取本地存储
 
@@ -152,7 +162,7 @@ const adminList = ref(
 	// },
 	{
 		name: '差评申述',
-		iconName: '/static/serverImg/mine/icon4.png',
+		iconName: 'chat',
 		page: '/pages_mine/pages/bad/index'
 	},
 	// {
@@ -162,11 +172,11 @@ const adminList = ref(
 	// },
 	{
 		name: '帮助与客服',
-		iconName: '/static/serverImg/mine/icon6.png',
+		iconName: 'kefu-ermai',
 	},
 	{
 		name: '用户端',
-		iconName: '/static/serverImg/mine/icon6.png',
+		iconName: 'account',
 		operate:()=>{
 			uni.reLaunch({ 
 				url: '/pages/UserSelection'
@@ -235,17 +245,18 @@ const onClick = (record) => {
 	if(record.operate){
 		record.operate()
 	}
-	// if (record.page && record.value) {
-	// 	const app = getApp();
-	// 	app.globalData.switchTabParams = {
-	// 		tabKey: record.value
-	// 	};
-	// 	// JS跳转 
-	// 	uni.switchTab({
-	// 		url: record.page
-	// 	});
-	// 	return;
-	// }
+
+	if (record.switchPage && record.value ) {
+		const app = getApp();
+		app.globalData.switchTabParams = {
+			tabKey: record.value
+		};
+		// JS跳转 
+		uni.switchTab({
+			url: record.switchPage
+		});
+		return;
+	}
 }
 
 
@@ -275,8 +286,8 @@ const geUserInfo = () => {
 	// userInfo.value = store.state.user
 	store.dispatch('GetInfo').then((res) => {
 		userInfo.value = store.state.user
-		console.log(store.state.user, '>>>>99');
-		
+		console.log(userInfo.value , '>>>>99');
+		//设置默认头像
 		
 
 	});

+ 1 - 1
pages_home/components/cust-form/index.vue

@@ -87,7 +87,7 @@
             @close="showSex = false" @select="ActionSheetSelect">
         </up-action-sheet>
 
-        <up-code ref="uCode" @change="codeChange" seconds="20" @start="code_data.disabled = true"
+        <up-code ref="uCode" @change="codeChange" seconds="60" @start="code_data.disabled = true"
             @end="code_data.disabled = false"></up-code>
 
         <!-- 省市区选择 province city area初始省市区设置 show:是否显示  @changeClick:更改省市区事件 @sureSelectArea:确认事件 @hideShow:隐藏事件-->

+ 37 - 10
pages_home/pages/details/index.vue

@@ -10,7 +10,7 @@
         <view class="status-main">
 
             <view class="status-card">
-                <view class="card-title"> 基本信息</view>
+                <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]] || '-' :
@@ -18,6 +18,14 @@
                 </view>
             </view>
 
+            <view class="status-card">
+                <view class="card-title">服务信息</view>
+                <view class="card-item" v-for="item in serveslist" :key="item.key">
+                    <view class="card-lable">{{ item.label }}</view>
+                    <view class="card-text"> {{ details[item.key] || '-'}}{{item.dese}} </view>
+                </view>
+            </view>
+
             <view class="status-card">
                 <view class="card-title">技能简介</view>
                 <view class="card-text"> {{ details.skillDescribe }} </view>
@@ -52,7 +60,7 @@
                 </view>
             </view>
 
-            <view class="status-btn" v-if="details.appStatus === '3'" @click="startSubmit">重新提交</view>
+            <view class="status-btn"  v-if="details.appStatus === '3'" @click="startSubmit">重新提交</view>
 
         </view>
 
@@ -93,10 +101,10 @@ const list = [
         label: "手机号",
         key: "phonenumber",
     },
-    {
-        label: "服务项目",
-        key: "businessManagementId",
-    },
+    // {
+    //     label: "服务项目",
+    //     key: "businessManagementId",
+    // },
     {
         label: "地区",
         key: "city",
@@ -106,6 +114,24 @@ const list = [
         key: "address",
     },
 ]
+
+const serveslist =[
+{
+        label: "服务项目",
+        key: "businessManagementId",
+    },
+    {
+        label: "服务时长",
+        key: "businessDuration",
+        dese:'分钟'
+    },
+    {
+        label: "服务价格",
+        key: "businessPrice",
+        dese:'元'
+
+    },
+]
 const sex_status = {
     0: '男',
     1: '女'
@@ -133,7 +159,8 @@ const status_e = {
 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) {
+    
+    if (details.value.appStatus === '3') {
         return {
             img: '/static/serverImg/home/no.png',
             text: status_e[details.value.appStatus],
@@ -308,10 +335,10 @@ onLoad((options) => {
     }
 
     .status-btn {
-        width: 716rpx;
+        // width: 716rpx;
         height: 96rpx;
         border-radius: 16rpx;
-        background: rgba(51, 102, 255, 1);
+        background: rgba(221, 94, 69, 1);
 
         display: flex;
         align-items: center;
@@ -320,7 +347,7 @@ onLoad((options) => {
         font-size: 32rpx;
         font-weight: 400;
         color: rgba(255, 255, 255, 1);
-        margin-bottom: 68rpx;
+        margin-bottom: 88rpx;
     }
 
     .card-imgs {

+ 41 - 93
pages_home/pages/register/data.js

@@ -125,22 +125,22 @@ const chatting = [
         key: "phonenumber",
         type: "phone-code",
     },
-    {
-        label: "服务项目",
-        key: "businessManagementId",
-        type: "cascader",
-        cascaderKey:'0',
-        rules: rules.businessManagementId,
-        required:true,
-        apifun: ()=>{
-            return new Promise((resolve, reject) => {
-                getTreeList({ parentId: "1" }).then(res => {
-                    resolve(res.data)
-                })
-            })
-        },
-        optionKey:'businessManagementOption'
-    },
+    // {
+    //     label: "服务项目",
+    //     key: "businessManagementId",
+    //     type: "cascader",
+    //     cascaderKey:'0',
+    //     rules: rules.businessManagementId,
+    //     required:true,
+    //     apifun: ()=>{
+    //         return new Promise((resolve, reject) => {
+    //             getTreeList({ parentId: "1" }).then(res => {
+    //                 resolve(res.data)
+    //             })
+    //         })
+    //     },
+    //     optionKey:'businessManagementOption'
+    // },
     {
         label: "地区",
         key: "city",
@@ -194,29 +194,29 @@ const education = [
         key: "phonenumber",
         type: "phone-code",
     },
-    {
-        label: "服务项目",
-        key: "businessManagementId",
-        type: "cascader",
-        cascaderKey:'0',
-        rules: rules.businessManagementId,
-        required:true,
-        apifun: ()=>{
-            return new Promise((resolve, reject) => {
-                getTreeList({ parentId: "2" }).then(res => {
-                    resolve(res.data)
-                })
-            })
-        },
-        optionKey:'businessManagementOption'
-    },
-    {
-        label: "证件号",
-        key: "idCard",
-        type: "input",
-        rules: rules.idCard,
-        required:true
-    },
+    // {
+    //     label: "服务项目",
+    //     key: "businessManagementId",
+    //     type: "cascader",
+    //     cascaderKey:'0',
+    //     rules: rules.businessManagementId,
+    //     required:true,
+    //     apifun: ()=>{
+    //         return new Promise((resolve, reject) => {
+    //             getTreeList({ parentId: "2" }).then(res => {
+    //                 resolve(res.data)
+    //             })
+    //         })
+    //     },
+    //     optionKey:'businessManagementOption'
+    // },
+    // {
+    //     label: "证件号",
+    //     key: "idCard",
+    //     type: "input",
+    //     rules: rules.idCard,
+    //     required:true
+    // },
     {
         label: "地区",
         key: "city",
@@ -227,7 +227,7 @@ const education = [
 
     },
     {
-        label: "地址",
+        label: "详细地址",
         key: "address",
         type: "input",
         rules: rules.address,
@@ -241,58 +241,6 @@ const education = [
         required:true
     },
 ]
-//家庭清洁5
-const clean = [
-    {
-        label: "姓名",
-        key: "name",
-        type: "input",
-        rules: rules.name
-    },
-    {
-        label: "性别",
-        key: "sex",
-        type: "select",
-        option: sex_option,
-        rules: rules.sex
-    },
-    {
-        label: "年龄",
-        key: "age",
-        type: "input",
-        rules: rules.age
-    },
-    {
-        label: "手机号",
-        key: "phonenumber",
-        type: "phone-code",
-    },
-    {
-        label: "证件号",
-        key: "idCard",
-        type: "input",
-    },
-    {
-        label: "地区",
-        key: "city",
-        type: "city",
-        option: city_option,
-        rules: rules.city
-
-    },
-    {
-        label: "地址",
-        key: "address",
-        type: "input",
-        rules: rules.address
-    },
-    {
-        label: "技能简介",
-        key: "skillDescribe",
-        type: "textarea",
-    },
-]
-
 
 
-export { chatting,     education, clean }
+export { chatting,    education }

+ 221 - 12
pages_home/pages/register/index.vue

@@ -4,20 +4,67 @@
 			<FontTitle title="请完成注册信息填报" />
 			<CustForm :column="com_column" ref="cust_form_ref" :isCode="isAdd" />
 		</view>
+		<view class="register-card">
 
-		<view class="register-card" v-if="details.appStatus === 3">
+			<view class="info-list">
+				<view class="font-title">服务类别( {{ serviceOptions.length }} )</view>
+				<view class="service-list">
+					<view v-for="item in serviceOptions" :key="item.id" @click="serviceChange(item, 'classKey')"
+						:class="serviceKeys.classKey === item.id ? 'servicetab classActive' : 'servicetab'">
+						{{ item.businessName }}
+					</view>
+				</view>
+				<view v-if="serviceKeys.classKey && serviceItems && serviceItems.length > 0">
+					<view class="font-title">服务项目</view>
+					<view class="service-list">
+						<view v-for="item in serviceItems" :key="item.id" @click="serviceChange(item, 'itemKey')"
+							:class="serviceKeys.itemKey === item.id ? 'servicetab classActive' : 'servicetab'">
+							{{ item.businessName }}
+						</view>
+					</view>
+				</view>
+				<view v-if="serviceKeys.itemKeyname || serviceKeys.classKeyname">
+					<view class="font-title">服务时长(<text class="activeColor">{{ serviceKeys.itemKeyname ||
+						serviceKeys.classKeyname }}</text>)</view>
+					<view class="service-list">
+						<view v-for="item in timeList" :key="item.id" @click="serviceChange(item, 'time')"
+							:class="serviceKeys.time === item.id ? 'servicetab classActive' : 'servicetab'">
+							{{ item.lable }}
+						</view>
+					</view>
+					<view class="font-title">服务价格(<text class="activeColor">{{ serviceKeys.itemKeyname ||
+						serviceKeys.classKeyname }}</text>)</view>
+					<view class="service-list">
+						<up-input v-model="serviceKeys.price" placeholder="请设置服务价格">
+							<template #suffix>
+								<text>元</text>
+							</template>
+						</up-input>
+					</view>
+				</view>
+
+
+
+			</view>
+		</view>
+
+		<view class="register-card" v-if="details.appStatus === '3'">
 			<view class="font-title">驳回原因</view>
 			<view class="info-list">
 				{{ details.rejectReason }}
 			</view>
 		</view>
 
+
 		<view v-for="item in updata_list" :key="item.key" class="updata-imgs">
 			<UpdataImgs :fileList="file_url[item.key]" :data="item" ref="zsImg"
 				v-if="item.permission.includes(data.key)" @onSubmit="onChange" />
 		</view>
 
-		<up-button type="primary" text="确定" @click="onSubmit" ></up-button>
+
+
+		<!-- <up-button  color="rgba(221, 94, 69, 1)" text="确定" @click="onSubmit" ></up-button> -->
+		<view class="status-btn" @click="onSubmit">确定</view>
 
 	</view>
 </template>
@@ -28,10 +75,10 @@ import { onLoad } from '@dcloudio/uni-app';
 import FontTitle from "@/pages_home/components/font-title/index.vue";
 import CustForm from "@/pages_home/components/cust-form/index";
 import UpdataImgs from "@/pages_home/components/updata-imgs/index.vue";
-import { chatting, education, clean } from "./data";
+import { chatting, education } from "./data";
 import { add, getVolunteerInfo } from "@/api/volunteer";
 import { computed } from 'vue';
-
+import { getTreeList } from '@/api/volunteer'
 
 const userImg = ref(null);
 const zsImg = ref(null);
@@ -76,6 +123,32 @@ const file_url = reactive({});
 const isAdd = ref(true);//是否已经注册
 
 const details = ref({});//详情数据
+const serviceOptions = ref([]);//服务类目
+const serviceItems = ref([]);//服务项目
+
+const serviceKeys = reactive({
+	classKey: '',//服务类别
+	classKeyname: '',
+	itemKey: '',//服务项目
+	itemKeyname: '',
+	time:'',//时间
+	price:'',//价格
+})
+
+const timeList = [
+	{
+		lable: '60分钟',
+		id: 60
+	},
+	{
+		lable: '90分钟',
+		id: 90
+	},
+	{
+		lable: '120分钟',
+		id: 120
+	},
+]
 
 const sex_status = {
 	'男': 0,
@@ -84,7 +157,6 @@ const sex_status = {
 const register_column = {
 	1: chatting,
 	2: education,
-	5: clean
 }
 
 //根据类型获取表单item 值
@@ -118,14 +190,39 @@ function onSubmit() {
 					return;
 				}
 			}
+		
+			if(!(serviceKeys.itemKeyname || serviceKeys.classKeyname)){
+				uni.showToast({
+						title: '请选择服务',
+						icon: 'none'
+					})
+				return
+			}
+			if(!serviceKeys.time){
+				uni.showToast({
+						title: '请选择服务时长',
+						icon: 'none'
+					})
+				return
+			}
+			if(!serviceKeys.price){
+				uni.showToast({
+						title: '请输入服务价格',
+						icon: 'none'
+					})
+				return
+			}
 
 			const parmas = {
 				serviceCategory: data.value.key,
-				...file_url
+				...file_url,
+				businessManagementId:serviceKeys.itemKey || serviceKeys.classKey,
+				businessPrice: serviceKeys.price,
+				businessDuration: serviceKeys.time
 			};
 			for (const key in res) {
 				parmas[key] = key == 'sex' ? sex_status[res[key]] : res[key];
-				if(key === 'businessManagementIdkey' ){
+				if (key === 'businessManagementIdkey') {
 					parmas['businessManagementId'] = res[key]
 					delete parmas['businessManagementIdkey'];
 				}
@@ -172,6 +269,40 @@ function onChange({ key, url }) {
 	})
 }
 
+function idToIndexs(array, targetId, path = []) {
+
+    for (let i = 0; i < array.length; i++) {
+        const item = array[i];
+        const currentPath = path.concat(i);
+
+        if (item.id === targetId) {
+			console.log('indexs',item);
+            return item
+        }
+
+        if (item.children) {
+            const result = idToIndexs(item.children, targetId, currentPath);
+            if (result) {
+                return result;
+            }
+        }
+    }
+
+    return null; // 如果没有找到对应的项,返回 null
+}
+//重新提交的服务信息回显
+function servesInit(){
+	const indexs =  idToIndexs(serviceOptions.value,details.value.businessManagementId +'')
+	const names = indexs.businessTierName.split('-');
+	Object.assign(serviceKeys, {
+					classKey: String(indexs.parentId)===String(data.value.key)? indexs.id :indexs.parentId,//服务类别
+					classKeyname:names[1],
+					itemKey: indexs.id,//服务项目
+					itemKeyname: indexs.businessName,
+					time:details.value.businessDuration,//时间
+					price:details.value.businessPrice,//价格
+				})
+}
 async function getRegister() {
 
 	try {
@@ -180,14 +311,19 @@ async function getRegister() {
 		});
 		const res = await getVolunteerInfo({ serviceCategory: data.value.key });
 		if (res.data) {
-			details.value = {...res.data,age:res.data.age + ''};
+			details.value = { ...res.data, age: res.data.age + '' };
 			cust_form_ref.value.setData(details.value);
 			Object.assign(file_url, {
 				volunteerPicture: res.data.volunteerPicture,
 				idCardPicture: res.data.idCardPicture,
 				certificationPicture: res.data.certificationPicture
 			})
+
+			 servesInit(data)
+
+		
 			isAdd.value = false;
+			
 		}
 	} catch (error) {
 		console.log('error', error);
@@ -200,12 +336,29 @@ async function getRegister() {
 	}
 }
 
-// onMounted(() => {
-// 	nextTick(() => {
 
-// 	});
 
-// })
+const serviceChange = (item, key) => {
+	console.log('----', item);
+	if (key === 'classKey') {
+		serviceItems.value = item.children;
+		serviceKeys['itemKey'] = '';
+	}
+	Object.assign(serviceKeys, {
+		[key]: serviceKeys[key] === item.id ? '' : item.id,
+		[key + 'name']: serviceKeys[key + 'name'] === item.businessName ? '' : item.businessName,
+	})
+
+}
+const getTreeListInit = () => {
+	getTreeList({ parentId: data.value.key }).then(res => {
+		console.log('----', res.data);
+		serviceOptions.value = res.data;
+	})
+}
+onMounted(() => {
+	getTreeListInit();
+})
 
 onLoad((options) => {
 	const option = JSON.parse(decodeURIComponent(options.data));
@@ -218,6 +371,7 @@ onLoad((options) => {
 
 	setTimeout(() => {
 		getRegister();
+
 	}, 500);
 
 })
@@ -259,4 +413,59 @@ onLoad((options) => {
 	line-height: 23.27px;
 	color: rgba(51, 51, 51, 1);
 }
+
+.status-btn {
+	// width: 716rpx;
+	height: 96rpx;
+	border-radius: 16rpx;
+	background: rgba(221, 94, 69, 1);
+
+	display: flex;
+	align-items: center;
+	justify-content: center;
+
+	font-size: 32rpx;
+	font-weight: 400;
+	color: rgba(255, 255, 255, 1);
+	margin-bottom: 88rpx;
+}
+
+.font-title {
+	margin-bottom: 32rpx;
+}
+
+.service-tile {
+	font-size: 32rpx;
+	font-weight: 400;
+	line-height: 48rpx;
+	color: rgba(51, 51, 51, 1);
+	margin-bottom: 16rpx;
+}
+
+.service-list {
+	display: flex;
+	align-items: flex-start;
+	flex-wrap: wrap;
+	margin-bottom: 16rpx;
+}
+
+.servicetab {
+	background: rgba(249, 250, 251, 1);
+	color: rgba(51, 51, 51, 1);
+	border: 1px solid #fff;
+	padding: 8rpx 16rpx;
+	border-radius: 16rpx;
+	margin-right: 16rpx;
+	margin-bottom: 16rpx;
+}
+
+.classActive {
+	background: rgba(251, 229, 225, 1);
+	color: rgba(221, 94, 69, 1);
+	border: 1px solid rgba(221, 94, 69, 1);
+}
+
+.activeColor {
+	color: rgba(221, 94, 69, 1);
+}
 </style>

+ 3 - 0
static/scss/global.scss

@@ -142,4 +142,7 @@
 
 .color-grey {
   color: rgba(153, 153, 153, 1);
+}
+.color-parmas {
+  color: rgba(221, 94, 69, 1);
 }

BIN
static/serverImg/home/address.png


BIN
static/serverImg/home/icon/icon1.png


BIN
static/serverImg/home/icon/icon2.png


BIN
static/serverImg/home/icon/icon3.png


BIN
static/serverImg/home/icon/icon4.png


BIN
static/serverImg/home/icon/icon5.png


BIN
static/serverImg/home/icon/icon6.png


BIN
static/serverImg/home/icon/icon7.png


BIN
static/serverImg/home/icon/icon8.png


+ 1 - 1
store/modules/user.ts

@@ -71,7 +71,7 @@ const user: Module<UserState, UserState> = {
       return new Promise((resolve, reject) => {
         getInfo().then((res: any) => {
           const user = res.user
-          const avatar = (user == null || user.avatar == "" || user.avatar == null) ? "@/static/images/profile.jpg" : baseUrl + user.avatar
+          const avatar = (user == null || user.avatar == "" || user.avatar == null) ? "/static/serverImg/mine/user.png" : baseUrl + user.avatar
           const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
           if (res.roles && res.roles.length > 0) {
             commit('SET_ROLES', res.roles)