Browse Source

修改学院专业填写方式

yuanyiming 1 year ago
parent
commit
a03302f33a

+ 1 - 1
components/listBlock1/listBlock1.vue

@@ -220,7 +220,6 @@
 
 			// 获取收藏事件
 			getdata() {
-				// console.log(111);
 				// this.timer=setInterval(() => {
 				// 	if(this.animationDataArr.length>0){
 				// 		console.log(this.animationDataArr.length);
@@ -246,6 +245,7 @@
 					res[0].forEach(i => {
 						this.collArr.push(i.acId)
 					})
+					// console.log(111);
 					// console.log('this.collArr',this.collArr);
 				})
 			},

+ 2 - 2
pages.json

@@ -324,8 +324,8 @@
 			{
 				"pagePath": "pages/ranking/ranking",
 				"text": "排行",
-				"iconPath": "static/tabbar/Ranking1.png",
-				"selectedIconPath": "static/tabbar/Ranking.png"
+				"iconPath": "static/tabbar/ranking.png",
+				"selectedIconPath": "static/tabbar/ranking1.png"
 			},
 			{
 				"pagePath": "pages/mine/mine",

+ 18 - 4
pages/activityPageNew/activityPageNew.vue

@@ -104,6 +104,10 @@
 				// swiper: 0,
 				searchText: "", // 搜索文本
 
+				// 必须要两个,因为常规与专题的是分两次进行的
+				isone1: true, // 常规判断是否第一次进入页面
+				isone2: true, // 教研判断是否第一次进入页面
+
 				acLoading: 0, //0默认值  1加载中 2没有更多了
 				accurrentPage: 1, //页数
 
@@ -272,6 +276,10 @@
 				this.$request('/selectActivity', "POST", data).then(res => {
 					// console.log('专题', res[0]);
 					// this.teclist = res[0]
+					if (this.isone1) {
+						this.teclist = []
+						this.isone1 = false
+					}
 					if (!res[0].length) {
 						this.acLoading = 2
 					} else {
@@ -297,6 +305,10 @@
 				this.$request('/selectActivity', "POST", data).then(res => {
 					// console.log('常规', res[0]);
 					// this.pulist = res[0]
+					if (this.isone2) {
+						this.pulist = []
+						this.isone2 = false
+					}
 					if (!res[0].length) {
 						this.puLoading = 2
 					} else {
@@ -349,12 +361,14 @@
 			});
 		},
 		onLoad() {
-			this.getpuData() //获取常规列表
-			this.getTecData() //获取专题列表
+
 		},
 		onShow() {
-			// this.pulist = []
-			// this.teclist = []
+			// 必须要两个,因为常规与专题的是分两次进行的
+			this.isone1 = true
+			this.isone2 = true
+			this.getpuData() //获取常规列表
+			this.getTecData() //获取专题列表
 
 			this.getAllMessage() // 调用app.js中的方法
 			// 获取收藏事件

+ 12 - 6
pages/feedback/feedback.vue

@@ -2,7 +2,7 @@
 	<view>
 		<statusBar :item="navBarData"></statusBar>
 		<view class="area">
-			<textarea v-model="cont" class="txt" maxlength='-1' placeholder="请输入您的反馈信息" />
+			<textarea v-model.trim="cont" class="txt" maxlength='-1' placeholder="请输入您的反馈信息" />
 		</view>
 
 		<!-- 弹窗 -->
@@ -11,7 +11,7 @@
 			<view class="popup-container" v-show="showPopup">
 				<view class="popup">
 					<view class="header">
-						<text>确认修改</text>
+						<text>确认提交</text>
 					</view>
 					<view class="footer">
 						<view class="cancel-btn" @click="showPopup=false">取消</view>
@@ -39,8 +39,14 @@
 		},
 		methods: {
 			popShow() {
-				this.showPopup = true
-
+				if (!this.cont) {
+					uni.showToast({
+						title: '请先填写反馈信息',
+						icon: 'none'
+					});
+				} else {
+					this.showPopup = true
+				}
 			},
 			conf() {
 				let data = {
@@ -52,9 +58,9 @@
 						title: '提交成功,感谢您的反馈',
 						icon: 'none'
 					});
-					this.cont=''
+					this.cont = ''
 					this.showPopup = false
-				})	
+				})
 			}
 		}
 	}

+ 33 - 31
pages/login_Wechat/login_Wechat.vue

@@ -3,8 +3,8 @@
 		<statusBar :item='navBarData'></statusBar>
 		<view class="block">
 			<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
-			<!-- <button class="avatar-wrapper" @click="getImg"> -->
-				<image class="avatar" :src="avatarUrl" ></image>
+				<!-- <button class="avatar-wrapper" @click="getImg"> -->
+				<image class="avatar" :src="avatarUrl"></image>
 			</button>
 		</view>
 
