浏览代码

fix:代码冲突解决

chenjj 1 月之前
父节点
当前提交
971568bf6c

+ 1 - 1
api/volunteerDetailsApi/details.js

@@ -67,7 +67,7 @@ export function volunteergetTimesByDate(params) {
   return request({
     url: '/core/volunteer/work-date/getTimesByDate',  
     method: 'get',
-	params:params,
+	  params:params,
   });
 }
 

文件差异内容过多而无法显示
+ 11333 - 0
components/cc-selectDity/area.js


文件差异内容过多而无法显示
+ 11332 - 0
components/cc-selectDity/areaBak240404.js


+ 353 - 0
components/cc-selectDity/cc-selectDity.vue

@@ -0,0 +1,353 @@
+<template>
+	<view>
+		<!--自定义地址选择器-->
+		<view class="cc_area_mask" v-show="show == true"></view>
+		<view :class="'cc_area_view ' + (show ? 'show':'hide')">
+			<view class="cc_area_view_btns">
+				<text class="cc_area_view_btn_cancle" @tap="handleNYZAreaCancle">取消</text>
+				<text class="cc_area_view_btn_sure" @tap="handleNYZAreaSelect" :data-province="province"
+					:data-city="city" :data-area="area">确定</text>
+			</view>
+			<picker-view class="cc_area_pick_view" indicator-style="height: 35px;" @change="handleNYZAreaChange"
+				:value="value">
+				<picker-view-column>
+					<view v-for="(item, index) in provinces" :key="index" class="cc_area_colum_view">{{item}}</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view v-for="(item, index) in citys" :key="index" class="cc_area_colum_view">{{item}}</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view v-for="(item, index) in areas" :key="index" class="cc_area_colum_view">{{item}}</view>
+				</picker-view-column>
+			</picker-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getProvinces,getMyCity,getAreas,getAreasCode} from "./area.js"
+
+	let index = [0, 0, 0];
+	let provinces = getProvinces();
+	let citys = getMyCity(index[0]);
+	let areas = getMyCity(index[0], index[1]);
+
+	export default {
+		mixins: [{
+			methods: {
+				setData: function(obj, callback) {
+					let that = this;
+					const handleData = (tepData, tepKey, afterKey) => {
+						tepKey = tepKey.split('.');
+						tepKey.forEach(item => {
+							if (tepData[item] === null || tepData[item] === undefined) {
+								let reg = /^[0-9]+$/;
+								tepData[item] = reg.test(afterKey) ? [] : {};
+								tepData = tepData[item];
+							} else {
+								tepData = tepData[item];
+							}
+						});
+						return tepData;
+					};
+					const isFn = function(value) {
+						return typeof value == 'function' || false;
+					};
+					Object.keys(obj).forEach(function(key) {
+						let val = obj[key];
+						key = key.replace(/\]/g, '').replace(/\[/g, '.');
+						let front, after;
+						let index_after = key.lastIndexOf('.');
+						if (index_after != -1) {
+							after = key.slice(index_after + 1);
+							front = handleData(that, key.slice(0, index_after), after);
+						} else {
+							after = key;
+							front = that;
+						}
+						if (front.$data && front.$data[after] === undefined) {
+							Object.defineProperty(front, after, {
+								get() {
+									return front.$data[after];
+								},
+								set(newValue) {
+									front.$data[after] = newValue;
+									that.$forceUpdate();
+								},
+								enumerable: true,
+								configurable: true
+							});
+
+							// #ifndef VUE3
+							that.$set(front, after, val);
+							// #endif
+
+							// #ifdef VUE3
+							Reflect.set(front, after, val);
+							// #endif
+
+						} else {
+
+							// #ifndef VUE3
+							that.$set(front, after, val);
+							// #endif
+
+							// #ifdef VUE3
+							Reflect.set(front, after, val);
+							// #endif
+						}
+					});
+					isFn(callback) && this.$nextTick(callback);
+				}
+			}
+		}],
+		data() {
+		
+			return {
+				provinces: getProvinces(),
+				citys: getMyCity(index[0]),
+				areas: getAreas(index[0], index[1]),
+				value: [0, 0, 0],
+				address: '',
+				addressCode: '',
+
+			};
+		},
+
+		components: {},
+		props: {
+			// 省
+			province: {
+				//控制area_select显示隐藏
+				type: String,
+				default: ''
+			},
+			// 市
+			city: {
+				//控制area_select显示隐藏
+				type: String,
+				default: ''
+			},
+			// 区
+			area: {
+				//控制area_select显示隐藏
+				type: String,
+				default: ''
+			},
+
+			show: {
+				//控制area_select显示隐藏
+				type: Boolean,
+				default: false
+			},
+			maskShow: {
+				//是否显示蒙层
+				type: Boolean,
+				default: true
+			}
+		},
+		watch: {
+			province() {
+				this.init();
+			},
+			city() {
+				this.init();
+			},
+			area() {
+				this.init();
+			}
+		},
+		mounted() {
+			// let provinceIndex = this.provinces.indexOf(this.province);
+			// this.citys = getMyCity(provinceIndex);
+			// let cityIndex = this.citys.indexOf(this.city);
+			// this.areas = getAreas(provinceIndex, cityIndex);
+			// let areaIndex = this.areas.indexOf(this.area);
+
+			// // 设置选择序列
+			// this.value = [provinceIndex, cityIndex, areaIndex];
+			// let areaCode = getAreasCode(provinceIndex, cityIndex, areaIndex);
+			
+			this.init();
+			
+			//console.log(areaCode)
+			//console.log("this.value = " + JSON.stringify(this.value));
+		},
+		methods: {
+			init() {
+				//console.log(this.area)
+				let provinceIndex = this.provinces.indexOf(this.province);
+				this.citys = getMyCity(provinceIndex);
+				let cityIndex = this.citys.indexOf(this.city);
+				this.areas = getAreas(provinceIndex, cityIndex);
+				let areaIndex = this.areas.indexOf(this.area);
+				
+				// 设置选择序列
+				this.value = [provinceIndex, cityIndex, areaIndex];
+				let areaCode = getAreasCode(provinceIndex, cityIndex, areaIndex);
+
+				this.address = this.province + this.city+ this.area;
+			},
+			handleNYZAreaChange: function(e) {
+				var that = this;
+				//console.log("e:" + JSON.stringify(e));
+				var value = e.detail.value;
+				/**
+				 * 滚动的是省
+				 * 省改变 市、区都不变
+				 */
+
+				if (index[0] != value[0]) {
+					index = [value[0], 0, 0];
+					let selectCitys = getMyCity(index[0]);
+					let selectAreas = getAreas(index[0], 0);
+					that.setData({
+						citys: selectCitys,
+						areas: selectAreas,
+						value: [index[0], 0, 0],
+
+					});
+
+					let areaCode = getAreasCode(index[0], index[1], index[2]);
+					that.address = provinces[index[0]]+ selectCitys[index[1]]+selectAreas[index[2]];
+					that.addressCode = areaCode;
+					that.$emit("changeClick", provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);
+
+				} else if (index[1] != value[1]) {
+					/**
+					 * 市改变了 省不变 区变
+					 */
+					index = [value[0], value[1], 0];
+					let selectCitys = getMyCity(index[0]);
+					let selectAreas = getAreas(index[0], value[1]);
+					that.setData({
+						citys: selectCitys,
+						areas: selectAreas,
+						value: [index[0], index[1], 0],
+
+					});
+
+					let areaCode = getAreasCode(index[0], index[1], index[2]);
+					that.address = provinces[index[0]]+selectCitys[index[1]]+ selectAreas[index[2]];
+					that.addressCode = areaCode;
+					that.$emit("changeClick", provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);
+				    console.log('uni==1==>', provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);
+
+				} else if (index[2] != value[2]) {
+					/**
+					 * 区改变了
+					 */
+					index = [value[0], value[1], value[2]];
+					let selectCitys = getMyCity(index[0]);
+					let selectAreas = getAreas(index[0], value[1]);
+					that.setData({
+						citys: selectCitys,
+						areas: selectAreas,
+						value: [index[0], index[1], index[2]],
+
+					});
+					
+					let areaCode = getAreasCode(index[0], index[1], index[2]);
+				    console.log('uni===2==>', provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);
+
+					that.$emit("changeClick", provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);
+				}
+			},
+
+			/**
+			 * 确定按钮的点击事件
+			 */
+			handleNYZAreaSelect: function(e) {
+				var myEventDetail = e; // detail对象,提供给事件监听函数
+				var myEventOption = {}; // 触发事件的选项
+				this.$emit('sureSelectArea', {
+					address: this.address,
+					addressCode: this.addressCode
+				}, myEventOption);
+
+				index = [0, 0, 0];
+			},
+
+			/**
+			 * 取消按钮的点击事件
+			 */
+			handleNYZAreaCancle: function(e) {
+				var that = this;
+				//console.log("e:" + JSON.stringify(e));
+				this.$emit('hideShow', {
+					detail: false
+				});
+				// 复原初始状态
+				index = [0, 0, 0];
+			}
+		}
+	};
+</script>
+<style scoped lang="scss">
+	.cc_area_view {
+		width: 100%;
+		position: fixed;
+		bottom: -1000px;
+		left: 0px;
+		background-color: #fff;
+		z-index: 21;
+		transition: all 0.3s;
+	}
+
+	.cc_area_pick_view {
+		height: 400px;
+		width: 100%;
+
+	}
+
+	.cc_area_colum_view {
+		line-height: 35px;
+		text-align: center;
+		font-size: 28upx;
+	}
+
+	.hide {
+		bottom: -1000upx;
+		transition: all 0.3s;
+	}
+
+	.show {
+		bottom: 0upx;
+		transition: all 0.3s;
+	}
+
+	.cc_area_view_btns {
+		background-color: #fff;
+		border-bottom: 1px solid #eeeeee;
+		font-size: 30upx;
+		padding: 18upx 0upx;
+	}
+
+	.cc_area_view_btns>text {
+		display: inline-block;
+		word-spacing: 4upx;
+		letter-spacing: 4upx;
+	}
+
+	.cc_area_view_btn_cancle {
+		color: #939393;
+		padding-right: 20upx;
+		padding-left: 25upx;
+	}
+
+	.cc_area_view_btn_sure {
+		float: right;
+		padding-left: 20upx;
+		padding-right: 25upx;
+	}
+
+	.cc_area_mask {
+		width: 100%;
+		height: 100vh;
+		background-color: rgba(28, 28, 28, 0.6);
+		position: absolute;
+		top: 0upx;
+		left: 0upx;
+		z-index: 20;
+	}
+</style>

