Browse Source

feat:首页新增类型和试卷报告页新增推荐课程

xuqiaoying 3 years ago
parent
commit
d3a64bdc11

+ 2 - 2
common/request.js

@@ -5,12 +5,12 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
 // export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
-// export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
+export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
 
  //图片上传api
 // export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release

+ 133 - 32
pages/index/index.vue

@@ -99,6 +99,18 @@
 			<view class="tabs">
 				<view v-for="(item, index) in menu" :key="index" class="tab_item" :class="{nactive: tabNum == index}" @click="tab(index)">{{ item.name }}</view>
 			</view>
+			<view class="filters">
+				<template v-if="tabNum == 0">
+					<view v-for="(item, index) in courseName" :key="index" class="filter_item" :class="{nactive: couIndex == index}" @click="changeCou(item.recommendId, index)">
+						{{ item.name }}
+					</view>
+				</template>
+				<template v-if="tabNum == 1">
+					<view v-for="(item, index) in bankName" :key="index" class="filter_item" :class="{nactive: bankIndex == index}" @click="changebank(item.recommendId, index)">
+						{{ item.name }}
+					</view>
+				</template>
+			</view>
 			<view class="course-list" v-show="tabCurrent==0">
 				<template v-if="list1.length">
 					<navigator  hover-class="none" class="list_item" v-for="(item,index) in list1" :key="index" :url="'/pages3/course/detail?id='+item.goodsId">
