xlh 1 gadu atpakaļ
vecāks
revīzija
768c50200b
1 mainītis faili ar 64 papildinājumiem un 71 dzēšanām
  1. 64 71
      pages/publish/publish.vue

+ 64 - 71
pages/publish/publish.vue

@@ -60,7 +60,8 @@
 							<view class="option_right">
 							<view class="option_right">
 								<view class="input_details">
 								<view class="input_details">
 									<view class="details">
 									<view class="details">
-										<view class="uni-input text">{{classifyList[index]==null?'请选择':classifyList[index]}}</view>
+										<view class="uni-input text">
+											{{classifyList[index]==null?'请选择':classifyList[index]}}</view>
 									</view>
 									</view>
 									<view class="arrow">
 									<view class="arrow">
 										<image
 										<image
@@ -78,28 +79,28 @@
 
 
 			<view class="userOptionsBox">
 			<view class="userOptionsBox">
 				<view class="optionsItemBox">
 				<view class="optionsItemBox">
-					<picker mode="selector" :range="recruitmentList" @change="handelRecruitment">
-						<view class="optionItem">
-							<view class="option_left">
-								<text class="option_text">
-									招募人数
-								</text>
-							</view>
+					<view class="optionItem">
+						<view class="option_left">
+							<text class="option_text">
+								招募人数
+							</text>
+						</view>
 
 
-							<view class="option_right">
-								<view class="input_details">
-									<view class="details">
-										<view class="uni-input text">{{recruitment}}</view>
-									</view>
-									<view class="arrow">
-										<image
-											src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
-											mode="aspectFill"></image>
-									</view>
+						<view class="option_right">
+							<view class="input_details">
+								<view class="details">
+									<input type="text" class="title text" placeholder="请输入人数"
+										placeholder-style="color: rgb(153, 153, 153);" maxlength="2"
+										v-model="recruitment" />
+								</view>
+								<view class="arrow">
+									<image
+										src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
+										mode="aspectFill"></image>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
-					</picker>
+					</view>
 
 
 				</view>
 				</view>
 			</view>
 			</view>
@@ -209,28 +210,28 @@
 			</view>
 			</view>
 			<view class="userOptionsBox">
 			<view class="userOptionsBox">
 				<view class="optionsItemBox">
 				<view class="optionsItemBox">
-					<picker mode="selector" :range="fundsList" @change="handelFunds">
-						<view class="optionItem">
-							<view class="option_left">
-								<text class="option_text">
-									活动费用(元)
-								</text>
-							</view>
+					<view class="optionItem">
+						<view class="option_left">
+							<text class="option_text">
+								活动费用(元)
+							</text>
+						</view>
 
 
-							<view class="option_right">
-								<view class="input_details">
-									<view class="details">
-										<view class="uni-input text">{{funds}}</view>
-									</view>
-									<view class="arrow">
-										<image
-											src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
-											mode="aspectFill"></image>
-									</view>
+						<view class="option_right">
+							<view class="input_details">
+								<view class="details">
+									<!-- <view class="uni-input text">{{funds}}</view> -->
+									<input type="text" class="title text" placeholder="请输入费用"
+										placeholder-style="color: rgb(153, 153, 153);" maxlength="4" v-model="funds" />
+								</view>
+								<view class="arrow">
+									<image
+										src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/arrow-right.png"
+										mode="aspectFill"></image>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
-					</picker>
+					</view>
 
 
 				</view>
 				</view>
 			</view>
 			</view>
@@ -339,16 +340,13 @@
 				imageValue: '',
 				imageValue: '',
 
 
 				// 分类
 				// 分类
-				classifyList: ['直播活动', '常规教研活动', '专题教研活动','推荐课程'],
+				classifyList: ['直播活动', '常规教研活动', '专题教研活动', '推荐课程'],
 				// index判断选择分类  0       1                   2         3   ,对应上面
 				// index判断选择分类  0       1                   2         3   ,对应上面
