wkyy 1 год назад
Родитель
Сommit
a41792dea3

+ 1 - 1
apis/login.js

@@ -16,7 +16,7 @@ export function getVerifyCodeByTeacher(tel) {
 
 export function findByOpenId(data) {
 	var url='/mobile/regUser/findByOpenId';
-	console.log(data)
+	// console.log(data)
 	return requestOpenId({
 		method: 'get',
 		data: data,

+ 8 - 0
apis/utils/mixin.js

@@ -8,6 +8,9 @@ function	getprefix(){
 		if(url.indexOf("/pages/teacher/") == 0){
 			return prefix+"teacher-"
 		}
+		if(url.indexOf("/pages/youth/") == 0){
+			return prefix+"youth-"
+		}
 		
 		return prefix
 	}
@@ -136,6 +139,11 @@ var app = {
 		 return uni.getStorageSync(prefix + 'studentId')
 	},
 	
+	setNsStudentId : (value) => uni.setStorageSync(prefix + 'nsStudentId', value),
+	getNsStudentId : () => {
+		 return uni.getStorageSync(prefix + 'nsStudentId')
+	},
+	
 	setShoppingCartList : (value) => uni.setStorageSync(prefix + 'shoppingCartList', value),
 	getShoppingCartList : () => {
 		 return uni.getStorageSync(prefix + 'shoppingCartList')

+ 3 - 0
apis/utils/request.js

@@ -64,6 +64,9 @@ const request = (options) => {
 				if(url.indexOf("/pages/teacher/") == 0){
 					thisurl='/pages/teacher/login/login';
 				}
+				if(url.indexOf("/pages/youth/") == 0){
+					thisurl='/pages/youth/login/login';
+				}
 				
 			
 				carhelp.signOut()

+ 10 - 1
apis/utils/requestOpenId.js

@@ -29,6 +29,9 @@ const request = (options) => {
 		if(url2.indexOf("/pages/teacher/") == 0){
 			options.data.userType = '2';
 		}
+		if(url2.indexOf("/pages/youth/") == 0){
+			options.data.userType = '3';
+		}
 		
 		uni.request({
 			method: options.method?options.method:'get',
@@ -88,6 +91,12 @@ const request = (options) => {
 							resolvebl=true;
 						}
 					}
+					if(res.data.data.regUser.userType=="3"){
+						if(url.indexOf("/pages/youth/") == 0){
+							resolve(returnObj);
+							resolvebl=true;
+						}
+					}
 					if(res.data.data.regUser.userType=="1,2"){
 						resolve(returnObj);
 						resolvebl=true;
@@ -97,7 +106,7 @@ const request = (options) => {
 						console.log("findByOpenId 查询为空 ")
 						resolve(obj);
 					}else{
-						console.log("findByOpenId  ",returnObj)
+						// console.log("findByOpenId  ",returnObj)
 					}
 				
 				

+ 3 - 3
apis/youth/course.js

@@ -20,7 +20,7 @@ export function getTeacherCourseList(data) {
 }
 
 export function getCourseBaseListBySortId(data) {
-	var url='/mobile/student/getCourseBaseListBySortId';
+	var url='/mobile/nsStudent/getCourseBaseListBySortId';
 	return requestYouth({
 		method: 'post',
 		data: data,
@@ -50,7 +50,7 @@ export function addBuyLogList(data) {
 }
 
 export function getCourseDetail(data) {
-	var url='/mobile/student/getCourseDetail';
+	var url='/mobile/nsStudent/getCourseDetail';
 	return requestYouth({
 		method: 'post',
 		data: data,
@@ -59,7 +59,7 @@ export function getCourseDetail(data) {
 }
 
 export function loadTopCourseSorts() {
-	var url='/mobile/student/loadTopCourseSorts';
+	var url='/mobile/nsStudent/loadTopCourseSorts';
 	return requestYouth({
 		method: 'post',
 		url: url

+ 1 - 1
apis/youth/homePage.js

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

+ 1 - 1
apis/youth/mine.js

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

+ 6 - 0
assets/img/riFill-user-2-fill.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="20" height="20" style="border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined" filter="none">
+    
+    <g>
+    <path d="M14.667 18.749v7.917h2.667v-7.917c5.261 0.656 9.333 5.144 9.333 10.584h-21.333c0-5.421 4.044-9.898 9.28-10.578l0.054-0.006zM16 17.333c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" fill="rgba(64.005,186.915,196.095,0.43)"></path>
+    </g>
+  </svg>

+ 4 - 3
config/.env.dev.js

@@ -8,15 +8,16 @@ const UNI_APP = {
 	// BASE_URL: 'http://192.168.77.162:8086/education-training-server/',
 	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
 	//BASE_URL: 'http://192.168.77.162:8080/charging-station/' ,
-	PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
+	// PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
 	// openId:"123456",
-	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
-	//openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",//
+	// openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	openId:"oLowyuFTU3SzpvU4pGNzWk7NC9y0", //me
+	// openId:"oK9Wr5zv8lvirni3txbxRkmpg8d0",//
 	
 	
 	//openId:"oK9Wr58zNwDernF0TL6o3mdUxk2A",

+ 149 - 194
pages.json

@@ -481,310 +481,265 @@
 
 		},
 		{
-			"path" : "pages/youth/login/login",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
-			}
-		},
-		{
-			"path" : "pages/youth/classSchedule/classSchedule",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/login/login",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/classSchedule/classScheduleDetails",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/classSchedule/classSchedule",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/confirmOrder",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/classSchedule/classScheduleDetails",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/course",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/confirmOrder",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/courseDetails",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/course",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/coursePrediction",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/courseDetails",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/paymentDetail",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/coursePrediction",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/paymentRecords",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/paymentDetail",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/payResult",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/paymentRecords",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/printBill",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/payResult",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/shoppingCar",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/printBill",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/course/viewBill",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/shoppingCar",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/coursesLearned/coursesLearned",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/course/viewBill",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/homePage/homePage",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/coursesLearned/coursesLearned",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/messageNotification/messageList",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/homePage/homePage",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/messageNotification/messageNotification",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/messageNotification/messageList",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/messageNotification/temperatureRecordDetails",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/messageNotification/messageNotification",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/changePhoneNumber/changePhoneNumber",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/messageNotification/temperatureRecordDetails",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/changePhoneNumber/changeResult",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/changePhoneNumber/changePhoneNumber",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/addChildInformation",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/changePhoneNumber/changeResult",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/classRecord",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/addChildInformation",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/editProfile",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/classRecord",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/faceInformationCollection",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/editProfile",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/logout",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/faceInformationCollection",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/mine",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/logout",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/myCourses",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/mine",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/opinion",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/myCourses",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/optionsList",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/opinion",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/mine/relatedChildren",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/mine/optionsList",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/search/search",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/search/search",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/search/searchResult",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/search/searchResult",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/sickNote/leave",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/sickNote/leave",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/sickNote/leaveDetails",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/sickNote/leaveDetails",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/sickNote/sickNote",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/sickNote/sickNote",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/sighInRecord/sighInRecord",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/sighInRecord/sighInRecord",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/studentDocument/studentDocument",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/studentDocument/studentDocument",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/youth/teacherHomepage/teacherHomepage",
-			"style" : 
-			{
-				"navigationBarTitleText" : "",
-				"enablePullDownRefresh" : false
+			"path": "pages/youth/teacherHomepage/teacherHomepage",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
 			}
 		}
-		
+
 	],
 	"globalStyle": {
 		"navigationStyle": "custom", // 隐藏系统导航栏

+ 2 - 1
pages/parents/course/courseDetails.vue

@@ -336,7 +336,8 @@
 				var data = {
 					studentId: this.stuDetail.studentId,
 					packageId: this.packageDetail.packageId,
-					classId: this.classDetail.classId
+					classId: this.classDetail.classId,
+					studentType: '1'
 				}
 				
 				uni.showLoading({

+ 5 - 4
pages/parents/course/shoppingCar.vue

@@ -233,14 +233,15 @@
 					mask: true,
 				})
 				shoppingCarApi.pageList({
-					studentId: studentId
+					studentId: studentId,
+					studentType: '1'
 				}).then((res) => {
 					uni.hideLoading();
 					this.shoppingCartList = res.data.data;
 					for (var i = 0; i < this.shoppingCartList.length; i++) {
-						this.shoppingCartList[i].push({
-							shoppingChecked: false
-						})
+						var key = "shoppingChecked";
+						var value = false;
+						this.shoppingCartList[i][key] = value;
 					}
 				}).catch(error => {
 					uni.showToast({

+ 2 - 2
pages/youth/classSchedule/classSchedule.vue

@@ -168,8 +168,8 @@
 			}
 		},
 		onReady() {
-			if(this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
+			if(this.carhelp.getNsStudentId()) {
+				this.studentId = this.carhelp.getNsStudentId().studentId;
 			}
 			this.getToday();
 		},

+ 2 - 2
pages/youth/classSchedule/classScheduleDetails.vue

@@ -63,8 +63,8 @@
 		onLoad(op) {
 			if (op.id) {
 				this.scheduleId = op.id;
-				if (this.carhelp.getStudentId()) {
-					this.studentId = this.carhelp.getStudentId().studentId;
+				if (this.carhelp.getNsStudentId()) {
+					this.studentId = this.carhelp.getNsStudentId().studentId;
 					this.getCourseDetail();
 				}
 			}

+ 1 - 95
pages/youth/course/confirmOrder.vue

@@ -33,7 +33,7 @@
 					<view class="title">
 						<text>学员信息</text>
 					</view>
-					<view class="value" @click="selectStudent(index)">
+					<view class="value">
 						<text>{{item.studentName}}</text>
 						<text style="color: #999999;margin-left: 8rpx;">{{item.age}}岁</text>
 						<text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
@@ -47,31 +47,8 @@
 						<text>{{item.firstContactPhone}}</text>
 					</view>
 				</view>
-				<!-- <view class="item">
-					<view class="title">
-						<text>第二联系人手机号</text>
-					</view>
-					<view class="value">
-						<text>
-							<input type="text" placeholder="请填写手机号" v-model="item.secondContactPhone">
-						</text>
-						<text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
-					</view>
-				</view> -->
-				<!-- <view class="item">
-					<view class="title">
-						<text>接送家长姓名</text>
-					</view>
-					<view class="value">
-						<text>
-							<input type="text" placeholder="请填写家长姓名" v-model="item.takerName">
-						</text>
-						<text class="icon"><u-icon name="arrow-right" color="#c8c8c8"></u-icon></text>
-					</view>
-				</view> -->
 			</view>
 		</view>
-		<u-select v-model="show" mode="single-column" :list="studentList" @confirm="confirm"></u-select>
 
 		<!-- 价格明细 -->
 		<view class="amount" style="margin-top: 12px;">
@@ -168,23 +145,6 @@
 	export default {
 		data() {
 			return {
-				studentId: '',
-				stuDetail: {},
-				show: false,
-				studentList: [],
-				classList: [],
-				packageList: [],
-				selectNum: '',
-				packageId: '',
-				packageName: '',
-				classId: '',
-				className: '',
-				courseId: '',
-				courseBase: {},
-				coursePackageList: [],
-				tclassList: [],
-				packageDetail: {},
-				classDetail: {},
 				shoppingCartList: [],
 				coursesPayList: [],
 				payTotalMoney: 0,
@@ -206,7 +166,6 @@
 				this.shoppingCartList = this.carhelp.getShoppingCartList();
 				this.getCoursesPayList();
 			}
-			this.getStudentList();
 		},
 		methods: {
 			radioClick(value) {
@@ -269,10 +228,6 @@
 					})
 				})
 			},
-			selectStudent(index) {
-				this.selectIndex = index;
-				this.show = true;
-			},
 			getCoursesPayList() {
 				var list = this.shoppingCartList;
 				this.coursesPayList = list;
@@ -290,55 +245,6 @@
 				this.entryFee = money2;
 				this.weFee = money3;
 			},
-			confirm(e) {
-				this.studentId = e[0].value;
-				this.getStudentDetail();
-			},
-			getStudentList() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.studentList().then((res) => {
-					uni.hideLoading();
-					var list1 = res.data.studentList;
-					var list2 = [];
-					for (var i = 0; i < list1.length; i++) {
-						list2.push({
-							value: list1[i].studentId,
-							label: list1[i].studentName
-						})
-					}
-					this.studentList = list2;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			getStudentDetail() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.getStudentDtl({
-					studentId: this.studentId
-				}).then((response) => {
-					uni.hideLoading();
-					this.coursesPayList[this.selectIndex].studentId = response.data.studentId;
-					this.coursesPayList[this.selectIndex].studentName = response.data.studentName;
-					this.coursesPayList[this.selectIndex].age = response.data.age;
-					this.coursesPayList[this.selectIndex].firstContactPhone = response.data.firstContactPhone;
-					this.coursesPayList[this.selectIndex].secondContactPhone = response.data.secondContactPhone;
-					this.coursesPayList[this.selectIndex].takerName = response.data.takerName;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
 		}
 	}
 </script>

+ 7 - 72
pages/youth/course/course.vue

@@ -16,14 +16,14 @@
 				</view>
 
 				<view class="details">
-					<view class="classes">
+					<!-- <view class="classes">
 						<view class="item" @click="categorize = 1" :class="categorize==1 ? 'checked' : ''">
 							按课程
 						</view>
 						<view class="item" @click="categorize = 2" :class="categorize==2 ? 'checked' : ''">
 							按老师
 						</view>
-					</view>
+					</view> -->
 					<view class="infos-box2">
 						<view class="details-box" v-if="categorize==1">
 							<view class="item" v-for="(item,index) in courseBaseList" :key="index"
@@ -51,34 +51,6 @@
 							</view>
 						</view>
 					</view>
-					<!-- <view class="infos-box" v-for="(item,index) in reCoursesList" :key="index"
-						@click="gotoUrl('pages/youth/course/courseDetails?id='+item.course_id+'&classId='+item.class_id)">
-						<view class="infos">
-							<view class="name">
-								{{item.className}}
-							</view>
-							<view class="tips">
-								<view class="item" v-if="item.courseDesc != null">
-									{{item.courseDesc}}
-								</view>
-								<view class="item" v-else>
-									暂无简介
-								</view>
-							</view>
-							<view class="teacher-price">
-								<view class="teacher">
-									<view class="name-teacher">
-										咨询电话:
-									</view>
-									<view class="phone-teacher">
-										{{item.consultPhone != null ? item.consultPhone : '暂无'}}
-									</view>
-								</view>
-							</view>
-						</view>
-					</view> -->
-					<!-- <u-divider v-if="reCoursesList.length == recordsTotal && recordsTotal != 0"
-						style="margin-top: 10px">没有更多了</u-divider> -->
 				</view>
 
 			</view>
@@ -101,7 +73,6 @@
 			return {
 				active: 0,
 				courseMenu: [],
-				reCoursesList: [],
 				courseSort: '',
 				pageNum: 1,
 				pageSize: 5,
@@ -118,11 +89,6 @@
 		onReady() {
 			this.getLoadTopCourseSorts();
 		},
-		onReachBottom() {
-			if (this.reCoursesList.length < this.recordsTotal) {
-				this.myLoadmore();
-			}
-		},
 		methods: {
 			toSearchResultById(item) {
 				uni.navigateTo({
@@ -173,44 +139,13 @@
 					url: '/pages/youth/search/searchResult'
 				})
 			},
-			myLoadmore() {
-				this.pageNum += 1;
-				this.getReCoursesList()
-			},
-			getReCoursesList(bl) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				if (bl) {
-					this.reCoursesList = [];
-					this.pageNum = 1;
-				}
-				homePageApi.loadCoursesForHomeShow({
-					courseSort: this.courseSort,
-					pageNum: this.pageNum,
-					pageSize: this.pageSize
-				}).then((res) => {
-					uni.hideLoading();
-					this.reCoursesList = [
-						...this.reCoursesList,
-						...res.data.data
-					];
-					this.recordsTotal = res.data.recordsTotal;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
 			courseChose(m, index) {
 				this.active = index;
 				this.courseSort = m.id;
 				this.categorize = 1;
-				// this.getReCoursesList(true);
+				
 				this.getCourseBaseListBySortId(m.id)
-				this.getTeacherListBySortId(m.id)
+				// this.getTeacherListBySortId(m.id)
 			},
 			getLoadTopCourseSorts() {
 				uni.showLoading({
@@ -221,9 +156,9 @@
 					uni.hideLoading();
 					this.courseMenu = response.data;
 					this.courseSort = response.data[0].id;
-					// this.getReCoursesList();
-					this.getCourseBaseListBySortId(this.courseSort)
-					this.getTeacherListBySortId(this.courseSort)
+					
+					this.getCourseBaseListBySortId(this.courseSort);
+					// this.getTeacherListBySortId(this.courseSort);
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 10 - 133
pages/youth/course/courseDetails.vue

@@ -2,17 +2,7 @@
 	<view>
 		<u-navbar :title="classDetail.className"></u-navbar>
 		<view class="picture" v-if="courseBase.posterUrl != null">
-			<!-- <view class="icon" @click="backHomePage">
-				<u-icon name="arrow-left" color="#ffffff"></u-icon>
-			</view> -->
-			<!-- <view class="wrap">
-				<u-swiper :list="swiperList" mode="number" indicator-pos="bottomRight" :autoplay="false"
-					height="550"></u-swiper>
-			</view> -->
 			<img :src="courseBase.posterUrl" alt="">
-			<!-- <view class="tag">
-				1/5
-			</view> -->
 		</view>
 		<view class="space">
 
@@ -92,9 +82,6 @@
 
 			<view class="tag">
 				<view class="item">
-					<!-- <view class="icon">
-						<u-icon name="phone" color="#0DBAC7" size="48"></u-icon>
-					</view> -->
 					<view class="name">
 						咨询电话:
 					</view>
@@ -102,24 +89,6 @@
 						{{classDetail.consultPhone != null ? classDetail.consultPhone : '暂无'}}
 					</view>
 				</view>
-				<!-- <u-line color="#0DBAC7" direction="col" length="24" />
-				<view class="item">
-					<view class="icon">
-						<u-icon name="email" color="#0DBAC7" size="48"></u-icon>
-					</view>
-					<view class="name">
-						金牌教师
-					</view>
-				</view>
-				<u-line color="#0DBAC7" direction="col" length="24" />
-				<view class="item">
-					<view class="icon">
-						<u-icon name="weixin-fill" color="#0DBAC7" size="48"></u-icon>
-					</view>
-					<view class="name">
-						品质保障
-					</view>
-				</view> -->
 			</view>
 
 			<view class="class-detail">
@@ -129,29 +98,7 @@
 				<view class="detail">
 					{{courseBase.remark!=null ? courseBase.remark : '无'}}
 				</view>
-				<!-- <view class="img">
-					<img src="../../../assets/img/detaiimg.png" alt="">
-				</view> -->
-			</view>
-			<!-- <view class="school-age">
-				<view class="title">
-					适学年龄
-				</view>
-				<view class="content">
-					适合4-12岁儿童、青少年
-				</view>
-
 			</view>
-
-			<view class="target">
-				<view class="title">
-					课程目标
-				</view>
-				<view class="content">
-					了解足球相关基础知识,培养兴趣。
-				</view>
-			</view> -->
-
 		</view>
 
 		<view class="bottom">
@@ -167,10 +114,7 @@
 		</view>
 		
 		<u-toast ref="uToast" />
-		<!-- 已经报名 -->
-		<!-- <view class="bottom">
-			<button class="registered">已报名,请于一周内缴费</button>
-		</view> -->
+
 		<!-- 弹出层 -->
 		<view >
 			<u-popup v-model="popShow" mode="bottom" :closeable='true'>
@@ -220,36 +164,6 @@
 									</view>
 								</view>
 							</view>
-							
-							<!-- 报名学生 -->
-							<!-- <view class="apply-student">
-								<view class="title">
-									报名学生
-								</view>
-								<view class="options">
-									<view class="item" v-for="(item,index) in studentList" :key="index"
-										:class="activeStudent==index ? 'item-checked' : ''" @click="choseStudent(item,index)">
-										<view class="photo">
-											<u-avatar class="avatar" mode="square"
-												:src="item.headPhoto != null ? item.headPhoto : '../../assets/img/head.png'" size="80">
-											</u-avatar>
-										</view>
-										<view class="infos">
-											<view class="name-age">
-												<view class="name">
-													{{item.studentName}}
-												</view>
-												<view class="age">
-													{{item.age}}岁
-												</view>
-											</view>
-											<view class="tel">
-												{{item.firstContactPhone}}
-											</view>
-										</view>
-									</view>
-								</view>
-							</view> -->
 						
 						  <!-- 加入购物车 -->
 						  <view class="btn-box">
@@ -269,6 +183,7 @@
 	import * as mineApi from '@/apis/youth/mine.js'
 	import * as courseApi from '@/apis/youth/course.js'
 	import * as shoppingCarApi from '@/apis/youth/shoppingCar.js'
+	import * as loginApi from '@/apis/login.js'
 	
 	export default {
 		data() {
@@ -303,28 +218,14 @@
 				this.courseId = op.id;
 				this.classId = op.classId;
 				this.getCourseDetail();
+				if(this.carhelp.getNsStudentId()) {
+					this.studentId = this.carhelp.getNsStudentId().studentId;
+				}
 			}
 		},
-		onReady() {
-			if (this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
-			}
-			if (this.carhelp.getShoppingCartList()) {
-				this.shoppingCartList = this.carhelp.getShoppingCartList();
-			}
-			this.getStudentList();
-		},
 		methods: {
 			popShowClick() {
-				if(this.studentList != 0) {
-					this.popShow = true;
-				} else {
-					this.$refs.uToast.show({
-						title: '请先添加子女',
-						type: 'warning',
-						url: '/pages/youth/mine/addChildInformation'
-					})
-				}
+				this.popShow = true;
 			},
 			toShoppingCar() {
 				uni.redirectTo({
@@ -334,9 +235,10 @@
 			addShoppingCart() {
 				this.popShow = false;
 				var data = {
-					studentId: this.stuDetail.studentId,
+					studentId: this.studentId,
 					packageId: this.packageDetail.packageId,
-					classId: this.classDetail.classId
+					classId: this.classDetail.classId,
+					studentType: '2'
 				}
 				
 				uni.showLoading({
@@ -370,31 +272,6 @@
 					this.packageDetail.waterElectricityAmount = 0;
 				}
 			},
-			choseStudent(item,index) {
-				this.activeStudent = index;
-				this.stuDetail = item;
-			},
-			getStudentList() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.studentList().then((res) => {
-					uni.hideLoading();
-					this.studentList = res.data.studentList;
-					for (var i = 0; i < this.studentList.length; i++) {
-						if(this.studentList[i].studentId == this.studentId) {
-							this.stuDetail = this.studentList[i];
-							this.activeStudent = i;
-						}
-					}
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
 			getCourseDetail() {
 				uni.showLoading({
 					title: "加载中",
@@ -416,7 +293,7 @@
 							this.packageDetail.waterElectricityAmount = 0;
 						}
 					}
-					this.tclassList = res.data.tclassList;
+					this.tclassList = res.data.nsClassList;
 					
 					for (var i = 0; i < this.tclassList.length; i++) {
 						if(this.tclassList[i].classId == this.classId) {

+ 2 - 2
pages/youth/course/paymentDetail.vue

@@ -234,8 +234,8 @@
 				this.billNum = op.id;
 				this.studentId = op.studentId;
 			}
-			// if (this.carhelp.getStudentId()) {
-			// 	this.studentId = this.carhelp.getStudentId().studentId;
+			// if (this.carhelp.getNsStudentId()) {
+			// 	this.studentId = this.carhelp.getNsStudentId().studentId;
 			// 	this.getLoadMyBuyLog();
 			// }
 			this.getLoadMyBuyLog();

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

@@ -101,7 +101,7 @@
 			var date = new Date();
 			this.year = date.getFullYear();
 
-			// this.studentId = this.carhelp.getStudentId().studentId;
+			// this.studentId = this.carhelp.getNsStudentId().studentId;
 			// this.getLoadMyBuyLog();
 			// this.getCourseList();
 			this.getStudentList();

+ 31 - 224
pages/youth/course/shoppingCar.vue

@@ -15,8 +15,8 @@
 				<radio value="" :checked="item.shoppingChecked" /><text></text>
 			</label>
 			<!-- 照片 -->
-			<view class="photo" v-if="item.courseBase.posterUrl != null">
-				<img :src="item.courseBase.posterUrl" alt="">
+			<view class="photo" v-if="item.nsCourseBase.posterUrl != null">
+				<img :src="item.nsCourseBase.posterUrl" alt="">
 			</view>
 			<view class="photo" v-else>
 				<img src="../../../assets/img/picture1.png" alt="">
@@ -25,7 +25,7 @@
 			<view class="class-infos">
 				<view class="title">
 					<view :class="{className,editing:edit==true}">
-						{{item.courseBase.courseName}}
+						{{item.nsCourseBase.courseName}}
 					</view>
 					<view class="amount" v-if="edit==false">
 						<!-- x1 -->
@@ -34,13 +34,13 @@
 				<!-- 课程标签 -->
 				<view class="class-tags">
 					<view class="item classname">
-						{{item.tclass.className}}
+						{{item.nsClass.className}}
 					</view>
 					<view class="item">
-						{{item.coursePackage.packageName}}班
+						{{item.nsCoursePackage.packageName}}班
 					</view>
 					<view class="item">
-						{{item.coursePackage.courseAmount}}节课
+						{{item.nsCoursePackage.courseAmount}}节课
 					</view>
 					<view class="icon" v-if="!edit">
 						<u-icon name="arrow-down" color="#B3B3B3" size="10"></u-icon>
@@ -48,11 +48,11 @@
 				</view>
 				<!-- 价格 -->
 				<view class="price">
-					{{Math.round(item.coursePackage.unitPrice*item.coursePackage.courseAmount+item.coursePackage.waterElectricityAmount)}}元
+					{{Math.round(item.nsCoursePackage.unitPrice*item.nsCoursePackage.courseAmount+item.nsCoursePackage.waterElectricityAmount)}}元
 				</view>
 				<!-- <view :class="{priceInfo,editing:edit==true}">
-					包含 报名费{{(item.coursePackage.unitPrice*item.coursePackage.courseAmount).toFixed(2)}}元
-					水电费{{item.coursePackage.waterElectricityAmount.toFixed(2)}}元
+					包含 报名费{{(item.nsCoursePackage.unitPrice*item.nsCoursePackage.courseAmount).toFixed(2)}}元
+					水电费{{item.nsCoursePackage.waterElectricityAmount.toFixed(2)}}元
 				</view> -->
 			</view>
 			<view class="del-icon" v-if="edit==true" style="margin: auto 0;" @click="deleteShop(item,index)">
@@ -91,90 +91,6 @@
 			<button class="del-btn" @click="deleteShopAll">删除</button>
 		</view>
 
-		<view>
-			<u-popup v-model="popShow" mode="bottom" :closeable='true'>
-				<view class="popup">
-					<view class="class-infos">
-						<view class="picture">
-							<img v-if="courseBase.posterUrl!= null" :src="courseBase.posterUrl" alt="">
-							<img v-else src="../../../assets/img/courseD.png" alt="">
-						</view>
-						<view class="infos">
-							<view class="class-name">
-								{{courseBase.courseName}}
-							</view>
-							<view class="price">
-								{{Math.round(packageDetail.unitPrice*packageDetail.courseAmount+packageDetail.waterElectricityAmount)}}元
-							</view>
-							<!-- <view class="price-detail" v-if="packageDetail.unitPrice!=null && packageDetail.courseAmount!=null">
-								(包含报名费{{(packageDetail.unitPrice*packageDetail.courseAmount).toFixed(2)}}元
-								水电费{{packageDetail.waterElectricityAmount.toFixed(2)}}元)
-							</view> -->
-						</view>
-					</view>
-					<!-- 报名班级 -->
-					<view class="sign-up">
-						<view class="title">
-							报名班级
-						</view>
-						<view class="options">
-							<view class="item" v-for="(item,index) in tclassList" :key="index"
-								:class="activeClass==index ? '' : 'item-state2'" @click="choseClass(item,index)">
-								{{item.className}}
-							</view>
-						</view>
-					</view>
-					<!-- 选择套餐 -->
-					<view class="set-meal" v-if="coursePackageList.length !=  0">
-						<view class="title">
-							选择套餐
-						</view>
-						<view class="options">
-							<view class="item" v-for="(item,index) in coursePackageList" :key="index"
-								:class="activePackage==index ? '' : 'item-state2'" @click="chosePackage(item,index)">
-								{{item.packageName}}班 {{item.courseAmount}}课时
-							</view>
-						</view>
-					</view>
-					<!-- 报名学生 -->
-					<!-- <view class="apply-student">
-						<view class="title">
-							报名学生
-						</view>
-						<view class="options">
-							<view class="item" v-for="(item,index) in studentList" :key="index"
-								:class="activeStudent==index ? 'item-checked' : ''" @click="choseStudent(item,index)">
-								<view class="photo">
-									<u-avatar class="avatar" mode="square"
-										:src="item.headPhoto != null ? item.headPhoto : '../../assets/img/head.png'" size="80">
-									</u-avatar>
-								</view>
-								<view class="infos">
-									<view class="name-age">
-										<view class="name">
-											{{item.studentName}}
-										</view>
-										<view class="age">
-											{{item.age}}岁
-										</view>
-									</view>
-									<view class="tel">
-										{{item.firstContactPhone}}
-									</view>
-								</view>
-							</view>
-						</view>
-					</view> -->
-					<!-- 加入购物车 -->
-					<view class="btn-box">
-						<button class="add" @click="confirmShop">确 认</button>
-					</view>
-					<view class="" style="height: 24rpx;">
-					</view>
-				</view>
-			</u-popup>
-		</view>
-
 		<YouthTabbar :current="2" ref="tabbarMain"></YouthTabbar>
 	</view>
 </template>
@@ -184,6 +100,7 @@
 	import * as courseApi from '@/apis/youth/course.js'
 	import * as shoppingCarApi from '@/apis/youth/shoppingCar.js'
 	import YouthTabbar from '@/components/YouthTabbar.vue'
+	import * as loginApi from '@/apis/login.js'
 
 	export default {
 		components: {
@@ -203,29 +120,17 @@
 				shoppingCartList: [],
 				shoppingAllChecked: false,
 				totalMoney: 0,
-				popShow: false,
-				shopIndex: 0,
-				activeClass: 0,
-				activePackage: 0,
-				activeStudent: 0,
-				coursePackageList: [],
-				tclassList: [],
-				studentList: [],
-				courseBase: {},
-				classDetail: {},
-				packageDetail: {},
-				stuDetail: {},
-				shopDetail: {}
+				studentId: ''
 			}
 		},
 		onReady() {
-			if (this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
-				this.getshoppingCarList(this.studentId);
+			if(this.carhelp.getNsStudentId()) {
+				this.studentId = this.carhelp.getNsStudentId().studentId;
+				this.getshoppingCarList();
 			}
 		},
 		methods: {
-			getshoppingCarList(studentId) {
+			getshoppingCarList() {
 				this.shoppingCartList = [];
 				
 				uni.showLoading({
@@ -233,107 +138,15 @@
 					mask: true,
 				})
 				shoppingCarApi.pageList({
-					studentId: studentId
+					studentId: this.studentId,
+					studentType: '2'
 				}).then((res) => {
 					uni.hideLoading();
 					this.shoppingCartList = res.data.data;
 					for (var i = 0; i < this.shoppingCartList.length; i++) {
-						this.shoppingCartList[i].push({
-							shoppingChecked: false
-						})
-					}
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			confirmShop() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				shoppingCarApi.update({
-					id: this.shopDetail.id,
-					studentId: this.shopDetail.studentId,
-					packageId: this.shopDetail.packageId,
-					classId: this.shopDetail.classId
-				}).then((res) => {
-					uni.hideLoading();
-					this.getshoppingCarList(this.studentId);
-					this.popShow = false;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			choseClass(item, index) {
-				this.activeClass = index;
-				this.classDetail = item;
-			},
-			chosePackage(item, index) {
-				this.activePackage = index;
-				this.packageDetail = item;
-			},
-			choseStudent(item, index) {
-				this.activeStudent = index;
-				this.stuDetail = item;
-			},
-			selectShop(item, index) {
-				this.shopDetail = item;
-				this.getCourseDetail(item);
-				this.getStudentList(item);
-				this.popShow = true;
-			},
-			getCourseDetail(value) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				courseApi.getCourseDetail({
-					courseId: value.courseBase.courseId,
-					classId: value.classId
-				}).then((res) => {
-					uni.hideLoading();
-					this.courseBase = res.data.courseBase;
-					this.coursePackageList = res.data.coursePackageList;
-					this.tclassList = res.data.tclassList;
-
-					for (var i = 0; i < this.tclassList.length; i++) {
-						if (this.tclassList[i].classId == value.classId) {
-							this.activeClass = i;
-							this.classDetail = this.tclassList[i];
-						}
-					}
-					for (var j = 0; j < this.coursePackageList.length; j++) {
-						if (this.coursePackageList[j].packageId == value.packageId) {
-							this.activePackage = j;
-							this.packageDetail = this.coursePackageList[j];
-						}
-					}
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			getStudentList(value) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.studentList().then((res) => {
-					uni.hideLoading();
-					this.studentList = res.data.studentList;
-					for (var i = 0; i < this.studentList.length; i++) {
-						if (this.studentList[i].studentId == value.studentId) {
-							this.activeStudent = i;
-							this.stuDetail = this.studentList[i];
-						}
+						var key = "shoppingChecked";
+						var value = false;
+						this.shoppingCartList[i][key] = value;
 					}
 				}).catch(error => {
 					uni.showToast({
@@ -373,22 +186,16 @@
 					for (var i = 0; i < this.shoppingCartList.length; i++) {
 						if (this.shoppingCartList[i].shoppingChecked) {
 							buyLogList.push({
-								courseId: this.shoppingCartList[i].courseBase.courseId,
-								courseName: this.shoppingCartList[i].courseBase.courseName,
-								posterUrl: this.shoppingCartList[i].courseBase.posterUrl,
+								courseId: this.shoppingCartList[i].nsCourseBase.courseId,
+								courseName: this.shoppingCartList[i].nsCourseBase.courseName,
+								posterUrl: this.shoppingCartList[i].nsCourseBase.posterUrl,
 								classId: this.shoppingCartList[i].classId,
-								className: this.shoppingCartList[i].tclass.className,
+								className: this.shoppingCartList[i].nsClass.className,
 								packageId: this.shoppingCartList[i].packageId,
-								packageName: this.shoppingCartList[i].coursePackage.packageName,
-								courseAmount: this.shoppingCartList[i].coursePackage.courseAmount,
-								unitPrice: this.shoppingCartList[i].coursePackage.unitPrice,
-								waterElectricityAmount: this.shoppingCartList[i].coursePackage.waterElectricityAmount,
-								studentId: this.shoppingCartList[i].studentId,
-								studentName: this.shoppingCartList[i].student.studentName,
-								age: this.shoppingCartList[i].student.age,
-								firstContactPhone: this.shoppingCartList[i].student.firstContactPhone,
-								secondContactPhone: this.shoppingCartList[i].student.secondContactPhone,
-								takerName: this.shoppingCartList[i].student.takerName
+								packageName: this.shoppingCartList[i].nsCoursePackage.packageName,
+								courseAmount: this.shoppingCartList[i].nsCoursePackage.courseAmount,
+								unitPrice: this.shoppingCartList[i].nsCoursePackage.unitPrice,
+								waterElectricityAmount: this.shoppingCartList[i].nsCoursePackage.waterElectricityAmount,
 							});
 							idList.push(this.shoppingCartList[i].id);
 						}
@@ -438,7 +245,7 @@
 				})
 				shoppingCarApi.batchDelete(idList).then((res) => {
 					uni.hideLoading();
-					this.getshoppingCarList(this.studentId);
+					this.getshoppingCarList();
 					
 					this.getTotalMoney();
 				}).catch(error => {
@@ -470,8 +277,8 @@
 					}
 				}
 				for (var j = 0; j < list.length; j++) {
-					money += Math.round(list[j].coursePackage.courseAmount * list[j].coursePackage.unitPrice +
-						list[j].coursePackage.waterElectricityAmount);
+					money += Math.round(list[j].nsCoursePackage.courseAmount * list[j].nsCoursePackage.unitPrice +
+						list[j].nsCoursePackage.waterElectricityAmount);
 				}
 				this.totalMoney = money;
 

+ 37 - 154
pages/youth/homePage/homePage.vue

@@ -2,23 +2,19 @@
 	<view>
 		<view class="navigation">
 			<view class="title">
-				启航教培管家·家长
+				青年夜校·学员
 			</view>
-			<view class="identity" @click="showClick">
-				<view class="picture" v-if="form.headPhoto != null">
-					<u-avatar class="avatar"
-						:src="form.headPhoto != null ? form.headPhoto : '../../assets/img/head.png'" size="48">
+			<view class="identity">
+				<view class="picture">
+					<u-avatar class="avatar" :src="form.headPhoto != null ? form.headPhoto : '../../assets/img/head.png'" size="48">
 					</u-avatar>
 				</view>
 				<view class="name">
 					{{form.studentName}}
 				</view>
-				<view class="icon">
-					<img src="../../../assets/img/riLine-exchange-line@1x.png" alt="">
-				</view>
 			</view>
 		</view>
-		<u-select v-model="show" mode="single-column" :list="studentList" @confirm="confirm"></u-select>
+		
 		<view class="head">
 			<view class="wrap">
 				<u-swiper :list="bannerList" v-if="bannerList.length != 0"></u-swiper>
@@ -72,15 +68,6 @@
 						缴费记录
 					</view>
 				</view>
-				<view class="item" @click="toRelatedChildren">
-					<view class="icon-box"
-						style="background: linear-gradient(180deg, rgba(255,189,96,1) 1%,rgba(255,150,0,1) 100%);">
-						<img src="../../../assets/img/riFill-folder-user-fill@1x(1).png" alt="">
-					</view>
-					<view class="text">
-						关联子女
-					</view>
-				</view>
 				<!-- <view class="item">
 					<view class="icon-box"
 						style="background: linear-gradient(180deg, rgba(255,189,96,1) 1%,rgba(255,150,0,1) 100%);">
@@ -140,25 +127,6 @@
 						{{item.courseDate}}
 					</view>
 				</view>
-				<!-- <view class="info-box info-box2">
-					<view class="position tomorrow">
-						明
-					</view>
-					<view class="class-name">
-						周开琴书法班2
-					</view>
-					<view class="location-time">
-						<view class="location">
-							4楼6教室
-						</view>
-						<view class="time">
-							09:30-10:45
-						</view>
-					</view>
-					<view class="date">
-						2023.1.4
-					</view>
-				</view> -->
 			</view>
 		</view>
 
@@ -219,6 +187,7 @@
 	import * as homePageApi from '@/apis/youth/homePage.js'
 	import * as mineApi from '@/apis/youth/mine.js'
 	import YouthTabbar from '@/components/YouthTabbar.vue'
+	import * as loginApi from '@/apis/login.js'
 
 	export default {
 		components: {
@@ -244,8 +213,6 @@
 				form: {
 					headPhoto: null
 				},
-				show: false,
-				studentList: [],
 				studentId: '',
 				list: [{
 					image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
@@ -257,10 +224,10 @@
 			this.day = this.getFormatDate(date);
 			this.tomorrow = this.getFormatDate(new Date(date.setDate(date.getDate() + 1)));
 
-			this.getStudentList();
+			this.getInfo();
 			// this.getFindByCatalogName();
 			// this.getReCoursesList();
-			this.getLoadBannerForShow();
+			// this.getLoadBannerForShow();
 		},
 		onReachBottom() {
 			if (this.reCoursesList.length < this.recordsTotal) {
@@ -268,6 +235,24 @@
 			}
 		},
 		methods: {
+			getInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				loginApi.findByOpenId({
+					openId: this.carhelp.getOpenId()
+				}).then((response) => {
+					uni.hideLoading();
+					this.form = response.data.nsStudentInfo;
+					this.carhelp.setNsStudentId({studentId: response.data.nsStudentInfo.id});
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			getLoadBannerForShow() {
 				uni.showLoading({
 					title: "加载中",
@@ -336,67 +321,24 @@
 					})
 				})
 			},
-			showClick() {
-				if(this.studentList.length != 0) {
-					this.show = true;
-				} else{
-					uni.showToast({
-						title: "请先去'我的'中完善'我的子女'",
-						icon: "none"
-					})
-				}
-			},
 			toClassSchedule() {
-				if(this.studentId) {
-					uni.navigateTo({
-						url: '/pages/youth/classSchedule/classSchedule'
-					})
-				} else{
-					uni.showToast({
-						title: "请先去'我的'中完善'我的子女'",
-						icon: "none"
-					})
-				}
+				uni.navigateTo({
+					url: '/pages/youth/classSchedule/classSchedule'
+				})
 			},
 			toSickNote() {
-				if(this.studentId) {
-					uni.navigateTo({
-						url: '/pages/youth/sickNote/sickNote'
-					})
-				} else{
-					uni.showToast({
-						title: "请先去'我的'中完善'我的子女'",
-						icon: "none"
-					})
-				}
+				uni.navigateTo({
+					url: '/pages/youth/sickNote/sickNote'
+				})
 			},
 			toMyCourses() {
-				if(this.studentId) {
-					uni.navigateTo({
-						url: '/pages/youth/mine/myCourses'
-					})
-				} else{
-					uni.showToast({
-						title: "请先去'我的'中完善'我的子女'",
-						icon: "none"
-					})
-				}
+				uni.navigateTo({
+					url: '/pages/youth/mine/myCourses'
+				})
 			},
 			toPaymentRecord() {
-				if(this.studentId) {
-					uni.navigateTo({
-						url: '/pages/youth/course/paymentRecords'
-					})
-				} else{
-					uni.showToast({
-						title: "请先去'我的'中完善'我的子女'",
-						icon: "none"
-					})
-				}
-			},
-			toRelatedChildren() {
 				uni.navigateTo({
-					url: '/pages/youth/mine/relatedChildren'
+					url: '/pages/youth/course/paymentRecords'
 				})
 			},
 			getFormatDate(date) {
@@ -438,66 +380,7 @@
 						icon: "none"
 					})
 				})
-			},
-			getStudentDetail() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.getStudentDtl({
-					studentId: this.studentId
-				}).then((response) => {
-					uni.hideLoading();
-					this.form = response.data;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			confirm(e) {
-				this.carhelp.setStudentId({
-					studentId: e[0].value
-				});
-				this.studentId = e[0].value;
-				this.getStudentDetail();
-				this.getLatelyCourseList();
-			},
-			getStudentList() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.studentList().then((res) => {
-					uni.hideLoading();
-					var list = res.data.studentList;
-					for (var i = 0; i < list.length; i++) {
-						this.studentList.push({
-							value: list[i].studentId,
-							label: list[i].studentName
-						})
-					}
-					
-					if(this.studentList.length != 0) {
-						if (this.carhelp.getStudentId()) {
-							this.studentId = this.carhelp.getStudentId().studentId;
-							this.getStudentDetail();
-							this.getLatelyCourseList();
-						} else {
-							this.studentId = this.studentList[0].value;
-							this.carhelp.setStudentId({studentId: this.studentId});
-							this.getStudentDetail();
-							this.getLatelyCourseList();
-						}
-					}
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
+			}
 		}
 	}
 </script>

+ 22 - 3
pages/youth/login/login.vue

@@ -41,6 +41,15 @@
 					<u-input v-model="form.telephone" type="number" placeholder="请填写手机号码" />
 				</view>
 			</view>
+			<view class="tel">
+				<view class="icon">
+					<img src="../../../assets/img/riFill-user-2-fill.svg" alt="">
+				</view>
+				<u-line color="red" direction="col" length="40rpx" margin="auto 0" />
+				<view class="tips">
+					<u-input v-model="form.nickName" type="text" placeholder="请填写姓名" />
+				</view>
+			</view>
 			<view class="hint">
 				未注册的手机号验证后将自动注册
 			</view>
@@ -83,7 +92,8 @@
 					telephone: '',
 					openId: '',
 					verifyCode: '',
-					userType: 1
+					userType: 3,
+					nickName: ''
 				},
 				isSendMsgIng: false,
 				isCodeTipsColor: false,
@@ -112,7 +122,7 @@
 					url: process.car.BASE_URL + "/mobile/regUser/findByOpenId",
 					data: {
 						openId: openId,
-						userType: '1'
+						userType: '3'
 					},
 					header: {
 						'Content-Type': 'application/x-www-form-urlencoded',
@@ -127,6 +137,7 @@
 						this.carhelp.setToken(token);
 			
 						this.carhelp.setPersonInfoPlus(res.data.data);
+						this.carhelp.setNsStudentId({studentId: res.data.data.nsStudentInfo.id});
 						
 						uni.redirectTo({
 							url: '/pages/youth/homePage/homePage'
@@ -207,6 +218,13 @@
 					})
 					return;
 				}
+				if(!this.form.nickName) {
+					uni.showToast({
+						title: '请输入姓名',
+						icon: "none"
+					})
+					return;
+				}
 				if(!this.form.verifyCode) {
 					uni.showToast({
 						title: "请输入验证码",
@@ -234,6 +252,7 @@
 					var token = response ? response.data.token : '';
 					this.carhelp.setToken(token);
 					this.carhelp.setPersonInfo(response.data.regUser);
+					this.carhelp.setNsStudentId({studentId: response.data.nsStudentInfo.id});
 					uni.redirectTo({
 						url: '/pages/youth/homePage/homePage'
 					})
@@ -322,7 +341,7 @@
 			text-align: center;
 			color: rgba(153, 153, 153, 1);
 			font-size: 12px;
-			margin-bottom: 42px;
+			margin-bottom: 43px;
 		}
 	}
 

+ 1 - 1
pages/youth/mine/classRecord.vue

@@ -75,7 +75,7 @@
 		onLoad(op) {
 			if(op.id) {
 				this.buyId = op.id;
-				this.studentId = this.carhelp.getStudentId().studentId;
+				this.studentId = this.carhelp.getNsStudentId().studentId;
 				this.getLoadMyCourses();
 			}
 		},

+ 28 - 142
pages/youth/mine/mine.vue

@@ -3,62 +3,31 @@
 		<view class="background">
 			<view class="head" @click="toEditProfile">
 				<view class="photo">
-					<u-avatar class="avatar"
-						:src="form.headImg != null ? form.headImg : '../../assets/img/head.png'" size="112">
+					<u-avatar class="avatar" :src="form.headImg != null ? form.headImg : '../../assets/img/head.png'" size="112">
 					</u-avatar>
 				</view>
 				<view class="infos">
 					<view class="name">
-						{{form.nickName}}
+						{{form.studentName}}
 					</view>
 					<view class="modification">
 						点击修改个人信息
 					</view>
 				</view>
-				
-				
-			</view>
-			<view class="class-times">			<view class="box">				<view class="times">					36节				</view>				<view class="text">					购买课次				</view>			</view>			<u-line direction="col" color="rgba(232, 232, 232, 1)" length="80rpx" margin="auto 0"></u-line>			<view class="box">				<view class="times">					4节				</view>				<view class="text">					赠送课次				</view>			</view>		</view>
-		</view>
-		
-
-		<!-- <view class="my-children">
-			<view class="top">
-				<view class="text">
-					我的子女
-				</view>
-				<view class="add" @click="toAddChildInformation()">
-					添加
-				</view>
-			</view>
 
 
-			<view class="children" v-if="studentList.length != 0">
-				<view class="check-box" v-for="(item,index) in studentList" :key="item.studentId">
-					<view class="photo" @click="toAddChildInformation(item)">
-						<u-avatar class="avatar"
-							:src="item.headPhoto != null ? item.headPhoto : '../../assets/img/head.png'" size="80">
-						</u-avatar>
-					</view>
-					<view class="infos" @click="toAddChildInformation(item)">
-						<view class="name">
-							{{item.studentName}}
-						</view>
-						<view class="age">
-							{{item.age}}岁
-						</view>
-					</view>
-					<view class="radio">
-						<u-radio-group v-model="studentId" size="40rpx">
-							<u-radio @change="radioChange" :key="item.studentId" :name="item.studentId"></u-radio>
-						</u-radio-group>
-					</view>
+			</view>
+			<view class="class-times">
+				<view class="box">
+					<view class="times"> 36节 </view>
+					<view class="text"> 购买课次 </view>
+				</view> <u-line direction="col" color="rgba(232, 232, 232, 1)" length="80rpx" margin="auto 0"></u-line>
+				<view class="box">
+					<view class="times"> 4节 </view>
+					<view class="text"> 赠送课次 </view>
 				</view>
 			</view>
-
-		</view> -->
-
-		
+		</view>
 
 		<view class="option-group">
 			<!-- <view class="item">
@@ -172,9 +141,8 @@
 					</view>
 				</view>
 			</view>
-			<u-modal v-model="show" @confirm="confirm" confirm-color="#FF3D00" :show-cancel-button="true"
-				ref="uModal" :asyncClose="true" :title="title" :content="content"
-				:content-style="{color: '#333333'}"></u-modal>
+			<u-modal v-model="show" @confirm="confirm" confirm-color="#FF3D00" :show-cancel-button="true" ref="uModal"
+				:asyncClose="true" :title="title" :content="content" :content-style="{color: '#333333'}"></u-modal>
 
 		</view>
 
@@ -204,73 +172,13 @@
 				show: false,
 				title: '退出账号',
 				content: '是否退出当前账号?',
-				studentList: [],
-				studentId: '',
 			}
 		},
-		onShow() {
-			this.getParentsInfo();
-			this.getStudentList();
-		},
 		onReady() {
-			if(this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
-			} 
+			this.getInfo();
 		},
 		methods: {
-			radioChange(e) {
-				this.carhelp.setStudentId({studentId: e});
-				this.studentId = e;
-			},
-			toAddChildInformation(item) {
-				if(this.form.id) {
-					if(item) {
-						uni.navigateTo({
-							url: '/pages/youth/mine/addChildInformation?id=' + item.studentId
-						})
-					} else {
-						uni.navigateTo({
-							url: '/pages/youth/mine/addChildInformation'
-						})
-					}
-				}else {
-					uni.navigateTo({
-						url: '/pages/youth/login/login'
-					})
-				}
-				
-			},
-			getAge(str) {
-				var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
-				if (r == null) return false;
-				var d = new Date(r[1], r[3] - 1, r[4]);
-				if (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[4]) {
-					var date = new Date();
-					var Y = date.getFullYear() - r[1];
-					var M = date.getMonth() + 1 - r[3];
-					var D = date.getDate();
-					if (parseInt(D) - parseInt(r[4]) < 0) {
-						M--;
-						if (M < 0) {
-							Y--;
-							M = 11;
-						}
-					}
-					if (M < 0) {
-						Y--;
-						M = 11;
-					}
-					if(Y != 0 && M != 0) {
-						return (Y + "岁" + M + "个月");
-					}else if(Y != 0 && M == 0) {
-						return (Y + "岁");
-					}else {
-						return (M + "个月");
-					}
-				}
-				return ("输入的日期格式错误!");
-			},
-			getParentsInfo() {
+			getInfo() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -279,25 +187,8 @@
 					openId: this.carhelp.getOpenId()
 				}).then((response) => {
 					uni.hideLoading();
-					this.form = response.data.regUser;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			getStudentList() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.studentList().then((res) => {
-					uni.hideLoading();
-					this.studentList = res.data.studentList;
-					if(this.studentList.length == 1) {
-						this.carhelp.setStudentId({studentId: this.studentList[0].studentId});
-					}
+					this.form = response.data.nsStudentInfo;
+					this.carhelp.setNsStudentId({studentId: response.data.nsStudentInfo.id});
 				}).catch(error => {
 					uni.showToast({
 						title: error,
@@ -328,30 +219,25 @@
 				})
 			},
 			toEditProfile() {
-				if (this.form.id) {
-					uni.navigateTo({
-						url: '/pages/youth/mine/editProfile'
-					})
-				} else{
-					uni.navigateTo({
-						url: '/pages/youth/login/login'
-					})
-				}
+				uni.navigateTo({
+					url: '/pages/youth/mine/editProfile'
+				})
 			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.background{
+	.background {
 		height: 500rpx;
-		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 {
 		padding: 48rpx 40rpx;
 		display: flex;
 		align-items: center;
-		
+
 
 		.photo {
 			width: 120rpx;
@@ -485,7 +371,7 @@
 					position: absolute;
 					bottom: -2rpx;
 					right: -40rpx;
-					
+
 
 					/deep/.uni-radio-input {
 						width: 40rpx;
@@ -499,7 +385,7 @@
 					}
 
 				}
-				
+
 				/deep/.u-radio__icon-wrap {
 					background-color: rgba(221, 241, 242, 1);
 				}
@@ -585,4 +471,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 8 - 5
pages/youth/mine/myCourses.vue

@@ -3,8 +3,8 @@
 		<u-navbar title="我的课程">
 
 		</u-navbar>
-		<view class="courses-box" v-for="(item,index) in courseList" :key="index"
-			@click="gotoUrl('pages/youth/mine/classRecord?id='+item.buyId)">
+		<view class="courses-box" v-for="(item,index) in courseList" :key="index">
+			<!-- @click="gotoUrl('pages/youth/mine/classRecord?id='+item.buyId)"> -->
 			<view class="photo" v-if="item.posterUrl != null">
 				<img :src="item.posterUrl" alt="">
 			</view>
@@ -41,10 +41,13 @@
 						{{item.teacherName}}
 					</view>
 					<view class="progress">
-						<u-line-progress :percent="item.rollcallCount/(item.courseAmount+item.freeAmount)*100" :show-percent="false" active-color="#43C9D3">
+						<!-- <u-line-progress :percent="item.rollcallCount/(item.courseAmount+item.freeAmount)*100" :show-percent="false" active-color="#43C9D3">
 						</u-line-progress>
 						<view class="percent">
 							{{item.rollcallCount!= null ? item.rollcallCount : '0'}}/{{item.courseAmount+item.freeAmount}}
+						</view> -->
+						<view class="percent">
+							总课时:{{item.courseAmount+item.freeAmount}}
 						</view>
 					</view>
 				</view>
@@ -68,8 +71,8 @@
 			}
 		},
 		onReady() {
-			if (this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
+			if (this.carhelp.getNsStudentId()) {
+				this.studentId = this.carhelp.getNsStudentId().studentId;
 				this.getLoadMyCourses();
 			}
 		},

+ 1 - 1
pages/youth/mine/opinion.vue

@@ -35,7 +35,7 @@
 					content: '',
 					image: '',
 					phone: '',
-					applyUserType: '1' //申请人类型(1:家长,2:老师
+					applyUserType: '3' //申请人类型(1:家长,2:老师,3:青年
 				},
 				action: '',
 				listPic: [],

+ 0 - 365
pages/youth/mine/relatedChildren.vue

@@ -1,365 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="关联子女"></u-navbar>
-		<view class="content-2">
-			<view class="search">
-				<u-search v-model="queryName" placeholder="搜索学员姓名" action-text="查询" @custom="queryStudent"></u-search>
-			</view>
-
-			<view class="student-card" v-for="(item,index) in studentList" :key="index">
-				<view class="details">
-					<view class="photo">
-						<u-avatar class="avatar" mode="square"
-							:src="item.student.headPhoto != null ? item.student.headPhoto : '../../assets/img/head.png'" size="112">
-						</u-avatar>
-					</view>
-					<view class="information">
-						<view class="name">
-							{{item.student.studentName}}
-						</view>
-						<view class="item">
-							<view class="item-name">
-								报读课程
-							</view>
-							<view class="item-content">
-								<li v-for="c in item.buyLogMapList">{{c.courseName}}</li>
-							</view>
-						</view>
-						<view class="item">
-							<view class="item-name">
-								班级名称
-							</view>
-							<view class="item-content">
-								<li v-for="c in item.buyLogMapList">{{c.className}}</li>
-							</view>
-						</view>
-						<view class="item">
-							<view class="item-name">
-								教师
-							</view>
-							<view class="item-content">
-								<li v-for="c in item.buyLogMapList">{{c.teacherName}}</li>
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="check-more" @click="getUpdateStudent(item.student)">
-					<view class="call-name">
-						关联子女
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as mineApi from '@/apis/youth/mine.js'
-	import * as loginApi from '@/apis/login.js'
-
-	export default {
-		data() {
-			return {
-				queryName: '',
-				studentList: [],
-				form: {}
-			}
-		},
-		onReady() {
-			this.getParentsInfo();
-		},
-		methods: {
-			getParentsInfo() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				loginApi.findByOpenId({
-					openId: this.carhelp.getOpenId()
-				}).then((response) => {
-					uni.hideLoading();
-					this.form = response.data.regUser;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			queryStudent() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.findByStudentName({
-					studentName: this.queryName
-				}).then((res) => {
-					uni.hideLoading();
-					this.studentList = res.data.studentList;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			getUpdateStudent(student) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				mineApi.updateStudent({
-					studentId: student.studentId,
-					studentName: student.studentName,
-					gender: student.gender,
-					birthday: student.birthday,
-					headPhoto: student.headPhoto,
-					firstContactName: this.form.nickName,
-					firstContactPhone: this.form.phone
-				}).then((response) => {
-					uni.hideLoading();
-					uni.showToast({
-						title: '关联成功',
-						icon: "none"
-					})
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	li{
-		list-style: none;
-	}
-	
-	.check-more {
-		display: flex;
-		text-align: center;
-		font-size: 16px;
-		margin-top: 17px;
-		border-top: 1px solid rgba(229, 231, 234, 1);
-		line-height: 38px;
-	
-		.history {
-			flex: 1;
-			color: rgba(119, 119, 119, 1);
-			border-right: 1px solid rgba(229, 231, 234, 1);
-		}
-	
-		.call-name {
-			flex: 1;
-			color: rgba(13, 186, 199, 1);
-	
-		}
-	}
-	
-	.u-tabs {
-		position: fixed;
-		top: 88rpx;
-		left: 0;
-		right: 0;
-		z-index: 999;
-	}
-
-	.content-1 {
-		margin-top: 80rpx;
-	}
-
-	.student-card {
-		margin: 0rpx 32rpx 16rpx;
-		padding: 2rpx 32rpx 16rpx 32rpx;
-		background-color: #fff;
-		border-radius: 12px;
-
-		.title {
-			display: flex;
-			align-items: center;
-			color: rgba(51, 51, 51, 1);
-			font-weight: bold;
-
-			img {
-				vertical-align: middle;
-				margin-right: 16rpx;
-			}
-		}
-
-		.details {
-			margin-top: 40rpx;
-			display: flex;
-
-			.photo {
-				width: 160rpx;
-				height: 120px;
-				border-radius: 8px;
-				margin-right: 32rpx;
-				overflow: hidden;
-
-				img {
-					width: 100%;
-					height: 100%;
-				}
-			}
-		}
-
-		.information {
-			.name {
-				color: rgba(51, 51, 51, 1);
-				font-size: 36rpx;
-				font-weight: bold;
-				margin-bottom: 20rpx;
-			}
-
-			.item {
-				display: flex;
-				margin-bottom: 16rpx;
-				justify-content: space-between;
-				font-size: 28rpx;
-
-				.item-name {
-					width: 180rpx;
-					color: rgba(119, 119, 119, 1);
-				}
-
-				.item-content {
-					flex: 1;
-					color: rgba(51, 51, 51, 1);
-					margin-left: 16rpx;
-
-				}
-
-			}
-
-		}
-	}
-
-
-	/deep/.u-tab-item {
-		color: #101010 !important;
-	}
-
-	/deep/.u-cell_title {
-		color: rgba(119, 119, 119, 1);
-	}
-
-	/deep/.u-cell__value {
-		color: #333333;
-		flex: 0.45;
-		margin-left: auto;
-	}
-
-	.search {
-		// background-color: #fff;
-		padding: 16rpx 24rpx;
-		margin-top: 80rpx;
-	}
-
-	/deep/.u-action {
-		width: 17.1%;
-		text-align: center;
-		line-height: 56rpx;
-		border-radius: 50px;
-		background-color: rgba(13, 186, 199, 1);
-		color: rgba(255, 255, 255, 1);
-	}
-
-	/deep/.u-content {
-		height: 56rpx !important;
-		background-color: #fff !important;
-	}
-
-	/deep/.u-input {
-		background-color: #fff !important;
-	}
-
-	.student-details {
-		padding: 24rpx 32rpx;
-		background-color: #fff;
-		display: flex;
-		position: relative;
-		border-bottom: 1px solid rgba(229, 231, 234, 1);
-		;
-
-		.photo {
-			width: 112rpx;
-			height: 112rpx;
-			border-radius: 4px;
-			overflow: hidden;
-			margin-right: 22rpx;
-
-			img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		.details {
-			display: flex;
-			align-items: center;
-
-			.name-tel {
-
-
-				.name {
-					margin-right: 12px;
-					color: rgba(51, 51, 51, 1);
-					font-size: 18px;
-					margin-bottom: 16rpx;
-				}
-
-				.tel {
-					color: rgba(119, 119, 119, 1);
-					// line-height: 24px;
-					display: flex;
-					align-items: center;
-
-
-
-				}
-
-			}
-
-		}
-
-		.more {
-			color: #333333;
-			position: absolute;
-			bottom: 65rpx;
-			right: 24rpx;
-		}
-	}
-
-	@media screen and (max-width:320px) {
-		.student-card {
-			padding: 2rpx 12rpx 0rpx 12rpx;
-			margin: 32rpx 16rpx;
-		}
-
-		.item-name {
-			width: 244rpx !important;
-		}
-	}
-
-	/deep/.uni-input-placeholder {
-		font-size: 24rpx
-	}
-
-	.content-2 {
-		margin-top: 90rpx;
-
-		.search {
-			position: fixed;
-			left: 0rpx;
-			right: 0rpx;
-			top: 0rpx;
-			z-index: 999;
-			background-color: #F2F4F4;
-		}
-
-	}
-</style>

+ 3 - 11
pages/youth/search/searchResult.vue

@@ -95,17 +95,9 @@
 				})
 			},
 			toCourseDetails(item) {
-				if(item.classStatus != '4') {
-					uni.navigateTo({
-						url: '/pages/youth/course/courseDetails?id='+item.course_id+'&classId='+item.class_id
-					})
-				} else {
-					this.$refs.uToast.show({
-						title: '请电话联系' + item.consultPhone,
-						type: 'primary',
-						duration: 3000
-					})
-				}
+				uni.navigateTo({
+					url: '/pages/youth/course/courseDetails?id='+item.course_id+'&classId='+item.class_id
+				})
 			}
 		}
 	}

+ 2 - 2
pages/youth/sickNote/leave.vue

@@ -118,8 +118,8 @@
 			this.startDate = this.getData(myDate);
 			this.endDate = this.getData(myDate2);
 			
-			if (this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
+			if (this.carhelp.getNsStudentId()) {
+				this.studentId = this.carhelp.getNsStudentId().studentId;
 				this.getLoadMyBuyLog();
 			}
 		},

+ 2 - 2
pages/youth/sickNote/sickNote.vue

@@ -49,8 +49,8 @@
 			}
 		},
 		onShow() {
-			if (this.carhelp.getStudentId()) {
-				this.studentId = this.carhelp.getStudentId().studentId;
+			if (this.carhelp.getNsStudentId()) {
+				this.studentId = this.carhelp.getNsStudentId().studentId;
 				this.getLeaveList(true);
 			}
 		},