瀏覽代碼

1、看课新增评论、弹幕、投诉
2、疗法问答修改

XSLu08042 1 天之前
父節點
當前提交
893e66d705

+ 0 - 1
App.vue

@@ -44,7 +44,6 @@ import { checkLogin } from '@/api/user.js'
 export default {
 	globalData: {
 		wsUrl: 'wss://h5api.his.cdwjyyh.com',
-		danmuWSUrl:'wss://h5api.his.cdwjyyh.com',
 	},
   onLaunch: function () {
 		this.bindTIMEvent();

+ 12 - 1
api/course.js

@@ -85,4 +85,15 @@ export function getWxConfig(data) {
  export function getComments(data, type) {
  	return request('/app/course/getComments', data, 'GET','','https://h5api.his.cdwjyyh.com');
  }
- 
+ 
+ // 错误日志未知异常,请联系管理员
+ export function errorLogUpload(data, type) {
+ 	return request('/app/common/errorLogUpload', data, 'POST','','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ export function getTypeTree(data, type) {
+ 	return request('/app/user/complaint/getTypeTree', null, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ export function complaintRecord(data, type) {
+ 	return request('/app/user/complaint/record', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }

+ 3 - 0
api/package.js

@@ -18,6 +18,9 @@ let request = new Request().http
  export function getNewOrderByPackageId(data) {
  	 return request('/app/packageOrder/getNewOrderByPackageId',data,'GET');
  }
+ export function getIcdNameByPackageId(data) {
+ 	 return request('/app/package/getIcdNameByPackageId',data,'GET');
+ }
  
  
  

+ 0 - 1
common/request.js

@@ -9,7 +9,6 @@ export default class Request {
 		let token="";
 		if(url!=null){
 			path= url;
-			// path= 'http://c7d8ff63.natappfree.cc';
 			token= uni.getStorageSync('AppTokenmini_RTCourse')
 		}
 		else{

+ 2 - 1
manifest.json

@@ -52,7 +52,8 @@
     "mp-weixin" : {
         "appid" : "wx73f85f8d62769119",
         "setting" : {
-            "urlCheck" : false
+            "urlCheck" : false,
+            "minified" : true
         },
         "usingComponents" : true
     },

+ 13 - 1
pages.json

@@ -1353,7 +1353,6 @@
 				        "navigationBarTitleText": "课程",
 				        "navigationStyle": "custom",
 				        "scrollIndicator": "none",
-				        "bounce": "none",
 						"usingComponenets": {
 							"uni-popup": "/uni_modules/uni-popup/components/uni-popup/uni-popup"
 						},
@@ -1366,6 +1365,19 @@
 						}
 				    }
 				    
+				},{
+				    "path" : "feedback",
+				    "style" :                                                                                    
+				    {
+				        "navigationBarTitleText": "投诉反馈",
+				        "navigationStyle": "custom",
+				        "scrollIndicator": "none",
+						"app-plus": {
+							"bounce": "none",
+							"softinputMode": "adjustResize"
+						}
+				    }
+				    
 				}
 			]
 		}

+ 9 - 11
pages_course/components/commentBox.vue

@@ -1,5 +1,5 @@
 <template>
-	<cover-view style="background-color: red;">
+	<view>
 		<template v-if="openCommentStatus==2">
 			<!-- <text v-for="(item, index) in activeDanmus" :key="item.commentId" class="danmu-item danmuMove"
 				:style="{
@@ -19,7 +19,7 @@
 			</view>
 			<view class="empty" v-if="msgs&&msgs.length==0">暂无评论~</view>
 		</view>
-	</cover-view>
+	</view>
 </template>
 
 <script>
@@ -208,14 +208,12 @@
 			},
 			handleInput(val) {
 				this.inputText = val
-				console.log("====")
-				this.addMsg({msg: this.inputText,time: this.time},2)
-				// if(!this.isSocketOpen) {
-				// 	// 重新发起会话
-				// 	this.initSocket('reStart')
-				// } else {
-				// 	this.saveMsg();
-				// }
+				if(!this.isSocketOpen) {
+					// 重新发起会话
+					this.initSocket('reStart')
+				} else {
+					this.saveMsg();
+				}
 			},
 			handleScrollBottom() {
 				setTimeout(() => {
@@ -318,6 +316,7 @@
 			},
 			sendMsg(param,status) {
 				if(status == 1) {
+					this.isSend = true;
 					this.addMsg({msg: param.content,time: param.time},2)
 					return
 				}
@@ -351,7 +350,6 @@
 			
 			},
 			addMsg(data,type) {
-				console.log("弹幕===")
 				let obj  = {}
 				if (type==2) {
 					obj = {

+ 1 - 1
pages_course/components/descInfo.vue

@@ -78,7 +78,7 @@
 		justify-content: $justifyC;
 	}
 	.descbox {
-		padding: 0 32rpx;
+		padding: 20rpx 32rpx;
 		margin-bottom: 20rpx;
 		background-color: #fff;
 		font-family: PingFang SC, PingFang SC;

+ 7 - 2
pages_course/components/ques.vue

@@ -17,6 +17,7 @@
 				<view>{{option.name}}</view>
 			</view>
 		</view>
+		<view class="empty" v-if="quesList&&quesList.length==0">暂未设置题目~</view>
 	</view>
 </template>
 
@@ -68,10 +69,14 @@
 		align-items: $alignI;
 		justify-content: $justifyC;
 	}
-
+	.empty {
+		@include u-flex(row, center, center);
+		padding: 24rpx 50rpx;
+		color: #999999;
+	}
 	.ques-content {
 		background-color: #fff;
-		padding: 24rpx 32rpx 116rpx 32rpx;
+		padding: 24rpx 32rpx 24rpx 32rpx;
 		box-sizing: border-box;
 		font-family: PingFang SC, PingFang SC;
 		font-weight: 400;

+ 135 - 0
pages_course/feedback.vue

@@ -0,0 +1,135 @@
+<template>
+	<view>
+		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<view class="arrow-left" :style="{top: statusBarHeight + 'px'}" @click="goBack"><u-icon name="arrow-left" size="24"></u-icon></view>
+			<view class="header-title" :style="{height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">投诉反馈</view>
+		</view>
+		<view class="container" :style="{paddingTop: `calc(88rpx + ${statusBarHeight}px)`}">
+			<view class="list-item title">{{pageIndex==0 ? '请选择反馈类型':'请选择'}}</view>
+			<view class="list-item" v-for="(item, index) in feedbackItems" :key="index" @click="handleClick(item,index)">
+				{{ item.complaintTypeName }}
+			</view>
+			<view class="list-item" @click="goBack">
+				返回上一层
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import{ getTypeTree, complaintRecord } from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				menuButtonH: 45,
+				pageIndex: 0,
+				list:[],
+				feedbackItems: [],
+				userId:'',
+				courseId: '',
+				videoId:''
+			};
+		},
+		onLoad(option) {
+			this.userId = option.userId || ''
+			this.courseId = option.courseId || ''
+			this.videoId = option.videoId || ''
+			this.getMenuButton()
+			this.getList()
+		},
+		methods: {
+			getMenuButton(){
+				const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+				this.menuButtonH = menuButtonInfo.height
+			},
+			goBack() {
+				// 返回上一层逻辑
+				if(this.pageIndex == 0){
+					uni.navigateBack();
+				}else {
+					this.pageIndex = 0
+					this.feedbackItems = this.list
+				}
+			},
+			handleClick(item,index) {
+				if(this.pageIndex ==0) {
+					this.feedbackItems = this.list[index].childrenType || [];
+					this.pageIndex = 1;
+				} else if(this.pageIndex ==1){
+					const param = {
+						userId: this.userId,
+						complaintTypeId: item.complaintTypeId,
+						complaintContent: item.complaintContent,
+						courseId: this.courseId,
+						videoId: this.videoId,
+					}
+					complaintRecord(param).then(res=>{
+						uni.showModal({
+							title: '',
+							content: '我们已收到您的反馈,谢谢',
+							showCancel: false
+						});
+					})
+				}
+			},
+			getList(){
+				getTypeTree().then(res=>{
+					if(res.code == 200) {
+						this.list = res.data
+						this.pageIndex = 0
+						this.feedbackItems = this.list
+					}
+				})
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.header-nav {
+		height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		overflow: hidden;
+		background-color: #fff;
+		box-sizing: border-box;
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		.header-title {
+			flex: 1;
+			text-align: center;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			font-family: PingFang SC,PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #000;
+			box-sizing: border-box;
+		}
+	}
+	.arrow-left {
+		position: absolute;
+		left: 24rpx;
+		height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		overflow: hidden;
+	}
+	.list-item {
+		background-color: #fff;
+		padding: 24rpx;
+		border-bottom: 1rpx solid #f4f4f4;
+		font-size: 15px;
+		color: #333;
+	}
+
+	.title {
+		background-color: #f4f4f4;
+	}
+</style>

+ 95 - 69
pages_course/video.vue

@@ -65,20 +65,34 @@
 			@getScrollTop="getScrollTop"
 			@getMore="getMore"
 			@getActiveDanmus="getActiveDanmus"></commentBox>
-		<view class="title-content" id="title-contentnav" v-show="openCommentStatus!=1">
-			<!-- 答题时展示小节课程名,其他展示课程名 -->
-			<!-- 小节课程名 -->
-			<view class="subtitlebox" v-if="isLogin&&isAddKf==1">
-				{{courseInfo.title}}
+		<view id="title-contentnav">
+			<view class="title-content" v-if="openCommentStatus!=1">
+				<!-- 答题时展示小节课程名,其他展示课程名 -->
+				<!-- 小节课程名 -->
+				<view class="subtitlebox" v-if="isLogin&&isAddKf==1">
+					{{courseInfo.title}}
+				</view>
+				<!-- 课程名字 -->
+				<view class="miantitlebox" v-else>
+					{{courseInfo.courseName}}
+				</view>
+				<!-- 投诉 -->
+				<view class="warning" @click="feedback" v-if="isLogin&&videoId">
+					<image src="https://cos.his.cdwjyyh.com/fs/20250606/66a44bedde6c4e9d937f4bf866aace40.png"></image>
+					<text>投诉</text>
+				</view>
 			</view>
-			<!-- 课程名字 -->
-			<view class="miantitlebox" v-else>
-				{{courseInfo.courseName}}
+			<view class="tabbox-bar" v-if="openCommentStatus==1">
+				<view class="tabbox">
+					<view :class="currentTab == nav.id ? 'tabbox-active':''" v-for="nav in navList" :key="nav.id" @click="handleTab(nav.id)">{{nav.name}}</view>
+				</view>
+				<!-- 投诉 -->
+				<view class="warning" @click="feedback">
+					<image src="https://cos.his.cdwjyyh.com/fs/20250606/66a44bedde6c4e9d937f4bf866aace40.png"></image>
+					<text>投诉</text>
+				</view>
 			</view>
 		</view>
-		<view class="tabbox" v-if="openCommentStatus==1">
-			<view :class="currentTab == nav.id ? 'tabbox-active':''" v-for="nav in navList" :key="nav.id" @click="handleTab(nav.id)">{{nav.name}}</view>
-		</view>
 		<scroll-view
 		class="scroll-view" 
 		:style="{height: height}" 
@@ -118,7 +132,7 @@
 			</view>
 		</scroll-view>
 		<!-- 线路 -->
-		<view class="video-line" @click="openPop" v-if="isLogin&&isAddKf==1">
+		<view class="video-line" v-if="isLogin&&isAddKf==1" @click="openPop">
 			<image :src="baseUrl+'/images/changePlayer-icon.png'"></image>
 			<text>线路{{numberToChinese(lineIndex + 1)}}</text>
 		</view>
@@ -138,7 +152,7 @@
 			</view>
 		</uni-popup>
 		<!-- 发送弹幕 -->
-		<view class="video-line danmu-line" @click="openDanmu(0)" v-if="isLogin&&isAddKf==1&&openCommentStatus==2">
+		<view class="video-line danmu-line" v-if="isLogin&&isAddKf==1&&openCommentStatus==2" @click="openDanmu(0)" >
 			<image class="set_image" src="https://cos.his.cdwjyyh.com/fs/20250418/5e508642737a44169061382566043ac9.png" mode="aspectFill"></image>
 			<text>发弹幕</text>
 		</view>
@@ -147,17 +161,19 @@
 			<view class="danmuPopup" :style="{marginLeft:isfull ? statusBarHeight+'px': 0,marginBottom: danmuboxHeight+'px'}">
 				<view class="danmuPopup-head border-line">
 					<image class="danmu-icon" :src="showDanmu==0?'/static/images/danmu-off.png':'/static/images/danmu-on.png'" mode="heightFix" @click="switchDanmu()"></image>
-					<u-input 
-					class="danmuPopup-input" 
-					placeholder="发个弹幕吧~" 
-					border="surround" 
-					shape="circle" 
-					:focus="focus"
-					:adjustPosition="false" 
-					:autoBlur="true" 
-					maxlength="50"
-					clearable 
-					v-model.trim="inputText"></u-input>
+					<view class="u-border">
+						<u-input 
+						class="danmuPopup-input" 
+						placeholder="发个弹幕吧~" 
+						border="border"
+						:focus="focus"
+						:adjustPosition="false" 
+						:autoBlur="true" 
+						maxlength="50"
+						v-model.trim="inputText">
+						</u-input>
+						<text style="font-size: 24rpx;color: #bbb;margin-left: 10rpx;">{{inputText?inputText.trim().length:0}}/50</text>
+					</view>
 					<button class="danmuPopup-send" @click="handleChatInput">发送</button>
 				</view>
 			</view>
@@ -213,7 +229,7 @@
 			<view class="footer-btn" v-if="!isLogin || isAddKf !=1" @click="submit">
 				<text>立即学习</text>
 			</view>
-			<view v-if="currentTab==1&&isLogin&&isAddKf==1&&currentTab==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
+			<view v-if="isLogin&&isAddKf==1&&currentTab==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
 				<image class="footer-btn-img" :src="baseUrl+'/images/red_envelope_btnimg.png'" mode="aspectFill"></image>
 				<text>提交答案领取奖励</text>
 			</view>
@@ -226,8 +242,8 @@
 			<view class="footer-tips">重庆云联融智提供技术支持</view>
 		</view>
 		<view v-show="currentTab==2">
-			<view class="chatinput">
-				<input class="uni-input" v-model.trim="inputText" maxlength="140" placeholder="发消息···" confirm-type="send" @confirm="handleChatInput" />
+			<view class="chatinput" :style="{bottom:danmuboxHeight>0?danmuboxHeight+'px':'calc(var(--window-bottom) + 24rpx)'}">
+				<input class="uni-input" v-model.trim="inputText" :adjustPosition="false" :autoBlur="false" maxlength="140" placeholder="发消息···" confirm-type="send" @confirm="handleChatInput" />
 				<button class="send" @click="handleChatInput">发送</button>
 			</view>
 		</view>
@@ -253,6 +269,7 @@
 		sendReward,
 		loginByMp,
 		getRealLink,
+		errorLogUpload,
 	} from "@/api/course.js"
 	export default {
 		components: {
@@ -280,7 +297,7 @@
 				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
 				scrollTop: 0,
 				height: '0px',
-				isLogin: true,
+				isLogin: false,
 				videoUrl: "",
 				videoId: "",
 				//现在的时长
@@ -389,21 +406,8 @@
 				openCommentStatus: 3,
 				showAnswerTip: false,
 				showDanmu: 1,
-				activeDanmus:[]
-			}
-		},
-		computed: {
-			isAnswer() {
-				return (item, name) => {
-					if (item.type == 1) {
-						return item.answer == name
-					} else if (item.type == 2) {
-						const array = item.answer.split(',')
-						return array.some(i => i == name)
-					} else {
-						return false
-					}
-				}
+				activeDanmus:[],
+				flagTime: 0
 			}
 		},
 		onLoad(option) {
@@ -453,14 +457,8 @@
 			if (this.player) {
 				this.player.pause()
 			}
-			this.$isLoginCourse().then(res => {
-					if(res){
-						this.getFinishCourseVideo()
-						this.getInternetTraffic()
-					}
-				},
-				rej => {}
-			);
+			this.getFinishCourseVideo()
+			this.getInternetTraffic()
 			// if (this.interval != null) {
 			// 	clearInterval(this.interval)
 			// 	this.interval = null
@@ -471,14 +469,8 @@
 				clearInterval(this.interval)
 				this.interval = null
 			}
-			this.$isLoginCourse().then(res => {
-					if(res){
-						this.getFinishCourseVideo()
-						this.getInternetTraffic()
-					}
-				},
-				rej => {}
-			);
+			this.getFinishCourseVideo()
+			this.getInternetTraffic()
 			this.clearIntegral()
 			// #ifndef H5
 			uni.offKeyboardHeightChange(this.keyboardHeightChange);
@@ -578,7 +570,7 @@
 				this.getErrMsg('','waiting')
 			},
 			fullscreenchange(event) {
-				this.isfull = e.detail.fullScreen
+				this.isfull = event.detail.fullScreen
 				if(this.isfull) {
 					this.$refs.danmuBox&&this.$refs.danmuBox.initTracks()
 				}
@@ -603,7 +595,7 @@
 						.boundingClientRect((data) => {
 							if(data) {
 								this.height =
-									`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 44px - 88rpx)`
+									`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 100px - 88rpx)`
 							}
 						})
 						.exec();
@@ -1009,7 +1001,7 @@
 				this.$refs.kfPopup.close()
 			},
 			getFinishCourseVideo() {
-				if (!this.playTime || !this.isCheckRealUrl) return
+				if (!this.isLogin||!this.playTime || !this.isCheckRealUrl) return
 				// {videoId: this.videoId,duration:this.playTime}
 				const param = {
 					duration: this.playTime,
@@ -1019,7 +1011,7 @@
 			},
 			// 每十分钟获得积分
 			getIntegralByH5Video() {
-				if(!this.isCheckRealUrl) return
+				if(!this.isLogin||!this.isCheckRealUrl) return
 				const param = {
 					duration: this.playTime,
 					...this.urlOption
@@ -1038,7 +1030,7 @@
 			},
 			// 缓冲
 			getInternetTraffic() {
-				if(!this.isCheckRealUrl) return
+				if(!this.isLogin||!this.isCheckRealUrl) return
 				const playVideoTime = Math.ceil(this.playTime / this.duration * 100) // 播放百分比
 				if(this.bufferRate == 0 || this.bufferRate < playVideoTime) {
 					this.bufferRate = playVideoTime
@@ -1054,7 +1046,6 @@
 				getInternetTraffic(param)
 			},
 			getErrMsg(err,type) {
-				return
 				let msgerr = {
 					errType: type || 'error',
 					videoUrl: this.videoUrl,
@@ -1191,6 +1182,7 @@
 			switchDanmu() {
 				this.showDanmu = this.showDanmu == 1 ? 0:1
 				if(this.showDanmu == 0&&this.$refs.danmuBox) {
+					this.$refs.danmuPopup.close()
 					this.activeDanmus = []
 					this.$refs.danmuBox.activeDanmus = []
 					this.$refs.danmuBox.initTracks()
@@ -1263,6 +1255,14 @@
 					this.$refs.danmuBox&&this.$refs.danmuBox.animationend(moveItem, i)
 				}
 			},
+			feedback() {
+				const userId = this.user.userId || ''
+				const courseId = this.urlOption.courseId || ''
+				const videoId = this.urlOption.videoId || ''
+				uni.navigateTo({
+					url: './feedback?userId='+userId+'&courseId='+courseId+'&videoId='+videoId
+				})
+			}
 		}
 	}
 </script>
@@ -1702,6 +1702,7 @@
 			font-size: 28rpx;
 			line-height: 1.6;
 			box-sizing: border-box;
+			@include u-flex(row, center, space-between);
 			.title {
 				font-size: 36rpx;
 				font-weight: 500;
@@ -1713,6 +1714,17 @@
 				color: #666666;
 			}
 		}
+		.warning {
+			flex-shrink: 0;
+			color: #888;
+			font-size: 24rpx;
+			@include u-flex(column, center, center);
+			image {
+				flex-shrink: 0;
+				height: 36rpx;
+				width: 36rpx;
+			}
+		}
 		.video-line {
 			min-width: 140rpx;
 			max-width: 200rpx;
@@ -1830,6 +1842,12 @@
 	.danmuPopup {
 		background-color: #fff;
 		padding-bottom: calc(var(--window-bottom) + 10px);
+		.u-border {
+			flex: 1;
+			@include u-flex(row,center,flex-start);
+			padding: 0 6rpx;
+			border-radius: 6px;
+		}
 		&-head {
 			width: 100%;
 			padding: 10px;
@@ -1839,7 +1857,7 @@
 			.danmu-icon {
 				height: 24px;
 				width: 24px;
-				margin-right: 12px;
+				margin-right: 10px;
 			}
 		}
 		&-input {
@@ -1855,7 +1873,7 @@
 			padding: 5px 15px;
 			box-sizing: border-box;
 			background: #FF5C03 !important;
-			border-radius: 22px;
+			border-radius: 6px;
 			font-family: PingFang SC, PingFang SC;
 			font-weight: 500;
 			font-size: 15px;
@@ -1895,7 +1913,16 @@
 		pointer-events: none;
 		object-fit: cover;
 	}
+	.tabbox-bar {
+		@include u-flex(row, center, flex-start);
+		background-color: #fff;
+		.warning {
+			flex-shrink: 0;
+			padding-right: 20rpx;
+		}
+	}
 	.tabbox {
+		flex: 1;
 		@include u-flex(row, center, center);
 		border-bottom: 2rpx solid #F5F7FA;
 		height: 44px;
@@ -1924,7 +1951,6 @@
 		left: 32rpx;
 		right: 32rpx;
 		z-index: 999;
-		bottom: calc(var(--window-bottom) + 24rpx);
 		height: 96rpx;
 		background-color: green;
 		background: #FFFFFF;
@@ -1966,7 +1992,7 @@
 		border-radius: 50%;
 		height: 100rpx;
 		width: 100rpx;
-		font-size: 30rpx;
+		font-size: 25rpx;
 		text-align: center;
 		padding: 10rpx;
 		@include u-flex(row, center, center);

+ 55 - 11
pages_course/videoOld.vue

@@ -200,10 +200,12 @@
 		</uni-popup>
 		<!-- footer -->
 		<view class="footer" v-if="videoId">
-			<view :class="isLogin&&isAddKf==1 ? 'footer-btn footer-btn-border':'footer-btn'" @click="submit">
-				<image class="footer-btn-img" v-show="isLogin&&isAddKf==1" :src="baseUrl+'/images/red_envelope_btnimg.png'"
-					mode="aspectFill"></image>
-				<text>{{isLogin&&isAddKf==1 ? '提交答案领取奖励' : '立即学习'}}</text>
+			<view class="footer-btn" v-if="!isLogin || isAddKf !=1" @click="submit">
+				<text>立即学习</text>
+			</view>
+			<view v-if="isLogin&&isAddKf==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
+				<image class="footer-btn-img" :src="baseUrl+'/images/red_envelope_btnimg.png'" mode="aspectFill"></image>
+				<text>提交答案领取奖励</text>
 			</view>
 			<!-- <view @click="checked=!checked" class="agreement" v-if="!isLogin">
 				<radio value="r1" :checked="checked" color="#ff5c03" activeBorderColor="#ff5c03"
@@ -231,7 +233,8 @@
 		sendReward,
 		loginByMp,
 		getRealLink,
-		getDanmuList
+		getDanmuList,
+		errorLogUpload
 	} from "@/api/course.js"
 	export default {
 		data() {
@@ -253,7 +256,7 @@
 				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
 				scrollTop: 0,
 				height: '0px',
-				isLogin: true,
+				isLogin: false,
 				videoUrl: "",
 				videoId: "",
 				//现在的时长
@@ -399,7 +402,7 @@
 				clearInterval(this.pingpangTimes)
 				this.socket = null
 			}
-			this.initTracks()
+			// this.initTracks()
 		},
 		onShow() {
 			this.tipsOpen = false
@@ -629,6 +632,8 @@
 							uni.setNavigationBarTitle({
 								title: this.courseInfo && this.courseInfo.title ? this.courseInfo.title : ''
 							});
+						} else {
+							
 						}
 						this.getHeight()
 						this.getDescHeight()
@@ -706,6 +711,10 @@
 									questionOption: JSON.parse(item.question),
 									answer: ''
 								}))
+						} else {
+							if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+								this.sendErrorLog('/app/course/getH5CourseVideoDetails',this.urlOption)
+							}
 						}
 						this.getHeight()
 						this.getDescHeight()
@@ -852,6 +861,9 @@
 									icon: "none"
 								})
 							}
+							if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+								this.sendErrorLog('/app/course/courseAnswer',param)
+							}
 						}
 					},
 					rej => {}