@@ -63,9 +63,9 @@
 						<view class="">
 							<text class="dian">*</text><text class="celTit">姓名</text>
 						</view>
-						<input type="text" class="inpSty" maxlength="10" placeholder="请输入真实姓名"
+						<input type="text" class="inpSty" placeholder="请输入真实姓名"
 							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
-							v-model="userData.username" />
+							v-model="uname" />
 					</view>
 					<view class="txtcell">
 						<view class="">
@@ -75,6 +75,13 @@
 							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="userData.tel" />
 					</view>
 					<view class="txtcell">
+						<view class="">
+							<text class="dian">*</text><text class="celTit">院校全称</text>
+						</view>
+						<input type="text" class="inpSty" placeholder="请输入院校全称"
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="stuName" />
+					</view>
+					<!-- <view class="txtcell">
 						<view class="" style="width: 100rpx;">
 							<text class="dian">*</text><text class="celTit">学院</text>
 						</view>
@@ -101,8 +108,15 @@
 							<uni-icons type="right" class="icooo" size="20" color='rgba(0, 0, 0, 0.4)'></uni-icons>
 						</view>
 
-					</view>
+					</view> -->
 					<view class="txtcell">
+						<view class="">
+							<text class="celTit">所在部门</text>
+						</view>
+						<input type="text" class="inpSty" placeholder="请输入所在部门"
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" v-model="majorName" />
+					</view>
+					<!-- 					<view class="txtcell">
 						<view class="" style="width: 100rpx;">
 							<text class="celTit">专业</text>
 						</view>
@@ -131,7 +145,7 @@
 							</view>
 							<uni-icons type="right" class="icooo" size="20" color='rgba(0, 0, 0, 0.4)'></uni-icons>
 						</view>
-					</view>
+					</view> -->
 					<view class="txtcell">
 						<view class="">
 							<text class="celTit">职称</text><text
@@ -197,6 +211,7 @@
 				// 学校
 				isshow: false,
 				stuName: '', //学校名称
+				uname:'',
 				colleges: [], //学校列表
 				// inpTxt: '', //学校id
 				// scharray: ['深圳城市××大学', '深圳××大学', '深圳××大学', '深圳××大学'],
