hwq 4 éve
szülő
commit
3bb41bdf20

+ 6 - 10
pages.json

@@ -56,21 +56,22 @@
 		{
 			"path": "pages/course/course",
 			"style": {
-				"navigationBarTitleText": "我的课程",
+				"navigationBarTitleText": "待上课程",
 				"navigationBarBackgroundColor":"#FFFFFF",
 				"navigationBarTextStyle":"black"
 			}
 		    
 		},
 		{
-			"path": "pages/course/coursePj",
+			"path": "pages/course/courseWan",
 			"style": {
-				"navigationBarTitleText": "课程评价",
+				"navigationBarTitleText": "完成课程",
 				"navigationBarBackgroundColor":"#FFFFFF",
 				"navigationBarTextStyle":"black"
 			}
 		    
 		},
+		
 		{
 			"path": "pages/homework/homework",
 			"style": {
@@ -94,7 +95,7 @@
 			"path": "pages/course/evaluate",
 			"style": {
 				"navigationBarTitleText": "课程评价",
-				"navigationBarBackgroundColor":"#FFFFFF",
+				"navigationBarBackgroundColor":"#DDFBFB",
 				"navigationBarTextStyle":"black"
 			}
 		    
@@ -205,12 +206,7 @@
 				"selectedIconPath": "static/tabBar/indexD.png",
 				"text": "首页"
 			},
-			{
-					"pagePath": "pages/course/course",
-					"iconPath": "static/tabBar/course.png",
-					"selectedIconPath": "static/tabBar/courseD.png",
-					"text": "课程"
-				},
+			
 			{
 				"pagePath": "pages/user/user",
 				"iconPath": "static/tabBar/user.png",

+ 88 - 63
pages/course/course.vue

@@ -1,13 +1,26 @@
 <template>
 	<view class="center">
-		<view class="english">various courses for children</view>
 		<scroll-view scroll-y="true" class="list">
 			<view v-for="(item,index) in courseList" :key="index" class="listBox" @click="nav(index)">
-				<view class="bg"></view>
-				<view class="title">暑假培训阅读精品课</view>
-				<view class="teacher">授课科目:{{ item.subject}} {{ item.teacher}}</view>
-				<view class="bzr">{{ item.bzr }}</view>
-				<view class="button">上传作业</view>
+				<view class="type">待完成</view>
+				<view class="top flex">
+					<image src="../../static/img/indexMycourse.png"></image>
+					<view class="font">
+						<view class="title">奥数能力提升班</view>
+						<view class="time">{{item.start_time}}</view>
+					</view>
+				</view>
+				<view class="main">
+					<view class="left">
+						<view class="font">授课科目: {{item.subject}}</view>
+						<view class="font">班主任:</view>
+					</view>
+					<view class="right">
+						<view class="font">授课老师: {{item.teacher}}</view>
+						<view class="font">电话:</view>
+					</view>
+				</view>
+				<view class="button">作业上传</view>
 			</view>
 		</scroll-view>
 	</view>
@@ -93,72 +106,84 @@ page,
 	height: 100%;
 	background-color: #f8f8f8;
 }
-.english {
-	padding-left: 41rpx;
-	font-size: 25rpx;
-	font-family: Source Han Sans CN;
-	font-weight: 400;
-	color: #C2C2C2;
-}
-.list {
-	height: 1100rpx;
-}
+
 .listBox {
 	position: relative;
-	width: 90%;
-	height: 250rpx;
+	padding-left: 28rpx;
+	padding-top: 42rpx;
 	margin: 0 auto;
-	margin-top: 34rpx;
-	box-shadow: 0rpx 5rpx 16rpx 0rpx rgba(253, 90, 84, 0.48);
-	border-radius: 28rpx;
-	.bg {
-		width: 100%;
-		height: 100%;
+	margin: 20rpx;
+	padding-bottom: 20rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 5rpx 24rpx 0px rgba(4, 0, 0, 0.06);
+	border-radius: 15rpx;
+	.type {
 		position: absolute;
-		left: 0;
-		top: 0;
-		background-color: #4EADFA;;
-		border-radius: 28rpx;
-	}
-	.title {
-		position: relative;
-		padding-top: 36rpx;
-		padding-left: 36rpx;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #FFFFFF;
-		z-index: 1;
-	}
-	.teacher {
-		position: relative;
-		margin-top: 56rpx;
-		margin-left: 36rpx;
-		font-size: 24rpx;
+		top: 38rpx;
+		right: 32rpx;
+		width: 97rpx;
+		height: 38rpx;
+		text-align: center;
+		background: #FFDEDF;
+		border-radius: 5rpx;
+		font-size: 22rpx;
 		font-weight: 500;
-		color: #FFFFFF;
-		z-index: 1;
+		color: #FF5850;
+		line-height: 38rpx;
 	}
-	.bzr {
-		position: relative;
-		margin-left: 36rpx;
-		font-size: 24rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		z-index: 1;
+	.top {
+		justify-content: start;
+		margin-bottom: 34rpx;
+		image {
+			width: 76rpx;
+			height: 60rpx;
+		}
+		.font {
+			margin-left: 10rpx;
+			.title {
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+			.time {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #808080;
+			}
+		}
+	}
+	.main {
+		display: flex;
+		justify-content: start;
+		.left {
+			width: 50%;
+			.font{
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #808080;
+			}
+		}
+		.right {
+			padding-left: 10rpx;
+			.font{
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #808080;
+			}
+		}
 	}
 	.button {
-		position: absolute;
-		right: 26rpx;
-		bottom: 35rpx;
-		width: 160rpx;
-		height: 57rpx;
-		background: #FFFFFF;
-		border-radius: 28rpx;
+		margin-top: 40rpx;
+		margin-left: 500rpx;
+		width: 145rpx;
+		height: 48rpx;
+		border: 1rpx solid #FF8219;
+		border-radius: 24rpx;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #FF8219;
 		text-align: center;
-		line-height: 57rpx;
-		font-size: 27rpx;
-		font-weight: bold;
-		color: #FD5954;
+		line-height: 48rpx;
 	}
 }
 </style>

+ 0 - 169
pages/course/coursePj.vue

@@ -1,169 +0,0 @@
-<template>
-	<view class="center">
-		<view class="english">various courses for children</view>
-		<scroll-view scroll-y="true" class="list">
-			<view v-for="(item,index) in courseList" :key="index" class="listBox" @click="nav(index)">
-				<view class="bg"></view>
-				<view class="title">暑假培训阅读精品课</view>
-				<view class="teacher">授课科目:{{ item.subject}} {{ item.teacher}}</view>
-				<view class="bzr">{{ item.bzr }}</view>
-				<view class="button" >课程评价</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-<script>
-	import { getCourse } from '@/api/course.js'
-	export default {
-		data() {
-			return {
-				page: 1,
-				limit: 10,
-				loadingType: 'more',
-				courseList: [
-					
-				],
-			}
-		},
-		onLoad() {
-				this.loadData();
-			},
-			//下拉刷新
-			onPullDownRefresh() {
-				this.loadData('refresh');
-			},
-			//监听页面是否滚动到底部加载更多
-			onReachBottom() {
-				this.loadData();
-			},
-			methods: {
-				async loadData(type = 'add', loading) {
-					let obj = this;
-					if (type === 'add') {
-						if (obj.loadingType === 'nomore') {
-							return;
-						}
-						obj.loadingType = 'loading';
-					} else {
-						obj.loadingType = 'more';
-					}
-					if (type === 'refresh') {
-						// 清空数组
-						obj.courseList = [];
-						obj.page = 1
-					}
-					//获取课程
-					getCourse({
-						page: obj.page,
-						limit: obj.limit
-					}).then(e => {
-						console.log(e)
-						obj.courseList = obj.courseList.concat(e.data.data);
-						//判断是否还有下一页,有是more  没有是nomore
-						if (obj.limit==e.data.length) {
-							obj.page++
-							obj.loadingType='more'
-						} else{
-							obj.loadingType='nomore'
-						}
-						if (type === 'refresh') {
-							if (loading == 1) {
-								uni.hideLoading();
-							} else {
-								uni.stopPullDownRefresh();
-							}
-						}
-					})
-				},
-				nav(index){
-					index = + index;
-					let id = '';
-					console.log(this.courseList[index]);
-					if(this.courseList[+index]){
-						id = this.courseList[index].id;
-					}
-					uni.navigateTo({
-						url: '/pages/course/evaluate?id=' + id
-					})
-				}
-			}
-		}
-</script>
-
-<style lang="scss">
-page,
-.center {
-	width: 100%;
-	height: 100%;
-	background-color: #f8f8f8;
-}
-.english {
-	padding-left: 41rpx;
-	font-size: 25rpx;
-	font-family: Source Han Sans CN;
-	font-weight: 400;
-	color: #C2C2C2;
-}
-.list {
-	height: calc(100%-400px);
-}
-.listBox {
-	position: relative;
-	width: 90%;
-	height: 250rpx;
-	margin: 0 auto;
-	margin-top: 34rpx;
-	box-shadow: 0rpx 5rpx 16rpx 0rpx rgba(253, 90, 84, 0.48);
-	border-radius: 28rpx;
-	.bg {
-		width: 100%;
-		height: 100%;
-		position: absolute;
-		left: 0;
-		top: 0;
-		background-color: #4EADFA;;
-		border-radius: 28rpx;
-	}
-	.title {
-		position: relative;
-		padding-top: 36rpx;
-		padding-left: 36rpx;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #FFFFFF;
-		z-index: 1;
-	}
-	.teacher {
-		position: relative;
-		margin-top: 56rpx;
-		margin-left: 36rpx;
-		font-size: 24rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		z-index: 1;
-	}
-	.bzr {
-		position: relative;
-		margin-left: 36rpx;
-		font-size: 24rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		z-index: 1;
-	}
-	.button {
-		position: absolute;
-		right: 26rpx;
-		bottom: 35rpx;
-		width: 160rpx;
-		height: 57rpx;
-		background: #FFFFFF;
-		border-radius: 28rpx;
-		text-align: center;
-		line-height: 57rpx;
-		font-size: 27rpx;
-		font-weight: bold;
-		color: #FD5954;
-	}
-}
-</style>
-

+ 196 - 0
pages/course/courseWan.vue

@@ -0,0 +1,196 @@
+<template>
+	<view class="center">
+		<scroll-view scroll-y="true" class="list">
+			<view v-for="(item,index) in courseList" :key="index" class="listBox" @click="nav(index)">
+				<view class="type">已完成</view>
+				<view class="top flex">
+					<image src="../../static/img/indexMycourse.png"></image>
+					<view class="font">
+						<view class="title">奥数能力提升班</view>
+						<view class="time">{{item.start_time}}</view>
+					</view>
+				</view>
+				<view class="main">
+					<view class="left">
+						<view class="font">授课科目: {{item.subject}}</view>
+						<view class="font">班主任:</view>
+					</view>
+					<view class="right">
+						<view class="font">授课老师: {{item.teacher}}</view>
+						<view class="font">电话:</view>
+					</view>
+				</view>
+				<view class="button">课程评价</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import { getCourse } from '@/api/course.js'
+	export default {
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				loadingType: 'more',
+				courseList: [
+					
+				],
+			}
+		},
+		onLoad() {
+			this.loadData();
+		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.loadData('refresh');
+		},
+		//监听页面是否滚动到底部加载更多
+		onReachBottom() {
+			this.loadData();
+		},
+		methods: {
+			async loadData(type = 'add', loading) {
+				let obj = this;
+				if (type === 'add') {
+					if (obj.loadingType === 'nomore') {
+						return;
+					}
+					obj.loadingType = 'loading';
+				} else {
+					obj.loadingType = 'more';
+				}
+				if (type === 'refresh') {
+					// 清空数组
+					obj.courseList = [];
+					obj.page = 1
+				}
+				//获取课程
+				getCourse({
+					page: obj.page,
+					limit: obj.limit
+				}).then(e => {
+					
+					obj.courseList = obj.courseList.concat(e.data.data);
+					console.log(obj.courseList);
+					//判断是否还有下一页,有是more  没有是nomore
+					if (obj.limit==e.data.length) {
+						obj.page++
+						obj.loadingType='more'
+					} else{
+						obj.loadingType='nomore'
+					}
+					if (type === 'refresh') {
+						if (loading == 1) {
+							uni.hideLoading();
+						} else {
+							uni.stopPullDownRefresh();
+						}
+					}
+				})
+			},
+			nav(index){
+				index = + index;
+				let id = '';
+				console.log(this.courseList[index]);
+				if(this.courseList[+index]){
+					id = this.courseList[index].id;
+				}
+				uni.navigateTo({
+					url: '/pages/course/evaluate?id=' + id
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+page,
+.center {
+	width: 100%;
+	height: 100%;
+	background-color: #f8f8f8;
+}
+
+.listBox {
+	position: relative;
+	padding-left: 28rpx;
+	padding-top: 42rpx;
+	margin: 0 auto;
+	margin: 20rpx;
+	padding-bottom: 20rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 5rpx 24rpx 0px rgba(4, 0, 0, 0.06);
+	border-radius: 15rpx;
+	.type {
+		position: absolute;
+		top: 38rpx;
+		right: 32rpx;
+		width: 97rpx;
+		height: 38rpx;
+		text-align: center;
+		background: #DFFFFA;
+		border-radius: 5rpx;
+		font-size: 22rpx;
+		font-weight: 500;
+		color: #1CC7C6;
+		line-height: 38rpx;
+	}
+	.top {
+		justify-content: start;
+		margin-bottom: 34rpx;
+		image {
+			width: 76rpx;
+			height: 60rpx;
+		}
+		.font {
+			margin-left: 10rpx;
+			.title {
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+			.time {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #808080;
+			}
+		}
+	}
+	.main {
+		display: flex;
+		justify-content: start;
+		.left {
+			width: 50%;
+			.font{
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #808080;
+			}
+		}
+		.right {
+			padding-left: 10rpx;
+			.font{
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #808080;
+			}
+		}
+	}
+	.button {
+		margin-top: 40rpx;
+		margin-left: 500rpx;
+		width: 145rpx;
+		height: 48rpx;
+		border: 1rpx solid #FF5850;
+		border-radius: 24rpx;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #FF5850;
+		text-align: center;
+		line-height: 48rpx;
+	}
+}
+</style>
+

+ 100 - 26
pages/course/evaluate.vue

@@ -1,30 +1,27 @@
 <template>
 	<view class="center">
-		<view class="zhil">
-			<view class="pf">评分</view>
-			<view><uniRate text="1" size="20" margin="10" :value="evaluate_fraction" @change="rateChange1"></uniRate></view>
-		</view>
-		<view class="pjnr">
-			<text>评价内容</text><input type="text" v-model="evaluate" />
-		</view>
-		<view class="item-left">评价图片:</view>
-		<view class="item-right">
-			<image :src="cardimg" mode="" class="upload-img" @click.stop="imgsub" v-if="cardimg"></image>
-			<image src="https://zhibo.liuniu946.com/img/phone.png" class="upload-img" mode="" v-if="!cardimg" @click.stop="imgsub"></image>
-		</view>
-		<view class="button" @click="submit('/pages/course/success')">
-			提交评价
-		</view>
-		<view class="button" @click="nav('/pages/course/myEvaluate')">
-			我的评价
+		<view class="bg"></view>
+		<view class="main">
+			<view class="toux"><image :src="userInfo.avatar"></image></view>
+			<view class="name">{{ userInfo.nickname }}</view>
+			<view class="pj">您的评价让我们做的更好</view>
+			<view class="fanqu">你的反馈将有助于提高我们的教师授课体验</view>
+			<view class="dafen">为课程体验打分</view>
+			<uniRate class="fenshu" text="1" size="44" margin="15" :value="evaluate_fraction" @change="rateChange1"></uniRate>
+			<textarea v-model="evaluate" maxlength="300" focus placeholder="添加评价..."></textarea>
+			<view class="button" @click="submit('/pages/course/success')">提交评价</view>
 		</view>
 	</view>
 </template>
 
 <script>
+import { mapState, mapMutations } from 'vuex';
 import { setEvaluate,uploads } from '@/api/course.js';
 import uniRate from '@/components/uni-rate/uni-rate.vue';
 export default {
+	computed: {
+		...mapState(['hasLogin', 'userInfo', 'baseURL', 'urlFile'])
+	},
 	components: {
 		uniRate
 	},
@@ -77,16 +74,93 @@ export default {
 }
 </script>
 
-<style>
-	.pf{
-		margin-bottom: 20rpx;
+<style lang="scss">
+.bg {
+	position: relative;
+	background: #DDFBFB;
+	height: 300rpx;
+}
+.main{
+	width: 90%;
+	text-align: center;
+	margin: 0 auto;
+	margin-top: -190rpx;
+	position: relative;
+	background: #FFFFFF;
+	padding-top: 94rpx;
+	padding-bottom: 42rpx;
+	box-shadow: 0px 23rpx 29rpx 0px rgba(24, 32, 93, 0.07);
+	border-radius: 16rpx;
+	.toux {
+		position: absolute;
+		top: -70rpx;
+		left: 50%;
+		margin-left: -71rpx;
+		height: 142rpx;
+		width: 142rpx;
+		border-radius: 50%;
+		box-shadow: 0rpx 16rpx 29rpx 0rpx rgba(24, 32, 93, 0.11);
+		background-color: #ffff7f;
+		image {
+			width: 100%;
+			height: 100%;
+			border-radius: 50%;
+		}
 	}
-	.button{
-		height: 200rpx;
+	.name {
+		font-size: 37rpx;
+		font-weight: bold;
+		color: #303338;
 	}
-	.zhil {
-		font-size: 28rpx !important;
-		padding: 15rpx 15rpx;
-		height: 100rpx;
+	.pj {
+		margin-top: 114rpx;
+		font-size: 45rpx;
+		font-weight: bold;
+		color: #FA7268;
 	}
+	.fanqu {
+		margin-top: 32rpx;
+		font-size: 21rpx;
+		font-weight: 500;
+		color: #8A8A8F;
+	}
+	.dafen {
+		margin-top: 76rpx;
+		font-size: 21rpx;
+		font-weight: 500;
+		color: #242E42;
+		opacity: 0.5;
+	}
+	.fenshu {
+		width: 560rpx;
+		margin-left: 45rpx;
+		margin-top: 82rpx;
+	}
+	textarea{
+		width: 90%;
+		margin: 0 auto;
+		margin-top: 86rpx;
+		height: 232rpx;
+		background: rgba(239, 239, 244, 0.5);
+		border: 2rpx solid #EFEFF2;
+		border-radius: 16rpx;
+		font-size: 34rpx;
+		font-weight: 500;
+		text-align: left;
+	}
+	.button {
+		margin: 0 auto;
+		margin-top: 58rpx;
+		width: 90%;
+		height: 90rpx;
+		background: #1CC7C7;
+		border-radius: 16rpx;
+		text-align: center;
+		font-size: 34rpx;
+		font-weight: 400;
+		color: #FFFFFF;
+		line-height: 90rpx;
+	}
+}
+
 </style>

+ 2 - 7
pages/index/index.vue

@@ -5,13 +5,13 @@
 			<image src="../../static/img/index.jpg"></image>
 		</view>
 		<view class="navBox">
-			<view class="navBox-item" @click="navTab('/pages/course/course')">
+			<view class="navBox-item" @click="nav('/pages/course/course')">
 				<image class="bg1" src="../../static/img/indexMycourse.png" ></image>
 				<view class="font">
 					我的课程
 				</view>
 			</view>
-			<view class="navBox-item" @click="nav('/pages/course/coursePj')">
+			<view class="navBox-item" @click="nav('/pages/course/courseWan')">
 				<image class="bg2" src="../../static/img/indexKcpj.png" ></image>
 				<view class="font">
 					课程评价
@@ -73,11 +73,6 @@ export default {
 		}
 	},
 	methods: {
-		navTab(url){
-			uni.switchTab({
-				url: url,
-			})
-		},
 		nav(url){
 			uni.navigateTo({
 				url: url,

+ 2 - 2
pages/user/user.vue

@@ -12,7 +12,7 @@
 			</view>
 		</view>
 		<view class="navBar flex">
-			<view class="left">
+			<view class="left" @click="nav('/pages/course/course')">
 				<image src="../../static/img/userLeft.png"></image>
 				<view class="centent">
 					<view class="title">待上课程</view>
@@ -20,7 +20,7 @@
 					<view class="number">394<text>个</text></view>
 				</view>
 			</view>
-			<view class="right">
+			<view class="right"  @click="nav('/pages/course/courseWan')">
 				<image src="../../static/img/userRight.png"></image>
 				<view class="centent">
 					<view class="title">完成课程</view>