@@ -884,6 +896,9 @@
 						// 		icon: 'none'
 						// 	})
 						// }
+						if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+							this.sendErrorLog('/app/course/sendReward',param)
+						}
 					})
 				}
 			},
@@ -961,6 +976,9 @@
 								title: res.msg,
 								icon: 'none'
 							});
+							if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+								this.sendErrorLog('/app/course/isAddKf',this.urlOption)
+							}
 						}
 					},
 					err => {}
@@ -976,7 +994,11 @@
 					duration: this.playTime,
 					...this.urlOption
 				}
-				getFinishCourseVideo(param)
+				getFinishCourseVideo(param).then(res=>{
+					if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+						this.sendErrorLog('/app/course/updateWatchDuration',param)
+					}
+				})
 			},
 			// 每十分钟获得积分
 			getIntegralByH5Video() {
@@ -991,6 +1013,10 @@
 							title: "积分+10",
 							icon: "none"
 						})
+					} else {
+						if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+							this.sendErrorLog('/app/course/getIntegralByH5Video',param)
+						}
 					}
 				})
 			},
@@ -1012,7 +1038,11 @@
 					bufferRate: Number(this.bufferRate.toFixed(2)),
 				}
 				if(!param.bufferRate) return
-				getInternetTraffic(param)
+				getInternetTraffic(param).then(res=>{
+					if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+						this.sendErrorLog('/app/course/getInternetTraffic',param)
+					}
+				})
 			},
 			getErrMsg(err,type) {
 				let msgerr = {
@@ -1057,6 +1087,9 @@
 												title: res.msg,
 												icon: 'none'
 											});
