Browse Source

修改和注释

xuqiaoying 3 years ago
parent
commit
46b90fe11c

+ 1 - 0
components/course/courseChapter.vue

@@ -484,6 +484,7 @@ export default {
     },
     getSectionList(chapterId) {
       let self = this;
+    //   url: '/app/common/course/sectionList/'+data,
       this.$api.sectionList(chapterId).then((res) => {
         if (res.data.code == 200) {
           for (let i = 0; i < res.data.data.length; i++) {

+ 1 - 0
components/course/courseModule.vue

@@ -110,6 +110,7 @@ export default {
 		},
 			getChapterList(moduleId) {
 					let self = this
+                    // url: '/app/common/course/chapterList/'+data,
 					this.$api.chapterList(moduleId).then(res => {
 						if(res.data.code==200){
 							for(let i=0;i<res.data.data.length;i++){

+ 93 - 28
pages/index/index.vue

@@ -18,7 +18,7 @@
 			</view>
 		</view>
 		<view class="content">
-			<view class="notice" v-if="infoNums">
+			<!-- <view class="notice" v-if="infoNums">
 				<view class="notice__content">
 					<image src="/static/icon/msg_icon1.png" class="icon"></image>
 					<view class="text">
@@ -36,7 +36,7 @@
 					<image src="../../static/mybank.png"></image>
 					<text>我的题库</text>
 				</view>
-			</view>
+			</view> -->
 				<!-- 日历-->
 			<!-- <view>
 				<view class="calendar_card">
@@ -98,26 +98,37 @@
 			<u-tabs class="tabs" :current="tabCurrent" @change="tab" :list="menu" :activeStyle="{fontSize:'36rpx'}" :inactiveStyle="{color:'#EAEEF1',fontSize:'30rpx'}" sticky></u-tabs>
 			<view class="course-list" v-show="tabCurrent==0">
 				<navigator  hover-class="none" class="item" v-for="(item,index) in list1" :key="index" :url="'/pages3/course/detail?id='+item.goodsId">
-					<view class="img">
-						<image :src="$method.splitImgHost(item.coverUrl, true)"></image>
-						<view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
-					</view>
-					<view class="text">
-						<view class="title">{{item.goodsName}}</view>
-						<view class="desc">
-							<view class="left">
-								{{item.classHours || '-'}}
-								<text>学时</text>
-							</view>
-							<view class="right">¥ {{toFixed(item.standPrice)}}</view>
-						</view>
-					</view>
+                    <view class="c_title">{{item.goodsName}}</view>
+                    <view class="course_content">
+                        <view class="img">
+                            <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
+                            <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
+                        </view>
+                        <view class="text">
+                            <!-- <view class="title">{{item.goodsName}}</view> -->
+                            <view class="title">学习周期:xxx月-xxx月</view>
+                            <view class="joins">100人参与</view>
+                            <view class="desc">
+                                <view class="left">
+                                    <text class="line_t">¥999</text>
+                                    <text class="mon_t">¥599</text>
+                                    <!-- {{item.classHours || '-'}}
+                                    <text>学时</text> -->
+                                </view>
+                                <!-- <view class="right">¥ {{toFixed(item.standPrice)}}</view> -->
+                                <view class="right">
+                                    <view class="regiser_row">立即报名</view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+					
 					
 				</navigator>
 			</view>
 			<view class="course-list" v-show="tabCurrent==1">
 			 	<navigator  hover-class="none" class="item" v-for="(item,index) in list2" :key="index" :url="'/pages2/bank/detail?id='+item.goodsId">
-					<view class="img">
+					<!-- <view class="img">
 						<image :src="$method.splitImgHost(item.coverUrl, true)"></image>
 						<view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
 					</view>
@@ -130,7 +141,32 @@
 							</view>
 							<view class="right">¥ {{toFixed(item.standPrice)}}</view>
 						</view>
-					</view>
+					</view> -->
+
+                    <view class="c_title">{{item.goodsName}}</view>
+                    <view class="course_content">
+                        <view class="img">
+                            <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
+                            <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
+                        </view>
+                        <view class="text">
+                            <!-- <view class="title">{{item.goodsName}}</view> -->
+                            <view class="title">学习周期:xxx月-xxx月</view>
+                            <!-- <view class="joins">100人参与</view> -->
+                            <view class="desc">
+                                <view class="left">
+                                    <text class="line_t">¥999</text>
+                                    <text class="mon_t">¥599</text>
+                                    <!-- {{item.classHours || '-'}}
+                                    <text>学时</text> -->
+                                </view>
+                                <!-- <view class="right">¥ {{toFixed(item.standPrice)}}</view> -->
+                                <view class="right">
+                                    <view class="regiser_row">立即购买</view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
 					
 				</navigator> 
 			</view>
@@ -911,16 +947,29 @@ export default {
 		}
 		
 		.course-list {
-			background:#fff;
-			padding:0 8rpx;
+			// background:#fff;
+			// padding:0 8rpx;
 			box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
-			border-radius: 16rpx ;
+			// border-radius: 16rpx ;
 			
 			.item {
-				padding:24rpx 0;
-				border-bottom:1rpx solid #eeeeee;
-				display: flex;
-				
+                height: 240rpx;
+				// padding:24rpx 0;
+                padding: 12rpx 8rpx;
+				// border-bottom:1rpx solid #eeeeee;
+				// display: flex;
+                background:#fff;
+                margin-bottom: 12rpx;
+				border-radius: 16rpx;
+                .c_title {
+                    font-size: 28rpx;
+                    font-weight: bold;
+                    margin-bottom: 14rpx;
+                    font-weight: bold;
+                }
+                .course_content {
+                    display: flex;
+                }
 				.img {
 					position:relative;
 					margin-right:10rpx;
@@ -968,17 +1017,33 @@ export default {
 							flex:1;
 							color:#333;
 							font-size: 26rpx;
-							
+							.line_t {
+                                text-decoration: line-through;
+                            }
+                            .mon_t {
+                                font-weight: bold;
+                            }
 							text {
 								font-size: 24rpx;
-								color:#999;
+								// color:#999;
+                                color: #FF2D55;
 							}
 						}
 						
 						.right {
 							font-size: 24rpx;
 							font-weight: bold;
-							color: #FF2D55;
+							// color: #FF2D55;
+                            .regiser_row {
+                                width: 120rpx;
+                                height: 40rpx;
+                                line-height: 40rpx;
+                                text-align: center;
+                                border-radius: 8rpx;
+                                background-color: #FF2D55;
+                                color: #fff;
+                                margin-right: 30rpx;
+                            }
 						}
 					}
 				}

+ 4 - 4
pages/wd/index.vue

@@ -49,7 +49,7 @@
 						个课程直播中
 					</view>
 				</navigator>
-				<!-- <navigator  hover-class="none" url="/pages2/learn/my_learn" class="menu_box" >
+				<navigator  hover-class="none" url="/pages2/learn/my_learn" class="menu_box" >
 					<view class="box_left">
 						<image src="/static/icon/my_icon2.png" class="my_icon"></image>
 						<view>我的学时</view>
@@ -59,8 +59,8 @@
 						<text>{{ userNums.periodSum }}</text>
 						学时未通过
 					</view>
-				</navigator> -->
-				<!-- <navigator  hover-class="none" url="/pages5/exam/index" class="menu_box" >
+				</navigator>
+				<navigator  hover-class="none" url="/pages5/exam/index" class="menu_box" >
 					<view class="box_left">
 						<image src="/static/icon/my_icon11.png" class="my_icon"></image>
 						<view>我的模考</view>
@@ -69,7 +69,7 @@
 						<text>{{ total1 }}</text>
 						个模考预约
 					</view>
-				</navigator> -->
+				</navigator>
 				<!-- <navigator  hover-class="none" url="/pages2/exam/index" class="menu_box" >
 					<view class="box_left">
 						<image src="/static/icon/my_icon10.png" class="my_icon"></image>

+ 19 - 5
pages3/course/detail.vue

@@ -83,7 +83,8 @@
 			</view>
 		</view>
 		<view class="bottomBox" v-if="!hideBuyState">
-			<view class="priceTag">¥ {{toFixed(detail.standPrice)}}</view>
+			<!-- <view class="priceTag">¥ {{toFixed(detail.standPrice)}}</view> -->
+            <view class="priceTag">分享</view>
 			<view style="display: flex;color: #FFFFFF;align-items: center;">
 				<view class="btn1" @click="addCart">加购物车</view>
 				<view class="btn2" @click="buy">立即购买 </view>
@@ -180,6 +181,7 @@ export default {
 			 return (100/this.list.length)+'%'
 		 },
 		appCommonGoodsCourseModuleFreeExamList() {
+            // url: '/app/common/goods/course/moduleFreeExamList/'+data,
 		 this.$api.appCommonGoodsCourseModuleFreeExamList(this.id).then(res => {
 			 if(res.data.data.length) {
 				this.freeMenuList = res.data.data;
@@ -209,6 +211,7 @@ export default {
 		 })
 		},
 		courseBusiness(){
+            // url: '/app/common/course/business/'+data,
 			this.$api.courseBusiness(this.detail.businessId).then(res => {
 				this.businessData = res.data.data;
 			})
@@ -278,6 +281,7 @@ export default {
 		},
 		goodsCourseList() {
 			let self = this
+            // url: '/app/common/goods/course/list/'+ data,
 			this.$api.goodsCourseList(this.id).then(res => {
 				if(res.data.code==200){
 					for(let i=0;i<res.data.rows.length;i++){
@@ -285,7 +289,9 @@ export default {
 						item.down = true
 						item.menuList = []
 					}
-					self.courseList = res.data.rows;
+                    console.log('res.data.rows:', res.data.rows)
+					this.courseList = res.data.rows;
+                    console.log('this.courseList: ', this.courseList)
 					this.getFirstCourse();
 				}
 			});
@@ -307,6 +313,7 @@ export default {
 		},
 		getCourseMenus(item) {
 			return new Promise(resolve => {
+                // url: '/app/common/course/menuList',
 				this.$api.menuList({courseId:item.courseId}).then(res => {
 					if(res.data.code==200){
 						for(let i=0;i<res.data.rows.length;i++){
@@ -342,9 +349,11 @@ export default {
 				}
 			});
 		},
+        // 获取课程详情
 		getDetail() {
 			let self = this
 			let sectionIdList = []
+            // /app/common/goods/+data
 			this.$api.commonGoodsDetail(this.id).then(res => {
 				if(res.data.code==200){
 					if(res.data.data.mobileDetailHtml){
@@ -509,17 +518,22 @@ export default {
 		margin-right: 12rpx;
 	}
 	.noteTag{
-		ont-size: 24rpx;
+		font-size: 24rpx;
 		font-family: PingFang SC;
 		font-weight: 500;
 		color: #999999;
 		align-items: center;
 	}
 	.priceTag{
-		font-size: 30rpx;
+		/* font-size: 30rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #FF2D55;
+		color: #FF2D55; */
+        width: 60rpx;
+        height: 40rpx;
+        line-height: 40rpx;
+        text-align: center;
+        border: 1rpx solid #333;
 	}
 	.titleTag{
 		font-size: 32rpx;