Kaynağa Gözat

Merge branch 'xuqiaoying_1.1' into dev

xuqiaoying 3 yıl önce
ebeveyn
işleme
ce4c507ebc

+ 4 - 0
.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"default" : 
      	{
      		"launchtype" : "local"

+ 3 - 1
App.vue

@@ -14,7 +14,9 @@ export default {
     });
   },
   methods: {},
-  onShow: function () {},
+  onShow: function (option) {
+    this.$store.commit('setScene', option.scene || 0)
+  },
   onHide: function () {
     uni.$emit("playPause");
   },

+ 7 - 2
common/request.js

@@ -6,7 +6,8 @@ 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 = 'http://42.192.164.187:19005'    //test
+// 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'    //后端本地
@@ -62,6 +63,9 @@ export const myRequest = (options) => {
 				// 	num++
 				// }
 				// doRequest(options)
+				if (!options.compleLoading) { // 请求的接口有带compleLoading 就不隐藏加载中
+					uni.hideLoading()
+				}
 				if (res.data.code == 401) {
 					if (num <= 2) {
 						if (!uni.getStorageSync('user_account')) {
@@ -91,6 +95,7 @@ export const myRequest = (options) => {
 				resolve(res)
 			},
 			fail: (err) => {
+				uni.hideLoading()
 				uni.showToast({
 					title: "请求接口失败",
 					icon: 'none'
@@ -98,7 +103,7 @@ export const myRequest = (options) => {
 				reject(JSON.stringify(err))
 			},
 			complete: () => {
-				uni.hideLoading()
+				// uni.hideLoading()
 				//		uni.hideToast()
 			}
 		})

+ 1 - 1
components/course/courseSection.vue

@@ -150,7 +150,7 @@ export default {
 		console.log(this.playSectionId,'this.playSectionId')
 		console.log(this.isRebuild)
 		console.log(this.nextMenuItem,'nextMenuItem')
-		console.log(this.menuItem,'this.menuItem')
+		console.log(this.menuItem,'this.menuItem',this.menuItem.liveStartTime, this.nowTime)
 		let moduleId = this.menuItem.moduleId || 0;
 		let chapterId = this.menuItem.chapterId || 0;
 		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;

+ 6 - 6
pages.json

@@ -89,7 +89,7 @@
 					}
 				}
 			}, {
-				"path": "wd/menu",
+				"path": "wd/menu", //没有用到
 				"style": {
 					"navigationBarTitleText": "基本资料",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -99,7 +99,7 @@
 					}
 				}
 			}, {
-				"path": "wd/edu_info",
+				"path": "wd/edu_info", //没有用到
 				"style": {
 					"navigationBarTitleText": "教育信息",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -146,7 +146,7 @@
 				}
 			},
 			{
-				"path": "wd/class",
+				"path": "wd/class", //暂时不用
 				"style": {
 					"navigationBarTitleText": "我的网课",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -214,7 +214,7 @@
 				}
 			},
 			{
-				"path": "exam/index",
+				"path": "exam/index", // 暂时不用
 				"style": {
 					"navigationBarTitleText": "我的考试",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -864,7 +864,7 @@
 				}
 			}
 		},{
-			"path": "mockRecord/mock_record_list",
+			"path": "mockRecord/mock_record_list", // 没有用到
 			"style": {
 				"navigationBarTitleText": "模考记录",
 				"navigationBarBackgroundColor": "#0386FD",
@@ -900,7 +900,7 @@
 				}
 			}
 		},{
-			"path": "liveDetail/list",
+			"path": "liveDetail/list", // 暂时不用
 			"style": {
 				"navigationBarTitleText": "直播课列表",
 				"navigationBarBackgroundColor": "#0386FD",

+ 170 - 5
pages/index/index.vue

@@ -170,7 +170,32 @@
 		</view>
 
 		<!-- <tab-bar v-model="current" :list="tabbarlist" :mid-button="true" :mid-button-size="50" class="tab_items"></tab-bar> -->
-
+		<!-- <view v-if="isLogin" class="official">
+			<u-icon name="close"></u-icon>
+			<official-account @load='bindload'></official-account>
+		</view> -->
+		<!-- v-if="isLogin && (isFollow != 1) && curClose" -->
+		<!-- <view class="officialsss">
+			<text>asdsufd</text>
+			<official-account></official-account>
+		</view> -->
+		<view :style="{'opacity':opacitys}" class="officials">
+			<view class="weixin_official_account">
+				<image class="off_logo" src="/static/index/official.png"></image>
+				<view>
+					<view class="one">关注 “祥粤学校” 公众号</view>
+					<view class="two">学习提醒、 报考通知不会错过</view>
+				</view>
+				<button type="default" class="btn btn-official" >
+					去关注
+					<official-account class="official-account" id="official_account"></official-account>
+				</button>
+				<view class="close_icon">
+					<u-icon name="close" class="icon-close" @click="closeOff"></u-icon>
+				</view>
+			</view>
+		</view>
+		
 	</view>
 </template>
 
@@ -233,11 +258,16 @@ export default {
 			isLogin:false,
 			isOld:false,
 			current: 0,
-            tabbarlist: this.$store.state.tabLists
+            // tabbarlist: this.$store.state.tabLists,
+			showOfficial: false,
+			// opacity: 1,
+			isFollow: null, //是否关注过,不是1就是没关注
+			curClose: true, // 当天时是否关闭过
 		};
 	},
 	onPullDownRefresh() {},
 	async onLoad(option) {
+		this.isLogin = this.$method.isLogin()
 		this.dictObj
 		this.getAdvertising();
 		if(this.$method.isLogin()) {
@@ -268,6 +298,9 @@ export default {
 		})
 	},
 	onShow() {
+		this.getInfo() // 判断有没有关注公众号		
+		this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
+		console.log('this.$store.state.scene', this.$store.state.scene)
 		uni.removeStorageSync('goPath')
 		this.courseList();
 		this.bankList();
@@ -294,14 +327,52 @@ export default {
 		}
 	},
 	onShareAppMessage(res) {
-		var self = this;
 		return {
 			title: '中正',
 			path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
 		};
 	},
+	computed: { 
+		...mapGetters(['dictObj','userInfo']),
+		opacitys() {
+			const value = [1011,1017,1025,1047,1124].includes(this.$store.state.scene) && this.isLogin && (this.isFollow != 1) && this.curClose ? 1 : 0
+			console.log('this.opacity::', value)
+			return value
+		},
+	},
 	methods: {
 		...mapActions(['getUserInfo','appCommonConfig']),
+		getInfo() {
+			// /app/user/getInfo 登录用户信息
+			this.$api.getInfo().then(res => {
+				if(res.data.code == 200){
+					this.$store.state.userInfo = res.data.data
+					this.isFollow = res.data.data.userFollowWx // 不是1就是没关注
+					console.log('有没有关注', this.isFollow, this.isFollow != 1)
+				}
+			})
+		},
+		// 每天最多显示1次;当天学员关闭弹窗后,无需再显示
+		isClickOff() {
+			//当天23:59:59秒 转换成的毫秒数
+			const end = new Date(new Date(new Date().toLocaleDateString()).getTime()+24*60*60*1000-1).getTime()
+			const start = new Date().getTime() //当前时间的毫秒数
+			if(uni.getStorageSync('endTime')){	//首先判断本地有没有存入当天23:59:59秒的毫秒数
+				if(start > uni.getStorageSync('endTime')){ //当前时间毫秒数大于当天23:59:59秒
+					this.curClose = true
+					uni.removeStorageSync('curClose')
+					uni.removeStorageSync('endTime')
+				} else {
+					this.curClose = uni.getStorageSync('curClose') ? false : true
+				}
+			}else{
+				uni.setStorageSync("endTime", end) //存入当天晚上23:59:59秒的毫秒数
+			}
+		},
+		closeOff() {
+			this.curClose = false
+			uni.setStorageSync("curClose", '1')
+		},
 		toFixed(number) {
 			if(number > 0) {
 				return number.toFixed(2)
@@ -637,7 +708,7 @@ export default {
 		}
 	},
 	onReachBottom() {},
-	computed: { ...mapGetters(['dictObj','userInfo']) },
+	
 };
 </script>
 
@@ -711,7 +782,7 @@ page {
 		overflow: hidden;
 		padding:0 16rpx;
 		background: rgba(234, 238, 241, 1);
-		
+		padding-bottom: 100rpx;
 		.notice {
 			background:#fff;
 			border-radius: 16rpx;
@@ -983,6 +1054,9 @@ page {
 			}
 		}
 	}
+	// .botms {
+	// 	padding-bottom: 100rpx;
+	// }
 	
 	.my-list {
 		margin:32rpx 0;
@@ -1177,4 +1251,95 @@ page {
 	font-weight: bold;
 	color: #32467B;
 }
+.officialsss {
+	position: fixed;
+	left: 0;
+	bottom: 100rpx;
+	width: 100%;
+}
+.officials {
+	width:100%;
+	height: 104rpx;
+	position:fixed;
+	bottom: 0;
+	left: 0;
+	z-index: 999;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+.weixin_official_account {
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	display: flex;
+	align-items: center;
+	// justify-content: space-between;
+	width: 718rpx;
+	height: 104rpx;
+	padding: 0 32rpx;
+	margin-left: 16rpx;
+	background: #3A3F54;
+	border-radius: 16rpx;
+	.off_logo {
+		width: 48rpx;
+		height: 48rpx;
+		margin-right: 24rpx;
+	}
+	.one {
+		color: #fff;
+		font-size: 24rpx;
+		font-weight: 500;
+	}
+	.two {
+		color: #BCBEC7;
+		font-size: 20rpx;
+	}
+	.btn {
+		position: relative;
+		top: 0;
+    	left: 35rpx;
+		width: 128rpx;
+		height: 56rpx;
+		line-height: 56rpx;
+		padding: 0;
+		background: linear-gradient(274deg, #408BF6 0%, #40B4F6 100%);
+		border-radius: 156rpx;
+		overflow: hidden;
+		text-align: center;
+		font-size: 24rpx;
+		color: #fff;
+
+		.official-account {
+			position: absolute;
+			z-index: 1000;
+			right: -9px;
+			top: -38px;
+			opacity: 0;
+		}
+	}
+	.close_icon {
+		width: 40rpx;
+		height: 40rpx;
+		background: #FFFFFF;
+		opacity: 0.2;
+		display: flex;
+		align-items: center;
+		position: absolute;
+		top: 0;
+		right: 0;
+		color: #fff;
+		border-radius: 0rpx 16rpx;
+	}
+	.icon-close {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 50rpx;
+		height: 68rpx;
+		font-size: 22rpx;
+		color: #7B8284;
+	}
+}
+
 </style>

+ 49 - 31
pages/learn/index.vue

@@ -564,6 +564,8 @@ export default {
 					}
 					if (res3.code == 200) {
 						this.livingLists = res3.rows || []
+					} else {
+						this.$u.toast(res3.msg)
 					}
 					this.allLoading = false
 				// }
@@ -582,7 +584,6 @@ export default {
 			})
 		},
 		// 看直播
-		// let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+item.liveUrl+'&gradeId='+0+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId)
 		toLiveLook(item) {
 			let moduleId = item.moduleId || 0
 			let chapterId = item.chapterId || 0
@@ -676,8 +677,6 @@ export default {
 				})
 				return
 			}
-			// console.log(this.sysTime, item.learningTimeStart)
-			// console.log(this.sysTime < item.learningTimeStart)
 			if (item.learningStatus == 3 && (this.sysTime < item.learningTimeStart)) {
 				uni.showToast({
 					icon: 'none',
@@ -685,7 +684,10 @@ export default {
 				})
 				return;
 			}
-
+			uni.showLoading({
+				title: '拼命加载中...',
+				mask:true,
+			})
 			var confirmDetail = true;
 			if (item.educationName == '继续教育') { 
 				if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') { 
@@ -701,7 +703,7 @@ export default {
 			if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
 					.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
 					.periodStatus == -1) && item.studyCount > 0) {
-				this.selectClass(item, index)
+				this.selectClass(item, index, 'loading')
 				return
 			}
 
@@ -709,6 +711,7 @@ export default {
 			let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
 
 			if (rebuildStatus == 0) {
+				uni.hideLoading()
 				this.$navTo.togo('/pages2/learn/details', {
 					gradeId: item.gradeId,
 					goodsId: item.goodsId,
@@ -730,15 +733,19 @@ export default {
 							duration: 3000
 						})
 					} else if (res.data.code == 500) { //可以学习
-						// if (item.courseNum == 1) { // 课程数量
-							// /course/courseList查询商品下的课程列表
-							this.$api.courseCourseList({
-								pageNum: 1,
-								pageSize: 1,
-								goodsId: item.goodsId,
-								gradeId: item.gradeId,
-								orderGoodsId: item.orderGoodsId,
-							}).then(res => {
+							this.$http({
+								url: '/course/courseList',
+								method: 'get',
+								data: {
+									pageNum: 1,
+									pageSize: 1,
+									goodsId: item.goodsId,
+									gradeId: item.gradeId,
+									orderGoodsId: item.orderGoodsId,
+								},
+								noLoading: true
+							})
+							.then(res => {
 								if (res.data.code == 200) {
 
 									if(res.data.total > 1) {
@@ -757,9 +764,6 @@ export default {
 								}
 							});
 							return;
-						// }
-						
-						// this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);						
 					}
 				})
 
@@ -770,19 +774,30 @@ export default {
 		 */
 		courseGoodsRebuildStatus(goodsId, gradeId) {
 			return new Promise(resolve => {
-				this.$api.courseGoodsRebuildStatus({
-					goodsId: goodsId,
-					gradeId: gradeId
-				}).then(res => {
+				this.$http({
+					url: '/course/goodsRebuildStatus',
+					method: 'get',
+					data: {
+						goodsId: goodsId,
+						gradeId: gradeId
+					},
+					noLoading: true,
+					compleLoading: true, // 请求成功是否还要继续显示加载中
+				})
+				.then(res => {
 					resolve(res.data.data)
 				})
 			})
 		},
 		userConfirmInfoDetail(){
 			return new Promise(resolve => {
-				this.$api.userConfirmInfoDetail({
-					orderGoodsId:this.activeItem.orderGoodsId,
-				}).then(res => {
+				this.$http({
+					url: '/user/confirm/info/detail',
+					method: 'GET',
+					data: { orderGoodsId:this.activeItem.orderGoodsId },
+					noLoading:true,
+				})
+				.then(res => {
 					if(!res.data.data) {
 						clearInterval(this.confirmTimer);
 						this.confirmCount = 10;
@@ -811,16 +826,20 @@ export default {
 				})
 			})
 		},
-		selectClass(item, index) {
+		selectClass(item, index, load) {
 			this.itemIndex = index;
 			this.selectItem = item;
 			this.selectClassModal = true;
-			this.goodsGradeList(item.goodsId);
+			this.goodsGradeList(item.goodsId, load);
 		},
-		goodsGradeList(id) {
-			this.$api.goodsGradeList({
-				goodsId: id
-			}).then(res => {
+		goodsGradeList(id, load) {
+			this.$http({
+				url: '/grade/grade/list',
+				method: 'get',
+				data: { goodsId: id },
+				noLoading: load ? true : false,
+			})
+			.then(res => {
 				if (res.data.code == 200) {
 					this.gradeList = res.data.rows
 					if (this.gradeList.length == 0) {
@@ -977,7 +996,6 @@ export default {
 		},
 		appBeforeAddress(goodsId,item) {
 			this.$api.appBeforeAddress({
-				// goodsId,
 				orderGoodsId:item.orderGoodsId
 			}).then(res => {
 				if (res.data.code == 200) {

+ 54 - 71
pages2/bank/detail.vue

@@ -112,6 +112,22 @@
 				<view class="btn2" @click="buy">立即购买</view>
 			</view>
 		</view>
+
+		<!-- 已购买过课程的弹窗 -->
+		<u-popup v-model="bugCourseModel" mode="center" border-radius="40">
+			<view class="had_bugCourse">
+				<image src="/pages2/static/hadBug.png" class="share"></image>
+				<view class="tips">
+					<view class="warns">温馨提示</view>
+					<view class="words">您<text>已购买过</text>该商品课程</view>
+					<view class="words">可立即前往学习</view>
+				</view>
+				<view class="tip_botton">
+					<view class="cancel_btn" @click="changeKown()">知道了</view>
+					<view class="confirm_btn" @click="toStudy()">去学习</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -133,7 +149,9 @@ export default {
 			id: '',
 			goodsData: {},
 			bankList: [],
-			goodsExamConfig: []
+			goodsExamConfig: [],
+			bugCourseModel: false, // 弹窗
+			hadBuyCourse: {}, // 已购买课程信息
 		};
 	},
 	filters: {
@@ -149,6 +167,7 @@ export default {
 		this.id = option.id;
 		this.getDetail();
 		this.goodsBankList();
+		this.getIsBuy() // 判断是否已经购买过该课程
 		wx.showShareMenu({
 			withShareTicket: true,
 			menus: ["shareAppMessage", "shareTimeline"]
@@ -164,7 +183,6 @@ export default {
 		}
 	},
 	onShareAppMessage() {
-		console.log('asdsaufga-------')
 		return {
 			title: this.goodsData.goodsName,
 			path: `/pages2/bank/detail?id=` + this.id,
@@ -338,7 +356,39 @@ export default {
 			uni.switchTab({
 			    url: '/pages/shopping/shoppingCart'
 			})
-		}
+		},
+		getIsBuy() {
+			this.$http({
+				url: '/order/buyGoodsNotExpired',
+				method: 'get',
+				data: { goodsId: this.id }
+			}).then((res) => {
+				if (res.data.code == 200) {
+					if (res.data.data) { // 有data返回是已经购买过的课程
+						this.hadBuyCourse = res.data.data
+						this.bugCourseModel = true
+					}
+				}
+			})
+		},
+		changeKown() {
+			this.bugCourseModel = false
+		},
+		toStudy() {
+			let sysTime = this.$method.timest()
+			const { serviceStartTime, serviceEndTime, goodsId, orderGoodsId} = this.hadBuyCourse
+			if (serviceStartTime && serviceEndTime && (sysTime <= serviceStartTime || sysTime >= serviceEndTime)) {
+				uni.showToast({
+					icon: 'none',
+					title: '不在学习服务期,不能进入学习'
+				})
+				return;
+			}
+			uni.navigateTo({
+				url:'/pages2/bank/question_detail?id='+goodsId+'&orderGoodsId='+orderGoodsId
+			})
+			this.bugCourseModel = false
+		},
 	}
 };
 </script>
@@ -348,16 +398,13 @@ page {
 }
 </style>
 <style lang="scss" scope>
+@import '../../pages3/course/index.scss';
 .contents {
 	width: 100%;
 	height: 100%;
 	background-color: #ffffff;
 	margin-top: 16rpx;
 	overflow: hidden;
-	// border-radius: 24rpx 24rpx 0rpx 0rpx;
-	// position: relative;
-	// top: -27rpx;
-	// left: 0;
 	
 	// tab
 	.tabs {
@@ -390,21 +437,12 @@ page {
 	}
 }
 .cou_title {
-	// height: 210rpx;
 	padding: 24rpx 32rpx 40rpx 32rpx;
 	display: flex;
 	flex-direction: column;
 	justify-content: space-around;
 }
 .prices {
-	// .price_sym {
-	// 	font-size: 20rpx;
-	// 	color: #333333;
-	// 	position: relative;
-	// 	top: -23rpx;
-	// 	left: 0;
-	// 	margin-right: 10rpx;
-	// }
 	.price_word {
 		font-size: 40rpx;
 		font-weight: 800;
@@ -556,61 +594,6 @@ page {
 	margin-right: 11rpx;
 	font-size: 24rpx;
 }
-.bottomBox {
-	position: fixed;
-	bottom: 0;
-	width: 100%;
-	left: 0;
-	height: 98rpx;
-	background-color: #ffffff;
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-	padding: 0 24rpx;
-	box-shadow: 0px -5px 20px 1px rgba(1,99,235,0.1000);
-	.icons {
-		display: flex;
-		.share_w {
-			font-size: 20rpx;
-			color: #666666;
-			margin-top: 6rpx;
-		}
-		.icon_item {
-			text-align: center;
-		}
-		.ones {
-			margin-left: 32rpx;
-			margin-right: 60rpx;
-			position: relative;
-			top: 0;
-			left: 0;
-			/deep/ button::after{
-				border: none; 
-			}
-			.bt_share {
-				width: 38rpx;
-				height: 38rpx;
-				position: absolute;
-				top: 3rpx;
-				left: 0;
-				z-index: 100;
-				opacity: 0;
-			}
-		}
-	}
-	.share {
-		width: 38rpx;
-		height: 38rpx;
-		position: relative;
-		top: 3rpx;
-		z-index: 99;
-		margin-bottom: 4rpx;
-	}
-	.shopcar {
-		width: 40rpx;
-		height: 40rpx;
-	}
-}
 .blackFont {
 	color: #333333;
 	margin: 0 4rpx;

+ 10 - 2
pages2/bank/question_detail.vue

@@ -390,8 +390,12 @@ export default {
 						goodsId: this.id
 					})
 					.then(res => {
+						let _data = res.data.data
+						if (_data && _data.length) {
+							_data.sort((a, b) => a.sort - b.sort)
+						}
 						this.$set(this.bankList[index1].list[index2], 'showList', true);
-						this.$set(this.bankList[index1].list[index2], 'list', res.data.data);
+						this.$set(this.bankList[index1].list[index2], 'list', _data);
 					});
 			} else if (type == 2) {
 				if (this.bankList[index1].list) {
@@ -407,8 +411,12 @@ export default {
 						goodsId: this.id
 					})
 					.then(res => {
+						let _data = res.data.data
+						if (_data && _data.length) {
+							_data.sort((a, b) => a.sort - b.sort)
+						}
 						this.$set(this.bankList[index1], 'showList', true);
-						this.$set(this.bankList[index1], 'list', res.data.data);
+						this.$set(this.bankList[index1], 'list', _data);
 					});
 			}
 		}

+ 17 - 2
pages2/msg/detail.vue

@@ -2,7 +2,7 @@
 	<view>
 		<nav-bar title="消息详情"></nav-bar>
 		<view class="item">
-			<view class="title">{{ listData.systemStatus === 2 ? listData.informVo.informName : listData.systemStatus === 1 ? listData.remind : '' }}</view>
+			<view class="title">{{ getTitleName()  }}</view>
 			<view class="time">{{ $method.timestampToTime(listData.sendTime, false) }}</view>
 			<view v-if="listData.systemStatus === 2" class="content" v-html="listData.informVo.affiche" style="width: 100%;"></view>
 			<view v-if="listData.systemStatus === 1" class="content" style="width: 100%;">{{ listData.text }}</view>
@@ -70,6 +70,14 @@ export default {
 		};
 	},
 	methods: {
+		getTitleName() {
+			// 28-已开通商品课程2天后学员未上课,29-已开通商品课程5天后学员未上课,31-近3天学员没有学习,32-近5天学员没有学习
+			if ([28,29,31,32].includes(+this.listData.remindId)) { // 要先判断督学消息的显示
+				return this.listData.remind
+			} else {
+				return this.listData.systemStatus === 2 ? this.listData.informVo.informName : this.listData.systemStatus === 1 ? this.listData.remind : ''
+			}
+		},
 		/**
 		 * 获取系统当前时间
 		 */
@@ -93,7 +101,10 @@ export default {
 				case 10:
 				case 12:
 				case 18:
-					
+				case 28:
+				case 29:
+				case 31:
+				case 32:
 					//课程
 					if(item.goodsType == 1) {
 						this.$api.orderInfo({
@@ -456,6 +467,10 @@ export default {
 				case 21:
 				case 22:
 				case 23:
+				case 28:
+				case 29:
+				case 31:
+				case 32:
 					arsty = '立刻学习';
 					break;
 				case 2:

+ 30 - 6
pages2/msg/index.vue

@@ -4,12 +4,14 @@
 		<view v-if="!listData.length"><u-empty text="消息列表为空" mode="message"></u-empty></view>
 		<view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;">
 			<navigator hover-class="none" :url="`/pages2/msg/detail?id=${item.id}&orderGoodsId=${item.orderGoodsId}&goodsId=${item.goodsId}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
-				<view style="display: flex;justify-content: space-between;align-items: center;height: 60rpx;">
-					<view style="color: #333333;font-size: 30rpx;font-weight: bold;display: flex;align-items: center;">
+				<view class="headers">
+					<view class="header_left">
 						<image :src="item.systemStatus === 1 ? img1 : img2" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"></image>
-						{{item.systemStatus === 1 ? '系统通知' : '教务通知'}}
+						<text class="msgTitle">
+							{{ [28, 29, 30, 31,32].includes(+item.remindId) ? item.remind : (item.systemStatus === 1 ? '系统通知' : '教务通知')}}
+						</text>
 					</view>
-					<view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.sendTime, false) }}</view>
+					<view class="header_right">{{ $method.timestampToTime(item.sendTime, false) }}</view>
 				</view>
 				<u-line color="#D6D6DB" />
 				<view style="display: flex;justify-content: space-between;padding: 25rpx;color: #666666;">
@@ -78,7 +80,6 @@ export default {
 		// this.getInfo();
 	},
 	onShareAppMessage(res) {
-		var self = this;
 		return {
 			title: '中正',
 			path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
@@ -122,7 +123,7 @@ page {
 	background: #eaeef1;
 }
 </style>
-<style scoped>
+<style lang="scss" scoped>
 .btn2 {
 	width: 144rpx;
 	height: 48rpx;
@@ -171,4 +172,27 @@ page {
 	align-items: center;
 	padding: 0 30rpx;
 }
+.headers {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	height: 60rpx;
+	.header_left {
+		color: #333333;
+		font-size: 30rpx;
+		font-weight: bold;
+		display: flex;
+		align-items: center;
+	}
+	.header_right {
+		color: #999999;
+		font-size: 24rpx;
+	}
+}
+.msgTitle {
+	width: 420rpx;
+	overflow: hidden;
+	text-overflow:ellipsis; 
+	white-space: nowrap;
+}
 </style>

+ 22 - 12
pages2/order/index.vue

@@ -4,7 +4,7 @@
 		<view style="width: 100%;text-align: center;position: fixed;height: 96rpx;z-index: 999;" >
 			<u-tabs :list="list" sticky :current="current" @change="change" active-color="#007AFF" :offset="[-1,0]"></u-tabs>
 		</view>
-		<view style="padding: 96rpx 8rpx 96rpx;">
+		<view style="padding: 96rpx 8rpx 130rpx;">
 			<view v-if="!order.length" class="noData">您暂无相关订单哦~</view>
 			<template v-else>
 				
@@ -37,7 +37,7 @@
 									<image class="goods-img" :src="$method.splitImgHost(items.coverUrl)"></image>
 									<view class="goods-text">
 										<view class="goods-name">{{ items.goodsName }}</view>
-										<view class="goods-price">¥ {{ items.goodsRealPrice }}</view>
+										<view v-if="item.orderFrom !== 6" class="goods-price">¥ {{ items.goodsRealPrice }}</view>
 									</view>
 								</view>
 								<view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
@@ -77,7 +77,10 @@
 			
 
 			<template v-if="current == 1 && order.length">
-				<view class="apply-invoice" @click="goInvoice">发票申请</view>
+				<view class="apply_btn">
+					<view class="apply-invoice" @click="goInvoice">发票申请</view>
+				</view>
+				
 			</template>
 			
 		</view>
@@ -401,6 +404,7 @@ export default {
 						this.pageNum3 = res.data.total;
 					}
 					this.order = res.data.rows;
+					console.log('订单列表this.order', this.order)
 				}
 			});
 		},
@@ -553,22 +557,28 @@ page {
 	color: #999999;
 	margin: 160rpx 0;
 }
-
-.apply-invoice {
+.apply_btn {
+	width: 100%;
+	height: 124rpx;
+	background: #FFFFFF;
+	box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.1000);
 	z-index: 100;
 	position:fixed;
 	left:0;
 	right:0;
-	bottom:40rpx;
+	bottom: 0rpx;
+}
+.apply-invoice {
 	margin:0 auto;
-	width: 526rpx;
-	height: 80rpx;
+	width: 686rpx;
+	height: 84rpx;
+	line-height: 84rpx;
 	text-align: center;
-	line-height: 80rpx;
+	font-size: 32rpx;
 	color:#fff;
-	background: #007AFF;
-	box-shadow: 0rpx 8rpx 7rpx 1rpx rgba(0, 122, 255, 0.1);
-	border-radius: 40rpx;
+	background: #0080FF;
+	margin-top: 20rpx;
+	border-radius: 120rpx;
 }
 
 

BIN
pages2/static/hadBug.png


BIN
pages2/static/login_bg.jpg


BIN
pages2/static/questionBank.png


BIN
pages2/static/questionPresent.png


+ 21 - 1
pages2/wd/course.vue

@@ -69,13 +69,21 @@ export default {
       },
       businessData: {},
       itemIndex: "",
+      informId: '', //消息id,从公众号消息模板进来的才有
     };
   },
   onLoad(option) {
     this.goodsId = Number(option.id);
     this.gradeId = Number(option.gid);
     this.orderGoodsId = Number(option.orderGoodsId);
-    // uni.setStorageSync('courseGoodsId', this.goodsId);
+    // 公众号模板消息的数据埋点
+    if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
+      this.informId = option.informId
+      this.clickOfficial()
+    }
+    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
+      return;
+    }
     this.courseCourseList();
     this.$store.getters.dictObj;
   },
@@ -91,6 +99,18 @@ export default {
     }
   },
   methods: {
+    // 新增微信公众号模板消息点击数据
+    clickOfficial() {
+      this.$http({
+        url: '/data/click',
+        method: 'post',
+        data: { informId: this.informId }
+      }).then((res) => {
+        if (res.data.code == 200) {
+          console.log('埋点')
+        }
+      })
+    },
     /**
      * 返回刷新之前进入的课程数据
      */

+ 4 - 0
pages2/wd/info.vue

@@ -229,6 +229,7 @@ export default {
 						},
 						success: result => {
 							// if (result.statusCode === 200) {
+								this.$u.toast('上传成功')
 								self.avatarOssKey = ossToken.dir;
 								resolve();
 							// } else {
@@ -284,6 +285,9 @@ export default {
 							const waitUpload = await self.uploadFile(self.avatarUrl, 0);
 							resolve(waitUpload)
 						}
+					},
+					fail: (err) => {
+						this.$u.toast('图片上传失败')
 					}
 				});
 			});

+ 150 - 73
pages3/course/detail.vue

@@ -114,6 +114,22 @@
 				<view class="btn2" @click="buy">立即购买 </view>
 			</view>
 		</view>
+
+		<!-- 已购买过课程的弹窗 -->
+		<u-popup v-model="bugCourseModel" mode="center" border-radius="40">
+			<view class="had_bugCourse">
+				<image src="/pages3/static/imgs/hadBug.png" class="share"></image>
+				<view class="tips">
+					<view class="warns">温馨提示</view>
+					<view class="words">您<text>已购买过</text>该商品课程</view>
+					<view class="words">可立即前往学习</view>
+				</view>
+				<view class="tip_botton">
+					<view class="cancel_btn" @click="changeKown()">知道了</view>
+					<view class="confirm_btn" @click="toStudy()">去学习</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -148,7 +164,9 @@ export default {
 			isFirstEnter:true, //是否首次进入
 			timer:null,
 			businessData:{},
-			startTime:0
+			startTime:0,
+			bugCourseModel: false, // 弹窗
+			hadBuyCourse: {}, // 已购买课程信息
 		};
 	},
 	computed: { ...mapGetters(['userInfo','goodsAuditionConfigIdList','playSectionId','hideBuyState']) },
@@ -157,6 +175,7 @@ export default {
 		this.getDetail()
 		this.goodsCourseList()
 		this.appCommonGoodsCourseModuleFreeExamList();
+		this.getIsBuy() // 判断是否已经购买过该课程
 		wx.showShareMenu({
 			withShareTicket: true,
 			menus: ["shareAppMessage", "shareTimeline"]
@@ -436,7 +455,134 @@ export default {
 			uni.switchTab({
 			    url: '/pages/shopping/shoppingCart'
 			})
-		}
+		},
+		getIsBuy() {
+			this.$http({
+				url: '/order/buyGoodsNotExpired',
+				method: 'get',
+				data: { goodsId: this.id }
+			}).then((res) => {
+				if (res.data.code == 200) {
+					if (res.data.data) { // 有data返回是已经购买过的课程
+						this.hadBuyCourse = res.data.data
+						this.bugCourseModel = true
+					}
+				}
+			})
+		},
+		changeKown() {
+			this.bugCourseModel = false
+		},
+		async toStudy() {
+			let item = this.hadBuyCourse
+			if (item.goodsType == 6) { // 进入直播课
+				this.toLive(item)
+				return
+			}
+			// /course/goodsRebuildStatus查询用户商品重修状态
+			let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId, item.gradeId)
+
+			if (rebuildStatus == 0) {
+				this.$navTo.togo('/pages2/learn/details', {
+					gradeId: item.gradeId,
+					goodsId: item.goodsId,
+					orderGoodsId: item.orderGoodsId,
+				});
+				return;
+			}
+
+			// /lock/lockStatus
+			this.$api.lockLockStatus({
+				action: 'jxjy',
+				uuid:this.$method.getUuid()
+			}).then(res => {
+				if (res.data.code == 200) { //有其他端在操作,不能学习
+					uni.showToast({
+						icon: 'none',
+						title: res.data.msg,
+						mask: true,
+						duration: 3000
+					})
+				} else if (res.data.code == 500) { //可以学习
+						this.$http({
+							url: '/course/courseList',
+							method: 'get',
+							data: {
+								pageNum: 1,
+								pageSize: 1,
+								goodsId: item.goodsId,
+								gradeId: item.gradeId,
+								orderGoodsId: item.orderGoodsId,
+							},
+						})
+						.then(res => {
+							if (res.data.code == 200) {
+								if(res.data.total > 1) {
+									this.$navTo.togo(`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}&orderGoodsId=${item.orderGoodsId}`);
+								} else if(res.data.total == 1) {
+									uni.navigateTo({
+										url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+									})
+								} else {
+									uni.showToast({
+										icon:'none',
+										title:'暂无可观看的视频课程'
+									})
+								}
+
+							}
+						})		
+				}
+			})
+		},
+		toLive(item) {
+			this.$api.courseCourseList({
+				pageNum: 1,
+				pageSize: 1,
+				goodsId: item.goodsId,
+				gradeId: 0,
+				orderGoodsId: item.orderGoodsId,
+			}).then(res => {
+				if (res.data.code == 200) {
+					if(res.data.total > 1) {
+						uni.navigateTo({
+							url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
+						})
+					} else if(res.data.total == 1) {
+						uni.navigateTo({
+							url:'/pages3/live/detail?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0&courseId='+ res.data.rows[0].courseId
+						})
+					} else {
+						uni.showToast({
+							icon:'none',
+							title:'暂无可观看的直播课程'
+						})
+					}
+				
+				}
+			})
+		},
+		/**
+		 * @param {Object} goodsId 商品id
+		 * 查询商品重修状态
+		 */
+		courseGoodsRebuildStatus(goodsId, gradeId) {
+			return new Promise(resolve => {
+				this.$http({
+					url: '/course/goodsRebuildStatus',
+					method: 'get',
+					data: {
+						goodsId: goodsId,
+						gradeId: gradeId
+					},
+					// noLoading: true,
+					// compleLoading: true, // 请求成功是否还要继续显示加载中
+				})
+				.then(res => {
+					resolve(res.data.data)
+				})
+			})
+		},
 	}
 };
 </script>
@@ -446,6 +592,7 @@ export default {
 	}
 </style>
 <style lang="scss" scope>
+@import './index.scss';
 	.video_t2 {
 		font-size: 24rpx;
 		font-family: PingFang SC;
@@ -492,27 +639,14 @@ export default {
 		background-color: #ffffff;
 		margin-top: 16rpx;
 		overflow: hidden;
-		// border-radius: 24rpx 24rpx 0rpx 0rpx;
-		// position: relative;
-		// top: -27rpx;
-		// left: 0;
 	}
 	.cou_title {
-		// height: 210rpx;
 		padding: 24rpx 32rpx 40rpx 32rpx;
 		display: flex;
 		flex-direction: column;
 		justify-content: space-around;
 	}
 	.prices {
-		// .price_sym {
-		// 	font-size: 20rpx;
-		// 	color: #333333;
-		// 	position: relative;
-		// 	top: -23rpx;
-		// 	left: 0;
-		// 	margin-right: 10rpx;
-		// }
 		.price_word {
 			font-size: 40rpx;
 			font-weight: 800;
@@ -568,9 +702,6 @@ export default {
 	.icon_up{
 		width: 32rpx;
 		height: 32rpx;
-	}
-	.contentBox{
-		
 	}
 	.courseItemBox{
 		background: #FFFFFF;
@@ -611,61 +742,7 @@ export default {
 		margin-right: 11rpx;
 		font-size: 24rpx;
 	}
-	.bottomBox{
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		left: 0;
-		height: 132rpx ;
-		background-color: #FFFFFF;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 0 24rpx;
-		box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.1000);
-		.icons {
-			display: flex;
-			.share_w {
-				font-size: 24rpx;
-				color: #333;
-				margin-top: 6rpx;
-			}
-			.icon_item {
-				text-align: center;
-			}
-			.ones {
-				margin-left: 32rpx;
-				margin-right: 60rpx;
-				position: relative;
-				top: 0;
-				left: 0;
-				/deep/ button::after{
-					border: none; 
-				}
-				.bt_share {
-					width: 38rpx;
-					height: 38rpx;
-					position: absolute;
-					top: 3rpx;
-					left: 0;
-					z-index: 100;
-					opacity: 0;
-				}
-			}
-		}
-		.share {
-			width: 38rpx;
-			height: 38rpx;
-			position: relative;
-			top: 3rpx;
-			z-index: 99;
-			margin-bottom: 4rpx;
-		}
-		.shopcar {
-			width: 40rpx;
-			height: 40rpx;
-		}
-	}
+	
 	.blackFont{
 		margin: 0 4rpx;
 	}

+ 124 - 0
pages3/course/index.scss

@@ -0,0 +1,124 @@
+// 和pages2/bank/detail 页面公用的样式
+// 底部按钮
+.bottomBox{
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    left: 0;
+    height: 132rpx ;
+    background-color: #FFFFFF;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 24rpx;
+    box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.1000);
+    .icons {
+        display: flex;
+        .share_w {
+            font-size: 24rpx;
+            color: #333;
+            margin-top: 6rpx;
+        }
+        .icon_item {
+            text-align: center;
+        }
+        .ones {
+            margin-left: 32rpx;
+            margin-right: 60rpx;
+            position: relative;
+            top: 0;
+            left: 0;
+            /deep/ button::after{
+                border: none; 
+            }
+            .bt_share {
+                width: 38rpx;
+                height: 38rpx;
+                position: absolute;
+                top: 3rpx;
+                left: 0;
+                z-index: 100;
+                opacity: 0;
+            }
+        }
+    }
+    .share {
+        width: 38rpx;
+        height: 38rpx;
+        position: relative;
+        top: 3rpx;
+        z-index: 99;
+        margin-bottom: 4rpx;
+    }
+    .shopcar {
+        width: 40rpx;
+        height: 40rpx;
+    }
+}
+// 弹窗
+.had_bugCourse {
+	width: 600rpx;
+	height: 424rpx;
+	position: relative;
+	top: 0;
+	left: 0;
+	.share {
+		width: 100%;
+		height: 288rpx;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 99;
+	}
+	.tips {
+		width: 100%;
+		height: 288rpx;
+		text-align: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 100;
+		.warns {
+			margin: 56rpx 0rpx 24rpx;
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #222222;
+		}
+		.words {
+			font-size: 32rpx;
+			font-weight: 400;
+			color: #222222;
+			margin-top: 6rpx;
+			>text {
+				color: #3577E8;
+			}
+		}
+	}
+	.tip_botton {
+		width: 100%;
+		height: 136rpx;
+		padding: 0rpx 48rpx;
+		display: flex;
+		justify-content: space-between;
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		.confirm_btn, .cancel_btn {
+			width: 236rpx;
+			height: 88rpx;
+			line-height: 88rpx;
+			text-align: center;
+			border-radius: 240rpx;
+			font-size: 32rpx;
+			font-weight: 500;
+		}
+		.confirm_btn {
+			color: #fff;
+			background-color: #3577E8;
+		}
+		.cancel_btn {
+			color: #222222;
+			background-color: #F0F0F0;
+		}
+	}
+}

+ 112 - 30
pages3/live/detail.vue

@@ -1,9 +1,16 @@
 <template>
   <view class="polyv_detail">
-    <nav-bar
+    <uni-nav-bar
+      left-icon="back"
+      :statusBar="true"
+      fixed='true'
+      :title="detail.courseName || '课程详情'"
+      @clickLeft="clickLeft"
+    ></uni-nav-bar>
+    <!-- <nav-bar
       :title="detail.courseName || '课程详情'"
       v-show="navShow"
-    ></nav-bar>
+    ></nav-bar> -->
     <view id="top">
       <view class="video_box" v-if="!startStatus">
         <image
@@ -174,7 +181,7 @@
           <view v-if="noteList.length == 0" style="text-align: center"
             >暂无笔记</view
           >
-          <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0">
+          <!-- <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0">
             <view style="width: 10%"
               ><image
                 src="/static/icon/note3.png"
@@ -203,7 +210,7 @@
               @click="postNote"
               >提交</view
             >
-          </view>
+          </view> -->
           <view v-for="(item, index) in noteList" :key="index">
             <view class="dateBox">{{
               $method.timestampToTime(item.dateNote)
@@ -248,7 +255,7 @@
         </view>
         <!--答疑 -->
         <view v-show="current == 2" class="Answering">
-          <view class="inputBottom">
+          <!-- <view class="inputBottom">
             <view class="flex_auto">
               <u-input
                 height="60"
@@ -262,7 +269,7 @@
               />
             </view>
             <view class="btn" @click="postContent">提交</view>
-          </view>
+          </view> -->
           <view
             v-for="(item, index) in answerList"
             :key="index"
@@ -362,6 +369,63 @@
 				  >
 				</view>
       </scroll-view>
+
+      <!-- 底部固定按钮 -->
+        <!-- 笔记的输入框 -->
+        <template v-if="current == 1">
+          <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0" :style="{ bottom: bottomHeight + 'px' }">
+            <view style="width: 10%"
+              ><image
+                src="/static/icon/note3.png"
+                style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
+              ></image
+            ></view>
+            <view style="width: 73%; height: 100%; padding: 10rpx 0">
+              <input
+                v-model="noteValue"
+                class="input"
+                height="60"
+                fixed="true"
+                placeholder="您可以在这里输入笔记内容"
+                type="text"
+                :custom-style="inputStyle"
+                :adjust-position="false"
+                @focus="focusNote"
+                @blur="blurNote"
+              />
+            </view>
+            <view
+              style="
+                color: #007aff;
+                font-size: 30rpx;
+                font-weight: bold;
+                width: 15%;
+                text-align: center;
+              "
+              @click="postNote"
+              >提交</view
+            >
+          </view>
+        </template>
+        <!-- 答疑 -->
+        <view v-if="current == 2" class="inputBottom" :style="{ bottom: bottomHeight + 'px' }">
+          <view class="flex_auto">
+            <input
+              v-model="ctxValue"
+              height="60"
+              fixed="true"
+              :focus="isFocus"
+              :placeholder="placeholder"
+              type="text"
+              :custom-style="inputStyle"
+              :adjust-position="false"
+              class="input"
+              @focus="focusNote"
+              @blur="blur"
+            />
+          </view>
+          <view class="btn" @click="postContent">提交</view>
+        </view>
     </view>
     <!-- 播放前拍照end -->
     <u-popup
@@ -606,7 +670,8 @@ export default {
 			isFocus:false,
 			clearTimer:null,
 			historyChatMsgList:[],
-			livingItem:''
+			livingItem:'',
+      bottomHeight: 0,
     };
   },
   computed: {
@@ -673,7 +738,7 @@ export default {
     this.$store.commit("setPlayChannelId", { playChannelId: 0 });
     this.$store.commit("setPlayVID", { playVID: null });
     this.closePlv();
-    console.log("onUnload");
+    // console.log("onUnload");
     //移除所有的事件监听器
     uni.$off();
     clearInterval(this.answerTimer);
@@ -681,14 +746,14 @@ export default {
       clearInterval(this.timer);
     }
     // console.log(this.lockTimer, "this.lockTimer");
-    // if (this.lockTimer) {
-    //   clearInterval(this.lockTimer);
-    //   this.$api
-    //     .lockDelLock({
-    //       action: "jxjy",
-    //     })
-    //     .then((res) => {});
-    // }
+    if (this.lockTimer) {
+      clearInterval(this.lockTimer);
+      this.$api
+        .lockDelLock({
+          action: "jxjy",
+        })
+        .then((res) => {});
+    }
     // websocket.sendMsg("delAction");
   },
   mounted() {
@@ -742,6 +807,9 @@ export default {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
+    clickLeft() {
+      uni.navigateBack()
+    },
 		/**
 		 * 获取上次观看的直播
 		 */
@@ -1393,8 +1461,16 @@ export default {
       this.placeholder = "您可以在这里输入答疑内容";
       this.ctxValue = "";
       this.assignUserId = 0;
+    },
+    focusNote(event) {
+      console.log('event', event.detail.height)
+      this.bottomHeight = event.detail.height
+    },
+    blurNote() {
+      this.bottomHeight = 0
     },
 		blur() {
+      this.bottomHeight = 0
 			this.clearTimer = setTimeout(() => {
 				this.ctxValue = ""
 				this.isFocus = false;
@@ -1536,17 +1612,18 @@ export default {
               success_action_status: 200,
             },
             success: (result) => {
-              if (result.statusCode === 200) {
+              // if (result.statusCode === 200) {
+                this.$u.toast('上传成功')
                 self.ossAvatarUrl = ossToken.dir;
                 resolve();
-              } else {
-                uni.showToast({
-                  title: "上传失败",
-                  icon: "none",
-                });
-                this.openPhoto();
-                return;
-              }
+              // } else {
+              //   uni.showToast({
+              //     title: "上传失败",
+              //     icon: "none",
+              //   });
+              //   this.openPhoto();
+              //   return;
+              // }
             },
             fail: (error) => {
               uni.showToast({
@@ -1602,6 +1679,9 @@ export default {
               resolve(waitUpload);
             }
           },
+          fail: (err) => {
+						this.$u.toast('图片上传失败')
+					}
         });
       });
     },
@@ -1834,7 +1914,7 @@ export default {
      * 进入全屏
      */
     fullscreenchange(event) {
-      console.log(event);
+      console.log('进入全屏',event);
       if (event.detail.direction == "vertical") {
         this.navShow = true;
       } else if (event.detail.direction == "horizontal") {
@@ -2244,10 +2324,6 @@ page {
   .flex_auto {
     flex: 1;
     margin-left: 10%;
-
-    .input {
-      height: 60rpx;
-    }
   }
 
   .btn {
@@ -2257,6 +2333,12 @@ page {
     width: 15%;
     text-align: center;
   }
+  .input {
+    background: rgba(244, 244, 244, 0.98);
+    height: 60rpx;
+    border-radius: 24rpx;
+    margin-top: 12rpx;
+  }
 }
 .noteBox {
   width: 100%;

+ 106 - 28
pages3/polyv/detail.vue

@@ -1,10 +1,16 @@
 <template>
   <view class="polyv_detail">
-    <nav-bar
+    <!-- <nav-bar
       :title="detail.courseName || '课程详情'"
       v-show="navShow"
-    ></nav-bar>
-    
+    ></nav-bar> -->
+    <uni-nav-bar
+      left-icon="back"
+      :statusBar="true"
+      fixed='true'
+      :title="detail.courseName || '课程详情'"
+      @clickLeft="clickLeft"
+    ></uni-nav-bar>
     <view id="top">
       <view class="video_box" v-if="!startStatus">
         <image
@@ -46,7 +52,6 @@
             :startTime="startTime"
             :enableAutoRotation="enableAutoRotation"
 						@loadedmetadata="loadedmetadata"
-            @controlstoggle="controlstoggle"
           ></polyv-player>
           <cover-view
             class="video-toast__close"
@@ -188,7 +193,7 @@
           <view v-if="noteList.length == 0" style="text-align: center"
             >暂无笔记</view
           >
-          <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0">
+          <!-- <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0">
             <view style="width: 10%"
               ><image
                 src="/static/icon/note3.png"
@@ -217,7 +222,7 @@
               @click="postNote"
               >提交</view
             >
-          </view>
+          </view> -->
           <view v-for="(item, index) in noteList" :key="index">
             <view class="dateBox">{{
               $method.timestampToTime(item.dateNote)
@@ -262,7 +267,7 @@
         </view>
         <!--答疑 -->
         <view v-show="current == 3" class="Answering">
-          <view class="inputBottom">
+          <!-- <view class="inputBottom">
             <view class="flex_auto">
               <u-input
                 height="60"
@@ -276,7 +281,7 @@
               />
             </view>
             <view class="btn" @click="postContent">提交</view>
-          </view>
+          </view> -->
           <view
             v-for="(item, index) in answerList"
             :key="index"
@@ -386,6 +391,64 @@
           </view>
         </view>
       </scroll-view>
+
+      <!-- 底部固定按钮 -->
+      <!-- 笔记的输入框 -->
+      <template v-if="current == 2">
+        <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0" :style="{ bottom: bottomHeight + 'px' }">
+            <view style="width: 10%"
+              ><image
+                src="/static/icon/note3.png"
+                style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
+              ></image
+            ></view>
+            <view style="width: 73%; height: 100%; padding: 10rpx 0">
+              <input
+                v-model="noteValue"
+                height="60"
+                fixed="true"
+                placeholder="您可以在这里输入笔记内容"
+                type="text"
+                :custom-style="inputStyle"
+                :adjust-position="false"
+                class="input"
+                @focus="focusNote"
+                @blur="blurNote"
+              />
+            </view>
+            <view
+              style="
+                color: #007aff;
+                font-size: 30rpx;
+                font-weight: bold;
+                width: 15%;
+                text-align: center;
+              "
+              @click="postNote"
+              >提交</view
+            >
+          </view>
+      </template>
+      <!-- 答疑的输入框 -->
+      <view v-if="current == 3" class="inputBottom" :style="{ bottom: bottomHeight + 'px' }">
+        <view class="flex_auto">
+          <input
+            v-model="ctxValue"
+            height="60"
+            fixed="true"
+            :focus="isFocus"
+            :placeholder="placeholder"
+            type="text"
+            :custom-style="inputStyle"
+            :adjust-position="false"
+            class="input"
+            @focus="focusNote"
+            @blur="blur"
+          />
+        </view>
+        <view class="btn" @click="postContent">提交</view>
+      </view>
+
     </view>
     <!-- 播放前拍照end -->
     <u-popup
@@ -632,8 +695,9 @@ export default {
 			option:null,
 			isOther:'',
       downLoading: false, //下载讲义加载
-      showMulu: false, //显示和隐藏目录
+      // showMulu: false, //显示和隐藏目录
       muluStyle: false, //显示和隐藏目录样式
+      bottomHeight: 0,
     };
   },
   computed: {
@@ -803,6 +867,9 @@ export default {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
+    clickLeft() {
+      uni.navigateBack()
+    },
 		markCancel() {
 			uni.navigateBack({
 				delta:1
@@ -1794,8 +1861,16 @@ export default {
       this.placeholder = "您可以在这里输入答疑内容";
       this.ctxValue = "";
       this.assignUserId = 0;
+    },
+    focusNote(event) {
+      console.log('event', event.detail.height)
+      this.bottomHeight = event.detail.height
+    },
+    blurNote() {
+      this.bottomHeight = 0
     },
 		blur() {
+      this.bottomHeight = 0
 			this.clearTimer = setTimeout(() => {
 				this.ctxValue = ""
 				this.isFocus = false;
@@ -1937,17 +2012,18 @@ export default {
               success_action_status: 200,
             },
             success: (result) => {
-              if (result.statusCode === 200) {
+              // if (result.statusCode === 200) {
+                this.$u.toast('上传成功')
                 self.ossAvatarUrl = ossToken.dir;
                 resolve();
-              } else {
-                uni.showToast({
-                  title: "上传失败",
-                  icon: "none",
-                });
-                this.openPhoto();
-                return;
-              }
+              // } else {
+              //   uni.showToast({
+              //     title: "上传失败",
+              //     icon: "none",
+              //   });
+              //   this.openPhoto();
+              //   return;
+              // }
             },
             fail: (error) => {
               uni.showToast({
@@ -2003,6 +2079,9 @@ export default {
               resolve(waitUpload);
             }
           },
+          fail: (err) => {
+						this.$u.toast('图片上传失败')
+					}
         });
       });
     },
@@ -2238,16 +2317,9 @@ export default {
       console.log('进入全屏',event);
       if (event.detail.direction == "vertical") {
         this.navShow = true;
-        this.showMulu = false
       } else if (event.detail.direction == "horizontal") {
         this.navShow = false;
-        this.showMulu = true
       }
-      console.log('quanping::', this.showMulu)
-    },
-    controlstoggle(event) {
-      console.log('控制台切换', event)
-      this.showMulu = event.detail.show
     },
     getGoodsDetail() {
       let self = this;
@@ -2741,9 +2813,9 @@ export default {
     flex: 1;
     margin-left: 10%;
 
-    .input {
-      height: 60rpx;
-    }
+    // .input {
+    //   height: 60rpx;
+    // }
   }
 
   .btn {
@@ -2753,6 +2825,12 @@ export default {
     width: 15%;
     text-align: center;
   }
+  .input {
+    background: rgba(244, 244, 244, 0.98);
+    height: 60rpx;
+    border-radius: 24rpx;
+    margin-top: 12rpx;
+  }
 }
 .noteBox {
   width: 100%;

BIN
pages3/static/imgs/hadBug.png


+ 21 - 1
pages5/liveDetail/course.vue

@@ -65,13 +65,21 @@ export default {
       },
       businessData: {},
       itemIndex: "",
+      informId: '', //消息id,从公众号消息模板进来的才有
     };
   },
   onLoad(option) {
     this.goodsId = Number(option.goodsId);
     this.gradeId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId);
-    // uni.setStorageSync('courseGoodsId', this.goodsId);
+    // 公众号模板消息的数据埋点
+    if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
+      this.informId = option.informId
+      this.clickOfficial()
+    }
+    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
+      return;
+    }
     this.courseCourseList();
     this.$store.getters.dictObj;
   },
@@ -87,6 +95,18 @@ export default {
     }
   },
   methods: {
+    // 新增微信公众号模板消息点击数据
+    clickOfficial() {
+      this.$http({
+        url: '/data/click',
+        method: 'post',
+        data: { informId: this.informId }
+      }).then((res) => {
+        if (res.data.code == 200) {
+          console.log('埋点')
+        }
+      })
+    },
     /**
      * 返回刷新之前进入的课程数据
      */

BIN
static/index/official.png


+ 4 - 0
store/index.js

@@ -26,6 +26,7 @@ const store = new Vuex.Store({
 		liveLast:null,
 		tabNums: 0, // '我的'右上角的数字
 		sysTime:0, //系统时间
+		scene: 0, //进入小程序的场景值
 		tabLists: [{
 			iconPath: "/static/nav1.png",
 			selectedIconPath: "/static/nav1_on.png",
@@ -180,6 +181,9 @@ const store = new Vuex.Store({
 		setPlayVID(state, provider) {
 			state.playVID = provider.playVID;
 		},
+		setScene(state, scene) {
+			state.scene = scene
+		}
 	},
 	actions: {
 		/**