+											if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+												this.sendErrorLog('/app/wx/courseLogin',{code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv})
+											}
 										 }
 									 }).catch(err=>{
 										uni.hideLoading();
@@ -1100,6 +1133,9 @@
 							title: '课程已过期或链接无效',
 							icon: 'none'
 						});
+						if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+							this.sendErrorLog('/app/course/getRealLink',{sortLink:this.sortLink})
+						}
 					}
 				}).catch(err=>{
 					this.isExpire = true
@@ -1189,7 +1225,7 @@
 				let userId = this.user.userId;
 				let that = this;
 				this.socket = uni.connectSocket({
-					url: getApp().globalData.danmuWSUrl + "/ws/barrage/" + this.videoId,
+					url: getApp().globalData.wsUrl + "/ws/barrage/" + this.videoId,
 					multiple: true,
 					header: {
 						'token': uni.getStorageSync('AppTokenmini_RTCourse')
@@ -1250,7 +1286,7 @@
 					}
 					if(that.reOpenSocket) {
 						//重启
-						that.initSocket()
+						// that.initSocket()
 					}
 				})
 				//监听socket错误
@@ -1411,6 +1447,14 @@
 					this.initTracks()
 				}
 			},
+			// 未知异常,请联系管理员
+			sendErrorLog(url,param){
+				const data = {
+					url:url || '',
+					param:param?JSON.stringify(param) : ''
+				}
+				errorLogUpload(data)
+			}
 		}
 	}
 </script>

