فهرست منبع

1、ai舌诊和积分商城去掉已进入就登陆
2、积分商城页面文字修改 芳华币商城,获得记录,价值,平台积分字样改为芳华币
3、华币兑换 页面新增 我的芳华币
4、疗法页面
1)、产品列表改为【处方列表】
2)、调整排序:疗程、疗法详情、其后依次是文字介绍
3)、小程序产品列表之前被隐藏了,现在展示出来
5、就诊人填写页面 联系方式改为【手机号码】
6、ai舌诊 使用教程
7、小程序微信服务通知:新增【发货提醒】——已发货后提醒用户他的订单已发货且有运单号,点进去就能看到订单详情
8、快速问诊 提交订单页面【咨询医生问题】框,填写字数限制改为500字

9、看课新增弹幕和评论

XSLu08042 1 هفته پیش
والد
کامیت
8ddc2beaf8

+ 17 - 1
api/course.js

@@ -69,4 +69,20 @@ export function getWxConfig(data) {
  //获取弹幕列表
  export function getDanmuList(videoId) {
  	 return request('/barrage/barrage/list/'+videoId,null,'GET','','https://h5api.his.cdwjyyh.com');
- }
+ }
+ 
+ // 保存评论数据
+ export function saveMsg(data, type) {
+ 	return request('/app/course/saveMsg', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ // 撤销评论
+ export function revokeMsg(data, type) {
+ 	return request('/app/course/revokeMsg', data, 'PUT', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ // 获取历史评论数据
+ export function getComments(data, type) {
+ 	return request('/app/course/getComments', data, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ 

+ 32 - 5
components/CustomCamera/WeChat/Layout.vue

@@ -5,7 +5,7 @@
 			<slot></slot>
 		</view>
 		<view class="camera-footer" id="camera-footer">
-			<view class="usenum">当前可免费试用<text style="color: #F54D04;margin: 0 6rpx;">{{counts || 0}}</text>次</view>
+			<view class="usenum" :style="{visibility: isLogin? 'visible':'hidden'}">当前可免费试用<text style="color: #F54D04;margin: 0 6rpx;">{{counts || 0}}</text>次</view>
 			<view class="camera-options">
 				<view class="camera-options-left camera-item">
 					<image :src="baseUrl+'/images/album_icon.png'" mode="scaleToFill" style="width: 65rpx;height:60rpx;" @click="handleClikFn('album')"></image>
@@ -35,14 +35,29 @@
 				optionsHeight: '', //操作区域
 				counts: 0,
 				url:null,
+				isLogin: false
 			}
 		},
-		onLoad() {
-			
-			this.getCount()
+		onShow() {
+			this.$isLogin().then(
+				res => {
+					if(res){
+						this.isLogin = true
+						this.getCount()
+					} else{
+						this.isLogin = false
+					}
+				}
+			);
 		},
 		methods: {
 			switchCamera(){
+				if(!this.isLogin){
+					uni.navigateTo({
+						url:'/pages/auth/login'
+					})
+					return
+				}
 				this.$emit('switchCamera')
 			},
 			getCount(){
@@ -61,6 +76,12 @@
 				);
 			},
 			takePhoto() {
+				if(!this.isLogin){
+					uni.navigateTo({
+						url:'/pages/auth/login'
+					})
+					return
+				}
 				let that= this
 				const ctx = wx.createCameraContext()
 				console.log("ctx", ctx);
@@ -74,7 +95,13 @@
 				})
 			},
 			handleClikFn(instruct) {
-				this.$emit('instruct', instruct)
+				if(this.isLogin){
+					this.$emit('instruct', instruct)
+				} else{
+					uni.navigateTo({
+						url:'/pages/auth/login'
+					})
+				}
 			}
 		},
 		mounted() {

+ 6 - 1
components/CustomCamera/WeChat/index.vue

@@ -9,7 +9,7 @@
 						<cover-view class="uni-nav-back" @click="back">返回
 							<!-- <uni-icons color="#fff" type="left" size="20" /> -->
 						</cover-view>
-						<cover-view class="uni-nav-title">
+						<cover-view class="uni-nav-title" @click="navTo()">
 							<cover-view>使用教程</cover-view>
 							<cover-image class="ques" :src="baseUrl+'/images/ques.png'" mode="aspectFill"></cover-image>
 						</cover-view>
@@ -63,6 +63,11 @@
 			// this.coverImage = '/static/images/portrait.jpg'
 		},
 		methods: {
+			navTo() {
+				uni.navigateTo({
+					url: "/pages_user/tongue/ques"
+				})
+			},
 			switchCamera(){
 				this.device = this.device === 'back' ? 'front' : 'back';
 			},

+ 22 - 6
pages.json

@@ -6,7 +6,7 @@
 		{
 			"path": "pages/common/launch",
 			"style": {
-				"navigationBarTitleText": "彩虹惠医互联网医院",
+				"navigationBarTitleText": "御君方互联网医院",
 				"navigationBarTextStyle": "black",
 				"navigationBarBackgroundColor": "#ffffff"
 			}
@@ -24,7 +24,7 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTextStyle": "black",
-				"navigationBarTitleText": "彩虹惠医互联网医院",
+				"navigationBarTitleText": "御君方互联网医院",
 		        "enablePullDownRefresh": false,
 				"navigationStyle": "custom"
 			
@@ -1017,7 +1017,7 @@
 				    "path" : "integralGoodsList",
 				    "style" :                                                                                    
 				    {
-				        "navigationBarTitleText": "积分商城",
+				        "navigationBarTitleText": "芳华币商城",
 						"navigationBarTextStyle": "black",
 						"navigationBarBackgroundColor": "#ffffff"
 				    }
@@ -1055,7 +1055,7 @@
 				    "path" : "integralLogsList",
 				    "style" :                                                                                    
 				    {
-				        "navigationBarTitleText": "积分记录",
+				        "navigationBarTitleText": "获得记录",
 						"navigationBarTextStyle": "black",
 						"navigationBarBackgroundColor": "#ffffff"
 				    }
@@ -1065,7 +1065,7 @@
 				    "path" : "integralOrderPay",
 				    "style" :                                                                                    
 				    {
-				        "navigationBarTitleText": "积分兑换",
+				        "navigationBarTitleText": "芳华币兑换",
 						"navigationBarTextStyle": "black",
 						"navigationBarBackgroundColor": "#ffffff"
 				    }
@@ -1163,6 +1163,18 @@
 						"titleNView": false,
 						"enablePullDownRefresh": false
 					}
+				},{
+					"path": "tongue/ques",
+					"style": {
+						"navigationBarTitleText": "使用教程",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor":"#ffffff",
+						"navigationBarTextStyle":"black",
+						"scrollIndicator": "none",
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
 				}
 				,{
 					"path": "tongue/tongueList",
@@ -1347,6 +1359,10 @@
 						},
 						"componentPlaceholder": {
 							"uni-popup": "view"
+						},
+						"app-plus": {
+							"bounce": "none",
+							"softinputMode": "adjustResize"
 						}
 				    }
 				    
@@ -1356,7 +1372,7 @@
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "white",
-		"navigationBarTitleText": "彩虹惠医互联网医院",
+		"navigationBarTitleText": "御君方互联网医院",
 		"navigationBarBackgroundColor": "#C39A58",
 		"backgroundColor": "#ffffff"
 	},

+ 1 - 1
pages/auth/login.vue

@@ -6,7 +6,7 @@
 					<view class="logo-img">
 						<image src="https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png"></image>
 					</view>
-					<view class="title">彩虹惠医互联网医院</view>
+					<view class="title">御君方互联网医院</view>
 				</view>
 				<view class="login-notice">为了提供更优质的服务,请先登录</view>
 				<view class="btns">

+ 15 - 15
pages/index/index.vue

@@ -7,7 +7,7 @@
 			<view class="top-box" :style="{ background: bg }" >
 				<view class="status_bar" :style="{height: statusBarHeight}"></view>
 				<view class="top-title">
-					<view class="name" :style="{ color: titleColor }">彩虹惠医互联网医院</view>
+					<view class="name" :style="{ color: titleColor }">御君方互联网医院</view>
 					<view class="desc-box" >
 						<image v-if="!isTop" src="../../static/images/dui.png"></image>
 						<image v-if="isTop" src="../../static/images/dui1.png"></image>
@@ -68,7 +68,7 @@
 								<view class="menu"  @click="navTo('/pages_index/testList')">
 									<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/6104b270481040dd8340859c9d901c09.png"></image>
 								</view>
-								<view class="menu" @click="loginNavTo('/pages_user/integralGoodsList')">
+								<view class="menu" @click="navTo('/pages_user/integralGoodsList')">
 									<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f9f2f6c6b4d24f1ba9a637dfed74f8c3.png"></image>
 								</view>
 								<view class="menu" @click="navTo('/pages_order/inquirySelect?inquiryType=3')">
@@ -349,7 +349,7 @@
 		onShareAppMessage(res) {
 			if(this.$isLogin()){
 				return {
-					title: "彩虹惠医互联网医院",
+					title: "御君方互联网医院",
 					path: '/pages/index/index',
 					imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 				}
@@ -360,7 +360,7 @@
 		onShareTimeline(res) {
 			if(this.utils.isLogin()){
 				return {
-					title: "彩虹惠医互联网医院",
+					title: "御君方互联网医院",
 					imageUrl: 'https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
 				}
 			}
@@ -427,20 +427,20 @@
 			},
 			yangshengClick(item){
 				if(item.id==0){
-					this.$isLogin().then(
-						res => {
-							if(res){
+					// this.$isLogin().then(
+					// 	res => {
+					// 		if(res){
 								uni.navigateTo({
 									url:item.page
 								}) 
-							}
-							else{
-								uni.navigateTo({
-									url:'/pages/auth/login'
-								})
-							}
-						}
-					);
+					// 		}
+					// 		else{
+					// 			uni.navigateTo({
+					// 				url:'/pages/auth/login'
+					// 			})
+					// 		}
+					// 	}
+					// );
 				}
 				else{
 					if(item.page==""){

+ 1 - 1
pages/user/index.vue

@@ -21,7 +21,7 @@
 						</view>
 						<view class="phone" v-if="user.phone!=''">{{$parsePhone(user.phone)}}</view>
 						<view class="counts">
-							<view class="count" @click="loginNavTo('/pages_user/integral')">积分 {{user.integral}}</view>
+							<view class="count" @click="loginNavTo('/pages_user/integral')">芳华币 {{user.integral}}</view>
 							<!-- <view class="count">我的健康金 {{user.balance}}</view> -->
 						</view>
 					</view>

+ 9 - 9
pages_company/packageDetails.vue

@@ -50,7 +50,7 @@
 			<view class="drug-box" v-if="products.length>0 ">
 				<view class="title-box">
 					<view class="line"></view>
-					<view class="title">产品列表</view>
+					<view class="title">处方列表</view>
 				</view>
 				<view class="drug-list"  >
 					<view  v-for="(product,index) in products"  class="drug-item" >
@@ -92,6 +92,14 @@
 				<view class="desc" v-if="describe!=null" v-html="describe.use">
 				</view>
 			</view>
+			<view class="desc-box">
+				<view class="title-box">
+					<view class="line"></view>
+					<view class="title">疗法详情</view>
+				</view>
+				<view class="desc" v-html="item.desc">
+				</view>
+			</view>
 			<view class="desc-box" v-if="item.indication!=null">
 				<view class="title-box">
 					<view class="line"></view>
@@ -132,14 +140,6 @@
 				<view class="desc" v-html="item.explain">
 				</view>
 			</view>
-			<view class="desc-box">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">疗法详情</view>
-				</view>
-				<view class="desc" v-html="item.desc">
-				</view>
-			</view>
 		</view>
 		<view class="btn-foot">
 			<view class="p-price-box">

+ 707 - 0
pages_course/components/commentBox.vue

@@ -0,0 +1,707 @@
+<template>
+	<cover-view style="background-color: red;">
+		<template v-if="openCommentStatus==2">
+			<!-- <text v-for="(item, index) in activeDanmus" :key="item.commentId" class="danmu-item danmuMove"
+				:style="{
+				  top: item.top + 'px',
+				  ...item.style,
+				  'animation-duration': '8s'
+				 }" @animationend="animationend(item,index)">
+				{{ item.content }}
+			</text> -->
+		</template>
+		<view class="container-body" id="msglist" v-if="openCommentStatus==1">
+			<view class="listbox" v-for="(item, index) in msgs" :key="index" :id="'view' + index">
+				<text :class="userId&&item.userId == userId?'list-name my':'list-name'">
+					{{userId&&item.userId == userId ? '我' : item.nickName||'--'}}:
+				</text>
+				<text class="list-con">{{item.content||''}}</text>
+			</view>
+			<view class="empty" v-if="msgs&&msgs.length==0">暂无评论~</view>
+		</view>
+	</cover-view>
+</template>
+
+<script>
+	import { saveMsg,revokeMsg,getComments} from "@/api/course.js"
+	export default {
+		props: {
+			height:{
+				type: String,
+				default:'0px'
+			},
+			urlOption:{
+				type: Object,
+				default:{}
+			},
+			time:{
+				type: [String,Number],
+				default: 0
+			},
+			viewCommentNum:{
+				type: [String,Number],
+				default: 200
+			},
+			openCommentStatus:{
+				type: [String,Number],
+				default: 3
+			},
+			//  用户自己开启关闭弹幕展示 1,展示弹幕,0 关闭的弹幕
+			showDanmu:{
+				type: [String,Number],
+				default: 1
+			},
+		},
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				scrollTop: 0,
+				inputText:"",
+				isSocketOpen:false,
+				socket:null,
+				isSend:true,
+				commentList:[],
+				msgs: [],
+				pageNum: 1,
+				pageSize: 10,
+				userInfo: {},
+				userId: '',
+				pingpangTimes:null,
+				// 弹幕
+				danmuList: [],
+				tracks:[],
+				activeDanmus:[],
+				flagTime: 0,
+				danmuItemStyle:{
+					color: '#ffffff',
+					fontSize: '16px',
+					border: 'solid 1px #ffffff',
+					borderRadius: '5px',
+					padding: '2px 2px',
+					backgroundColor: 'rgba(255, 255, 255, 0.1)'
+				},
+				ctx: null,
+				danmuIndex:{}
+			}
+		},
+		mounted() {
+			this.getComments()
+			this.getUser();
+			this.initTracks()
+			if(!this.socket || !this.isSocketOpen) {
+				this.initSocket()
+			}
+		},
+		methods: {
+			back() {
+				uni.navigateBack()
+			},
+			getUser() {
+				const userInfo = uni.getStorageSync('userInfo');
+				if(userInfo&&JSON.stringify(userInfo)!='{}') {
+					this.userInfo = JSON.parse(userInfo)
+					this.userId = this.userInfo.userId || ''
+				}else {
+					this.userInfo = {}
+					this.userId = ''
+				}
+			},
+			getComments() {
+				let that = this
+				getComments({
+					pageNum: this.openCommentStatus==2 ? 1 : this.pageNum,
+					pageSize: this.openCommentStatus==2 ? this.viewCommentNum : this.pageSize,
+					courseId: this.urlOption.courseId,
+					videoId: this.urlOption.videoId,
+					openCommentStatus: this.openCommentStatus
+				}).then(res=>{
+					if(res.code==200){
+						if(this.openCommentStatus==2) {
+							this.danmuList = res.data.list.map(item=>({
+								commentId: item.commentId,
+								content: item.content,
+								time: item.time || this.time,
+								color: "#FFFFFF",
+								mode: item.mode || "scroll",
+								top: null,
+								style: {
+									color: item.isColor==1 ? item.color || this.danmuItemStyle.color : this.danmuItemStyle.color,//是否彩色1是0否
+									fontSize: item.fontSize || this.danmuItemStyle.fontSize, 
+									padding: this.danmuItemStyle.padding,
+									border:this.userInfo.userId ==item.userId ? item.color ? `solid 1px ${item.color}`: this.danmuItemStyle.border : 'none',
+									borderRadius: this.userInfo.userId==item.userId ? this.danmuItemStyle.borderRadius : 0,
+									backgroundColor: this.userInfo.userId==item.userId ? this.danmuItemStyle.backgroundColor : 'transparent'
+								},
+							}))
+							this.initDanmuIndex()
+							that.$emit('getMore',0)
+						} else if(this.openCommentStatus==1) {
+							this.danmuList = []
+							this.activeDanmus = []
+							this.danmuIndex = {};
+							let list = res.data.list.reverse()
+							if (that.pageNum == 1) {
+								that.commentList = list; 
+								that.handleScrollBottom();
+							} else {
+								that.commentList = that.commentList.concat(list);
+							}
+							that.msgs = [...list,...that.msgs]
+							if(that.commentList.length >= res.data.total || that.commentList.length >= Number(this.viewCommentNum||200)) {
+								that.$emit('getMore',1)
+							} else {
+								this.pageNum++
+								that.$emit('getMore',0)
+							}
+						} else {
+							that.danmuList = []
+							that.activeDanmus = []
+							that.danmuIndex = {};
+							that.commentList = [];
+							that.msgs = that.msgs;
+							that.$emit('getMore',0);
+						}
+					}
+					else{
+						that.danmuList = []
+						that.danmuIndex = {};
+						that.commentList = [];
+						that.msgs = that.msgs;
+						that.$emit('getMore',0);
+					}
+				})
+			},
+			saveMsg() {
+				if (this.inputText == "" || this.inputText.trim() == "") {
+					uni.showToast({
+						title: '请输入评论',
+						icon: "none"
+					})
+					return;
+				}
+				if (!this.isSend) {
+					return;
+				}
+				const param = {
+					userId: this.userId || '',
+					userType: 2, // 1-管理员,2-用户
+					courseId: this.urlOption.courseId,
+					videoId: this.urlOption.videoId,
+					type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
+					content: this.inputText,
+					time: this.time,
+					fontSize: '16px',
+					mode: "scroll",
+					color: "#ffffff",
+				}
+				saveMsg(param).then(res=>{
+					if(res.code == 200) {
+						const status = res.status ? 0 : 1
+						this.sendMsg(param,status);
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						})
+					}
+				})
+			},
+			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();
+				// }
+			},
+			handleScrollBottom() {
+				setTimeout(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query.select('#msglist')
+						.boundingClientRect((res) => {
+							if(res) {
+								const scrollH = res.height;
+								this.scrollTop = res.height;
+								this.$emit('getScrollTop',this.scrollTop)
+							}
+						}).exec();
+				},500);
+			},
+			initSocket(type) { 
+				//创建一个socket连接
+				var userId = this.userInfo.userId;
+				var that = this;
+				if (this.socket) {
+					this.socket.close()
+					this.socket = null;
+				}
+				this.socket = uni.connectSocket({
+					url: getApp().globalData.wsUrl + "/app/webSocket/" + userId,
+					multiple: true,
+					success: res => {
+						console.log('WebSocket连接已打开1!');
+						that.isSocketOpen = true
+						// 保持心跳
+						if(that.pingpangTimes) {
+							clearInterval(that.pingpangTimes)
+							that.pingpangTimes= null
+						}
+						that.pingpangTimes=setInterval(()=>{
+							let data={
+								userId: that.userId || '',
+								userType: 2, // 1-管理员,2-用户
+								courseId: that.urlOption.courseId,
+								videoId: that.urlOption.videoId,
+								type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
+								// msg: that.inputText,
+								cmd:'heartbeat'
+							};
+							that.socket.send({
+								data: JSON.stringify(data),
+								success: () => {
+									// console.log('WebSocket发送心条数据!');
+								},
+								fail: () => {
+									that.isSocketOpen=false
+								}
+							});
+						},15000)
+					},
+					error: res => {
+						console.log(res)
+					},
+				})
+				this.socket.onMessage((res) => {
+					// console.log("收到消息parse",JSON.parse(res.data))
+					const redata = JSON.parse(res.data);
+					if(redata.cmd=="heartbeat"){
+						  //心跳
+						  // console.log("heartbeat")
+					}else if(redata.cmd=="sendMsg"){
+						that.isSend=true;
+						that.addMsg(redata);
+					}
+				})
+				//监听socket打开
+				this.socket.onOpen(() => {
+					console.log('WebSocket连接已打开2!');
+					that.isSocketOpen = true
+					that.isSend = true;
+					if(type=='reStart') {
+						// 重连的时候重新发消息
+						this.saveMsg()
+					}
+				})
+				//监听socket关闭
+				this.socket.onClose(() => {
+					that.isSocketOpen = false
+					that.socket = null
+					console.log('WebSocket连接已关闭!');
+					if(that.pingpangTimes) {
+						clearInterval(that.pingpangTimes)
+						that.pingpangTimes= null
+					}
+				})
+				//监听socket错误
+				this.socket.onError((err) => {
+					console.log("socket err:",err)
+					that.isSocketOpen = false
+					that.socket = null
+					if(that.pingpangTimes) {
+						clearInterval(that.pingpangTimes)
+						that.pingpangTimes= null
+					}
+				})
+			},
+			sendMsg(param,status) {
+				if(status == 1) {
+					this.addMsg({msg: param.content,time: param.time},2)
+					return
+				}
+				if (this.isSocketOpen) {
+					var userId = this.userInfo.userId;
+					var data = {
+						userId: this.userId || '',
+						userType: 2, // 1-管理员,2-用户
+						courseId: this.urlOption.courseId,
+						videoId: this.urlOption.videoId,
+						type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
+						msg: param.content,
+						cmd: 'sendMsg',
+						time: param.time,
+						fontSize: '16px',
+						mode: "scroll",
+						color: "#ffffff",
+					};
+					this.socket.send({
+						data: JSON.stringify(data),
+						success: () => {
+							console.log("发送成功")
+							this.isSend = false;
+						},
+						fail: () => {
+							console.log("发送失败")
+						}
+					});
+			
+				}
+			
+			},
+			addMsg(data,type) {
+				console.log("弹幕===")
+				let obj  = {}
+				if (type==2) {
+					obj = {
+						content: data.msg,
+						courseId: this.urlOption.courseId,
+						type: 1,
+						userId: this.userId,
+						userType: 2,
+						videoId: this.urlOption.videoId,
+						nickName: '',
+						time: data.time,
+						fontSize: data.fontSize,
+						mode: data.mode,
+						color: data.color,
+					}
+				} else {
+					obj = {
+						content: data.msg,
+						courseId: this.urlOption.courseId,
+						type: data.type,
+						userId: data.userId,
+						userType: data.userType,
+						videoId: this.urlOption.videoId,
+						nickName: data.nickName,
+						time: data.time,
+						fontSize: data.fontSize,
+						mode: data.mode,
+						color: data.color,
+					}
+				}
+				if(this.openCommentStatus == 1){
+					this.msgs.push(obj)
+					this.handleScrollBottom();
+				} else if(this.openCommentStatus == 2) {
+					this.addDanmuMsg(obj)
+				}
+				this.inputText = ""
+				this.$emit("setInputText")
+			},
+			addDanmuMsg(content) {
+				const id = content.userId +'_' + new Date().getTime()
+				const mystyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					border: content.color ? `solid 1px ${content.color}`: this.danmuItemStyle.border,
+					borderRadius: this.danmuItemStyle.borderRadius,
+					padding: this.danmuItemStyle.padding,
+					backgroundColor: this.danmuItemStyle.backgroundColor
+				}
+				const otherstyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					padding: this.danmuItemStyle.padding,
+				}
+				const mode = content.mode || "scroll"
+				const obj = {
+					commentId: content.commentId || id,
+					userId: content.userId,
+					content: content.content,
+					time: this.flagTime + 1,
+					color: content.color || this.danmuItemStyle.color,
+					style: this.userInfo.userId == content.userId ? mystyle : otherstyle,
+					top: null
+				}
+				if(this.showDanmu == 0) return
+
+				// 如果danmuList超过最大大小,移除旧的弹幕
+				const maxDanmuListSize = 10000; // 设置最大大小
+				if (this.danmuList.length >= maxDanmuListSize) {
+					this.danmuList.shift(); // 移除最旧的弹幕
+				}
+				this.danmuList.push(obj);
+			
+				// 更新索引
+				if (!this.danmuIndex[obj.time]) {
+					this.danmuIndex[obj.time] = [];
+				}
+				this.danmuIndex[obj.time].push(obj);
+			},
+			closeWSocket() {
+				if(this.socket!=null){
+					this.socket.close()
+				}
+				if(this.pingpangTimes) {
+					clearInterval(this.pingpangTimes)
+					this.pingpangTimes= null
+				}
+			},
+			initTracks() {
+				this.tracks = [];
+				const trackHeight = 22; // 每行高度
+				const trackCount = 3;
+				for (let i = 0; i < trackCount; i++) {
+					this.tracks.push({
+						top: i * trackHeight + 10,
+						isFree: true,
+						releaseTime: 0 // 轨道释放时间
+					});
+				}
+			},
+			// 获取字体高度
+			getTextWidth(content) {
+				if (!this.ctx) {
+					this.ctx = uni.createCanvasContext('myCanvas')
+				}
+				const metrics = this.ctx.measureText(content)
+				return Math.ceil(metrics.width)
+			},
+			// 分配轨道
+			getFreeTrack(item) {
+				const screenWidth = uni.getSystemInfoSync().screenWidth;
+				const width = this.getTextWidth(item.content);
+				const passWidth = width + screenWidth;
+				const duration = 8; // 持续时间(秒)
+				const currentTime = Date.now();
+			
+				for (let i = 0; i < this.tracks.length; i++) {
+					if (this.tracks[i].isFree || this.tracks[i].releaseTime <= currentTime) {
+						this.tracks[i].isFree = false;
+						this.tracks[i].releaseTime = currentTime + Math.ceil(duration * 1000 / passWidth * width) + 1000;
+						return this.tracks[i].top;
+					}
+				}
+			
+				// 无可用轨道
+				if (this.userInfo.userId && item.userId == this.userInfo.userId) {
+					// console.log("自己发的弹幕");
+					let trackHeight = this.tracks[this.tracks.length - 1].top;
+					return Math.random() * trackHeight + 16; // 自己发的弹幕随机高度
+				} else {
+					// console.log("无可用轨道");
+					return 'abandon';
+				}
+			},
+			// 初始化时建立索引
+			initDanmuIndex() {
+			    this.danmuIndex = {};
+			    this.danmuList.forEach((item) => {
+			        if (!this.danmuIndex[item.time]) {
+			            this.danmuIndex[item.time] = [];
+			        }
+			        this.danmuIndex[item.time].push(item);
+			    });
+			},
+			// 检测并激活弹幕
+			checkDanmu(flagTime) {
+				this.flagTime = flagTime;
+				if(this.showDanmu == 0) return;
+				const newDanmus = this.danmuList.filter((item) => Math.abs(item.time - this.flagTime) < 1);
+				// 分配轨道高度
+				const aliveNewDanmus = newDanmus.map((item) => {
+					if (!item.top) {
+						item.top = this.getFreeTrack(item);
+					}
+					return item;
+				}).filter((item) => item.top !== 'abandon');
+				// 添加到活跃列表
+				this.activeDanmus = [...this.activeDanmus, ...aliveNewDanmus];
+				this.$emit("getActiveDanmus",this.activeDanmus)
+			},
+			animationend(moveItem, i) {
+				// 移除动画结束的弹幕(性能优化)
+				this.activeDanmus = this.activeDanmus.filter((item) => item.commentId !== moveItem.commentId)
+				this.$emit("getActiveDanmus",this.activeDanmus)
+			},
+		},
+		beforeDestroy() {
+			if(this.socket!=null){
+				this.socket.close()
+			}
+			if(this.pingpangTimes) {
+				clearInterval(this.pingpangTimes)
+				this.pingpangTimes= null
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.empty {
+		@include u-flex(row, center, center);
+		padding: 24rpx 50rpx;
+		color: #999999;
+	}
+	.listbox {
+		white-space: pre-wrap;
+		letter-spacing: 1px;
+		margin-bottom: 16rpx;
+	}
+	.list-name {
+		flex-shrink: 0;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 600;
+		font-size: 28rpx;
+		color: #222222;
+		margin-right: 16rpx;
+	}
+	.my {
+		color: #FF5C03;
+	}
+	.list-con {
+		font-family: PingFang SC, PingFang SC;
+		font-size: 28rpx;
+		color: #222222;
+	}
+	.nav-bar {
+		position: fixed;
+		z-index: 9999;
+		top: 0;
+		left: 0;
+		width: 100%;
+		overflow: hidden;
+
+		.nav-bg {
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			left: 0;
+			top: 0;
+			z-index: 1;
+			background-color: #fff;
+		}
+
+		&-box {
+			position: relative;
+			padding: 0 24rpx;
+			@include u-flex(row, center, flex-start);
+			height: 88rpx;
+			box-sizing: border-box;
+			z-index: 3;
+		}
+
+		&-left {
+			width: 100%;
+			@include u-flex(row, center, flex-start);
+			overflow: hidden;
+
+			image {
+				flex-shrink: 0;
+				width: 64rpx;
+				height: 64rpx;
+				border-radius: 12rpx 12rpx 12rpx 12rpx;
+			}
+		}
+
+		&-name {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 600;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		&-head {
+			flex: 1;
+			overflow: hidden;
+			margin-left: 22rpx;
+			margin-right: 22rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 23rpx;
+			color: #999999;
+		}
+	}
+
+	.page-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+
+	.container-body {
+		padding: 32rpx 30rpx;
+		box-sizing: border-box;
+	}
+
+	.TUI-message-list {
+		width: 100%;
+		box-sizing: border-box;
+	}
+	.chatinput {
+		position: fixed;
+		left: 32rpx;
+		right: 32rpx;
+		z-index: 999;
+		bottom: calc(var(--window-bottom) + 24rpx);
+		height: 96rpx;
+		background-color: green;
+		background: #FFFFFF;
+		box-shadow: 0rpx 8rpx 21rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 24rpx 24rpx 24rpx 24rpx;
+		@include u-flex(row, center, center);
+		padding: 0 24rpx;
+		box-sizing: border-box;
+		.uni-input {
+			flex: 1;
+			margin-right: 32rpx;
+			font-size: 30rpx;
+		}
+	
+		.send {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #FFFFFF !important;
+			flex-shrink: 0;
+			padding: 0 20rpx;
+			height: 72rpx;
+			background: #FF5C03 !important;
+			border-radius: 8rpx 8rpx 8rpx 8rpx;
+			&::after {
+				border: none;
+			}
+		}
+	}
+	// .danmu-item {
+	// 	position: absolute;
+	// 	top: 0;
+	// 	white-space: nowrap;
+	// 	font-size: 16px;
+	// 	height: 20px;
+	// 	display: inline-flex;
+	// 	box-sizing: border-box;
+	// 	align-items: center;
+	// }
+	// .danmuMove {
+	// 	// animation: mymove 8s linear forwards;
+	// 	// animation-duration: 8s;
+	// 	animation-timing-function: linear;
+	// 	animation-delay: 0s;
+	// 	animation-iteration-count: 1;
+	// 	animation-direction: normal;
+	// 	animation-fill-mode: forwards;
+	// 	animation-play-state: running;
+	// 	animation-name: mymove;
+	// 	will-change: transform;
+	// }
+	
+	// @keyframes mymove {
+	// 	from {
+	// 		transform: translateX(100vw);
+	// 	}
+	
+	// 	to {
+	// 		transform: translateX(-100%);
+	// 	}
+	// }
+</style>

+ 157 - 0
pages_course/components/descInfo.vue

@@ -0,0 +1,157 @@
+<template>
+	<view class="descbox" >
+		<template v-if="!isLogin||isAddKf!=1">
+			<view class="descbox-title">{{courseInfo.title}}</view>
+			<view class="descbox-info">
+				<!-- <view class="descbox-info-l">
+					<view>{{courseInfo.views}}次播放</view>
+					<view class="descbox-info-time">总时长:{{courseInfo.totalDuration}}</view>
+				</view> -->
+				<view class="descbox-info-r expand" v-if="textHeight > 21">
+					<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+					<image src="/static/images/course_arrow_up_icon.png" v-show="isExpand"></image>
+					<image src="/static/images/course_arrow_down_icon.png" v-show="!isExpand"></image>
+				</view>
+			</view>
+		</template>
+		<view class="descbox-desc" id="descbox-desc" :style="{height: isExpand ? 'auto': '42rpx'}">
+			<text>{{courseInfo.description}}</text>
+			<view :class="isExpand ? 'expand': 'expand expand-ab'" v-if="isLogin&&isAddKf==1&&textHeight > 21">
+				<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+				<image src="/static/images/course_arrow_up_icon.png" v-show="isExpand"></image>
+				<image src="/static/images/course_arrow_down_icon.png" v-show="!isExpand"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			isLogin: {
+				type: Boolean,
+				default: false,
+			},
+			isAddKf: {
+				type: [String,Number],
+				default: 0,
+			},
+			courseInfo: {
+				type: Object,
+				default: {},
+			},
+		},
+		data() {
+			return {
+				// 是否展开
+				isExpand: true,
+				textHeight: 0, //文本高度
+			}
+		},
+		methods: {
+			// 展开简介
+			handleExpand() {
+				this.isExpand = !this.isExpand
+			},
+			getDescHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#descbox-desc")
+						.boundingClientRect((data) => {
+							if(data) {
+								this.textHeight = data.height
+							}
+						})
+						.exec();
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.descbox {
+		padding: 0 32rpx;
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 28rpx;
+		color: #222222;
+		line-height: 42rpx;
+		word-break: break-word;
+	
+		&-title {
+			padding: 24rpx 0;
+			font-weight: 500;
+			font-size: 32rpx;
+		}
+	
+		&-info {
+			margin-bottom: 24rpx;
+			@include u-flex(row, center, space-between);
+			font-size: 26rpx;
+			color: #757575;
+	
+			&-l {
+				flex: 1;
+				@include u-flex(row, center, flex-start);
+			}
+	
+			&-time {
+				margin-left: 18rpx;
+				padding-left: 18rpx;
+				position: relative;
+	
+				&::after {
+					content: "";
+					width: 4rpx;
+					height: 4rpx;
+					background: #999999;
+					border-radius: 50%;
+					position: absolute;
+					left: 0;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+	
+			&-r {
+				background: transparent;
+			}
+		}
+	
+		&-desc {
+			overflow: hidden;
+			position: relative;
+		}
+	}
+	.expand {
+		flex-shrink: 0;
+		@include u-flex(row, center, flex-end);
+		color: #FF5C03;
+		font-weight: 400;
+		font-size: 24rpx;
+	
+		image {
+			width: 32rpx;
+			height: 32rpx;
+		}
+	}
+	
+	.expand-ab {
+		position: absolute;
+		top: 0;
+		right: 0;
+		box-shadow: -50rpx 0 20rpx 8rpx #FFFFFF;
+		background-color: #fff;
+	}
+	
+</style>

+ 201 - 0
pages_course/components/descInfoNav.vue

@@ -0,0 +1,201 @@
+<template>
+	<view style="background-color: #fff;padding-bottom: 116rpx;">
+		<view class="title-content" id="title-content">
+			<!-- 答题时展示小节课程名,其他展示课程名 -->
+			<!-- 小节课程名 -->
+			<view class="subtitlebox" v-if="isLogin&&isAddKf==1">
+				{{courseInfo.title}}
+			</view>
+			<!-- 课程名字 -->
+			<view class="miantitlebox" v-else>
+				{{courseInfo.courseName}}
+			</view>
+		</view>
+		<view class="descbox" >
+			<template v-if="!isLogin||isAddKf!=1">
+				<view class="descbox-title">{{courseInfo.title}}</view>
+				<view class="descbox-info">
+					<!-- <view class="descbox-info-l">
+						<view>{{courseInfo.views}}次播放</view>
+						<view class="descbox-info-time">总时长:{{courseInfo.totalDuration}}</view>
+					</view> -->
+					<view class="descbox-info-r expand" v-if="textHeight > 21">
+						<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+						<image src="/static/images/course_arrow_up_icon.png" v-show="isExpand"></image>
+						<image src="/static/images/course_arrow_down_icon.png" v-show="!isExpand"></image>
+					</view>
+				</view>
+			</template>
+			<view class="descbox-desc" id="descbox-desc" :style="{height: isExpand ? 'auto': '42rpx'}">
+				<text>{{courseInfo.description}}</text>
+				<view :class="isExpand ? 'expand': 'expand expand-ab'" v-if="isLogin&&isAddKf==1&&textHeight > 21">
+					<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+					<image src="/static/images/course_arrow_up_icon.png" v-show="isExpand"></image>
+					<image src="/static/images/course_arrow_down_icon.png" v-show="!isExpand"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			isLogin: {
+				type: Boolean,
+				default: false,
+			},
+			isAddKf: {
+				type: [String,Number],
+				default: 0,
+			},
+			courseInfo: {
+				type: Object,
+				default: {},
+			},
+		},
+		data() {
+			return {
+				// 是否展开
+				isExpand: true,
+				textHeight: 0, //文本高度
+			}
+		},
+		methods: {
+			// 展开简介
+			handleExpand() {
+				this.isExpand = !this.isExpand
+			},
+			getDescHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#descbox-desc")
+						.boundingClientRect((data) => {
+							if(data){
+								this.textHeight = data.height
+							}
+						})
+						.exec();
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.miantitlebox {
+		padding: 30rpx 32rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 36rpx;
+		color: #222222;
+	}
+	.subtitlebox {
+		padding: 30rpx 0;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 36rpx;
+		color: #222222;
+	}
+	.title-content {
+		padding: 0 32rpx;
+		background-color: #fff;
+		font-size: 28rpx;
+		line-height: 1.6;
+	
+		.title {
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #414858;
+		}
+	
+		.time-or-subtitle {
+			margin-top: 12rpx;
+			color: #666666;
+		}
+	}
+	.descbox {
+		padding: 14rpx 32rpx;
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 28rpx;
+		color: #222222;
+		line-height: 42rpx;
+		word-break: break-word;
+	
+		&-title {
+			margin-bottom: 24rpx;
+			font-weight: 500;
+			font-size: 32rpx;
+		}
+	
+		&-info {
+			margin-bottom: 24rpx;
+			@include u-flex(row, center, space-between);
+			font-size: 26rpx;
+			color: #757575;
+	
+			&-l {
+				flex: 1;
+				@include u-flex(row, center, flex-start);
+			}
+	
+			&-time {
+				margin-left: 18rpx;
+				padding-left: 18rpx;
+				position: relative;
+	
+				&::after {
+					content: "";
+					width: 4rpx;
+					height: 4rpx;
+					background: #999999;
+					border-radius: 50%;
+					position: absolute;
+					left: 0;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+	
+			&-r {
+				background: transparent;
+			}
+		}
+	
+		&-desc {
+			overflow: hidden;
+			position: relative;
+		}
+	}
+	.expand {
+		flex-shrink: 0;
+		@include u-flex(row, center, flex-end);
+		color: #FF5C03;
+		font-weight: 400;
+		font-size: 24rpx;
+	
+		image {
+			width: 32rpx;
+			height: 32rpx;
+		}
+	}
+	
+	.expand-ab {
+		position: absolute;
+		top: 0;
+		right: 0;
+		box-shadow: -50rpx 0 20rpx 8rpx #FFFFFF;
+		background-color: #fff;
+	}
+	
+</style>

+ 129 - 0
pages_course/components/ques.vue

@@ -0,0 +1,129 @@
+<template>
+	<view class="ques-content">
+		<view class="ques-content-tit" v-show="openCommentStatus!=1">问答题</view>
+		<view v-for="(item,index) in quesList" :key="index">
+			<view class="ques-title">
+				<text>{{index + 1}}.</text>
+				<view class="ques-type" v-show="item.type == 1 || item.type == 2">
+					{{item.type == 1 ? '单选' : item.type == 2 ? '多选' : ''}}
+				</view>
+				<text>{{item.title}}</text>
+			</view>
+			<view :class="isAnswer(item,option.name) ?'ques-option ques-option-active':'ques-option'"
+				v-for="(option,idx) in item.questionOption" :key="idx" @click="handleAnswer(item,option)">
+				<view>
+					{{numberToLetter(idx)}}.
+				</view>
+				<view>{{option.name}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: ['quesList','openCommentStatus'],
+		data() {
+			return {
+				
+			}
+		},
+		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
+					}
+				}
+			}
+		},
+		methods: {
+			numberToLetter(num) {
+				// 将数字转换为字母的 ASCII 码
+				let letterCode = num + 65;
+				// 将 ASCII 码转换为大写字母
+				let letter = String.fromCharCode(letterCode);
+				return letter;
+			},
+			handleAnswer(item, option) {
+				const param = {
+					item,
+					option
+				}
+				this.$emit("handleAnswer", param)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+
+	.ques-content {
+		background-color: #fff;
+		padding: 24rpx 32rpx 116rpx 32rpx;
+		box-sizing: border-box;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 28rpx;
+		color: #222222;
+	}
+
+	.ques-content-tit {
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 600;
+		font-size: 36rpx;
+		color: #222222;
+	}
+
+	.ques-title {
+		margin: 48rpx 0 34rpx 0;
+		font-weight: 500;
+		font-size: 32rpx;
+		white-space: normal;
+	}
+
+	.ques-type {
+		flex-shrink: 0;
+		min-width: 72rpx;
+		min-height: 40rpx;
+		padding: 0 12rpx;
+		margin: 0 12rpx;
+		box-sizing: border-box;
+		background: #FF5C03;
+		border-radius: 8rpx 8rpx 8rpx 8rpx;
+		line-height: 40rpx;
+		text-align: center;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #FFFFFF;
+		display: inline-block;
+	}
+
+	.ques-option {
+		min-height: 88rpx;
+		padding: 24rpx 32rpx;
+		box-sizing: border-box;
+		margin-bottom: 24rpx;
+		background: #F5F7FA;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+		display: flex;
+		align-items: center;
+
+		&-active {
+			color: #FF5C03 !important;
+			background: #FCF0E7 !important;
+		}
+	}
+</style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 249 - 533
pages_course/video.vue


+ 2199 - 0
pages_course/videoOld.vue

@@ -0,0 +1,2199 @@
+<template>
+	<view class="content">
+		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<view class="header-title" :style="{width:menuButtonLeft + 'px',height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">{{courseInfo.title}}</view>
+		</view>
+		<view class="video-box">
+			<image v-if="!isLogin || isAddKf!=1" class="video-poster" :src="courseInfo.imgUrl" mode="aspectFill">
+			</image>
+			<video 
+			@timeupdate="onTimeUpdate" 
+			@progress="progressChange" 
+			@error="videoErrorCallback" 
+			@play="getPlay"
+			@pause="getPause" 
+			@ended="getEnded" 
+			@fullscreenchange="fullscreenchange"
+			@controlstoggle="controlstoggle"
+			@waiting="getWaiting"
+			:title="courseInfo.title"
+			style="width: 100%;height: 420rpx;" 
+			:poster="poster"  
+			id="video-content-box"  
+			controls
+			:show-fullscreen-btn="true"
+			:auto-pause-if-open-native="true"
+			:auto-pause-if-navigate="true"
+			:enable-progress-gesture="false" 
+			:show-progress="true"
+			:picture-in-picture-mode="[]"
+			:show-background-playback-button="false"
+			:src="videoUrl"
+			>
+			<!-- :danmu-list="danmuList"
+			enable-danmu
+			danmu-btn -->
+				<!-- <template v-if="showDanmu==1">
+					<text v-for="(item, index) in activeDanmus" :key="item.id" class="danmu-item danmuMove" 
+						:style="{
+						  top: item.top + 'px',
+						  ...item.style,
+						  'animation-duration': '8s'
+						 }" @animationend="animationend(item,index)">
+						{{ item.text }}
+					</text>
+				</template>
+				<cover-view class="video-danmu-btnbox" :style="{display: isfull&&crtShow&&isLogin&&isAddKf==1 ? 'block':'none'}">
+					<cover-image class="video-danmu-image"
+					 src="https://cos.his.cdwjyyh.com/fs/20250418/beaf9df1a6204b8babc3e28d9b563c62.png"
+					 @click="openDanmu(1)"></cover-image>
+				</cover-view> -->
+			</video>
+		</view>
+		<view class="title-content" id="title-content">
+			<!-- 答题时展示小节课程名,其他展示课程名 -->
+			<!-- 小节课程名 -->
+			<view class="subtitlebox" v-if="isLogin&&isAddKf==1">
+				{{courseInfo.title}}
+			</view>
+			<!-- 课程名字 -->
+			<view class="miantitlebox" v-else>
+				{{courseInfo.courseName}}
+			</view>
+		</view>
+		<scroll-view class="scroll-view" :style="{height: height}" :scroll-top="scrollTop" scroll-y="true">
+			<!-- 介绍 -->
+			<view class="descbox">
+				<template v-if="!isLogin||isAddKf!=1">
+					<view class="descbox-title">{{courseInfo.title}}</view>
+					<view class="descbox-info">
+						<!-- <view class="descbox-info-l">
+							<view>{{courseInfo.views}}次播放</view>
+							<view class="descbox-info-time">总时长:{{courseInfo.totalDuration}}</view>
+						</view> -->
+						<view class="descbox-info-r expand" v-if="textHeight > 21">
+							<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+							<image :src="baseUrl+'/images/course_arrow_up_icon.png'" v-show="isExpand"></image>
+							<image :src="baseUrl+'/images/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+						</view>
+					</view>
+				</template>
+				<view class="descbox-desc" id="descbox-desc" :style="{height: isExpand ? 'auto': '42rpx'}">
+					<text>{{courseInfo.description}}</text>
+					<view :class="isExpand ? 'expand': 'expand expand-ab'" v-if="isLogin&&isAddKf==1&&textHeight > 21">
+						<text @click="handleExpand">{{isExpand ? '收起简介' : '展开简介'}}</text>
+						<image :src="baseUrl+'/images/course_arrow_up_icon.png'" v-show="isExpand"></image>
+						<image :src="baseUrl+'/images/course_arrow_down_icon.png'" v-show="!isExpand"></image>
+					</view>
+				</view>
+			</view>
+			<!-- 问题 -->
+			<view class="ques-content" v-if="isLogin&&isAddKf==1">
+				<view class="ques-content-tit">问答题</view>
+				<view v-for="(item,index) in quesList" :key="index">
+					<view class="ques-title">
+						<text>{{index + 1}}.</text>
+						<view class="ques-type" v-show="item.type == 1 || item.type == 2">
+							{{item.type == 1 ? '单选' : item.type == 2 ? '多选' : ''}}
+						</view>
+						<text>{{item.title}}</text>
+					</view>
+					<view
+					:class="isAnswer(item,option.name) ?'ques-option ques-option-active':'ques-option'" 
+					v-for="(option,idx) in item.questionOption" 
+					:key="idx" 
+					@click="handleAnswer(item,option)">
+						<view>
+							{{numberToLetter(idx)}}.
+						</view>
+						<view>{{option.name}}</view>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+		<!-- 线路 -->
+		<view class="video-line" @click="openPop" v-if="isLogin&&isAddKf==1">
+			<image :src="baseUrl+'/images/changePlayer-icon.png'"></image>
+			<text>线路{{numberToChinese(lineIndex + 1)}}</text>
+		</view>
+		<!-- 线路弹窗 -->
+		<uni-popup ref="popup" type="bottom"  class="full-width-popup">
+			<view class="popupbox">
+				<view class="popupbox-head">
+					<text>线路选择</text>
+					<image class="close-icon" :src="baseUrl+'/images/tc_close_icon.png'" mode="aspectFill" @click="close">
+					</image>
+				</view>
+				<view class="popupbox-content">
+					<view :class="lineIndex == index ? 'line-item line-active': 'line-item'"
+						v-for="(it,index) in lineList" :key="index" @click="handleLine(index)">
+						线路{{numberToChinese(lineIndex + 1)}}</view>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 发送弹幕 -->
+		<!-- <view class="video-line danmu-line" @click="openDanmu(0)" v-if="isLogin&&isAddKf==1">
+			<image class="set_image" src="https://cos.his.cdwjyyh.com/fs/20250418/5e508642737a44169061382566043ac9.png" mode="aspectFill"></image>
+			<text>发弹幕</text>
+		</view> -->
+		<!-- 发送弹幕弹窗 -->
+		<uni-popup ref="danmuPopup" type="bottom" style="z-index: 999;" @change="changeShowPopup">
+			<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="140" 
+					clearable 
+					v-model.trim="danmuIput"></u-input>
+					<button class="danmuPopup-send"  :disabled="danmubtnLoading"  @click="sendDanmu">发送</button>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 答题弹窗 -->
+		<uni-popup ref="answerPopup" type="center" :show="answerPopup">
+			<view :class="errTitle == '恭喜你,回答正确' ? 'answerPopup-box bg':'answerPopup-box'">
+				<!-- 正确 -->
+				<image class="tipimg" v-if="errTitle == '恭喜你,回答正确'" :src="baseUrl+'/images/course_answer_img.png'"
+					mode="aspectFill"></image>
+				<!-- 错误 -->
+				<image class="tipimg" v-else :src="baseUrl+'/images/course_answer_incorrectly_img.png'" mode="aspectFill">
+				</image>
+				<view class="answerPopup-title">{{errTitle}}</view>
+				<view class="answerPopup-desc" v-html="errDesc"></view>
+				<!-- 选择奖励 -->
+				<view class="reward-list" v-if="errTitle == '恭喜你,回答正确'">
+					<radio-group class="reward-list-group" @change="rewardChange">
+						<label class="reward-list-option" v-for="(item, index) in rewardType" :key="item.value">
+							<radio :value="item.value+ ''" :checked="item.value == currentReward"
+								activeBorderColor="#FF5C03" activeBackgroundColor="#FF5C03"
+								style="transform:scale(0.7)" />
+							<view :style="{color: item.value == currentReward ? '#FF5C03':''}">{{item.name}}</view>
+						</label>
+					</radio-group>
+				</view>
+				<!-- 错误题目 -->
+				<view class="errQuesbox" v-if="errQues&&errQues.length>0">
+					<view class="errQuesbox-item textOne" v-for="(it,index) in errQues" :key="index">{{it.title}}</view>
+				</view>
+				<view class="answerPopup-btn" v-if="errTitle == '恭喜你,回答正确'" @click="closeAnswerPopup">确认</view>
+				<view class="tipsPopup-btn-box" v-else
+					:style="{marginTop: errQues&&errQues.length>0 ? '40rpx':'54rpx'}">
+					<view class="tipsPopup-btn" @click="closeAnswerPopup">{{remain > 0 ? '重新答题': '确认'}}</view>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 客服二维码弹窗 -->
+		<uni-popup ref="kfPopup" type="center" :mask-click="false">
+			<view class="kfqrcode-box">
+				<image class="kfqrcode" :src="qrcode" show-menu-by-longpress="true"></image>
+				<view v-show="qrcodeMsg" style="margin-top: 30rpx;" v-html="qrcodeMsg"></view>
+				<image class="kfqrcode-close" :src="baseUrl+'/images/course_close_white_icon.png'" mode="aspectFill"
+					@click="closeKFPop"></image>
+			</view>
+		</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>
+			<!-- <view @click="checked=!checked" class="agreement" v-if="!isLogin">
+				<radio value="r1" :checked="checked" color="#ff5c03" activeBorderColor="#ff5c03"
+					style="transform:scale(0.6);" />
+				<view>阅读并同意<text style="color: #ff5c03;" @click.stop="goWeb(0)">《用户协议》</text>和<text
+						style="color: #ff5c03;" @click.stop="goWeb(1)">《隐私协议》</text></view>
+			</view> -->
+			<view class="footer-tips">重庆云联融智提供技术支持</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { generateRandomString } from "@/utils/common.js"
+	import dayjs from 'dayjs';
+	import {
+		getErrMsg,
+		getH5CourseByVideoId,
+		getH5CourseVideoDetails,
+		courseAnswer,
+		getFinishCourseVideo,
+		getIsAddKf,
+		getInternetTraffic,
+		getIntegralByH5Video,
+		sendReward,
+		loginByMp,
+		getRealLink,
+		getDanmuList
+	} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestPath'),
+				// 1 红包 2 积分
+				rewardType: [{
+					name: '红包奖励',
+					value: 1
+				}, {
+					name: '积分奖励',
+					value: 2
+				}],
+				currentReward: 1,
+				player: null,
+				loading: true,
+				progress: 0,
+				code: null,
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				scrollTop: 0,
+				height: '0px',
+				isLogin: true,
+				videoUrl: "",
+				videoId: "",
+				//现在的时长
+				playTime: 0,
+				//总时长
+				duration: 0,
+				playDuration: 0,
+				// 用于续播
+				playDurationSeek: 0,
+				// 温馨提醒时间节点,
+				tipsTime: 0,
+				tipsOpen: false,
+				config: {},
+				courseInfo: {},
+				quesList: [],
+				lineList: [],
+				// 错题
+				errQues: [],
+				// 答题机会
+				remain: 0,
+				errTitle: "",
+				errDesc: "",
+				showPlay: true,
+				showControls: false,
+				playStatus: "",
+				isfull: false,
+				isAddKf: 0,
+				lineIndex: 0,
+				// 是否展开
+				isExpand: false,
+				textHeight: 0, //文本高度
+				qwUserId: "",
+				qrcode: "",
+				corpId: "",
+				qrcodeMsg: "",
+				urlOption: {},
+				bufferRate: 0, // 缓冲时间
+				uuId: "",
+				isEnded: false,
+				// 是否允许拖动进度条
+				linkType: 0,
+				ip: null,
+				checked: true,
+				isFinish: 0, // 是否完课
+				interval: null,
+				intervalIntegral: null, // 积分定时
+				options: {
+					sources: [{
+						src: ""
+					}],
+					poster: "",
+					live: false /* 是否直播 */ ,
+					controls: true,
+					autoplay: false,
+					licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1323137866_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl,
+					LicenseKey: 'bcc5bd9a14b798b48c52ff005a21d926',
+					controlBar: {
+						volumePanel: false,
+						playbackRateMenuButton: false,
+						QualitySwitcherMenuButton: false,
+						// progressControl: false
+					},
+					plugins: {
+						// ProgressMarker: false,
+						ContextMenu: {
+							statistic: false
+						}
+					},
+				},
+				// 错误请求次数
+				errorCount: 0,
+				answerPopup: false,
+				sortLink:"",
+				// 课程是否过期
+				isExpire: false,
+				menuButtonLeft: 281,
+				menuButtonH: 45,
+				timer: null,
+				flag: false,
+				danmuList: [],
+				danmuIput: '',
+				focus: false,
+				danmubtnLoading: false,
+				openDanmuType: 0,
+				socket:null,
+				isSocketOpen: false,
+				isSend:true,
+				reOpenSocket: false,
+				pingpangTimes:null,
+				danmuboxHeight: 0,
+				user: {},
+				crtShow: true,
+				isCheckRealUrl: false,
+				activeDanmus:[],
+				flagTime: 0,
+				danmuItemStyle:{
+					color: '#ffffff',
+					fontSize: '16px',
+					border: 'solid 1px #ffffff',
+					borderRadius: '5px',
+					padding: '2px 2px',
+					backgroundColor: 'rgba(255, 255, 255, 0.1)'
+				},
+				showDanmu: 1,
+				ctx: null
+			}
+		},
+		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
+					}
+				}
+			}
+		},
+		onLoad(option) {
+			this.code = option.code
+			this.urlOption = option.course ? JSON.parse(option.course) : {}
+			this.videoId = this.urlOption.videoId
+			this.qwUserId = this.urlOption.qwUserId || ''
+			this.corpId = this.urlOption.corpId || ''
+			this.linkType = this.urlOption.linkType || 0
+			// if (this.code) {
+			// 	this.loginByMp()
+			// }
+			var that=this;
+			if (this.videoId) {
+				this.getH5CourseByVideo()
+			}
+			this.sortLink = this.urlOption.link || ''
+			this.getMenuButton()
+			// #ifndef H5
+			uni.onKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+			if(this.socket!=null){
+				this.socket.close()
+				clearInterval(this.pingpangTimes)
+				this.socket = null
+			}
+			this.initTracks()
+		},
+		onShow() {
+			this.tipsOpen = false
+			this.isExpand = true
+			// this.isLogin = this.$isLoginCourse()
+			this.uuId = generateRandomString(16)
+			if(uni.getStorageSync('userInfo') && JSON.stringify(uni.getStorageSync('userInfo'))!='{}') {
+				this.user = JSON.parse(uni.getStorageSync('userInfo'))
+			} else {
+				this.user = {}
+			}
+			if(this.sortLink){
+				this.getLink()
+			} else {
+				uni.showToast({
+					title: 'sortLink is not found',
+					icon: 'none'
+				});
+			}
+		},
+		mounted() {
+			this.getIP()
+			this.getHeight()
+		},
+		onHide() {
+			// this.player = uni.createVideoContext('video-content-box');
+			if (this.player) {
+				this.player.pause()
+			}
+			// if (this.interval != null) {
+			// 	clearInterval(this.interval)
+			// 	this.interval = null
+			// }
+		},
+		onUnload() {
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			if(this.socket!=null){
+				this.socket.close()
+				clearInterval(this.pingpangTimes)
+				this.socket = null
+			}
+			// #ifndef H5
+			uni.offKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+			this.clearIntegral()
+		},
+		beforeDestroy() {
+			this.player = uni.createVideoContext('video-content-box');
+			if (this.player) {
+				this.player.stop()
+				this.player = null
+			}
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			if(this.socket!=null){
+				this.socket.close()
+				clearInterval(this.pingpangTimes)
+				this.socket = null
+			}
+			// #ifndef H5
+			uni.offKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+			this.clearIntegral()
+		},
+		methods: {
+			numberToChinese(number) {
+				if (number) {
+					const chineseNumber = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
+					return chineseNumber[number - 1];
+				} else {
+					return ''
+				}
+			},
+			keyboardHeightChange(res) {
+				// #ifndef H5
+				console.log("this.danmuboxHeight",this.danmuboxHeight)
+				 this.danmuboxHeight = res.height
+				// #endif
+			},
+			getMenuButton(){
+				const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+				this.menuButtonLeft = menuButtonInfo.left
+				this.menuButtonH = menuButtonInfo.height
+			},
+			//播放时间更新事件方法
+			onTimeUpdate(e){
+				let currentTime = Math.round(e.detail.currentTime)
+				if (this.playDurationSeek > 0) {
+					this.playTime = this.playDurationSeek
+					this.throttle(() => this.changeTime(this), 1000, false)
+				} else {
+					if (this.linkType != 1 && (currentTime - this.playTime > 3 || currentTime - this.playTime < -3)&&this.isFinish!=1) {
+						uni.showToast({
+							title: '不能快进哦',
+							icon: 'none',
+						});
+						currentTime = this.playTime
+						this.player.seek(this.playTime);
+					}
+					this.playTime = currentTime
+				}
+				if (Math.floor(e.detail.currentTime) != this.flagTime) {
+					this.flagTime = Math.floor(e.detail.currentTime)
+					this.checkDanmu()
+				}
+			},
+			changeTime(that,e) {
+				that.playDurationSeek = 0
+			},
+			videoErrorCallback(e) {
+				this.errorCount++
+				if (this.errorCount > 3) return
+				if (this.interval != null) {
+					clearInterval(this.interval)
+				}
+				this.clearIntegral()
+				console.log(e)
+				this.getErrMsg(e.target.errMsg)
+				this.getH5CourseVideoDetails('error')
+			},
+			// 当开始/继续播放时触发play事件
+			getPlay() {
+				this.errorCount = 0
+				this.judgeDuration()
+			},
+			getPause() {
+				this.clearIntegral()
+			},
+			getEnded() {
+				this.clearIntegral()
+				this.isEnded = true
+				this.getFinishCourseVideo()
+			},
+			getWaiting() {
+				this.getErrMsg('','waiting')
+			},
+			fullscreenchange(event) {
+				this.isfull = event.detail.fullScreen
+				this.initTracks()
+			},
+			controlstoggle(event) {
+				this.crtShow =  event.detail.show
+			},
+			getIP() {
+				uni.request({
+					url: 'https://ipinfo.io/json', //仅为示例,并非真实接口地址。
+					method: 'GET',
+					success: (res) => {
+						this.ip = res.data.ip
+					}
+				});
+			},
+			getHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#title-content")
+						.boundingClientRect((data) => {
+							this.height =
+								`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 164rpx - 88rpx)`
+						})
+						.exec();
+				})
+			},
+			getDescHeight() {
+				this.$nextTick(() => {
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#descbox-desc")
+						.boundingClientRect((data) => {
+							this.textHeight = data.height
+						})
+						.exec();
+				})
+			},
+			numberToLetter(num) {
+				// 将数字转换为字母的 ASCII 码
+				let letterCode = num + 65;
+				// 将 ASCII 码转换为大写字母
+				let letter = String.fromCharCode(letterCode);
+				return letter;
+			},
+			updateTime() {
+				var that = this;
+				if (this.interval != null) {
+					clearInterval(this.interval)
+				}
+				this.interval = setInterval(function() {
+					that.getFinishCourseVideo()
+					that.getInternetTraffic()
+				}, 60000);
+			},
+			judgeDuration() {
+				var that = this;
+				if (this.intervalIntegral != null) {
+					clearInterval(this.intervalIntegral)
+					this.intervalIntegral = null
+				}
+				// 观看10分钟获得积分
+				this.intervalIntegral = setInterval(function() {
+					that.getIntegralByH5Video()
+				}, 600000);
+			},
+			clearIntegral() {
+				if (this.intervalIntegral != null) {
+					clearInterval(this.intervalIntegral)
+					this.intervalIntegral = null
+				}
+			},
+			// 展开简介
+			handleExpand() {
+				this.isExpand = !this.isExpand
+			},
+			getH5CourseByVideo() {
+				this.loading = true
+				getH5CourseByVideoId({
+					videoId: this.videoId
+				}).then(res => {
+						this.loading = false
+						if (res.code == 200) {
+							this.courseInfo = res.data
+							uni.setNavigationBarTitle({
+								title: this.courseInfo && this.courseInfo.title ? this.courseInfo.title : ''
+							});
+						}
+						this.getHeight()
+						this.getDescHeight()
+					},
+					rej => {
+						this.loading = false
+					}
+				).catch(() => {
+					this.loading = false
+				})
+			},
+			getH5CourseVideoDetails(type) {
+				getH5CourseVideoDetails(this.urlOption).then(res => {
+						if (res.code == 200) {
+							this.config = res.config || {}
+							this.isFinish = res.isFinish || 0
+							this.duration = res.course && res.course.duration ? res.course.duration : 0
+							this.playDuration = res.playDuration || 0
+							this.playDurationSeek = res.playDuration || 0
+							this.tipsTime = res.tipsTime || 0
+							let lineList = []
+							if (res.course && res.course.lineOne) {
+								lineList.push(res.course.lineOne)
+							}
+							if (res.course && res.course.lineTwo) {
+								lineList.push(res.course.lineTwo)
+							}
+							if (res.course && res.course.lineThree) {
+								lineList.push(res.course.lineThree)
+							}
+							this.lineList = lineList
+							if (!this.player || type == 'error') {
+								this.lineIndex = this.config.defaultLine
+								this.videoUrl = lineList[this.lineIndex]
+								this.poster= res.course && res.course.imgUrl ? res.course.imgUrl : ''
+								// this.options.sources = [{
+								// 	src: this.videoUrl
+								// }]
+								// this.options.poster = res.course && res.course.imgUrl ? res.course.imgUrl : ''
+								// this.initVideo()
+								this.playTime = this.playDuration >= this.duration ? 0 : this.playDuration
+								setTimeout(()=>{
+									this.player = uni.createVideoContext('video-content-box');
+									this.player.seek(this.playTime)
+									this.player.play();
+								},500);
+								// this.getDanmuList()
+								// if (this.socket) {
+								// 	this.socket.close({
+								// 		success:()=>{
+								// 			this.reOpenSocket = true
+								// 			clearInterval(this.pingpangTimes)
+								// 		}
+								// 	})
+								// } else {
+								// 	this.initSocket()
+								// }
+							} else {
+								// let div = document.querySelector(".vjs-progress-control");
+								// if(div) {
+								// 	if (this.isFinish == 1 || this.isEnded || this.linkType == 1) {
+								// 		div.style.pointerEvents = "auto";
+								// 	} else {
+								// 		div.style.pointerEvents = "none"; //禁止所有事件
+								// 	}
+								// }
+								this.playTime = this.playTime > this.playDuration ? this.playTime : this.playDuration >= this.duration ? 0 : this.playDuration
+								this.player.seek(this.playTime)
+								this.player.play();
+							}
+							this.updateTime();
+							this.quesList = res.questions && res.questions.length > 0 ? res.questions : [],
+								this.quesList = this.quesList.map(item => ({
+									...item,
+									questionOption: JSON.parse(item.question),
+									answer: ''
+								}))
+						}
+						this.getHeight()
+						this.getDescHeight()
+					},
+					rej => {}
+				)
+			},
+			handleAnswer(item, option, idx) {
+				let time = this.playTime
+				if(this.isEnded) {
+					time = this.duration
+				} else {
+					if(time < this.playDuration&&this.isFinish!=1) {
+						// 没完课且小于续播的时间
+						time = this.playDuration
+					}
+				}
+				if(Number(this.duration || 0) == 0 || time < this.duration - 60) {
+					uni.showToast({
+						title: "请先观看完整课程再答题哦~",
+						icon: "none"
+					})
+					return
+				}
+
+				if (item.type == 1) {
+					// 单选option
+					item.answer = option.name
+				} else if (item.type == 2) {
+					// 多选
+					let answer = item.answer ? item.answer.split(',') : []
+					if (answer.indexOf(option.name) === -1) {
+						answer.push(option.name)
+						item.answer = answer.join(',')
+					} else {
+						answer.splice(answer.indexOf(option.name), 1)
+						item.answer = answer.join(',')
+					}
+				}
+			},
+			submit() {
+				if(this.isExpire){
+					uni.showToast({
+						title: '课程已过期或链接无效',
+						icon: 'none'
+					});
+					return
+				}
+				// 登录
+				this.$isLoginCourse().then(
+					res => {
+						if(res){
+							if (this.isAddKf == 1&&this.isCheckRealUrl) {
+								// 答题
+								// 您已提交过答案,请领取红包
+								this.courseAnswer()
+							} else {
+								// 添加客服
+								if (this.videoId && this.qwUserId) {
+									this.getIsAddKf()
+								} else {
+									uni.showToast({
+										title: '请添加客服',
+										icon: 'none'
+									})
+								}
+							} 
+						} else{
+							this.goLogin()
+						}
+					},
+					rej => {}
+				);
+			},
+			// 答题
+			courseAnswer() {
+				let time = this.playTime
+				if (this.isEnded) {
+					time = this.duration
+				} else {
+					if (time < this.playDuration && this.isFinish != 1) {
+						// 没完课且小于续播的时间
+						time = this.playDuration
+					}
+				}
+				if (Number(this.duration || 0) == 0 || time < this.duration - 60) {
+					uni.showToast({
+						title: "请先观看完整课程再答题哦~",
+						icon: "none"
+					})
+					return
+				}
+				if (this.quesList.some(item => !item.answer)) {
+					uni.showToast({
+						title: "请确认是否答完所有题目",
+						icon: "none"
+					})
+					return
+				}
+				const questions = this.quesList.map(obj => {
+					const {
+						questionOption,
+						...rest
+					} = obj;
+					return rest;
+				});
+				if(!this.isCheckRealUrl) return;
+				const param = {
+					...this.urlOption,
+					questions: questions,
+					videoId: this.videoId,
+					duration: this.playTime,
+				}
+				this.errTitle = ""
+				this.errDesc = ""
+				this.errQues = []
+				courseAnswer(param).then(res => {
+						if (res.code == 200) {
+							if (res.incorrectQuestions) {
+								// 答题失败
+								if (res.incorrectQuestions.length > 0) {
+									this.errQues = res.incorrectQuestions
+								}
+								this.remain = res.remain || 0
+								if (res.remain > 0) {
+									this.errTitle = "很遗憾答错了"
+									this.errDesc = `<span style="color:#FF5C03">还有${res.remain}次机会,继续加油</span>`
+									this.$refs.answerPopup.open("center")
+								}
+							} else {
+								// 答题成功
+								this.errTitle = "恭喜你,回答正确"
+								this.errDesc = `请选择奖励`
+								this.$refs.answerPopup.open("center")
+							}
+						} else {
+							if (res.msg == "该课题到达答错次数限制") {
+								this.errTitle = "答题次数超过限制"
+								this.errDesc = "以后的课程要认真学习哦"
+								this.$refs.answerPopup.open("center")
+							} else {
+								uni.showToast({
+									title: res.msg,
+									icon: "none"
+								})
+							}
+						}
+					},
+					rej => {}
+				)
+			},
+			// 选择
+			rewardChange(e) {
+				this.currentReward = e.detail.value
+			},
+			closeAnswerPopup() {
+				this.$refs.answerPopup.close()
+				if(!this.isCheckRealUrl) return;
+				if (this.errTitle == '恭喜你,回答正确') {
+					const param = {
+						...this.urlOption,
+						rewardType: Number(this.currentReward),
+						source: 2
+					}
+					sendReward(param).then(res => {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+						// if(res.code == 200) {
+						// 	//重构 发红包,后台通过OPENID发零钱到 账
+						// 	//this.initWXConfig(res.package)
+						// }else {
+						// 	uni.showToast({
+						// 		title: res.msg,
+						// 		icon: 'none'
+						// 	})
+						// }
+					})
+				}
+			},
+			// 线路
+			openPop() {
+				this.$refs.popup.open('bottom')
+			},
+			close() {
+				this.$refs.popup.close()
+			},
+			handleLine(index) {
+				var that=this;
+				if (this.lineIndex == index && this.videoUrl == this.lineList[index]) {
+					this.close()
+					return
+				} else {
+					// let div = document.querySelector(".vjs-progress-control");
+					// if(div) {
+					// 	if (this.isFinish == 1 || this.isEnded || this.linkType == 1) {
+					// 		div.style.pointerEvents = "auto";
+					// 	} else {
+					// 		div.style.pointerEvents = "none"; //禁止所有事件
+					// 	}
+					// }
+					this.lineIndex = index
+					this.videoUrl = this.lineList[index]
+					this.tipsOpen = false
+					this.playDurationSeek = this.playTime || 0
+					this.player = uni.createVideoContext('video-content-box');
+					setTimeout(function(){
+						that.player.seek(that.playDurationSeek)
+						that.player.play();
+					},500);
+					// this.player.src(this.lineList[index])
+					// this.player.one('loadedmetadata', () => {
+					// 	this.player.currentTime(this.playDurationSeek);
+					// 	this.player.play();
+					// });
+					this.close()
+				}
+
+			},
+			// 客服
+			getIsAddKf() {
+				this.qrcode = ''
+				this.qrcodeMsg = ''
+				this.isAddKf = 0
+				// {videoId: this.videoId,qwUserId: this.qwUserId,corpId: this.corpId}
+				getIsAddKf(this.urlOption).then(res => {
+						if (res.code == 200) {
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							this.getH5CourseVideoDetails()
+						} else if (res.code == 400) {
+							this.isAddKf = 0
+							this.isCheckRealUrl = false
+							this.qrcode = res.qrcode
+							this.qrcodeMsg = res.msg
+							this.$refs.kfPopup.open()
+						} else if (res.code == 504) {
+							// 登录
+							this.isCheckRealUrl = false
+							this.goLogin()
+						} else if (res.code == 566) {
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							// 官方群发通用链接
+							const url = res.courseLink.realLink.split('?course=')[1]
+							this.urlOption = JSON.parse(url)
+							this.getH5CourseVideoDetails()
+						} else {
+							this.isCheckRealUrl = false
+							this.isAddKf = 0
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							});
+						}
+					},
+					err => {}
+				);
+			},
+			closeKFPop() {
+				this.$refs.kfPopup.close()
+			},
+			getFinishCourseVideo() {
+				if (!this.playTime || !this.isCheckRealUrl) return
+				// {videoId: this.videoId,duration:this.playTime}
+				const param = {
+					duration: this.playTime,
+					...this.urlOption
+				}
+				getFinishCourseVideo(param)
+			},
+			// 每十分钟获得积分
+			getIntegralByH5Video() {
+				if(!this.isCheckRealUrl) return
+				const param = {
+					duration: this.playTime,
+					...this.urlOption
+				}
+				getIntegralByH5Video(param).then(res => {
+					if (res.code == 200) {
+						uni.showToast({
+							title: "积分+10",
+							icon: "none"
+						})
+					}
+				})
+			},
+			progressChange(e) {
+				this.bufferRate = Math.ceil(e.detail.buffered)
+			},
+			// 缓冲
+			getInternetTraffic() {
+				if(!this.isCheckRealUrl) return
+				const playVideoTime = Math.ceil(this.playTime / this.duration * 100) // 播放百分比
+				if(this.bufferRate == 0 || this.bufferRate < playVideoTime) {
+					this.bufferRate = playVideoTime
+				}
+				if(this.bufferRate == 0 || Number(this.bufferRate.toFixed(2)) == 0) return
+				const param = {
+					...this.urlOption,
+					uuId: dayjs().format('YYYYMMDD') + this.uuId,
+					duration: this.playTime,
+					bufferRate: Number(this.bufferRate.toFixed(2)),
+				}
+				if(!param.bufferRate) return
+				getInternetTraffic(param)
+			},
+			getErrMsg(err,type) {
+				let msgerr = {
+					errType: type || 'error',
+					videoUrl: this.videoUrl,
+					lineIndex: this.lineIndex,
+					errTime: new Date(),
+					ip: this.ip,
+					errMsg: err || ''
+				}
+				getErrMsg({
+					msg: JSON.stringify(msgerr)
+				})
+			},
+			goLogin() {
+				this.$getProvider().then(provider=>{
+					console.log('当前的环境商',provider)
+					if (!provider) {
+					  reject()
+					}
+					uni.login({
+						provider: provider,
+						success: async loginRes => {
+							console.log(loginRes)
+							uni.getUserInfo({
+							   provider: provider,
+							   success: (infoRes)=> {
+								    uni.showToast({
+										title: '处理中...',
+										icon: 'loading'
+								    });
+									loginByMp({code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv}).then(res=>{
+										 uni.hideLoading();
+										 if (res.code == 200) {
+											uni.setStorageSync('AppTokenmini_RTCourse', res.token);
+											uni.setStorageSync('userInfo', JSON.stringify(res.user));
+											this.user = res.user
+											this.isLogin = true
+											this.getIsAddKf() 
+										 } else {
+											uni.showToast({
+												title: res.msg,
+												icon: 'none'
+											});
+										 }
+									 }).catch(err=>{
+										uni.hideLoading();
+										uni.showToast({
+											icon:'none',
+											title: "登录失败,请重新登录",
+										});
+									});
+							   }
+							});
+						}
+					})
+				}).catch(err => {})
+			},
+			getLink() {
+				let that = this;
+				getRealLink({sortLink:this.sortLink}).then(res=>{
+					if(res.code == 200) {
+						this.isExpire = false
+						// 如果响应中包含真实链接,则跳转到真实链接
+						// window.location.href = res.realLink +"&sortLink="+this.sortLink+"&code="+this.code+"&time="+new Date().getTime()
+						if (this.isLogin && this.isAddKf == 1&&this.isCheckRealUrl) {
+							this.getH5CourseVideoDetails()
+						}
+						if (this.videoId &&(this.isAddKf != 1 || !this.isCheckRealUrl)) {
+							this.$isLoginCourse().then(
+								isLogin => {
+									this.isLogin = isLogin
+									if(isLogin){
+										this.getIsAddKf() 
+									} else {
+										this.goLogin()
+									}
+								},
+								rej => {}
+							);
+						}
+					} else {
+						this.isExpire = true
+						uni.showToast({
+							title: '课程已过期或链接无效',
+							icon: 'none'
+						});
+					}
+				}).catch(err=>{
+					this.isExpire = true
+					uni.showToast({
+						title: '发生错误,请稍后再试',
+						icon: 'none'
+					});
+				})
+			},
+			/**
+			 * 节流原理:在一定时间内,只能触发一次
+			 *
+			 * @param {Function} func 要执行的回调函数
+			 * @param {Number} wait 延时的时间
+			 * @param {Boolean} immediate 是否立即执行
+			 * @return null
+			 */
+			throttle(func, wait = 500, immediate = true) {
+			    if (immediate) {
+			        if (!this.flag) {
+			            this.flag = true
+			            // 如果是立即执行,则在wait毫秒内开始时执行
+			            typeof func === 'function' && func()
+			            this.timer = setTimeout(() => {
+			                this.flag = false
+			            }, wait)
+			        }
+			    } else if (!this.flag) {
+			        this.flag = true
+			        // 如果是非立即执行,则在wait毫秒内的结束处执行
+			        this.timer = setTimeout(() => {
+			            this.flag = false
+			            typeof func === 'function' && func()
+			        }, wait)
+			    }
+			},
+			// 弹幕
+			openDanmu(type) {
+				this.openDanmuType = type
+				this.danmuIput= ''
+				if(type == 1) {
+					this.player.exitFullScreen()
+				}
+				this.$refs.danmuPopup.open()
+			},
+			changeShowPopup(val) {
+				this.focus = val.show
+			},
+			// 发送弹幕
+			sendDanmu() {
+				if(this.danmuIput=='') {
+					uni.showToast({
+						title: '弹幕不能为空',
+						icon: 'none'
+					})
+					return;
+				}
+				this.sendMsg()
+			},
+			// 弹幕列表
+			getDanmuList(){
+				getDanmuList(this.videoId).then(res=>{
+					if(res.code == 200&&res.data&&res.data.length>0) {
+						this.danmuList = res.data.map(item=>({
+							id: item.id,
+							text: item.content,
+							time: item.timePoint ? Number(item.timePoint) : this.playTime,
+							color: "#FFFFFF",
+							mode: item.mode|| "scroll",
+							top: null,
+							style: {
+								color: item.isColor==1 ? item.color || this.danmuItemStyle.color : this.danmuItemStyle.color,//是否彩色1是0否
+								fontSize: item.fontSize || this.danmuItemStyle.fontSize, 
+								padding: this.danmuItemStyle.padding,
+								border:this.user.userId ==item.userId ? item.color ? `solid 1px ${item.color}`: this.danmuItemStyle.border : 'none',
+								borderRadius: this.user.userId==item.userId ? this.danmuItemStyle.borderRadius : 0,
+								backgroundColor: this.user.userId==item.userId ? this.danmuItemStyle.backgroundColor : 'transparent'
+							},
+						}))
+					} else {
+						this.danmuList = []
+					}
+				})
+			},
+			//创建一个socket连接
+			initSocket() {
+				let userId = this.user.userId;
+				let that = this;
+				this.socket = uni.connectSocket({
+					url: getApp().globalData.danmuWSUrl + "/ws/barrage/" + this.videoId,
+					multiple: true,
+					header: {
+						'token': uni.getStorageSync('AppTokenmini_RTCourse')
+					},
+					success: res => {
+						console.log('WebSocket连接已打开1!');
+						that.isSocketOpen = true
+						that.reOpenSocket = false
+						
+						// 保持心跳
+						if(that.pingpangTimes) {
+							clearInterval(that.pingpangTimes)
+							that.pingpangTimes= null
+						}
+						that.pingpangTimes=setInterval(()=>{
+							let data={cmd:"heartbeat",userId: userId};
+							that.socket.send({
+								data: JSON.stringify(data),
+								success: () => {
+									// console.log('WebSocket发送心条数据!');
+								},
+								fail: () => {
+									that.isSocketOpen=false
+								}
+							});
+						},15000)
+					},
+					error: res => {
+						console.log(res)
+					},
+				})
+				this.socket.onMessage((res) => {
+					// console.log("收到消息parse",JSON.parse(res.data))
+					const redata = JSON.parse(res.data);
+					if(redata.cmd=="heartbeat"){
+						  //心跳
+						  // console.log("heartbeat")
+					}else if(redata.cmd=="danmu"){
+						that.isSend=true;
+						that.addMsg(1,redata);
+					}
+				})
+				//监听socket打开
+				this.socket.onOpen(() => {
+					console.log('WebSocket连接已打开2!');
+					that.isSocketOpen = true
+					that.reOpenSocket = false
+					that.isSend = true;
+				})
+				//监听socket关闭
+				this.socket.onClose(() => {
+					that.isSocketOpen = false
+					that.socket = null
+					console.log('WebSocket连接已关闭!',that.reOpenSocket);
+					if(that.pingpangTimes) {
+						clearInterval(that.pingpangTimes)
+						that.pingpangTimes= null
+					}
+					if(that.reOpenSocket) {
+						//重启
+						that.initSocket()
+					}
+				})
+				//监听socket错误
+				this.socket.onError((err) => {
+					console.log("socket err:",err)
+					that.isSocketOpen = false
+					that.reOpenSocket = false
+					that.socket = null
+					if(that.pingpangTimes) {
+						clearInterval(that.pingpangTimes)
+						that.pingpangTimes= null
+					}
+				})
+			},
+			sendMsg() {
+				if (!this.isSend) {
+					return;
+				}
+				if (this.isSocketOpen) {
+					var data = {
+						cmd: 'danmu',
+						userId: this.user.userId,
+						videoId: this.videoId,
+						content: this.danmuIput,
+						timePoint: this.playTime, // 弹幕对应视频时间节点()秒
+						platform: 'uniapp',  //发送平台,app传值“app”,小程序传值“uniapp”
+						fontSize: '16px',
+						mode: "scroll",
+						color: "#ffffff",
+					};
+					this.socket.send({
+						data: JSON.stringify(data),
+						success: () => {
+							console.log("发送成功")
+							this.$refs.danmuPopup.close()
+							this.isSend = false;
+						},
+						fail: () => {
+							uni.showToast({
+								title: '发送失败',
+								icon: 'none'
+							})
+						}
+					});
+			
+				}
+			
+			},
+			// 收到消息
+			addMsg(type, content) {
+				if (!this.player) {
+					this.player = uni.createVideoContext('video-content-box');
+				}
+				// this.player.sendDanmu({
+				// 	text: content.content,
+				// 	color: "#FF0000",
+				// 	time: this.playTime + 1
+				// })
+				const id = content.userId +'_' + new Date().getTime()
+				const mystyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					border: content.color ? `solid 1px ${content.color}`: this.danmuItemStyle.border,
+					borderRadius: this.danmuItemStyle.borderRadius,
+					padding: this.danmuItemStyle.padding,
+					backgroundColor: this.danmuItemStyle.backgroundColor
+				}
+				const otherstyle = {
+					color: content.color || this.danmuItemStyle.color,
+					fontSize: content.fontSize || this.danmuItemStyle.fontSize,
+					padding: this.danmuItemStyle.padding,
+				}
+				const mode = content.mode || "scroll"
+				const obj = {
+					id: content.id || id,
+					userId: content.userId,
+					text: content.content,
+					time: this.flagTime + 1,
+					color: content.color || this.danmuItemStyle.color,
+					style: this.user.userId == content.userId ? mystyle : otherstyle,
+					top: null
+				}
+				console
+				if(this.showDanmu == 0) return
+				this.danmuList.push(obj)
+			},
+			initTracks() {
+				this.tracks = []
+				const trackHeight = 22; // 每行高度
+				const trackCount = 3
+				for (let i = 0; i < trackCount; i++) {
+					this.tracks.push({
+						top: i * trackHeight+10,
+						isFree: true
+					});
+				}
+			},
+			// 获取字体高度
+			getTextWidth(content) {
+				if (!this.ctx) {
+					this.ctx = uni.createCanvasContext('myCanvas')
+				}
+				const metrics = this.ctx.measureText(content)
+				return Math.ceil(metrics.width)
+			},
+			// 分配轨道
+			getFreeTrack(item) {
+				const width = this.getTextWidth(item.content)
+				const passWidth = width + uni.getSystemInfoSync().screenWidth
+				const duration = 8
+				for (let i = 0; i < this.tracks.length; i++) {
+					if (this.tracks[i].isFree) {
+						this.tracks[i].isFree = false;
+						// 等本条通过右边界的时间
+						let passtime = Math.ceil(duration * 1000 / passWidth * width)
+						passtime = passtime + 1000
+						// console.log("passtime==", passtime)
+						setTimeout(() => {
+							this.tracks[i].isFree = true;
+						}, passtime); // 5秒后释放轨道
+						return this.tracks[i].top;
+					}
+				}
+				// 无可用轨道
+				if (item.userId == this.user.userId) {
+					let trackHeight = this.tracks[this.tracks.length - 1].top
+					return Math.random() * trackHeight + 16 // 自己发的弹幕随机高度; // 无可用轨道
+				} else {
+					// console.log("无可用轨道")
+					return 'abandon'
+				}
+			},
+			// 检测并激活弹幕
+			checkDanmu() {
+				if(this.showDanmu == 0) return
+				// 筛选当前时间应出现的弹幕
+				const newDanmus = this.danmuList.filter((item) => Math.abs(item.time - this.flagTime) < 1)
+				// 分配轨道高度
+				newDanmus.forEach((item) => {
+					// 滚动弹幕随机高度
+					if(!item.top) {
+						item.top = this.getFreeTrack(item)
+					}
+				})
+				// 过滤没有分配到空闲轨道弹幕
+				const aliveNewDanmus = newDanmus.filter((item) => item.top != 'abandon')
+				// 添加到活跃列表
+				this.activeDanmus = [...this.activeDanmus, ...aliveNewDanmus]
+			},
+			animationend(moveItem, i) {
+				// 移除动画结束的弹幕(性能优化)
+				this.activeDanmus = this.activeDanmus.filter((item) => item.id != moveItem.id)
+			},
+			switchDanmu() {
+				this.showDanmu = this.showDanmu == 1 ? 0:1
+				if(this.showDanmu == 0) {
+					this.activeDanmus = []
+					this.initTracks()
+				}
+			},
+		}
+	}
+</script>
+
+<style scoped>
+.full-width-popup {
+  width: 100%;
+}
+</style>
+<style lang="scss" scoped>
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.footer-tips {
+		margin-top: 14rpx;
+		text-align: center;
+		font-family: PingFang SC,PingFang SC;
+		font-weight: 500;
+		font-size: 12px;
+		color: #bbb;
+	}
+	.textOne {
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+	}
+
+	.textTwo {
+		overflow: hidden;
+		text-overflow: ellipsis;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+	.header-nav {
+		height: 88rpx;
+		@include u-flex(row, center, flex-start);
+		overflow: hidden;
+		background-color: #fff;
+		box-sizing: border-box;
+		.header-title {
+			text-align: center;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			padding: 0 10rpx 0 100rpx;
+			font-family: PingFang SC,PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #000;
+			box-sizing: border-box;
+		}
+	}
+	.reward-list {
+		width: 100%;
+		margin-top: 20rpx;
+		margin-bottom: -40rpx;
+
+		&-group {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 14px;
+			color: #222222;
+			@include u-flex(row, center, center);
+		}
+
+		&-option {
+			@include u-flex(row, center, flex-start);
+
+			&:first-child {
+				margin-right: 40rpx;
+			}
+		}
+	}
+
+	.err {
+		color: #f56c6c !important;
+	}
+
+	.kfqrcode-box {
+		background-color: #fff;
+		border-radius: 16rpx;
+		max-width: 560rpx;
+		padding: 60rpx 40rpx;
+		margin-top: -100rpx;
+		box-sizing: border-box;
+		@include u-flex(column, center, flex-start);
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 400;
+		font-size: 34rpx;
+		color: #222;
+		position: relative;
+		text-align: center;
+
+		.kfqrcode {
+			height: 460rpx;
+			width: 460rpx;
+		}
+	}
+
+	.kfqrcode-close {
+		width: 64rpx;
+		height: 64rpx;
+		position: absolute;
+		bottom: -100rpx;
+		left: 50%;
+		transform: translateX(-50%);
+	}
+
+	.tipsPopup-mask {
+		position: relative;
+		width: 560rpx;
+		background-color: transparent;
+
+		.red_envelope_top {
+			width: 480rpx;
+			height: 360rpx;
+			margin: 0 auto;
+			display: inherit;
+		}
+	}
+
+	.tipsPopup-btn-box {
+		width: 456rpx;
+		height: 104rpx;
+		padding: 4rpx;
+		box-sizing: border-box;
+		background: linear-gradient(180deg, rgba(252, 209, 94, 1), rgba(254, 253, 251, 1));
+		border-radius: 52rpx;
+	}
+
+	.tipsPopup-btn {
+		width: 100%;
+		height: 100%;
+		background: linear-gradient(180deg, #FF9F22 0%, #FA1E05 100%);
+		border-radius: 52rpx 52rpx 52rpx 52rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 36rpx;
+		color: #FFFFFF;
+		line-height: 96rpx;
+		text-align: center;
+	}
+
+	.tipsPopup {
+		width: 560rpx;
+		padding: 12rpx;
+		margin-top: -72rpx;
+		box-sizing: border-box;
+		background: linear-gradient(180deg, #FFFBEF 0%, #FFFFF5 43%, #F5EAC2 100%);
+		border-radius: 32rpx 32rpx 32rpx 32rpx;
+		position: relative;
+
+		&-close {
+			width: 64rpx;
+			height: 64rpx;
+			position: absolute;
+			right: 0;
+			top: -188rpx;
+		}
+
+		&-line {
+			padding: 3rpx;
+			box-sizing: border-box;
+			background: linear-gradient(180deg, rgba(247, 245, 220, 1), rgba(250, 220, 157, 1));
+			border-radius: 24rpx;
+		}
+
+		&-box {
+			padding: 0 40rpx 40rpx 40rpx;
+			box-sizing: border-box;
+			background: linear-gradient(180deg, #FFFBEF 0%, #FFFFF5 43%, #F5EAC2 100%);
+			border-radius: 24rpx;
+			@include u-flex(column, center, flex-start);
+		}
+
+		&-head {
+			@include u-flex(row, center, center);
+
+			&-title {
+				width: 364rpx;
+				height: auto;
+				margin-top: -22rpx;
+			}
+		}
+
+		&-content {
+			margin: 48rpx 0;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #222222;
+			text-align: center;
+
+			&-title {
+				margin-bottom: 26rpx;
+				font-weight: 600;
+				font-size: 40rpx;
+				color: #FF5C03;
+			}
+		}
+	}
+
+	.video-controls-box {
+		width: 100%;
+		height: 420rpx;
+		overflow: hidden;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		z-index: 2;
+		background: rgba(0, 0, 0, 0.2);
+
+		.video-play {
+			height: 72rpx;
+			width: 72rpx;
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+		}
+	}
+
+	.video-controls {
+		width: 100%;
+		height: 80rpx;
+		padding: 0 28rpx;
+		box-sizing: border-box;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		background: linear-gradient(to top, #222 0%, transparent 80%);
+
+		.video-icon {
+			height: 44rpx;
+			width: 44rpx;
+		}
+	}
+
+	.errQuesbox {
+		width: 100%;
+		max-height: 260rpx;
+		overflow-y: auto;
+		margin-top: 24rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 500;
+		font-size: 30rpx;
+		color: #222222;
+
+		&-item {
+			width: 100%;
+			height: 128rpx;
+			line-height: 128rpx;
+			margin-bottom: 24rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			overflow: hidden;
+			background: #fff;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			position: relative;
+
+			&::after {
+				content: "题目";
+				min-width: 64rpx;
+				height: 36rpx;
+				padding: 0 12rpx;
+				line-height: 36rpx;
+				background: #FF5C03;
+				box-sizing: border-box;
+				border-radius: 0rpx 0rpx 16rpx 0rpx;
+				text-align: center;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 500;
+				font-size: 20rpx;
+				color: #fff;
+				position: absolute;
+				left: 0;
+				top: 0;
+			}
+		}
+	}
+
+	.bg {
+		background: #fff !important;
+	}
+
+	.answerPopup {
+		&-box {
+			width: 560rpx;
+			background: linear-gradient(180deg, #FFFAF6 0%, #FEECD8 100%);
+			border-radius: 32rpx 32rpx 32rpx 32rpx;
+			background-color: #fff;
+			font-weight: 400;
+			padding: 32rpx;
+			box-sizing: border-box;
+			position: relative;
+			@include u-flex(column, center, flex-start);
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+
+			.tipimg {
+				width: 206rpx;
+				height: 206rpx;
+				margin-bottom: 16rpx;
+			}
+		}
+
+		&-title {
+			font-weight: 600;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		&-desc {
+			margin-top: 10rpx;
+			font-size: 28rpx;
+			color: #757575;
+		}
+
+		&-btn {
+			width: 464rpx;
+			height: 84rpx;
+			margin-top: 54rpx;
+			margin-bottom: 16rpx;
+			background: #FF5C03;
+			border-radius: 42rpx;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 84rpx;
+		}
+	}
+
+	.popupbox {
+		width: 100%;
+		background-color: #fff;
+		border-radius: 16rpx 16rpx 0 0;
+		padding: 24rpx 32rpx;
+		position: relative;
+
+		&-head {
+			height: 60rpx;
+			margin-bottom: 30rpx;
+			text-align: center;
+			overflow-y: auto;
+			color: #414858;
+			font-size: 32rpx;
+			font-weight: bold;
+			position: relative;
+
+			.close-icon {
+				position: absolute;
+				right: 0;
+				top: 0;
+				height: 40rpx;
+				width: 40rpx;
+			}
+		}
+
+		&-content {
+			height: 20vh;
+			overflow-y: auto;
+			display: flex;
+			align-items: flex-start;
+			flex-wrap: wrap;
+			gap: 32rpx;
+
+			.line-item {
+				display: inline-block;
+				min-width: 200rpx;
+				min-height: 60rpx;
+				padding: 0 20rpx;
+				box-sizing: border-box;
+				border-radius: 50rpx;
+				overflow: hidden;
+				background-color: #f7f7f7;
+				text-align: center;
+				color: #414858;
+				font-size: 28rpx;
+				line-height: 60rpx;
+			}
+
+			.line-active {
+				color: #f56c6c !important;
+				background-color: #fef0f0 !important;
+			}
+		}
+	}
+
+	.content {
+		padding-bottom: calc(var(--window-bottom) + 164rpx);
+		.video-box {
+			width: 100%;
+			height: 420rpx;
+			overflow: hidden;
+			position: relative;
+
+			#myVideo {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.video-poster {
+			width: 100%;
+			height: 420rpx;
+		}
+
+		.miantitlebox {
+			padding: 30rpx 0;
+			border-bottom: 2rpx solid #F5F7FA;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		.subtitlebox {
+			padding: 30rpx 0;
+			border-bottom: 2rpx solid #F5F7FA;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		.title-content {
+			padding: 0 32rpx;
+			background-color: #fff;
+			font-size: 28rpx;
+			line-height: 1.6;
+
+			.title {
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #414858;
+			}
+
+			.time-or-subtitle {
+				margin-top: 12rpx;
+				color: #666666;
+			}
+		}
+
+		.descbox {
+			padding: 36rpx 32rpx;
+			margin-bottom: 20rpx;
+			background-color: #fff;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #222222;
+			line-height: 42rpx;
+			word-break: break-word;
+
+			&-title {
+				margin-bottom: 24rpx;
+				font-weight: 500;
+				font-size: 32rpx;
+			}
+
+			&-info {
+				margin-bottom: 24rpx;
+				@include u-flex(row, center, space-between);
+				font-size: 26rpx;
+				color: #757575;
+
+				&-l {
+					flex: 1;
+					@include u-flex(row, center, flex-start);
+				}
+
+				&-time {
+					margin-left: 18rpx;
+					padding-left: 18rpx;
+					position: relative;
+
+					&::after {
+						content: "";
+						width: 4rpx;
+						height: 4rpx;
+						background: #999999;
+						border-radius: 50%;
+						position: absolute;
+						left: 0;
+						top: 50%;
+						transform: translateY(-50%);
+					}
+				}
+
+				&-r {
+					background: transparent;
+				}
+			}
+
+			&-desc {
+				overflow: hidden;
+				position: relative;
+			}
+		}
+
+		.expand {
+			flex-shrink: 0;
+			@include u-flex(row, center, flex-end);
+			color: #FF5C03;
+			font-weight: 400;
+			font-size: 24rpx;
+
+			image {
+				width: 32rpx;
+				height: 32rpx;
+			}
+		}
+
+		.expand-ab {
+			position: absolute;
+			top: 0;
+			right: 0;
+			box-shadow: -50rpx 0 20rpx 8rpx #FFFFFF;
+			background-color: #fff;
+		}
+
+		.ques-content {
+			background-color: #fff;
+			padding: 40rpx 32rpx;
+			box-sizing: border-box;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		.ques-content-tit {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 600;
+			font-size: 36rpx;
+			color: #222222;
+		}
+
+		.ques-title {
+			margin: 48rpx 0 34rpx 0;
+			font-weight: 500;
+			font-size: 32rpx;
+			white-space: normal;
+		}
+
+		.ques-type {
+			flex-shrink: 0;
+			min-width: 72rpx;
+			min-height: 40rpx;
+			padding: 0 12rpx;
+			margin: 0 12rpx;
+			box-sizing: border-box;
+			background: #FF5C03;
+			border-radius: 8rpx 8rpx 8rpx 8rpx;
+			line-height: 40rpx;
+			text-align: center;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #FFFFFF;
+			display: inline-block;
+		}
+
+		.ques-option {
+			min-height: 88rpx;
+			padding: 24rpx 32rpx;
+			box-sizing: border-box;
+			margin-bottom: 24rpx;
+			background: #F5F7FA;
+			border-radius: 16rpx 16rpx 16rpx 16rpx;
+			display: flex;
+			align-items: center;
+
+			&-active {
+				color: #FF5C03 !important;
+				background: #FCF0E7 !important;
+			}
+		}
+
+		.video-line {
+			min-width: 140rpx;
+			max-width: 200rpx;
+			height: 60rpx;
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			border-radius: 50rpx 0 0 50rpx;
+			overflow: hidden;
+			background-color: #fff;
+			text-align: center;
+			color: #888;
+			font-size: 28rpx;
+			line-height: 60rpx;
+			display: inline-flex;
+			align-items: center;
+			justify-content: center;
+			position: fixed;
+			right: 0;
+			z-index: 9;
+			bottom: calc(var(--window-bottom) + 280rpx);
+			box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, .12);
+
+			image {
+				flex-shrink: 0;
+				height: 34rpx;
+				width: 34rpx;
+				margin-right: 6rpx;
+			}
+		}
+		.danmu-line {
+			bottom: calc(var(--window-bottom) + 370rpx);
+			word-break: keep-all;
+			.set_image {
+				height: 40rpx;
+				width: 40rpx;
+			}
+		}
+		.footer {
+			border-top: 1rpx solid #ededef;
+			background: #fff;
+			width: 100%;
+			position: fixed;
+			bottom: 0;
+			padding: 32rpx;
+			padding-bottom: calc(var(--window-bottom) + 14rpx);
+			box-sizing: border-box;
+			z-index: 9;
+
+			&-btn {
+				width: 100%;
+				height: 98rpx;
+				background: #FF5C03;
+				border-radius: 49rpx 49rpx 49rpx 49rpx;
+				line-height: 98rpx;
+				text-align: center;
+				font-family: PingFang SC, PingFang SC;
+				font-weight: 600;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				@include u-flex(row, center, center);
+
+				&-img {
+					flex-shrink: 0;
+					width: 144rpx;
+					height: 144rpx;
+					margin-right: 8rpx;
+					margin-top: -24rpx;
+				}
+			}
+
+			&-btn-border {
+				position: relative;
+
+				&::after {
+					content: "";
+					background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
+					position: absolute;
+					top: -2rpx;
+					left: 0;
+					height: 103rpx;
+					width: 100%;
+					z-index: -1;
+					border-radius: 49rpx 49rpx 49rpx 49rpx;
+					box-shadow: 0rpx 8rpx 11rpx 0rpx rgba(255, 92, 3, 0.3);
+					overflow: hidden;
+				}
+			}
+		}
+	}
+
+	.agreement {
+		display: inline-flex;
+		margin-top: 16rpx;
+		font-size: 24rpx;
+		color: #525252;
+		align-items: center;
+		justify-content: center;
+	}
+	.video-danmu-btnbox {
+		width: 50px;
+		height: 50px;
+		border-radius: 50%;
+		overflow: hidden;
+		position: absolute;
+		right: 10px;
+		bottom: calc(50% - 50px);
+		transform: translateY(-50%);
+		padding: 8px;
+		box-sizing: border-box;
+	}
+	.video-danmu-image {
+		width: 100%;
+		height: 100%;
+	}
+	.danmuPopup {
+		background-color: #fff;
+		padding-bottom: calc(var(--window-bottom) + 10px);
+		&-head {
+			width: 100%;
+			padding: 10px;
+			box-sizing: border-box;
+			overflow: hidden;
+			@include u-flex(row,center,flex-start);
+			.danmu-icon {
+				height: 24px;
+				width: 24px;
+				margin-right: 12px;
+			}
+		}
+		&-input {
+			flex: 1;
+			height: 35px;
+		}
+		&-send {
+			flex-shrink: 0;
+			height: 35px;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			padding: 5px 15px;
+			box-sizing: border-box;
+			background: #FF5C03 !important;
+			border-radius: 22px;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #fff !important;
+			margin-left: 12px;
+			&::after {
+				border: none;
+			}
+		}
+		&-con {
+			background-color: #F5F7FA;
+			padding: 24px 12px 48px 12px;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			font-size: 14px;
+			color: #757575;
+		}
+	}
+	.danmu-item {
+		position: absolute;
+		top: 0;
+		white-space: nowrap;
+		font-size: 16px;
+		height: 20px;
+		display: inline-flex;
+		box-sizing: border-box;
+		align-items: center;
+	}
+	.danmuMove {
+		// animation: mymove 8s linear forwards;
+		// animation-duration: 8s;
+		animation-timing-function: linear;
+		animation-delay: 0s;
+		animation-iteration-count: 1;
+		animation-direction: normal;
+		animation-fill-mode: forwards;
+		animation-play-state: running;
+		animation-name: mymove;
+		will-change: transform;
+	}
+	
+	@keyframes mymove {
+		from {
+			transform: translateX(100vw);
+		}
+	
+		to {
+			transform: translateX(-100%);
+		}
+	}
+	.danmu-icon{
+		height: 24px;
+		width: 24px;
+		margin-right: 12px;
+	}
+</style>

+ 12 - 13
pages_index/packageDetails.vue

@@ -49,10 +49,10 @@
 				</view>
 				 
 			</view>
-			<!-- <view class="drug-box" v-if="products.length>0 ">
+			<view class="drug-box" v-if="products.length>0 ">
 				<view class="title-box">
 					<view class="line"></view>
-					<view class="title">产品列表</view>
+					<view class="title">处方列表</view>
 				</view>
 				<view class="drug-list"  >
 					<view  v-for="(product,index) in products"  class="drug-item" >
@@ -84,7 +84,7 @@
 					<image class="img" src="../static/images/dui.png"></image>
 					<view class="text">本疗法所包含药品由{{storeName}}配送</view>
 				</view>
-			</view> -->
+			</view>
 			
 			<view class="desc-box" v-if="describe.use!=null">
 				<view class="title-box">
@@ -94,6 +94,14 @@
 				<view class="desc" v-if="describe!=null" v-html="describe.use">
 				</view>
 			</view>
+			<view class="desc-box">
+				<view class="title-box">
+					<view class="line"></view>
+					<view class="title">疗法详情</view>
+				</view>
+				<view class="html" v-html="item.desc">
+				</view>
+			</view>
 			<view class="desc-box" v-if="item.indication!=null">
 				<view class="title-box">
 					<view class="line"></view>
@@ -134,14 +142,6 @@
 				<view class="desc" v-html="item.explain">
 				</view>
 			</view>
-			<view class="desc-box">
-				<view class="title-box">
-					<view class="line"></view>
-					<view class="title">疗法详情</view>
-				</view>
-				<view class="html" v-html="item.desc">
-				</view>
-			</view>
 		</view>
 		<view class="btn-foot">
 			<view class="p-price-box">
@@ -236,7 +236,7 @@
 			}
 		},
 		onReady() {
-			
+			this.getNewOrderByPackageId()
 		},
 		onUnload() {
 			if(this.timer) clearInterval(this.timer)
@@ -246,7 +246,6 @@
 			this.$isLogin().then(
 				res => {
 					if(res){
-						this.getNewOrderByPackageId()
 						var data = {companyUserId:this.companyUserId};
 						bindCompanyUser(data).then(
 							res => {

+ 3 - 3
pages_index/packageForm.vue

@@ -271,20 +271,20 @@
 					uni.hideLoading()
 					
 					if(res.code==200){
-						var temps=['jARl4BpoBkRu-2MxPMkQVhIfGMG0V9qW-X3V_7NtEOU']
+						var temps=['jARl4BpoBkRu-2MxPMkQVhIfGMG0V9qW-X3V_7NtEOU','wqKEklE_w5N19w9VAGY74TltPE6Ne3BaFObDD47uDEo']
 						uni.requestSubscribeMessage({
 							tmplIds: temps,
 							success(e) {
 								setTimeout(function(){
 									uni.navigateTo({
-										url: '/pages_order/packageOrderPay?orderId='+res.order.orderId
+										url: '/pages_order/packageOrderPay?orderId='+res.order.orderId+'&subMsg=1'
 									})
 								},200);
 							},
 							fail(e) {
 								setTimeout(function(){
 									uni.navigateTo({
-										url: '/pages_order/packageOrderPay?orderId='+res.order.orderId
+										url: '/pages_order/packageOrderPay?orderId='+res.order.orderId+'&subMsg=1'
 									})
 								},200);
 							}

+ 1 - 1
pages_index/testDetails.vue

@@ -17,7 +17,7 @@
 				<view class="desc" v-html="item.descs"> </view>
 			</view>
 			<view class="btn-box">
-				<view class="btn" @click="navTo('/pages_index/test?tempId='+item.tempId)">立即开始测试</view>
+				<view class="btn" @click="navTo('/pages_index/test?tempId='+item.tempId)">立即开始</view>
 			</view>
 			<view class="logo">
 				<image src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/b95950e4208c493d8b74ce0de220c65c.png"></image>

+ 1 - 1
pages_order/inquiryForm2_1.vue

@@ -258,7 +258,7 @@
 						</view>
 					</u-form-item> -->
 					<u-form-item :required="true" labelWidth="200rpx"  label="您最想咨询医生的问题是什么?" prop="title">
-						<u--textarea v-model="form.title" placeholder="请输入内容" count ></u--textarea>
+						<u--textarea v-model="form.title" placeholder="请输入内容" count maxlength="500"></u--textarea>
 					</u-form-item>
 					<u-form-item :required="true" labelWidth="200rpx"  borderBottom label="此次病情是否去医院就诊过" prop="isVisit">
 						<u-radio-group

+ 27 - 5
pages_order/packageOrderPay.vue

@@ -213,11 +213,12 @@
 				payDelivery:0,
 				payPrice:0,
 				gifts:[],
-				choose: 0
-				
+				choose: 0,
+				subMsg: 0, // 0 表示弹出订阅,1表示不需要弹出订阅
 			}
 		},
 		onLoad(option) {
+			this.subMsg =  option.subMsg || 0
 			this.choose = option.choose || 0
 			this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
 			this.orderId=option.orderId;
@@ -420,9 +421,30 @@
 				pay(data).then(
 					res => {
 						if(res.code==200){
-							uni.redirectTo({
-								url:"./packagePayment?orderId="+this.orderId
-							})
+							if(that.subMsg == 1) {
+								uni.redirectTo({
+									url:"./packagePayment?orderId="+that.orderId
+								})
+							} else {
+								var temps=['wqKEklE_w5N19w9VAGY74TltPE6Ne3BaFObDD47uDEo']
+								uni.requestSubscribeMessage({
+									tmplIds: temps,
+									success(e) {
+										setTimeout(function(){
+											uni.redirectTo({
+												url:"./packagePayment?orderId="+that.orderId
+											})
+										},200);
+									},
+									fail(e) {
+										setTimeout(function(){
+											uni.redirectTo({
+												url:"./packagePayment?orderId="+that.orderId
+											})
+										},200);
+									}
+								})
+							}
 						}else{
 							uni.showToast({
 								icon:'none',

+ 18 - 3
pages_order/storeOrderPay.vue

@@ -299,9 +299,24 @@
 				pay(data).then(
 					res => {
 						if(res.code==200){
-							uni.redirectTo({
-								url:"/pages_order/storeOrderPayment?orderId="+that.order.orderId
-							}) 
+							var temps=['wqKEklE_w5N19w9VAGY74TltPE6Ne3BaFObDD47uDEo']
+							uni.requestSubscribeMessage({
+								tmplIds: temps,
+								success(e) {
+									setTimeout(function(){
+										uni.redirectTo({
+											url:"/pages_order/storeOrderPayment?orderId="+that.order.orderId
+										}) 
+									},200);
+								},
+								fail(e) {
+									setTimeout(function(){
+										uni.redirectTo({
+											url:"/pages_order/storeOrderPayment?orderId="+that.order.orderId
+										}) 
+									},200);
+								}
+							})
 							
 						}else{
 							uni.showToast({

+ 1 - 1
pages_user/about.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="logo">
 			<image src="https://cos.his.cdwjyyh.com/fs/20240423/1287b2bf7c944538905f5092e8ff7db9.png"></image>
-			<p>彩虹惠医互联网医院</p>
+			<p>御君方互联网医院</p>
 		</view>
 		<view class="set-box">
 			<view class="item" @click="callPhone()">

+ 2 - 2
pages_user/addEditPatient.vue

@@ -21,8 +21,8 @@
 					</radio-group>
 				</view>
 				<view class="form-item">
-					<text class="label">联系方式</text>
-					<input class="input-width" type="phone" v-model="form.mobile" placeholder="请输入联系方式" placeholder-class="form-input" />
+					<text class="label">手机号码</text>
+					<input class="input-width" type="phone" v-model="form.mobile" placeholder="请输入手机号码" placeholder-class="form-input" />
 				</view>
 				<view class="form-item">
 					<text class="label">身份证号</text>

+ 4 - 4
pages_user/integral.vue

@@ -9,7 +9,7 @@
 					<view class="status_bar" :style="{height: statusBarHeight}"></view>
 					<view class="back-box" @click="back">
 						<image src="../static/images/back_white.png" mode=""></image>
-						<text class="title">我的积分</text>
+						<text class="title">我的芳华币</text>
 						<text></text>
 					</view>
 				</view>
@@ -17,9 +17,9 @@
 				<view style="padding-bottom: 88upx;">
 					<view :style="{height: statusBarHeight}"></view>
 				</view>
-				<!-- 可用积分 -->
+				<!-- 可用芳华币 -->
 				<view class="available-points">
-					<text class="label">可用积分</text>
+					<text class="label">可用芳华币</text>
 					<text class="num">{{integral}}</text>
 				</view>
 				<!-- 签到 -->
@@ -55,7 +55,7 @@
 					</view>
 				</view>
 				<view class="content">
-					<!-- 积分列表 -->
+					<!-- 芳华币列表 -->
 					<view class="points-cont">
 						<!-- tab切换 -->
 						<view class="pub-tab-box">

+ 16 - 6
pages_user/integralGoodsDetails.vue

@@ -23,8 +23,8 @@
 			<view class="integral-box">
 				<view class="title">{{item.goodsName}}</view>
 				<view class="num-box">
-					<view class="price"  >{{item.integral}} 积分</view>
-					<view class="count">价:{{item.otPrice.toFixed(2)}}元</view>
+					<view class="price"  >{{item.integral}} 芳华币</view>
+					<view class="count">价:{{item.otPrice.toFixed(2)}}元</view>
 				</view>
 				 
 			</view>
@@ -36,7 +36,7 @@
 		</view>
 		<view class="btn-foot">
 			<view class="p-price-box">
-				<view class="p-name">兑换积分: </view>
+				<view class="p-name">兑换芳华币: </view>
 				<view class="p-price"  >{{item.integral}}</view>
 			</view>
 			<view class="btn-box">
@@ -68,9 +68,19 @@
 		},
 		methods:{
 			submit(){
-				uni.navigateTo({
-					url: "./integralOrderPay?goodsId="+this.goodsId
-				})
+				this.$isLogin().then(
+					res => {
+						if(res){
+							uni.navigateTo({
+								url: "./integralOrderPay?goodsId="+this.goodsId
+							})
+						} else {
+							uni.navigateTo({
+								url:'/pages/auth/login'
+							})
+						}
+					}
+				);
 			},
 			swiperChange(event) {
 				this.activeImg = event.detail.current + 1

+ 32 - 9
pages_user/integralGoodsList.vue

@@ -1,16 +1,15 @@
 <template>
 	<view class="content">
-		
 		<view class="cont-box">
 			<view class="top-box">
 				<view class="my-integral">
 					<view class="left">
-						<view class="label">我的积分</view>
+						<view class="label">我的芳华币</view>
 						<view class="integral">{{integral}}</view>
 					</view>
 					<view class="btn-box">
-						<view class="btn" @click="navTo('/pages_user/integralLogsList')">积分记录</view>
-						<view class="btn" @click="navTo('/pages_user/integralOrderList')">兑换记录</view>
+						<view class="btn" @click="loginNavTo('/pages_user/integralLogsList')">获得记录</view>
+						<view class="btn" @click="loginNavTo('/pages_user/integralOrderList')">兑换记录</view>
 					</view>
 				</view>
 				<view class="tabs" v-if="tabs.length>0">
@@ -23,7 +22,7 @@
 					</u-tabs>
 				</view>
 			</view>
-			<mescroll-body  top="288rpx" bottom="0"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<mescroll-body  top="305rpx" bottom="0"  ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
 			<view class="integral-box"  >
 				<view class="item"  @click="navTo('/pages_user/integralGoodsDetails?goodsId='+item.goodsId)" v-for="(item,index) in dataList">
 					<view class="top">
@@ -34,8 +33,8 @@
 							{{item.goodsName}}
 						</view>
 						<view class="price-box">
-							<view class="price">{{item.integral}}积分</view>
-							<view class="count">价:{{item.otPrice.toFixed(2)}}元</view>
+							<view class="price">{{item.integral}}芳华币</view>
+							<view class="count">价:{{item.otPrice.toFixed(2)}}元</view>
 						</view>
 					</view>
 				</view>
@@ -84,7 +83,13 @@
  	},
 	onLoad() {
 		this.getDictByKey("sys_integral_goods_type");
-		this.getUserInfo();
+		this.$isLogin().then(
+			res => {
+				if(res){
+					this.getUserInfo();
+				}
+			}
+		);
 	},
  	methods: {
 		getUserInfo(){
@@ -104,6 +109,23 @@
 				rej => {}
 			);
 		},
+		loginNavTo(url){
+			this.$isLogin().then(
+				res => {
+					if(res){
+						uni.navigateTo({
+							url: url
+						})
+					}
+					else{
+						uni.navigateTo({
+							url:'/pages/auth/login'
+						})
+					}
+				}
+			);
+			 
+		},
 		navTo(url) {
 			uni.navigateTo({
 				url: url
@@ -193,11 +215,12 @@ page{
 	.cont-box{
 		.top-box{
 			z-index: 999;
-			padding: 30rpx;
+			padding: 30rpx 30rpx 0 30rpx;
 			width: 100%;
 			position: fixed;
 			top: 0rpx;
 			left: 0rpx;
+			background-color: #f5f5f5;
 			.my-integral{
 				height: 200rpx;
 				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);

+ 1 - 1
pages_user/integralLogsList.vue

@@ -11,7 +11,7 @@
 				</view>
 				<view class="right">
 					<text  :class="item.integral>0?'money green':'money red'">{{item.integral}}</text>
-					<text class="remark">剩余积分:{{item.balance}}</text>
+					<text class="remark">剩余芳华币:{{item.balance}}</text>
 				</view>
 			</view>
 			</mescroll-body>

+ 2 - 2
pages_user/integralOrderDetails.vue

@@ -77,7 +77,7 @@
 								</view>
 								<view class="price-num">
 									<view class="price">
-										<text class="unit">积分:</text>
+										<text class="unit">芳华币:</text>
 										<text class="num"  >{{item.integral}}</text>
 									</view>
 									<view class="num"  >x1</view>
@@ -101,7 +101,7 @@
 						</view>
 					 
 						<view   class="item">
-							<text class="label">使用积分</text>
+							<text class="label">使用芳华币</text>
 							<text class="text"  >¥{{order.integral}}</text>
 						</view>
 						<view   class="item" v-if="order.deliveryName!=null">

+ 2 - 2
pages_user/integralOrderList.vue

@@ -40,7 +40,7 @@
 								</view>
 								<view class="num-box">
 									<view class="price">
-										<text class="unit">积分</text>
+										<text class="unit">芳华币</text>
 										<text class="num" >{{subItem.integral}}</text>
 									</view>
 									<view class="amount"  >x1</view>
@@ -50,7 +50,7 @@
 						<!-- 实付金额、按钮 -->
 						<view class="bottom-box">
 							<view class="amount-paid">
-								<text class="label">使用积分:</text>
+								<text class="label">使用芳华币:</text>
 								<view class="price-box">
 									<view class="unit">¥</view>
 									<view class="num" >{{item.integral}}</view>

+ 45 - 7
pages_user/integralOrderPay.vue

@@ -41,7 +41,7 @@
 						</view>
 						<view class="price-num">
 							<view class="price">
-								<text class="unit">积分</text>
+								<text class="unit">芳华币</text>
 								<text class="num">{{item.integral}}</text>
 							</view>
 							<view class="num"  >x1</view>
@@ -52,14 +52,23 @@
 			<view class="other-info">
 				<view class="item">
 					<view class="left">
-						<text class="label">所需积分:</text>
+						<text class="label">所需芳华币:</text>
 					</view>
 					<view class="right">
 						<text class="text">{{item.integral}}</text>
 					</view>
 				</view>
 			</view>
-			 
+			<view class="other-info">
+				<view class="item">
+					<view class="left">
+						<text class="label">我的芳华币:</text>
+					</view>
+					<view class="right">
+						<text class="text">{{integral}}</text>
+					</view>
+				</view>
+			</view>
 		</view>
 		 
 		<!-- 底部按钮 -->
@@ -71,6 +80,7 @@
 
 <script>
 	import {getIntegralGoodsById,createOrder} from '@/api/integral.js'
+	import {getUserInfo} from '@/api/user'
 	export default {
 		data() {
 			return {
@@ -79,6 +89,7 @@
 				orderId:null,
 				order:null,
 				item:null,
+				integral: 0,
 			}
 		},
 		onLoad(option) {
@@ -90,8 +101,21 @@
 				that.address.address=e.province+e.city+e.district+e.detail
 			})
 			this.getIntegralGoodsById();
+			this.getUserInfo();
 		},
 		methods: {
+			getUserInfo(){
+				getUserInfo().then(
+					res => {
+						if(res.code==200){
+							if(res.user!=null){
+								this.integral=res.user.integral;
+							}
+						}
+					},
+					rej => {}
+				);
+			},
 			getIntegralGoodsById(){
 				var data={goodsId:this.goodsId};
 				console.log(data)
@@ -130,10 +154,24 @@
 				createOrder(data).then(
 					res => {
 						if(res.code==200){
-							uni.redirectTo({
-								url:"./integralOrderPaySuccess?orderId="+res.order.orderId
-							}) 
-							
+							var temps=['wqKEklE_w5N19w9VAGY74TltPE6Ne3BaFObDD47uDEo']
+							uni.requestSubscribeMessage({
+								tmplIds: temps,
+								success(e) {
+									setTimeout(function(){
+										uni.redirectTo({
+											url:"./integralOrderPaySuccess?orderId="+res.order.orderId
+										}) 
+									},200);
+								},
+								fail(e) {
+									setTimeout(function(){
+										uni.redirectTo({
+											url:"./integralOrderPaySuccess?orderId="+res.order.orderId
+										}) 
+									},200);
+								}
+							})
 						}else{
 							uni.showToast({
 								icon:'none',

+ 18 - 0
pages_user/tongue/ques.vue

@@ -0,0 +1,18 @@
+<template>
+	<view>
+		<image src="https://cos.his.cdwjyyh.com/fs/20250529/b581aaec73484783accacea682a5e587.png" mode="widthFix"></image>
+		<image src="https://cos.his.cdwjyyh.com/fs/20250529/07b7822625df4ea1832f3cb988e2ee40.png" mode="widthFix"></image>
+		<image src="https://cos.his.cdwjyyh.com/fs/20250529/87b02ce75c4e44728bfc400902af74df.png" mode="widthFix"></image>
+	</view>
+</template>
+
+<script>
+</script>
+
+<style scoped lang="scss">
+	image {
+		width: 100%;
+		height: auto;
+		display: block;
+	}
+</style>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است