+ 332 - 0
components/cc-selectDity/cc-selectDityBak.vue

@@ -0,0 +1,332 @@
+<template>
+	<view>
+		<!--自定义地址选择器-->
+		<view class="cc_area_mask" v-show="show == true"></view>
+		<view :class="'cc_area_view ' + (show ? 'show':'hide')">
+			<view class="cc_area_view_btns">
+				<text class="cc_area_view_btn_cancle" @tap="handleNYZAreaCancle">取消</text>
+				<text class="cc_area_view_btn_title" style="color: #393939;font-size: 32upx;">地区选择</text>
+				<text class="cc_area_view_btn_sure" @tap="handleNYZAreaSelect" :data-province="province"
+					:data-city="city" :data-area="area" style="color: #4284e5;">确定</text>
+			</view>
+			<picker-view class="cc_area_pick_view" indicator-style="height: 35px;" @change="handleNYZAreaChange"
+				:value="value">
+				<picker-view-column>
+					<view v-for="(item, index) in provinces" :key="index" class="cc_area_colum_view">{{item}}</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view v-for="(item, index) in citys" :key="index" class="cc_area_colum_view">{{item}}</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view v-for="(item, index) in areas" :key="index" class="cc_area_colum_view">{{item}}</view>
+				</picker-view-column>
+			</picker-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getProvinces,
+		getMyCity,
+		getAreas,
+		getAreasCode
+	} from "./area.js"
+
+	let index = [0, 0, 0];
+	let provinces = getProvinces();
+	let citys = getMyCity(index[0]);
+	let areas = getMyCity(index[0], index[1]);
+
+	export default {
+		mixins: [{
+			methods: {
+				setData: function(obj, callback) {
+					let that = this;
+					const handleData = (tepData, tepKey, afterKey) => {
+						tepKey = tepKey.split('.');
+						tepKey.forEach(item => {
+							if (tepData[item] === null || tepData[item] === undefined) {
+								let reg = /^[0-9]+$/;
+								tepData[item] = reg.test(afterKey) ? [] : {};
+								tepData = tepData[item];
+							} else {
+								tepData = tepData[item];
+							}
+						});
+						return tepData;
+					};
+					const isFn = function(value) {
+						return typeof value == 'function' || false;
+					};
+					Object.keys(obj).forEach(function(key) {
+						let val = obj[key];
+						key = key.replace(/\]/g, '').replace(/\[/g, '.');
+						let front, after;
+						let index_after = key.lastIndexOf('.');
+						if (index_after != -1) {
+							after = key.slice(index_after + 1);
+							front = handleData(that, key.slice(0, index_after), after);
+						} else {
+							after = key;
+							front = that;
+						}
+						if (front.$data && front.$data[after] === undefined) {
+							Object.defineProperty(front, after, {
+								get() {
+									return front.$data[after];
+								},
+								set(newValue) {
+									front.$data[after] = newValue;
+									that.$forceUpdate();
+								},
+								enumerable: true,
+								configurable: true
+							});
+
+							// #ifndef VUE3
+							that.$set(front, after, val);
+							// #endif
+
+							// #ifdef VUE3
+							Reflect.set(front, after, val);
+							// #endif
+
+						} else {
+
+							// #ifndef VUE3
+							that.$set(front, after, val);
+							// #endif
+
+							// #ifdef VUE3
+							Reflect.set(front, after, val);
+							// #endif
+						}
+					});
+					isFn(callback) && this.$nextTick(callback);
+				}
+			}
+		}],
+		data() {
+			return {
+				provinces: getProvinces(),
+				citys: getMyCity(index[0]),
+				areas: getAreas(index[0], index[1]),
+				value: [0, 0, 0]
+			};
+		},
+
+		components: {},
+		props: {
+			// 省
+			province: {
+				//控制area_select显示隐藏
+				type: String,
+				default: ''
+			},
+			// 市
+			city: {
+				//控制area_select显示隐藏
+				type: String,
+				default: ''
+			},
+			// 区
+			area: {
+				//控制area_select显示隐藏
+				type: String,
+				default: ''
+			},
+
+			show: {
+				//控制area_select显示隐藏
+				type: Boolean,
+				default: false
+			},
+			maskShow: {
+				//是否显示蒙层
+				type: Boolean,
+				default: true
+			}
+		},
+		watch: {
+			province() {
+				this.init();
+			},
+			city() {
+				this.init();
+			},
+			area() {
+				this.init();
+			}
+		},
+		mounted() {
+			let provinceIndex = this.provinces.indexOf(this.province);
+			this.citys = getMyCity(provinceIndex);
+			let cityIndex = this.citys.indexOf(this.city);
+			this.areas = getAreas(provinceIndex, cityIndex);
+			let areaIndex = this.areas.indexOf(this.area);
+
+			// 设置选择序列
+			this.value = [provinceIndex, cityIndex, areaIndex];
+			let areaCode = getAreasCode(provinceIndex, cityIndex, areaIndex);
+			//console.log(areaCode)
+			//console.log("this.value = " + JSON.stringify(this.value));
+		},
+		methods: {
+			init() {
+				//console.log(this.area)
+				let provinceIndex = this.provinces.indexOf(this.province);
+				this.citys = getMyCity(provinceIndex);
+				let cityIndex = this.citys.indexOf(this.city);
+				this.areas = getAreas(provinceIndex, cityIndex);
+				let areaIndex = this.areas.indexOf(this.area);
+
+				//获取地区编码
+				let areaCode = getAreasCode(provinceIndex, cityIndex, areaIndex);
+				// 设置选择序列
+				this.value = [provinceIndex, cityIndex, areaIndex];
+
+			},
+			handleNYZAreaChange: function(e) {
+				var that = this;
+				var value = e.detail.value;
+
+				// 更新 index
+				index = value;
+
+				// 获取对应的城市和区域数据
+				let selectCitys = getMyCity(index[0]);
+				let selectAreas = getAreas(index[0], index[1]);
+
+				// 触发 setData 更新数据
+				that.setData({
+					citys: selectCitys,
+					areas: selectAreas,
+					value: index
+				});
+
+				let areaCode = getAreasCode(index[0], index[1], index[2]);
+
+				// 触发事件
+				that.$emit("changeClick", provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]], areaCode);
+
+
+			},
+
+			/**
+			 * 确定按钮的点击事件
+			 */
+			handleNYZAreaSelect: function(e) {
+				var myEventDetail = e;
+				var myEventOption = {};
+				this.$emit('sureSelectArea', {
+					detail: myEventDetail
+				}, myEventOption);
+
+				// 复原初始状态
+				index = [0, 0, 0];
+			},
+
+			handleNYZAreaCancle: function(e) {
+				var that = this;
+
+				this.$emit('hideShow', {
+					detail: false
+				});
+
+				// 复原初始状态
+				index = [0, 0, 0];
+			}
+
+
+		},
+
+
+
+
+
+
+		/**
+		 * 取消按钮的点击事件
+		 */
+		handleNYZAreaCancle: function(e) {
+			var that = this;
+			//console.log("e:" + JSON.stringify(e));
+			this.$emit('hideShow', {
+				detail: false
+			});
+			// 复原初始状态
+			index = [0, 0, 0];
+		}
+	}
+</script>
+<style scoped lang="scss">
+	.cc_area_view {
+		width: 100%;
+		position: fixed;
+		bottom: -1000px;
+		left: 0px;
+		background-color: #fff;
+		z-index: 21;
+		transition: all 0.3s;
+	}
+
+	.cc_area_pick_view {
+		height: 400px;
+		width: 100%;
+
+	}
+
+	.cc_area_colum_view {
+		line-height: 35px;
+		text-align: center;
+		font-size: 28upx;
+	}
+
+	.hide {
+		bottom: -1000upx;
+		transition: all 0.3s;
+	}
+
+	.show {
+		bottom: 0upx;
+		transition: all 0.3s;
+	}
+
+	.cc_area_view_btns {
+		background-color: #fff;
+		border-bottom: 1px solid #eeeeee;
+		font-size: 30upx;
+		padding: 18upx 0upx;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.cc_area_view_btns>text {
+		display: inline-block;
+		word-spacing: 4upx;
+		letter-spacing: 4upx;
+	}
+
+	.cc_area_view_btn_cancle {
+		color: #939393;
+		padding-right: 20upx;
+		padding-left: 25upx;
+	}
+
+	.cc_area_view_btn_sure {
+		float: right;
+		padding-left: 20upx;
+		padding-right: 25upx;
+	}
+
+	.cc_area_mask {
+		width: 100%;
+		height: 100vh;
+		background-color: rgba(28, 28, 28, 0.6);
+		position: absolute;
+		top: 0upx;
+		left: 0upx;
+		z-index: 20;
+	}
+</style>

+ 58 - 14
components/cust-form/index.vue

@@ -4,7 +4,7 @@
             <view v-for="item in column" :key="item.key + 'cust-form'" class="cust-form-item">
                 <up-form-item v-if="item.type === 'input'" :label="item.label" :prop="item.key" borderBottom
                     labelWidth="94" :required="item.required">
-                   <up-input v-model="formData[item.key]" border="none" :placeholder="'请输入' + item.label"></up-input>
+                    <up-input v-model="formData[item.key]" border="none" :placeholder="'请输入' + item.label"></up-input>
                 </up-form-item>
 
                 <up-form-item v-if="item.type === 'select'" :label="item.label" :prop="item.key" borderBottom
@@ -48,7 +48,8 @@
 
                     </up-form-item>
                 </view>
-                <up-form-item v-if="item.type === 'textarea'" :label="item.label" :prop="item.key" labelWidth="94" :required="item.required">
+                <up-form-item v-if="item.type === 'textarea'" :label="item.label" :prop="item.key" labelWidth="94"
+                    :required="item.required">
                     <up-textarea :placeholder="'请输入' + item.label" v-model="formData[item.key]" count></up-textarea>
                 </up-form-item>
 
@@ -56,6 +57,17 @@
                     labelWidth="94" :required="item.required">
                     <up-button size="small" type="primary" text="前往人脸识别" @click="startFace"></up-button>
                 </up-form-item>
+
+                <up-form-item v-if="item.type === 'city'" :label="item.label" :prop="item.key" borderBottom
+                    labelWidth="94" :required="item.required">
+                    <view @click.self="() => openCity(item)">
+                        <up-input v-model="formData[item.key]" disabled disabledColor="#ffffff"
+                            :placeholder="'请选择' + item.label" border="none"></up-input>
+                    </view>
+                    <template #right>
+                        <up-icon name="arrow-right"></up-icon>
+                    </template>
+                </up-form-item>
             </view>
         </up-form>
         <!-- <up-button type="primary" text="提交" customStyle="margin-top: 50px" @click="onSubmit"></up-button> -->
@@ -66,10 +78,15 @@
 
         <up-code ref="uCode" @change="codeChange" seconds="20" @start="code_data.disabled = true"
             @end="code_data.disabled = false"></up-code>
+
+        <!-- 省市区选择 province city area初始省市区设置 show:是否显示  @changeClick:更改省市区事件 @sureSelectArea:确认事件 @hideShow:隐藏事件-->
+        <CcSelectDity :province="cityData.province" :city="cityData.city" :area="cityData.area" :show="cityShow"
+            @sureSelectArea="onsetCity" @cityShow="() => cityShow = false"></CcSelectDity>
     </view>
 </template>
 <script setup>
 import { onMounted, reactive, ref } from "vue";
+import CcSelectDity from '@/components/cc-selectDity/cc-selectDity.vue';
 
 const props = defineProps({
     column: {
@@ -99,6 +116,13 @@ const actions = ref({
     option: []
 });
 
+const cityData = reactive({
+    province: "广东省",
+    city: "广州市",
+    area: "天河区",
+})
+const cityShow = ref(false)
+
 const code_data = reactive({
     disabled: false,
     tips: ''
@@ -117,6 +141,22 @@ function openActionSheet(row) {
     actions.value = row
 }
 
+function openCity(row) {
+    console.log(row);
+    cityShow.value = true
+    actions.value = row
+}
+function onsetCity(e) {
+    console.log('onsetCity', e);
+    cityShow.value = false
+    Object.assign(formData, {
+        [actions.value.key]: e.address
+    })
+
+    console.log('formData', formData);
+
+}
+
 function ActionSheetSelect(e) {
     console.log('e', e);
     Object.assign(formData, {
@@ -150,9 +190,9 @@ function codeChange(text) {
     code_data.tips = text;
 }
 
-function startFace(){
-    console.log('startFace',formData);
-    
+function startFace() {
+    console.log('startFace', formData);
+
 }
 
 
@@ -162,10 +202,10 @@ function setData(data) {
 
 function onSubmit() {
     // 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true
-    return new Promise(async(resolve, reject) => {
+    return new Promise(async (resolve, reject) => {
 
         const res = await form_ref.value.validate();
-        if(!res){
+        if (!res) {
             reject()
             return
         }
@@ -176,16 +216,22 @@ function onResetField() {
     form_ref.value.resetFields()
     form_ref.value.clearValidate()
 }
-onMounted(()=>{
+
+function cityChange(e) {
+    console.log('e', e);
+
+}
+
+onMounted(() => {
     const rules = {};
     for (let i = 0; i < props.column.length; i++) {
-        rules[props.column[i].key] = props.column[i].rules 
+        rules[props.column[i].key] = props.column[i].rules
     }
     form_ref.value && form_ref.value.setRules(rules)
 
 
-    console.log('uni=====>',uni);
-    
+    console.log('uni=====>', uni);
+
 })
 defineExpose({
     setData,//修改表单数据值
@@ -200,6 +246,4 @@ defineExpose({
 // .required-icon {
 //     color: red;
 //     position: absolute;
-// }
-
-</style>
+// }</style>

+ 53 - 66
components/updata-imgs/index.vue

@@ -5,18 +5,24 @@
                     v-if="data.required">*</span> </view>
             <view class="updata-title-text font-text ">{{ data.text }}</view>
         </view>
-        <view class="updata-img-box" @click="updataFile">
+        <!-- <view class="updata-img-box" @click="updataFile">
             <image :src="img" style="width: 117px;height: 75px;" />
+        </view> -->
+        <view class="upload-box">
+            <view class="upload-img-item" v-for="(item, index) in fileList" :key="item.url">
+                <view class="delete-icon" @click="deletePic(index)"><up-icon name="close-circle-fill" color="#f64a1f"
+                        size="18"></up-icon></view>
+                <img class="upload-img" :src="item.url" :alt="item.fileName" srcset="">
+            </view>
+            <img src="/static/img/upload.png" alt="" class="upload-img" @click="uploadClick('img')"
+                v-if="fileList.length < 10">
         </view>
     </view>
 </template>
 
 <script setup>
-import { ref, toRaw } from 'vue';
-import { uploadFile } from '../../api/file';
-import { getToken } from '@/utils/auth'
-import config from '@/config'
-const baseUrl = config.baseUrl
+import { ref } from 'vue';
+import { wxUploadFile } from '@/utils/wxRequest.js'
 
 const props = defineProps({
     data: {
@@ -30,70 +36,26 @@ const props = defineProps({
 });
 const emit = defineEmits(['onSubmit']);
 
-const file = ref(null);
 
-const img = ref(props.data.img);
+const fileList = ref([]);
 
-function updataFile() {
-
-    wx.chooseMessageFile({
-        count: 1,
-        type: 'file',
-        success: (res) => {
-            {
-                const tempFilePath = res.tempFiles[0].path;  // 获取临时文件路径     
-                const fs = wx.getFileSystemManager();  // 获取文件系统管理器 
-
-                wx.uploadFile({
-                    url: baseUrl + '/common/upload',  // 服务器接口地址 
-                    filePath: tempFilePath,        // 本地文件路径(通过 wx.chooseImage  获取)
-                    name: 'file',                      // 文件对应的 key(服务器接收字段名)
-                    formData: {                        // 额外表单数据 
-                        file: res.tempFiles[0],
-                    },
-                    header: {
-                        'Authorization': 'Bearer ' + getToken(),   // 自定义请求头
-                    },
-                    success(res) {
-                        const data = JSON.parse(res.data);
-                        file.value = data.url;
-                        emit('onSubmit', { key: props.data.key, url: data.url })
-                        fs.readFile({
-                            filePath: tempFilePath,
-                            encoding: 'base64', // 指定编码格式 
-                            success: (fileRes) => {
-                                const base64Data = 'data:image/png;base64,' + fileRes.data;  // 拼接 Base64 前缀 
-                                img.value = base64Data;
-                                uni.showToast({
-                                    title: '上传成功',
-                                    icon: 'none'
-                                })
-                            },
-                            fail: (err) => {
-                                uni.showToast({
-                                    title: '上传失败',
-                                    icon: 'none'
-                                })
-                                console.error(' 转换失败:', err);
-                            }
-                        });
-                    },
-                    fail(error) {
-                        console.log(' 上传失败', error);
-                        uni.showToast({
-                            title: '上传失败',
-                            icon: 'none'
-                        })
-                    }
-                });
-
-            }
-        }
-    });
+// 删除图片
+const deletePic = (index) => {
+    fileList.value.splice(index, 1);
+    getFile();
+};
+const uploadClick = async (type) => {
+    const res = await wxUploadFile(type);
+    fileList.value = [...fileList.value, ...res];
+    getFile();
+    console.log('xxxxres', res, fileList.value);
 }
 
 function getFile() {
-    return toRaw(file.value);
+    const img_urls = fileList.value.map(item => item.url).join(',');
+    console.log('img_urls',img_urls);
+    emit('onSubmit', { key: props.data.key, url: img_urls })
+    return img_urls
 }
 defineExpose({
     getFile,
@@ -104,18 +66,43 @@ defineExpose({
 .updata-img {
     border-radius: 8px;
     background: rgba(255, 255, 255, 1);
-    height: 100px;
+    // height: 100px;
     padding: 16px;
 
     display: flex;
     align-content: center;
     justify-content: space-between;
+    flex-direction: column;
 
     .updata-title-box {
         display: flex;
         align-content: center;
         flex-direction: column;
         justify-content: space-evenly;
+        margin-bottom: 12px;
+    }
+}
+
+.upload-img {
+    height: 68px;
+    width: 68px;
+    margin-right: 12px;
+    margin-bottom: 12px;
+}
+
+.upload-box {
+    display: flex;
+    flex-wrap: wrap;
+
+    .upload-img-item {
+        position: relative;
+
+        .delete-icon {
+            position: absolute;
+            top: -7px;
+            right: 7px;
+            z-index: 1;
+        }
     }
 }
 </style>

+ 6 - 14
pages.json

@@ -74,13 +74,6 @@
 				"navigationBarTitleText": "详情"
 			}
 		},      
-		{
-			"path" : "pages/register/register",
-			"style" : 
-			{
-				"navigationBarTitleText" : "注册"
-			}
-		},
 		{
 			"path" : "pages/myCenter/wallet",
 			"style" : 
@@ -166,6 +159,12 @@
 					"style": {
 						"navigationBarTitleText": "家庭辅导"
 					}
+				},
+				{
+					"path": "register/index",
+					"style": {
+						"navigationBarTitleText": "注册"
+					}
 				}
 			]
 		},
@@ -325,13 +324,6 @@
 		{
 			"root": "pages_classify/pages",
 			"pages": [
-				{
-					"path": "test/index",
-					"style": {
-						"navigationBarTitleText": "test",
-						"navigationStyle": "custom"
-					}
-				},
 				{
 					"path": "handle/index",
 					"style": {

+ 14 - 103
pages/Client/new_file.vue

@@ -77,82 +77,6 @@
 
 
 
-<<<<<<< HEAD
-	// 普通用户
-	const serviceList1 = ref([{
-			icon: '/static/img/统一知识平台-营运@1x.png',
-			name: '家庭辅导',
-			key:1,
-		},
-		{
-			icon: '/static/img/编组.png',
-			name: '陪伴陪聊',
-			key:2,
-		},
-		{
-			icon: '/static/img/清空.png',
-			name: '家庭助理',
-			key:3,
-		},
-		{
-			icon: '/static/img/构建.png',
-			name: '健康管理',
-			key:4,
-		},
-		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '家庭清洁',
-			key:5,
-		},
-		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '家务帮手',
-			key:6,
-		},
-		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '资讯与服务',
-			key:7,
-		},
-	]);
-	//志愿者
-	const serviceList2 = ref([{
-			icon: '/static/img/统一知识平台-营运@1x.png',
-			name: '家庭辅导注册',
-			key: 2,
-		},
-		{
-			icon: '/static/img/编组.png',
-			name: '陪伴陪聊注册',
-			key: 1,
-		},
-		{
-			icon: '/static/img/清空.png',
-			name: '家庭助理注册',
-			key: 3,
-		},
-		{
-			icon: '/static/img/构建.png',
-			name: '健康管理注册',
-			key: 4
-		},
-		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '家庭清洁注册',
-			key: 5
-		},
-		{
-			icon: '/static/img/报事报修@6x.png',
-			name: '家务帮手注册',
-			key: 6
-		},
-		{
-			icon: '/static/img/清空.png',
-			name: '排班管理',
-			key: 7
-		},
-	]);
-=======
 	 // 普通用户
 	 const serviceList1 = ref([
 		 {
@@ -227,34 +151,21 @@
 // 宫格点击事件
 const handleGridClick = async (index) => {
 	console.log('userType', userType);
->>>>>>> 6a69d097892340385fbc618905c82a243470622e
-
 
-	// 宫格点击事件
-	const handleGridClick = async (index) => {
-		 const service = serviceList1.value[index]; // 获取点击的服务条目
-		// 用户
-		if (userType == 1) {
-			// 只有第一条和第二条可以跳转
-			if (index === 0 || index === 1) {
-				uni.navigateTo({
-					url: `/pages_home/pages/client/details?name=${encodeURIComponent(service.name)}`
-				});
-			} else {
-				// 其他条目提示“敬请期待”
-				uni.showToast({
-					title: '敬请期待',
-					icon: 'none'
-				});
-			}
-		}
-		// 志愿者
-		if (userType == 2 && uToastRef.value) {
-			const data = serviceList2.value[index]
-			if (data.key !== 7) {
-				data.key === 1 || data.key === 2 ? uni.navigateTo({
-					url: `/pages/register/register?data=${encodeURIComponent(JSON.stringify(data))}`
-				}) : uni.showToast({
+	if (userType == 1) {
+		const res = await typeOptionSelect()
+		console.log((res, '获取健值成功'))
+		uni.navigateTo({
+			url: '/pages_home/pages/client/details'
+		});
+		return
+	}
+	if (uToastRef.value) {
+		const data = serviceList2.value[index]
+		if (data.key !== 7 ) {
+			data.key === 1 || data.key === 2 ? uni.navigateTo({
+				url: `/pages_home/pages/register/index?data=${encodeURIComponent(JSON.stringify(data))}`
+			}): uni.showToast({
 					title: '敬请期待',
 					icon: 'none'
 				})

+ 340 - 344
pages/mine.vue

@@ -81,398 +81,394 @@
 </template>
 
 <script setup>
-	import {
-		onMounted,
-		ref
-	} from 'vue';
-	import {
-		getVolunteerAccount
-	} from '@/api/volunteer.js'
-	const userType = uni.getStorageSync('userType') //读取本地存储
-
-	// 用户/志愿者 识别标识
-	const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
-
-
-
-	const serviceList = ref(
-		[{
-				name: '待服务',
-				iconName: 'clock',
-				page: '/pages/classify',
-				value: 1
-			},
-			{
-				name: '进行中',
-				iconName: 'car',
-				page: '/pages/classify',
-				value: 2
-			},
-			{
-				name: '已完成',
-				iconName: 'car-fill',
-				page: '/pages/classify',
-				value: 3
-			},
-			{
-				name: '差评申述',
-				iconName: 'edit-pen',
-				page: '/pages/myCenter/bad'
-			},
-			{
-				name: '钱包',
-				iconName: 'rmb-circle',
-				page: '/pages/myCenter/wallet'
-			},
-			{
-				name: '帮助与客服',
-				iconName: 'kefu-ermai',
-			},
-		]);
-
-
-
-
-	const serviceList2 = ref([{
-			name: '待服务',
-			iconName: 'clock',
-			page: '/pages/classify',
-			value: 1
-		},
-
-		{
-			name: '进行中',
-			iconName: 'car',
-			page: '/pages/classify',
-			value: 2
-		},
-		{
-			name: '已完成',
-			iconName: 'car-fill',
-			page: '/pages/classify',
-			value: 3
-		},
-		{
-			name: '评论',
-			iconName: 'edit-pen',
-			// page: '/pages/myCenter/bad'
-		},
-		{
-			name: '钱包',
-			iconName: 'rmb-circle',
-			page: '/pages/myCenter/withdrawal'
-		},
-		{
-			name: '帮助与客服',
-			iconName: 'kefu-ermai',
-		},
-		{
-			name: '浏览记录',
-			iconName: 'eye',
-			page: '/pages/myCenter/withdrawal'
-		},
-		{
-			name: '收藏',
-			iconName: 'star',
-		},
+import {
+	onMounted,
+	ref
+} from 'vue';
+import {
+	getVolunteerAccount
+} from '@/api/volunteer.js'
+const userType = uni.getStorageSync('userType') //读取本地存储
+
+// 用户/志愿者 识别标识
+const userOrWorker = uni.getStorageSync('storage_data').vuex_userOrWorker //读取本地存储
+
+
+
+const serviceList = ref(
+	[{
+		name: '待服务',
+		iconName: 'clock',
+		page: '/pages/classify',
+		value: 1
+	},
+	{
+		name: '进行中',
+		iconName: 'car',
+		page: '/pages/classify',
+		value: 2
+	},
+	{
+		name: '已完成',
+		iconName: 'car-fill',
+		page: '/pages/classify',
+		value: 3
+	},
+	{
+		name: '差评申述',
+		iconName: 'edit-pen',
+		page: '/pages/myCenter/bad'
+	},
+	{
+		name: '钱包',
+		iconName: 'rmb-circle',
+		page: '/pages/myCenter/wallet'
+	},
+	{
+		name: '帮助与客服',
+		iconName: 'kefu-ermai',
+	},
 	]);
 
-	const priceList = [{
-			name: '余额',
-			key: 'balance',
-			decimals: 2
-		},
-		{
-			name: '订单总数',
-			key: 'orderCount',
-			decimals: 0
-		}
-	]
-
-
-	
-	const orderList = ref([{
-			name: '预约单',
-			key: 'orderCount'
-		},
-
-		{
-			name: '进行单',
-			key: 'orderCount'
 
-		},
-		{
-			name: '完成单',
-			key: 'orderCount'
 
-		},
-		{
-			name: '取消单',
-			key: 'orderCount'
 
-		}
-	]);
-
-	const avatarSrc = ref('/static/my/客服.png');
-	const data = ref({
-		balance: 0.0,
-		orderCount: 0,
-	});
-	const rateValue = ref(3);
-	const onClick = (record) => {
-		console.log('record', record, record.page);
-		if (record.page && record.value) {
-			const app = getApp();
-			app.globalData.switchTabParams = {
-				tabKey: record.value
-			};
-			// JS跳转 
-			uni.switchTab({
-				url: record.page
-			});
-			return;
-		}
-		if (record.page) {
-			uni.navigateTo({
-				url: record.page
-			});
-		}
+const serviceList2 = ref([{
+	name: '待服务',
+	iconName: 'clock',
+	page: '/pages/classify',
+	value: 1
+},
+
+{
+	name: '进行中',
+	iconName: 'car',
+	page: '/pages/classify',
+	value: 2
+},
+{
+	name: '已完成',
+	iconName: 'car-fill',
+	page: '/pages/classify',
+	value: 3
+},
+{
+	name: '评论',
+	iconName: 'edit-pen',
+	// page: '/pages/myCenter/bad'
+},
+{
+	name: '钱包',
+	iconName: 'rmb-circle',
+	page: '/pages/myCenter/withdrawal'
+},
+{
+	name: '帮助与客服',
+	iconName: 'kefu-ermai',
+},
+{
+	name: '浏览记录',
+	iconName: 'eye',
+	page: '/pages/myCenter/withdrawal'
+},
+{
+	name: '收藏',
+	iconName: 'star',
+},
+]);
+
+const priceList = [{
+	name: '余额',
+	key: 'balance',
+	decimals: 2
+},
+{
+	name: '订单总数',
+	key: 'orderCount',
+	decimals: 0
+}
+]
+
+
+
+const orderList = ref([{
+	name: '预约单',
+	key: 'orderCount'
+},
+
+{
+	name: '进行单',
+	key: 'orderCount'
+
+},
+{
+	name: '完成单',
+	key: 'orderCount'
+
+},
+{
+	name: '取消单',
+	key: 'orderCount'
+
+}
+]);
+
+const avatarSrc = ref('/static/my/客服.png');
+const data = ref({
+	balance: 0.0,
+	orderCount: 0,
+});
+const rateValue = ref(3);
+const onClick = (record) => {
+	console.log('record', record, record.page);
+	if (record.page && record.value) {
+		const app = getApp();
+		app.globalData.switchTabParams = {
+			tabKey: record.value
+		};
+		// JS跳转 
+		uni.switchTab({
+			url: record.page
+		});
+		return;
+	}
+	if (record.page) {
+		uni.navigateTo({
+			url: record.page
+		});
 	}
+}
 
-	const getDetails = async () => {
-		try {
-			// const res = await getVolunteerAccount();
-			// console.log('res',res);
+const getDetails = async () => {
+	try {
+		// const res = await getVolunteerAccount();
+		// console.log('res',res);
 
-		} catch (error) {
-			console.log('error', error);
+	} catch (error) {
+		console.log('error', error);
 
-		}
 	}
+}
 </script>
 
 <style lang="scss" scoped>
-	.mine-card {
-		border-radius: 8px;
-		background: rgba(255, 255, 255, 1);
-		padding: 12px;
-		margin-bottom: 12px;
+.mine-card {
+	border-radius: 8px;
+	background: rgba(255, 255, 255, 1);
+	padding: 12px;
+	margin-bottom: 12px;
+}
+
+.mine-container {
+	position: fixed;
+	top: 0px;
+	left: 0px;
+	right: 0px;
+	bottom: 0px;
+	background: rgba(245, 245, 245, 1);
+
+	.mine-top-bgc {
+		height: 120px;
+		background: linear-gradient(180deg, rgba(255, 219, 171, 1) 0%, rgba(242, 151, 99, 1) 100%);
+
 	}
 
-	.mine-container {
-		position: fixed;
-		top: 0px;
-		left: 0px;
-		right: 0px;
+	.mine-box {
+		position: absolute;
+		top: 40px;
+		left: 12px;
+		right: 12px;
 		bottom: 0px;
-		background: rgba(245, 245, 245, 1);
+		overflow-y: auto;
 
-		.mine-top-bgc {
-			height: 120px;
-			background: linear-gradient(180deg, rgba(255, 219, 171, 1) 0%, rgba(242, 151, 99, 1) 100%);
 
+		.mine-user {
+			border-radius: 8px;
+			background: rgba(255, 255, 255, 1);
+			margin-bottom: 12px;
+
+			.user-name-box {
+				display: flex;
+				align-items: center;
+				padding: 12px 12px 0;
+
+				.user-avatar {}
+
+				.user-name {
+					font-size: 18px;
+					font-weight: 700;
+					line-height: 21.09px;
+					color: rgba(51, 51, 51, 1);
+					margin-left: 12px;
+				}
+			}
 		}
+	}
 
-		.mine-box {
-			position: absolute;
-			top: 40px;
-			left: 12px;
-			right: 12px;
-			bottom: 0px;
-			overflow-y: auto;
+	.service-img {
+		width: 60rpx;
+		height: 60rpx;
+		margin-bottom: 10rpx;
+	}
 
+	.service-list {
+		padding-bottom: 12px;
+	}
 
-			.mine-user {
-				border-radius: 8px;
-				background: rgba(255, 255, 255, 1);
-				margin-bottom: 12px;
+	.grid-text {
+		font-size: 14px;
+		color: #909399;
+		padding: 10rpx 0 20rpx 0rpx;
+		/* #ifndef APP-PLUS */
+		box-sizing: border-box;
+		/* #endif */
+	}
 
-				.user-name-box {
-					display: flex;
-					align-items: center;
-					padding: 12px 12px 0;
 
-					.user-avatar {}
+	.grid-box {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		flex-direction: column;
+		position: relative;
 
-					.user-name {
-						font-size: 18px;
-						font-weight: 700;
-						line-height: 21.09px;
-						color: rgba(51, 51, 51, 1);
-						margin-left: 12px;
-					}
-				}
-			}
+		.item-badge {
+			position: absolute;
 		}
+	}
 
-		<<<<<<< HEAD .service-img {
-			width: 60rpx;
-			height: 60rpx;
-			margin-bottom: 10rpx;
-
-			=======.service-img {
-				width: 60rpx;
-				height: 60rpx;
-				margin-bottom: 10rpx;
+	.price-box {
+		display: flex;
+		align-content: center;
+		justify-content: space-between;
+		// padding: 12px;
+
+		.price-item {
+			width: 50%;
+			padding: 12px;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+
+			.price-name {
+				font-size: 16px;
+				font-weight: 700;
+				line-height: 23.17px;
+				color: rgba(51, 51, 51, 1);
+				margin-bottom: 12px;
 			}
 
-			.service-list {
-				padding-bottom: 12px;
+			.price-data {
+				font-size: 20px;
+				font-weight: 700;
+				line-height: 23.44px;
+				color: rgba(51, 51, 51, 1);
 			}
 
-			.grid-text {
-				font-size: 14px;
-				color: #909399;
-				padding: 10rpx 0 20rpx 0rpx;
-				/* #ifndef APP-PLUS */
-				box-sizing: border-box;
-				/* #endif */
+			.grid-min-price {
+				font-size: 12px;
+				font-weight: 500;
+				line-height: 17.38px;
+				color: rgba(153, 153, 153, 1);
+				margin-top: 4px;
 			}
 
 
-			.grid-box {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				flex-direction: column;
-				position: relative;
+		}
 
-				.item-badge {
-					position: absolute;
-				}
+		.service-list {
+			padding-bottom: 12px;
+		}
+
+		.grid-text {
+			font-size: 14px;
+			color: #909399;
+			padding: 10rpx 0 20rpx 0rpx;
+			/* #ifndef APP-PLUS */
+			box-sizing: border-box;
+			/* #endif */
+		}
+
+		.grid-box {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			position: relative;
+
+			.item-badge {
+				position: absolute;
 			}
+		}
 
-			.price-box {
-				display: flex;
-				align-content: center;
-				justify-content: space-between;
-				// padding: 12px;
-
-				.price-item {
-					width: 50%;
-					padding: 12px;
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-					justify-content: center;
-
-					.price-name {
-						font-size: 16px;
-						font-weight: 700;
-						line-height: 23.17px;
-						color: rgba(51, 51, 51, 1);
-						margin-bottom: 12px;
-					}
-
-					.price-data {
-						font-size: 20px;
-						font-weight: 700;
-						line-height: 23.44px;
-						color: rgba(51, 51, 51, 1);
-					}
-
-					.grid-min-price {
-						font-size: 12px;
-						font-weight: 500;
-						line-height: 17.38px;
-						color: rgba(153, 153, 153, 1);
-						margin-top: 4px;
-					}
-
-					>>>>>>>6a69d097892340385fbc618905c82a243470622e
+		.price-box {
+			display: flex;
+			align-content: center;
+			justify-content: space-between;
+			// padding: 12px;
+
+			.price-item {
+				width: 50%;
+				padding: 12px;
+
+				.price-name {
+					font-size: 16px;
+					font-weight: 700;
+					line-height: 23.17px;
+					color: rgba(51, 51, 51, 1);
+					margin-bottom: 12px;
 				}
 
-				.service-list {
-					padding-bottom: 12px;
+				.price-data {
+					font-size: 20px;
+					font-weight: 700;
+					line-height: 23.44px;
+					color: rgba(51, 51, 51, 1);
 				}
+			}
 
-				.grid-text {
-					font-size: 14px;
-					color: #909399;
-					padding: 10rpx 0 20rpx 0rpx;
-					/* #ifndef APP-PLUS */
-					box-sizing: border-box;
-					/* #endif */
-				}
+			.price-item:first-child {
+				border-right: 1px solid #dcdfe6;
+
+			}
 
-				.grid-box {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					flex-direction: column;
-					position: relative;
+		}
 
-					.item-badge {
-						position: absolute;
-					}
-				}
 
-				.price-box {
-					display: flex;
-					align-content: center;
-					justify-content: space-between;
-					// padding: 12px;
-
-					.price-item {
-						width: 50%;
-						padding: 12px;
-
-						.price-name {
-							font-size: 16px;
-							font-weight: 700;
-							line-height: 23.17px;
-							color: rgba(51, 51, 51, 1);
-							margin-bottom: 12px;
-						}
-
-						.price-data {
-							font-size: 20px;
-							font-weight: 700;
-							line-height: 23.44px;
-							color: rgba(51, 51, 51, 1);
-						}
-					}
-
-					.price-item:first-child {
-						border-right: 1px solid #dcdfe6;
-
-					}
+		.rate-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
 
-				}
+			.rate-left {
+				font-size: 14px;
+				font-weight: 500;
+				letter-spacing: 0px;
+				line-height: 20.27px;
+				color: rgba(0, 0, 0, 1);
 
+				display: flex;
+				align-items: center;
+				justify-content: left;
 
-				.rate-box {
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-
-					.rate-left {
-						font-size: 14px;
-						font-weight: 500;
-						letter-spacing: 0px;
-						line-height: 20.27px;
-						color: rgba(0, 0, 0, 1);
-
-						display: flex;
-						align-items: center;
-						justify-content: left;
-
-						flex: 1;
-					}
-
-					.rate-rigth {
-						font-size: 14px;
-						font-weight: 500;
-						letter-spacing: 0px;
-						line-height: 20.27px;
-						color: rgba(0, 0, 0, 1);
-
-						.rate-count {
-							color: rgba(237, 123, 47, 1);
-						}
-					}
-				}
+				flex: 1;
+			}
 
+			.rate-rigth {
+				font-size: 14px;
+				font-weight: 500;
+				letter-spacing: 0px;
+				line-height: 20.27px;
+				color: rgba(0, 0, 0, 1);
 
+				.rate-count {
+					color: rgba(237, 123, 47, 1);
+				}
 			}
+		}
+
+
+	}
+}
 </style>

+ 2 - 2
pages_home/pages/client/details.vue

@@ -41,7 +41,7 @@
 							</view>
 							<view class="demo-PriceDome">
 								<view class="demo-price">
-									<image src="../../static/用户.png" class="name-image"></image>
+									<image src="/static/用户.png" class="name-image"></image>
 									{{item.name}}
 								</view>
 								<view class="dome-Like">
@@ -62,7 +62,7 @@
 							</view>
 							<view class="demo-PriceDome">
 								<view class="demo-price">
-									<image src="../../static/用户.png" class="name-image"></image>
+									<image src="/static/用户.png" class="name-image"></image>
 									{{item.name}}
 								</view>
 								<view class="dome-Like">

+ 1 - 1
pages/register/data.js

@@ -141,7 +141,7 @@ const education = [
     {
         label: "地区",
         key: "city",
-        type: "select",
+        type: "city",
         option: city_option,
         rules: rules.city
 

+ 19 - 22
pages/register/register.vue

@@ -5,13 +5,11 @@
 			<CustForm :column="com_column" ref="cust_form_ref" />
 		</view>
 		<view class="updata-imgs">
-			
+
 		</view>
-		<!-- <UpdataImgs :data="updata_list[0]" ref="userImg" v-if="updata_list[0].permission.includes(data.key)" />
-		<UpdataImgs :data="updata_list[1]" ref="zsImg" v-if="updata_list[1].permission.includes(data.key)" /> -->
 
 		<view v-for="item in updata_list" :key="item.key" class="updata-imgs">
-			<UpdataImgs :data="item" ref="zsImg" v-if="item.permission.includes(data.key)" @onSubmit="onChange"/>
+			<UpdataImgs :data="item" ref="zsImg" v-if="item.permission.includes(data.key)" @onSubmit="onChange" />
 		</view>
 
 		<up-button type="primary" text="确定" @click="onSubmit"></up-button>
@@ -22,11 +20,11 @@
 <script setup>
 import { ref, reactive } from 'vue';
 import { onLoad } from '@dcloudio/uni-app';
-import FontTitle from "../../components/font-title/index.vue";
-import CustForm from "../../components/cust-form/index";
-import UpdataImgs from "../../components/updata-imgs/index.vue";
+import FontTitle from "@/components/font-title/index.vue";
+import CustForm from "@/components/cust-form/index";
+import UpdataImgs from "@/components/updata-imgs/index.vue";
 import { chatting, education, clean } from "./data";
-import { add } from "../../api/volunteer";
+import { add } from "@/api/volunteer";
 import { computed } from 'vue';
 
 
@@ -59,7 +57,7 @@ const updata_list = [
 		img: '/static/img/updata-user-img.png',
 		key: 'certificationPicture',
 		ref: zsImg,
-		permission: [1],
+		permission: [1, 2],
 		required: false
 	}
 ]
@@ -68,7 +66,7 @@ const cust_form_ref = ref(null);
 
 const data = ref(null);
 
-const file_url=reactive({});
+const file_url = reactive({});
 
 
 const sex_status = {
@@ -89,18 +87,17 @@ const com_column = computed(() => {
 function onSubmit() {
 	try {
 		// 校验表单并获取数据
-		// const res = await ;
 		cust_form_ref.value.onSubmit().then(async (res) => {
-			console.log('===res===>', res,file_url);
+			console.log('===res===>', res, file_url);
 
 			//文件必传校验
 			for (let i = 0; i < updata_list.length; i++) {
 				const element = updata_list[i];
-				console.log(element.required , element.permission.includes(data.value.key) , file_url[element.key]);
-				
-				
+				console.log(element.required, element.permission.includes(data.value.key), file_url[element.key]);
+
+
 				const type = element.required && element.permission.includes(data.value.key) && !file_url[element.key];
-				console.log('element',element,type);
+				console.log('element', element, type);
 
 				if (type) {
 					uni.showToast({
@@ -119,12 +116,12 @@ function onSubmit() {
 				parmas[key] = key == 'sex' ? sex_status[res[key]] : res[key];
 			}
 
-			console.log('提交',parmas);
+			console.log('提交', parmas);
 
 			// return;
 			// 提交接口,注册人员
 			const submit_res = await add(parmas);
-			if(submit_res.code == 200){
+			if (submit_res.code == 200) {
 				uni.showToast({
 					title: '注册成功',
 					icon: 'none'
@@ -149,10 +146,10 @@ function onSubmit() {
 
 }
 
-function onChange({key,url}) {
-	console.log('onChange', key,url);
-	Object.assign(file_url,{
-		[key]:url
+function onChange({ key, url }) {
+	console.log('onChange', key, url);
+	Object.assign(file_url, {
+		[key]: url
 	})
 }