+ 2 - 2
pages_index/packageDetails.vue

@@ -55,7 +55,7 @@
 					<view class="title">处方列表</view>
 				</view>
 				<view class="drug-list"  >
-					<view  v-for="(product,index) in products"  class="drug-item" >
+					<view  v-for="(product,index) in products" :key="index"  class="drug-item" >
 						<view class="drug" v-if="displayMore==0?index<2:true" >
 							<view class="img-box">
 								<image :src="product.image" mode="aspectFill"></image>
@@ -156,7 +156,7 @@
 			<view class="doctors">
 				<scroll-view class="scroll-list"  scroll-y="true"     @scrolltolower="lower" >
 				
-				<view class="doctor"  @click="navTo('/pages_doctor/doctorDetails?doctorId='+item.doctorId)"   v-for="(item,index) in doctors">
+				<view class="doctor"  @click="navTo('/pages_doctor/doctorDetails?doctorId='+item.doctorId)"   v-for="(item,index) in doctors" :key="index">
 					<view class="item">
 						<view class="left">
 							<image mode="aspectFill" class="doc-img" :src="item.avatar"></image>

+ 32 - 24
pages_index/packageForm.vue

@@ -63,6 +63,7 @@
 </template>
 
 <script>
+	import {getIcdNameByPackageId} from '@/api/package.js'
 	import choosePatient from "./components/choosePatient/choosePatient.vue"
 	import {create,giftCreate,getAgreement} from '@/api/packageOrder.js'
 	export default {
@@ -77,40 +78,22 @@
 				patient:null,
 				items:[
 					{
-						title:"您是否已在线下就诊,且对所购买的药品无过敏或不良反应?",
+						title:"您是否因慢病在线下就诊?且对该处方内的产品无过敏或不良反应?",
 						options:[
 							{name:"是,我线下就诊过",value:1,color:'green'},
 							{name:"无,从未就诊",value:0,color:'red'},
 						]
 					},
 					{
-						title:"您是否已详细阅读药物说明,确认自己符合药物适用人群,并了解用药方法、用药禁忌等信息?",
+						title:"您是否已详细阅读疗法说明,确认自己符合疗法产品的适用人群,并了解使用方法,使用禁忌等?",
 						options:[
 							{name:"是,我已充分了解",value:1,color:'green'},
 							{name:"否,未阅读",value:0,color:'red'},
 						]
-					},{
-						title:"您之前因以下哪种情况去线下就医,接受过哪些检查?",
-						options:[
-							{name:"慢性病复查,复查了基本指标",value:1,color:'green'},
-							{name:"头晕、头痛,查过血压",value:2,color:'green'},
-							{name:"失眠、记忆力下降,常规检查",value:3,color:'green'},
-							{name:"心悸、胸痛,查过心电图",value:4,color:'green'},
-							{name:"关节疼痛,查过X光片",value:5,color:'green'},
-							{name:"突发不适,常规检查",value:6,color:'green'}
-						]
 					},
 					{
-						title:"您目前已确诊的慢性疾病有哪些?",
-						options:[
-							{name:"高血压",value:1,color:'green'},
-							{name:"糖尿病",value:2,color:'green'},
-							{name:"心脑血管疾病",value:3,color:'green'},
-							{name:"呼吸系统疾病",value:4,color:'green'},
-							{name:"骨关节病",value:5,color:'green'},
-							{name:"肠胃疾病",value:6,color:'green'},
-							{name:"其他",value:7,color:'green'},
-						]
+						title:"请选择线下已确诊疾病",
+						options:[]
 					}
 				],
 				msgs:[],
@@ -154,6 +137,7 @@
 			this.item=this.items[0];
 			this.addMsg(1,this.item.title);
 			this.getAgreement()
+			this.getIcdName()
 			this.avatar = uni.getStorageSync('userInfo')&&JSON.parse(uni.getStorageSync('userInfo')).avatar
 		},
 		onShow() {
@@ -162,6 +146,30 @@
 			})
 		},
 		methods:{
+			getIcdName() {
+				this.items[2].options = []
+				getIcdNameByPackageId({packageId:this.packageId}).then(res=>{
+					if(res.code == 200&&res.icdNames.length>0) {
+						this.items[2].options= res.icdNames.map((item,i)=>({
+							name:item,
+							value:i+1,
+							color:'green'
+						}))
+						const obj = {
+							name: '其他',
+							value: this.items[2].options.length+1,
+							color: 'green'
+						}
+						this.items[2].options.push(obj)
+					} else {
+						this.items[2].options = [{
+							name: '其他',
+							value: 1,
+							color: 'green'
+						}]
+					}
+				})
+			},
 			getpaddingTop() {
 				uni
 				  .createSelectorQuery().in(this)
@@ -248,10 +256,10 @@
 				uni.showLoading({
 					title:"处理中..."
 				})
-				const num = Math.floor(Math.random() * 6);
+				const num = Math.floor(Math.random() * this.items[2].options.length);
 				this.items = this.items.map(item=>({
 					...item,
-					option: item.title == "您目前已确诊的慢性疾病有哪些?"&&item.option =='其他' ? item.options[num].name:item.option
+					option: item.title == "请选择线下已确诊疾病"&&item.option =='其他' ? item.options[num].name:item.option
 				}))
 				var data={
 					companyId:this.companyId,