فهرست منبع

订单列表对接

学习?学个屁 2 روز پیش
والد
کامیت
63464157be

+ 36 - 27
src/components/sunui-upimg/sunui-upimg.vue

@@ -2,15 +2,20 @@
 	<view class="sunui-uploader-bd">
 		<view class="sunui-uploader-files">
 			<block v-for="(item, index) in upload_before_list" :key="index">
-				<view class="sunui-uploader-file" :class="[item.upload_percent < 100 ? 'sunui-uploader-file-status' : '']" @click="previewImage(index)">
+				<view class="sunui-uploader-file"
+					:class="[item.upload_percent < 100 ? 'sunui-uploader-file-status' : '']"
+					@click="previewImage(index)">
 					<!-- step1.这里修改服务器返回字段 !!! -->
 					<image class="sunui-uploader-img" :style="upload_img_wh" :src="item.path" mode="aspectFill" />
-					<view class="sunui-img-removeicon right" @click.stop="removeImage(index)" v-show="upimg_move">×</view>
-					<view class="sunui-loader-filecontent" v-if="item.upload_percent < 100">{{ item.upload_percent }}%</view>
+					<view class="sunui-img-removeicon right" @click.stop="removeImage(index)" v-show="upimg_move">×
+					</view>
+					<view class="sunui-loader-filecontent" v-if="item.upload_percent < 100">{{ item.upload_percent }}%
+					</view>
 				</view>
 			</block>
-			<view v-show="upload_len < upload_count" hover-class="sunui-uploader-hover" class="sunui-uploader-inputbox" @click="chooseImage" :style="upload_img_wh">
-				<view><text class="iconfont icon-mn_shangchuantupian" style="color: #b9b9b9;"></text></view>	
+			<view v-show="upload_len < upload_count" hover-class="sunui-uploader-hover" class="sunui-uploader-inputbox"
+				@click="chooseImage" :style="upload_img_wh">
+				<view><text class="iconfont icon-mn_shangchuantupian" style="color: #b9b9b9;"></text></view>
 			</view>
 		</view>
 	</view>