@@ -442,7 +457,7 @@
 					txt: this.judgeNumber
 				}
 				this.$request('/selectStudentNumber', "Get", data).then(res => {
-					// console.log('失去焦点查询学号工号', res);
+					console.log('失去焦点查询学号工号', res);
 					if (res[0].length) {
 						let aaa = res[0][0]
 						if (aaa.cid !== null) {
@@ -519,22 +534,22 @@
 				// this.avatarUrl = avatarUrl
 			},
 			// 手机号一键登录
-			gotoIndex2(){
+			gotoIndex2() {
 				uni.getProvider({
-				  service: 'oauth',
-				  success: function (res) {
-				    console.log(res.provider)// ['qq', 'univerify']
-				  }
+					service: 'oauth',
+					success: function(res) {
+						console.log(res.provider) // ['qq', 'univerify']
+					}
 				});
 				return
 				uni.preLogin({
 					provider: 'univerify',
-					success(){  //预登录成功
+					success() { //预登录成功
 						// 显示一键登录选项
 					},
-					fail(res){  // 预登录失败
+					fail(res) { // 预登录失败
 						// 不显示一键登录选项(或置灰)
-				    // 根据错误信息判断失败原因,如有需要可将错误提交给统计服务器
+						// 根据错误信息判断失败原因,如有需要可将错误提交给统计服务器
 						console.log(res.errCode)
 						console.log(res.errMsg)
 					}
@@ -597,7 +612,7 @@
 				// tel: '',
 				// sch: '请选择',
 				// spe: '请选择',
-				if (!this.userData.username) return uni.showToast({
+				if (!this.uname) return uni.showToast({
 					title: '请输入姓名',
 					icon: 'none'
 				});
@@ -609,26 +624,14 @@
 					title: '请选择学院',
 					icon: 'none'
 				});
-				// if (this.majorInpTxt == '') return uni.showToast({
-				// 	title: '请选择专业',
-				// 	icon: 'none'
-				// });
-				// var reg = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
-				// if(!reg.test(this.userData.tel)){
-				// 	uni.showToast({
-				// 		title: '请输入正确的手机号格式',
-				// 		icon: 'none'
-				// 	});
-				// 	return
-				// }
-				// return
+
 				if (this.userData.tel.length != 11) return uni.showToast({
 					title: '号码不足11位,请检查',
 					icon: 'none'
 				});
 				this.userData.inpTxt = this.inpTxt
 				this.userData.majorInpTxt = this.majorInpTxt
-				this.userData.username=encodeURIComponent(this.userData.username)
+				this.userData.username = encodeURIComponent(this.uname)
 				this.userData.schName = encodeURIComponent(this.stuName)
 				this.userData.jorName = encodeURIComponent(this.majorName)
 
@@ -636,7 +639,6 @@
 				let oId = uni.getStorageSync('oId')
 				this.$request('/login', 'POST', this.userData).then(res => {
 					console.log('注册成功', res);
-
 					// 添加消息页面系统通知提示已加入会员
 					this.addMessage()
 

+ 2 - 2
pages/mine/mine.vue

@@ -107,8 +107,8 @@
 						</view>
 					</view> -->
 				</view>
-				<view class="optionsItemBox" @click="gotoFeedback">
-					<view class="optionItem">
+				<view class="optionsItemBox">
+					<view class="optionItem" @click="gotoFeedback">
 						<view class="option_left">
 							<span class="option_icon">
 								<image src="https://teacherapi.cocorobo.cn/teaching-file/static//mine/help.png"

+ 82 - 57
pages/mineEdit/mineEdit.vue

@@ -11,15 +11,15 @@
 					<image :src="userData.avatar" mode="aspectFill"></image>
 				</view>
 			</view>
-			<view class="setName">
+			<view class="setPicker">
 				<view class="edit_title">
 					<text>姓名</text>
 				</view>
 				<view class="input_details">
 					<view class="nickname">
-						<input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入昵称"
+						<input type="text" style=" text-align: right;" placeholder="请输入姓名"
 							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
-							v-model="userData.username" />
+							v-model="usname" />
 					</view>
 				</view>
 			</view>
@@ -47,9 +47,16 @@
 			<view class="setPicker">
 				<!-- <view class="content"> -->
 				<view class="edit_title">
-					<text>学院</text>
+					<text>院校全称</text>
+				</view>
+				<view class="input_details">
+					<view class="nickname">
+						<input type="text" style=" text-align: right;" placeholder="请输入院校全称"
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
+							v-model="stunam" />
+					</view>
 				</view>
-				<view class="InpLeft" @click="show">
+				<!-- 				<view class="InpLeft" @click="show">
 					<view class="" style="position: relative;">
 						<view class="">
 							{{ !userData.stuName?'请选择学院':userData.stuName }}
@@ -72,13 +79,20 @@
 						<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right_gray.png"
 							mode="aspectFill"></image>
 					</view>
-				</view>
+				</view> -->
 			</view>
 			<view class="setPicker">
 				<view class="edit_title">
-					<text>专业</text>
+					<text>所在部门</text>
+				</view>
+				<view class="input_details">
+					<view class="nickname">
+						<input type="text" style=" text-align: right;" placeholder="请输入所在部门"
+							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
+							v-model="majname" />
+					</view>
 				</view>
-				<view class="InpLeft" @click.stop="majorshow">
+				<!-- 				<view class="InpLeft" @click.stop="majorshow">
 					<view class="" style="position: relative;">
 						<view class="">
 							{{ !userData.majorName?'请选择专业':userData.majorName }}
@@ -104,18 +118,7 @@
 						<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right_gray.png"
 							mode="aspectFill"></image>
 					</view>
-					<!-- 
-					<input class="uni-input" v-model="searchMajor" style="width: 100%;" @click.stop="majorshow"
-						placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" placeholder="请选择专业" /> -->
-					<!-- <scroll-view scroll-y="true" show-scrollbar="true" class="list" v-if="jorshow">
-						<view id="demo1" class="listcon" @click="addmajor" :data-jor="i" v-for="(i,index) in majorList"
-							:key="index">{{i.name}}</view>
-					</scroll-view>
-					<view class="arrow">
-						<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right_gray.png"
-							mode="aspectFill"></image>
-					</view> -->
-				</view>
+				</view> -->
 
 			</view>
 			<view class="setPicker">
@@ -143,7 +146,7 @@
 					<view class="selfdomIntro">
 						<textarea type="text" placeholder="请输入你的个性签名" maxlength="75"
 							placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" style="color: black;"
-							v-model="userData.brief" />
+							v-model="bri" />
 					</view>
 				</view>
 			</view>
@@ -262,6 +265,11 @@
 				// 这两个因为要监视,所以不能放对象里面
 				inpTxt: '', //学校id
 				majorInpTxt: '', //专业id
+
+				usname: '',
+				stunam: '',
+				majname: '',
+				bri:'',
 				userData: {
 					// oid: '',
 					// avatar: '', //头像
@@ -500,14 +508,23 @@
 					openid: this.$store.state.user.openid
 				}).then(res => {
 					// 假如简介为null
-					// console.log('res[0][0].brief', res);
+					console.log('res[0][0]', res);
 					if (!res[0][0].brief) {
 						res[0][0].brief = ''
 					}
 					// console.log('获取渲染数据', res[0][0]);
 					this.userData = res[0][0]
-					this.inpTxt = res[0][0].school
-					this.majorInpTxt = res[0][0].spe
+
+					// 将原来的学校,专业id清除
+					// this.inpTxt = res[0][0].school
+					this.inpTxt = ''
+					// this.majorInpTxt = res[0][0].spe
+					this.majorInpTxt = ''
+					this.usname=res[0][0].username
+					this.stunam=res[0][0].stuName
+					this.majname=res[0][0].majorName
+					this.bri=res[0][0].brief
+					
 					// this.stuName = res[0][0].stuName
 					// console.log('this.stuName', this.stuName);
 					this.majorName = res[0][0].majorName
@@ -515,10 +532,10 @@
 
 				})
 				// 获取学院
-				this.$request('/selectColleges', "get", {}).then(res => {
-					// console.log(res);
-					this.colleges = res[0]
-				})
+				// this.$request('/selectColleges', "get", {}).then(res => {
+				// 	// console.log(res);
+				// 	this.colleges = res[0]
+				// })
 			},
 			// 取消操作
 			closePopup() {
@@ -530,15 +547,17 @@
 				// console.log(' this.userData', this.userData);
 				this.userData.school = this.inpTxt
 				this.userData.spe = this.majorInpTxt
-				this.userData.username=encodeURIComponent(this.userData.username)
-				this.userData.stuName=encodeURIComponent(this.userData.stuName)
-				this.userData.majorName=encodeURIComponent(this.userData.majorName)
-				this.userData.brief=encodeURIComponent(this.userData.brief)
-				
 				
+				this.userData.username = encodeURIComponent(this.usname)
+				this.userData.stuName = encodeURIComponent(this.stunam)
+				this.userData.majorName = encodeURIComponent(this.majname)
+				this.userData.brief = encodeURIComponent(this.bri)
+
+
 				// return console.log('提交修改', this.userData);
 				this.$request('/updateUserInfo', "POST", this.userData).then(res => {
 					this.showPopupConfirm = true
+					// this.userData = {}
 					// console.log('this', this);
 					this.$request('/selectUser', 'POST', {
 						oId: this.$store.state.user.openid
@@ -560,14 +579,14 @@
 					title: '未登录',
 					icon: 'none'
 				})
-				if (!this.userData.username) {
+				if (!this.usname) {
 					return uni.showToast({
 						title: '昵称不能为空',
 						icon: 'none'
 					})
 				}
 
-				if (!this.userData.stuName) {
+				if (!this.stunam) {
 					return uni.showToast({
 						title: '学院不能为空',
 						icon: 'none'
@@ -861,7 +880,7 @@
 		display: flex;
 		align-items: center;
 		font-size: 32rpx;
-		width: 60px;
+		width: 80px;
 		flex-shrink: 0;
 
 	}
@@ -891,27 +910,14 @@
 			}
 		}
 
-		.setName {
-			display: flex;
-			justify-content: space-between;
-			height: 92rpx;
-			border-top: 1px solid #E7E7E7;
+		// .setName {
+		// 	display: flex;
+		// 	justify-content: space-between;
+		// 	height: 92rpx;
+		// 	border-top: 1px solid #E7E7E7;
 
-			.input_details {
-				display: flex;
-				align-items: center;
-				flex-direction: row;
 
-				.nickname {
-					width: 350rpx;
-					text-align: end;
-					// padding-right: 10rpx;
-					// margin-right: 10rpx;
-					font-size: 28rpx;
-					color: rgb(153, 153, 153);
-				}
-			}
-		}
+		// }
 
 		.setPicker {
 			height: 92rpx;
@@ -933,14 +939,33 @@
 			// 	display: flex;
 			// 	align-items: center;
 			// 	justify-content: space-between;
-
 			.input_details {
 				display: flex;
 				align-items: center;
-				justify-content: flex-end;
+				flex-direction: row;
+				flex: 1;
 
+				.nickname {
+					width: 100%;
+					text-align: end;
+					// padding-right: 10rpx;
+					// margin-right: 10rpx;
+					font-size: 28rpx;
+					color: rgb(153, 153, 153);
+
+					input {
+						width: 100%;
+					}
+				}
 			}
 
+			// .input_details {
+			// 	display: flex;
+			// 	align-items: center;
+			// 	justify-content: flex-end;
+
+			// }
+
 			// }
 		}
 

BIN
static/tabbar/Ranking.png


BIN
static/tabbar/Ranking1.png