@@ -240,7 +252,7 @@ export default {
 				{
 					pageNum: 1,
 					pageSize: 10,
-					// total: 0,
+					total: 0,
 					// showStatus: 0,
 					getUserNum: 1, //是否返回商品购买用户数量 1带 0不带	,会返回个buyUserNum
 					goodsType:1
@@ -249,7 +261,7 @@ export default {
 				{
 					pageNum: 1,
 					pageSize: 10,
-					// total: 0,
+					total: 0,
 					// showStatus: 0,
 					getUserNum: 1,
 					goodsType:2
@@ -267,9 +279,14 @@ export default {
 			// opacity: 1,
 			isFollow: null, //是否关注过,不是1就是没关注
 			curClose: true, // 当天时是否关闭过
+			courseName: [],
+			bankName: [],
+			couIndex: 0,
+			bankIndex: 0,
+			courseId: '',
+			bankId: '',
 		};
 	},
-	onPullDownRefresh() {},
 	async onLoad(option) {
 		this.isLogin = this.$method.isLogin()
 		this.dictObj
@@ -305,7 +322,7 @@ export default {
 		this.getInfo() // 判断有没有关注公众号		
 		this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
 		uni.removeStorageSync('goPath')
-		this.courseList();
+		this.courseLists();
 		// this.bankList();
 		if (uni.getStorageSync('updateHome')){
 			this.init()
@@ -335,6 +352,35 @@ export default {
 			path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
 		};
 	},
+	async onPullDownRefresh() {
+		if (this.tabNum == 0) {
+			this.paramList[0].pageNum = 1
+			this.list1 = await this.getGoodsList(this.courseId, 0)
+		} else {
+			this.paramList[1].pageNum = 1
+			this.list2 = await this.getGoodsList(this.bankId, 1)
+		}
+	},
+	async onReachBottom() {
+		console.log('加载加载--', this.tabNum)
+		console.log(this.paramList[0].total,'total', this.paramList[1].total)
+		console.log(this.list1.length,'length', this.list2.length)
+		if (this.tabNum == 0) {
+			if (this.list1.length < this.paramList[0].total) {
+				this.paramList[0].pageNum++
+				let list1 = await this.getGoodsList(this.courseId, 0)
+				this.list1.push(...list1)
+			}
+		} else {
+
+			if (this.list2.length < this.paramList[1].total) {
+				this.paramList[1].pageNum++
+				let list2 = await this.getGoodsList(this.bankId, 1)
+				this.list1.push(...list2)
+			}
+		}
+		
+	},
 	computed: { 
 		...mapGetters(['dictObj','userInfo', 'hideBuyState']),
 		opacitys() {
@@ -506,8 +552,24 @@ export default {
 			}
 			
 		},
+		async changeCou(recommendId, index) {
+			this.couIndex = index
+			this.courseId = recommendId
+			this.paramList[0].pageNum = 1
+			this.list1 = []
+			let list1 = await this.getGoodsList(recommendId, 0)
+			this.list1.push(...list1)
+		},
+		async changebank(recommendId, index) {
+			this.bankIndex = index
+			this.bankId = recommendId
+			this.paramList[1].pageNum = 1
+			this.list2 = []
+			let list2 = await this.getGoodsList(recommendId, 1)
+			this.list1.push(...list2)
+		},
 		//课程
-		courseList() {
+		 courseLists() {			
 			// var param = this.paramList[0];
 			// /app/common/goods/list
 			this.$http({
@@ -518,23 +580,37 @@ export default {
 					status: 1
 				},
 				noToken: true
-			}).then((res) => {
+			}).then(async (res) => {
 				if (res.data.code == 200) {
-					let goodsList1 = []; //推荐视频商品
-          			let goodsList2 = []; //推荐题库商品
-					res.data.rows.forEach((item) => {
-						if (item.type === 1) {
-							goodsList1 = goodsList1.concat(item.goodsList)
+					let list = res.data.rows || []
+					//课程
+					this.courseName = list.filter(x => x.type == 1).sort((a,b) => a.sort - b.sort).map(x => {
+						return {
+							name: x.educationName,
+							recommendId: x.recommendId
 						}
-						if (item.type === 2) {
-							goodsList2 = goodsList2.concat(item.goodsList)
+					});
+					//题库
+					this.bankName = list.filter(x => x.type == 2).sort((a,b) => a.sort - b.sort).map(x => {
+						return {
+							name: x.educationName,
+							recommendId: x.recommendId
 						}
 					});
-					this.list1 = goodsList1.sort((a, b) => a.sort - b.sort);
-					this.list2 = goodsList2.sort((a, b) => a.sort - b.sort);
-					console.log(this.list1, this.list2)
+					if (this.courseName.length) {
+						this.courseId = this.courseName[0].recommendId
+						let list1 = await this.getGoodsList(this.courseName[0].recommendId, 0)
+						this.list1.push(...list1)
+					}
+					
+					if (this.bankName.length) {
+						this.bankId = this.bankName[0].recommendId
+						let list2 = await this.getGoodsList(this.bankName[0].recommendId, 1)
+						this.list2.push(...list2)
+					}
+
 				}
-			})
+			});
 			// this.$api.goodsList(param).then(res => {
 			// 	if (res.data.code == 200) {
 			// 		this.list1 = res.data.rows || []
@@ -545,20 +621,25 @@ export default {
 			// 	}
 			// });
 		},
-		//题库
-		bankList() {
-			var param = this.paramList[1];
-			this.$api.goodsList(param).then(res => {
-				// this.paramList[1].total = res.data.total;
-				if (res.data.code == 200) {
-					this.list2 = res.data.rows || []
-					this.total2 = res.data.total
-					if (this.list2.length === res.data.total) {
-						// this.paramList[1].showStatus = true;
-						this.showStatus2 = true
-					}
-				}
-			});
+		getGoodsList(recommendId, num) {	
+			return new Promise((resolve, reject) => {
+				 this.$http({
+					url: `/app/common/activity/recommend/goodsList`,
+					method: 'get',
+					data: {
+						pageNum: this.paramList[num].pageNum,
+						pageSize: this.paramList[num].pageSize,
+						recommendId: recommendId
+					},
+					noToken: true
+				}).then((res) => {
+					if (res.data.code == 200) {
+						this.paramList[num].total = res.data.total
+						resolve(res.data.rows)
+					}	
+				})
+			})
+			 
 		},
 		/**
 		 * @param {Object} item 
@@ -732,7 +813,6 @@ export default {
 			}
 		}
 	},
-	onReachBottom() {},
 	
 };
 </script>
@@ -1087,6 +1167,27 @@ page {
 				}
 			}
 		}
+
+		.filters {
+			padding: 0rpx 16rpx;
+			margin-bottom: 32rpx;
+			display: flex;
+			align-items: center;
+			.filter_item {
+				font-size: 24rpx;
+				color: #666666;
+				padding: 12rpx 16rpx;
+				width: 152rpx;
+				height: 56rpx;
+				text-align: center;
+				background: #FFFFFF;
+				border-radius: 8rpx;
+				margin-right: 16rpx;
+				&.nactive {
+					color: #3F8DFD;
+				}
+			}
+		}
 	}
 	// .botms {
 	// 	padding-bottom: 100rpx;

+ 93 - 3
pages2/bank/question_report.vue

@@ -106,6 +106,42 @@
 				</view>
 			</view>
 		</view>
+
+		<view v-if="courseList.length" class="course_list">
+            <view class="titles">
+                <image class="code" src="@/static/learn/act_icon.png" ></image>
+                <text class="title">推荐课程</text>
+            </view>
+            <view class="list_item" v-for="(item,index) in courseList" :key="index" @click="toBuy(item)">
+                <view class="course_content">
+                    <view class="c_title">{{item.goodsName}}</view>
+                    <view class="c_downs">
+                        <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="desc">
+                                <view class="left">
+                                    <text class="mon_t">¥ {{item.standPrice}}</text>
+                                    <!-- <text class="sale">/限时优惠</text> -->
+                                    <text v-if="item.linePrice" class="sale"> ¥ </text>
+                                    <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
+                                </view>
+                                <view class="right">
+                                    <view class="regiser_row" v-if="!hideBuyState">立即购买</view>
+                                </view>
+                            </view>
+                            <view v-if="item.buyUserNum" class="joins">
+                                <!-- <image class="people" src="/static/index/people.png"></image> -->
+                                <!-- 为0时,不显示 -->
+                                <view class="people">{{ item.buyUserNum }}人参与</view>
+                            </view>
+                        </view>
+                    </view>
+                </view>					
+            </view>
+        </view>
 	</view>
 </template>
 
@@ -128,12 +164,17 @@ export default {
 			nextExamId:'',
 			wrongRecordWrongNum:'',
 			orderGoodsId:'',
+			courseList: [],
+			pageNum: 1,
+			pageSize: 10,
+			total: 0,
 		};
 	},
 	onUnload() {},
-	computed: { ...mapGetters(['userInfo']) },
-	async onShow() {
-		
+	computed: { ...mapGetters(['userInfo', 'hideBuyState']) },
+	onShow() {
+		this.courseList = []
+		this.getcourList()
 	},
 		
 		
@@ -241,7 +282,55 @@ export default {
 		});
 		
 	},
+	onPullDownRefresh() {
+		this.pageNum = 1
+		this.getcourList()
+		// this.timer = setTimeout(function() {
+		// 	uni.stopPullDownRefresh()
+		// }, 500)
+	},
+	onReachBottom() {
+		console.log(this.total,'total')
+		console.log(this.courseList.length,'length')
+		if (this.courseList.length < this.total) {
+			this.pageNum++
+			this.getcourList()
+		}
+	},
 	methods: {
+		getcourList() {
+            this.$http({
+                url: '/apply/recommend/goodsList',
+                method: 'post',
+                data: {
+					examId: this.examId,
+                    pageNum: this.pageNum,
+					pageSize: this.pageSize,
+                }
+            }).then((res) => {
+                if (res.data.code == 200) {
+					
+					this.courseList.push(...(res.data.rows || [] ))
+					console.log('this.courseList', this.courseList)
+					this.total = res.data.total
+                }
+            })
+        },
+		toBuy(item) {
+            if (item.goodsType == 1) {
+                uni.navigateTo({
+                    url: '/pages3/course/detail?id='+item.goodsId
+                })
+            } else if (item.goodsType == 2) {
+                uni.navigateTo({
+                    url: '/pages2/bank/detail?id='+item.goodsId
+                })
+            } else {
+                uni.navigateTo({
+                    url: '/pages5/liveDetail/index?id='+item.goodsId
+                })
+            }
+        },
 		bankExamNextExam() {
 			this.$api.bankExamNextExam({
 				chapterExamId:this.chapterId,
@@ -357,6 +446,7 @@ page {
 }
 </style>
 <style lang="scss" scope>
+@import '../../pages5/examReport/indexCourseList.scss';
 .disNone {
 	display: none;
 }

+ 2 - 1
pages2/class/questionBank.vue

@@ -2202,7 +2202,8 @@ export default {
                   "&reportStatus=" +
                   reportStatus +
 									"&lessQuestionNum=" +
-									lessQuestionNum
+									lessQuestionNum +
+                  "&examId=" + this.id
               });
             }, 1000);
           }

+ 91 - 3
pages2/class/question_report.vue

@@ -51,6 +51,42 @@
 				</view>
 			</view>
 		</view>
+
+		<view v-if="courseList.length" class="course_list">
+            <view class="titles">
+                <image class="code" src="@/static/learn/act_icon.png" ></image>
+                <text class="title">推荐课程</text>
+            </view>
+            <view class="list_item" v-for="(item,index) in courseList" :key="index" @click="toBuy(item)">
+                <view class="course_content">
+                    <view class="c_title">{{item.goodsName}}</view>
+                    <view class="c_downs">
+                        <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="desc">
+                                <view class="left">
+                                    <text class="mon_t">¥ {{item.standPrice}}</text>
+                                    <!-- <text class="sale">/限时优惠</text> -->
+                                    <text v-if="item.linePrice" class="sale"> ¥ </text>
+                                    <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
+                                </view>
+                                <view class="right">
+                                    <view class="regiser_row" v-if="!hideBuyState">立即购买</view>
+                                </view>
+                            </view>
+                            <view v-if="item.buyUserNum" class="joins">
+                                <!-- <image class="people" src="/static/index/people.png"></image> -->
+                                <!-- 为0时,不显示 -->
+                                <view class="people">{{ item.buyUserNum }}人参与</view>
+                            </view>
+                        </view>
+                    </view>
+                </view>					
+            </view>
+        </view>
 	</view>
 </template>
 
@@ -73,12 +109,32 @@ export default {
 			examTime:'',
 			reportStatus:null,
 			lessQuestionNum:0,
+			courseList: [],
+			pageNum: 1,
+			pageSize: 10,
+			total: 0,
 		};
 	},
+	onPullDownRefresh() {
+		this.pageNum = 1
+		this.getcourList()
+		// this.timer = setTimeout(function() {
+		// 	uni.stopPullDownRefresh()
+		// }, 500)
+	},
+	onReachBottom() {
+		console.log(this.total,'total')
+		console.log(this.courseList.length,'length')
+		if (this.courseList.length < this.total) {
+			this.pageNum++
+			this.getcourList()
+		}
+	},
 	onUnload() {},
-	computed: { ...mapGetters(['userInfo']) },
+	computed: { ...mapGetters(['userInfo', 'hideBuyState']) },
 	async onShow() {
-		
+		this.courseList = []
+		this.getcourList()
 		uni.getSystemInfo({
 			success: res => {
 				var winW = res.screenWidth;
@@ -146,6 +202,7 @@ export default {
 		});
 	},
 	async onLoad(option) {
+		this.examId = option.examId
 		this.examTime = option.examTime;
 		this.doTime = option.doTime;
 		this.reportStatus = option.reportStatus;
@@ -158,7 +215,37 @@ export default {
 		
 	},
 	methods: {
-		
+		getcourList() {
+            this.$http({
+                url: '/apply/recommend/goodsList',
+                method: 'post',
+                data: {
+					examId: this.examId,
+                    pageNum: this.pageNum,
+					pageSize: this.pageSize,
+                }
+            }).then((res) => {
+                if (res.data.code == 200) {
+					this.courseList.push(...(res.data.rows || [] ))
+					this.total = res.data.total
+                }
+            })
+        },
+		toBuy(item) {
+            if (item.goodsType == 1) {
+                uni.navigateTo({
+                    url: '/pages3/course/detail?id='+item.goodsId
+                })
+            } else if (item.goodsType == 2) {
+                uni.navigateTo({
+                    url: '/pages2/bank/detail?id='+item.goodsId
+                })
+            } else {
+                uni.navigateTo({
+                    url: '/pages5/liveDetail/index?id='+item.goodsId
+                })
+            }
+        },
 	}
 };
 </script>
@@ -168,6 +255,7 @@ page {
 }
 </style>
 <style lang="scss" scope>
+@import '../../pages5/examReport/indexCourseList.scss';
 .disNone {
 	display: none;
 }

+ 1 - 1
pages4/courseTopic/goodsTopic.vue

@@ -22,7 +22,7 @@
             </view>
             <view class="pictures" @click="toDetail()">
                 <view class="pic_imgs">
-                    <image v-if="goodsInfo.goodsCoverUrl" :src="$method.splitImgHost(goodsInfo.goodsCoverUrl, true)" class="basic_img"></image>
+                    <image v-if="goodsInfo.goodsCoverUrl" :src="$method.splitImgHost(goodsInfo.goodsCoverUrl)" class="basic_img"></image>
                     <image v-else class="basic_img" src="../static/topic/basic.png" ></image>
                 </view>
                 <view class="pic_title">{{ goodsInfo.goodsName }}</view>

+ 0 - 1
pages5/examList/index.vue

@@ -225,7 +225,6 @@ export default {
 	onShow() {
 		
 		this.nowTime = +this.$method.timest();
-		console.log('sfhdsofhsoh-----onshow', this.itemIndex, this.nowTime)
 		// if(this.itemIndex !== '') {
 		// 	this.refreshByIndex();
 		// }

+ 98 - 7
pages5/examReport/index.vue

@@ -128,6 +128,41 @@
 			</template>
 		</template>
 		
+		<view v-if="courseList.length" class="course_list">
+            <view class="titles">
+                <image class="code" src="@/static/learn/act_icon.png" ></image>
+                <text class="title">推荐课程</text>
+            </view>
+            <view class="list_item" v-for="(item,index) in courseList" :key="index" @click="toBuy(item)">
+                <view class="course_content">
+                    <view class="c_title">{{item.goodsName}}</view>
+                    <view class="c_downs">
+                        <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="desc">
+                                <view class="left">
+                                    <text class="mon_t">¥ {{item.standPrice}}</text>
+                                    <!-- <text class="sale">/限时优惠</text> -->
+                                    <text v-if="item.linePrice" class="sale"> ¥ </text>
+                                    <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
+                                </view>
+                                <view class="right">
+                                    <view class="regiser_row" v-if="!hideBuyState">立即购买</view>
+                                </view>
+                            </view>
+                            <view v-if="item.buyUserNum" class="joins">
+                                <!-- <image class="people" src="/static/index/people.png"></image> -->
+                                <!-- 为0时,不显示 -->
+                                <view class="people">{{ item.buyUserNum }}人参与</view>
+                            </view>
+                        </view>
+                    </view>
+                </view>					
+            </view>
+        </view>
 		
 		
 		
@@ -170,22 +205,39 @@ export default {
 			context2: null,
 			eachExamId:'',
 			wrongRecordWrongNum:0,
-			subscribeInfo:{}
+			subscribeInfo:{},
+			courseList: [],
+			pageNum: 1,
+			pageSize: 10,
+			total: 0,
+			timer: null,
 		};
 	},
-	onUnload() {},
-	computed: { ...mapGetters(['userInfo','sysTime']) },
-	async onShow() {
-		
+	
+	computed: { ...mapGetters(['userInfo','sysTime', 'hideBuyState']) },
+	
+	onPullDownRefresh() {
+		this.pageNum = 1
+		this.getcourList()
+		// this.timer = setTimeout(function() {
+		// 	uni.stopPullDownRefresh()
+		// }, 500)
+	},
+	onReachBottom() {
+		console.log(this.total,'total')
+		console.log(this.courseList.length,'length')
+		if (this.courseList.length < this.total) {
+			this.pageNum++
+			this.getcourList()
+		}
 	},
-		
 		
 	async onLoad(option) {
 		console.log(option)
 		this.recordId = option.id;
 		this.examId = option.examId;
 		this.eachExamId = option.eachExamId
-    this.subscribeId = option.subscribeId;
+    	this.subscribeId = option.subscribeId;
 		await this.setSystemTime();
 		this.mockSubscribeInfo();
 		this.mockWrongRecordWrongNum();
@@ -282,8 +334,46 @@ export default {
 		});
 		
 	},
+	onShow() {
+		this.courseList = []
+		this.getcourList()
+	},
+	onUnload() {
+		clearTimeout(this.timer)
+	},
 	methods: {
 		...mapActions(['setSystemTime']),
+		getcourList() {
+            this.$http({
+                url: '/apply/recommend/goodsList',
+                method: 'post',
+                data: {
+					examId: this.examId,
+                    pageNum: this.pageNum,
+					pageSize: this.pageSize,
+                }
+            }).then((res) => {
+                if (res.data.code == 200) {
+					this.courseList.push(...res.data.rows)
+					this.total = res.data.total
+                }
+            })
+        },
+		toBuy(item) {
+            if (item.goodsType == 1) {
+                uni.navigateTo({
+                    url: '/pages3/course/detail?id='+item.goodsId
+                })
+            } else if (item.goodsType == 2) {
+                uni.navigateTo({
+                    url: '/pages2/bank/detail?id='+item.goodsId
+                })
+            } else {
+                uni.navigateTo({
+                    url: '/pages5/liveDetail/index?id='+item.goodsId
+                })
+            }
+        },
 		goLive() {
 			let uuid = new Date().valueOf() + ""
       		// buyCourse 是否购买课程:1是 0否
@@ -404,6 +494,7 @@ page {
 }
 </style>
 <style lang="scss" scope>
+@import './indexCourseList.scss';
 .disNone {
 	display: none;
 }

+ 136 - 0
pages5/examReport/indexCourseList.scss

@@ -0,0 +1,136 @@
+.course_list {
+    // width: 100%;
+    padding: 0rpx 32rpx 32rpx 32rpx;
+    box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);			
+    .titles {
+        margin: 72rpx 0rpx 32rpx 10rpx;
+        .code {
+            width: 38rpx;
+            height: 24rpx;
+        }
+        .title {
+            font-size: 40rpx;
+            font-family: OPPOSans-Bold, OPPOSans;
+            font-weight: bold;
+            color: #222222;
+            margin-left: 14rpx;
+        }
+    }
+    .list_item {
+        padding: 24rpx;
+        // height: 278rpx;
+        background: #FFFFFF;
+        box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1,99,235,0.1000);
+        border-radius: 24rpx;
+        background:#fff;
+        margin-bottom: 32rpx;
+        display: flex;
+        align-items: center;
+        .c_title {
+            font-size: 32rpx;
+            font-weight: bold;
+            margin-bottom: 24rpx;
+            font-weight: bold;
+            color: #222222;
+        }
+        .c_downs {
+            display: flex;
+        }
+        .img {
+            position:relative;
+            margin-right: 24rpx;
+            border-radius: 16rpx ;
+            overflow: hidden;
+            width: 204rpx;
+            height: 120rpx;
+            image {
+                width:100%;
+                height:100%;
+            }
+            
+            .time {
+                position:absolute;
+                bottom:0;
+                right:0;
+                width: 80rpx;
+                height: 32rpx;
+                background: rgba(1, 25, 45, 0.4);
+                color:#fff;
+                text-align: center;
+                line-height: 32rpx;
+                font-size: 24rpx;
+                border-radius: 10rpx 0px 10rpx 0px;
+            }
+        }
+        
+        .text {
+            width: 440rpx;
+            position: relative;
+            display: flex;
+            flex-direction: column;
+            justify-content: space-between;
+            height: 120rpx;
+            .joins {
+                .people {
+                    width: 160rpx;
+                    font-size: 20rpx;
+                    color: #999999;
+                    padding: 0rpx 8rpx;
+                    text-align: center;
+                    height: 36rpx;
+                    line-height: 36rpx;
+                    background: #F6F7FB;
+                    border-radius: 4px;
+                }
+                
+            }
+            .desc {
+                margin-top: 10rpx;
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                width: 100%;
+                .left {
+                    flex:1;
+                    color:#333;
+                    font-size: 26rpx;
+                    .mon_t {
+                        font-weight: bold;
+                        color: #FC3F3F;
+                        font-size: 36rpx;
+                    }
+                    .sale {
+                        color: #999999;
+                        font-size: 24rpx;
+                        margin-left: 8rpx;
+                    }
+                    .price_line {
+                        color: #999999;
+                        font-size: 24rpx;
+                        text-decoration:line-through;
+                        font-weight: 400;
+                    }
+                }
+                
+                .right {
+                    font-size: 24rpx;
+                    font-weight: bold;
+                    .regiser_row {
+                        width: 144rpx;
+                        height: 52rpx;
+                        line-height: 52rpx;
+                        text-align: center;
+                        border-radius: 16rpx;
+                        background-color: #FC3F3F;
+                        color: #fff;
+                        font-weight: 500;
+                        font-size: 26rpx;
+                    }
+                }
+            }
+        }
+    }
+    .course_content {
+        width: 100%;
+    }
+}

+ 27 - 10
pages5/mockExam/registrationSuccess.vue

@@ -103,7 +103,6 @@
                             <view class="desc">
                                 <view class="left">
                                     <text class="mon_t">¥ {{item.standPrice}}</text>
-                                    <!-- <text class="sale">/限时优惠</text> -->
                                     <text v-if="item.linePrice" class="sale"> ¥ </text>
                                     <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
                                 </view>
@@ -140,11 +139,13 @@ export default {
             eDay: '',
             activityId: '',
             courseList: [],
+            pageNum: 1,
+			pageSize: 10,
+			total: 0,
         }
     },
     filters: {
         getLastDay(time) {
-            console.log('time:', time)
             var padDate = function (va) {
                 va = va < 10 ? '0' + va : va
                 return va
@@ -155,16 +156,11 @@ export default {
                 var month = padDate(value.getMonth() + 1)
                 var day = padDate(value.getDate())
                 let t_value = year + '/' + month + '/' + day
-                console.log('t:', t_value)
                 let curTimeLast = new Date(new Date(t_value).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1
                 
                 let lastStartDay = parseInt(curTimeLast/1000) - parseInt(curTime/1000)                
                 let days = parseInt(lastStartDay/24/60/60) 
                 return days >= 1 ? days : 0
-                // this.lastEndDay = parseInt(curTimeLast/1000)  - parseInt(curTime/1000)
-                // this.sDay = this.lastStartDay/24/60/60
-                // this.eDay = this.lastEndDay/24/60/60
-                // console.log('lastStartDay', this.lastStartDay, this.lastEndDay, this.sDay, this.eDay)
             }
         },
         
@@ -175,20 +171,41 @@ export default {
         this.startTime = option.startTime
         this.endTime = option.endTime
         this.activityId = option.activityId
-        this.getAct()
+        // this.getAct()
         // this.startTime = "1663041599"
         // this.endTime = "1663127999"
     },
+    onShow() {
+		this.courseList = []
+		this.getAct()
+	},
+    onPullDownRefresh() {
+		this.pageNum = 1
+		this.getAct()
+	},
+	onReachBottom() {
+		console.log(this.total,'total')
+		console.log(this.courseList.length,'length')
+		if (this.courseList.length < this.total) {
+			this.pageNum++
+			this.getAct()
+		}
+	},
     methods: {
         getAct() {
             this.$http({
                 url: `/app/common/activity/goodsList/${this.activityId}`,
                 method: 'get',
                 noToken: true,
+                data: {
+                    pageNum: this.pageNum,
+					pageSize: this.pageSize,
+                }
             }).then((res) => {
                 if (res.data.code == 200) {
-                    console.log('res', res)
-                    this.courseList = res.data.data || []
+                    // this.courseList = res.data.data || []
+                    this.courseList.push(...res.data.rows)
+					this.total = res.data.total
                 }
             })
         },