@@ -31,7 +36,7 @@ export default {
 		// 服务器url
 		url: {
 			type: String,
-			default: 'https://a3.dns06.net.cn/app/index.php?i=2&c=entry&a=wxapp&do=Upload_qiniu_b&m=jzwx_a'
+			default: 'http://192.168.0.11:8080/jeecg-boot/sys/common/upload'
 		},
 		// 上传样式宽高
 		upload_img_wh: {
@@ -79,6 +84,7 @@ export default {
 			this.upload_before_list = this.upload_before_list.concat(this.upimg_preview);
 			this.upload_len = this.upload_before_list.length;
 			this.upimg_preview.map(item => {
+				console.log(item,'step2');
 				// step2.这里修改服务器返回字段 !!!
 				this.upload_cache_list.push(item.path);
 			});
@@ -86,9 +92,9 @@ export default {
 		}, this.upimg_delaytime);
 	},
 	methods: {
-		upImage(paths,header) {
+		upImage(paths, header) {
 			let _self = this;
-			const promises = paths.map(function(path) {
+			const promises = paths.map(function (path) {
 				return promisify(upload)({
 					url: _self.url,
 					path: path,
@@ -103,12 +109,12 @@ export default {
 			});
 
 			Promise.all(promises)
-				.then(function(data) {
+				.then(function (data) {
 					uni.hideLoading();
 					_self.upload_cache_list.push(...data);
 					_self.emit();
 				})
-				.catch(function(res) {
+				.catch(function (res) {
 					uni.hideLoading();
 				});
 		},
@@ -118,7 +124,7 @@ export default {
 				count: _self.upload_count - _self.upload_before_list.length,
 				sizeType: ['compressed', 'original'],
 				sourceType: ['album', 'camera'],
-				success: function(res) {
+				success: function (res) {
 					for (let i = 0, len = res.tempFiles.length; i < len; i++) {
 						res.tempFiles[i]['upload_percent'] = 0;
 						_self.upload_before_list.push(res.tempFiles[i]);
@@ -126,14 +132,14 @@ export default {
 					_self.upload_cache = res.tempFilePaths;
 					_self.upload(_self.upload_auto);
 				},
-				fail: function(err) {
+				fail: function (err) {
 					console.log(err);
 				}
 			});
 		},
 		async upload(upload_auto) {
 			let _self = this;
-			upload_auto ? await _self.upImage(_self.upload_cache,_self.header) : console.warn(`传输参数:this.$refs.xx.upload(true)才可上传,默认false`);
+			upload_auto ? await _self.upImage(_self.upload_cache, _self.header) : console.warn(`传输参数:this.$refs.xx.upload(true)才可上传,默认false`);
 		},
 		previewImage(idx) {
 			let _self = this;
@@ -162,8 +168,8 @@ export default {
 };
 
 const promisify = api => {
-	return function(options, ...params) {
-		return new Promise(function(resolve, reject) {
+	return function (options, ...params) {
+		return new Promise(function (resolve, reject) {
 			api(
 				Object.assign({}, options, {
 					success: resolve,
@@ -175,7 +181,7 @@ const promisify = api => {
 	};
 };
 
-const upload = function(options) {
+const upload = function (options) {
 	let url = options.url,
 		_self = options._self,
 		path = options.path,
@@ -183,20 +189,22 @@ const upload = function(options) {
 		// data = options.data,
 		extra = options.extra,
 		success = options.success,
-		progress = options.progress,
+		progress = options.message,
 		fail = options.fail;
 
 	const uploadTask = uni.uploadFile({
 		url: url,
 		filePath: path,
 		name: name,
-		formData: extra,
-		success: function(res) {
+		formData: {}, 
+		header: extra, 
+		success: function (res) {
 			var data = res.data;
 			console.warn('sunui-upimg - 如发现没有获取到返回值请到源码191行修改后端返回图片路径以便正常使用插件', JSON.parse(data));
 			try {
 				//Tip : 切记->主要修改这里图片的返回值为真实返回路径!!! 详情见示例
-				data = JSON.parse(res.data).info;
+				data = JSON.parse(res.data).message;
+				console.log('上传成功1', data);
 			} catch (e) {
 				throw (e, data);
 			}
@@ -211,14 +219,14 @@ const upload = function(options) {
 				}
 			}
 		},
-		fail: function(res) {
+		fail: function (res) {
 			console.log(res);
 			if (fail) {
 				fail(res);
 			}
 		}
 	});
-	uploadTask.onProgressUpdate(async function(res) {
+	uploadTask.onProgressUpdate(async function (res) {
 		for (let i = 0, len = _self.upload_before_list.length; i < len; i++) {
 			_self.upload_before_list[i]['upload_percent'] = await res.progress;
 		}
@@ -235,10 +243,10 @@ const upload = function(options) {
 	/* IE9 */
 	src: url('//at.alicdn.com/iconfont.eot?t=1574391686418#iefix') format('embedded-opentype'),
 		/* IE6-IE8 */
-			url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMkAAsAAAAAB2QAAALYAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAqCYIJEATYCJAMICwYABCAFhG0HPRt3BhEVlCNkH4dxmzUXNsJHc1SNfR9KTkCtiXv/l+QDBQSFRBJdKoEsg60HUgCsOpWVnWxNx3BvVITqkj3fepbtzM/OfDo4D86iFEIiJAeX02+Bh/O84TLmsrEnYBxQoHtgm6xACoxTkN0zFsgEdQynCShpq7cwbsK0eTKROSkgbNu8cbUspRFrkoNMkC9ZGYWjcrJkX/IIR/zPhz/6hIxELmWmzdowfp1RvxdbYWm1VrUMCO54JvDrSNEbkTCv1DJDGvp6S5VUX9SRdSUHfi+u1cBZ7R+PQMgzEyugNcU5J67DO9VfJiCigD042iuNQqXSunGRfvrWV6/mvX49/+3bhW/eLHr4puOFtxMfvO5w9tX8yv7rIbf3Rrl84Mbe66XSzWet46nn/etMuALua5LqNZUqpKdfDKjsv2qef+yambJsTWM2zDtKIQ0pS7msvSTUpn1tNyts2xZmWUyw3LI4bPisSZNyOUc2y4/scfZs3QZ1UcgqUWtkVednsvnVs7NOHzmqglXIBnqU7+/M9Hp3y3L2RLWYA9uhlat61/LGGwVqt9Nvafv/8R2fmg/pu7LesH9ZOYL3/6e3P6Z2O0rbIztra+Dtc1u2RY1vapOocEtDiT0Kd1VUUkIN42joS19Fk1s1BVmKy0OioA2kMp1REdcbcsr6QV5mJJT0MnF9mbQRchZiET29CAT1fSBR1y1I1fdFRdwPcpr6Q179cIaSBaHRjmVdgxFjCSvGFuonmGYcpK1nESRfUC1dRUm+T3ggeeOEOIiywRwHpDHm+FUlzBIkjT1k5DzsuhEmGi02HGjmKQ1DWfaioBn7gzAWQRWGWqD2BIzGaCDRm4nc+y+QsuhUqKaqyviAiGcGB7FA1AKVS4ZWVddyibdSEoxJQCKjHsjIMNTpjMBUPsxCDRbQPTyTVGh1k20lwfyy/un2QYmpTII1I9Vo+1B4XQ2q0QvwvExGfTgA')
-			format('woff2'),
+		url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMkAAsAAAAAB2QAAALYAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAqCYIJEATYCJAMICwYABCAFhG0HPRt3BhEVlCNkH4dxmzUXNsJHc1SNfR9KTkCtiXv/l+QDBQSFRBJdKoEsg60HUgCsOpWVnWxNx3BvVITqkj3fepbtzM/OfDo4D86iFEIiJAeX02+Bh/O84TLmsrEnYBxQoHtgm6xACoxTkN0zFsgEdQynCShpq7cwbsK0eTKROSkgbNu8cbUspRFrkoNMkC9ZGYWjcrJkX/IIR/zPhz/6hIxELmWmzdowfp1RvxdbYWm1VrUMCO54JvDrSNEbkTCv1DJDGvp6S5VUX9SRdSUHfi+u1cBZ7R+PQMgzEyugNcU5J67DO9VfJiCigD042iuNQqXSunGRfvrWV6/mvX49/+3bhW/eLHr4puOFtxMfvO5w9tX8yv7rIbf3Rrl84Mbe66XSzWet46nn/etMuALua5LqNZUqpKdfDKjsv2qef+yambJsTWM2zDtKIQ0pS7msvSTUpn1tNyts2xZmWUyw3LI4bPisSZNyOUc2y4/scfZs3QZ1UcgqUWtkVednsvnVs7NOHzmqglXIBnqU7+/M9Hp3y3L2RLWYA9uhlat61/LGGwVqt9Nvafv/8R2fmg/pu7LesH9ZOYL3/6e3P6Z2O0rbIztra+Dtc1u2RY1vapOocEtDiT0Kd1VUUkIN42joS19Fk1s1BVmKy0OioA2kMp1REdcbcsr6QV5mJJT0MnF9mbQRchZiET29CAT1fSBR1y1I1fdFRdwPcpr6Q179cIaSBaHRjmVdgxFjCSvGFuonmGYcpK1nESRfUC1dRUm+T3ggeeOEOIiywRwHpDHm+FUlzBIkjT1k5DzsuhEmGi02HGjmKQ1DWfaioBn7gzAWQRWGWqD2BIzGaCDRm4nc+y+QsuhUqKaqyviAiGcGB7FA1AKVS4ZWVddyibdSEoxJQCKjHsjIMNTpjMBUPsxCDRbQPTyTVGh1k20lwfyy/un2QYmpTII1I9Vo+1B4XQ2q0QvwvExGfTgA') format('woff2'),
 		url('//at.alicdn.com/iconfont.woff?t=1574391686418') format('woff'), url('//at.alicdn.com/iconfont.ttf?t=1574391686418') format('truetype'),
-		/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('//at.alicdn.com/iconfont.svg?t=1574391686418#iconfont') format('svg');
+		/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
+		url('//at.alicdn.com/iconfont.svg?t=1574391686418#iconfont') format('svg');
 	/* iOS 4.1- */
 }
 
@@ -256,6 +264,7 @@ const upload = function(options) {
 	&:before {
 		content: '\e559';
 	}
+
 	font-size: 3em;
 }
 
@@ -294,7 +303,7 @@ const upload = function(options) {
 	line-height: 40upx;
 	z-index: 2;
 	text-align: center;
-	background-color:#222222;
+	background-color: #222222;
 
 	&.right {
 		top: 0;
@@ -341,7 +350,7 @@ const upload = function(options) {
 	margin-right: 0;
 }
 
-.sunui-uploader-inputbox > view {
+.sunui-uploader-inputbox>view {
 	text-align: center;
 }
 

+ 85 - 85
src/manifest.json

@@ -1,86 +1,86 @@
 {
-	"name": "",
-	"appid": "",
-	"description": "",
-	"versionName": "1.0.0",
-	"versionCode": "100",
-	"transformPx": false,
-	/* 5+App特有相关 */
-	"app-plus": {
-		"usingComponents": true,
-		"nvueStyleCompiler": "uni-app",
-		"compilerVersion": 3,
-		"splashscreen": {
-			"alwaysShowBeforeRender": true,
-			"waiting": true,
-			"autoclose": true,
-			"delay": 0
-		},
-		/* 模块配置 */
-		"modules": {},
-		/* 应用发布信息 */
-		"distribute": {
-			/* android打包配置 */
-			"android": {
-				"permissions": [
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			/* ios打包配置 */
-			"ios": {},
-			/* SDK配置 */
-			"sdkConfigs": {}
-		}
-	},
-	/* 快应用特有相关 */
-	"quickapp": {},
-	/* 小程序特有相关 */
-	"mp-weixin": {
-		"appid": "",
-		"setting": {
-			"urlCheck": false,
-			"minified" : true
-		},
-		"requiredBackgroundModes": ["webgl"],
-		"permission" : {
-			"scope.userFuzzyLocation" : {
-			    "desc" : "提供周边线下服务商"
-			},
-		    "scope.userFacing" : {
-		        "desc" : "需要访问陀螺仪和屏幕旋转"
-		    },
-		    "scope.userLocation" : {
-		        "desc" : "获取您的位置,以便匹配合适距离场地"
-		    }
-		},
-		"requiredPrivateInfos": ["getLocation", "chooseLocation"],
-		"usingComponents": true
-	},
-	"mp-alipay": {
-		"usingComponents": true
-	},
-	"mp-baidu": {
-		"usingComponents": true
-	},
-	"mp-toutiao": {
-		"usingComponents": true
-	},
-	"uniStatistics": {
-		"enable": false
-	},
-	"vueVersion": "3"
-}
+    "name" : "",
+    "appid" : "",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wx6260718c6fd46efb",
+        "setting" : {
+            "urlCheck" : false,
+            "minified" : true
+        },
+        "requiredBackgroundModes" : [ "webgl" ],
+        "permission" : {
+            "scope.userFuzzyLocation" : {
+                "desc" : "提供周边线下服务商"
+            },
+            "scope.userFacing" : {
+                "desc" : "需要访问陀螺仪和屏幕旋转"
+            },
+            "scope.userLocation" : {
+                "desc" : "获取您的位置,以便匹配合适距离场地"
+            }
+        },
+        "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ],
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "3"
+}

+ 209 - 155
src/pages/index/attestation/index.vue

@@ -6,17 +6,17 @@
 			<view class="text">用于身份实名核验,反洗钱,资料将严格保密</view>
 		</view>
 		<view class="a-idcard-box">
-			<view class="front" v-if="frontImg!=''"  @click="chooseImage(1)">
+			<view class="front" v-if="frontImg != ''" @click="chooseImage(1)">
 				<image :src="frontImg" mode=""></image>
 			</view>
 			<view class="front bg-image" @click="chooseImage(1)" v-else>
 				<zzx-icon name="upload" size="30"></zzx-icon>
 				<view class="">上传人像面</view>
 			</view>
-			<view class="flip-side" v-if="flipSideImg!=''" @click="chooseImage(2)">
+			<view class="flip-side" v-if="flipSideImg != ''" @click="chooseImage(2)">
 				<image :src="flipSideImg" mode=""></image>
 			</view>
-			<view class="flip-side bg-image" v-else  @click="chooseImage(2)">
+			<view class="flip-side bg-image" v-else @click="chooseImage(2)">
 				<zzx-icon name="upload" size="30"></zzx-icon>
 				<view class="">上传国徽面</view>
 			</view>
@@ -28,13 +28,19 @@
 			</view>
 			<view class="form-item">
 				<view class="">身份证号</view>
-				<input type="idcard" v-model="formData.identityCard" placeholder="请输入本人身份证号" />
+				<input type="idcard" v-model="formData.identityCard" placeholder="请输入本人身份证号" @blur="getIdCardInfo" />
 			</view>
 			<view class="form-item">
 				<view class="">手机号码</view>
 				<input type="number" v-model="formData.phone" placeholder="请输入手机号" />
 			</view>
 			<view class="form-tips">老人或无手机号,可填写亲友手机号</view>
+			<view class="form-item-upload">
+				<view class="">近期照片</view>
+				<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1"
+					title="店铺logo" @upload="handleLoaded1" @change="handleChange" :upload_count="1"></sunui-upimg>
+			</view>
+			<view class="form-tips-upload">请上传本人近期高清、无遮挡照片</view>
 		</view>
 		<view class="u-select-btn">
 			<button hover-class="hover-btn" @click="submit">下一步</button>
@@ -43,180 +49,228 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted } from 'vue';
-	import { http } from '@/utils/http';
-	import { RouterUtils,TipsUtils } from '@/utils/util';
-	const formData = ref({
-		fullName: '',
-		identityCard: '',
-		phone: ''
-	})
-	
-	const frontImg = ref('')
-	const flipSideImg=ref('')
-	const chooseImage = (e) => {
-		uni.chooseImage({
-			count: 1,
-			sizeType: ['original', 'compressed'],
-			sourceType: ['album', 'camera'],
-			success: function (res) {
-				if(e==1){
-					frontImg.value=res.tempFilePaths;
-				}else{
-					flipSideImg.value=res.tempFilePaths;
-				}
+import { ref } from 'vue';
+import { http } from '@/utils/http';
+import { TipsUtils, ValidateUtils } from '@/utils/util';
+import { uploadImage } from '@/utils/common/upload'
+import { useCacheStore } from '@/stores/cache'
+const cache = useCacheStore()
+const formData = ref({
+	fullName: '',
+	identityCard: '',
+	phone: '',
+	idCardFrontImg: '',
+	idCardBackImg: '',
+	realNameImg: '',
+	realNameStatus: 1,//0未实名,1实名
+})
+
+const frontImg = ref('')
+const flipSideImg = ref('')
+const chooseImage = (e) => {
+	uni.chooseImage({
+		count: 1,
+		sizeType: ['original', 'compressed'],
+		sourceType: ['album', 'camera'],
+		success: function (res) {
+			if (e == 1) {
+				frontImg.value = res.tempFilePaths;
+				uploadImage(frontImg.value[0], (url) => {
+					formData.value.idCardFrontImg = url;
+				})
+			} else {
+				flipSideImg.value = res.tempFilePaths;
+				uploadImage(flipSideImg.value[0], (url) => {
+					formData.value.idCardBackImg = url;
+				})
 			}
-		});
-	}
-	
-	const submit = () => {
-		http.post('/my/familyMembers/addFamilyMembers',{...formData.value},{loading:true}).then((res)=>{
-			TipsUtils.tips_toast(res.message)
-			formData.value.fullName = ''
-			formData.value.identityCard = ''
-			formData.value.phone = ''
-		})
-		
-		// uni.navigateTo({
-		// 	url: '/pages/index/identityCertifying/index'
-		// })
-		// uni.checkIsSupportSoterAuthentication({
-		// 	success: (res) => {
-		// 		wx.startFacialRecognitionVerify({
-		// 			name: '',
-		// 			idCardNumber: '',
-		// 			success: (res) => {
-		// 				if (res.errMsg == 'startFacialRecognitionVerify:ok') {
-		// 					console.log(res,'人脸识别结果:success');
-		// 				}
-		// 			},
-		// 			fail: (err) => {
-		// 				console.log(err,'人脸识别结果:fail')
-		// 				uni.showToast({
-		// 					title: '人脸识别失败',
-		// 					icon: 'none',
-		// 					duration: 20000,
-		// 				});
-		// 			}
-		// 		})
-		// 	},
-		// 	fail: (err) => {
-		// 		console.log(err)
-		// 	}
-		// })
-	}
+		}
+	});
+}
+
+const handleChange = (e) => {
+	formData.value.realNameImg = e.join(',');
+}
+
+const submit = () => {
+	if (!formData.value.idCardFrontImg) return TipsUtils.tips_toast('请上传人像面');
+	if (!formData.value.idCardBackImg) return TipsUtils.tips_toast('请上传国徽面');
+	if (!formData.value.fullName) return TipsUtils.tips_toast('请输入姓名');
+	if(!ValidateUtils.validateIdCard(formData.value.identityCard)) return TipsUtils.tips_toast('身份证号码格式不正确');
+	if(!ValidateUtils.validatePhone(formData.value.phone)) return TipsUtils.tips_toast('手机号格式不正确');
+	if (!formData.value.realNameImg) return TipsUtils.tips_toast('请上传本人近期高清、无遮挡照片');
+	http.post('/my/familyMembers/addFamilyMembers', { ...formData.value }, { loading: true }).then((res) => {
+		TipsUtils.tips_toast(res.message)
+		formData.value.fullName = ''
+		formData.value.identityCard = ''
+		formData.value.phone = ''
+		formData.value.idCardFrontImg = ''
+		formData.value.idCardBackImg = ''
+		formData.value.realNameImg = ''
+		frontImg.value = ''
+		flipSideImg.value = ''
+	})
+
+	// uni.navigateTo({
+	// 	url: '/pages/index/identityCertifying/index'
+	// })
+	// uni.checkIsSupportSoterAuthentication({
+	// 	success: (res) => {
+	// 		wx.startFacialRecognitionVerify({
+	// 			name: '',
+	// 			idCardNumber: '',
+	// 			success: (res) => {
+	// 				if (res.errMsg == 'startFacialRecognitionVerify:ok') {
+	// 					console.log(res,'人脸识别结果:success');
+	// 				}
+	// 			},
+	// 			fail: (err) => {
+	// 				console.log(err,'人脸识别结果:fail')
+	// 				uni.showToast({
+	// 					title: '人脸识别失败',
+	// 					icon: 'none',
+	// 					duration: 20000,
+	// 				});
+	// 			}
+	// 		})
+	// 	},
+	// 	fail: (err) => {
+	// 		console.log(err)
+	// 	}
+	// })
+}
 </script>
 
 <style lang="less" scoped>
-	.content {
-		background: #fff;
-		height: 1300rpx;
+.content {
+	background: #fff;
+	height: 1300rpx;
 
-		.a-title {
-			text-align: center;
+	.a-title {
+		text-align: center;
+
+		.title {
+			font-weight: 800;
+			font-size: 36rpx;
+			color: #222222;
+		}
 
-			.title {
-				font-weight: 800;
-				font-size: 36rpx;
-				color: #222222;
+		.text {
+			margin-top: 20rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+		}
+	}
+
+	.a-idcard-box {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		font-size: 28rpx;
+		color: #222222;
+		margin-top: 40rpx;
+
+		.front {
+			width: 332rpx;
+			height: 204rpx;
+			border-radius: 16rpx;
+			background-image: url('@/static/idcard-front.png');
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+
+			&>image {
+				width: 100%;
+				height: 100%;
+				border-radius: 16rpx;
 			}
+		}
+
+		.flip-side {
+			width: 332rpx;
+			height: 204rpx;
+			border-radius: 16rpx;
+			background-image: url('@/static/idcard-flipSide.png');
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
 
-			.text {
-				margin-top: 20rpx;
-				font-size: 24rpx;
-				color: #AAAAAA;
+			&>image {
+				width: 100%;
+				height: 100%;
+				border-radius: 16rpx;
 			}
 		}
-		.a-idcard-box{
+	}
+
+	.a-form {
+		margin-top: 20rpx;
+
+		.form-item {
+			height: 110rpx;
 			display: flex;
 			align-items: center;
-			justify-content: space-around;
+			gap: 20rpx;
+			border-bottom: 1rpx solid #F0F0F0;
+			font-weight: bold;
 			font-size: 28rpx;
 			color: #222222;
-			margin-top: 40rpx;
-			.front{
-				width: 332rpx;
-				height: 204rpx;
-				border-radius: 16rpx;
-				background-image: url('@/static/idcard-front.png');
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				flex-direction: column;
-				&>image{
-					width: 100%;
-					height: 100%;
-					border-radius: 16rpx;
-				}
-			}
-			.flip-side{
-				width: 332rpx;
-				height: 204rpx;
-				border-radius: 16rpx;
-				background-image: url('@/static/idcard-flipSide.png');
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				flex-direction: column;
-				&>image{
-					width: 100%;
-					height: 100%;
-					border-radius: 16rpx;
-				}
+
+			&>input {
+				font-weight: normal;
 			}
 		}
 
-		.a-form {
+		.form-item-upload {
+			display: flex;
+			align-items: center;
+			gap: 20rpx;
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		.form-tips {
 			margin-top: 20rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+		}
 
-			.form-item {
-				height: 110rpx;
-				display: flex;
-				align-items: center;
-				gap: 20rpx;
-				border-bottom: 1rpx solid #F0F0F0;
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #222222;
-
-				&>input {
-					font-weight: normal;
-				}
-			}
-			.form-tips{
-				margin-top: 20rpx;
-				font-size: 24rpx;
-				color: #AAAAAA;
-			}
+		.form-tips-upload {
+			font-size: 24rpx;
+			color: #AAAAAA;
 		}
+	}
 
-		.u-select-btn {
-			position: fixed;
-			width: 100%;
-			height: 300rpx;
-			left: 0;
-			bottom: 0;
-			background: #fff;
-
-			&>button {
-				width: 95%;
-				height: 100rpx;
-				line-height: 100rpx;
-				background: #D3FD76;
-				border-radius: 60rpx;
-				font-weight: bold;
-				font-size: 32rpx;
-				color: #222222;
-			}
+	.u-select-btn {
+		position: fixed;
+		width: 100%;
+		height: 300rpx;
+		left: 0;
+		bottom: -100rpx;
+		background: #fff;
 
-			&>button::after {
-				border: none;
-			}
+		&>button {
+			width: 95%;
+			height: 100rpx;
+			line-height: 100rpx;
+			background: #D3FD76;
+			border-radius: 60rpx;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #222222;
+		}
 
-			.hover-btn {
-				background: #ccf371;
-				color: #999999;
-			}
+		&>button::after {
+			border: none;
+		}
+
+		.hover-btn {
+			background: #ccf371;
+			color: #999999;
 		}
 	}
+}
 </style>

+ 47 - 19
src/pages/index/courseDetail/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<zzx-navbar :scrollable="true" :back="true" title="详情"></zzx-navbar>
 	<view class="detail-header">
-		<image class="header-bg" :src="'http://192.168.1.166:8080/jeecg-boot/sys/common/static/' + bannerList[0]" mode="">
+		<image class="header-bg" :src="bannerList[0]" mode="">
 		</image>
 		<view class="back-icon" :style="{ paddingTop: (statusBarHeight + 10) + 'px' }" @click="RouterUtils.back()">
 			<zzx-icon name="back"></zzx-icon>
@@ -13,7 +13,7 @@
 					<video v-for="(item, index) in videoList" :key="index" :src="item"></video>
 				</block>
 				<image @click="_previewImage(bannerList, item)" v-for="(item, index) in bannerList" :key="index"
-					:src="'http://192.168.1.166:8080/jeecg-boot/sys/common/static/' + item" mode=""></image>
+					:src="item" mode=""></image>
 			</view>
 		</scroll-view>
 	</view>
@@ -21,8 +21,8 @@
 	<view class="header-info">
 		<view class="c-price-info">
 			<view class="price-info">
-				<view class="new-price">¥{{ courseDetailInfo.sellingPrice }}</view>
-				<view class="old-price">¥{{ courseDetailInfo.originalPrice }}</view>
+				<view class="new-price">¥{{ courseDetailInfo.sellingPrice.toFixed(2) }}</view>
+				<view class="old-price">¥{{ courseDetailInfo.originalPrice.toFixed(2) }}</view>
 			</view>
 			<view class="sales">年售{{ courseDetailInfo.sales }}</view>
 		</view>
@@ -32,7 +32,7 @@
 		<view class="c-detail-info">
 			<view class="c-time">课时:{{ courseDetailInfo.startTime }}-{{ courseDetailInfo.endTime }}</view>
 			<view class="c-address">
-				<view class="">上课地点:{{ courseDetailInfo.address }} | {{ courseDetailInfo.km }} km</view>
+				<view class="">上课地点:{{ courseDetailInfo.address }} | {{ courseDetailInfo.km.toFixed(2) }} km</view>
 				<zzx-icon name="ashRight" size="10"></zzx-icon>
 			</view>
 			<view class="c-instructor">
@@ -93,44 +93,45 @@
 					<view class="comments">
 						<view class="a-star">
 							<zzx-icon name="star" size="10"></zzx-icon>
-							<text>4.8</text>
+							<text>{{ appraiseList.averageScore }}</text>
 						</view>
-						<view class="a-text">| 37人评论</view>
+						<view class="a-text">| {{ appraiseList.scoreNum }}人评论</view>
 					</view>
 				</view>
-				<view class="appraise-info" v-for="item in 5">
+				<view class="appraise-info" v-for="item in appraiseList.records" :key="item.id">
 					<view class="a-user-info">
 						<view class="info">
-							<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
-							<view class="name">詹姆斯</view>
+							<image :src="item.avatar" mode=""></image>
+							<view class="name">{{ item.username }}</view>
 						</view>
-						<view class="time">03-20</view>
+						<view class="time">{{ DateUtils.formatDateToMMDD(item.createTime) }}</view>
 					</view>
 					<view class="a-score">
-						<text>4.0</text>
-						<uni-rate :readonly="true" size="16" :value="2" />
+						<text>{{ item.score.toFixed(1) }}</text>
+						<uni-rate :readonly="true" size="16" :value="item.score" />
 					</view>
 					<view class="a-content">
-						詹姆四对孩子很有耐心,也非常照顾小朋友的情绪,
-						值得推荐!
+						{{ item.evaluateContent }}
 					</view>
 					<scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false">
-						<view class="scroll-view-item_H uni-bg-red" v-for="item in 5">
-							<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
+						<view class="scroll-view-item_H uni-bg-red" v-for="(img, idx) in item.images.split(',')"
+							:key="idx">
+							<image @click="_previewImage(item.images.split(','), img)" :src="img" mode=""></image>
 						</view>
 					</scroll-view>
 				</view>
+				<view class="not-data" v-if="!appraiseList.records.length">暂无评价数据</view>
 			</view>
 		</view>
 	</view>
-	<view style="height: 100rpx;"></view>
+	<view style="height: 160rpx;"></view>
 	<view class="c-bottom">
 		<view class="c-share">
 			<zzx-icon name="share"></zzx-icon>
 			<view class="">分享</view>
 		</view>
 		<view class="c-buy-btn">
-			<view class="buy" v-if="type == 3">
+			<view class="buy" v-if="type == 3" @click="toOrderPage(0)">
 				<view class="buy-text">抢购</view>
 				<view class="buy-price">
 					<text>¥{{ courseDetailInfo.sellingPrice }}</text>
@@ -173,6 +174,7 @@ onLoad((option) => {
 	console.log(option);
 	courseId.value = option.id
 	type.value = option.type
+	appraiseFormData.value.siteId = option.id
 })
 onMounted(() => {
 	get_navheight()
@@ -180,6 +182,7 @@ onMounted(() => {
 		setTimeout(() => getSectionsTop(), 300);
 	});
 	get_courseInfo()
+	getFindByOrderPage()
 })
 
 // 获取所有模块的位置信息
@@ -260,12 +263,32 @@ const toOrderPage = (buyType: number) => {
 	RouterUtils.to_page(`/pages/index/gymPay/index?courseId=${courseId.value}&type=${type.value}&orderType=2&buyType=${buyType}`)
 }
 
+// 获取评价
+const appraiseFormData = ref({
+	coursesId: null,
+	pageNo: 1,
+	pageSize: 10
+})
+const appraiseList = ref([])
+const getFindByOrderPage = () => {
+	http.get('/my/evaluate/findByOrderPage', { data: appraiseFormData.value, loading: true }).then((res) => {
+		if (appraiseFormData.value.pageNo == 1) {
+			appraiseList.value = res.result
+		} else {
+			appraiseList.value = [...appraiseList.value, ...res.result]
+		}
+	})
+}
+
 const courseId = ref()
 const courseDetailInfo = ref()
 const bannerList = ref([])
 const videoList = ref([])
 const get_courseInfo = () => {
 	http.get('/detail/getCourseInfo', { data: { id: courseId.value || '22222', latitude: cache.get('LAT'), longitude: cache.get('LON') }, loading: true }).then((res) => {
+		if (res.result && res.result.details) {
+			res.result.details = fixImgStyle(res.result.details);
+		}
 		const startIndex = res.result.cover ? res.result.cover.indexOf('"') + 1 : 0;
 		const endIndex = res.result.cover ? res.result.cover.lastIndexOf('') : 0;
 		bannerList.value = res.result.cover ? res.result.cover.slice(startIndex, endIndex).split(',') : [];
@@ -275,6 +298,11 @@ const get_courseInfo = () => {
 		courseDetailInfo.value = res.result
 	})
 }
+
+const fixImgStyle = (html: string) => {
+	if (!html) return html;
+	return html.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block;"');
+};
 </script>
 
 <style lang="less" scoped>

+ 1 - 1
src/pages/index/events/index.vue

@@ -17,7 +17,7 @@
 				</view>
 				<view class="e-info">
 					<view class="e-title">{{ item.name }}</view>
-					<view class="e-address">
+					<view class="e-address" v-if="item.km">
 						{{ item.address }} <text>|</text> {{ item.km.toFixed(2) }}km
 					</view>
 					<view class="e-time">

+ 7 - 6
src/pages/index/eventsDetail/index.vue

@@ -14,15 +14,15 @@
 		</view>
 	</view>
 	<view class="swipertips-box" :style="{ height: (statusBarHeight + 130) + 'px' }">
-		<view class="d-header-user">
+		<view class="d-header-user" v-if="groupedMessages.length > 2">
 			<swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="5000" :vertical="true"
 				:circular="true" :disable-touch="true">
 				<swiper-item v-for="(item, index) in groupedMessages" :key="index">
 					<view class="">
 						<view class="item-info" v-for="(msg, msgIndex) in item" :key="msgIndex">
-							<image src="/src/static/hot-icon2.png" mode=""></image>
+							<image :src="msg.avatar" mode=""></image>
 							<view class="d-swiper-tips">
-								{{ msg }}
+								{{ msg.username }}
 							</view>
 						</view>
 					</view>
@@ -87,11 +87,11 @@
 				<view class="cell-item-num">
 					<view class="item-text">
 						<zzx-icon name="e-icon4" size="16"></zzx-icon>
-						<view class="">已报名人数:3423</view>
+						<view class="">已报名人数:{{ eventsInfoObj.orderNum }}</view>
 					</view>
 					<view class="cell-num-header">
-						<view class="img" v-for="item in 3">
-							<image src="/src/static/hot-icon2.png" mode=""></image>
+						<view class="img" v-for="(item,index) in groupedMessages" :key="index">
+							<image :src="item.avatar" mode=""></image>
 						</view>
 					</view>
 				</view>
@@ -323,6 +323,7 @@ const formData = ref({
 const get_eventsInfo = () => {
 	http.get('/game/findById', { data: formData.value, loading: true }).then((res) => {
 		eventsInfoObj.value = res.result;
+		messages.value = res.result.gameOrderVoList;
 		endTime.value = res.result.applicationEndTime;
 	});
 }

+ 83 - 19
src/pages/index/eventsRegister/index.vue

@@ -55,21 +55,24 @@
 			<view class="g-teamName">
 				<view class="team-name"><text style="color: #FB5B5B ;">*</text> 队名</view>
 				<view class="name-input">
-					<input type="text" v-model="teamNameInfo" placeholder="请输入队名(20字以内)" class="team-name-input" />
+					<input type="text" v-model="orderFormData.gameCertificationForm.teamName" placeholder="请输入队名(20字以内)"
+						class="team-name-input" />
 				</view>
 			</view>
 			<view class="g-teamBadge">
 				<view class="team-badge" style="margin-left: 20rpx;">队徽</view>
 				<view class="">
-					<sunui-upimg :url="upPicUrl" ref="upload1" title="店铺logo" @upload="handleLoaded1"
-						@change="handleChange1" :number="9"></sunui-upimg>
+					<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1"
+						title="店铺logo" @upload="handleLoaded" @change="handleChange" :number="9"></sunui-upimg>
 				</view>
 			</view>
 			<view class="g-teamBadge" v-for="(item, index) in aptitudesList" :key="index">
 				<view class="team-badge"><text style="color: #FB5B5B ;">*</text>{{ item }}</view>
 				<view class="">
-					<sunui-upimg :url="upPicUrl" ref="upload1" title="店铺logo" @upload="handleLoaded1"
-						@change="handleChange1" :number="9"></sunui-upimg>
+					<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }"
+						:ref="'upload' + index" :title="item"
+						@upload="(imageList: any) => handleLoaded1(imageList, index)"
+						@change="(imageList: any) => handleChangeList(imageList, index)" :number="9"></sunui-upimg>
 				</view>
 			</view>
 		</view>
@@ -96,8 +99,8 @@
 					</view>
 				</view>
 			</view>
-			<view class="line" v-if="insureData.length > 0"></view>
-			<blcok v-if="insureData.length > 0">
+			<view class="line" v-if="insureData.length > 0 && insureId == item.id"></view>
+			<blcok v-if="insureData.length > 0 && insureId == item.id">
 				<view class="r-insurance-adduser" v-for="(insureUser, index) in insureData" :key="index">
 					<view class="r-adduser-btn">
 						<view class="r-celar" @click="clearUser">清除</view>
@@ -130,7 +133,7 @@
 	<view style="height: 140rpx;"></view>
 	<view class="r-submit-pay">
 		<view class="r-price">
-			<view class="price"><text>¥</text>5</view>
+			<view class="price"><text>¥</text>{{ totalPrice }}</view>
 			<view class="r-check-detail">
 				<view class="">查看明细</view>
 				<zzx-icon name="up" size="12"></zzx-icon>
@@ -164,9 +167,11 @@ import { http } from '@/utils/http';
 import { RouterUtils, TipsUtils, idCardHide } from '@/utils/util';
 import { onLoad } from '@dcloudio/uni-app';
 import zsTabs from "@/components/zzx-tabs/zzx-tabs.vue";
+import { useCacheStore } from '@/stores/cache';
+const cache = useCacheStore()
 const insurePopup = ref()
 const select_insurance = ref(false)
-const teamNameInfo=ref('')
+const upPicUrl = ref('http://192.168.0.11:8080/jeecg-boot/sys/common/upload')
 onLoad((options) => {
 	eventId.value = options.id;
 	orderFormData.value.orderType = 3
@@ -177,6 +182,26 @@ onMounted(() => {
 	get_eventsInfoDetail()
 	getInsureData()
 })
+const totalPrice = computed(() => {
+	let projectPrice = 0;
+	if (selectTabs.value === 0 && individualEvents.value[0] && selectEvents.value != null) {
+		const item = individualEvents.value[0].gamePriceRulesVOList[selectEvents.value];
+		if (item) {
+			projectPrice = (item.sellingPrice || 0) * (countTotal.value || 1);
+		}
+	} else if (selectTabs.value === 1 && teamsEvents.value[0] && selectEvents.value != null) {
+		const item = teamsEvents.value[0].gamePriceRulesVOList[selectEvents.value];
+		if (item) {
+			projectPrice = (item.sellingPrice || 0);
+		}
+	}
+	// 保险费用
+	let insuranceTotal = 0;
+	if (insureData.value && insureData.value.length > 0) {
+		insuranceTotal = insureData.value.reduce((sum, ins) => sum + (Number(ins.totalPrice) || 0), 0);
+	}
+	return projectPrice + insuranceTotal;
+});
 // 切换选中状态
 const selectEvents = ref()
 const peopleNum = ref()
@@ -209,6 +234,32 @@ const addNum = () => {
 	orderFormData.value.amount = countTotal.value || 1
 }
 
+// 队徽上传
+const handleChange = (e: any) => {
+	orderFormData.value.gameCertificationForm.teamEmblemImg = e[0]
+}
+
+// 其他证明
+// 其他证明
+const handleChangeList = (e1: any, e2: any) => {
+	if (e1 && e1.length > 0) {
+		const certificationName = aptitudesList.value[e2];
+		const certificationImg = e1.join(',');
+		const existingIndex = orderFormData.value.gameCertificationForm.certificationDTOS.findIndex(
+			item => item.name === certificationName
+		);
+		if (existingIndex !== -1) {
+			orderFormData.value.gameCertificationForm.certificationDTOS[existingIndex].certificationImg = certificationImg;
+		} else {
+			orderFormData.value.gameCertificationForm.certificationDTOS.push({
+				name: certificationName,
+				certificationImg: certificationImg
+			});
+		}
+	}
+};
+
+
 const userData = ref()
 const get_userData = () => {
 	uni.$on('userData', function (data) {
@@ -266,8 +317,10 @@ const get_eventsInfoDetail = () => {
 }
 
 const priceDataListData = ref([])
+const insureId = ref()
 const gotoInsuracePage = (e1: any, e2: any) => {
 	getFindByType(e1.insuranceName)
+	insureId.value = e1.id
 	priceDataListData.value = e2
 	orderFormData.value.insureOrderInfoForm.insureId = e1.id
 }
@@ -330,21 +383,32 @@ let orderFormData = ref({
 		insurePriceId: null,
 		familyMembersIds: null,
 	},
-	// gameCertificationForm:{
-	// 	teamName:'',
-	// 	teamEmblemImg: '',
-	// 	certificationDTOS:[{
-	// 		name: '',
-	// 		certificationImg: '',
-	// 	}]
-	// }
+	gameCertificationForm: {
+		teamName: '',
+		teamEmblemImg: '',
+		certificationDTOS: []
+	}
 })
 const submitOrder = () => {
-	// orderFormData.value.gameCertificationForm.teamName=teamNameInfo.value
 	if (!peopleNum.value) return TipsUtils.tips_toast('请选择项目')
 	if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
-	http.post('/order/createOrder', orderFormData.value, { loading: true }).then((res) => {
+	if (selectTabs.value == 1) {
+		if (!orderFormData.value.gameCertificationForm.teamName) return TipsUtils.tips_toast('请输入队名')
+	}
 
+	let data = { ...orderFormData.value };
+	if (selectTabs.value !== 1) {
+		delete data.gameCertificationForm;
+	} else {
+		if (data.gameCertificationForm) {
+			data.gameCertificationForm = JSON.stringify(data.gameCertificationForm);
+		}
+	}
+	if (!insureData.value || insureData.value.length === 0) {
+		delete data.insureOrderInfoForm;
+	}
+	http.post('/order/createOrder', data, { loading: true }).then((res) => {
+		RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${res.result.orderId}&orderType=${orderFormData.value.orderType}`)
 	})
 }
 </script>

+ 8 - 8
src/pages/index/gymDetail/index.vue

@@ -1,8 +1,7 @@
 <template>
 	<zzx-navbar :scrollable="true" :back="true" title="详情"></zzx-navbar>
 	<view class="detail-header">
-		<image class="header-bg" :src="'http://192.168.1.166:8080/jeecg-boot/sys/common/static/' + bannerList[0]"
-			mode="">
+		<image class="header-bg" :src="bannerList[0]" mode="">
 		</image>
 		<view class="back-icon" :style="{ paddingTop: (statusBarHeight + 10) + 'px' }" @click="RouterUtils.back()">
 			<zzx-icon name="back"></zzx-icon>
@@ -13,8 +12,7 @@
 				<block v-if="detailInfo.video">
 					<video v-for="(item, index) in videoList" :key="index" :src="item"></video>
 				</block>
-				<image v-for="(item, index) in bannerList" :key="index"
-					:src="'http://192.168.1.166:8080/jeecg-boot/sys/common/static/' + item" mode=""></image>
+				<image v-for="(item, index) in bannerList" :key="index" :src="item" mode=""></image>
 			</view>
 		</scroll-view>
 	</view>
@@ -247,7 +245,8 @@
 		</view>
 	</view>
 	<view style="position: relative;z-index: 99999;">
-		<selPopup :listData="placedata" :itemList="selItems" :deteObj="dateIndex" :deteSelIndex="selIndex" @change="onchange" ref="openPopup" />
+		<selPopup :listData="placedata" :itemList="selItems" :deteObj="dateIndex" :deteSelIndex="selIndex"
+			@change="onchange" ref="openPopup" />
 		<uni-popup ref="placeInfoPopup" :safe-area="false" type="bottom">
 			<view class="buyTips-box">
 				<view class="buyTips-title">购买须知</view>
@@ -437,7 +436,7 @@ const get_allCategory = () => {
 		allCategoryList.value = res.result
 		get_courseList(categoryId.value)
 		get_placeInfoNoFixation(categoryId.value)
-		get_placeInfoDetail(categoryId.value, '')
+		// get_placeInfoDetail(categoryId.value, '')
 	})
 }
 
@@ -461,6 +460,7 @@ const selectallCategory = (e, i) => {
 // 包场切换
 const selChartered = ref(0)
 const selectChartered = (e, i) => {
+	console.log(e, i,'包场切换');
 	categoryId.value = e.id
 	selChartered.value = i
 	get_placeInfoNoFixation(e.id)
@@ -494,7 +494,7 @@ const serveTips = (e) => {
 
 const placedata = ref()
 const selItems = ref()
-const get_placeInfoDetail = (catId, dateIndex) => {
+const get_placeInfoDetail = (catId:any, dateIndex:any) => {
 	http.get('/stadium/getPlaceInfo', { data: { siteId: listId.value, categoryId: catId } }).then((res) => {
 		placedata.value = res.result
 		selItems.value = res.result.stadiumConcertsVOList[dateIndex].concertsVOList
@@ -1008,7 +1008,7 @@ const getFindByOrderPage = () => {
 			width: 430rpx;
 			height: 220rpx;
 			border-bottom: 1rpx solid #F0F0F0;
-
+			padding-bottom: 10rpx;
 			.info-title {
 				display: flex;
 				align-items: center;

+ 3 - 4
src/pages/index/gymPay/index.vue

@@ -2,7 +2,7 @@
 	<!-- 不同类型进入的loadType(1:学校课程;2:体育馆课程;3:教练课程) -->
 	<view class="content">
 		<view class="g-orderinfo-card">
-			<view class="g-shoping-info">
+			<view class="g-shoping-info" v-if="previewCourseInfo">
 				<image class="shoping-img" :src="previewCourseInfo.cover" mode=""></image>
 				<view class="shoping-info">
 					<view class="name">{{ previewCourseInfo.placeName||previewCourseInfo.name }}</view>
@@ -32,8 +32,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="subtotal">小计 ¥{{
-				previewCourseInfo.subtotal ? previewCourseInfo.subtotal.toFixed(2)  : previewCourseInfo.sellingPrice.toFixed(2) }}</view>
+			<view class="subtotal">小计 ¥{{totalPriceDisplay }}</view>
 		</view>
 		<!-- 课程进入 -->
 		<view class="r-insurance" v-for="item in insureIdList" :key="item.id">
@@ -334,7 +333,6 @@ const addNum = () => {
 	}else{
 		countTotal.value++
 	}
-	orderFormData.value.amount = countTotal.value
 }
 
 const get_checkCourseLimitNum = (targetNum) => {
@@ -383,6 +381,7 @@ let orderFormData = ref({
 	}
 })
 const submitOrder = () => {
+	orderFormData.value.amount = countTotal.value
 	if (!placeId.value) {
 		if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
 		if (userData.value.length < countTotal.value) return TipsUtils.tips_toast(`请至少选择${countTotal.value}人`)

+ 2 - 1
src/pages/index/index.vue

@@ -174,7 +174,9 @@
 					</view>
 				</view>
 			</view>
+			<!-- <view style="position: relative;z-index: 1;"> -->
 			<zs-empty v-if="!loading && instructorList.length === 0" />
+			<!-- </view> -->
 		</view>
 		<view class="login-tips" v-if="!token">
 			<view class="">终于等到你!快去登录吧~</view>
@@ -683,7 +685,6 @@
 				color: #222222;
 				position: relative;
 				height: 100rpx;
-
 				.i-text {
 					position: relative;
 					width: 130rpx;

+ 23 - 4
src/pages/index/instructorDetail/index.vue

@@ -35,7 +35,7 @@
 			<view class="i-data-card">
 				<view class="item-data">
 					<view class="text">好评率</view>
-					<view class="num">{{ detailObj.goodRate }}%</view>
+					<view class="num">{{ appraiseList.applauseRate||'--' }}%</view>
 				</view>
 				<view class="item-data">
 					<view class="text">订单数</view>
@@ -63,8 +63,8 @@
 						</view>
 						<view class="address">上课地点:{{ item.address }} | {{ item.km }}km</view>
 						<view class="list-price">
-							<view class="left-price">¥{{ item.sellingPrice }}</view>
-							<view class="right-price">¥{{ item.originalPrice }}</view>
+							<view class="left-price">¥{{ item.sellingPrice.toFixed(2) }}</view>
+							<view class="right-price">¥{{ item.originalPrice.toFixed(2) }}</view>
 						</view>
 						<view class="sale-data">已售{{ item.saleNum }} {{ item.goodRate }}%好评</view>
 						<view class="course-num">
@@ -121,7 +121,7 @@ import { ref, onMounted } from 'vue';
 import { onLoad, onReachBottom } from '@dcloudio/uni-app';
 import { http } from '@/utils/http'
 import { useCacheStore } from '@/stores/cache'
-import { RouterUtils, _previewImage } from '@/utils/util';
+import { RouterUtils, _previewImage,DateUtils } from '@/utils/util';
 import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
 const cache = useCacheStore()
 const statusBarHeight = ref(0);
@@ -377,9 +377,28 @@ const getFindByOrderPage = () => {
 					.right-price {
 						font-size: 22rpx;
 						color: #AAAAAA;
+						text-decoration: line-through;
 					}
 				}
 
+				.list-data {
+					margin-top: 10rpx;
+					font-size: 24rpx;
+					color: #AAAAAA;
+				}
+
+				.course-num {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+			}
+
+				.course-num {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+				}
+
 				.sale-data {
 					margin-top: 10rpx;
 					font-size: 24rpx;

+ 0 - 1
src/pages/index/messageDetail/index.vue

@@ -21,7 +21,6 @@
 	onMounted(() => {
 		get_magDetail()
 	})
-
 	const messageInfo = ref()
 	// 自动为 img 标签添加自适应样式
 	const fixImgStyle = (html: string) => {

+ 130 - 19
src/pages/index/toBeUsed/index.vue

@@ -3,19 +3,21 @@
 	<view class="content" v-if="!loading">
 		<view class="t-header">
 			<view class="title">{{ orderDetailInfo?.orderStatus }}</view>
-			<view class="time" v-for="item in orderDetailInfo?.proInfoList" :key="item.id">
-				<text>{{ item.ticketNo }}</text>
-				<text v-if="orderDetailInfo?.orderStatus">{{ orderDetailInfo?.orderStatus }}</text>
-				<text v-if="orderDetailInfo?.orderStatus == '待使用'">,请按课表到上课地点按时上课。</text>
+			<view style="display: flex;gap: 10rpx;">
+				<view class="time" v-for="item in orderDetailInfo?.proInfoList" :key="item.id">
+					<text style="color: #FB5B5B;" v-if="item.type!=7">{{ item.userName }}</text>
+					<text v-if="orderDetailInfo?.orderStatus&&item.type!=7">{{ orderDetailInfo?.orderStatus + ';' }}</text>
+					<!-- <text v-if="orderDetailInfo?.orderStatus == '待使用'">,请按课表到上课地点按时上课。</text> -->
+				</view>
 			</view>
 		</view>
-		<view class="t-booking-card" v-if="orderPageInfo?.orderType == 3">
+		<!-- <view class="t-booking-card" v-if="orderPageInfo?.orderType == ">
 			<view class="booking-text">
 				<view class="b-title">请您提前联系场馆进行预约</view>
 				<view class="b-text">请提前一天预约>场馆确认>到馆消费</view>
 			</view>
 			<view class="booking-btn">立即预约</view>
-		</view>
+		</view> -->
 		<!-- 场地 -->
 		<view class="c-scheduled-card" v-if="orderPageInfo?.orderType == 0 || orderPageInfo?.orderType == 1">
 			<view class="title">预定信息</view>
@@ -33,7 +35,8 @@
 				</view>
 			</view>
 		</view>
-		<view class="t-shoping-card" v-if="orderPageInfo?.orderType == 2 || orderPageInfo?.orderType == 5">
+		<view class="t-shoping-card"
+			v-if="orderPageInfo?.orderType == 2 || orderPageInfo?.orderType == 5 || orderPageInfo?.orderType == 3 || orderPageInfo?.orderType == 4">
 			<view class="venue-address" v-if="orderPageInfo?.orderType == 2">
 				<view class="address">
 					<zzx-icon name="venue-icon4" size="14"></zzx-icon>
@@ -46,7 +49,7 @@
 				</view>
 			</view>
 			<view class="t-shoping-info">
-				<image class="shoping-img" :src="orderDetailInfo?.appCourses?.cover" mode="">
+				<image class="shoping-img" :src="orderDetailInfo?.appCourses?.cover||orderDetailInfo?.proInfoList[0].productImage" mode="">
 				</image>
 				<view class="shoping-info">
 					<view class="name">{{ orderDetailInfo?.appCourses?.name ||
@@ -88,7 +91,7 @@
 		</view>
 		<!-- 待使用展示 -->
 		<view class="t-qrcode-card"
-			v-if="orderPageInfo?.orderType == 2 || orderPageInfo?.orderType == 0 || orderPageInfo?.orderType == 5 || orderPageInfo?.orderType == 1">
+			v-if="orderPageInfo?.orderType == 2 || orderPageInfo?.orderType == 0 || orderPageInfo?.orderType == 5 || orderPageInfo?.orderType == 1 || orderPageInfo?.orderType == 3 || orderPageInfo?.orderType == 4">
 			<block v-if="orderDetailInfo?.orSchoolCourse != 1">
 				<view class="qrcode-box">
 					<view class="item-qrcode">
@@ -105,8 +108,8 @@
 						orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime }} 到期</view>
 				</view>
 				<view class="order-num" v-for="item in orderDetailInfo?.proInfoList" :key="item.id">
-					<text>{{ item.ticketNo }}&nbsp;&nbsp; {{ item.userName }}</text>
-					<zzx-icon name="ashRight" size="12"></zzx-icon>
+					<text v-if="item.type!=7">{{ item.ticketNo }}&nbsp;&nbsp; {{ item.userName }}</text>
+					<zzx-icon v-if="item.type!=7" name="ashRight" size="12"></zzx-icon>
 				</view>
 			</view>
 		</view>
@@ -167,22 +170,26 @@
 		<view class="t-use-card">
 			<view class="use-tips">
 				<view class="title">使用须知</view>
-				<view class="text">{{ orderDetailInfo?.reminder }}</view>
+				<view class="text">
+					<!-- {{ orderDetailInfo?.reminder }} -->
+					<rich-text :nodes="orderDetailInfo?.reminder"></rich-text>
+				</view>
 			</view>
 			<!-- <view class="check-all">
 				<text>查看全部</text>
 				<zzx-icon name="ashRight" size="12"></zzx-icon>
 			</view> -->
 		</view>
-		<view class="t-use-card" v-if="orderPageInfo?.orderType == 0 || orderPageInfo?.orderType == 5">
+		<view class="t-use-card"
+			v-if="orderPageInfo?.orderType == 0 || orderPageInfo?.orderType == 5 && orderDetailInfo?.insureOrderInfoList">
 			<view class="use-tips">
 				<view class="title">参赛意外险</view>
 				<view class="t-use-insureOrder">
 					<view class="insureOrder-title">被保人</view>
 					<view class="insureOrder-text" v-if="orderDetailInfo?.insureOrderInfoList">
 						{{ orderDetailInfo?.insureOrderInfoList.length }}人(<text
-							v-for="name in orderDetailInfo?.insureOrderInfoList"
-							:key="name.id">{{ name.familyUserName }}、</text>)</view>
+							v-for="name in orderDetailInfo?.insureOrderInfoList" :key="name.id">{{ name.familyUserName
+							}}、</text>)</view>
 				</view>
 				<view class="t-use-insureOrder">
 					<view class="insureOrder-title">生效时间</view>
@@ -242,9 +249,35 @@
 				<view class="item-right">{{ orderDetailInfo?.payTime || '--' }}</view>
 			</view>
 		</view>
+		<!-- 团队赛 -->
+		<view class="t-team-card" v-if="orderDetailInfo?.gameCertification">
+			<view class="t-team-card-title">
+				<view class="title">队名</view>
+				<view class="team-name">{{ gameCertificationList?.teamName }}</view>
+			</view>
+			<view class="t-taem-card-info">
+				<view class="item-info">队徽</view>
+				<view class="item-img">
+					<image
+						@click="_previewImage([gameCertificationList?.teamEmblemImg], gameCertificationList?.teamEmblemImg)"
+						:src="gameCertificationList?.teamEmblemImg" mode="scaleToFill" />
+				</view>
+			</view>
+			<view class="t-taem-card-info" v-for="(item, index) in gameCertificationList?.certificationDTOS"
+				:key="index">
+				<view class="item-info">{{ item.name }}</view>
+				<view class="item-img">
+					<image v-for="(img, imgIndex) in item.certificationImg.split(',')" :key="imgIndex"
+						@click="_previewImage(item.certificationImg.split(','), img)" :src="img" mode="scaleToFill" />
+				</view>
+			</view>
+		</view>
+		<view class="t-morefeatures-card" v-if="orderDetailInfo?.gameCertification">
+			<view class="morefeatures-title">更多功能</view>
+			<view class="morefeatures-btn">查看成绩</view>
+		</view>
 		<!-- 已使用展示 -->
-		<view class="appraise-btn"
-			@click="RouterUtils.to_page(`/pages/index/writeComments/index?siteId=${orderDetailInfo?.addressSiteId}&orderId=${orderDetailInfo?.id}`)">
+		<view class="appraise-btn" v-if="orderPageInfo?.orderType!=3" @click="RouterUtils.to_page(`/pages/index/writeComments/index?siteId=${orderDetailInfo?.addressSiteId}&orderId=${orderDetailInfo?.id}`)">
 			写评价
 		</view>
 	</view>
@@ -335,7 +368,7 @@
 
 <script lang="ts" setup>
 import { ref, onMounted } from 'vue';
-import { TipsUtils, RouterUtils, DateUtils } from '@/utils/util'
+import { TipsUtils, RouterUtils, DateUtils, _previewImage } from '@/utils/util'
 import { onLoad } from '@dcloudio/uni-app';
 import { http } from '@/utils/http'
 import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
@@ -421,6 +454,7 @@ const open_phone = () => {
 // 订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款
 const orderDetailInfo = ref()
 const loading = ref(true)
+const gameCertificationList = ref({})
 const getOrderDetailInfo = (() => {
 	http.get('/order/queryOrderInfo', { data: { orderId: orderPageInfo.value.orderId }, loading: true }).then((res) => {
 		switch (res.result.orderStatus) {
@@ -448,8 +482,9 @@ const getOrderDetailInfo = (() => {
 				break;
 		}
 		orderDetailInfo.value = res.result
+		gameCertificationList.value = JSON.parse(res.result.gameCertification || '{}')
+		console.log(gameCertificationList.value, '图片');
 		loading.value = false
-		console.log(loading.value, '---加载');
 		getQueryWaitSignList(res.result.id)
 	})
 })
@@ -1017,6 +1052,82 @@ const getSignUrl = (signFlowId: string) => {
 	}
 }
 
+.t-team-card {
+	margin-top: 20rpx;
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+
+	.t-team-card-title {
+		display: flex;
+		align-items: center;
+		gap: 30rpx;
+
+		.title {
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		.team-name {
+			font-size: 28rpx;
+			color: #AAAAAA;
+		}
+	}
+
+	.t-taem-card-info {
+		margin-top: 28rpx;
+
+		.item-info {
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		.item-img {
+			margin-top: 20rpx;
+			display: flex;
+			flex-wrap: wrap;
+			gap: 10px;
+
+			&>image {
+				width: 200rpx;
+				height: 200rpx;
+				border-radius: 32rpx;
+				object-fit: cover;
+			}
+		}
+	}
+}
+
+.t-morefeatures-card {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	margin-top: 20rpx;
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+
+	.morefeatures-title {
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #222222;
+	}
+
+	.morefeatures-btn {
+		width: 226rpx;
+		height: 68rpx;
+		background: #C8FF0C;
+		border-radius: 60rpx;
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
+		text-align: center;
+		line-height: 68rpx;
+	}
+}
+
 .appraise-btn {
 	margin-top: 20rpx;
 	width: 686rpx;

+ 4 - 2
src/pages/index/userList/index.vue

@@ -37,7 +37,7 @@
 import { ref, onMounted, computed } from 'vue';
 import { http } from '@/utils/http';
 import { useCacheStore } from '@/stores/cache'
-import { onLoad, onReachBottom } from '@dcloudio/uni-app';
+import { onShow,onLoad, onReachBottom } from '@dcloudio/uni-app';
 import { RouterUtils, idCardHide } from '@/utils/util';
 const cache = useCacheStore()
 const userList = ref()
@@ -58,12 +58,14 @@ onLoad((options) => {
 		});
 	}
 })
+onShow(()=>{
+	get_userList()
+})
 onReachBottom(() => {
 	pageNo.value++
 	get_userList()
 })
 onMounted(() => {
-	get_userList()
 })
 
 const get_userList = () => {

+ 1 - 1
src/pages/index/venue/index.vue

@@ -13,7 +13,7 @@
 		<view v-if="!searchLoading">
 			<view class="venue-card" v-for="item in dataList" @click="gotoDetail(item)" :key="item.id">
 				<view class="venues-image">
-					<image :src="'http://192.168.0.11:8080/jeecg-boot/sys/common/static/'+item.cover" mode=""></image>
+					<image :src="item.cover" mode=""></image>
 					<view class="e-badge">
 						<image src="/src/static/events-icon1.png" mode="widthFix"></image>
 						<view class="text">{{item.ticketWhether?'今日有票':'暂无余票'}}</view>

+ 1 - 1
src/pages/index/vr/index.vue

@@ -25,7 +25,7 @@ const engine = ref(null);
 // 'http://192.168.1.166:8080/jeecg-boot/sys/common/static/'+
 onLoad((option: any) => {
 	images.value = option.vrImg.split(',');
-	images.value = images.value.map(item => 'http://192.168.0.11:8080/jeecg-boot/sys/common/static/' + item);
+	images.value = images.value.map(item =>item);
 	if (images.value.length !== 6) {
 		uni.showToast({ title: '需要6张图片', icon: 'none' });
 		return;

+ 10 - 8
src/pages/index/writeComments/index.vue

@@ -11,8 +11,8 @@
 		<view class="w-content-card">
 			<textarea v-model="formData.evaluateContent" id="" cols="30" rows="10" maxlength="150"></textarea>
 			<view class="">
-				<sunui-upimg :url="upPicUrl" ref="upload1" title="店铺logo" @upload="handleLoaded1"
-					@change="handleChange1"></sunui-upimg>
+				<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1" title="店铺logo" @upload="handleLoaded1"
+					@change="handleChange" :number="9"></sunui-upimg>
 			</view>
 		</view>
 		<view class="w-anonymity">
@@ -29,10 +29,14 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, onMounted, computed } from 'vue';
+import { ref } from 'vue';
 import { onLoad } from '@dcloudio/uni-app';
-import { RouterUtils, TipsUtils } from '@/utils/util';
+import { TipsUtils } from '@/utils/util';
 import { http } from '@/utils/http';
+import { useCacheStore } from '@/stores/cache';
+const cache = useCacheStore()
+const upPicUrl = ref('http://192.168.0.11:8080/jeecg-boot/sys/common/upload')
+
 onLoad((options) => {
 	console.log(options);
 	formData.value.siteId = options.siteId
@@ -46,14 +50,12 @@ const formData = ref({
 	orderId: null,
 	isAnonymous: 0,
 })
-const upPicUrl = ref()
 const onRateChange = (e) => {
 	formData.value.score = e.value
 }
 
-const handleLoaded1 = (e) => {
-}
-const handleChange1 = (e) => {
+const handleChange = (e) => {
+	formData.value.images= e.join(',');
 }
 const publish = () => {
 	http.post('/my/evaluate/submitFeedback', formData.value, { loading: true }).then((res) => {

+ 87 - 60
src/pages/mine/accountSetting/index.vue

@@ -4,9 +4,9 @@
 			<view class="a-header-cell">
 				<view class="a-header">头像</view>
 				<view class="a-set-deader" @click="selectUpType">
-					<view class="add" v-if="!tempFilePaths">+</view>
+					<view class="add" v-if="!tempFilePaths&&!cache.get('USER_INFO').userAvatar">+</view>
 					<view class="add-img-box" v-else>
-						<image class="add-img" :src="tempFilePaths" mode=""></image>
+						<image class="add-img" :src="tempFilePaths||cache.get('USER_INFO').userAvatar" mode=""></image>
 					</view>
 					<zzx-icon name="ashRight" size="10"></zzx-icon>
 				</view>
@@ -14,7 +14,7 @@
 			<view class="a-nickname-cell" @click="RouterUtils.to_page('/pages/mine/reviseNickname/index')">
 				<view class="a-nickname">昵称</view>
 				<view class="a-set-nickname">
-					<view class="nickname">{{userName}}</view>
+					<view class="nickname textHidden">{{ userName }}</view>
 					<zzx-icon name="ashRight" size="10"></zzx-icon>
 				</view>
 			</view>
@@ -23,81 +23,108 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref,computed } from 'vue'
-	import { RouterUtils } from '@/utils/util';
-	import { useCacheStore } from '@/stores/cache'
-	const cache = useCacheStore()
-	const tempFilePaths=ref()
-	const userName=computed(()=>{
-		return cache.get('USER_INFO').userName
+import { ref, computed } from 'vue'
+import { http } from '@/utils/http'
+import { RouterUtils, TipsUtils } from '@/utils/util';
+import { useCacheStore } from '@/stores/cache'
+import { uploadImage } from '@/utils/common/upload'
+const cache = useCacheStore()
+const tempFilePaths = ref()
+const userName = computed(() => {
+    return cache.get('USER_INFO').userName
+})
+const selectUpType = () => {
+	uni.chooseImage({
+		count: 1,
+		sizeType: ['original', 'compressed'],
+		sourceType: ['album', 'camera'],
+		success: function (res) {
+			tempFilePaths.value = res.tempFilePaths
+			uploadImage(tempFilePaths.value[0], (url) => {
+				submit(url)
+			})
+		}
 	})
-	const selectUpType = () => {
-		uni.chooseImage({
-			count: 1,
-			sizeType: ['original', 'compressed'],
-			sourceType: ['album', 'camera'],
-			success: function (res) {
-				tempFilePaths.value = res.tempFilePaths
-			}
-		})
-	}
+}
+const submit = (avatarUrl: string) => {
+	http.get('/user/updateUserInfo', { data: { avatarUrl: avatarUrl }, loading: true }).then((res) => {
+		get_userinfo()
+	})
+}
+const get_userinfo = () => {
+	http.get('/user/getUserInfo', { loading: true }).then(res => {
+		cache.set('USER_INFO', res.result)
+		TipsUtils.tips_toast('上传成功')
+		RouterUtils.back()
+	})
+}
 </script>
 
 <style lang="less" scoped>
-	.a-accountset-card{
-		background: #FFFFFF;
-		border-radius: 32rpx;
-		padding: 20rpx;
-		margin-top: 20rpx;
-		.a-header-cell{
+.a-accountset-card {
+	background: #FFFFFF;
+	border-radius: 32rpx;
+	padding: 20rpx;
+	margin-top: 20rpx;
+
+	.a-header-cell {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.a-header {
+			font-size: 28rpx;
+			color: #AAAAAA;
+		}
+
+		.a-set-deader {
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			.a-header{
-				font-size: 28rpx;
+			gap: 20rpx;
+
+			.add {
+				width: 70rpx;
+				height: 70rpx;
+				border-radius: 16rpx;
+				background: #F6F6F6;
+				text-align: center;
+				line-height: 70rpx;
 				color: #AAAAAA;
 			}
-			.a-set-deader{
-				display: flex;
-				align-items: center;
-				gap: 20rpx;
-				.add{
+
+			.add-img-box {
+				.add-img {
 					width: 70rpx;
 					height: 70rpx;
 					border-radius: 16rpx;
-					background: #F6F6F6;
-					text-align: center;
-					line-height: 70rpx;
-					color: #AAAAAA;
-				}
-				.add-img-box{
-					.add-img{
-						width: 70rpx;
-						height: 70rpx;
-						border-radius: 16rpx;
-					}
 				}
 			}
 		}
-		.a-nickname-cell{
+	}
+
+	.a-nickname-cell {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		margin-top: 30rpx;
+
+		.a-nickname {
+			font-size: 28rpx;
+			color: #AAAAAA;
+		}
+
+		.a-set-nickname {
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			margin-top: 30rpx;
-			.a-nickname{
+			gap: 20rpx;
+
+			.nickname {
+				font-weight: bold;
 				font-size: 28rpx;
-				color: #AAAAAA;
-			}
-			.a-set-nickname{
-				display: flex;
-				align-items: center;
-				gap: 20rpx;
-				.nickname{
-					font-weight: bold;
-					font-size: 28rpx;
-					color: #222222;
-				}
+				color: #222222;
+				width: 500rpx;
 			}
 		}
 	}
+}
 </style>

+ 140 - 134
src/pages/mine/feedback/index.vue

@@ -1,5 +1,6 @@
 <template>
-	<zzx-navbar :scrollable="false" :back="true" bgColor="linear-gradient( 180deg, #E8FF9B 0%, #F6F6F6 100%)" title="意见反馈"></zzx-navbar>
+	<zzx-navbar :scrollable="false" :back="true" bgColor="linear-gradient( 180deg, #E8FF9B 0%, #F6F6F6 100%)"
+		title="意见反馈"></zzx-navbar>
 	<view style="height:170rpx;"></view>
 	<view class="f-checkout" @click="RouterUtils.to_page('/pages/mine/feedbackRecord/index')">
 		<image src="@/static/m-feedbackReocd.png" mode="widthFix"></image>
@@ -8,21 +9,22 @@
 		<view class="f-issue-card">
 			<view class="f-title">(必填)请选择您在使用过程中遇到的问题</view>
 			<view class="item-issue-box">
-				<view :class="[selectType==item.value?'sel-item-issue':'item-issue']" v-for="(item,index) in issueType" :key="item.value"
-					@click="selectItem(item)">{{item.text}}</view>
+				<view :class="[selectType == item.value ? 'sel-item-issue' : 'item-issue']" v-for="(item, index) in issueType"
+					:key="item.value" @click="selectItem(item)">{{ item.text }}</view>
 			</view>
 		</view>
 		<view class="f-issuedes-card">
 			<view class="f-title">(必填)问题描述</view>
 			<view class="item-issuedes-box">
-				<textarea class="f-text-style" id="" maxlength="500" cols="30" rows="10" v-model="formData.feedbackDescribed"></textarea>
+				<textarea class="f-text-style" id="" maxlength="500" cols="30" rows="10"
+					v-model="formData.feedbackDescribed"></textarea>
 			</view>
 		</view>
 		<view class="f-uploadimg">
 			<view class="f-title">上传图片(最多9张)</view>
 			<view class="">
-				<sunui-upimg :url="upPicUrl" ref="upload1" title="店铺logo" @upload="handleLoaded1"
-					@change="handleChange1" :number="3"></sunui-upimg>
+				<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1"
+					title="店铺logo" @upload="handleLoaded1" @change="handleChange" :number="9"></sunui-upimg>
 			</view>
 		</view>
 		<view class="f-tips">
@@ -36,160 +38,164 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted,computed } from 'vue'
-	import { http } from '@/utils/http'
-	import { useCacheStore } from '@/stores/cache'
-	import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
-	import { RouterUtils,TipsUtils } from '@/utils/util';
-	const cache = useCacheStore()
-	const selectType = ref(0);
-	const issueType=ref()
-	const userinfo=computed(()=>{
-		return cache.get('USER_INFO')
+import { ref, onMounted, computed } from 'vue'
+import { http } from '@/utils/http'
+import { useCacheStore } from '@/stores/cache'
+import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
+import { RouterUtils, TipsUtils } from '@/utils/util';
+const cache = useCacheStore()
+const upPicUrl = ref('http://192.168.0.11:8080/jeecg-boot/sys/common/upload')
+const selectType = ref(0);
+const issueType = ref()
+const userinfo = computed(() => {
+	return cache.get('USER_INFO')
+})
+const formData = ref({
+	userId: userinfo.value.id,
+	feedbackType: 0,
+	feedbackDescribed: '',
+	feedbackImg: ''
+})
+
+onMounted(() => {
+	get_dictType()
+})
+const selectItem = (e) => {
+	selectType.value = e.value
+	formData.value.feedbackType = e.value
+}
+const handleChange = (e) => {
+	formData.value.feedbackImg= e.join(',');
+}
+// 查询分类
+const get_dictType = () => {
+	http.get('/common/getDictItems', { data: { dictCode: 'feedback_type' } }).then(res => {
+		issueType.value = res.result.reverse()
 	})
-	const formData=ref({
-		userId:userinfo.value.id,
-		feedbackType:0,
-		feedbackDescribed:'',
-		feedbackImg:''
+}
+
+const submitFeedback = () => {
+	http.post('/my/feedback/submitFeedback', { ...formData.value }, { loading: true }).then(res => {
+		formData.value.feedbackDescribed = ''
+		formData.value.feedbackImg = ''
+		uni.navigateBack()
+		TipsUtils.tips_toast(res.message)
 	})
-
-	onMounted(()=>{
-		get_dictType()
-	})
-	const selectItem = (e) => {
-		selectType.value = e.value
-		formData.value.feedbackType=e.value
-	}
-	
-	// 查询分类
-	const get_dictType = () => {
-		http.get('/common/getDictItems', { data: { dictCode: 'feedback_type' }}).then(res => {
-			issueType.value=res.result.reverse()
-		})
-	}
-	
-	const submitFeedback=()=>{
-		http.post('/my/feedback/submitFeedback',{...formData.value},{loading:true}).then(res=>{
-			formData.value.feedbackDescribed=''
-			formData.value.feedbackImg=''
-			uni.navigateBack()
-			TipsUtils.tips_toast(res.message)
-		})
-	}
+}
 </script>
 
 <style lang="less" scoped>
-	.f-checkout {
-		position: relative;
-
-		&>image {
-			position: absolute;
-			right: 0;
-			top: -10rpx;
-			width: 194rpx;
-		}
+.f-checkout {
+	position: relative;
+
+	&>image {
+		position: absolute;
+		right: 0;
+		top: -10rpx;
+		width: 194rpx;
 	}
+}
 
-	.f-issue-card {
-		margin-top: 20rpx;
+.f-issue-card {
+	margin-top: 20rpx;
 
-		.f-title {
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #222222;
-		}
-
-		.item-issue-box {
-			display: flex;
-			align-items: center;
-			flex-wrap: wrap;
-			gap: 20rpx;
-			background: #FFFFFF;
-			border-radius: 16rpx;
-			padding: 20rpx;
-			margin-top: 20rpx;
-
-			.sel-item-issue {
-				width: 200rpx;
-				height: 72rpx;
-				background: #C8FF0C;
-				border-radius: 16rpx;
-				font-size: 28rpx;
-				color: #222222;
-				text-align: center;
-				line-height: 72rpx;
-			}
-
-			.item-issue {
-				width: 200rpx;
-				height: 72rpx;
-				background: #F6F6F6;
-				border-radius: 16rpx;
-				font-size: 28rpx;
-				color: #AAAAAA;
-				text-align: center;
-				line-height: 72rpx;
-			}
-		}
+	.f-title {
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
 	}
 
-	.f-issuedes-card {
-		margin-top: 28rpx;
+	.item-issue-box {
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		gap: 20rpx;
+		background: #FFFFFF;
+		border-radius: 16rpx;
+		padding: 20rpx;
+		margin-top: 20rpx;
 
-		.f-title {
-			font-weight: bold;
+		.sel-item-issue {
+			width: 200rpx;
+			height: 72rpx;
+			background: #C8FF0C;
+			border-radius: 16rpx;
 			font-size: 28rpx;
 			color: #222222;
+			text-align: center;
+			line-height: 72rpx;
 		}
 
-		.item-issuedes-box {
-			margin-top: 20rpx;
-			height: 290rpx;
-			padding: 20rpx;
-			background: #FFFFFF;
+		.item-issue {
+			width: 200rpx;
+			height: 72rpx;
+			background: #F6F6F6;
 			border-radius: 16rpx;
-			font-size: 26rpx;
+			font-size: 28rpx;
+			color: #AAAAAA;
+			text-align: center;
+			line-height: 72rpx;
 		}
 	}
+}
 
-	.f-uploadimg {
-		margin-top: 20rpx;
+.f-issuedes-card {
+	margin-top: 28rpx;
 
-		.f-title {
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #222222;
-		}
+	.f-title {
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
 	}
 
-	.f-tips {
+	.item-issuedes-box {
 		margin-top: 20rpx;
-		text-align: center;
-		font-weight: bold;
-		font-size: 24rpx;
-		color: #AAAAAA;
-		position: relative;
-		.contact-btn {
-			position: absolute;
-			width:160rpx;
-			top: -30rpx;
-			right:200rpx;
-			height: 70rpx;
-			opacity: 0;
-		}
+		height: 290rpx;
+		padding: 20rpx;
+		background: #FFFFFF;
+		border-radius: 16rpx;
+		font-size: 26rpx;
 	}
+}
 
-	.submit-btn {
-		margin-top: 20rpx;
-		width: 100%;
-		height: 100rpx;
-		background: #C8FF0C;
-		border-radius: 60rpx;
+.f-uploadimg {
+	margin-top: 20rpx;
+
+	.f-title {
 		font-weight: bold;
-		font-size: 32rpx;
+		font-size: 28rpx;
 		color: #222222;
-		text-align: center;
-		line-height: 100rpx;
 	}
+}
+
+.f-tips {
+	margin-top: 20rpx;
+	text-align: center;
+	font-weight: bold;
+	font-size: 24rpx;
+	color: #AAAAAA;
+	position: relative;
+
+	.contact-btn {
+		position: absolute;
+		width: 160rpx;
+		top: -30rpx;
+		right: 200rpx;
+		height: 70rpx;
+		opacity: 0;
+	}
+}
+
+.submit-btn {
+	margin-top: 20rpx;
+	width: 100%;
+	height: 100rpx;
+	background: #C8FF0C;
+	border-radius: 60rpx;
+	font-weight: bold;
+	font-size: 32rpx;
+	color: #222222;
+	text-align: center;
+	line-height: 100rpx;
+}
 </style>

+ 185 - 170
src/pages/mine/index.vue

@@ -7,9 +7,10 @@
 		<view class="m-content">
 			<view class="m-header-info">
 				<view class="user-info">
-					<image class="user-header" v-if="token&&userinfo.userAvatar!==null" :src="userinfo.userAvatar" mode=""></image>
+					<image class="user-header" v-if="token && userinfo.userAvatar !== null" :src="userinfo.userAvatar"
+						mode=""></image>
 					<image class="user-header" v-else src="@/static/default-header.png" mode=""></image>
-					<view class="user-nickname">{{token?userinfo.userName:'暂未登录'}}</view>
+					<view class="user-nickname textHidden">{{ token ? userinfo.userName : '暂未登录' }}</view>
 				</view>
 				<view class="user-setting" @click="RouterUtils.to_page('/pages/mine/accountSetting/index')">
 					<image src="@/static/account-setting.png" mode="widthFix"></image>
@@ -20,16 +21,16 @@
 	<view style="height: 100rpx;"></view>
 	<view class="content">
 		<view class="m-mineinfo-card">
-			<view class="item-info" v-for="(item,index) in cardList" :key="index"
+			<view class="item-info" v-for="(item, index) in cardList" :key="index"
 				@click="RouterUtils.to_page(`/pages/mine/orderInfo/index?selIndex=${index}`)">
 				<zzx-icon :name="item.icon" size="30"></zzx-icon>
-				<view class="item-text">{{item.name}}</view>
+				<view class="item-text">{{ item.name }}</view>
 			</view>
 		</view>
 		<view class="m-function-list">
 			<view class="list-title">我的功能</view>
 			<view class="cell-list">
-				<view class="item-cell-contact">
+				<view class="item-cell-contact" @click="testdt">
 					<view class="">客服</view>
 					<zzx-icon name="ashRight" size="10"></zzx-icon>
 					<button class="contact-btn" open-type="contact"></button>
@@ -48,209 +49,223 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted,computed } from 'vue'
-	import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
-	import zzxCell from '@/components/zzx-cell/zzx-cell.vue';
-	import { RouterUtils,TipsUtils } from '@/utils/util';
-	import { http } from '@/utils/http'
-	import { useCacheStore } from '@/stores/cache'
-	import { onLoad, onPageScroll } from '@dcloudio/uni-app';
-	const cache = useCacheStore()
-	const token=computed(()=>{
-		return cache.get('TOKEN')
-	})
-	const userinfo=computed(()=>{
-		return cache.get('USER_INFO')
+import { ref, onMounted, computed } from 'vue'
+import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
+import zzxCell from '@/components/zzx-cell/zzx-cell.vue';
+import { RouterUtils, TipsUtils } from '@/utils/util';
+import { http } from '@/utils/http'
+import { useCacheStore } from '@/stores/cache'
+import { onLoad, onPageScroll } from '@dcloudio/uni-app';
+const cache = useCacheStore()
+const token = computed(() => {
+	return cache.get('TOKEN')
+})
+const userinfo = computed(() => {
+	return cache.get('USER_INFO')
+})
+const userAvatar = ref('/src/static/default-header.png')
+const cardList = ref([{
+	name: '全部订单',
+	icon: 'm-allorder'
+}, {
+	name: '待付款',
+	icon: 'm-pendPay'
+}, {
+	name: '待使用',
+	icon: 'm-pendUse'
+}, {
+	name: '已完成',
+	icon: 'm-done'
+}, {
+	name: '售后',
+	icon: 'm-after-sales'
+},])
+onMounted(() => {
+	get_userinfo()
+})
+onPageScroll((e) => { })
+
+const submitLogin = () => {
+	uni.login({
+		provider: 'weixin',
+		success: (res) => {
+			get_logininfo(res.code)
+		}
 	})
-	const userAvatar=ref('/src/static/default-header.png')
-	const cardList = ref([{
-		name: '全部订单',
-		icon: 'm-allorder'
-	}, {
-		name: '待付款',
-		icon: 'm-pendPay'
-	}, {
-		name: '待使用',
-		icon: 'm-pendUse'
-	}, {
-		name: '已完成',
-		icon: 'm-done'
-	}, {
-		name: '售后',
-		icon: 'm-after-sales'
-	},])
-	onMounted(()=>{
+}
+
+const get_logininfo = (item: string) => {
+	http.get('/user/loginByCode', { data: { code: item }, loading: true }).then(res => {
+		cache.set('TOKEN', res.result.token)
+		cache.set('USER_INFO', res.result)
 		get_userinfo()
+		TipsUtils.tips_toast('登录成功')
 	})
-	onPageScroll((e) => { })
+}
 
-	const submitLogin = () => {
-		uni.login({
-			provider: 'weixin',
-			success: (res) => {
-				get_logininfo(res.code)
-			}
-		})
-	}
+const get_userinfo = () => {
+	http.get('/user/getUserInfo', { loading: true }).then(res => {
+		cache.set('USER_INFO', res.result)
+	})
+}
 
-	const get_logininfo = (item:string) => {
-		http.get('/user/loginByCode', {data:{code:item}, loading: true }).then(res => {
-			cache.set('TOKEN',res.result.token)
-			cache.set('USER_INFO',res.result)
-			get_userinfo()
-			TipsUtils.tips_toast('登录成功')
-		})
-	}
-	
-	const get_userinfo=()=>{
-		http.get('/user/getUserInfo', { loading: true }).then(res => {
-			cache.set('USER_INFO',res.result)
-		})
-	}
+const testdt = () => {
+	uni.requestSubscribeMessage({
+		tmplIds: ['Yi1Z1IKRwgF6-mpiFcOUTvavc4TUAsfsLynK_3Yu350'],
+		success(res) {
+			console.log(res, '订阅消息成功')
+		},
+		fail(err) {
+			console.log(err, '订阅消息失败')
+		}
+	})
+
+}
 </script>
 
 <style>
-	page {
-		background: #fff;
-	}
+page {
+	background: #fff;
+}
 </style>
 <style lang="less" scoped>
-	.m-header {
-		.header-bgImg {
-			width: 100%;
-		}
+.m-header {
+	.header-bgImg {
+		width: 100%;
 	}
+}
 
-	.m-content-box {
-		position: relative;
-
-		.m-content {
-			position: absolute;
-			border-radius: 32rpx 32rpx 0 0;
-			background: #fff;
-			top: -60rpx;
-			width: 100%;
-			height: 160rpx;
+.m-content-box {
+	position: relative;
 
-			.m-header-info {
-				.user-info {
-					text-align: center;
-					position: relative;
+	.m-content {
+		position: absolute;
+		border-radius: 32rpx 32rpx 0 0;
+		background: #fff;
+		top: -60rpx;
+		width: 100%;
+		height: 160rpx;
 
-					.user-header {
-						position: absolute;
-						left: 50%;
-						transform: translate(-50%, -50%);
-						width: 160rpx;
-						height: 160rpx;
-						border-radius: 50%;
-					}
+		.m-header-info {
+			.user-info {
+				text-align: center;
+				position: relative;
 
-					.user-nickname {
-						position: absolute;
-						left: 50%;
-						transform: translate(-50%, -50%);
-						top: 130rpx;
-						font-weight: 800;
-						font-size: 36rpx;
-						color: #222222;
-					}
+				.user-header {
+					position: absolute;
+					left: 50%;
+					transform: translate(-50%, -50%);
+					width: 160rpx;
+					height: 160rpx;
+					border-radius: 50%;
 				}
 
-				.user-setting {
+				.user-nickname {
 					position: absolute;
-					right: 0;
-					top: 24rpx;
+					left: 50%;
+					transform: translate(-50%, -50%);
+					top: 130rpx;
+					font-weight: 800;
+					font-size: 36rpx;
+					color: #222222;
+					width: 500rpx;
+				}
+			}
+
+			.user-setting {
+				position: absolute;
+				right: 0;
+				top: 24rpx;
 
-					&>image {
-						width: 170rpx;
-					}
+				&>image {
+					width: 170rpx;
 				}
 			}
 		}
 	}
+}
 
-	.m-mineinfo-card {
-		background: #F6F6F6;
-		border-radius: 32rpx;
-		padding: 20rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-		margin-top: 20rpx;
+.m-mineinfo-card {
+	background: #F6F6F6;
+	border-radius: 32rpx;
+	padding: 20rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-around;
+	margin-top: 20rpx;
 
-		.item-info {
-			text-align: center;
+	.item-info {
+		text-align: center;
 
-			.item-text {
-				font-size: 24rpx;
-				color: #222222;
-			}
+		.item-text {
+			font-size: 24rpx;
+			color: #222222;
 		}
 	}
+}
 
-	.m-function-list {
-		margin-top: 28rpx;
+.m-function-list {
+	margin-top: 28rpx;
 
-		.list-title {
-			font-weight: 800;
-			font-size: 32rpx;
-			color: #222222;
-		}
+	.list-title {
+		font-weight: 800;
+		font-size: 32rpx;
+		color: #222222;
+	}
 
-		.cell-list {
-			.item-cell-contact {
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				font-size: 28rpx;
-				color: #181818;
-				height: 70rpx;
-				padding: 10rpx;
-				position: relative;
+	.cell-list {
+		.item-cell-contact {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			font-size: 28rpx;
+			color: #181818;
+			height: 70rpx;
+			padding: 10rpx;
+			position: relative;
 
-				.contact-btn {
-					position: absolute;
-					width: 100%;
-					height: 70rpx;
-					opacity: 0;
-					// background-color: #C8FF0C;
-				}
+			.contact-btn {
+				position: absolute;
+				width: 100%;
+				height: 70rpx;
+				opacity: 0;
+				// background-color: #C8FF0C;
 			}
+		}
 
-			.item-cell-contact:active {
-				background-color: #ececec;
-				border-radius: 20rpx;
-			}
+		.item-cell-contact:active {
+			background-color: #ececec;
+			border-radius: 20rpx;
 		}
 	}
+}
 
-	.login-tips {
-		position: fixed;
-		bottom: 22rpx;
-		width: 686rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		padding: 10rpx;
-		background: rgba(0, 0, 0, 0.6);
-		border-radius: 8rpx;
-		z-index: 9999;
+.login-tips {
+	position: fixed;
+	bottom: 22rpx;
+	width: 686rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	padding: 10rpx;
+	background: rgba(0, 0, 0, 0.6);
+	border-radius: 8rpx;
+	z-index: 9999;
 
-		&>view:first-child {
-			font-size: 28rpx;
-			color: #FFFFFF;
-		}
+	&>view:first-child {
+		font-size: 28rpx;
+		color: #FFFFFF;
+	}
 
-		&>view:last-child {
-			width: 160rpx;
-			height: 60rpx;
-			background: #C8FF0C;
-			border-radius: 8rpx;
-			font-size: 28rpx;
-			color: #222222;
-			text-align: center;
-			line-height: 60rpx;
-		}
+	&>view:last-child {
+		width: 160rpx;
+		height: 60rpx;
+		background: #C8FF0C;
+		border-radius: 8rpx;
+		font-size: 28rpx;
+		color: #222222;
+		text-align: center;
+		line-height: 60rpx;
 	}
+}
 </style>

+ 2 - 2
src/pages/mine/mineComments/index.vue

@@ -6,7 +6,7 @@
 		<view class="m-comments-card" v-for="item in commentsList" :key="item.id">
 			<view class="m-comments-name">
 				<zzx-icon name="venue-icon4" size="14"></zzx-icon>
-				<view class="name">{{item.departName}}</view>
+				<view class="name">{{item.address}}</view>
 				<zzx-icon name="ashRight" size="12"></zzx-icon>
 			</view>
 			<view class="line"></view>
@@ -20,7 +20,7 @@
 				<view class="user-time">{{item.createTime}}</view>
 			</view>
 			<view class="m-star">
-				<view class="star">{{item.score}}</view>
+				<view class="star">{{item.score.toFixed(1)}}</view>
 				<uni-rate :readonly="true" size="16" :value="item.score" />
 			</view>
 			<view class="m-comments">

+ 247 - 172
src/pages/mine/orderInfo/index.vue

@@ -1,261 +1,336 @@
 <template>
 	<view class="o-header-list">
-		<view :class="[selected==index?'sel-item-list':'item-list']" v-for="(item,index) in orderTypeList" :key="index"
-			@click="selectedItem(index)">{{item}}</view>
+		<view :class="[selected == index ? 'sel-item-list' : 'item-list']" v-for="(item, index) in orderTypeList"
+			:key="index" @click="selectedItem(index)">{{ item }}</view>
 	</view>
 	<view style="height: 80rpx;"></view>
 	<view class="content">
-		<view class="o-orderlist-card" v-for="item in 2">
+		<view class="o-orderlist-card" v-for="item in orderList" :key="item.orderId"
+			@click="RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${item.orderId}&orderType=${item.orderType}`)">
 			<view class="o-order-name">
-				<view class="order-name">场地:林旦综合运动馆</view>
+				<view class="order-name">场地:{{ item.orderProInfoList[0].address || '--' }}</view>
 				<!-- 待付款 -->
-				<view class="order-status" v-if="selected==1">待支付(剩余14:23)</view>
-				<view class="item-order-status" style="color:#FB5B5B;" v-if="selected==2">待使用</view>
-				<view class="item-order-status" v-if="selected==3">已使用</view>
-				<view class="item-order-status" v-if="selected==4">已退款</view>
+				<view class="order-status" v-if="item.orderStatus == 0">待支付(剩余{{ downTime }})</view>
+				<view class="item-order-status" style="color:#FB5B5B;" v-if="item.orderStatus == 1">待使用</view>
+				<view class="item-order-status" v-if="item.orderStatus == 2">已使用</view>
+				<view class="item-order-status" v-if="item.orderStatus == 3">已到期</view>
+				<view class="item-order-status" v-if="item.orderStatus == 4">已取消</view>
+				<view class="item-order-status" v-if="item.orderStatus == 5">待退款</view>
+				<view class="item-order-status" v-if="item.orderStatus == 6">已退款</view>
 			</view>
 			<view class="line"></view>
 			<view class="o-order-info">
 				<view class="item-info">
-					<!-- 多个商品 -->
-<!-- 					<scroll-view class="scroll-view_H scroll-order" scroll-x="true">
-						<view class="scroll-view-item_H scroll-order-item" v-for="item in 5">
+					<!-- 有保险 -->
+					<scroll-view class="scroll-view_H scroll-order" scroll-x="true"
+						v-if="item.orderInsureList.length > 0">
+						<view class="scroll-view-item_H scroll-order-item">
 							<view class="item-order">
 								<view class="order-img">
-									<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode="">
+									<image :src="item.orderProInfoList[0].productImage" mode="">
 									</image>
 								</view>
-								<view class="order-name textHidden">参赛意外险参赛意外险</view>
+								<view class="order-name textHidden">{{ item.orderProInfoList[0].productName }}</view>
 							</view>
 						</view>
-					</scroll-view> -->
-					<!-- 单个商品 -->
-					<view class="item-order-single">
+						<view class="scroll-view-item_H scroll-order-item">
+							<view class="item-order">
+								<view class="order-img">
+									<image :src="item.orderInsureList[0].productImage" mode="">
+									</image>
+								</view>
+								<view class="order-name textHidden">{{ item.orderInsureList[0].productName }}</view>
+							</view>
+						</view>
+					</scroll-view>
+					<!-- 没保险 -->
+					<view class="item-order-single" v-else>
 						<view class="single-img">
-							<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
+							<image :src="item.orderProInfoList[0].productImage" mode=""></image>
 						</view>
 						<view class="single-name">
-							<view class="item-single-name textHidden" v-for="item in 3">不限场地·指定时段·免费不限场地·指定时段·免费...
-							</view>
+							<view class="item-single-name textHidden">{{ item.orderProInfoList[0].productName }}</view>
 						</view>
 					</view>
 				</view>
 				<view class="order-data">
-					<view class="order-price"><text class="mini-text">¥</text>25.9</view>
-					<view class="order-num">共2件</view>
+					<view class="order-price"><text class="mini-text">¥</text>{{ item.price.toFixed(2) }}</view>
+					<view class="order-num">共{{ item.orderProInfoList.length }}件</view>
 				</view>
 			</view>
 			<view class="line"></view>
 			<!-- 待付款 -->
 			<view class="o-order-btn">
-				<view class="cancel-btn" v-if="selected==1">取消订单</view>
-				<view class="pay-btn" v-if="selected==1">付款</view>
+				<view class="cancel-btn" v-if="selected == 1">取消订单</view>
+				<view class="pay-btn" v-if="selected == 1">付款</view>
 				<!-- 售后/退款 -->
-				<view class="pay-btn" v-if="selected==3">评价</view>
+				<view class="pay-btn" v-if="selected == 3">评价</view>
 				<!-- 已使用 -->
-				<view class="cancel-btn" v-if="selected==4">申请退款</view>
-				<view class="pay-btn" v-if="selected==4">凭证</view>
+				<view class="cancel-btn" v-if="selected == 4">申请退款</view>
+				<view class="pay-btn" v-if="selected == 4">凭证</view>
 			</view>
 			<!-- 待使用 -->
-			<view class="o-order-tips">
+			<view class="o-order-tips" v-if="item.orderStatus == 1">
 				限04.23 06:00-08:00使用,过期作废
 			</view>
 		</view>
-		<zs-empty></zs-empty>
+		<zs-empty v-if="orderList.length == 0"></zs-empty>
 	</view>
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted } from 'vue'
-	import { onLoad } from '@dcloudio/uni-app';
-	import zsEmpty from '@/components/zs-empty/index.vue'
-	const selected = ref(0)
-	const orderTypeList = ref(['全部', '待付款', '待使用', '已使用', '退款/售后'])
-	
-	onLoad((option)=>{
-		selected.value=option.selIndex
-	})
-	const selectedItem = (i) => {
-		selected.value = i
+import { ref, onMounted } from 'vue'
+import { http } from '@/utils/http'
+import { onLoad } from '@dcloudio/uni-app';
+import zsEmpty from '@/components/zs-empty/index.vue'
+import { RouterUtils } from '@/utils/util'
+const selected = ref(0)
+const orderTypeList = ref(['全部', '待付款', '待使用', '已使用', '退款/售后'])
+
+onLoad((option) => {
+	selected.value = option.selIndex
+})
+onMounted(() => {
+	getOrderList()
+})
+const selectedItem = (i) => {
+	selected.value = i
+	if (i == 0) {
+		orderFormData.value.orderStatus = null
+	} else if (i == 1) {
+		orderFormData.value.orderStatus = 0
+	} else if (i == 2) {
+		orderFormData.value.orderStatus = 1
+	} else if (i == 3) {
+		orderFormData.value.orderStatus = 2
+	}else if (i == 4) {
+		orderFormData.value.orderStatus = null
+		orderFormData.value.orAfterSale=1
 	}
+	getOrderList()
+}
+
+// 获取订单数据
+const orderFormData = ref({
+	pageNum: 1,
+	pageSize: 10,
+	orderStatus:null,
+	orAfterSale: 0
+})
+const orderList = ref([])
+const downTime = ref(null)
+// 订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-待退款 6已退款
+const getOrderList = () => {
+	http.post('/order/pageOrders', orderFormData.value, { loading: true }).then((res) => {
+		orderList.value = res.result.records
+		orderList.value.forEach((item) => {
+			if (item.orderStatus == 0) {
+				const createTime = new Date(item.orderProInfoList[0].createTime);
+				const endTime = new Date(createTime.getTime() + 15 * 60 * 1000);
+				const remainingTime = endTime - new Date();
+				if (remainingTime > 0) {
+					const minutes = Math.floor(remainingTime / (1000 * 60));
+					const seconds = Math.floor((remainingTime % (1000 * 60)) / 1000);
+					downTime.value = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
+					const timer = setInterval(() => {
+						const now = new Date();
+						const newRemainingTime = endTime - now;
+						if (newRemainingTime <= 0) {
+							clearInterval(timer);
+							downTime.value = "00:00";
+							return;
+						}
+						const newMinutes = Math.floor(newRemainingTime / (1000 * 60));
+						const newSeconds = Math.floor((newRemainingTime % (1000 * 60)) / 1000);
+						downTime.value = `${newMinutes.toString().padStart(2, '0')}:${newSeconds.toString().padStart(2, '0')}`;
+					}, 1000);
+				} else {
+					downTime.value = "00:00";
+				}
+			}
+		})
+	})
+}
+
+
 </script>
 
 <style lang="less" scoped>
-	.o-header-list {
-		position: fixed;
-		top: 0;
-		width: 100%;
+.o-header-list {
+	position: fixed;
+	top: 0;
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: space-around;
+	height: 80rpx;
+	background: #fff;
+	z-index: 1000;
+
+	.sel-item-list {
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
+		transition: all .3s;
+	}
+
+	.item-list {
+		font-size: 28rpx;
+		color: #AAAAAA;
+		transition: all .3s;
+	}
+}
+
+.o-orderlist-card {
+	background: #FFFFFF;
+	border-radius: 32rpx;
+	padding: 20rpx;
+	margin-top: 20rpx;
+
+	.o-order-name {
 		display: flex;
 		align-items: center;
-		justify-content: space-around;
-		height: 80rpx;
-		background: #fff;
-		z-index: 1000;
+		justify-content: space-between;
+		margin-bottom: 26rpx;
+
+		.order-name {
+			font-size: 24rpx;
+			color: #222222;
+		}
 
-		.sel-item-list {
+		.order-status {
 			font-weight: bold;
 			font-size: 28rpx;
-			color: #222222;
-			transition: all .3s;
+			color: #FB5B5B;
 		}
 
-		.item-list {
+		.item-order-status {
+			font-weight: bold;
 			font-size: 28rpx;
 			color: #AAAAAA;
-			transition: all .3s;
 		}
 	}
 
-	.o-orderlist-card {
-		background: #FFFFFF;
-		border-radius: 32rpx;
-		padding: 20rpx;
-		margin-top: 20rpx;
-
-		.o-order-name {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			margin-bottom: 26rpx;
-
-			.order-name {
-				font-size: 24rpx;
-				color: #222222;
-			}
-
-			.order-status {
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #FB5B5B;
-			}
-
-			.item-order-status {
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #AAAAAA;
-			}
-		}
-
-		.o-order-info {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			margin-top: 24rpx;
-			margin-bottom: 24rpx;
-
-			.item-info {
+	.o-order-info {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		margin-top: 24rpx;
+		margin-bottom: 24rpx;
 
-				// 多个商品
-				.scroll-order {
-					width: 560rpx;
+		.item-info {
 
-					.scroll-order-item {
-						margin-right: 20rpx;
+			// 多个商品
+			.scroll-order {
+				width: 500rpx;
 
-						.item-order {
-							.order-img {
-								&>image {
-									width: 160rpx;
-									height: 160rpx;
-									border-radius: 16rpx;
-								}
-							}
+				.scroll-order-item {
+					margin-right: 20rpx;
 
-							.order-name {
+					.item-order {
+						.order-img {
+							&>image {
 								width: 160rpx;
-								font-size: 28rpx;
-								color: #222222;
+								height: 160rpx;
+								border-radius: 16rpx;
 							}
 						}
-					}
-				}
 
-				// 单个商品
-				.item-order-single {
-					display: flex;
-					align-items: center;
-					gap: 20rpx;
-
-					.single-img {
-						&>image {
+						.order-name {
 							width: 160rpx;
-							height: 160rpx;
-							border-radius: 16rpx;
-						}
-					}
-
-					.single-name {
-						width: 360rpx;
-						font-size: 28rpx;
-						color: #222222;
-
-						.item-single-name {
-							width: 360rpx;
-							margin-bottom: 10rpx;
+							font-size: 28rpx;
+							color: #222222;
 						}
 					}
 				}
 			}
 
-			.order-data {
-				width: 100rpx;
-				border-left: 1rpx solid #efefef;
-				text-align: center;
+			// 单个商品
+			.item-order-single {
+				display: flex;
+				align-items: center;
+				gap: 20rpx;
 
-				.order-price {
-					font-weight: 800;
-					font-size: 36rpx;
-					color: #FB5B5B;
+				.single-img {
+					&>image {
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 16rpx;
+					}
 				}
 
-				.order-num {
-					margin-top: 10rpx;
-					font-size: 24rpx;
-					color: #AAAAAA;
+				.single-name {
+					width: 360rpx;
+					font-size: 28rpx;
+					color: #222222;
+
+					.item-single-name {
+						width: 360rpx;
+						margin-bottom: 10rpx;
+					}
 				}
 			}
 		}
 
-		.o-order-btn {
-			display: flex;
-			align-items: center;
-			justify-content: flex-end;
-			gap: 20rpx;
-			margin-top: 24rpx;
+		.order-data {
+			width: 400rpx;
+			border-left: 1rpx solid #efefef;
+			text-align: center;
 
-			.cancel-btn {
-				width: 200rpx;
-				height: 68rpx;
-				background: #FFFFFF;
-				border-radius: 60rpx;
-				border: 2rpx solid #AAAAAA;
-				font-weight: bold;
+			.order-price {
+				font-weight: 600;
 				font-size: 28rpx;
-				color: #AAAAAA;
-				line-height: 68rpx;
-				text-align: center;
+				color: #FB5B5B;
 			}
 
-			.pay-btn {
-				width: 200rpx;
-				height: 68rpx;
-				background: #C8FF0C;
-				border-radius: 60rpx;
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #222222;
-				text-align: center;
-				line-height: 68rpx;
+			.order-num {
+				margin-top: 10rpx;
+				font-size: 24rpx;
+				color: #AAAAAA;
 			}
 		}
+	}
+
+	.o-order-btn {
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+		gap: 20rpx;
+		margin-top: 24rpx;
 
-		.o-order-tips {
-			margin-top: 24rpx;
-			background: #F6F6F6;
-			border-radius: 16rpx;
-			padding: 20rpx;
+		.cancel-btn {
+			width: 200rpx;
+			height: 68rpx;
+			background: #FFFFFF;
+			border-radius: 60rpx;
+			border: 2rpx solid #AAAAAA;
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #AAAAAA;
+			line-height: 68rpx;
+			text-align: center;
+		}
+
+		.pay-btn {
+			width: 200rpx;
+			height: 68rpx;
+			background: #C8FF0C;
+			border-radius: 60rpx;
+			font-weight: bold;
 			font-size: 28rpx;
 			color: #222222;
+			text-align: center;
+			line-height: 68rpx;
 		}
 	}
+
+	.o-order-tips {
+		margin-top: 24rpx;
+		background: #F6F6F6;
+		border-radius: 16rpx;
+		padding: 20rpx;
+		font-size: 28rpx;
+		color: #222222;
+	}
+}
 </style>

+ 1 - 1
src/pages/mine/reviseNickname/index.vue

@@ -24,7 +24,7 @@
 	const username=ref('')
 	const submit=()=>{
 		if(username.value=='') return TipsUtils.tips_toast('请输入昵称')
-		http.get('/user/updateUserInfo',{data:{nickName:username.value,avatarUrl:'https://c-ssl.dtstatic.com/uploads/blog/202107/11/20210711174826_ba57b.thumb.1000_0.jpg'},loading:true}).then((res)=>{
+		http.get('/user/updateUserInfo',{data:{nickName:username.value},loading:true}).then((res)=>{
 			get_userinfo()
 		})
 	}

+ 29 - 0
src/utils/common/upload.ts

@@ -0,0 +1,29 @@
+// 公共图片上传方法
+import { useCacheStore } from '@/stores/cache'
+
+export function uploadImage(tempFilePath: string, onSuccess?: (url: string) => void, onFail?: (err: any) => void) {
+    const cache = useCacheStore()
+    uni.uploadFile({
+        url: 'http://192.168.0.11:8080/jeecg-boot/sys/common/upload',
+        filePath: tempFilePath,
+        name: 'file',
+        header: {
+            'x-access-token': cache.get('TOKEN')
+        },
+        success: (res) => {
+            const data =JSON.parse(res.data)
+            if (res.statusCode == 200){
+                // uni.showToast({ title: '上传成功', icon: 'success' })
+                onSuccess && onSuccess(data.message)
+            } else {
+                uni.showToast({ title: '上传失败', icon: 'none' })
+                onFail && onFail(data)
+            }
+        },
+        fail: (err) => {
+            console.log(err)
+            uni.showToast({ title: '上传失败', icon: 'none' })
+            onFail && onFail(err)
+        }
+    })
+}

+ 2 - 2
src/utils/http/index.ts

@@ -179,9 +179,9 @@ export class HttpClient {
 
 // 创建实例
 export const http = new HttpClient({
-  baseURL: 'http://192.168.1.34:8080/jeecg-boot/app',
+  // baseURL: 'http://192.168.1.34:8080/jeecg-boot/app',
   // baseURL: 'http://192.168.1.166:8080/jeecg-boot/app',
-  // baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
+  baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
   headers: {
     'Content-Type': 'application/json'
   }

+ 22 - 16
src/utils/util/index.ts

@@ -180,22 +180,28 @@ export const randomColor = (): string => {
  * @param url - 图片地址
  */
 export const _previewImage = (urls: any, current: string) => {
-    uni.previewImage({
-        urls,
-        current, // 指定当前图片
-        longPressActions: {
-            itemList: ['发送给朋友', '保存图片', '收藏'],
-            success: function (data) {
-                uni.showToast({
-                    title: '操作成功',
-                    icon: 'none'
-                })
-            },
-            fail: function (err) {
-                console.log(err.errMsg);
-            }
-        }
-    });
+	let previewUrls = urls;
+	let previewCurrent = current;
+	if (Array.isArray(urls) && urls.length === 1) {
+		previewUrls = [current];
+		previewCurrent = current;
+	}
+	uni.previewImage({
+		urls: previewUrls,
+		current: previewCurrent, // 指定当前图片
+		longPressActions: {
+			itemList: ['发送给朋友', '保存图片', '收藏'],
+			success: function (data) {
+				uni.showToast({
+					title: '操作成功',
+					icon: 'none'
+				})
+			},
+			fail: function (err) {
+				console.log(err.errMsg);
+			}
+		}
+	});
 }
 
 /**