wkyy 1 éve
szülő
commit
227ab23702

+ 2 - 2
apis/youth/course.js

@@ -38,7 +38,7 @@ export function getTeacherListBySortId(data) {
 }
 }
 
 
 export function addBuyLogList(data) {
 export function addBuyLogList(data) {
-	var url='/mobile/student/addBuyLogList';
+	var url='/mobile/nsStudent/addBuyLogList';
 	return requestYouth({
 	return requestYouth({
 		method: 'post',
 		method: 'post',
 		data: data,
 		data: data,
@@ -93,7 +93,7 @@ export function getBuyInvoiceInfo(data) {
 }
 }
 
 
 export function loadMyBuyLog(data) {
 export function loadMyBuyLog(data) {
-	var url='/mobile/student/loadMyBuyLog';
+	var url='/mobile/nsStudent/loadMyBuyLog';
 	return requestYouth({
 	return requestYouth({
 		method: 'post',
 		method: 'post',
 		data: data,
 		data: data,

+ 1 - 1
apis/youth/mine.js

@@ -53,7 +53,7 @@ export function loadMyCourses(data) {
 }
 }
 
 
 export function getStudentDtl(data) {
 export function getStudentDtl(data) {
-	var url='/mobile/student/getStudentDtl';
+	var url='/mobile/nsStudent/getStudentDtl';
 	return requestYouth({
 	return requestYouth({
 		method: 'post',
 		method: 'post',
 		data: data,
 		data: data,

+ 1 - 0
pages/parents/login/login.vue

@@ -178,6 +178,7 @@
 				this.agreementValue = true;
 				this.agreementValue = true;
 			},
 			},
 			signIn() {
 			signIn() {
+				var checkPhoneResult = checkPhone(this.form.telephone);
 				if(!this.form.telephone) {
 				if(!this.form.telephone) {
 					uni.showToast({
 					uni.showToast({
 						title: checkPhoneResult,
 						title: checkPhoneResult,

+ 18 - 0
pages/parents/mine/changePhoneNumber/changePhoneNumber.vue

@@ -38,6 +38,7 @@
 				form: {
 				form: {
 					telephone: '',
 					telephone: '',
 					verifyCode: '',
 					verifyCode: '',
+					type: '1'
 				},
 				},
 				isSendMsgIng: false,
 				isSendMsgIng: false,
 				isCodeTipsColor: false,
 				isCodeTipsColor: false,
@@ -47,12 +48,29 @@
 		},
 		},
 		methods: {
 		methods: {
 			confirmChange() {
 			confirmChange() {
+				var checkPhoneResult = checkPhone(this.form.telephone);
+				if(!this.form.telephone) {
+					uni.showToast({
+						title: checkPhoneResult,
+						icon: "none"
+					})
+					return;
+				}
+				if(!this.form.verifyCode) {
+					uni.showToast({
+						title: "请输入验证码",
+						icon: "none"
+					})
+					return
+				}
+				
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",
 					mask: true,
 					mask: true,
 				})
 				})
 				mineApi.changePhone(this.form).then((response) => {
 				mineApi.changePhone(this.form).then((response) => {
 					uni.hideLoading();
 					uni.hideLoading();
+					this.carhelp.logoff();
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '/pages/parents/mine/changePhoneNumber/changeResult'
 						url: '/pages/parents/mine/changePhoneNumber/changeResult'
 					})
 					})

+ 6 - 2
pages/parents/mine/changePhoneNumber/changeResult.vue

@@ -17,7 +17,7 @@
 				  </view>
 				  </view>
 			   </view>
 			   </view>
 		</view>
 		</view>
-		<button class="login" @click="gotoUrl('pages/parents/login/login')">立即登录</button>
+		<button class="login" @click="toLogin">立即登录</button>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -29,7 +29,11 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
-			
+			toLogin() {
+				uni.reLaunch({
+					url: '/pages/parents/login/login'
+				})
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 2 - 1
pages/parents/mine/editProfile.vue

@@ -39,7 +39,8 @@
 			return {
 			return {
 				form: {
 				form: {
 					headImg: '',
 					headImg: '',
-					nickName: ''
+					nickName: '',
+					type: '1'
 				}
 				}
 			}
 			}
 		},
 		},

+ 2 - 2
pages/parents/mine/mine.vue

@@ -126,7 +126,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="item">
+			<!-- <view class="item">
 				<view class="title">
 				<view class="title">
 					<view class="icon">
 					<view class="icon">
 						<img src="../../../assets/img/riLine-customer-service-2-line@1x.png" alt="">
 						<img src="../../../assets/img/riLine-customer-service-2-line@1x.png" alt="">
@@ -144,7 +144,7 @@
 						<u-icon name="arrow-right" color="#cccccc"></u-icon>
 						<u-icon name="arrow-right" color="#cccccc"></u-icon>
 					</view>
 					</view>
 				</view>
 				</view>
-			</view>
+			</view> -->
 			<view class="item" @click="gotoUrl('pages/parents/mine/logout')">
 			<view class="item" @click="gotoUrl('pages/parents/mine/logout')">
 				<view class="title">
 				<view class="title">
 					<view class="icon">
 					<view class="icon">

+ 1 - 0
pages/teacher/login/login.vue

@@ -178,6 +178,7 @@
 			},
 			},
 			//登录
 			//登录
 			signIn() {
 			signIn() {
+				var checkPhoneResult = checkPhone(this.form.telephone);
 				if (!this.form.telephone) {
 				if (!this.form.telephone) {
 					uni.showToast({
 					uni.showToast({
 						title: checkPhoneResult,
 						title: checkPhoneResult,

+ 3 - 3
pages/youth/course/confirmOrder.vue

@@ -35,16 +35,16 @@
 					</view>
 					</view>
 					<view class="value">
 					<view class="value">
 						<text>{{item.studentName}}</text>
 						<text>{{item.studentName}}</text>
-						<text style="color: #999999;margin-left: 8rpx;">{{item.age}}岁</text>
+						<!-- <text style="color: #999999;margin-left: 8rpx;">{{item.age}}岁</text> -->
 						<text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
 						<text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="item">
 				<view class="item">
 					<view class="title">
 					<view class="title">
-						<text>联系人手机号</text>
+						<text>学员手机号</text>
 					</view>
 					</view>
 					<view class="value">
 					<view class="value">
-						<text>{{item.firstContactPhone}}</text>
+						<text>{{item.phone}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>

+ 6 - 6
pages/youth/course/paymentRecords.vue

@@ -10,15 +10,15 @@
 					<u-icon name="arrow-down-fill" color="#999999" size="10"></u-icon>
 					<u-icon name="arrow-down-fill" color="#999999" size="10"></u-icon>
 				</view>
 				</view>
 			</view>
 			</view>
-			<u-line color="#999999" direction="col" length="40" margin="auto" />
-			<view class="course" @click="courseShow = true">
+			<!-- <u-line color="#999999" direction="col" length="40" margin="auto" /> -->
+			<!-- <view class="course" @click="courseShow = true">
 				<view class="text">
 				<view class="text">
 					{{studentName}}
 					{{studentName}}
 				</view>
 				</view>
 				<view class="icon">
 				<view class="icon">
 					<u-icon name="arrow-down-fill" color="#999999" size="10"></u-icon>
 					<u-icon name="arrow-down-fill" color="#999999" size="10"></u-icon>
 				</view>
 				</view>
-			</view>
+			</view> -->
 		</view>
 		</view>
 
 
 		<u-picker mode="time" v-model="show" :params="params" :defaultTime="defaultTime" @confirm="confirm">
 		<u-picker mode="time" v-model="show" :params="params" :defaultTime="defaultTime" @confirm="confirm">
@@ -101,10 +101,10 @@
 			var date = new Date();
 			var date = new Date();
 			this.year = date.getFullYear();
 			this.year = date.getFullYear();
 
 
-			// this.studentId = this.carhelp.getNsStudentId().studentId;
-			// this.getLoadMyBuyLog();
+			this.studentId = this.carhelp.getNsStudentId().studentId;
+			this.getLoadMyBuyLog();
 			// this.getCourseList();
 			// this.getCourseList();
-			this.getStudentList();
+			// this.getStudentList();
 		},
 		},
 		// onReachBottom() {
 		// onReachBottom() {
 		// 	if (this.paymentList.length < this.recordsTotal) {
 		// 	if (this.paymentList.length < this.recordsTotal) {

+ 25 - 1
pages/youth/course/shoppingCar.vue

@@ -120,16 +120,37 @@
 				shoppingCartList: [],
 				shoppingCartList: [],
 				shoppingAllChecked: false,
 				shoppingAllChecked: false,
 				totalMoney: 0,
 				totalMoney: 0,
-				studentId: ''
+				studentId: '',
+				studentName: '',
+				phone: ''
 			}
 			}
 		},
 		},
 		onReady() {
 		onReady() {
 			if(this.carhelp.getNsStudentId()) {
 			if(this.carhelp.getNsStudentId()) {
 				this.studentId = this.carhelp.getNsStudentId().studentId;
 				this.studentId = this.carhelp.getNsStudentId().studentId;
 				this.getshoppingCarList();
 				this.getshoppingCarList();
+				this.getStudentDetail();
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
+			getStudentDetail() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				mineApi.getStudentDtl({
+					studentId: this.studentId
+				}).then((response) => {
+					uni.hideLoading();
+					this.studentName = response.data.studentName;
+					this.phone = response.data.phone;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			getshoppingCarList() {
 			getshoppingCarList() {
 				this.shoppingCartList = [];
 				this.shoppingCartList = [];
 				
 				
@@ -196,6 +217,9 @@
 								courseAmount: this.shoppingCartList[i].nsCoursePackage.courseAmount,
 								courseAmount: this.shoppingCartList[i].nsCoursePackage.courseAmount,
 								unitPrice: this.shoppingCartList[i].nsCoursePackage.unitPrice,
 								unitPrice: this.shoppingCartList[i].nsCoursePackage.unitPrice,
 								waterElectricityAmount: this.shoppingCartList[i].nsCoursePackage.waterElectricityAmount,
 								waterElectricityAmount: this.shoppingCartList[i].nsCoursePackage.waterElectricityAmount,
+								studentId: this.studentId,
+								studentName: this.studentName,
+								phone: this.phone
 							});
 							});
 							idList.push(this.shoppingCartList[i].id);
 							idList.push(this.shoppingCartList[i].id);
 						}
 						}

+ 1 - 1
pages/youth/login/login.vue

@@ -211,6 +211,7 @@
 				this.agreementValue = true;
 				this.agreementValue = true;
 			},
 			},
 			signIn() {
 			signIn() {
+				var checkPhoneResult = checkPhone(this.form.telephone);
 				if(!this.form.telephone) {
 				if(!this.form.telephone) {
 					uni.showToast({
 					uni.showToast({
 						title: checkPhoneResult,
 						title: checkPhoneResult,
@@ -252,7 +253,6 @@
 					var token = response ? response.data.token : '';
 					var token = response ? response.data.token : '';
 					this.carhelp.setToken(token);
 					this.carhelp.setToken(token);
 					this.carhelp.setPersonInfo(response.data.regUser);
 					this.carhelp.setPersonInfo(response.data.regUser);
-					this.carhelp.setNsStudentId({studentId: response.data.nsStudentInfo.id});
 					uni.redirectTo({
 					uni.redirectTo({
 						url: '/pages/youth/homePage/homePage'
 						url: '/pages/youth/homePage/homePage'
 					})
 					})

+ 18 - 0
pages/youth/mine/changePhoneNumber/changePhoneNumber.vue

@@ -38,6 +38,7 @@
 				form: {
 				form: {
 					telephone: '',
 					telephone: '',
 					verifyCode: '',
 					verifyCode: '',
+					type: '2'
 				},
 				},
 				isSendMsgIng: false,
 				isSendMsgIng: false,
 				isCodeTipsColor: false,
 				isCodeTipsColor: false,
@@ -47,12 +48,29 @@
 		},
 		},
 		methods: {
 		methods: {
 			confirmChange() {
 			confirmChange() {
+				var checkPhoneResult = checkPhone(this.form.telephone);
+				if(!this.form.telephone) {
+					uni.showToast({
+						title: checkPhoneResult,
+						icon: "none"
+					})
+					return;
+				}
+				if(!this.form.verifyCode) {
+					uni.showToast({
+						title: "请输入验证码",
+						icon: "none"
+					})
+					return
+				}
+				
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",
 					mask: true,
 					mask: true,
 				})
 				})
 				mineApi.changePhone(this.form).then((response) => {
 				mineApi.changePhone(this.form).then((response) => {
 					uni.hideLoading();
 					uni.hideLoading();
+					this.carhelp.logoff();
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '/pages/youth/mine/changePhoneNumber/changeResult'
 						url: '/pages/youth/mine/changePhoneNumber/changeResult'
 					})
 					})

+ 6 - 2
pages/youth/mine/changePhoneNumber/changeResult.vue

@@ -17,7 +17,7 @@
 				  </view>
 				  </view>
 			   </view>
 			   </view>
 		</view>
 		</view>
-		<button class="login" @click="gotoUrl('pages/youth/login/login')">立即登录</button>
+		<button class="login" @click="toLogin">立即登录</button>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -29,7 +29,11 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
-			
+			toLogin() {
+				uni.reLaunch({
+					url: '/pages/youth/login/login'
+				})
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 2 - 1
pages/youth/mine/editProfile.vue

@@ -50,7 +50,8 @@
 			return {
 			return {
 				form: {
 				form: {
 					headImg: '',
 					headImg: '',
-					nickName: ''
+					nickName: '',
+					type: '2'
 				}
 				}
 			}
 			}
 		},
 		},

+ 6 - 6
pages/youth/mine/mine.vue

@@ -17,7 +17,7 @@
 
 
 
 
 			</view>
 			</view>
-			<view class="class-times">
+			<!-- <view class="class-times">
 				<view class="box">
 				<view class="box">
 					<view class="times"> 36节 </view>
 					<view class="times"> 36节 </view>
 					<view class="text"> 购买课次 </view>
 					<view class="text"> 购买课次 </view>
@@ -26,7 +26,7 @@
 					<view class="times"> 4节 </view>
 					<view class="times"> 4节 </view>
 					<view class="text"> 赠送课次 </view>
 					<view class="text"> 赠送课次 </view>
 				</view>
 				</view>
-			</view>
+			</view> -->
 		</view>
 		</view>
 
 
 		<view class="option-group">
 		<view class="option-group">
@@ -83,7 +83,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="item">
+			<!-- <view class="item">
 				<view class="title">
 				<view class="title">
 					<view class="icon">
 					<view class="icon">
 						<img src="../../../assets/img/riLine-customer-service-2-line@1x.png" alt="">
 						<img src="../../../assets/img/riLine-customer-service-2-line@1x.png" alt="">
@@ -101,7 +101,7 @@
 						<u-icon name="arrow-right" color="#cccccc"></u-icon>
 						<u-icon name="arrow-right" color="#cccccc"></u-icon>
 					</view>
 					</view>
 				</view>
 				</view>
-			</view>
+			</view> -->
 			<view class="item" @click="gotoUrl('pages/youth/mine/logout')">
 			<view class="item" @click="gotoUrl('pages/youth/mine/logout')">
 				<view class="title">
 				<view class="title">
 					<view class="icon">
 					<view class="icon">
@@ -229,12 +229,12 @@
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	.background {
 	.background {
-		height: 500rpx;
+		height: 400rpx;
 		background: linear-gradient(180.17deg, rgba(123, 217, 224, 1) 0.45%, rgba(13, 186, 199, 0) 101.25%);
 		background: linear-gradient(180.17deg, rgba(123, 217, 224, 1) 0.45%, rgba(13, 186, 199, 0) 101.25%);
 	}
 	}
 
 
 	.head {
 	.head {
-		padding: 48rpx 40rpx;
+		padding: 80rpx 40rpx;
 		display: flex;
 		display: flex;
 		align-items: center;
 		align-items: center;