-				index:null,
+				index: null,
 				classify: '请选择',
 				classify: '请选择',
 
 
 				// 人数
 				// 人数
-				recruitmentList: Array.from({
-					length: 100
-				}, (_, index) => index + 1), //100人
-				recruitment: '请选择',
+				recruitment: '',
 
 
 				// 活动形式
 				// 活动形式
 				activityformList: ['户外活动', 'xxxx', 'xxxx'],
 				activityformList: ['户外活动', 'xxxx', 'xxxx'],
@@ -358,10 +356,7 @@
 				addressList: ['深圳xxxx大学', '深圳xxxx大学', '深圳xxxx大学'],
 				addressList: ['深圳xxxx大学', '深圳xxxx大学', '深圳xxxx大学'],
 				address: '请选择',
 				address: '请选择',
 				// 活动费用
 				// 活动费用
-				fundsList: Array.from({
-					length: 30
-				}, (_, index) => (index + 1) * 100).map(item => item),
-				funds: '请选择',
+				funds: '',
 
 
 
 
 				// activityDate: currentDate,
 				// activityDate: currentDate,
@@ -369,8 +364,8 @@
 				deadlineDate: '请选择',
 				deadlineDate: '请选择',
 				activeList: [],
 				activeList: [],
 				formData: {},
 				formData: {},
-				
-			
+
+
 			};
 			};
 		},
 		},
 		computed: {
 		computed: {
@@ -388,7 +383,7 @@
 				this.activityDate = e[0] + '~' + e[e.length - 1]
 				this.activityDate = e[0] + '~' + e[e.length - 1]
 				this.show = false
 				this.show = false
 			},
 			},
-			
+
 			editPublish() {
 			editPublish() {
 				const routes = getCurrentPages()
 				const routes = getCurrentPages()
 				console.log(routes);
 				console.log(routes);
@@ -489,12 +484,12 @@
 				this.showPopup = false;
 				this.showPopup = false;
 				this.showPopupConfirm = false;
 				this.showPopupConfirm = false;
 				uni.switchTab({
 				uni.switchTab({
-					url:'/pages/activityPage/activityPage'
+					url: '/pages/activityPage/activityPage'
 				})
 				})
 			},
 			},
 			// 上传发布
 			// 上传发布
 			conf() {
 			conf() {
-				
+
 				this.formData = {
 				this.formData = {
 					// id: this.$store.state.user.openid,
 					// id: this.$store.state.user.openid,
 					id: this.btntext === '修改发布' ? this.acId : this.$store.state.user.openid,
 					id: this.btntext === '修改发布' ? this.acId : this.$store.state.user.openid,
@@ -509,14 +504,14 @@
 					deadlineDate: this.deadlineDate,
 					deadlineDate: this.deadlineDate,
 					funds: this.funds
 					funds: this.funds
 				};
 				};
-				
+
 				this.showPopup = false;
 				this.showPopup = false;
 				this.showPopupConfirm = true
 				this.showPopupConfirm = true
 				// return console.log(formData);
 				// return console.log(formData);
 				console.log(this.btntext);
 				console.log(this.btntext);
-				
-				
-				
+
+
+
 				if (this.btntext === '修改发布') {
 				if (this.btntext === '修改发布') {
 					// formData.acId = this.acId
 					// formData.acId = this.acId
 					// console.log(formData);
 					// console.log(formData);
@@ -534,15 +529,15 @@
 							this.activityintro = ''
 							this.activityintro = ''
 							this.imageValue = ''
 							this.imageValue = ''
 							this.index = null
 							this.index = null
-							this.recruitment = '请选择'
+							this.recruitment = ''
 							this.activityform = '请选择'
 							this.activityform = '请选择'
 							this.address = '请选择'
 							this.address = '请选择'
-							this.funds = '请选择'
+							this.funds = ''
 							this.activityDate = '请选择'
 							this.activityDate = '请选择'
 							this.deadlineDate = '请选择'
 							this.deadlineDate = '请选择'
 							setTimeout(() => {
 							setTimeout(() => {
 								uni.switchTab({
 								uni.switchTab({
-									url:'/pages/activityPage/activityPage'
+									url: '/pages/activityPage/activityPage'
 								})
 								})
 							}, 2000)
 							}, 2000)
 						}
 						}
@@ -552,25 +547,18 @@
 			},
 			},
 			handelclassify(e) {
 			handelclassify(e) {
 				// console.log(e);
 				// console.log(e);
-				
-				this.index=e.detail.value
+
+				this.index = e.detail.value
 				console.log(this.index);
 				console.log(this.index);
 				// this.classify = this.classifyList[e.detail.value]
 				// this.classify = this.classifyList[e.detail.value]
 				// console.log(this.classify);
 				// console.log(this.classify);
 			},
 			},
