待审核列表的修改页面
1、 tabbars的发布活动在选择草稿箱中的内容发布 我发布页面的草稿箱列表
This commit is contained in:
		
							parent
							
								
									8104c5df2f
								
							
						
					
					
						commit
						a251c2fcc1
					
				@ -1,8 +1,8 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view>
 | 
			
		||||
		<view class="long-data-picker">
 | 
			
		||||
			<picker-view :value="valueDate" indicator-class="select-line" :immediate-change="true"
 | 
			
		||||
				:indicator-style="itemHeight" @change="bindDateChange">
 | 
			
		||||
			<picker-view indicator-class="select-line" :immediate-change="true" :indicator-style="itemHeight"
 | 
			
		||||
				@change="bindDateChange">
 | 
			
		||||
 | 
			
		||||
				<picker-view-column>
 | 
			
		||||
					<view class="long-datetime-item" v-for="(item,index) in dates" :key="index">{{item}}</view>
 | 
			
		||||
@ -48,11 +48,12 @@
 | 
			
		||||
				hours: [],
 | 
			
		||||
				minutes: [],
 | 
			
		||||
				formatdates: [],
 | 
			
		||||
				currentTimePlus8Hours: null, // 新增属性
 | 
			
		||||
				valueDate: [0, 0, 0]
 | 
			
		||||
				currentTime: new Date(),
 | 
			
		||||
				currentTimePlus8Hours: null // 新增属性
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		computed: {
 | 
			
		||||
			//自动计算当前时间
 | 
			
		||||
			currentdateindex(nv) {
 | 
			
		||||
@ -85,301 +86,140 @@
 | 
			
		||||
 | 
			
		||||
		},
 | 
			
		||||
		mounted() {
 | 
			
		||||
			// 获取当前时间
 | 
			
		||||
			this.currentTime = new Date();
 | 
			
		||||
			// 计算当前时间加8小时
 | 
			
		||||
			this.currentTimePlus8Hours = new Date(this.currentTime);
 | 
			
		||||
			this.currentTimePlus8Hours.setHours(this.currentTime.getHours());
 | 
			
		||||
 | 
			
		||||
			// 使用传入的默认时间或当前时间加8小时作为基准
 | 
			
		||||
			const baseTime = this.defaultTime || this.currentTimePlus8Hours;
 | 
			
		||||
			this.initDate(baseTime);
 | 
			
		||||
			// // 计算当前时间加8小时
 | 
			
		||||
			// const now = new Date();
 | 
			
		||||
			// now.setHours(now.getHours() + 8);
 | 
			
		||||
			// this.currentTimePlus8Hours = now;
 | 
			
		||||
			// this.initDate();
 | 
			
		||||
			this.initDate();
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			//初始化时间
 | 
			
		||||
			initDate(baseTime) {
 | 
			
		||||
			initDate() {
 | 
			
		||||
				let currentdate = moment().format("MMM Do");
 | 
			
		||||
				// console.log('');
 | 
			
		||||
				//设置日期数组
 | 
			
		||||
				this.dates = [];
 | 
			
		||||
				this.formatdates = [];
 | 
			
		||||
				this.dates = []
 | 
			
		||||
				//格式化日期数组
 | 
			
		||||
				this.formatdates = []
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				// 生成日期选项(从今天开始)
 | 
			
		||||
				for (let i = 0; i <= this.chooseNum; i++) {
 | 
			
		||||
					const date = moment(baseTime).add(i, 'days');
 | 
			
		||||
					this.formatdates.push(date.format("YYYY-MM-DD"));
 | 
			
		||||
					this.dates.push(date.format("MMMDo dddd"));
 | 
			
		||||
					const date = moment().add(i, 'days');
 | 
			
		||||
					this.formatdates.push(moment().add(i, 'days').format("YYYY-MM-DD"))
 | 
			
		||||
					this.dates.push(moment().add(i, 'days').format("MMMDo dddd"))
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// 设置时间选项
 | 
			
		||||
				this.updateTimeColumns(baseTime);
 | 
			
		||||
				let h = parseInt(moment().format("HH"))
 | 
			
		||||
				this.hours = []
 | 
			
		||||
				for (let i = h; i < 24; i++) {
 | 
			
		||||
					let str = i;
 | 
			
		||||
					if (i < 10) {
 | 
			
		||||
						str = '0' + str;
 | 
			
		||||
					} else {
 | 
			
		||||
						str = '' + str;
 | 
			
		||||
					}
 | 
			
		||||
					this.hours.push(str);
 | 
			
		||||
				}
 | 
			
		||||
				this.minutes = []
 | 
			
		||||
				let m = parseInt(moment().format("mm"))
 | 
			
		||||
				console.log('m', m);
 | 
			
		||||
				for (let i = m; i < 60; i++) {
 | 
			
		||||
					let str = i;
 | 
			
		||||
					if (i < 10) {
 | 
			
		||||
						str = '0' + str;
 | 
			
		||||
					} else {
 | 
			
		||||
						str = '' + str;
 | 
			
		||||
					}
 | 
			
		||||
					this.minutes.push(str);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// 使用$nextTick确保DOM更新后再设置默认值
 | 
			
		||||
				setTimeout(() => {
 | 
			
		||||
					this.setDefaultValueDate();
 | 
			
		||||
				}, 300)
 | 
			
		||||
				console.log('');
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			// 设置默认选中当前时间+8小时的选项
 | 
			
		||||
			setDefaultValueDate() {
 | 
			
		||||
				const now = new Date();
 | 
			
		||||
				// 计算当前时间+8小时的小时值
 | 
			
		||||
				let targetHourStr = now.getHours() + 8;
 | 
			
		||||
				if (targetHourStr >= 24) {
 | 
			
		||||
					targetHourStr -= 24;
 | 
			
		||||
				}
 | 
			
		||||
				console.log(this.hours);
 | 
			
		||||
				console.log(targetHourStr);
 | 
			
		||||
 | 
			
		||||
				let targetDayStr = now.getDay();
 | 
			
		||||
				console.log('targetDayStr',targetDayStr);
 | 
			
		||||
				if (targetHourStr >= 24) {
 | 
			
		||||
					// targetHourStr -= 24;
 | 
			
		||||
					this.valueDate = [0, 0, 0];
 | 
			
		||||
				}
 | 
			
		||||
			//滚动切换时间
 | 
			
		||||
			bindDateChange(e) { //有效日期的滚动日期时间方法
 | 
			
		||||
				console.log('滚动切换时间',e.detail.value);
 | 
			
		||||
				let valueArr = e.detail.value
 | 
			
		||||
				this.hours = []
 | 
			
		||||
				this.minutes = []
 | 
			
		||||
				
 | 
			
		||||
				// 在hours数组中查找对应的索引
 | 
			
		||||
				const hourIndex = this.hours.findIndex(hour => hour == targetHourStr);
 | 
			
		||||
				console.log(hourIndex);
 | 
			
		||||
				// 设置valueDate,日期和分钟保持默认索引0,只设置小时索引
 | 
			
		||||
				if (hourIndex !== -1) {
 | 
			
		||||
					this.valueDate = [0, hourIndex, 0];
 | 
			
		||||
				} else {
 | 
			
		||||
					// 如果找不到对应小时(比如当前时间+8小时超过了今天的可选范围),保持默认
 | 
			
		||||
					this.valueDate = [0, 0, 0];
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			updateTimeColumns(selectedDate) {
 | 
			
		||||
				const isToday = moment(selectedDate).isSame(this.currentTime, 'day');
 | 
			
		||||
				const now = new Date();
 | 
			
		||||
 | 
			
		||||
				// 如果是今天,小时从当前小时开始
 | 
			
		||||
				if (isToday) {
 | 
			
		||||
					// let currentHour = now.getHours() + 8;
 | 
			
		||||
					let currentHour = now.getHours();
 | 
			
		||||
					let currentMinute = now.getMinutes();
 | 
			
		||||
 | 
			
		||||
					// 生成小时选项(从当前小时到23)
 | 
			
		||||
					this.hours = [];
 | 
			
		||||
 | 
			
		||||
					for (let i = currentHour; i < 24; i++) {
 | 
			
		||||
						this.hours.push(i.toString().padStart(2, '0'));
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					// 生成分钟选项(如果是当前小时,分钟从当前分钟开始;否则从0开始)
 | 
			
		||||
					this.minutes = [];
 | 
			
		||||
					for (let i = currentMinute; i < 60; i++) {
 | 
			
		||||
						this.minutes.push(i.toString().padStart(2, '0'));
 | 
			
		||||
					}
 | 
			
		||||
					// let startMinute = (i === currentHour) ? currentMinute : 0;
 | 
			
		||||
					// for (let i = 0; i < 60; i++) {
 | 
			
		||||
					// 	this.minutes.push(i.toString().padStart(2, '0'));
 | 
			
		||||
					// }
 | 
			
		||||
				} else {
 | 
			
		||||
					// 如果不是今天,小时和分钟都从0开始
 | 
			
		||||
					this.hours = [];
 | 
			
		||||
				
 | 
			
		||||
				if (valueArr[0] != 0) {
 | 
			
		||||
					console.log('不是今天');
 | 
			
		||||
					for (let i = 0; i < 24; i++) {
 | 
			
		||||
						this.hours.push(i.toString().padStart(2, '0'));
 | 
			
		||||
						let str = i;
 | 
			
		||||
						if (i < 10) {
 | 
			
		||||
							str = '0' + str;
 | 
			
		||||
						} else {
 | 
			
		||||
							str = '' + str;
 | 
			
		||||
						}
 | 
			
		||||
						this.hours.push(str);
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					this.minutes = [];
 | 
			
		||||
					for (let i = 0; i < 60; i++) {
 | 
			
		||||
						this.minutes.push(i.toString().padStart(2, '0'));
 | 
			
		||||
						let str = i;
 | 
			
		||||
						if (i < 10) {
 | 
			
		||||
							str = '0' + str;
 | 
			
		||||
						} else {
 | 
			
		||||
							str = '' + str;
 | 
			
		||||
						}
 | 
			
		||||
						this.minutes.push(str);
 | 
			
		||||
					}
 | 
			
		||||
				} else {
 | 
			
		||||
					//是今天
 | 
			
		||||
					console.log('今天',);
 | 
			
		||||
					let h = parseInt(moment().format("HH"))
 | 
			
		||||
					console.log('今天1h',h);
 | 
			
		||||
					this.hours = []
 | 
			
		||||
					for (let i = h; i < 24; i++) {
 | 
			
		||||
						let str = i;
 | 
			
		||||
						if (i < 10) {
 | 
			
		||||
							str = '0' + str;
 | 
			
		||||
						} else {
 | 
			
		||||
							str = '' + str;
 | 
			
		||||
						}
 | 
			
		||||
						this.hours.push(str);
 | 
			
		||||
					}
 | 
			
		||||
					this.minutes = []
 | 
			
		||||
					const current = new Date()
 | 
			
		||||
					const currentHour = moment(current).hours();
 | 
			
		||||
					let m = parseInt(moment().format("mm"))
 | 
			
		||||
					console.log('今天1m',m,currentHour,h);
 | 
			
		||||
					if(valueArr[1] == 0 ){
 | 
			
		||||
						
 | 
			
		||||
						for (let i = m; i < 60; i++) {
 | 
			
		||||
							let str = i;
 | 
			
		||||
							if (i < 10) {
 | 
			
		||||
								str = '0' + str;
 | 
			
		||||
							} else {
 | 
			
		||||
								str = '' + str;
 | 
			
		||||
							}
 | 
			
		||||
							this.minutes.push(str);
 | 
			
		||||
						}
 | 
			
		||||
					}else {
 | 
			
		||||
						for (let i = 0; i < 60; i++) {
 | 
			
		||||
							let str = i;
 | 
			
		||||
							if (i < 10) {
 | 
			
		||||
								str = '0' + str;
 | 
			
		||||
							} else {
 | 
			
		||||
								str = '' + str;
 | 
			
		||||
							}
 | 
			
		||||
							this.minutes.push(str);
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
			},
 | 
			
		||||
					
 | 
			
		||||
			bindDateChange(e) {
 | 
			
		||||
				let valueArr = e.detail.value;
 | 
			
		||||
				const selectedDate = this.formatdates[valueArr[0]];
 | 
			
		||||
				const isToday = moment(selectedDate).isSame(this.currentTime, 'day');
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// 更新时间列
 | 
			
		||||
				this.updateTimeColumns(selectedDate);
 | 
			
		||||
 | 
			
		||||
				// 获取选择的时间
 | 
			
		||||
				let dateStr = this.formatdates[valueArr[0]];
 | 
			
		||||
				let hourStr = this.hours[valueArr[1]];
 | 
			
		||||
				let minuteStr = this.minutes[valueArr[2]];
 | 
			
		||||
 | 
			
		||||
				// 验证时间是否在当前时间之后
 | 
			
		||||
				const selectedTime = new Date(`${dateStr} ${hourStr}:${minuteStr}`);
 | 
			
		||||
				if (selectedTime < this.currentTime) {
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
						title: '不能选择过去的时间',
 | 
			
		||||
						icon: 'none'
 | 
			
		||||
					});
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// 验证时间是否在当前时间8小时之内
 | 
			
		||||
				if (selectedTime < this.currentTimePlus8Hours) {
 | 
			
		||||
					// 允许选择,不做任何处理
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// 触发事件
 | 
			
		||||
				console.log(dateStr + ' ' + hourStr + ':' + minuteStr)
 | 
			
		||||
				this.$emit("select", {
 | 
			
		||||
					time: moment(`${dateStr} ${hourStr}:${minuteStr}`).format("YYYY-MM-DD HH:mm")
 | 
			
		||||
					time: moment(dateStr + ' ' + hourStr + ':' + minuteStr).format("YYYY-MM-DD HH:mm")
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			// initDate() {
 | 
			
		||||
			// 	const baseTime = this.defaultTime || new Date();
 | 
			
		||||
			// 	// 使用 currentTimePlus8Hours 作为基准时间
 | 
			
		||||
			// 	const currentdate = moment(this.currentTimePlus8Hours).format("MMM Do");
 | 
			
		||||
 | 
			
		||||
			// 	// 设置日期数组
 | 
			
		||||
			// 	this.dates = [];
 | 
			
		||||
			// 	this.formatdates = [];
 | 
			
		||||
 | 
			
		||||
			// 	for (let i = 0; i <= this.chooseNum; i++) {
 | 
			
		||||
			// 		this.formatdates.push(moment(baseTime).add(i, 'days').format("YYYY-MM-DD"));
 | 
			
		||||
			// 		this.dates.push(moment(baseTime).add(i, 'days').format("MMMDo dddd"));
 | 
			
		||||
			// 	}
 | 
			
		||||
 | 
			
		||||
			// 	// 设置小时数组(从当前时间加8小时的小时开始)
 | 
			
		||||
			// 	let h = parseInt(moment(this.currentTimePlus8Hours).format("HH"));
 | 
			
		||||
			// 	this.hours = [];
 | 
			
		||||
			// 	for (let i = h; i < 24; i++) {
 | 
			
		||||
			// 		let str = i;
 | 
			
		||||
			// 		if (i < 10) {
 | 
			
		||||
			// 			str = '0' + str;
 | 
			
		||||
			// 		} else {
 | 
			
		||||
			// 			str = '' + str;
 | 
			
		||||
			// 		}
 | 
			
		||||
			// 		this.hours.push(str);
 | 
			
		||||
			// 	}
 | 
			
		||||
 | 
			
		||||
			// 	// 设置分钟数组(从0开始)
 | 
			
		||||
			// 	this.minutes = [];
 | 
			
		||||
			// 	let m = parseInt(moment(this.currentTimePlus8Hours).format("mm"));
 | 
			
		||||
			// 	for (let i = 0; i < 60; i++) {
 | 
			
		||||
			// 		let str = i;
 | 
			
		||||
			// 		if (i < 10) {
 | 
			
		||||
			// 			str = '0' + str;
 | 
			
		||||
			// 		} else {
 | 
			
		||||
			// 			str = '' + str;
 | 
			
		||||
			// 		}
 | 
			
		||||
			// 		this.minutes.push(str);
 | 
			
		||||
			// 	}
 | 
			
		||||
			// },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			// // initDate() {
 | 
			
		||||
			// // 	let currentdate = moment().format("MMM Do");
 | 
			
		||||
			// // 	//设置日期数组
 | 
			
		||||
			// // 	this.dates = []
 | 
			
		||||
			// // 	//格式化日期数组
 | 
			
		||||
			// // 	this.formatdates = []
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			// // 	for (let i = 0; i <= this.chooseNum; i++) {
 | 
			
		||||
			// // 		this.formatdates.push(moment().add(i, 'days').format("YYYY-MM-DD"))
 | 
			
		||||
			// // 		this.dates.push(moment().add(i, 'days').format("MMMDo dddd"))
 | 
			
		||||
			// // 	}
 | 
			
		||||
 | 
			
		||||
			// // 	let h = parseInt(moment().format("HH"))
 | 
			
		||||
			// // 	this.hours = []
 | 
			
		||||
			// // 	for (let i = h; i < 24; i++) {
 | 
			
		||||
			// // 		let str = i;
 | 
			
		||||
			// // 		if (i < 10) {
 | 
			
		||||
			// // 			str = '0' + str;
 | 
			
		||||
			// // 		} else {
 | 
			
		||||
			// // 			str = '' + str;
 | 
			
		||||
			// // 		}
 | 
			
		||||
			// // 		this.hours.push(str);
 | 
			
		||||
			// // 	}
 | 
			
		||||
			// // 	this.minutes = []
 | 
			
		||||
			// // 	let m = parseInt(moment().format("mm"))
 | 
			
		||||
			// // 	console.log(m);
 | 
			
		||||
			// // 	for (let i = 0; i < 60; i++) {
 | 
			
		||||
			// // 		let str = i; 
 | 
			
		||||
			// // 		if (i < 10) {
 | 
			
		||||
			// // 			str = '0' + str;
 | 
			
		||||
			// // 		} else {
 | 
			
		||||
			// // 			str = '' + str;
 | 
			
		||||
			// // 		}
 | 
			
		||||
			// // 		this.minutes.push(str);
 | 
			
		||||
			// // 	}
 | 
			
		||||
 | 
			
		||||
			// // },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			// //滚动切换时间
 | 
			
		||||
			// bindDateChange(e) { //有效日期的滚动日期时间方法
 | 
			
		||||
			// 	let valueArr = e.detail.value;
 | 
			
		||||
			// 	this.hours = [];
 | 
			
		||||
			// 	this.minutes = [];
 | 
			
		||||
 | 
			
		||||
			// 	if (valueArr[0] != 0) {
 | 
			
		||||
			// 		// 如果不是今天,小时从0开始
 | 
			
		||||
			// 		for (let i = 0; i < 24; i++) {
 | 
			
		||||
			// 			let str = i;
 | 
			
		||||
			// 			if (i < 10) {
 | 
			
		||||
			// 				str = '0' + str;
 | 
			
		||||
			// 			} else {
 | 
			
		||||
			// 				str = '' + str;
 | 
			
		||||
			// 			}
 | 
			
		||||
			// 			this.hours.push(str);
 | 
			
		||||
			// 		}
 | 
			
		||||
			// 		// 分钟从0开始
 | 
			
		||||
			// 		for (let i = 0; i < 60; i++) {
 | 
			
		||||
			// 			let str = i;
 | 
			
		||||
			// 			if (i < 10) {
 | 
			
		||||
			// 				str = '0' + str;
 | 
			
		||||
			// 			} else {
 | 
			
		||||
			// 				str = '' + str;
 | 
			
		||||
			// 			}
 | 
			
		||||
			// 			this.minutes.push(str);
 | 
			
		||||
			// 		}
 | 
			
		||||
			// 	} else {
 | 
			
		||||
			// 		// 如果是今天,小时从当前时间加8小时的小时开始
 | 
			
		||||
			// 		let h = parseInt(moment(this.currentTimePlus8Hours).format("HH"));
 | 
			
		||||
			// 		this.hours = [];
 | 
			
		||||
			// 		for (let i = h; i < 24; i++) {
 | 
			
		||||
			// 			let str = i;
 | 
			
		||||
			// 			if (i < 10) {
 | 
			
		||||
			// 				str = '0' + str;
 | 
			
		||||
			// 			} else {
 | 
			
		||||
			// 				str = '' + str;
 | 
			
		||||
			// 			}
 | 
			
		||||
			// 			this.hours.push(str);
 | 
			
		||||
			// 		}
 | 
			
		||||
 | 
			
		||||
			// 		// 分钟从0开始
 | 
			
		||||
			// 		this.minutes = [];
 | 
			
		||||
			// 		let m = parseInt(moment(this.currentTimePlus8Hours).format("mm"));
 | 
			
		||||
			// 		for (let i = 0; i < 60; i++) {
 | 
			
		||||
			// 			let str = i;
 | 
			
		||||
			// 			if (i < 10) {
 | 
			
		||||
			// 				str = '0' + str;
 | 
			
		||||
			// 			} else {
 | 
			
		||||
			// 				str = '' + str;
 | 
			
		||||
			// 			}
 | 
			
		||||
			// 			this.minutes.push(str);
 | 
			
		||||
			// 		}
 | 
			
		||||
			// 	}
 | 
			
		||||
 | 
			
		||||
			// 	let dateStr = this.formatdates[valueArr[0]];
 | 
			
		||||
			// 	let hourStr = this.hours[valueArr[1]];
 | 
			
		||||
			// 	let minuteStr = this.minutes[valueArr[2]];
 | 
			
		||||
			// 	console.log(dateStr + ' ' + hourStr + ':' + minuteStr);
 | 
			
		||||
			// 	this.$emit("select", {
 | 
			
		||||
			// 		time: moment(dateStr + ' ' + hourStr + ':' + minuteStr).format("YYYY-MM-DD HH:mm")
 | 
			
		||||
			// 	});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			// },
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -35,10 +35,10 @@
 | 
			
		||||
			<view style="width: 100%;">
 | 
			
		||||
				<!-- 草稿箱列表 -->
 | 
			
		||||
				<!-- <view v-if="draftShow === true"> -->
 | 
			
		||||
				<view v-if="status == 15" style="margin-top: 110rpx;width: 100%;min-height: 100vh;height:auto;">
 | 
			
		||||
				<view v-if="status == 15" style="margin-top: 110rpx;width: 100%;min-height: 100vh;height:auto;margin-bottom: 20rpx;">
 | 
			
		||||
					<!-- v-for="(item,index) in draftList" :key="index" @click="checkInvoice(item.invoiceCheck,index)"-->
 | 
			
		||||
					<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
 | 
			
		||||
						<view class="invoiceList-item">
 | 
			
		||||
					<view class="invoiceList" >
 | 
			
		||||
						<view class="invoiceList-item" v-for="(item,index) in draftList" :key="index">
 | 
			
		||||
							<view class="invoiceList-itemInfo flex">
 | 
			
		||||
								<view class="item-img">
 | 
			
		||||
									<image v-if="item.images.length>0"
 | 
			
		||||
@ -58,13 +58,12 @@
 | 
			
		||||
								</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="item-draftBtns">
 | 
			
		||||
								<view class="part flex justify-center align-items" style="margin-right: 20rpx;"
 | 
			
		||||
									@click.stop="toEditDraft(item.id)">
 | 
			
		||||
									编辑
 | 
			
		||||
								</view>
 | 
			
		||||
								<view class="part flex justify-center align-items" @click.stop="toDeleteDraft(item.id)">
 | 
			
		||||
								<view class="part1 flex justify-center align-items" style="margin-right: 20rpx;" @click.stop="toDeleteDraft(item.id)">
 | 
			
		||||
									删除
 | 
			
		||||
								</view>
 | 
			
		||||
								<view class="part flex justify-center align-items" @click.stop="toEditDraft(item.id)">
 | 
			
		||||
									编辑
 | 
			
		||||
								</view>
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
 | 
			
		||||
@ -81,7 +80,7 @@
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
 | 
			
		||||
				<view :class="['hot', status == 0 || status == -2 ? 'wsh_hot' : '']">
 | 
			
		||||
				<view :class="['hot', status == 0 || status == -2 ? 'wsh_hot' : '']" v-if="status != 15">
 | 
			
		||||
					<view class="content flex align-items flex-column">
 | 
			
		||||
						<view class="flex flex-column w-100 bbb" style="position: relative;"
 | 
			
		||||
							v-for="(item, index) in hotList" :key="index">
 | 
			
		||||
@ -199,7 +198,7 @@
 | 
			
		||||
										</view>
 | 
			
		||||
										<view class="part flex justify-center align-items" v-if="item.auth_status == 0"
 | 
			
		||||
											@click.stop="editItem(item.id)"> 修改 </view>
 | 
			
		||||
										<view class="part1 flex justify-center align-items" v-if="item.status == 1"
 | 
			
		||||
										<view class="part1 flex justify-center align-items" v-if="item.auth_status == 1 && item.status == 1"
 | 
			
		||||
											@click.stop="editItem(item.id)"> 修改 </view>
 | 
			
		||||
										<view class="part1 flex justify-center align-items"
 | 
			
		||||
											v-if="item.status == -1 && item.auth_status == 1"
 | 
			
		||||
@ -511,6 +510,7 @@
 | 
			
		||||
			}, 2000)
 | 
			
		||||
		},
 | 
			
		||||
		onReachBottom() {
 | 
			
		||||
			console.log('onReachBottom',this.status);
 | 
			
		||||
			// if (this.list.length < this.count) {
 | 
			
		||||
			// 	this.page++;
 | 
			
		||||
			// 	this.getList(this.selected);
 | 
			
		||||
@ -518,6 +518,9 @@
 | 
			
		||||
			if (this.status == -2) {
 | 
			
		||||
				this.page++;
 | 
			
		||||
				this.getAfterList();
 | 
			
		||||
			}else if(this.status == 15) {
 | 
			
		||||
				this.page++;
 | 
			
		||||
				this.getDraftList();
 | 
			
		||||
			} else {
 | 
			
		||||
				this.page++;
 | 
			
		||||
				this.getHotList(this.selected);
 | 
			
		||||
@ -532,24 +535,22 @@
 | 
			
		||||
			},
 | 
			
		||||
			//待审核+未开始的跳转修改活动
 | 
			
		||||
			editItem(id) {
 | 
			
		||||
				const type = 0;
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url: "/packageB/editAct?id=" + id,
 | 
			
		||||
					url: "/packageB/editAct?id=" + id + '&type=' + type,
 | 
			
		||||
				});
 | 
			
		||||
				// uni.switchTab({
 | 
			
		||||
				// 	url:"/pages/center/index?id=" + id,
 | 
			
		||||
				// })//跳转tabbar页面的
 | 
			
		||||
			},
 | 
			
		||||
			//待审核+未开始的跳转修改活动
 | 
			
		||||
			//未通过的跳转重发活动
 | 
			
		||||
			copyItem(id) {
 | 
			
		||||
				const type = 1
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
					url: "/packageB/editAct?original_activity_id=" + id + '&type=' + type,
 | 
			
		||||
				});
 | 
			
		||||
				// uni.switchTab({
 | 
			
		||||
				// 	url:"/pages/center/index?id=" + id,
 | 
			
		||||
				// })//跳转tabbar页面的
 | 
			
		||||
			},
 | 
			
		||||
			//重发活动
 | 
			
		||||
			//已取消重发活动
 | 
			
		||||
			copyNewItem(id) {
 | 
			
		||||
				const type = 2
 | 
			
		||||
				uni.navigateTo({
 | 
			
		||||
@ -897,7 +898,10 @@
 | 
			
		||||
						if (res.code == 1) {
 | 
			
		||||
							this.count = res.data.count;
 | 
			
		||||
							console.log('draft1', res.data.list);
 | 
			
		||||
							this.draftList = res.data.list.data;
 | 
			
		||||
							const list = res.data.list.data || [];
 | 
			
		||||
							this.draftList.push(...list);
 | 
			
		||||
							
 | 
			
		||||
							// this.draftList = [...this.draftList,...res.data.list.data];
 | 
			
		||||
							console.log('draft', this.draftList);
 | 
			
		||||
							for (let i = 0; i < this.draftList.length; i++) {
 | 
			
		||||
								this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
 | 
			
		||||
@ -962,14 +966,15 @@
 | 
			
		||||
			headerSelected(status) {
 | 
			
		||||
				return this.selected === status;
 | 
			
		||||
			},
 | 
			
		||||
			//待审核和未通过的状态判断和传参
 | 
			
		||||
			toShlist(val) {
 | 
			
		||||
 | 
			
		||||
				this.page = 1;
 | 
			
		||||
				this.hotList = [];
 | 
			
		||||
				this.auth_status = val
 | 
			
		||||
				console.log('toShlist', val, this.auth_status, this.status);
 | 
			
		||||
				this.getHotList(this.status);
 | 
			
		||||
			},
 | 
			
		||||
			//待售后的状态判断和获取列表
 | 
			
		||||
			toAfter(val) {
 | 
			
		||||
				this.page = 1;
 | 
			
		||||
				this.hotList = [];
 | 
			
		||||
@ -984,6 +989,7 @@
 | 
			
		||||
	.box {
 | 
			
		||||
		.con-center {
 | 
			
		||||
			width: 100%;
 | 
			
		||||
			// height: 100vh;
 | 
			
		||||
			// margin-top: 25rpx;
 | 
			
		||||
			// overflow: hidden;
 | 
			
		||||
			background: #f7f7f7;
 | 
			
		||||
@ -1354,36 +1360,39 @@
 | 
			
		||||
	.invoiceList {
 | 
			
		||||
		width: 100%;
 | 
			
		||||
		height: auto;
 | 
			
		||||
		display: grid;
 | 
			
		||||
		justify-content: center;
 | 
			
		||||
 | 
			
		||||
		.invoiceList-item {
 | 
			
		||||
			display: grid;
 | 
			
		||||
			justify-content: space-around;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			background-color: #ffffff;
 | 
			
		||||
			// width: 100%;
 | 
			
		||||
			width: 690rpx;
 | 
			
		||||
			margin-top: 20rpx;
 | 
			
		||||
			margin-left: 10rpx;
 | 
			
		||||
			padding: 20rpx 20rpx;
 | 
			
		||||
			width: 670rpx;
 | 
			
		||||
			margin-bottom: 20rpx;
 | 
			
		||||
			// margin-left: 10rpx;
 | 
			
		||||
			padding: 20rpx 30rpx;
 | 
			
		||||
			height: 220rpx auto;
 | 
			
		||||
			border-radius: 30rpx;
 | 
			
		||||
 | 
			
		||||
			.invoiceList-itemInfo {
 | 
			
		||||
				// width: 100%;
 | 
			
		||||
				width: 690rpx;
 | 
			
		||||
				width: 670rpx;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				justify-content: flex-start;
 | 
			
		||||
				// justify-content: flex-start;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
 | 
			
		||||
				.item-img {
 | 
			
		||||
					width: 170rpx;
 | 
			
		||||
					height: 170rpx;
 | 
			
		||||
					margin-left: 40rpx;
 | 
			
		||||
					// margin-left: 40rpx;
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				.item-con {
 | 
			
		||||
					margin-left: 20rpx;
 | 
			
		||||
					width: 90%;
 | 
			
		||||
					width: 100%;
 | 
			
		||||
					height: 160rpx;
 | 
			
		||||
					position: relative;
 | 
			
		||||
					color: #323232;
 | 
			
		||||
@ -1423,7 +1432,8 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			.item-draftBtns {
 | 
			
		||||
				width: 100%;
 | 
			
		||||
				// width: 100%;
 | 
			
		||||
				width: 670rpx;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				justify-content: flex-end;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,7 @@
 | 
			
		||||
					<view class="row flex align-items" style="margin-top: 25rpx;">
 | 
			
		||||
						<span>
 | 
			
		||||
							<input type="text" maxlength="20" placeholder="填写清晰的活动标题" class="inputl"
 | 
			
		||||
								v-model="form.title" placeholder-class="bttop" />
 | 
			
		||||
								v-model="form.title" placeholder-class="bttop" @input="handleUsernameChange"/>
 | 
			
		||||
						</span>
 | 
			
		||||
						<span style="font-size: 24rpx;color: #9C9C9C;">(必填20字内)</span>
 | 
			
		||||
					</view>
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
					<view class="row flex align-items textarea_fb" style="margin-top: 25rpx;">
 | 
			
		||||
						<u--textarea :confirmType="null" v-model="form.content" :maxlength="800" type="text"
 | 
			
		||||
							placeholder="描述一下活动的亮点、活动内容、推荐的人群、叫大家一起运动吧~" :height="120"
 | 
			
		||||
							placeholder-class="bttop"></u--textarea>
 | 
			
		||||
							placeholder-class="bttop" @input="handleUsernameChange2"></u--textarea>
 | 
			
		||||
					</view>
 | 
			
		||||
 | 
			
		||||
					<span class="line-row" style="margin-top: 0;"></span>
 | 
			
		||||
@ -198,8 +198,13 @@
 | 
			
		||||
				</view>
 | 
			
		||||
				<view class="btns">
 | 
			
		||||
					<view class="saveDraft" v-if="isFormValid" @click="addDraft()">存草稿</view>
 | 
			
		||||
					<view class="draftBox" v-if="!isFormValid">草稿箱</view>
 | 
			
		||||
					<view class="submitPublish" @click="apply()">确认发布</view>
 | 
			
		||||
					<view class="draftBox" v-if="!isFormValid" @click="openDraftShow">草稿箱
 | 
			
		||||
						<view
 | 
			
		||||
							style="color: #ff4810;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;">
 | 
			
		||||
							({{draftCount}})</view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="submitPublish" @click="apply()" v-if="type != 0">确认发布</view>
 | 
			
		||||
					<view class="submitPublish" @click="apply()" v-else>保存</view>
 | 
			
		||||
				</view>
 | 
			
		||||
				<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
 | 
			
		||||
				<span class="flex align-items justify-center" v-if="agreeAdd == false"
 | 
			
		||||
@ -337,7 +342,7 @@
 | 
			
		||||
				</view>
 | 
			
		||||
				<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
 | 
			
		||||
				<view style="height: 700rpx;">
 | 
			
		||||
					<long-date v-if="dateShow" chooseNum="90" @select="datefirm($event, hdIndex)"></long-date>
 | 
			
		||||
					<long-date v-if="dateShow" :default-time="defaultTime" chooseNum="90" @select="datefirm($event, hdIndex)"></long-date>
 | 
			
		||||
				</view>
 | 
			
		||||
			</u-popup>
 | 
			
		||||
 | 
			
		||||
@ -354,7 +359,7 @@
 | 
			
		||||
				</view>
 | 
			
		||||
				<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
 | 
			
		||||
				<view style="height: 700rpx;">
 | 
			
		||||
					<long-date v-if="birthShow" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date>
 | 
			
		||||
					<long-date v-if="birthShow" :default-time="defaultTime" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date>
 | 
			
		||||
				</view>
 | 
			
		||||
			</u-popup>
 | 
			
		||||
			<u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;">
 | 
			
		||||
@ -404,7 +409,7 @@
 | 
			
		||||
						<view style="font-weight: 400;font-size: 28rpx;margin-left: 220rpx;" @click="selectSureDraft()">
 | 
			
		||||
							确定</view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<scroll-view scroll-y="true" class="popup-content">
 | 
			
		||||
					<scroll-view scroll-y="true" class="popup-content" @scrolltolower="handleDraftMore()">
 | 
			
		||||
						<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
 | 
			
		||||
							<view :class="(draftSelectIndex === index ) ? 'invoiceList-itemSelect':'invoiceList-item'"
 | 
			
		||||
								@click="selectDraft(item,index)">
 | 
			
		||||
@ -417,8 +422,8 @@
 | 
			
		||||
										mode=""></image>
 | 
			
		||||
								</view>
 | 
			
		||||
								<view class="item-con" style="">
 | 
			
		||||
									<view class="itenCon-actName" style="">{{item.title}}</view>
 | 
			
		||||
									<view class="itenCon-actCon" style="">{{item.content}}</view>
 | 
			
		||||
									<view class="itenCon-actName" style="">{{item.title !='' ? item.title:'描述待补充' }}</view>
 | 
			
		||||
									<view class="itenCon-actCon" style="">{{item.content != '' ? item.content:'快来添加活动内容吧'}}</view>
 | 
			
		||||
									<view class="itenCon-actPrice" style="">保存时间: {{item.updatetime_text}}</view>
 | 
			
		||||
								</view>
 | 
			
		||||
							</view>
 | 
			
		||||
@ -437,8 +442,7 @@
 | 
			
		||||
					justifyContent: 'start',
 | 
			
		||||
					alignItems: 'center',
 | 
			
		||||
					flexColumn: 'column'
 | 
			
		||||
				}"
 | 
			
		||||
				@close="baoDraftClose" @open="baoDraftOpen" :safeAreaInsetBottom="false" :closeable="false">
 | 
			
		||||
				}" @close="baoDraftClose" @open="baoDraftOpen" :safeAreaInsetBottom="false" :closeable="false">
 | 
			
		||||
				<view style="text-align: center;margin-top: 30rpx;">
 | 
			
		||||
					<image src="/static/fabu/renzheng.png" style="width: 140rpx;height: 140rpx;"></image>
 | 
			
		||||
				</view>
 | 
			
		||||
@ -624,9 +628,13 @@
 | 
			
		||||
				},
 | 
			
		||||
				draftId: null,
 | 
			
		||||
				baoDraftShow: false,
 | 
			
		||||
				draftCount: 0,
 | 
			
		||||
				defaultTime:null,
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
		onLoad(options) {
 | 
			
		||||
			//type:0是修改,1是未通过重发,2是已取消重发
 | 
			
		||||
			console.log('type', this.type);
 | 
			
		||||
			console.log('options', options.id, options.original_activity_id, options.draftId);
 | 
			
		||||
			this.id = options.id
 | 
			
		||||
			this.original_activity_id = options.original_activity_id
 | 
			
		||||
@ -635,27 +643,27 @@
 | 
			
		||||
			console.log('this.id', this.id);
 | 
			
		||||
			console.log('this.original_activity_id ', this.original_activity_id);
 | 
			
		||||
			console.log('this.type', this.type);
 | 
			
		||||
			if (this.id) {
 | 
			
		||||
			if (this.type == 0) {
 | 
			
		||||
				//修改
 | 
			
		||||
				this.agree = true
 | 
			
		||||
				this.isFormValid = true
 | 
			
		||||
				this.isFormValid = false
 | 
			
		||||
				this.getDetail()
 | 
			
		||||
			}
 | 
			
		||||
			if(this.original_activity_id){
 | 
			
		||||
			} else {
 | 
			
		||||
				//重发
 | 
			
		||||
				this.agree = true
 | 
			
		||||
				this.isFormValid = false
 | 
			
		||||
				this.getDetail()
 | 
			
		||||
			}
 | 
			
		||||
			// if(options.original_activity_id) {
 | 
			
		||||
			// 	this.original_activity_id = options.original_activity_id
 | 
			
		||||
			// if(this.original_activity_id){
 | 
			
		||||
 | 
			
		||||
			// }
 | 
			
		||||
			// this.getDetail()
 | 
			
		||||
			uni.hideShareMenu();
 | 
			
		||||
			this.getAgreement()
 | 
			
		||||
			this.getBqList();
 | 
			
		||||
			this.getrefund_list();
 | 
			
		||||
			this.getitembq();
 | 
			
		||||
			this.selectItemTuikuan();
 | 
			
		||||
			this.getDraftList();
 | 
			
		||||
			// this.getDraftList();
 | 
			
		||||
			//var c=uni.getSystemInfoSync();
 | 
			
		||||
			//844-94-70-100 = 580
 | 
			
		||||
			//763-47-(100-47)-34-50
 | 
			
		||||
@ -679,6 +687,23 @@
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			handleUsernameChange() {
 | 
			
		||||
				console.log('标题变化:', this.form.title);
 | 
			
		||||
				this.checkFormValidity();
 | 
			
		||||
			},
 | 
			
		||||
			handleUsernameChange2() {
 | 
			
		||||
				console.log('内容变化:', this.form.content);
 | 
			
		||||
				this.checkFormValidity();
 | 
			
		||||
			},
 | 
			
		||||
			checkFormValidity() {
 | 
			
		||||
				this.isFormValid = this.form.title.length > 0 || this.form.content.length > 0 || this.fileList1.length >
 | 
			
		||||
					0 || this.form.address.length > 0 ||
 | 
			
		||||
					this.form.address_detail.length > 0 || this.form.time.length > 0 || this.form.sign_time > 0 || this
 | 
			
		||||
					.form.cate_idsName.length > 0 ||
 | 
			
		||||
					this.form.refund_idn.length > 0 || this.qunQrcode.length > 0 || this.form.stock.length > 0 || this.form
 | 
			
		||||
					.price.length > 0;
 | 
			
		||||
				console.log('isFormValid', this.isFormValid);
 | 
			
		||||
			},
 | 
			
		||||
			// 获取详情
 | 
			
		||||
			getDetail() {
 | 
			
		||||
				// uni.switchTab({
 | 
			
		||||
@ -691,8 +716,7 @@
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						this.form = res.data.detail
 | 
			
		||||
						this.price = this.form.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
						
 | 
			
		||||
						this.form.content = this.form.content.replace(/<[^>]+>/g, ''); // 输出: "运动"
 | 
			
		||||
						this.value_slide = res.data.detail.join_info.percent;
 | 
			
		||||
						const idBqSet = new Set(this.form.cate_ids);
 | 
			
		||||
@ -712,6 +736,9 @@
 | 
			
		||||
						this.form.cate_ids = res.data.detail.cate_ids;
 | 
			
		||||
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
						this.price = this.form.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
						
 | 
			
		||||
						this.form.refund_idn = this.form.refund_info.title;
 | 
			
		||||
						// 转换为 fileList 格式
 | 
			
		||||
						this.fileList1 = this.form.images.map(url => ({
 | 
			
		||||
@ -783,8 +810,9 @@
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						this.form = res.data.detail
 | 
			
		||||
						this.price = this.form.price
 | 
			
		||||
						this.price = res.data.detail.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
						console.log('this.priceName',this.priceName,this.price);
 | 
			
		||||
						this.form.content = this.form.content.replace(/<[^>]+>/g, ''); // 输出: "运动"
 | 
			
		||||
						this.value_slide = res.data.detail.join_info.percent;
 | 
			
		||||
						const idBqSet = new Set(this.form.cate_ids);
 | 
			
		||||
@ -871,8 +899,10 @@
 | 
			
		||||
				if (price == '' || price == null || price == undefined || price == 0) {
 | 
			
		||||
					this.priceName = '免费';
 | 
			
		||||
					this.priceShow = false;
 | 
			
		||||
					console.log('this.priceName000',this.priceName);
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				console.log('this.priceName111',this.priceName);
 | 
			
		||||
				//判断金额不能小于1
 | 
			
		||||
				if (price < 1) {
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
@ -889,7 +919,7 @@
 | 
			
		||||
				this.form.price = this.price;
 | 
			
		||||
				this.priceName = price;
 | 
			
		||||
				this.priceShow = false;
 | 
			
		||||
 | 
			
		||||
				console.log('this.priceName22',this.priceName);
 | 
			
		||||
			},
 | 
			
		||||
			selectItemTuikuan() {
 | 
			
		||||
				this.currents = 5;
 | 
			
		||||
@ -1127,10 +1157,25 @@
 | 
			
		||||
				this.hdIndex = 1;
 | 
			
		||||
				// this.tempDefaultTime = new Date(new Date().getTime() + 8 * 60 * 60 * 1000);
 | 
			
		||||
				this.dateShow = true;
 | 
			
		||||
				console.log('活动时间');
 | 
			
		||||
				// 计算当前时间加8小时
 | 
			
		||||
				const defaultTime = new Date();
 | 
			
		||||
				// defaultTime.setHours(defaultTime.getHours() + 8);
 | 
			
		||||
				console.log('活动时间defaultTime', defaultTime);
 | 
			
		||||
				this.defaultTime = defaultTime;
 | 
			
		||||
				// this.defaultTime = new Date(this.form.start_time)
 | 
			
		||||
			},
 | 
			
		||||
			birthShowHidden() {
 | 
			
		||||
				this.bmIndex = 1;
 | 
			
		||||
				this.birthShow = true;
 | 
			
		||||
				console.log('报名时间');
 | 
			
		||||
				// 计算当前时间加8小时
 | 
			
		||||
				const defaultTime = new Date();
 | 
			
		||||
				//defaultTime.setHours(defaultTime.getHours() + 8);
 | 
			
		||||
				console.log('报名时间defaultTime', defaultTime);
 | 
			
		||||
				this.defaultTime = defaultTime;
 | 
			
		||||
				// this.defaultTime = new Date(this.form.sign_start_time)
 | 
			
		||||
				
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			// 活动开始时间
 | 
			
		||||
@ -1178,6 +1223,7 @@
 | 
			
		||||
					}
 | 
			
		||||
					//报名结束时间 < 活动开始时间
 | 
			
		||||
					// 如果date1 < date2,返回true 
 | 
			
		||||
					console.log('this.times_b, this.times_sine_int',this.times_b, this.times_sine_int);
 | 
			
		||||
					if (this.isDateTimeBefore(this.times_b, this.times_sine_int) && this.times_sine_int != '') {
 | 
			
		||||
						uni.$u.toast('活动开始时间不能小于报名结束时间');
 | 
			
		||||
						return;
 | 
			
		||||
@ -1671,11 +1717,12 @@
 | 
			
		||||
					})
 | 
			
		||||
					.then((res) => {
 | 
			
		||||
						if (res.code == 1) {
 | 
			
		||||
							this.count = res.data.count;
 | 
			
		||||
							this.draftCount = res.data.count;
 | 
			
		||||
							console.log('getDraft', res.data.list);
 | 
			
		||||
							this.draftList = res.data.list.data;
 | 
			
		||||
							for (let i = 0; i < this.draftList.length; i++) {
 | 
			
		||||
								this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format('YYYY-MM-DD HH:mm')
 | 
			
		||||
								this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
 | 
			
		||||
									'YYYY-MM-DD HH:mm')
 | 
			
		||||
							}
 | 
			
		||||
							if (this.draftList.length >= res.data.count) {
 | 
			
		||||
								this.loadStatus = "nomore";
 | 
			
		||||
@ -1697,6 +1744,16 @@
 | 
			
		||||
						this.loadStatus = "loading";
 | 
			
		||||
					});
 | 
			
		||||
			},
 | 
			
		||||
			//草稿箱加载更多
 | 
			
		||||
			handleDraftMore() {
 | 
			
		||||
				console.log('加载22',this.draftCount, this.draftList.length);
 | 
			
		||||
				if(this.draftCount>this.draftList.length) {
 | 
			
		||||
					console.log('加载');
 | 
			
		||||
					this.page++;
 | 
			
		||||
					this.getDraftList();
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
			},
 | 
			
		||||
			//新增草稿箱
 | 
			
		||||
			addDraft() {
 | 
			
		||||
				console.log('草稿');
 | 
			
		||||
@ -1738,6 +1795,9 @@
 | 
			
		||||
				console.log('params', params.image);
 | 
			
		||||
 | 
			
		||||
				console.log('草稿1');
 | 
			
		||||
				
 | 
			
		||||
				if (Array.isArray(params.images)) {
 | 
			
		||||
					console.log('这是一个数组', params.images);
 | 
			
		||||
					for (let i = 0; i < params.images.length; i++) {
 | 
			
		||||
						if (/^https?:\/\//i.test(params.images[i])) {
 | 
			
		||||
							params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
@ -1748,10 +1808,31 @@
 | 
			
		||||
					}
 | 
			
		||||
					console.log('params.images排查数组的url的路径', params.images);
 | 
			
		||||
					params.images = params.images.join(',');
 | 
			
		||||
				} else if (typeof params.images === 'string') {
 | 
			
		||||
					console.log('这是一个字符串', params.images);
 | 
			
		||||
					const imags = params.images
 | 
			
		||||
					params.images = imags.split(',')
 | 
			
		||||
					for (let i = 0; i < params.images.length; i++) {
 | 
			
		||||
						if (/^https?:\/\//i.test(params.images[i])) {
 | 
			
		||||
							params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
							console.log('params.images[i].url', params.images[i]);
 | 
			
		||||
						} else {
 | 
			
		||||
							params.images[i] = params.images[i]
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					console.log('params.images排查数组的url的路径', params.images);
 | 
			
		||||
					params.images = params.images.join(',');
 | 
			
		||||
					console.log('这是一个字符串2', params.images);
 | 
			
		||||
				} else if (typeof params.images === 'object' && this.myField !== null) {
 | 
			
		||||
					console.log('这是一个对象', params.images);
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
				uni.$u.http.post(url, params).then(res => {
 | 
			
		||||
					console.log('草稿2');
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						this.isFormValid = false
 | 
			
		||||
						this.baoDraftShow = true
 | 
			
		||||
						this.getDraftList();
 | 
			
		||||
						//置空
 | 
			
		||||
						// 			this.fileList1 = [];
 | 
			
		||||
						// 			this.agree = false;
 | 
			
		||||
@ -1822,38 +1903,107 @@
 | 
			
		||||
			},
 | 
			
		||||
			selectDraft(item, index) {
 | 
			
		||||
				console.log('index:', index, 'item:', item);
 | 
			
		||||
				this.draftId = item.id
 | 
			
		||||
				this.draftSelectIndex = index
 | 
			
		||||
				this.selectDradtForm.title = item.title
 | 
			
		||||
				this.selectDradtForm.content = item.content
 | 
			
		||||
				this.selectDradtForm.images = item.images
 | 
			
		||||
				this.selectDradtForm.address = item.address
 | 
			
		||||
				this.selectDradtForm.address_detail = item.address_detail
 | 
			
		||||
				this.selectDradtForm.stock = item.stock
 | 
			
		||||
				this.selectDradtForm.price = item.price
 | 
			
		||||
				this.selectDradtForm.time = item.time
 | 
			
		||||
				this.selectDradtForm.sign_time = item.sign_time
 | 
			
		||||
				this.selectDradtForm.title = item.title
 | 
			
		||||
				this.selectDradtForm.cate_ids = item.cate_ids
 | 
			
		||||
				this.selectDradtForm.refund_id = item.refund_id
 | 
			
		||||
				console.log('5555');
 | 
			
		||||
				// this.closeDraftShow();
 | 
			
		||||
			},
 | 
			
		||||
			selectSureDraft() {
 | 
			
		||||
				console.log('366666');
 | 
			
		||||
				this.form.title = this.selectDradtForm.title
 | 
			
		||||
				this.form.content = this.selectDradtForm.content
 | 
			
		||||
				this.form.images = this.selectDradtForm.images
 | 
			
		||||
				this.form.address = this.selectDradtForm.address
 | 
			
		||||
				this.form.address_detail = this.selectDradtForm.address_detail
 | 
			
		||||
				this.form.stock = this.selectDradtForm.stock
 | 
			
		||||
				this.form.price = this.selectDradtForm.price
 | 
			
		||||
				this.form.time = this.selectDradtForm.time
 | 
			
		||||
				this.form.sign_time = this.selectDradtForm.sign_time
 | 
			
		||||
				this.form.title = this.selectDradtForm.title
 | 
			
		||||
				this.form.cate_ids = this.selectDradtForm.cate_ids
 | 
			
		||||
				this.form.refund_id = this.selectDradtForm.refund_id
 | 
			
		||||
				console.log('99999');
 | 
			
		||||
				this.closeDraftShow();
 | 
			
		||||
				console.log('selectSureDraft', this.draftId);
 | 
			
		||||
				uni.$u.http.get('/api/school.newactivity.activity_drafts/detail', {
 | 
			
		||||
					params: {
 | 
			
		||||
						id: this.draftId,
 | 
			
		||||
					}
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						this.draftType = 1
 | 
			
		||||
						this.form = res.data.detail
 | 
			
		||||
						this.price = res.data.detail.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
						console.log('selectSureDraft', this.form.cate_ids);
 | 
			
		||||
				
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
						const idBqSet = new Set(this.form.cate_ids);
 | 
			
		||||
						const bqArray = this.bqList.reduce((acc, obj) => {
 | 
			
		||||
							if (this.form.cate_ids.includes(obj.id)) {
 | 
			
		||||
								acc.push(obj);
 | 
			
		||||
							}
 | 
			
		||||
							return acc;
 | 
			
		||||
						}, []);
 | 
			
		||||
						console.log('bqArray', bqArray);
 | 
			
		||||
						let arrIdsName = bqArray.map((item) => {
 | 
			
		||||
							return item.name
 | 
			
		||||
						})
 | 
			
		||||
						this.form.cate_idsName = arrIdsName.join(',');
 | 
			
		||||
						console.log('cate_idsName', this.form.cate_idsName);
 | 
			
		||||
						this.list = bqArray
 | 
			
		||||
						this.form.cate_ids = res.data.detail.cate_ids;
 | 
			
		||||
				
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
				
 | 
			
		||||
						this.form.refund_idn = this.form.refund_info.title;
 | 
			
		||||
						console.log('refund_idn', this.form.refund_idn);
 | 
			
		||||
						// 转换为 fileList 格式
 | 
			
		||||
						if (this.form.images != '') {
 | 
			
		||||
							this.fileList1 = this.form.images.map(url => ({
 | 
			
		||||
								url: url,
 | 
			
		||||
								status: 'success',
 | 
			
		||||
								message: ''
 | 
			
		||||
							}));
 | 
			
		||||
							this.list1 = this.form.images
 | 
			
		||||
							console.log('fileList1', this.fileList1);
 | 
			
		||||
						}
 | 
			
		||||
						if (this.form.image) {
 | 
			
		||||
							this.qunQrcode = ({
 | 
			
		||||
								url: this.form.image,
 | 
			
		||||
								status: 'success',
 | 
			
		||||
								message: ''
 | 
			
		||||
							})
 | 
			
		||||
							this.QunQrcode1 = this.qunQrcode
 | 
			
		||||
							console.log('qunQrcode222', this.qunQrcode);
 | 
			
		||||
						}
 | 
			
		||||
				
 | 
			
		||||
						if (this.form.start_time_text != '' && this.form.end_time_text != '') {
 | 
			
		||||
							const time_start = this.form.start_time_text.slice(5, 16)
 | 
			
		||||
							const time_end = this.form.end_time_text.slice(5, 16)
 | 
			
		||||
							this.form.time = time_start + ' - ' + time_end
 | 
			
		||||
						}
 | 
			
		||||
				
 | 
			
		||||
						if (this.form.sign_start_time_text != '' && this.form.sign_end_time_text != '') {
 | 
			
		||||
							const signTime_start = this.form.sign_start_time_text.slice(5, 16)
 | 
			
		||||
							const signTime_end = this.form.sign_end_time_text.slice(5, 16)
 | 
			
		||||
							this.form.sign_time = signTime_start + ' - ' + signTime_end
 | 
			
		||||
						}
 | 
			
		||||
				
 | 
			
		||||
						this.price = this.form.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
				
 | 
			
		||||
						if (!this.original_activity_id) {
 | 
			
		||||
							this.times_b_int = this.form.start_time_text
 | 
			
		||||
							this.times_e_int = this.form.end_time_text
 | 
			
		||||
							this.times_sinb_int = this.form.sign_start_time_text
 | 
			
		||||
							this.times_sine_int = this.form.sign_end_time_text
 | 
			
		||||
						} else {
 | 
			
		||||
							this.times_b_int = ''
 | 
			
		||||
							this.times_e_int = ''
 | 
			
		||||
							this.times_sinb_int = ''
 | 
			
		||||
							this.times_sine_int = ''
 | 
			
		||||
							this.form.sign_time = ''
 | 
			
		||||
							this.form.time = ''
 | 
			
		||||
						}
 | 
			
		||||
						if (this.type == 2) {
 | 
			
		||||
							this.form.title = ''
 | 
			
		||||
						}
 | 
			
		||||
				
 | 
			
		||||
						this.mobile = this.detail.user.mobile.slice(0, 3) + 'XXXX' + this.detail.user.mobile.slice(
 | 
			
		||||
							7);
 | 
			
		||||
					} else {
 | 
			
		||||
						uni.showToast({
 | 
			
		||||
							title: res.msg,
 | 
			
		||||
							icon: 'none',
 | 
			
		||||
							duration: 2000
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
				}).catch(error => {});
 | 
			
		||||
				this.closeDraftShow();s
 | 
			
		||||
			},
 | 
			
		||||
			editDraft() {
 | 
			
		||||
				console.log('草稿');
 | 
			
		||||
@ -1901,6 +2051,14 @@
 | 
			
		||||
						this.price = '';
 | 
			
		||||
						this.priceName = '免费';
 | 
			
		||||
						this.qunQrcode = '';
 | 
			
		||||
						this.times_b = '';
 | 
			
		||||
						this.times_sinb = '';
 | 
			
		||||
						this.times_b_int = '';
 | 
			
		||||
						this.times_sinb_int = '';
 | 
			
		||||
						this.times_e = '';
 | 
			
		||||
						this.times_e_int = '';
 | 
			
		||||
						this.times_sine = '';
 | 
			
		||||
						this.times_sine_int ='';
 | 
			
		||||
						this.form = {
 | 
			
		||||
 | 
			
		||||
							cate_ids: '',
 | 
			
		||||
@ -1964,6 +2122,8 @@
 | 
			
		||||
				let url = '/api/school.new_activity/add';
 | 
			
		||||
				let urlEdit = '/api/school.new_activity/edit'
 | 
			
		||||
				let params = {};
 | 
			
		||||
				console.log('平台分类',this.form.cate_ids,this.list);
 | 
			
		||||
				this.form.cate_ids = this.list.map(item => item.id).join(',');
 | 
			
		||||
				if (!this.id) {
 | 
			
		||||
					this.form.cate_ids = this.list.map(item => item.id).join(',');
 | 
			
		||||
				}
 | 
			
		||||
@ -2142,6 +2302,14 @@
 | 
			
		||||
							this.price = '';
 | 
			
		||||
							this.priceName = '免费';
 | 
			
		||||
							this.qunQrcode = '';
 | 
			
		||||
							this.times_b = '';
 | 
			
		||||
							this.times_sinb = '';
 | 
			
		||||
							this.times_b_int = '';
 | 
			
		||||
							this.times_sinb_int = '';
 | 
			
		||||
							this.times_e = '';
 | 
			
		||||
							this.times_e_int = '';
 | 
			
		||||
							this.times_sine = '';
 | 
			
		||||
							this.times_sine_int ='';
 | 
			
		||||
							this.form = {
 | 
			
		||||
 | 
			
		||||
								cate_ids: '',
 | 
			
		||||
@ -2872,23 +3040,15 @@
 | 
			
		||||
 | 
			
		||||
				.invoiceList-item {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					justify-content: space-between;
 | 
			
		||||
					justify-content: center;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					background-color: #ffffff;
 | 
			
		||||
					width: 93%;
 | 
			
		||||
					width: 91%;
 | 
			
		||||
					margin-top: 20rpx;
 | 
			
		||||
					padding: 20rpx 20rpx;
 | 
			
		||||
					padding: 20rpx 30rpx;
 | 
			
		||||
					height: 220rpx;
 | 
			
		||||
					border-radius: 40rpx 40rpx 40rpx 40rpx;
 | 
			
		||||
					
 | 
			
		||||
					// &.active {
 | 
			
		||||
					// 	background-color: ##F0FFDF;
 | 
			
		||||
					// 	border: 2rpx solid #9CEAA2;
 | 
			
		||||
					// 	border-image: linear-gradient(270deg, rgba(251.00000023841858, 246.0000005364418, 109.00000110268593, 1), rgba(156.00000590085983, 234.00000125169754, 162.00000554323196, 1)) 2 2;
 | 
			
		||||
					// 	border-radius: 40rpx;
 | 
			
		||||
					// 	// clip-path: inset(0px round 16rpx);
 | 
			
		||||
					// }
 | 
			
		||||
					
 | 
			
		||||
					border: 2rpx solid #ffffff;
 | 
			
		||||
 | 
			
		||||
					.item-img {
 | 
			
		||||
						width: 170rpx;
 | 
			
		||||
@ -2903,33 +3063,29 @@
 | 
			
		||||
						height: 160rpx;
 | 
			
		||||
						position: relative;
 | 
			
		||||
						color: #323232;
 | 
			
		||||
						display: grid;
 | 
			
		||||
 | 
			
		||||
						.itenCon-actName {
 | 
			
		||||
							position: absolute;
 | 
			
		||||
							top: 0;
 | 
			
		||||
							font-size: 28rpx;
 | 
			
		||||
							font-weight: 600;
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						.itenCon-actCon {
 | 
			
		||||
							// position: absolute;
 | 
			
		||||
							// top: 100rpx;
 | 
			
		||||
							width: 400rpx;
 | 
			
		||||
							white-space: nowrap;
 | 
			
		||||
							/* 禁止换行 */
 | 
			
		||||
							overflow: hidden;
 | 
			
		||||
							/* 隐藏超出部分 */
 | 
			
		||||
							text-overflow: ellipsis;
 | 
			
		||||
							margin-top: 60rpx;
 | 
			
		||||
							// margin-top: 60rpx;
 | 
			
		||||
							font-size: 28rpx;
 | 
			
		||||
							font-weight: 400;
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						.itenCon-actPrice {
 | 
			
		||||
							position: absolute;
 | 
			
		||||
							bottom: 0;
 | 
			
		||||
							font-size: 26rpx;
 | 
			
		||||
							font-weight: 900;
 | 
			
		||||
							font-weight: 400;
 | 
			
		||||
							color: #9c9c9c;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
@ -2938,12 +3094,12 @@
 | 
			
		||||
 | 
			
		||||
				.invoiceList-itemSelect {
 | 
			
		||||
					display: flex;
 | 
			
		||||
					justify-content: space-between;
 | 
			
		||||
					justify-content: center;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					background-color: #F0FFDF;
 | 
			
		||||
					width: 93%;
 | 
			
		||||
					width: 91%;
 | 
			
		||||
					margin-top: 20rpx;
 | 
			
		||||
					padding: 20rpx 20rpx;
 | 
			
		||||
					padding: 20rpx 30rpx;
 | 
			
		||||
					height: 220rpx;
 | 
			
		||||
					border-radius: 40rpx 40rpx 40rpx 40rpx;
 | 
			
		||||
					border: 2rpx solid #9CEAA2;
 | 
			
		||||
@ -2958,7 +3114,7 @@
 | 
			
		||||
 | 
			
		||||
					.item-con {
 | 
			
		||||
						margin-left: 20rpx;
 | 
			
		||||
						width: 70%;
 | 
			
		||||
						width: 90%;
 | 
			
		||||
						height: 160rpx;
 | 
			
		||||
						position: relative;
 | 
			
		||||
						color: #323232;
 | 
			
		||||
@ -2986,10 +3142,9 @@
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						.itenCon-actPrice {
 | 
			
		||||
							// position: absolute;
 | 
			
		||||
							// bottom: 0;
 | 
			
		||||
							color: #9c9c9c;
 | 
			
		||||
							font-size: 26rpx;
 | 
			
		||||
							font-weight: 900;
 | 
			
		||||
							font-weight: 400;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1683,6 +1683,14 @@
 | 
			
		||||
						this.price = '';
 | 
			
		||||
						this.priceName = '免费';
 | 
			
		||||
						this.qunQrcode = '';
 | 
			
		||||
						this.times_b = '';
 | 
			
		||||
						this.times_sinb = '';
 | 
			
		||||
						this.times_b_int = '';
 | 
			
		||||
						this.times_sinb_int = '';
 | 
			
		||||
						this.times_e = '';
 | 
			
		||||
						this.times_e_int = '';
 | 
			
		||||
						this.times_sine = '';
 | 
			
		||||
						this.times_sine_int ='';
 | 
			
		||||
						this.form = {
 | 
			
		||||
				
 | 
			
		||||
							cate_ids: '',
 | 
			
		||||
@ -1904,6 +1912,14 @@
 | 
			
		||||
						this.price = '';
 | 
			
		||||
						this.priceName = '免费';
 | 
			
		||||
						this.qunQrcode = '';
 | 
			
		||||
						this.times_b = '';
 | 
			
		||||
						this.times_sinb = '';
 | 
			
		||||
						this.times_b_int = '';
 | 
			
		||||
						this.times_sinb_int = '';
 | 
			
		||||
						this.times_e = '';
 | 
			
		||||
						this.times_e_int = '';
 | 
			
		||||
						this.times_sine = '';
 | 
			
		||||
						this.times_sine_int ='';
 | 
			
		||||
						this.form = {
 | 
			
		||||
				
 | 
			
		||||
							cate_ids: '',
 | 
			
		||||
 | 
			
		||||
@ -208,7 +208,7 @@
 | 
			
		||||
					<view class="draftBox" v-if="!isFormValid" @click="openDraftShow">草稿箱
 | 
			
		||||
						<view
 | 
			
		||||
							style="color: #ff4810;font-family: PingFang SC, PingFang SC;font-weight: 400;font-size: 28rpx;">
 | 
			
		||||
							({{draftList.length}})</view>
 | 
			
		||||
							({{draftCount}})</view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
 | 
			
		||||
					<span class="flex align-items justify-center" v-if="agreeAdd == false"
 | 
			
		||||
@ -348,7 +348,7 @@
 | 
			
		||||
				</view>
 | 
			
		||||
				<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
 | 
			
		||||
				<view style="height: 700rpx;">
 | 
			
		||||
					<long-date v-if="dateShow" chooseNum="90"
 | 
			
		||||
					<long-date v-if="dateShow" :default-time="defaultTime" chooseNum="90"
 | 
			
		||||
						@select="datefirm($event, hdIndex)"></long-date>
 | 
			
		||||
				</view>
 | 
			
		||||
			</u-popup>
 | 
			
		||||
@ -366,7 +366,7 @@
 | 
			
		||||
				</view>
 | 
			
		||||
				<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
 | 
			
		||||
				<view style="height: 700rpx;">
 | 
			
		||||
					<long-date v-if="birthShow" chooseNum="90"
 | 
			
		||||
					<long-date v-if="birthShow" :default-time="defaultTime" chooseNum="90"
 | 
			
		||||
						@select="birthConfirm($event, bmIndex)"></long-date>
 | 
			
		||||
				</view>
 | 
			
		||||
			</u-popup>
 | 
			
		||||
@ -412,12 +412,13 @@
 | 
			
		||||
				:custom-style="popupStyletkDraft">
 | 
			
		||||
				<view class="popup_tkallDraft">
 | 
			
		||||
					<view class="popup_tkDraft" style="display: flex;justify-content: center;">
 | 
			
		||||
						<view style="font-weight: 400;font-size: 28rpx;margin-right: 220rpx;" @click="closeDraftShow()">取消</view>
 | 
			
		||||
						<view style="font-weight: 400;font-size: 28rpx;margin-right: 220rpx;" @click="closeDraftShow()">
 | 
			
		||||
							取消</view>
 | 
			
		||||
						<view style="font-weight: 800;">草稿箱</view>
 | 
			
		||||
						<view style="font-weight: 400;font-size: 28rpx;margin-left: 220rpx;" @click="selectSureDraft()">
 | 
			
		||||
							确定</view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<scroll-view scroll-y="true" class="popup-content">
 | 
			
		||||
					<scroll-view scroll-y="true" class="popup-content" @scrolltolower="handleDraftMore()">
 | 
			
		||||
						<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
 | 
			
		||||
							<view :class="(draftSelectIndex === index ) ? 'invoiceList-itemSelect':'invoiceList-item'"
 | 
			
		||||
								@click="selectDraft(item,index)">
 | 
			
		||||
@ -460,8 +461,7 @@
 | 
			
		||||
					justifyContent: 'start',
 | 
			
		||||
					alignItems: 'center',
 | 
			
		||||
					flexColumn: 'column'
 | 
			
		||||
				}"
 | 
			
		||||
				@close="baoDraftClose" @open="baoDraftOpen" :safeAreaInsetBottom="false" :closeable="false">
 | 
			
		||||
				}" @close="baoDraftClose" @open="baoDraftOpen" :safeAreaInsetBottom="false" :closeable="false">
 | 
			
		||||
				<view style="text-align: center;margin-top: 30rpx;">
 | 
			
		||||
					<image src="/static/fabu/renzheng.png" style="width: 140rpx;height: 140rpx;"></image>
 | 
			
		||||
				</view>
 | 
			
		||||
@ -642,6 +642,9 @@
 | 
			
		||||
				defaultTime: null,
 | 
			
		||||
				draftType: 0,
 | 
			
		||||
				baoDraftShow: false,
 | 
			
		||||
				draftCount: 0,
 | 
			
		||||
				page: 1,
 | 
			
		||||
				limit: 10,
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
		onLoad() {
 | 
			
		||||
@ -654,7 +657,7 @@
 | 
			
		||||
			this.getrefund_list();
 | 
			
		||||
			this.getitembq();
 | 
			
		||||
			this.selectItemTuikuan();
 | 
			
		||||
			this.getDraftList('15');
 | 
			
		||||
			// this.getDraftList('15');
 | 
			
		||||
			//var c=uni.getSystemInfoSync();
 | 
			
		||||
			//844-94-70-100 = 580
 | 
			
		||||
			//763-47-(100-47)-34-50
 | 
			
		||||
@ -684,6 +687,21 @@
 | 
			
		||||
				this.isFormValid = this.form.title.length > 0 || newVal.length > 0;
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		onReachBottom() {
 | 
			
		||||
			console.log('onReachBottom');
 | 
			
		||||
			// this.page++;
 | 
			
		||||
			// this.getDraftList();
 | 
			
		||||
			// if (this.status == -2) {
 | 
			
		||||
			// 	this.page++;
 | 
			
		||||
			// 	this.getAfterList();
 | 
			
		||||
			// }else if(this.status == 15) {
 | 
			
		||||
			// 	this.page++;
 | 
			
		||||
			// 	this.getDraftList();
 | 
			
		||||
			// } else {
 | 
			
		||||
			// 	this.page++;
 | 
			
		||||
			// 	this.getHotList(this.selected);
 | 
			
		||||
			// }
 | 
			
		||||
		},
 | 
			
		||||
		filters: {
 | 
			
		||||
			formatTimestamp(value) {
 | 
			
		||||
				if (!value) return '';
 | 
			
		||||
@ -938,7 +956,7 @@
 | 
			
		||||
				const defaultTime = new Date();
 | 
			
		||||
				// defaultTime.setHours(defaultTime.getHours() + 8);
 | 
			
		||||
				console.log('活动时间defaultTime', defaultTime);
 | 
			
		||||
				this.defaultTime = defaultTime;
 | 
			
		||||
				// this.defaultTime = defaultTime;
 | 
			
		||||
			},
 | 
			
		||||
			birthShowHidden() {
 | 
			
		||||
				console.log('报名时间');
 | 
			
		||||
@ -978,7 +996,7 @@
 | 
			
		||||
				const currentTime = dayjs().format('YYYY-MM-DD HH');
 | 
			
		||||
				// const currentTime = this.getCurrentTimePlus8Hours();
 | 
			
		||||
				var b = currentTime + ':00';
 | 
			
		||||
				console.log('b', b);
 | 
			
		||||
				console.log('b', b, this.times_b);
 | 
			
		||||
				if (this.times_b == '' || this.times_b == null) {
 | 
			
		||||
					console.log('判断是否this.times_b小于当前时间 用的是年月日而不是时间戳');
 | 
			
		||||
					//判断是否this.times_b小于当前时间 用的是年月日而不是时间戳
 | 
			
		||||
@ -1241,24 +1259,19 @@
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			//轮播图处的相关内容
 | 
			
		||||
			// 回调参数为包含columnIndex、value、values
 | 
			
		||||
			confirm(e) {
 | 
			
		||||
				console.log('confirm', e.value)
 | 
			
		||||
				console.log('回调参数confirm', e.value)
 | 
			
		||||
				this.form.cut = e.value[0]
 | 
			
		||||
				this.fileList1 = [],
 | 
			
		||||
					this.list1 = '',
 | 
			
		||||
					this.name = ''
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			oversize(e) {
 | 
			
		||||
				this.$u.toast("请传1MB以内大小的图片!");
 | 
			
		||||
				return false;
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			// 删除图片
 | 
			
		||||
			deletePic(event) {
 | 
			
		||||
				const {
 | 
			
		||||
@ -1266,6 +1279,8 @@
 | 
			
		||||
					index
 | 
			
		||||
				} = event;
 | 
			
		||||
 | 
			
		||||
				console.log('轮播图删除照片', event, this[`fileList${name}`], this.fileList1);
 | 
			
		||||
 | 
			
		||||
				if (index >= 0 && index < this[`fileList${name}`].length) {
 | 
			
		||||
					this[`fileList${name}`].splice(index, 1);
 | 
			
		||||
 | 
			
		||||
@ -1275,9 +1290,10 @@
 | 
			
		||||
						// this.list1 = this.fileList1.length > 0 ? this.fileList1[0].url : '';
 | 
			
		||||
 | 
			
		||||
						this.list1 = this.fileList1.map(item => item.url).join(',');
 | 
			
		||||
						console.log('Updated list1:', this.list1);
 | 
			
		||||
						console.log('单张-Updated list1:', this.list1);
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					console.log('非单张-Updated list1:', this.list1);
 | 
			
		||||
 | 
			
		||||
					// 确保对应的 list 字段是一个数组
 | 
			
		||||
					let list = this[`list${name}`];
 | 
			
		||||
@ -1287,12 +1303,14 @@
 | 
			
		||||
						list.splice(index, 1);
 | 
			
		||||
						console.log(`Updated list${name}:`, list);
 | 
			
		||||
					}
 | 
			
		||||
					console.log('list', list);
 | 
			
		||||
				} else {
 | 
			
		||||
					console.error('Invalid index');
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			// 新增图片
 | 
			
		||||
			async afterRead(event) {
 | 
			
		||||
				console.log('新增-afterRead的轮播图');
 | 
			
		||||
				let lists = [].concat(event.file);
 | 
			
		||||
				let fileListLen = this[`fileList${event.name}`].length;
 | 
			
		||||
				let categoryMap = [{
 | 
			
		||||
@ -1344,6 +1362,7 @@
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			uploadFilePromise(url, category) {
 | 
			
		||||
				console.log('上传-uploadFilePromise');
 | 
			
		||||
				console.log('category', category)
 | 
			
		||||
				return new Promise((resolve, reject) => {
 | 
			
		||||
					let a = uni.uploadFile({
 | 
			
		||||
@ -1379,6 +1398,8 @@
 | 
			
		||||
							reject(err);
 | 
			
		||||
						}
 | 
			
		||||
					});
 | 
			
		||||
 | 
			
		||||
					console.log('');
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			// 查询状态
 | 
			
		||||
@ -1423,293 +1444,12 @@
 | 
			
		||||
				return telRegex.test(tel);
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			//草稿箱列表
 | 
			
		||||
			getDraftList() {
 | 
			
		||||
				uni.$u.http
 | 
			
		||||
					.get("/api/school.newactivity.activity_drafts/drafts_list", {
 | 
			
		||||
						params: {
 | 
			
		||||
							keywords: this.keywords,
 | 
			
		||||
							page: this.page,
 | 
			
		||||
							limit: this.limit,
 | 
			
		||||
							order: 'normal',
 | 
			
		||||
							// status: status,
 | 
			
		||||
						},
 | 
			
		||||
					})
 | 
			
		||||
					.then((res) => {
 | 
			
		||||
						if (res.code == 1) {
 | 
			
		||||
							this.count = res.data.count;
 | 
			
		||||
							console.log('getDraft', res.data.list);
 | 
			
		||||
							this.draftList = res.data.list.data;
 | 
			
		||||
							for (let i = 0; i < this.draftList.length; i++) {
 | 
			
		||||
								this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
 | 
			
		||||
									'YYYY-MM-DD HH:mm')
 | 
			
		||||
							}
 | 
			
		||||
							if (this.draftList.length >= res.data.count) {
 | 
			
		||||
								this.loadStatus = "nomore";
 | 
			
		||||
							} else {
 | 
			
		||||
								this.loadStatus = "loading";
 | 
			
		||||
							}
 | 
			
		||||
							console.log('draftList', this.draftList);
 | 
			
		||||
						} else {
 | 
			
		||||
							uni.showToast({
 | 
			
		||||
								title: res.msg,
 | 
			
		||||
								icon: "none",
 | 
			
		||||
								duration: 2000,
 | 
			
		||||
							});
 | 
			
		||||
							this.loadStatus = "loading";
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
					.catch((error) => {
 | 
			
		||||
						console.error("请求失败", error);
 | 
			
		||||
						this.loadStatus = "loading";
 | 
			
		||||
					});
 | 
			
		||||
			},
 | 
			
		||||
			//新增草稿箱
 | 
			
		||||
			addDraft() {
 | 
			
		||||
				console.log('草稿');
 | 
			
		||||
				let url = '/api/school.newactivity.activity_drafts/add';
 | 
			
		||||
				let params = {};
 | 
			
		||||
				let hdtime = ''
 | 
			
		||||
				let bmtime = ''
 | 
			
		||||
				this.form.cate_ids = this.list.map(item => item.id).join(',');
 | 
			
		||||
				if (this.times_b_int && this.times_e_int) {
 | 
			
		||||
					hdtime = this.times_b_int + ' - ' + this.times_e_int;
 | 
			
		||||
				}
 | 
			
		||||
				if (this.times_sinb_int && this.times_sine_int) {
 | 
			
		||||
					bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
 | 
			
		||||
				}
 | 
			
		||||
				// let hdtime = this.times_b_int + ' - ' + this.times_e_int;
 | 
			
		||||
				// let bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
 | 
			
		||||
				params = {
 | 
			
		||||
					title: this.form.title,
 | 
			
		||||
					cate_ids: this.form.cate_ids,
 | 
			
		||||
					content: this.form.content,
 | 
			
		||||
					// refund_id: 1,
 | 
			
		||||
					refund_id: this.form.refund_id,
 | 
			
		||||
					price: this.form.price == '' ? 0 : this.form.price,
 | 
			
		||||
					stock: this.form.stock,
 | 
			
		||||
					sign_time: bmtime || '',
 | 
			
		||||
					time: hdtime || '',
 | 
			
		||||
					images: this.list1,
 | 
			
		||||
					longitude: this.form.longitude,
 | 
			
		||||
					latitude: this.form.latitude,
 | 
			
		||||
					address: this.form.address,
 | 
			
		||||
					address_detail: this.form.address_detail,
 | 
			
		||||
					image: this.qunQrcode
 | 
			
		||||
				}
 | 
			
		||||
				console.log('草稿1');
 | 
			
		||||
				// if (this.isFormValid) {
 | 
			
		||||
 | 
			
		||||
				// }
 | 
			
		||||
				if(typeof params.image === 'object' && params.image == null ){
 | 
			
		||||
					console.log('typeof', params.image);
 | 
			
		||||
					params.image =''
 | 
			
		||||
				}
 | 
			
		||||
				uni.$u.http.post(url, params).then(res => {
 | 
			
		||||
					console.log('草稿2');
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						//置空
 | 
			
		||||
						this.fileList1 = [];
 | 
			
		||||
						this.agree = false;
 | 
			
		||||
						this.list1 = '';
 | 
			
		||||
						this.list = [];
 | 
			
		||||
						this.price = '';
 | 
			
		||||
						this.priceName = '免费';
 | 
			
		||||
						this.qunQrcode = '';
 | 
			
		||||
						this.form = {
 | 
			
		||||
 | 
			
		||||
							cate_ids: '',
 | 
			
		||||
							// 活动分类名字
 | 
			
		||||
							cate_idsName: "",
 | 
			
		||||
							content: '',
 | 
			
		||||
							refund_id: '',
 | 
			
		||||
							refund_idn: '',
 | 
			
		||||
							price: 0,
 | 
			
		||||
							stock: '',
 | 
			
		||||
							sign_time: '',
 | 
			
		||||
							time: '',
 | 
			
		||||
							images: '',
 | 
			
		||||
							title: '',
 | 
			
		||||
							address: '',
 | 
			
		||||
							latitude: '',
 | 
			
		||||
							longitude: '',
 | 
			
		||||
							address_detail: '', //详细位置
 | 
			
		||||
							date: '', //活动开始时间
 | 
			
		||||
							date1: '', //活动结束时间
 | 
			
		||||
							birth: '', //报名开始日期
 | 
			
		||||
							birth1: '', //报名结束日期
 | 
			
		||||
						}
 | 
			
		||||
						this.baoDraftShow = true
 | 
			
		||||
						
 | 
			
		||||
						// uni.showToast({
 | 
			
		||||
						// 	title: '存草稿成功!',
 | 
			
		||||
						// 	icon: 'none',
 | 
			
		||||
						// 	duration: 2000,
 | 
			
		||||
						// });
 | 
			
		||||
 | 
			
		||||
						
 | 
			
		||||
						this.isFormValid = false
 | 
			
		||||
						this.getDraftList();
 | 
			
		||||
						setTimeout(function() {
 | 
			
		||||
							// uni.navigateTo({
 | 
			
		||||
							// 	url: "/packageA/my/orderList"
 | 
			
		||||
							// })
 | 
			
		||||
						}, 1000);
 | 
			
		||||
					} else {
 | 
			
		||||
						this.$u.toast(res.msg);
 | 
			
		||||
						// uni.showToast({
 | 
			
		||||
						// 	title: res.msg,
 | 
			
		||||
						// 	icon: 'none',
 | 
			
		||||
						// 	duration: 2000
 | 
			
		||||
						// });
 | 
			
		||||
					}
 | 
			
		||||
				}).catch(error => {
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
						title: error.msg,
 | 
			
		||||
						icon: 'none',
 | 
			
		||||
						duration: 2000
 | 
			
		||||
					});
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			//保存草稿成功弹框
 | 
			
		||||
			baoDraftOpen() {
 | 
			
		||||
				this.baoDraftShow = true
 | 
			
		||||
			},
 | 
			
		||||
			//关闭草稿
 | 
			
		||||
			closeDraftShow() {
 | 
			
		||||
				this.draftShow = false
 | 
			
		||||
			},
 | 
			
		||||
			//显示草稿
 | 
			
		||||
			openDraftShow() {
 | 
			
		||||
				this.draftShow = true
 | 
			
		||||
			},
 | 
			
		||||
			selectDraft(item, index) {
 | 
			
		||||
				console.log('index:', index, 'item:', item);
 | 
			
		||||
				this.draftId = item.id
 | 
			
		||||
				this.draftSelectIndex = index
 | 
			
		||||
				
 | 
			
		||||
			},
 | 
			
		||||
			selectSureDraft() {
 | 
			
		||||
				console.log('selectSureDraft', this.draftId);
 | 
			
		||||
				uni.$u.http.get('/api/school.newactivity.activity_drafts/detail', {
 | 
			
		||||
					params: {
 | 
			
		||||
						id: this.draftId,
 | 
			
		||||
					}
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						this.draftType = 1
 | 
			
		||||
						this.form = res.data.detail
 | 
			
		||||
						console.log('selectSureDraft', this.form.cate_ids);
 | 
			
		||||
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
						const idBqSet = new Set(this.form.cate_ids);
 | 
			
		||||
						const bqArray = this.bqList.reduce((acc, obj) => {
 | 
			
		||||
							if (this.form.cate_ids.includes(obj.id)) {
 | 
			
		||||
								acc.push(obj);
 | 
			
		||||
							}
 | 
			
		||||
							return acc;
 | 
			
		||||
						}, []);
 | 
			
		||||
						console.log('bqArray', bqArray);
 | 
			
		||||
						let arrIdsName = bqArray.map((item) => {
 | 
			
		||||
							return item.name
 | 
			
		||||
						})
 | 
			
		||||
						this.form.cate_idsName = arrIdsName.join(',');
 | 
			
		||||
						console.log('cate_idsName', this.form.cate_idsName);
 | 
			
		||||
						this.list = bqArray
 | 
			
		||||
						this.form.cate_ids = res.data.detail.cate_ids;
 | 
			
		||||
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
 | 
			
		||||
						this.form.refund_idn = this.form.refund_info.title;
 | 
			
		||||
						console.log('refund_idn', this.form.refund_idn);
 | 
			
		||||
						// 转换为 fileList 格式
 | 
			
		||||
						if (this.form.images != '') {
 | 
			
		||||
							this.fileList1 = this.form.images.map(url => ({
 | 
			
		||||
								url: url,
 | 
			
		||||
								status: 'success',
 | 
			
		||||
								message: ''
 | 
			
		||||
							}));
 | 
			
		||||
							this.list1 = this.form.images
 | 
			
		||||
							console.log('fileList1', this.fileList1);
 | 
			
		||||
						}
 | 
			
		||||
						if (this.form.image) {
 | 
			
		||||
							this.qunQrcode = ({
 | 
			
		||||
								url: this.form.image,
 | 
			
		||||
								status: 'success',
 | 
			
		||||
								message: ''
 | 
			
		||||
							})
 | 
			
		||||
							this.QunQrcode1 = this.qunQrcode
 | 
			
		||||
							console.log('qunQrcode222', this.qunQrcode);
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						if (this.form.start_time_text != '' && this.form.end_time_text != '') {
 | 
			
		||||
							const time_start = this.form.start_time_text.slice(5, 16)
 | 
			
		||||
							const time_end = this.form.end_time_text.slice(5, 16)
 | 
			
		||||
							this.form.time = time_start + ' - ' + time_end
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						if (this.form.sign_start_time_text != '' && this.form.sign_end_time_text != '') {
 | 
			
		||||
							const signTime_start = this.form.sign_start_time_text.slice(5, 16)
 | 
			
		||||
							const signTime_end = this.form.sign_end_time_text.slice(5, 16)
 | 
			
		||||
							this.form.sign_time = signTime_start + ' - ' + signTime_end
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						this.price = this.form.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
 | 
			
		||||
						if (!this.original_activity_id) {
 | 
			
		||||
							this.times_b_int = this.form.start_time_text
 | 
			
		||||
							this.times_e_int = this.form.end_time_text
 | 
			
		||||
							this.times_sinb_int = this.form.sign_start_time_text
 | 
			
		||||
							this.times_sine_int = this.form.sign_end_time_text
 | 
			
		||||
						} else {
 | 
			
		||||
							this.times_b_int = ''
 | 
			
		||||
							this.times_e_int = ''
 | 
			
		||||
							this.times_sinb_int = ''
 | 
			
		||||
							this.times_sine_int = ''
 | 
			
		||||
							this.form.sign_time = ''
 | 
			
		||||
							this.form.time = ''
 | 
			
		||||
						}
 | 
			
		||||
						if (this.type == 2) {
 | 
			
		||||
							this.form.title = ''
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						this.mobile = this.detail.user.mobile.slice(0, 3) + 'XXXX' + this.detail.user.mobile.slice(
 | 
			
		||||
							7);
 | 
			
		||||
					} else {
 | 
			
		||||
						uni.showToast({
 | 
			
		||||
							title: res.msg,
 | 
			
		||||
							icon: 'none',
 | 
			
		||||
							duration: 2000
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
				}).catch(error => {});
 | 
			
		||||
				// console.log('366666');
 | 
			
		||||
				// this.form.title = this.selectDradtForm.title
 | 
			
		||||
				// this.form.content = this.selectDradtForm.content
 | 
			
		||||
				// this.form.images = this.selectDradtForm.images
 | 
			
		||||
				// this.form.address = this.selectDradtForm.address
 | 
			
		||||
				// this.form.address_detail = this.selectDradtForm.address_detail
 | 
			
		||||
				// this.form.stock = this.selectDradtForm.stock
 | 
			
		||||
				// this.form.price = this.selectDradtForm.price
 | 
			
		||||
				// this.form.time = this.selectDradtForm.time
 | 
			
		||||
				// this.form.sign_time = this.selectDradtForm.sign_time
 | 
			
		||||
				// this.form.title = this.selectDradtForm.title
 | 
			
		||||
				// this.form.cate_ids = this.selectDradtForm.cate_ids
 | 
			
		||||
				// this.form.refund_id = this.selectDradtForm.refund_id
 | 
			
		||||
				// console.log('99999',this.form);
 | 
			
		||||
				// this.price = this.form.price
 | 
			
		||||
				// // this.form.refund_idn = this.form.refund_info.title;
 | 
			
		||||
				// this.priceDo()
 | 
			
		||||
				this.closeDraftShow();
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			apply() {
 | 
			
		||||
				if (this.cardStatus == -1) {
 | 
			
		||||
					this.cardShow = true;
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				console.log('apply agreeShow:', this.agreeShow);
 | 
			
		||||
				let url = '/api/school.new_activity/add';
 | 
			
		||||
				let params = {};
 | 
			
		||||
				this.form.cate_ids = this.list.map(item => item.id).join(',');
 | 
			
		||||
@ -1850,8 +1590,10 @@
 | 
			
		||||
				params.image = params.image.replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
				console.log('params', params.image);
 | 
			
		||||
 | 
			
		||||
				console.log('草稿1');
 | 
			
		||||
				if(this.draftType == 1) {
 | 
			
		||||
				console.log('草稿1', this.draftType, params.images);
 | 
			
		||||
				// if (this.draftType == 1) {
 | 
			
		||||
				if (Array.isArray(params.images)) {
 | 
			
		||||
					console.log('这是一个数组', params.images);
 | 
			
		||||
					for (let i = 0; i < params.images.length; i++) {
 | 
			
		||||
						if (/^https?:\/\//i.test(params.images[i])) {
 | 
			
		||||
							params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
@ -1862,7 +1604,26 @@
 | 
			
		||||
					}
 | 
			
		||||
					console.log('params.images排查数组的url的路径', params.images);
 | 
			
		||||
					params.images = params.images.join(',');
 | 
			
		||||
				} else if (typeof params.images === 'string') {
 | 
			
		||||
					console.log('这是一个字符串', params.images);
 | 
			
		||||
					const imags = params.images
 | 
			
		||||
					params.images = imags.split(',')
 | 
			
		||||
					for (let i = 0; i < params.images.length; i++) {
 | 
			
		||||
						if (/^https?:\/\//i.test(params.images[i])) {
 | 
			
		||||
							params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
							console.log('params.images[i].url', params.images[i]);
 | 
			
		||||
						} else {
 | 
			
		||||
							params.images[i] = params.images[i]
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					console.log('params.images排查数组的url的路径', params.images);
 | 
			
		||||
					params.images = params.images.join(',');
 | 
			
		||||
					console.log('这是一个字符串2', params.images);
 | 
			
		||||
				} else if (typeof params.images === 'object' && this.myField !== null) {
 | 
			
		||||
					console.log('这是一个对象', params.images);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// }
 | 
			
		||||
 | 
			
		||||
				uni.$u.http.post(url, params).then(res => {
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
@ -1874,6 +1635,19 @@
 | 
			
		||||
						this.price = '';
 | 
			
		||||
						this.priceName = '免费';
 | 
			
		||||
						this.qunQrcode = '';
 | 
			
		||||
						this.draftSelectIndex = '';
 | 
			
		||||
						this.current = '';
 | 
			
		||||
						this.currents = -1;
 | 
			
		||||
						// this.agreeShow = false
 | 
			
		||||
						this.agreeAdd = false;
 | 
			
		||||
						this.times_b = '';
 | 
			
		||||
						this.times_sinb = '';
 | 
			
		||||
						this.times_b_int = '';
 | 
			
		||||
						this.times_sinb_int = '';
 | 
			
		||||
						this.times_e = '';
 | 
			
		||||
						this.times_e_int = '';
 | 
			
		||||
						this.times_sine = '';
 | 
			
		||||
						this.times_sine_int ='';
 | 
			
		||||
						this.form = {
 | 
			
		||||
 | 
			
		||||
							cate_ids: '',
 | 
			
		||||
@ -1898,6 +1672,8 @@
 | 
			
		||||
							birth1: '', //报名结束日期
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						console.log('置空的form', );
 | 
			
		||||
						
 | 
			
		||||
						uni.showToast({
 | 
			
		||||
							title: '发布成功!',
 | 
			
		||||
							icon: 'none',
 | 
			
		||||
@ -1924,7 +1700,329 @@
 | 
			
		||||
					});
 | 
			
		||||
				});
 | 
			
		||||
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			//草稿箱列表
 | 
			
		||||
			getDraftList() {
 | 
			
		||||
				uni.$u.http
 | 
			
		||||
					.get("/api/school.newactivity.activity_drafts/drafts_list", {
 | 
			
		||||
						params: {
 | 
			
		||||
							keywords: this.keywords,
 | 
			
		||||
							page: this.page,
 | 
			
		||||
							limit: this.limit,
 | 
			
		||||
							order: 'normal',
 | 
			
		||||
							// status: status,
 | 
			
		||||
						},
 | 
			
		||||
					})
 | 
			
		||||
					.then((res) => {
 | 
			
		||||
						if (res.code == 1) {
 | 
			
		||||
							this.draftCount = res.data.count;
 | 
			
		||||
							console.log('getDraft', res.data.list);
 | 
			
		||||
							const list = res.data.list.data || [];
 | 
			
		||||
							this.draftList.push(...list);
 | 
			
		||||
							// this.draftList = res.data.list.data;
 | 
			
		||||
							for (let i = 0; i < this.draftList.length; i++) {
 | 
			
		||||
								this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
 | 
			
		||||
									'YYYY-MM-DD HH:mm')
 | 
			
		||||
							}
 | 
			
		||||
							if (this.draftList.length >= res.data.count) {
 | 
			
		||||
								this.loadStatus = "nomore";
 | 
			
		||||
							} else {
 | 
			
		||||
								this.loadStatus = "loading";
 | 
			
		||||
							}
 | 
			
		||||
							console.log('draftList', this.draftList);
 | 
			
		||||
						} else {
 | 
			
		||||
							uni.showToast({
 | 
			
		||||
								title: res.msg,
 | 
			
		||||
								icon: "none",
 | 
			
		||||
								duration: 2000,
 | 
			
		||||
							});
 | 
			
		||||
							this.loadStatus = "loading";
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
					.catch((error) => {
 | 
			
		||||
						console.error("请求失败", error);
 | 
			
		||||
						this.loadStatus = "loading";
 | 
			
		||||
					});
 | 
			
		||||
			},
 | 
			
		||||
			//草稿箱加载更多
 | 
			
		||||
			handleDraftMore() {
 | 
			
		||||
				console.log('加载22', this.draftCount, this.draftList.length);
 | 
			
		||||
				if (this.draftCount > this.draftList.length) {
 | 
			
		||||
					console.log('加载');
 | 
			
		||||
					this.page++;
 | 
			
		||||
					this.getDraftList();
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			},
 | 
			
		||||
			//新增草稿箱
 | 
			
		||||
			addDraft() {
 | 
			
		||||
				console.log('草稿');
 | 
			
		||||
				let url = '/api/school.newactivity.activity_drafts/add';
 | 
			
		||||
				let params = {};
 | 
			
		||||
				let hdtime = ''
 | 
			
		||||
				let bmtime = ''
 | 
			
		||||
				this.form.cate_ids = this.list.map(item => item.id).join(',');
 | 
			
		||||
				if (this.times_b_int && this.times_e_int) {
 | 
			
		||||
					hdtime = this.times_b_int + ' - ' + this.times_e_int;
 | 
			
		||||
				}
 | 
			
		||||
				if (this.times_sinb_int && this.times_sine_int) {
 | 
			
		||||
					bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
 | 
			
		||||
				}
 | 
			
		||||
				// let hdtime = this.times_b_int + ' - ' + this.times_e_int;
 | 
			
		||||
				// let bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
 | 
			
		||||
				params = {
 | 
			
		||||
					title: this.form.title,
 | 
			
		||||
					cate_ids: this.form.cate_ids,
 | 
			
		||||
					content: this.form.content,
 | 
			
		||||
					// refund_id: 1,
 | 
			
		||||
					refund_id: this.form.refund_id,
 | 
			
		||||
					price: this.form.price == '' ? 0 : this.form.price,
 | 
			
		||||
					stock: this.form.stock,
 | 
			
		||||
					sign_time: bmtime || '',
 | 
			
		||||
					time: hdtime || '',
 | 
			
		||||
					images: this.list1,
 | 
			
		||||
					longitude: this.form.longitude,
 | 
			
		||||
					latitude: this.form.latitude,
 | 
			
		||||
					address: this.form.address,
 | 
			
		||||
					address_detail: this.form.address_detail,
 | 
			
		||||
					image: this.qunQrcode
 | 
			
		||||
				}
 | 
			
		||||
				console.log('草稿1');
 | 
			
		||||
				if (Array.isArray(params.images)) {
 | 
			
		||||
					console.log('这是一个数组', params.images);
 | 
			
		||||
					for (let i = 0; i < params.images.length; i++) {
 | 
			
		||||
						if (/^https?:\/\//i.test(params.images[i])) {
 | 
			
		||||
							params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
							console.log('params.images[i].url', params.images[i]);
 | 
			
		||||
						} else {
 | 
			
		||||
							params.images[i] = params.images[i]
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					console.log('params.images排查数组的url的路径', params.images);
 | 
			
		||||
					params.images = params.images.join(',');
 | 
			
		||||
				} else if (typeof params.images === 'string') {
 | 
			
		||||
					console.log('这是一个字符串', params.images);
 | 
			
		||||
					const imags = params.images
 | 
			
		||||
					params.images = imags.split(',')
 | 
			
		||||
					for (let i = 0; i < params.images.length; i++) {
 | 
			
		||||
						if (/^https?:\/\//i.test(params.images[i])) {
 | 
			
		||||
							params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
							console.log('params.images[i].url', params.images[i]);
 | 
			
		||||
						} else {
 | 
			
		||||
							params.images[i] = params.images[i]
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					console.log('params.images排查数组的url的路径', params.images);
 | 
			
		||||
					params.images = params.images.join(',');
 | 
			
		||||
					console.log('这是一个字符串2', params.images);
 | 
			
		||||
				} else if (typeof params.images === 'object' && this.myField !== null) {
 | 
			
		||||
					console.log('这是一个对象', params.images);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				if (typeof params.image === 'object' && params.image == null) {
 | 
			
		||||
					console.log('typeof', params.image);
 | 
			
		||||
					params.image = params.image.url;
 | 
			
		||||
				}
 | 
			
		||||
				// 转换为相对路径
 | 
			
		||||
				params.image = params.image.replace(/^https?:\/\/[^/]+/, '');
 | 
			
		||||
				console.log('params', params.image);
 | 
			
		||||
				uni.$u.http.post(url, params).then(res => {
 | 
			
		||||
					console.log('草稿2');
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						//置空
 | 
			
		||||
						this.fileList1 = [];
 | 
			
		||||
						this.agree = false;
 | 
			
		||||
						this.list1 = '';
 | 
			
		||||
						this.list = [];
 | 
			
		||||
						this.price = '';
 | 
			
		||||
						this.priceName = '免费';
 | 
			
		||||
						this.qunQrcode = '';
 | 
			
		||||
						this.draftSelectIndex = '';
 | 
			
		||||
						this.current = '';
 | 
			
		||||
						this.currents = -1;
 | 
			
		||||
						// this.agreeShow = false
 | 
			
		||||
						this.agreeAdd = false
 | 
			
		||||
						this.times_b = '';
 | 
			
		||||
						this.times_sinb = '';
 | 
			
		||||
						this.times_b_int = '';
 | 
			
		||||
						this.times_sinb_int = '';
 | 
			
		||||
						this.times_e = '';
 | 
			
		||||
						this.times_e_int = '';
 | 
			
		||||
						this.times_sine = '';
 | 
			
		||||
						this.times_sine_int ='';
 | 
			
		||||
						this.form = {
 | 
			
		||||
							cate_ids: '',
 | 
			
		||||
							// 活动分类名字
 | 
			
		||||
							cate_idsName: "",
 | 
			
		||||
							content: '',
 | 
			
		||||
							refund_id: '',
 | 
			
		||||
							refund_idn: '',
 | 
			
		||||
							price: 0,
 | 
			
		||||
							stock: '',
 | 
			
		||||
							sign_time: '',
 | 
			
		||||
							time: '',
 | 
			
		||||
							images: '',
 | 
			
		||||
							title: '',
 | 
			
		||||
							address: '',
 | 
			
		||||
							latitude: '',
 | 
			
		||||
							longitude: '',
 | 
			
		||||
							address_detail: '', //详细位置
 | 
			
		||||
							date: '', //活动开始时间
 | 
			
		||||
							date1: '', //活动结束时间
 | 
			
		||||
							birth: '', //报名开始日期
 | 
			
		||||
							birth1: '', //报名结束日期
 | 
			
		||||
						}
 | 
			
		||||
						console.log('新增draft:', this.form.cate_idsName);
 | 
			
		||||
						this.baoDraftShow = true
 | 
			
		||||
 | 
			
		||||
						// uni.showToast({
 | 
			
		||||
						// 	title: '存草稿成功!',
 | 
			
		||||
						// 	icon: 'none',
 | 
			
		||||
						// 	duration: 2000,
 | 
			
		||||
						// });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
						this.isFormValid = false
 | 
			
		||||
						this.getDraftList();
 | 
			
		||||
						setTimeout(function() {
 | 
			
		||||
							// uni.navigateTo({
 | 
			
		||||
							// 	url: "/packageA/my/orderList"
 | 
			
		||||
							// })
 | 
			
		||||
						}, 1000);
 | 
			
		||||
					} else {
 | 
			
		||||
						this.$u.toast(res.msg);
 | 
			
		||||
						// uni.showToast({
 | 
			
		||||
						// 	title: res.msg,
 | 
			
		||||
						// 	icon: 'none',
 | 
			
		||||
						// 	duration: 2000
 | 
			
		||||
						// });
 | 
			
		||||
					}
 | 
			
		||||
				}).catch(error => {
 | 
			
		||||
					uni.showToast({
 | 
			
		||||
						title: error.msg,
 | 
			
		||||
						icon: 'none',
 | 
			
		||||
						duration: 2000
 | 
			
		||||
					});
 | 
			
		||||
				});
 | 
			
		||||
			},
 | 
			
		||||
			//保存草稿成功弹框
 | 
			
		||||
			baoDraftOpen() {
 | 
			
		||||
				this.baoDraftShow = true
 | 
			
		||||
			},
 | 
			
		||||
			//关闭草稿
 | 
			
		||||
			closeDraftShow() {
 | 
			
		||||
				this.draftShow = false
 | 
			
		||||
			},
 | 
			
		||||
			//显示草稿
 | 
			
		||||
			openDraftShow() {
 | 
			
		||||
				this.draftShow = true
 | 
			
		||||
			},
 | 
			
		||||
			selectDraft(item, index) {
 | 
			
		||||
				console.log('index:', index, 'item:', item);
 | 
			
		||||
				this.draftId = item.id
 | 
			
		||||
				this.draftSelectIndex = index
 | 
			
		||||
			},
 | 
			
		||||
			selectSureDraft() {
 | 
			
		||||
				console.log('selectSureDraft', this.draftId);
 | 
			
		||||
				uni.$u.http.get('/api/school.newactivity.activity_drafts/detail', {
 | 
			
		||||
					params: {
 | 
			
		||||
						id: this.draftId,
 | 
			
		||||
					}
 | 
			
		||||
				}).then(res => {
 | 
			
		||||
					if (res.code == 1) {
 | 
			
		||||
						this.draftType = 1
 | 
			
		||||
						this.form = res.data.detail
 | 
			
		||||
						console.log('selectSureDraft', this.form.cate_ids);
 | 
			
		||||
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
						const idBqSet = new Set(this.form.cate_ids);
 | 
			
		||||
						const bqArray = this.bqList.reduce((acc, obj) => {
 | 
			
		||||
							if (this.form.cate_ids.includes(obj.id)) {
 | 
			
		||||
								acc.push(obj);
 | 
			
		||||
							}
 | 
			
		||||
							return acc;
 | 
			
		||||
						}, []);
 | 
			
		||||
						console.log('bqArray', bqArray);
 | 
			
		||||
						let arrIdsName = bqArray.map((item) => {
 | 
			
		||||
							return item.name
 | 
			
		||||
						})
 | 
			
		||||
						this.form.cate_idsName = arrIdsName.join(',');
 | 
			
		||||
						console.log('cate_idsName', this.form.cate_idsName);
 | 
			
		||||
						this.list = bqArray
 | 
			
		||||
						this.form.cate_ids = res.data.detail.cate_ids;
 | 
			
		||||
 | 
			
		||||
						console.log('cate_ids', this.form.cate_ids);
 | 
			
		||||
 | 
			
		||||
						this.form.refund_idn = this.form.refund_info.title;
 | 
			
		||||
						console.log('refund_idn', this.form.refund_idn);
 | 
			
		||||
						// 转换为 fileList 格式
 | 
			
		||||
						if (this.form.images != '') {
 | 
			
		||||
							this.fileList1 = this.form.images.map(url => ({
 | 
			
		||||
								url: url,
 | 
			
		||||
								status: 'success',
 | 
			
		||||
								message: ''
 | 
			
		||||
							}));
 | 
			
		||||
							this.list1 = this.form.images
 | 
			
		||||
							console.log('fileList1', this.fileList1);
 | 
			
		||||
						}
 | 
			
		||||
						if (this.form.image) {
 | 
			
		||||
							this.qunQrcode = ({
 | 
			
		||||
								url: this.form.image,
 | 
			
		||||
								status: 'success',
 | 
			
		||||
								message: ''
 | 
			
		||||
							})
 | 
			
		||||
							this.QunQrcode1 = this.qunQrcode
 | 
			
		||||
							console.log('qunQrcode222', this.qunQrcode);
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						if (this.form.start_time_text != '' && this.form.end_time_text != '') {
 | 
			
		||||
							const time_start = this.form.start_time_text.slice(5, 16)
 | 
			
		||||
							const time_end = this.form.end_time_text.slice(5, 16)
 | 
			
		||||
							this.form.time = time_start + ' - ' + time_end
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						if (this.form.sign_start_time_text != '' && this.form.sign_end_time_text != '') {
 | 
			
		||||
							const signTime_start = this.form.sign_start_time_text.slice(5, 16)
 | 
			
		||||
							const signTime_end = this.form.sign_end_time_text.slice(5, 16)
 | 
			
		||||
							this.form.sign_time = signTime_start + ' - ' + signTime_end
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						this.price = this.form.price
 | 
			
		||||
						this.priceDo()
 | 
			
		||||
 | 
			
		||||
						if (!this.original_activity_id) {
 | 
			
		||||
							this.times_b_int = this.form.start_time_text
 | 
			
		||||
							this.times_e_int = this.form.end_time_text
 | 
			
		||||
							this.times_sinb_int = this.form.sign_start_time_text
 | 
			
		||||
							this.times_sine_int = this.form.sign_end_time_text
 | 
			
		||||
						} else {
 | 
			
		||||
							this.times_b_int = ''
 | 
			
		||||
							this.times_e_int = ''
 | 
			
		||||
							this.times_sinb_int = ''
 | 
			
		||||
							this.times_sine_int = ''
 | 
			
		||||
							this.form.sign_time = ''
 | 
			
		||||
							this.form.time = ''
 | 
			
		||||
						}
 | 
			
		||||
						if (this.type == 2) {
 | 
			
		||||
							this.form.title = ''
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						this.mobile = this.detail.user.mobile.slice(0, 3) + 'XXXX' + this.detail.user.mobile.slice(
 | 
			
		||||
							7);
 | 
			
		||||
					} else {
 | 
			
		||||
						uni.showToast({
 | 
			
		||||
							title: res.msg,
 | 
			
		||||
							icon: 'none',
 | 
			
		||||
							duration: 2000
 | 
			
		||||
						})
 | 
			
		||||
					}
 | 
			
		||||
				}).catch(error => {});
 | 
			
		||||
				this.closeDraftShow();
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
</script>
 | 
			
		||||
@ -2510,10 +2608,9 @@
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						.itenCon-actPrice {
 | 
			
		||||
							// position: absolute;
 | 
			
		||||
							// bottom: 0;
 | 
			
		||||
							font-size: 26rpx;
 | 
			
		||||
							font-weight: 400;
 | 
			
		||||
							color: #9c9c9c;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
@ -2570,8 +2667,7 @@
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						.itenCon-actPrice {
 | 
			
		||||
							// position: absolute;
 | 
			
		||||
							// bottom: 0;
 | 
			
		||||
							color: #9c9c9c;
 | 
			
		||||
							font-size: 26rpx;
 | 
			
		||||
							font-weight: 400;
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user