-			handelRecruitment(e) {
-				this.recruitment = this.recruitmentList[e.detail.value]
-				console.log(this.imageValue);
-			},
 			handelActivityform(e) {
 			handelActivityform(e) {
 				this.activityform = this.activityformList[e.detail.value]
 				this.activityform = this.activityformList[e.detail.value]
 			},
 			},
 			handeladdress(e) {
 			handeladdress(e) {
 				this.address = this.addressList[e.detail.value]
 				this.address = this.addressList[e.detail.value]
 			},
 			},
-			handelFunds(e) {
-				this.funds = this.fundsList[e.detail.value]
-			},
 			// activityDateChange: function(e) {
 			// activityDateChange: function(e) {
 			// 	this.activityDate = e.detail.value
 			// 	this.activityDate = e.detail.value
 			// },
 			// },
@@ -638,7 +626,7 @@
 			}
 			}
 
 
 			this.formData = this.$store.state.formData
 			this.formData = this.$store.state.formData
-			let data =uni.getStorageSync('formData')
+			let data = uni.getStorageSync('formData')
 			console.log(data);
 			console.log(data);
 			this.activitytitle = data.activitytitle
 			this.activitytitle = data.activitytitle
 			this.activityintro = data.activityintro
 			this.activityintro = data.activityintro
@@ -650,7 +638,7 @@
 			this.funds = data.funds
 			this.funds = data.funds
 			this.activityDate = data.activityDate
 			this.activityDate = data.activityDate
 			this.deadlineDate = data.deadlineDate
 			this.deadlineDate = data.deadlineDate
-			
+
 			console.log(this.index);
 			console.log(this.index);
 		},
 		},
 		beforeDestroy() {
 		beforeDestroy() {
@@ -667,7 +655,7 @@
 				activityDate: this.activityDate,
 				activityDate: this.activityDate,
 				deadlineDate: this.deadlineDate
 				deadlineDate: this.deadlineDate
 			}
 			}
-			uni.setStorageSync('formData',data)
+			uni.setStorageSync('formData', data)
 			// this.$store.commit('saveformData', this.formData);
 			// this.$store.commit('saveformData', this.formData);
 			// console.log('Submitted formData:', this.formData);
 			// console.log('Submitted formData:', this.formData);
 			// console.log('Current state.formData:', this.$store.state.formData);
 			// console.log('Current state.formData:', this.$store.state.formData);
@@ -835,11 +823,16 @@
 							.details {
 							.details {
 								display: flex;
 								display: flex;
 								flex-direction: row;
 								flex-direction: row;
+								color: rgb(153, 153, 153);
 
 
 								.text {
 								.text {
 									font-size: 28rpx;
 									font-size: 28rpx;
 									color: rgb(153, 153, 153);
 									color: rgb(153, 153, 153);
 								}
 								}
+
+								input {
+									text-align: right;
+								}
 							}
 							}
 
 
 							.arrow {
 							.arrow {