瀏覽代碼

提交修改

puyao 1 天之前
父節點
當前提交
fda4c61924
共有 100 個文件被更改,包括 18179 次插入0 次删除
  1. 133 0
      api/course.js
  2. 278 0
      pages_course/components/appPopup.vue
  3. 590 0
      pages_course/components/commentBox.vue
  4. 158 0
      pages_course/components/descInfo.vue
  5. 202 0
      pages_course/components/descInfoNav.vue
  6. 169 0
      pages_course/components/goodsList.vue
  7. 171 0
      pages_course/components/ques.vue
  8. 297 0
      pages_course/components/treasureChest.vue
  9. 399 0
      pages_course/components/turntableOne.vue
  10. 318 0
      pages_course/components/turntableTwo.vue
  11. 87 0
      pages_course/course.vue
  12. 441 0
      pages_course/feedback.vue
  13. 322 0
      pages_course/learn.vue
  14. 141 0
      pages_course/register.vue
  15. 244 0
      pages_course/teacherClassroom.vue
  16. 340 0
      pages_course/video.vue
  17. 2416 0
      pages_course/videoDetail.vue
  18. 2242 0
      pages_course/videoOld.vue
  19. 162 0
      pages_course/webview.vue
  20. 二進制
      static/images/warning.png
  21. 23 0
      store/index.js
  22. 97 0
      uni_modules/uni-popup/changelog.md
  23. 45 0
      uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
  24. 327 0
      uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
  25. 143 0
      uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
  26. 188 0
      uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
  27. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/en.json
  28. 8 0
      uni_modules/uni-popup/components/uni-popup/i18n/index.js
  29. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
  30. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
  31. 45 0
      uni_modules/uni-popup/components/uni-popup/keypress.js
  32. 26 0
      uni_modules/uni-popup/components/uni-popup/popup.js
  33. 90 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.uvue
  34. 518 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.vue
  35. 107 0
      uni_modules/uni-popup/package.json
  36. 17 0
      uni_modules/uni-popup/readme.md
  37. 8 0
      uni_modules/uni-scss/changelog.md
  38. 1 0
      uni_modules/uni-scss/index.scss
  39. 82 0
      uni_modules/uni-scss/package.json
  40. 4 0
      uni_modules/uni-scss/readme.md
  41. 7 0
      uni_modules/uni-scss/styles/index.scss
  42. 3 0
      uni_modules/uni-scss/styles/setting/_border.scss
  43. 66 0
      uni_modules/uni-scss/styles/setting/_color.scss
  44. 55 0
      uni_modules/uni-scss/styles/setting/_radius.scss
  45. 56 0
      uni_modules/uni-scss/styles/setting/_space.scss
  46. 167 0
      uni_modules/uni-scss/styles/setting/_styles.scss
  47. 24 0
      uni_modules/uni-scss/styles/setting/_text.scss
  48. 146 0
      uni_modules/uni-scss/styles/setting/_variables.scss
  49. 19 0
      uni_modules/uni-scss/styles/tools/functions.scss
  50. 31 0
      uni_modules/uni-scss/theme.scss
  51. 62 0
      uni_modules/uni-scss/variables.scss
  52. 29 0
      uni_modules/uni-transition/changelog.md
  53. 131 0
      uni_modules/uni-transition/components/uni-transition/createAnimation.js
  54. 286 0
      uni_modules/uni-transition/components/uni-transition/uni-transition.vue
  55. 124 0
      uni_modules/uni-transition/package.json
  56. 11 0
      uni_modules/uni-transition/readme.md
  57. 21 0
      uni_modules/uview-ui/LICENSE
  58. 66 0
      uni_modules/uview-ui/README.md
  59. 376 0
      uni_modules/uview-ui/changelog.md
  60. 78 0
      uni_modules/uview-ui/components/u--form/u--form.vue
  61. 47 0
      uni_modules/uview-ui/components/u--image/u--image.vue
  62. 73 0
      uni_modules/uview-ui/components/u--input/u--input.vue
  63. 44 0
      uni_modules/uview-ui/components/u--text/u--text.vue
  64. 48 0
      uni_modules/uview-ui/components/u--textarea/u--textarea.vue
  65. 54 0
      uni_modules/uview-ui/components/u-action-sheet/props.js
  66. 278 0
      uni_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue
  67. 59 0
      uni_modules/uview-ui/components/u-album/props.js
  68. 259 0
      uni_modules/uview-ui/components/u-album/u-album.vue
  69. 44 0
      uni_modules/uview-ui/components/u-alert/props.js
  70. 243 0
      uni_modules/uview-ui/components/u-alert/u-alert.vue
  71. 52 0
      uni_modules/uview-ui/components/u-avatar-group/props.js
  72. 103 0
      uni_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue
  73. 78 0
      uni_modules/uview-ui/components/u-avatar/props.js
  74. 58 0
      uni_modules/uview-ui/components/u-avatar/u-avatar.vue
  75. 54 0
      uni_modules/uview-ui/components/u-back-top/props.js
  76. 129 0
      uni_modules/uview-ui/components/u-back-top/u-back-top.vue
  77. 72 0
      uni_modules/uview-ui/components/u-badge/props.js
  78. 171 0
      uni_modules/uview-ui/components/u-badge/u-badge.vue
  79. 46 0
      uni_modules/uview-ui/components/u-button/nvue.scss
  80. 161 0
      uni_modules/uview-ui/components/u-button/props.js
  81. 495 0
      uni_modules/uview-ui/components/u-button/u-button.vue
  82. 80 0
      uni_modules/uview-ui/components/u-button/vue.scss
  83. 99 0
      uni_modules/uview-ui/components/u-calendar/header.vue
  84. 579 0
      uni_modules/uview-ui/components/u-calendar/month.vue
  85. 144 0
      uni_modules/uview-ui/components/u-calendar/props.js
  86. 384 0
      uni_modules/uview-ui/components/u-calendar/u-calendar.vue
  87. 85 0
      uni_modules/uview-ui/components/u-calendar/util.js
  88. 14 0
      uni_modules/uview-ui/components/u-car-keyboard/props.js
  89. 311 0
      uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue
  90. 14 0
      uni_modules/uview-ui/components/u-cell-group/props.js
  91. 61 0
      uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue
  92. 110 0
      uni_modules/uview-ui/components/u-cell/props.js
  93. 229 0
      uni_modules/uview-ui/components/u-cell/u-cell.vue
  94. 82 0
      uni_modules/uview-ui/components/u-checkbox-group/props.js
  95. 103 0
      uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue
  96. 69 0
      uni_modules/uview-ui/components/u-checkbox/props.js
  97. 344 0
      uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
  98. 8 0
      uni_modules/uview-ui/components/u-circle-progress/props.js
  99. 198 0
      uni_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue
  100. 79 0
      uni_modules/uview-ui/components/u-code-input/props.js

+ 133 - 0
api/course.js

@@ -0,0 +1,133 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+export function loginByMp(data) {
+ 	 return request('/app/wx/courseLogin',data,'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+	 // return request('/app/wx/courseLogin',data,'POST','application/json;charset=UTF-8','http://192.168.10.135:8113');
+ }
+
+// 获取真实链接
+export function getRealLink(data) {
+	return request('/app/course/getRealLink', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+// h5课程简介
+export function getH5CourseByVideoId(data) {
+	return request('/app/course/getH5CourseByVideoId', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+// h5课程详情加问答
+export function getH5CourseVideoDetails(data) {
+	return request('/app/course/getH5CourseVideoDetails', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+// 答题发红包
+export function courseAnswer(data) {
+	return request('/app/course/courseAnswer', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// // 记录看课时间(旧)
+// export function getFinishCourseVideo(data) {
+// 	return request('/app/course/getFinishCourseVideo', data, 'POST', 'application/json;charset=UTF-8');
+// }
+
+// 记录看课时间(新)
+export function getFinishCourseVideo(data) {
+	return request('/app/course/updateWatchDuration', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 关注客服
+export function getIsAddKf(data) {
+	return request('/app/course/isAddKf', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 流量(缓冲百分比)
+export function internetTraffic(data) {
+	return request('/app/course/getInternetTraffic', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 每十分钟获得芳华币
+export function getIntegralByH5Video(data) {
+	return request('/app/course/getIntegralByH5Video', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 发送奖励
+export function sendReward(data) {
+	return request('/app/course/sendReward', data, 'POST', 'application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+
+// 播放错误上报
+export function getErrMsg(data) {
+	return request('/app/course/getErrMsg', data, 'POST', 'application/x-www-form-urlencoded','https://h5api.his.cdwjyyh.com');
+}
+
+
+// 获取getWxConfig
+export function getWxConfig(data) {
+	return request('/app/wx/mp/getWxConfig', data, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+
+ //获取弹幕列表
+ 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');
+ }
+ 
+ // 错误日志未知异常,请联系管理员
+ export function errorLogUpload(data, type) {
+ 	return request('/app/common/errorLogUpload', data, 'POST','','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ export function getTypeTree(data, type) {
+ 	return request('/app/user/complaint/getTypeTree', null, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ export function complaintRecord(data, type) {
+ 	return request('/app/user/complaint/record', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ 
+ export function uploadOSS(data, type) {
+ 	return request('/app/common/uploadOSS', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+// 公开课
+ export function getAppletCourse(data, type) {
+ 	return request('/app/course/getAppletCourse', null, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ export function getAppletCourseVideo(data, type) {
+ 	return request('/app/course/getAppletCourseVideo', data, 'GET','','https://h5api.his.cdwjyyh.com');
+ }
+ export function getConfigByKey(data, type) {
+ 	return request('/app/common/getConfigByKey',data,'GET','','https://h5api.his.cdwjyyh.com');
+ }
+// 获取芳华币礼品
+export function getCourseIntegralGoods(data,type) {
+	return request('/app/course/getCourseIntegralGoods', null, 'GET','','https://h5api.his.cdwjyyh.com');
+}
+ export function claim(data, type) {
+ 	return request('/app/course/rewardRound/claim', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ export function isClaim(data, type) {
+ 	return request('/app/course/rewardRound/isClaim', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+}
+ export function getVideoRewardTypes(data, type) {
+  	return request('/app/course/getVideoRewardTypes', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ export function getVideoRewardRules(data, type) {
+  	return request('/app/course/getVideoRewardRules', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }
+ export function getUserPhoneDeviceType(data, type) {
+  	return request('/app/pop/getUserPhoneDeviceType', data, 'POST','application/json;charset=UTF-8','https://h5api.his.cdwjyyh.com');
+ }

+ 278 - 0
pages_course/components/appPopup.vue

@@ -0,0 +1,278 @@
+<template>
+	<!-- 礼品弹窗 -->
+	<uni-popup ref="appPopup" type="center" :is-mask-click="false">
+		<view class="appPopup-mask">
+			<image class="tipimg" src="https://cos.his.cdwjyyh.com/fs/20250909/d5736027b6ac4255bfa2415cf400969c.png"></image>
+			<image class="close_icon" src="https://cos.his.cdwjyyh.com/fs/20250909/c8a5a9f34e5a4bd786f9fd2a380508dd.png" mode="aspectFill" @click="closePop"></image>
+			<view class="appPopup-box">
+				<view class="appPopup-title">恭喜你,<text style="color: #FF5C03;">回答正确</text></view>
+				<view>百种好礼等你兑换</view>
+				<view class="goodslist">
+					<!-- <view class="goodsitem" v-for="(item,index) in products" :key="index" @click="handleItem(item,index)"> -->
+					<view class="goodsitem" v-for="(item,index) in products" :key="index" >
+						<image class="bg" src="https://cos.his.cdwjyyh.com/fs/20250909/13630e9a4a054fa487e5c50b7d5ab1d2.png" mode="widthFix"></image>
+						<image class="img" :src="item.imageUrl" mode="aspectFill"></image>
+						<view class="goodsitem-name ellipsis">{{item.productName}}</view>
+						<view class="goodsitem-integral">
+							<text class="goodsitem-integral-num">{{item.requiredPoints}}</text>
+							<text>芳华币</text>
+						</view>
+						<view class="goodsitem-price">原价{{item.otPrice&&item.otPrice.toFixed(2)}}元</view>
+					</view>
+				</view>
+				<view class="changebtn" @click="getInfo">换一批</view>
+				<view class="progress">
+					<text>奖品兑换进度</text><text class="num">{{goodsInfo.exchangeProgress || 0}}%</text>
+					<progress style="margin-top: 30rpx;" active-color="#FAA97F" backgroundColor="#F5F7FA" border-radius="12" :percent="goodsInfo.exchangeProgress" stroke-width="12"></progress>
+				</view>
+				<view class="my-integral">我的芳华币:<text>{{goodsInfo.currentPoints || 0}}</text> </view>
+				<view class="x-bc" style="padding: 0 24rpx;">
+					<!-- <view class="appPopup-btn" style="margin-right: 12px;" @click="navTo('/pages_user/user/storeOrder?status=0')">查看芳华币订单</view>
+					<view class="appPopup-btn" @click="navTo('/pages/shopping/productList?cateId=320&pid=321&isCourse=1')">去兑换</view> -->
+					<view class="appPopup-btn" >打开芳华未来APP兑换礼品</view>
+				</view>
+				<!-- <view class="appPopup-tips">放弃芳华币,领取红包></view> -->
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import { getCourseIntegralGoods } from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				goodsInfo: {},
+				products:  []
+			}
+		},
+		methods: {
+			openPop() {
+				this.$refs.appPopup.open("center")
+				this.getInfo()
+			},
+			closePop() {
+				this.$refs.appPopup.close()	
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+				// this.postMessage({
+				// 	isFullscreen: false,
+				// 	login: 1,
+				// 	productId: '',
+				// 	pagesUrl:'/pages/user/integral/integralGoodsList'
+				// })
+			},
+			//app礼品列表
+			getInfo() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				getCourseIntegralGoods().then(res=>{
+					uni.hideLoading()
+					if(res.code == 200) {
+						this.goodsInfo = res.data
+						this.products = res.data && res.data.products? res.data.products:[]
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
+				}).catch(()=>{
+					uni.hideLoading()
+				})
+			},
+			postMessage(data) {
+				this.uniReady(() => {
+					uni.webView.postMessage({
+					    data: data
+					});  
+				})	
+			},
+			uniReady(callback) {
+			  if (uni.webView) {
+				callback()
+			  } else {
+				document.addEventListener('UniAppJSBridgeReady', callback, { once: true })
+			  }
+			},
+			handleItem(item,index) {
+				uni.navigateTo({
+					url: '/pages/shopping/productList?cateId=320&pid=321&isCourse=1'
+				})
+				// this.postMessage({
+				// 	isFullscreen: false,
+				// 	login: 1,
+				// 	productId: item.productId,
+				// 	pagesUrl:''
+				// })
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.num {
+		margin-left: 12rpx;
+		font-family: DINPro, DINPro;
+		font-size: 40rpx;
+	}
+	.appPopup-mask {
+		margin-top: -88rpx;
+		width: 670rpx;
+		@include u-flex(column, center, center);
+		.tipimg {
+			height: 206rpx;
+			width: 206rpx;
+			z-index: 99;
+		}
+		.close_icon {
+			height: 48rpx;
+			width: 48rpx;
+			position: absolute;
+			top: 34rpx;
+			right: 20rpx;
+		}
+		.appPopup-box {
+			width: 670rpx;
+			padding-bottom: 32rpx;
+			background: linear-gradient( 180deg, #FFEBBD 0%, #FFFFFF 9%, #FFFFFF 100%);
+			border-radius: 32rpx 32rpx 32rpx 32rpx;
+			overflow: hidden;
+			margin-top: -103rpx;
+			padding-top: 103rpx;
+			box-sizing: border-box;
+			font-family: PingFang SC;
+			font-weight: 400;
+			font-size: 28rpx;
+			color: #757575;
+			text-align: center;
+		}
+		.appPopup-title {
+			margin-bottom: 10rpx;
+			font-family: PingFang SC;
+			font-weight: 600;
+			font-size: 40rpx;
+			color: #222222;
+		}
+	}
+	.goodslist {
+		margin-top: 58rpx;
+		padding: 24rpx 10rpx;
+		@include u-flex(row, center, space-evenly);
+	}
+	.bg {
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		z-index: -1;
+	}
+	.goodsitem {
+		flex: 1;
+		max-width: 200rpx;
+		min-height: 124rpx;
+		border-radius: 10rpx;
+		@include u-flex(column, center, flex-start);
+		font-family: PingFang SC;
+		font-weight: 400;
+		font-size: 22rpx;
+		color: #999999;
+		position: relative;
+		z-index: 2;
+		.img {
+			width: 153rpx;
+			height: 126rpx;
+			margin-top: -44rpx;
+			border-radius: 10rpx;
+		}
+		&-name {
+			width: 100%;
+			padding: 8rpx 14rpx;
+			text-align: center;
+			font-family: PingFang SC;
+			font-weight: 500;
+			font-size: 24rpx;
+			color: #222222;
+			box-sizing: border-box;
+		}
+		&-integral {
+			min-width: 80%;
+			padding-bottom: 16rpx;
+			box-sizing: border-box;
+			font-family: PingFang SC;
+			font-weight: 400;
+			font-size: 22rpx;
+			color: #FF5C03;
+			border-bottom: 2px #999999 dotted;
+			&-num {
+				font-family: DINPro, DINPro;
+				font-weight: 500;
+				font-size: 36rpx;
+			}
+		}
+		&-price {
+			padding: 10rpx 0;
+		}
+	}
+	.appPopup-btn {
+		width: 560rpx;
+		height: 84rpx;
+		margin: 0 auto;
+		background: #FF5C03;
+		border-radius: 42rpx 42rpx 42rpx 42rpx;
+		@include u-flex(row, center, center);
+		font-family: PingFang SC;
+		font-weight: 500;
+		font-size: 32rpx;
+		color: #FFFFFF;
+	}
+	.changebtn {
+		width: 152rpx;
+		height: 64rpx;
+		margin: 0 auto;
+		border-radius: 32rpx 32rpx 32rpx 32rpx;
+		border: 1rpx solid #FF5C03;
+		@include u-flex(row, center, center);
+		font-family: PingFang SC;
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #FF5C03;
+	}
+	.progress {
+		padding: 0 90rpx;
+		margin-top: 40rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		font-size: 32rpx;
+		color: #222222;
+	}
+	::v-deep {
+		.uni-progress-bar, .uni-progress-inner-bar {
+			border-radius: 6px;
+		}
+	}
+	.my-integral {
+		margin: 32rpx 0;
+		font-family: PingFang SC;
+		font-weight: 400;
+		font-size: 28rpx;
+		color: #222222;
+		text {
+			color: #FF5C03;
+		}
+	}
+	.appPopup-tips {
+		margin-top: 32rpx;
+	}
+</style>

+ 590 - 0
pages_course/components/commentBox.vue

@@ -0,0 +1,590 @@
+<template>
+	<view>
+		<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>
+	</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
+			},
+			isSocketOpen: {
+			  type: Boolean,
+			  default: ''
+			}
+		},
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				scrollTop: 0,
+				inputText:"",
+				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()
+		},
+		methods: {
+			back() {
+				uni.navigateBack()
+			},
+			getUser() {
+				const userInfo = uni.getStorageSync('auto_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
+				if(this.openCommentStatus !=3&&!this.isSocketOpen) {
+					// 重新发起会话
+					this.$emit('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);
+			},
+			sendMsg(param,status) {
+				if(status == 1) {
+					this.isSend = true;
+					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.$emit("socketSend",data)
+				}
+			
+			},
+			addMsg(data,type) {
+				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);
+			},
+			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)
+			},
+		}
+	}
+</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>

+ 158 - 0
pages_course/components/descInfo.vue

@@ -0,0 +1,158 @@
+<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="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>
+</template>
+
+<script>
+	export default {
+		props: {
+			isLogin: {
+				type: Boolean,
+				default: false,
+			},
+			isAddKf: {
+				type: [String,Number],
+				default: 0,
+			},
+			courseInfo: {
+				type: Object,
+				default: {},
+			},
+		},
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 是否展开
+				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: 20rpx 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>

+ 202 - 0
pages_course/components/descInfoNav.vue

@@ -0,0 +1,202 @@
+<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="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>
+</template>
+
+<script>
+	export default {
+		props: {
+			isLogin: {
+				type: Boolean,
+				default: false,
+			},
+			isAddKf: {
+				type: [String,Number],
+				default: 0,
+			},
+			courseInfo: {
+				type: Object,
+				default: {},
+			},
+		},
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 是否展开
+				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>

+ 169 - 0
pages_course/components/goodsList.vue

@@ -0,0 +1,169 @@
+<template>
+	<view>
+		<view v-for="(item,index) in treatmentPackage" :key="index">
+			<view class="goodsitem">
+				<view class="goodsitem-img">
+					<image :src="item.imgUrl" mode="aspectFill" style="height: 100%;width: 100%"></image>
+					<!-- <view class="goodsitem-status">讲解中</view> -->
+				</view>
+				<view class="goodsitem-r">
+					<view>
+						<view class="goodsitem-title" :style="{ fontSize: fontSize(32)}">{{item.packageName}}</view>
+						<view class="goodsitem-desc ellipsis2" :style="{ fontSize: fontSize(30)}">{{item.secondName}}</view>
+					</view>
+					<view class="goodsitem-btnbox" @click="goBuy(item)">
+						<view class="goodsitem-price">
+							<view class="unit">¥</view>
+							<text class="price">{{item.totalPrice&&item.totalPrice.toFixed(2)}}</text>
+						</view>
+						<view class="btn">去购买</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="treatmentPackage.length==0">
+			<view class="empty">
+				<text>暂未上新活动</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:['treatmentPackage','urlOption'],
+		data() {
+			return {
+				list: []
+			}
+		},
+		computed: {
+			fontSize() {
+				return size=>{
+					const value = uni.upx2px(size)
+					const scale = uni.getStorageSync('fontScale') || 1;
+					if(scale<1){
+						return value + 'px';
+					}else {
+						return value * scale + 'px';
+					}
+				}
+			}
+		},
+		methods: {
+			goBuy(item) {
+				if(getApp().globalData.appId == 'wxc3f0a952b7bc2b94') {
+					uni.navigateTo({
+						url: '/pages_index/packageDetails?packageId='+item.packageId+'&companyId='+this.urlOption.companyId+ '&companyUserId='+this.urlOption.companyUserId,
+					})
+				} else {
+					uni.navigateToMiniProgram({
+					  appId: 'wxc3f0a952b7bc2b94',
+					  path: '/pages_index/packageDetails?packageId='+item.packageId+'&companyId='+this.urlOption.companyId+ '&companyUserId='+this.urlOption.companyUserId,
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.empty {
+		padding: 40rpx 24rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		color: #999;
+		&-btn {
+			margin-top: 24rpx;
+			padding: 20rpx 60rpx;
+			border-radius: 44rpx 44rpx 44rpx 44rpx;
+			border: 2rpx solid #FF5C03;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			color: #FF5C03;
+		}
+	}
+	.empty-btn-min {
+		flex-direction: column;
+		padding: 8rpx 15rpx !important;
+		font-size: 28rpx !important;
+	}
+	.goodsitem {
+		display: flex;
+		padding: 24rpx;
+		overflow: hidden;
+		min-height: 200rpx;
+		&-img {
+			overflow: hidden;
+			flex-shrink: 0;
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 14rpx;
+			position: relative;
+		}
+		&-status {
+			position: absolute;
+			left: 0;
+			top: 0;
+			padding: 8rpx 15rpx;
+			background: #FF5C03;
+			border-radius: 14rpx 0 14rpx 0;
+			font-size: 20rpx;
+			color: #fff;
+			box-sizing: border-box;
+			text-align: center;
+		}
+		&-r {
+			flex: 1;
+			overflow: hidden;
+			margin-left: 16rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+		}
+		&-title {
+			font-weight: bold;
+			// font-size: 32rpx;
+			color: #191A1B;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-line-clamp: 1;
+			-webkit-box-orient: vertical;
+		}
+		&-desc {
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 400;
+			// font-size: 30rpx;
+			color: #939599;
+			margin-top: 20rpx;
+		}
+		&-btnbox {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			.btn {
+				display: inline-block;
+				padding: 10rpx 38rpx;
+				border-radius: 12rpx;
+				border: 3rpx solid #FF5C03;
+				font-weight: bold;
+				// font-size: 30rpx;
+				color: #FF5C03;
+				text-align: center;
+			}
+		}
+		.unit {
+			font-size: 32rpx;
+		}
+		&-price {
+			font-family: Roboto, Roboto;
+			font-weight: bold;
+			font-size: 40rpx;
+			color: #FF5C03;
+			display: flex;
+			align-items: flex-end;
+		}
+	}
+</style>

+ 171 - 0
pages_course/components/ques.vue

@@ -0,0 +1,171 @@
+<template>
+	<view class="ques-content" :style="{ fontSize: fontSize(28)}">
+		<view class="ques-flex" v-if="openCommentStatus!=1"  :style="{justifyContent:showTreatment==0 || (showNote==1&&courseNote)?'space-around':'flex-start'}">
+			<view class="ques-content-tit" :style="{ color: currentId==0&&showNote==1&&courseNote ? '#FF5C03':'#222',fontSize: fontSize(36)}" @click="choose(0)">问答题</view>
+			<view class="ques-content-tit" v-if="showTreatment==0" :style="{ color: currentId==2? '#FF5C03':'#222',fontSize: fontSize(36)}" @click="choose(2)">活动</view>
+			<view class="ques-content-tit" v-if="showNote==1&&courseNote" :style="{ color: currentId==1 ? '#FF5C03':'#222',fontSize: fontSize(36)}" @click="choose(1)">笔记</view>
+		</view>
+		<view v-if="currentId==1&&showNote==1&&courseNote" class="note" :style="{ fontSize: fontSize(32)}">{{courseNote}}</view>
+		<template v-if="currentId==2&&showTreatment==0">
+			<goodsList ref="goodsList" :treatmentPackage="treatmentPackage" :urlOption="urlOption"></goodsList>
+		</template>
+		<template v-if="currentId==0">
+			<view v-for="(item,index) in quesList" :key="index">
+				<view class="ques-title" :style="{ fontSize: fontSize(32)}">
+					<text>{{index + 1}}.</text>
+					<view class="ques-type" :style="{ fontSize: fontSize(24)}" 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,index)">
+					<view>
+						{{numberToLetter(idx)}}.
+					</view>
+					<view>{{option.name}}</view>
+				</view>
+			</view>
+			<view class="empty" v-if="quesList&&quesList.length==0">暂未设置题目~</view>
+		</template>
+	</view>
+</template>
+
+<script>
+	import goodsList from "./goodsList.vue"
+	export default {
+		components: {
+			goodsList
+		},
+		props: ['quesList','openCommentStatus','courseNote','showNote','showTreatment','treatmentPackage','urlOption'],
+		data() {
+			return {
+				currentId: 0
+			}
+		},
+		computed: {
+			fontSize() {
+				return size=>{
+					const value = uni.upx2px(size)
+					const scale = uni.getStorageSync('fontScale') || 1;
+					if(scale<1){
+						return value + 'px';
+					}else {
+						return value * scale + 'px';
+					}
+				}
+			},
+			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,index) {
+				const param = {
+					item,
+					option,
+					index
+				}
+				this.$emit("handleAnswer", param)
+			},
+			choose(type) {
+				this.currentId=type
+				this.$emit("showBtnType", type)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@mixin u-flex($flexD, $alignI, $justifyC) {
+		display: flex;
+		flex-direction: $flexD;
+		align-items: $alignI;
+		justify-content: $justifyC;
+	}
+	.ques-flex {
+		// justify-content: space-around
+		@include u-flex(row, center, space-around);
+	}
+	.note{
+		padding: 30rpx 0;
+	}
+	.empty {
+		@include u-flex(row, center, center);
+		padding: 24rpx 50rpx;
+		color: #999999;
+	}
+	.ques-content {
+		background-color: #fff;
+		padding: 24rpx 32rpx 24rpx 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>

+ 297 - 0
pages_course/components/treasureChest.vue

@@ -0,0 +1,297 @@
+<template>
+	<cover-view key="treasureBox" class="treasure-box" :style="{display: showBox&&isfull?'flex':'none'}"
+		:class="[{opening}, {fadeOut}, {dropIn},{swing}]" @click="open">
+		<cover-image :class="opening ? 'box-img openingGif' : 'box-img boxPng'"
+			:src="currentIdx >=0 ? opening ? boxList[currentIdx].openChestUrl : boxList[currentIdx].closeChestUrl :''"></cover-image>
+		<cover-view class="countdown" v-if="!opening">{{count}}s</cover-view>
+	</cover-view>
+</template>
+
+<script>
+	export default {
+		props: {
+			boxList: {
+				type: Array,
+				default: []
+			},
+			isfull: {
+				type: Boolean,
+				default: false
+			},
+			onHide: {
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {
+				showBox: false, // 控制宝箱显隐
+				opening: false, // 是否正在打开
+				fadeOut: false, // 控制自动消失的动画类
+				dropIn: false,
+				swing: false,
+				count: 20, // 倒计时
+				timer: null, // 倒计时句柄
+				timeout: null, // 20s 未点击自动消失句柄
+				currentIdx: -1,
+				flagTime: 0,
+				winAudio: null
+			}
+		},
+		watch: {
+			onHide(val) {
+				if (!this.showBox) return
+				if (val) { // 暂停
+					clearInterval(this.timer)
+					clearTimeout(this.timeout)
+					this.timer = null
+					this.timeout = null
+				} else { // 继续
+					if (!this.opening) {
+						const flag = this.boxList.some(item => this.flagTime >= item.time && this.flagTime <= item.time + 20);
+						if(flag) {
+							this.countDown()
+							this.setAutoHide() // 重新计算剩余时长
+						} else {
+							this.count = 20
+							clearInterval(this.timer)
+							clearTimeout(this.timeout)
+							this.timer = null
+							this.timeout = null
+						}
+					}
+				}
+			},
+		},
+		mounted() {
+			this.initAudio();
+		},
+		methods: {
+			initAudio() {
+			    this.winAudio = uni.createInnerAudioContext();
+			    this.winAudio.src = 'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/audio/treasureChest.mp3';
+			    this.winAudio.volume = 0.6;
+			},
+			close() {
+				this.swing = false
+				this.opening = true
+				this.showBox = false
+			},
+			showTreasure(flagTime) {
+				this.flagTime = flagTime
+				const idx = this.boxList.findIndex(v => v.time == flagTime && v.status == 0)
+				if (idx == -1) return
+
+				this.currentIdx = idx
+				this.showBox = true
+				this.opening = false
+				this.swing = false
+				this.fadeOut = false
+				this.dropIn = true
+				this.count = 20
+				if(this.isfull) {
+					uni.vibrateLong()
+				}
+				clearInterval(this.timer)
+				clearTimeout(this.timeout)
+				this.countDown()
+				this.setAutoHide()
+			},
+
+			/* 倒计时 */
+			countDown() {
+				clearInterval(this.timer) // 防止重复启动
+				this.timer = setInterval(() => {
+					if (this.count > 0) {
+						this.count--
+					} else {
+						clearInterval(this.timer)
+						this.timer = null
+					}
+				}, 1000)
+			},
+
+			/* 用户点击宝箱 */
+			open() {
+				if (this.opening || this.swing) return
+				clearTimeout(this.timeout)
+				clearInterval(this.timer)
+				this.swing = true
+				this.claim(1)
+			},
+			claimSuccess(status) {
+				setTimeout(()=>{
+					this.swing = false
+					this.opening = true
+					if(status == 1) {
+						this.winAudio.play();
+					}
+				},400)
+				this.boxList[this.currentIdx].status = status
+				setTimeout(() => {
+					this.winAudio?.stop();
+					this.showBox = false
+				}, 3000)
+			},
+			/* 设置/重置 autoHide 定时器 */
+			setAutoHide() {
+				clearTimeout(this.timeout)
+				const remainMs = this.count * 1000
+				if (remainMs <= 0) { // 已经过期
+					this.autoHide()
+					return
+				}
+				this.timeout = setTimeout(() => this.autoHide(), remainMs)
+			},
+			/* 20s 未点击,自动消失 */
+			autoHide() {
+				clearInterval(this.timer)
+				this.fadeOut = true
+				if(this.isfull) {
+					this.claim(2)
+				} else {
+					this.claim(0)
+				}
+				setTimeout(() => {
+					this.showBox = false
+				}, 600)
+			},
+			claim(status) {
+				this.$emit('claimFun', {
+					rewardId: this.boxList[this.currentIdx].rewardVideoRelation.rewardId,
+					status: status,
+					time: this.boxList[this.currentIdx].time
+				})
+			}
+		},
+		beforeDestroy() {
+			if (this.winAudio) {
+				this.winAudio.stop();
+				this.winAudio.destroy();
+				this.winAudio = null;
+			}
+			clearInterval(this.timer)
+			clearTimeout(this.timeout)
+		}
+	}
+</script>
+
+
+<style lang="scss" scoped>
+	@keyframes dropIn {
+		0% {
+			opacity: 0;
+			transform: translateY(-160px);
+		}
+
+		60% {
+			opacity: 1;
+			transform: translateY(12px);
+		}
+
+		100% {
+			opacity: 1;
+			transform: translateY(0);
+		}
+	}
+
+	.treasure-box.dropIn {
+		animation: dropIn 0.7s cubic-bezier(.25, .85, .45, 1.25) forwards,
+			pulse 1s ease-in-out infinite 0.7s;
+	}
+
+	@keyframes swing {
+		20% {
+			transform: rotate(-8deg);
+		}
+
+		40% {
+			transform: rotate(8deg);
+		}
+
+		60% {
+			transform: rotate(-6deg);
+		}
+
+		80% {
+			transform: rotate(6deg);
+		}
+
+		100% {
+			transform: rotate(0deg);
+		}
+	}
+
+	.treasure-box.swing {
+		animation: swing 0.4s ease-in-out infinite forwards; 
+	}
+
+	/* 宝箱 */
+	.treasure-box {
+		position: fixed;
+		left: 100px;
+		bottom: 80px;
+		width: 192px;
+		/* 128 × 1.5 */
+		height: 138px;
+		/* 92 × 1.5 */
+		animation: pulse 0.4s ease-in-out infinite;
+		// z-index: 999;
+		display: flex;
+		align-items: flex-end;
+	}
+
+	.openingGif {
+		width: 192px;
+		/* 128 × 1.5 */
+		height: 138px;
+		/* 92 × 1.5 */
+	}
+
+	.boxPng {
+		width: 135px;
+		height: 96px;
+		margin-left: 20px;
+	}
+
+	.countdown {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		color: #fff;
+		font-size: 20px;
+		font-weight: bold;
+		text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
+	}
+
+	/* 动画 */
+	@keyframes pulse {
+
+		0%,
+		100% {
+			transform: scale(1);
+		}
+
+		50% {
+			transform: scale(1.15);
+		}
+	}
+
+	/* 打开后停止 pulse */
+	.treasure-box.opening {
+		animation: none;
+	}
+
+	/* 自动消失 */
+	.treasure-box.fadeOut {
+		animation: fadeOutUp .6s ease-out forwards;
+	}
+
+	@keyframes fadeOutUp {
+		to {
+			opacity: 0;
+			transform: translate(-50%, -40px);
+		}
+	}
+</style>

+ 399 - 0
pages_course/components/turntableOne.vue

@@ -0,0 +1,399 @@
+<template>
+	<uni-popup ref="turntablePopup" type="center" :is-mask-click="false">
+		<view class="turntable">
+			<image class="bg" src="https://cos.his.cdwjyyh.com/fs/20250910/9a6263291ec0429ea5828a15b2b490dc.png" mode="aspectFit"></image>
+			<view class="turntable-con">
+				<image class="text" src="https://cos.his.cdwjyyh.com/fs/20250910/fc08b64307a344b4948568fa0f81401e.png" mode="heightFix"></image>
+				<image class="base" src="https://cos.his.cdwjyyh.com/fs/20250910/9385e4a6d5e245dfb86f425f49235589.png" mode="aspectFit"></image>
+				<image class="decoration_img" src="https://cos.his.cdwjyyh.com/fs/20250910/86577ed4fc50420d99b1153e2dd6e1df.png" mode="aspectFit"></image>
+				<view class="ring">
+					<view class="canvas-content" :class="{'infinite-spin': spinning}">
+						<view :animation="animationData" class="canvas-content" id="zhuanpano" style="">
+							<view class="canvas-line">
+								<!-- <canvas canvas-id="sector" style="width:502rpx;height:502rpx" /> -->
+								<view class="canvas-litem" v-for="(item,index) in list" :key="index"
+									:style="{transform:'rotate('+(index * width + width / 2)+'deg)'}"></view>
+							</view>
+
+							<view class="canvas-list">
+								<view class="canvas-item"
+									:style="{transform: 'rotate('+((index) * width)+'deg)', zIndex:index}"
+									v-for="(iteml,index) in list" :key="index">
+									<view class="canvas-item-text" :style="'transform:rotate('+(index)+')'">
+										<view class="b">{{iteml.name}}</view>
+										<image class="icon-awrad iconfont" :src="iteml.iconUrl" mode="aspectFit">
+										</image>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<image class="button" src="https://cos.his.cdwjyyh.com/fs/20250910/d05462c59e7f4ab98e5205b7f8172325.png" mode="aspectFit" @click="playReward">
+					</image>
+				</view>
+				<image class="ring_bg" src="https://cos.his.cdwjyyh.com/fs/20250910/41bea8eda62e484d94a19f18316e509b.png" mode="aspectFit"></image>
+			</view>
+		</view>
+		<image class="close" src="https://cos.his.cdwjyyh.com/fs/20250910/93608bad8ad1479a854ec26e8eaaacea.png" @click="close"></image>
+	</uni-popup>
+</template>
+
+<script>
+	import {
+		getVideoRewardRules
+	} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				running: false,
+				spinning: false, // 是否处于无限旋转
+				list: [],
+				width: 0,
+				animationData: {},
+				btnDisabled: '',
+				runDeg: 0,
+				targetIdx: -1,
+				duration: 1000,
+				currentDeg: 0, // 实时角度
+				idleTimer: null,
+				animationRun: null,
+				winAudio: null,
+			}
+		},
+		methods: {
+			initAudio() {
+				this.winAudio = uni.createInnerAudioContext();
+				this.winAudio.src = 'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/audio/win2.mp3';
+				this.winAudio.volume = 0.6;
+			},
+			getVideoRewardRules(urlOption) {
+				const param = {
+					type: 3,
+					...urlOption
+				}
+				getVideoRewardRules(param).then(res => {
+					if (res.code == 200) {
+						this.list = res.data || []
+						this.width = 360 / this.list.length;
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			open(urlOption) {
+				this.animationRun = uni.createAnimation({
+					duration: 0
+				});
+				this.animationRun.rotate(0).step();
+				this.animationData = this.animationRun.export();
+				this.running = false
+				this.spinning = false;
+				clearInterval(this.idleTimer);
+				this.runDeg = 0
+				this.targetIdx = -1
+				this.$refs.turntablePopup.open()
+				this.getVideoRewardRules(urlOption)
+			},
+			close(type) {
+				if (type == 'close') {
+					this.running = false
+					this.spinning = false;
+					clearInterval(this.idleTimer);
+				}
+				if (this.running) {
+					uni.showToast({
+						title: '抽取中,请勿关闭',
+						icon: 'none'
+					})
+					return
+				}
+				this.$refs.turntablePopup.close()
+			},
+			drawFanWithAlternateColor(id, x, y, r, count) {
+				const ctx = uni.createCanvasContext(id, this);
+				const sweep = 360 / count; // 每份角度
+				let start = -90 - sweep / 2; // 第一个扇形起始角度(deg)
+
+				for (let i = 0; i < count; i++) {
+					const end = start + sweep; // 结束角度
+					let color;
+					color = i % 2 === 0 ? '#FFDFD3' : '#FFF';
+
+					ctx.beginPath();
+					ctx.moveTo(x, y);
+					ctx.arc(
+						x, y, r,
+						(start * Math.PI) / 180,
+						(end * Math.PI) / 180
+					);
+					ctx.closePath();
+					ctx.setFillStyle(color);
+					ctx.fill();
+
+					start = end; // 下一个扇形接着画
+				}
+
+				ctx.draw();
+			},
+			animation(index = null) {
+				//中奖index
+				let list = this.list;
+				let runNum = 1; //旋转8周
+
+				// 旋转角度
+				this.runDeg = this.runDeg || 0;
+				this.runDeg = this.runDeg + (360 - this.runDeg % 360) + (360 * runNum - index * (360 / list.length)) + 1
+				
+				// const a = 360 / list.length;
+				//    this.runDeg = this.currentDeg + 360 * 4  + (360 - this.currentDeg % 360)  - index * a + 1;      
+				//创建动画
+				this.animationRun = uni.createAnimation({
+					duration: this.duration,
+					timingFunction: 'ease'
+				})
+				console.log("=====animationRun=", this.animationRun)
+				this.animationRun.rotate(this.runDeg).step();
+				this.animationData = this.animationRun.export();
+			},
+			//发起抽奖
+			playReward() {
+				if (this.running) {
+					uni.showToast({
+						title: '抽取中',
+						icon: 'none'
+					})
+					return
+				}
+				this.running = true
+				this.startIdle();
+				this.$emit('sendRewardFun',3)
+			},
+			startIdle() {
+				this.spinning = true; // 打开 CSS 动画
+				// 同时用定时器记录角度,方便后面衔接
+				this.idleTimer = setInterval(() => {
+					this.runDeg = (this.runDeg + 36) % 360; // 每 100ms 走 6°
+				}, 100);
+			},
+			endSuccess(code) {
+				this.targetIdx = this.list.findIndex(it=>it.code == code)
+				const that = this
+				this.spinning = false;
+				clearInterval(this.idleTimer);
+				if (this.targetIdx == -1) {
+					uni.showToast({
+						title: '抽奖失败',
+						icon: 'none'
+					})
+					this.running = false;
+					return
+				}
+				this.animation(this.targetIdx)
+				this.winAudio?.play();
+				setTimeout(() => {
+					this.running = false;
+					uni.showModal({
+						title: '恭喜,中奖',
+						content: this.list[this.targetIdx].name,
+						showCancel: false,
+						success: function(res) {
+							if (res.confirm) {
+								that.winAudio?.stop();
+								that.winAudio?.destroy();
+								that.$refs.turntablePopup.close()
+								that.$emit("openAppPop")
+							}
+						}
+					});
+				}, this.duration + 1000)
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@keyframes spin {
+		from {
+			transform: rotate(0deg);
+		}
+
+		to {
+			transform: rotate(360deg);
+		}
+	}
+
+	.infinite-spin {
+		animation: spin 1s linear infinite;
+	}
+
+	.close {
+		width: 64rpx;
+		height: 64rpx;
+		margin: 24rpx auto 0 auto;
+		display: block;
+	}
+
+	.turntable {
+		position: relative;
+		width: 660rpx;
+		height: 880rpx;
+
+		.bg {
+			width: 660rpx;
+			height: 880rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+
+		&-con {
+			width: 660rpx;
+			height: 880rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			position: relative;
+			z-index: 2;
+		}
+
+		.text {
+			width: 520rpx;
+			height: 104rpx;
+			margin-top: 47rpx;
+		}
+
+		.base {
+			width: 451rpx;
+			height: 177rpx;
+			position: absolute;
+			bottom: 55rpx;
+			left: 50%;
+			transform: translateX(-50%);
+			z-index: 3;
+		}
+
+		.decoration_img {
+			width: 637rpx;
+			height: 592rpx;
+			position: absolute;
+			bottom: 85rpx;
+			left: 50%;
+			transform: translateX(-50%);
+			z-index: 4;
+		}
+
+		.ring {
+			width: 502rpx;
+			height: 502rpx;
+			background: #FFFDFD;
+			border-radius: 50%;
+			position: relative;
+			margin-top: 79rpx;
+			z-index: 9;
+		}
+
+		.button {
+			width: 158rpx;
+			height: 200rpx;
+			position: absolute;
+			top: calc(50% - 21rpx);
+			left: 50%;
+			transform: translate(-50%, -50%);
+			z-index: 99;
+		}
+
+		.ring_bg {
+			width: 620rpx;
+			height: 620rpx;
+			position: absolute;
+			bottom: 74rpx;
+			left: 50%;
+			transform: translateX(-50%);
+			z-index: 6;
+		}
+
+		.canvas-content {
+			position: absolute;
+			left: 0;
+			top: 0;
+			z-index: 1;
+			display: block;
+			width: 502rpx;
+			height: 502rpx;
+			border-radius: inherit;
+			/* background-clip: padding-box; */
+			/* background-color: #ffcb3f; */
+		}
+
+		.icon-awrad {
+			width: 72rpx;
+			height: 72rpx;
+			margin-top: 10rpx;
+			object-fit: contain;
+		}
+
+		.canvas-list {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: inherit;
+			height: inherit;
+			z-index: 99;
+		}
+
+		.canvas-item {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			color: #e4370e;
+			/* text-shadow: 0 1rpx 1rpx rgba(255, 255, 255, 0.6); */
+		}
+
+		.canvas-item-text {
+			position: relative;
+			display: block;
+			padding-top: 14rpx;
+			margin: 0 auto;
+			text-align: center;
+			-webkit-transform-origin: 50% 251rpx;
+			transform-origin: 50% 251rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			color: #F72F26;
+			font-weight: 500;
+			font-size: 24rpx;
+		}
+
+		.canvas-item-text text {
+			font-size: 30rpx;
+		}
+
+		/* 分隔线 */
+		.canvas-line {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: inherit;
+			height: inherit;
+			z-index: 99;
+		}
+
+		.canvas-litem {
+			position: absolute;
+			left: 251rpx;
+			top: 0;
+			width: 1rpx;
+			height: 251rpx;
+			background-color: #FF4D2C;
+			overflow: hidden;
+			-webkit-transform-origin: 50% 251rpx;
+			transform-origin: 50% 251rpx;
+		}
+	}
+</style>

+ 318 - 0
pages_course/components/turntableTwo.vue

@@ -0,0 +1,318 @@
+<template>
+	<uni-popup ref="turntablePopup" type="center" :is-mask-click="false">
+		<view class="turntable">
+			<image class="turntable-bg" src="https://cos.his.cdwjyyh.com/fs/20250910/de386927c5f44e02ab3ecc480ddb9797.png" mode="aspectFit"></image>
+			<view class="turntable-box">
+				<view class="turntable-wrap">
+					<view class="turntable-item" :class="{ active: idx == light,disabled: item.isReceive }"
+						v-for="(item,idx) in cells" :key="idx">
+						<image :src="item.iconUrl" mode="aspectFit"></image>
+						<view class="ellipsis">{{item.name}}</view>
+					</view>
+				</view>
+			</view>
+			<image class="close" src="https://cos.his.cdwjyyh.com/fs/20250910/93608bad8ad1479a854ec26e8eaaacea.png" @click="close"></image>
+			<view class="btn-box">
+				<image src="https://cos.his.cdwjyyh.com/fs/20250910/fe230bfdf74f4f0dac88af53f709d6c5.png" mode="widthFix" :class="isReceive==1 ?'gray':''" @click="start"></image>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import {getVideoRewardRules} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				baseUrl: uni.getStorageSync('requestImagesPath'),
+				light: -1,
+				running: false,
+				targetIdx: -1,
+				total: 0,
+				speed: 100,
+				cells:[],
+				timer: null,
+				isReceive: 0,
+				stepAudio: null,   // 跳动音
+				winAudio: null     // 中奖音
+			}
+		},
+		computed: {
+			// 剩余可用索引
+			availIdx() {
+				return this.cells.map((_, i) => i).filter(i => !this.cells[i].isReceive)
+			},
+			// 是否全部抽完
+			allDone() {
+				return this.availIdx.length === 0
+			}
+		},
+		methods: {
+			initAudio() {
+			    this.stepAudio = uni.createInnerAudioContext();
+			    this.stepAudio.src = 'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/audio/spin.mp3';
+			    this.stepAudio.volume = 0.6;
+			
+			    this.winAudio = uni.createInnerAudioContext();
+			    this.winAudio.src = 'https://fs-1319721001.cos.ap-chongqing.myqcloud.com/audio/win.mp3';
+			    this.winAudio.volume = 1;
+			},
+			getVideoRewardRules(urlOption) {
+				const param = {
+					type: 4,
+					...urlOption
+				}
+				getVideoRewardRules(param).then(res=>{
+					if(res.code == 200) {
+						this.cells = res.data || []
+						this.total = this.cells.length
+						this.isReceive = this.cells.every(item => item.isReceive == true)? 1 :0
+					}else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			open(urlOption) {
+				this.initAudio();
+				this.$refs.turntablePopup.open()
+				this.getVideoRewardRules(urlOption)
+			},
+			close(type) {
+				if(type=='close') {
+					this.running = false
+					clearInterval(this.timer)
+				}
+				if (this.running) {
+					uni.showToast({
+						title: '抽取中,请勿关闭',
+						icon: 'none'
+					})
+					return
+				}
+				this.$refs.turntablePopup.close()
+			},
+			start() {
+				if (this.running) {
+					uni.showToast({
+						title: '抽取中',
+						icon: 'none'
+					})
+					return
+				}
+				if(this.isReceive == 1) return
+				this.running = true
+				clearInterval(this.timer)
+				let last = -1
+				if(this.availIdx.length >1) {
+					this.timer = setInterval(() => {
+						let next;
+						do {
+						  next = this.availIdx[Math.floor(Math.random() * this.availIdx.length)];
+						} while (next === last);
+						last = next;
+						this.light = next;
+						this.stepAudio.stop();  // 停掉上一声(防止重叠)
+						this.stepAudio.play();  // 播放跳动音
+					}, this.speed)
+				}
+				this.$emit('sendRewardFun',4)
+			},
+			endSuccess(code) {
+				this.targetIdx = this.cells.findIndex(it=>it.code == code)
+				clearInterval(this.timer)
+				this.timer = null
+				if(this.targetIdx==-1) {
+					uni.showToast({
+						title: '抽奖失败',
+						icon: 'none'
+					})
+					return
+				}
+				const STEP = 100;                          // 每格固定 100 ms
+				const MIN_STEP = 10;                       // 最少 10 步 → 1 s
+				this.speed = STEP;
+				let totalSteps = Math.max(MIN_STEP, this.availIdx.length);
+				// 约 2.5s / 100ms
+				let step = 0
+				let last = -1
+				const that = this
+				if(this.availIdx.length <= 1) {
+					this.light = this.targetIdx
+					this.stepAudio.stop();
+					this.winAudio.play();   // 播放中奖音
+					this.running = false
+					this.isReceive = 1
+					uni.showModal({
+						title: '恭喜,中奖',
+						content: this.cells[this.targetIdx].name,
+						showCancel: false,
+						success: function (res) {
+							if (res.confirm) {
+								if (that.stepAudio) {
+									that.stepAudio.stop();
+									that.stepAudio.destroy();
+									that.stepAudio = null;
+								}
+								if (that.winAudio) {
+									that.winAudio.stop();
+									that.winAudio.destroy();
+									that.winAudio = null;
+								}
+								that.$refs.turntablePopup.close()
+								that.$emit("openAppPop")
+							}
+						}
+					});
+					return
+				}
+				this.timer = setInterval(() => {
+					let next
+					do {
+						next = this.availIdx[Math.floor(Math.random() * this.availIdx.length)]
+					} while (next === last)
+					last = next
+					this.light = next
+					this.stepAudio.stop();  // 停掉上一声(防止重叠)
+					this.stepAudio.play();  // 播放跳动音
+					step++
+				
+					if (step >= totalSteps) {
+						clearInterval(this.timer)
+						this.light = this.targetIdx
+						this.stepAudio.stop();
+						this.winAudio.play();   // 播放中奖音
+						// 置灰
+						this.running = false
+						this.isReceive = 1
+						setTimeout(()=>{
+							uni.showModal({
+								title: '恭喜,中奖',
+								content: this.cells[this.targetIdx].name,
+								showCancel: false,
+								success: function (res) {
+									if (res.confirm) {
+										if (that.stepAudio) {
+											that.stepAudio.stop();
+											that.stepAudio.destroy();
+											that.stepAudio = null;
+										}
+										if (that.winAudio) {
+											that.winAudio.stop();
+											that.winAudio.destroy();
+											that.winAudio = null;
+										}
+										that.$refs.turntablePopup.close()
+										that.$emit("openAppPop")
+									}
+								}
+							});
+						},500)
+						// this.cells[this.targetIdx].isReceive = true
+					}
+				}, this.speed)
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.gray {
+	  filter: grayscale(1);   /* 1 = 100% 灰度 */
+	}
+	.close {
+		width: 64rpx;
+		height: 64rpx;
+		position: absolute;
+		top:  88rpx;
+		right: 20rpx;
+		z-index: 2;
+	}
+
+	.active {
+		transform: scale(1.05);
+		background: linear-gradient(0deg, #FFD44F 0%, #FFFABD 100%) !important;
+		box-shadow: 0rpx 2rpx 0rpx 0rpx #FFFCF5 !important;
+	}
+
+	.disabled {
+		filter: grayscale(1) brightness(0.7);
+		opacity: 0.5;
+	}
+
+	.btn-box {
+		width: 540rpx;
+		height: 104rpx;
+		position: absolute;
+		bottom: 46rpx;
+		left: 50%;
+		transform: translateX(-50%);
+		z-index: 2;
+
+		image {
+			width: 100%;
+			height: auto;
+		}
+	}
+
+	.turntable {
+		width: 750rpx;
+		height: 1056rpx;
+		position: relative;
+		&-bg {
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+
+		&-box {
+			position: absolute;
+			bottom: 174rpx;
+			left: 50%;
+			transform: translateX(-50%);
+			z-index: 2;
+			width: 623rpx;
+			height: 628rpx;
+			padding: 16rpx 0 8rpx 16rpx;
+			box-sizing: border-box;
+		}
+
+		&-wrap {
+			display: flex;
+			flex-wrap: wrap;
+		}
+
+		&-item {
+			width: 112rpx;
+			height: 112rpx;
+			background: linear-gradient(0deg, #FCEFCA 0%, #FFFFFF 100%);
+			border-radius: 16rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			font-size: 20rpx;
+			color: #333333;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			margin: 0 8rpx 8rpx 0;
+			transition: transform 0.2s, box-shadow 0.2s;
+
+			image {
+				width: 45rpx;
+				height: 63rpx;
+			}
+
+			.ellipsis {
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+			}
+		}
+	}
+</style>

+ 87 - 0
pages_course/course.vue

@@ -0,0 +1,87 @@
+<template>
+	<view>
+		<view class="video-box" v-if="videoItem">
+			<video
+			id="video-content-box"
+			style="width: 100%;height: 420rpx;"
+			:poster="poster"
+			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="videoItem.videoUrl"
+			>
+			</video>
+		</view>
+		<view class="descbox" >
+			<view class="descbox-title">{{videoItem.title}}</view>
+			<view class="descbox-desc">{{videoItem.description}}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				poster:'',
+				videoItem:{},
+				videoId:null,
+			}
+		},
+		onLoad(option) {
+			if(option.videoitem){
+				this.videoItem=option.videoitem ? JSON.parse(option.videoitem) : {}
+				this.videoId=this.videoItem.videoId
+				this.poster = this.videoItem.videoImgUrl
+				uni.setNavigationBarTitle({
+					title: this.videoItem && this.videoItem.title ? this.videoItem.title : ''
+				});
+			}
+		},
+		
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.video-box {
+	width: 100%;
+	height: 420rpx;
+	overflow: hidden;
+	position: relative;
+
+	#myVideo {
+		width: 100%;
+		height: 100%;
+	}
+}
+.descbox {
+	padding: 20rpx 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;
+	}
+
+	&-desc {
+		overflow: hidden;
+		position: relative;
+	}
+}
+</style>

+ 441 - 0
pages_course/feedback.vue

@@ -0,0 +1,441 @@
+<template>
+	<view :style="{fontSize: fontSize(30)}">
+		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<view class="arrow-left" :style="{top: statusBarHeight + 'px'}" @click="goBack">返回</view>
+			<view class="header-title" :style="{height:menuButtonH+'px',lineHeight:menuButtonH+'px'}">投诉反馈</view>
+		</view>
+		<view class="container" :style="{paddingTop: `calc(88rpx + ${statusBarHeight}px)`}">
+			<view class="formbox" v-if="isLastChild==1">
+				<view class="formbox-title">{{ text }}</view>
+				<view class="form">
+					<u-form labelPosition="top" labelWidth='auto' :model="formdata" :rules="rules" ref="uForm" errorType="toast">
+						<u-form-item label=" " prop="complaintContent">
+							<u--textarea v-model="formdata.complaintContent" border="none" :clearable="true" placeholder="请填写反馈内容" count maxlength='200'></u--textarea>
+						</u-form-item>
+						<view class="box">
+							<u-form-item label="图片(最多9张)">
+								<view class="imgitem">
+									<u-upload
+										:fileList="fileList1"
+										@afterRead="afterRead"
+										@delete="deletePic"
+										name="1"
+										:maxCount="9"
+									></u-upload>
+								</view>
+							</u-form-item>
+						</view>
+					</u-form>
+				</view>
+				<view class="footer-btn">
+					<button class="submit-btn" @click="submit">提交</button>
+					<!-- <button class="submit-btn back-btn" @click="goBack">返回</button> -->
+				</view>
+			</view>
+			<view class="container" v-else>
+				<view class="list-item title">请选择反馈类型</view>
+				<view class="list-item" v-for="(item, index) in feedbackItems" :key="index"
+					@click="handleClick(item,index)">
+					<view>{{ item.complaintTypeName }}</view>
+					<uni-icons type="right" size="20" color="rgba(0,0,0,.3)" v-if="isLastChild==0"></uni-icons>
+				</view>
+				<view class="list-item" v-if="pageIndex!=0&&isLastChild==0" @click="goBack">
+					返回上一层
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { mapGetters } from 'vuex';
+	import{ getTypeTree, complaintRecord,loginByMp } from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				menuButtonH: 45,
+				pageIndex: 0,
+				list: [],
+				feedbackItems: [],
+				userId: '',
+				courseId: '',
+				videoId: '',
+				formdata: {
+					complaintContent: ""
+				},
+				rules: {
+					complaintContent:[{
+						required: true,
+						message: '投诉反馈内容不能为空',
+						trigger: ["change", "blur"]
+					}]
+				},
+				text: '',
+				templateId: 0,
+				user: {},
+				isLastChild: 0,
+				isLogin: false,
+				fileList1: [],
+			};
+		},
+		computed: {
+			...mapGetters(['coureLogin']),
+			fontSize() {
+				return size=>{
+					const value = uni.upx2px(size)
+					const scale = uni.getStorageSync('fontScale') || 1;
+					if(scale>1.5) {
+						return value * 1.5 + 'px';
+					} else if(scale<1){
+						return value + 'px';
+					}else {
+						return value * scale + 'px';
+					}
+				}
+			},
+		},
+		watch: {
+		    coureLogin: {
+		      immediate: true,          // 页面一进入就检查一次
+		      handler(val) {
+		        if (val == 2) {
+					console.log("AppToken失效,请重新登录")
+					this.isLogin = false
+					this.goLogin()
+		        }
+		      }
+		    }
+		},
+		onLoad(option) {
+			this.userId = option.userId || ''
+			this.courseId = option.courseId || ''
+			this.videoId = option.videoId || ''
+			this.utils.isLoginCourse().then(
+				res => {
+					if(res){
+						this.isLogin = true
+						this.getMenuButton()
+						this.getList()
+					} else{
+						this.isLogin = false
+						this.goLogin()
+					}
+				},
+				rej => {}
+			);
+		},
+		methods: {
+			getMenuButton(){
+				const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
+				this.menuButtonH = menuButtonInfo.height
+			},
+			goBack() {
+				// 返回上一层逻辑
+				if (this.pageIndex == 0) {
+					uni.navigateBack();
+				} else {
+					this.pageIndex--;
+					this.formdata = {
+						complaintContent: ""
+					}
+					if (this.isLastChild == 1) {
+						this.isLastChild = 0
+					} else {
+						if (this.pageIndex == 0) {
+							this.feedbackItems = this.list
+							this.templateId = 0
+						} else {
+							const list = this.findGrandparentOrAllData(this.list, this.templateId)
+							this.feedbackItems = list.childrenType
+							this.templateId = list.complaintTypeId
+						}
+					}
+				
+				}
+			},
+			findGrandparentOrAllData(data, targetId) {
+				// 递归函数,用于查找目标节点的父级节点
+				function findParent(node, targetId) {
+					if (!node || !node.childrenType) return null;
+			
+					for (let child of node.childrenType) {
+						if (child.complaintTypeId === targetId) {
+							return node; // 找到目标节点的父级节点
+						}
+			
+						const result = findParent(child, targetId); // 递归查找子节点
+						if (result) return result;
+					}
+			
+					return null;
+				}
+			
+				// 遍历顶层节点,查找目标节点的父级和祖父级节点
+				for (let root of data) {
+					if (root.complaintTypeId === targetId) {
+						return data; // 如果目标节点是顶层节点,返回所有数据
+					}
+			
+					const parent = findParent(root, targetId); // 查找目标节点的父级节点
+					if (parent) {
+						const grandparent = findParent(root, parent.complaintTypeId); // 查找父级节点的父级节点
+						return grandparent || data; // 如果找到祖父节点返回祖父节点,否则返回所有数据
+					}
+				}
+			
+				return data; // 如果没有找到目标节点,返回所有数据
+			},
+			handleClick(item,index) {
+				if (this.isLastChild == 1) return
+				if (this.pageIndex >= 0) {
+					this.pageIndex++
+					let children = this.feedbackItems[index].childrenType || [];
+					this.templateId = this.feedbackItems[index].complaintTypeId
+					this.formdata = {
+						complaintContent: ""
+					}
+					this.text = this.feedbackItems[index].complaintTypeName
+					if (children.length > 0) {
+						this.isLastChild = 0
+						this.feedbackItems = children
+						this.templateId = this.feedbackItems[0].complaintTypeId
+					} else {
+						this.isLastChild = 1
+						this.formdata = {
+							complaintContent: ""
+						}
+						setTimeout(() => {
+							this.$refs.uForm.setRules(this.rules)
+						}, 200)
+					}
+				}
+			},
+			getList(){
+				getTypeTree().then(res=>{
+					if(res.code == 200) {
+						this.list = res.data
+						this.pageIndex = 0
+						this.feedbackItems = this.list
+					}
+				})
+			},
+			submit() {
+				if(this.fileList1.some(item=>item.status == 'uploading')) {
+					uni.showToast({
+						title: '等待图片上传中',
+						icon: 'none'
+					})
+					return
+				}
+				var images=[];
+				this.fileList1.forEach(function(element) {
+					images.push(element.url)
+				});
+				this.$refs.uForm.validate().then(res => {
+					if (res) {
+						const param = {
+							userId: this.userId,
+							complaintTypeId: this.templateId,
+							complaintContent: this.formdata.complaintContent,
+							courseId: this.courseId,
+							videoId: this.videoId,
+							complaintUrl: images.toString()
+						}
+						complaintRecord(param).then(res=>{
+							uni.showModal({
+								title: '',
+								content: '我们已收到您的反馈,谢谢',
+								showCancel: false,
+								success: function (res) {
+									if (res.confirm) {
+										uni.navigateBack()
+									} else if (res.cancel) {
+										uni.navigateBack()
+									}
+								}
+							});
+						})
+					}
+				})
+			},
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			async afterRead(event) {
+				// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						status: 'success',
+						message: '',
+						url: result
+					}))
+					fileListLen++
+				}
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: 'https://h5api.his.cdwjyyh.com/app/common/uploadOSS', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						success: (res) => {
+							setTimeout(() => {
+								console.log(JSON.parse(res.data).url)
+								resolve(JSON.parse(res.data).url)
+							}, 1000)
+						}
+					});
+				})
+			},
+			goLogin() {
+				this.utils.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,appId:"wx19c8813ffc33d1cb"}).then(res=>{
+										 uni.hideLoading();
+										 if (res.code == 200) {
+											this.$store.commit('setCoureLogin', 1);
+											uni.setStorageSync('AppTokenmini_RTCourse', res.token);
+											uni.setStorageSync('auto_userInfo', JSON.stringify(res.user));
+											this.userId = res.user.userId || ''
+											this.isLogin = true
+											this.getMenuButton()
+											this.getList()
+										 } else {
+											uni.showToast({
+												title: res.msg,
+												icon: 'none'
+											});
+										 }
+									 }).catch(err=>{
+										uni.hideLoading();
+										uni.showToast({
+											icon:'none',
+											title: "登录失败,请重新登录",
+										});
+									});
+							   }
+							});
+						}
+					})
+				}).catch(err => {})
+			},
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.container {
+		background-color: #fff;
+	}
+	.formbox-title {
+		padding-bottom: 30rpx;
+		border-bottom: 1px solid #f4f4f4;
+	}
+	.formbox {
+		border-top: 1px solid #f4f4f4;
+		padding: 30rpx;
+	}
+	.box {
+		padding-bottom: 24rpx;
+		border-top: 1px solid #f4f4f4;
+		.imgitem {
+			padding-top: 20rpx;
+		}
+	}
+	.footer-btn {
+		margin-top: 50rpx;
+	}
+	.submit-btn {
+		width: 50%;
+		height: 88rpx;
+		line-height: 88rpx;
+		text-align: center;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		color: #FFFFFF;
+		background: rgb(0,178,106);
+		border-radius: 16rpx;
+		border: 1rpx solid ;
+		margin-bottom: 30rpx;
+		&::after {
+			border: none;
+		}
+	}
+	.back-btn {
+		color: #bbb;
+		background: transparent;
+		border-radius: 16rpx;
+		border: 1rpx solid #999;
+	}
+	.header-nav {
+		height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		overflow: hidden;
+		background-color: #fff;
+		box-sizing: border-box;
+		width: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		.header-title {
+			flex: 1;
+			text-align: center;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			font-family: PingFang SC,PingFang SC;
+			font-weight: 500;
+			font-size: 15px;
+			color: #000;
+			box-sizing: border-box;
+		}
+	}
+	.arrow-left {
+		position: absolute;
+		left: 24rpx;
+		height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		overflow: hidden;
+	}
+	.list-item {
+		background-color: #fff;
+		padding: 24rpx;
+		border-bottom: 1rpx solid #f4f4f4;
+		font-size: 15px;
+		color: #333;
+	}
+
+	.title {
+		background-color: #f4f4f4;
+	}
+</style>

+ 322 - 0
pages_course/learn.vue

@@ -0,0 +1,322 @@
+<template>
+	<view class="container">
+		<view class="top">
+			<image class="bg " style="height: 421rpx;" :src="learncourse.imgUrl" mode="widthFix"></image>
+			<view class="top-box">
+				<view class="title">{{learncourse.courseName}}</view>
+				<view class="txt">
+					<image src="https://cos.his.cdwjyyh.com/fs/20250807/1ec06761a8cc46dcb330b5c09dbb39a5.png"></image>
+					<text>共{{learnList.length}}节课</text>
+				</view>
+			</view>
+		</view>
+		<view class="container-body">
+			<view class="list" v-for="(item,index) in learnList" :key="index">
+				<view class="img-box">
+					<view class="sub">第{{index+1}}课</view>
+					<image :src="learncourse.imgUrl || 'https://cos.his.cdwjyyh.com/fs/20250807/1eebee6c3bff4fd68d1d3dde090bdf89.png'" mode="aspectFill"></image>
+				</view>
+				<view class="right">
+					<view class="title">{{item.title}}</view>
+					<view class="bottom">
+						<view></view>
+						<!-- <view class="tip">
+							<image src="/static/course/learn3.png" mode="widthFix"></image>
+							<text>答题送金币+200</text>
+						</view> -->
+						<!-- <view @click="goLive(item)" class="btn" v-if="item.stauts==0">已学习4%</view> -->
+						<view @click="goLive(item)" class="btn-red">去学习</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import {getAppletCourseVideo,getAppletCourse} from '@/api/course.js'
+	
+	export default {
+		data() {
+			return {
+				courseId: null,
+				tabList: [{
+					name: '详情'
+				}, {
+					name: '课程目录'
+				}],
+				learnList: [],
+				learncourse:{},
+				type:null,
+			}
+		},
+		computed: {
+
+		},
+		onLoad(options) {
+			// 接收传递的课程 ID
+			if (options.courseId) {
+				console.log(options.courseId)
+				this.courseId = options.courseId;
+				this.getAppletCourse()
+			}
+			
+		},
+		mounted() {
+		},
+		methods: {
+			goLive(item) {
+				const id=item.videoId
+				uni.navigateTo({
+					url: '/pages_course/course?videoitem='+JSON.stringify(item)
+				})
+			},
+			getAppletCourse() {
+				getAppletCourse({courseId:this.courseId}).then(res => {
+					// console.log("课程列表", res)
+					if (res.code == 200) {
+						// 1. 根据 courseId 找到对应的课程
+						const course = res.data.find(item => item.courseId == this.courseId);
+						if (course && course.fsUserCourseVideoList) {
+							// 2. 映射数据到 learnList 格式
+							this.learncourse=course
+							this.learnList = course.fsUserCourseVideoList
+							uni.setNavigationBarTitle({
+								title: this.learncourse && this.learncourse.courseName ? this.learncourse.courseName : ''
+							});
+						} else {
+							console.warn("未找到课程或视频列表");
+							this.learnList = [];
+						}
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				})
+			},
+			getAppletCourseVideo() {
+				getAppletCourseVideo({courseId:this.courseId}).then(res => {
+					// console.log("课程列表", res)
+					if (res.code == 200) {
+						this.learnList = res.data
+					// 	// 1. 根据 courseId 找到对应的课程
+					// 	const course = res.data.find(item => item.courseId == this.courseId);
+					// 	if (course && course.fsUserCourseVideoList) {
+					// 		// 2. 映射数据到 learnList 格式
+					// 		this.learncourse=course
+					// 		this.learnList = course.fsUserCourseVideoList
+					// 		console.log("learnList是多少》》", this.learnList)
+					// 		console.log("learnList是多少", this.learncourse)
+							
+					// 	} else {
+					// 		console.warn("未找到课程或视频列表");
+					// 		this.learnList = [];
+					// 	}
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		padding: 0 0 30rpx;
+		background-color: #f0f4f7;
+
+		.top {
+			position: relative;
+
+			.bg {
+				width: 100%;
+			}
+
+			.top-box {
+				position: absolute;
+				bottom: -90rpx;
+				width: 100%;
+				padding: 30rpx;
+				background: linear-gradient(to bottom,
+						rgba(255, 255, 255, 0.5) 0%,
+						rgba(255, 255, 255, 0.9) 20%,
+						rgba(255, 255, 255, 1) 100%);
+				border-radius: 16rpx;
+
+				.title {
+					font-size: 34rpx;
+				}
+
+				.txt {
+					margin-top: 20rpx;
+					display: flex;
+					align-items: center;
+
+					image {
+						width: 36rpx;
+						height: 36rpx;
+						margin: 0 8rpx;
+					}
+
+					text {
+						font-size: 28rpx;
+						color: #595959;
+					}
+				}
+			}
+		}
+
+		.container-body {
+			margin-top: 110rpx;
+			padding: 0 24rpx;
+
+			.center-box {
+				background-color: #ffffff;
+				padding: 10rpx 24rpx 50rpx;
+				border-radius: 16rpx;
+
+				.progress-box {
+					display: flex;
+					align-items: center;
+					margin: 50rpx 0 30rpx;
+
+					image {
+						width: 38rpx;
+						height: 38rpx;
+					}
+
+					.title {
+						margin: 0 10rpx 0 4rpx;
+						font-size: 34rpx;
+					}
+
+					.txt {
+						font-size: 28rpx;
+						color: #595959;
+					}
+				}
+
+				.progress {
+					display: flex;
+					align-items: center;
+
+					text {
+						font-size: 26rpx;
+						margin-left: 12rpx;
+					}
+				}
+			}
+
+			.list {
+				padding: 20rpx;
+				background-color: #ffffff;
+				border-radius: 16rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				box-sizing: border-box;
+				margin-top: 20rpx;
+
+				.img-box {
+					width: 240rpx;
+					height: 150rpx;
+					border-radius: 16rpx;
+					overflow: hidden;
+					position: relative;
+					flex-shrink: 0;
+
+					.sub {
+						background-color: rgba(0, 0, 0, 0.8);
+						padding: 4rpx 16rpx;
+						color: #ffffff;
+						position: absolute;
+						top: 0;
+						left: 0;
+						font-size: 24rpx;
+						border-radius: 8rpx;
+					}
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+
+				.right {
+					height: 150rpx;
+					margin-left: 20rpx;
+					flex: 1;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-between;
+					min-width: 0;
+
+					.title {
+						font-size: 30rpx;
+						font-weight: 500;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-line-clamp: 2;
+						/* 控制显示行数 */
+						-webkit-box-orient: vertical;
+						word-break: break-all;
+						/* 允许单词内换行 */
+						max-height: 80rpx;
+						/* 根据字体大小调整 */
+						line-height: 40rpx;
+						/* 行高与字体大小匹配 */
+						width: 100%;
+						/* 确保宽度占满容器 */
+					}
+
+					.bottom {
+						display: flex;
+						// flex-direction: column;
+						justify-content: space-between;
+						align-items: center;
+						font-size: 26rpx;
+
+						.tip {
+							background: linear-gradient(to right, #fcecd0, #ffffff);
+							padding: 8rpx 12rpx;
+							border-radius: 22rpx;
+							color: #f2931d;
+
+							image {
+								width: 36rpx;
+								height: 36rpx;
+								margin-right: 4rpx;
+							}
+
+							text {}
+						}
+
+						.btn {
+							background-color: #fdf0e7;
+							padding: 8rpx 16rpx;
+							color: #f38600;
+							border-radius: 12rpx;
+						}
+
+						.btn-red {
+							background-color: #ff512f;
+							padding: 8rpx 18rpx;
+							color: #ffffff;
+							border-radius: 12rpx;
+						}
+					}
+				}
+
+			}
+		}
+	}
+</style>

+ 141 - 0
pages_course/register.vue

@@ -0,0 +1,141 @@
+<template>
+	<view class="register_box">
+		<image src="https://image.cdwjyyh.com/images/kc_hb_bg.png" class="imgbg" mode="widthFix"></image>
+		<view class="kc_footer">
+			<image src="https://image.cdwjyyh.com/images/kc_footer_bg.png" class="imgft" mode="widthFix"></image>
+			<view class="kc_footer_btn" @click="goLogin">{{isRegister==1?'注册成功':'立即注册'}}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {loginByMp,getUserPhoneDeviceType} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				isRegister: 0,
+				isLoading: false
+			}
+		},
+		methods: {
+			goLogin() {
+				if (this.isRegister == 1) {
+					uni.showToast({
+						title: '注册成功',
+						icon: 'none'
+					});
+					return
+				}
+				if (this.isLoading) return;
+				this.utils.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) => {
+									this.isLoading = true
+									uni.showToast({
+										title: '注册中...',
+										icon: 'loading'
+									});
+									loginByMp({
+										code: loginRes.code,
+										encryptedData: infoRes.encryptedData,
+										iv: infoRes.iv,
+										appId: getApp().globalData.appId
+									}).then(res => {
+										uni.hideLoading();
+										this.isLoading = false
+										if (res.code == 200) {
+											this.isRegister = 1
+											this.$store.commit('setCoureLogin', 1);
+											uni.setStorageSync('AppTokenmini_RTCourse', res.token);
+											uni.setStorageSync('auto_userInfo', JSON.stringify(res.user));
+											uni.showToast({
+												title: '注册成功',
+												icon: 'loading'
+											});
+											this.getUserPhoneDeviceType()
+										} else {
+											uni.showToast({
+												title: res.msg,
+												icon: 'none'
+											});
+										}
+									}).catch(err => {
+										this.isLoading = false
+										uni.hideLoading();
+										uni.showToast({
+											icon: 'none',
+											title: "登录失败,请重新登录",
+										});
+									});
+								}
+							});
+						}
+					})
+				}).catch(err => {})
+			},
+			getUserPhoneDeviceType(){
+				uni.getSystemInfo({
+				  	success: (result) => {
+						const param = {
+							os: result.osName || '',
+							deviceId: result.deviceId || '',
+							appId: getApp().globalData.appId
+						}
+						getUserPhoneDeviceType({param:JSON.stringify(param)})
+					},
+					fail: (error) => {
+						console.log('获取型号失败',JSON.stringify(error))
+					}
+				})
+			}, 
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.register_box {
+		position: relative;
+	}
+
+	.imgbg {
+		width: 100%;
+	}
+
+	.kc_footer {
+		width: 100%;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+
+		&_btn {
+			width: 528rpx;
+			height: 96rpx;
+			background: #FF5C03;
+			border-radius: 48rpx 48rpx 48rpx 48rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			position: absolute;
+			bottom: 20%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+		}
+	}
+
+	.imgft {
+		width: 100%;
+	}
+</style>

+ 244 - 0
pages_course/teacherClassroom.vue

@@ -0,0 +1,244 @@
+<template>
+	<view class="container">
+		<view class="top">
+			<text class="title">
+			  <text class="title-brown-group">
+			    <text class="title-stroke">健康生活方式</text>
+			    <text class="title-fill">健康生活方式</text>
+			  </text>
+			  <text class="title-normal">大讲堂</text>
+			</text>
+			<image class="top-bg" src="https://cos.his.cdwjyyh.com/fs/20250807/52f5aa7d5c5448e3a64efed9e6a77c85.png"></image>
+			<view class="txt">
+				<view>让健康回归生活化,</view>
+				<view>以健康的生活方式,</view>
+				<view>改善健康困扰,重拾晚年幸福!</view>
+			</view>
+		</view>
+		<view class="container-body">
+			<image class="bg" src="https://cos.his.cdwjyyh.com/fs/20250807/876f5e84355241d8911180159d5f8ad5.png"></image>
+			<view class="title-wrap">
+			  <text class="title-stroke">健康大讲堂</text>
+			  <text class="title-fill">健康大讲堂</text>
+			</view>
+			<view class="card-box" v-for="(item,index) in cardList" :key="index" @click="goLearn(item.courseId)">
+				<view class="bar">
+					<image src="https://cos.his.cdwjyyh.com/fs/20250807/a5db6bc9d11d49eca182a0086297b54b.png" mode="widthFix"></image>
+					<view class="tit">{{item.courseName}}</view>
+				</view>
+				<view class="img-box">
+					<view class="img">
+						<image :src="item.imgUrl || 'https://cos.his.cdwjyyh.com/fs/20250807/1eebee6c3bff4fd68d1d3dde090bdf89.png'" mode="widthFix"></image>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getAppletCourse} from '@/api/course.js'
+	export default {
+		data() {
+			return {
+				type:null,
+				cardList: [],
+				classListb:[]
+			}
+		},
+		onLoad(option) {
+			this.getCourseList()
+		},
+		methods: {
+			getCourseList() {
+				getAppletCourse().then(res => {
+					if (res.code == 200) {
+						this.cardList = res.data
+					} else {
+						uni.hideLoading();
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						});
+					}
+				})
+
+			},
+			goLearn(id) {
+				uni.navigateTo({
+					url: '/pages_course/learn?courseId='+id
+				})
+			},
+		}
+	}
+</script>
+<style>
+	page{
+		background-color: #f6e5db;
+	}
+</style>
+<style lang="scss" scoped>
+	.container {
+		.top {
+			position: relative;
+			z-index: 1;
+			font-size: 78rpx;
+			font-weight: 900;
+			text-align: center;
+			padding: 34rpx 0;
+			.title {
+			  	background: linear-gradient(to right, #333032, #5f3b32);
+			  	-webkit-background-clip: text;
+			  	background-clip: text;
+			  	-webkit-text-fill-color: transparent;
+			  	position: relative;
+			  	z-index: 2;
+			}
+			
+			/* 2. 双层渐变描边组合 */
+			.title-brown-group {
+			  position: relative;
+			  display: inline-block;
+			  line-height: 1;
+			}
+			
+			.title-stroke {
+			  position: absolute;
+			  top: 0;
+			  left: 0;
+			  z-index: 1;
+			  color: #fff;
+			  -webkit-text-stroke: 4rpx #fff;
+			  text-shadow: 2rpx 2rpx 4rpx rgba(183, 94, 52, 0.5);
+			}
+			
+			.title-fill {
+			  position: relative;
+			  z-index: 2;
+			  color: transparent;
+			  background: linear-gradient(to bottom, #c47243, #b0592a);
+			  -webkit-background-clip: text;
+			  background-clip: text;
+			  -webkit-text-fill-color: transparent;
+			}
+
+			.top-bg {
+				position: absolute;
+				top: 0;
+				left: 0;
+				width: 100%;
+				z-index: 0;
+			}
+
+			.txt {
+				font-style: italic;
+				text-align: left;
+				color: #fff;
+				font-size: 36rpx;
+				font-weight: 500;
+				position: absolute;
+				left: 8%;
+				top: 172rpx;
+				text-shadow:
+					0 0 1rpx #b0663c,
+					1rpx 1rpx 10rpx rgba(183, 0, 3, 0.3);
+			}
+		}
+
+		.container-body {
+			margin-top: 250rpx;
+			min-height: calc(100vh - 250rpx);
+			padding: 50rpx 24rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			position: relative;
+			z-index: 1;
+
+			.bg {
+				position: absolute;
+				top: 0;
+				left: 0;
+				width: 100%;
+				height: 100%;
+				object-fit: cover;
+				z-index: -1;
+			}
+
+			.title-wrap{
+			  position: relative;
+			  display: inline-block;
+			  font-size: 70rpx;
+			  font-weight: 900;
+			  line-height: 1;          /* 防止上下空隙 */
+			}
+			
+			/* 下层:白描边 + 投影 */
+			.title-stroke{
+			  position: absolute;
+			  top: 0;
+			  left: 0;
+			  z-index: 1;
+			  color: #fff;                           /* 描边色 */
+			  -webkit-text-stroke: 2rpx #fff;
+			  text-shadow: 2rpx 2rpx 4rpx rgba(183,94,52,.5);
+			}
+			
+			/* 上层:干净渐变填充 */
+			.title-fill{
+			  position: relative;
+			  z-index: 2;
+			  color: transparent;
+			  background: linear-gradient(to bottom, #c47243, #b0592a);
+			  -webkit-background-clip: text;
+			  background-clip: text;
+			  -webkit-text-fill-color: transparent;
+			}
+
+			.card-box {
+				width: 100%;
+				margin-top: 30rpx;
+
+				.bar {
+					position: relative;
+
+					image {
+						position: absolute;
+						width: 100%;
+						height: 100%;
+						z-index: -1;
+					}
+
+					.tit {
+						text-align: center;
+						line-height: 90rpx;
+						color: #fff;
+						font-weight: 500;
+						font-size: 36rpx;
+					}
+				}
+
+				.img-box {
+					margin-top: -8rpx;
+					padding: 24rpx;
+					background-color: #fff;
+					border-radius: 0 0 20rpx 20rpx;
+
+					.img {
+
+						max-height: 380rpx;
+						overflow: hidden;
+						border-radius: 20rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+
+			}
+		}
+
+	}
+</style>

+ 340 - 0
pages_course/video.vue

@@ -0,0 +1,340 @@
+<template>
+	<view class="kc_bg">
+	<!-- 	<view class="header-nav" :style="{height: `calc(44px + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<image class="back_icon" src="https://image.cdwjyyh.com/images/course_home.png" mode="aspectFill" @click="goHome()"></image>
+		</view> -->
+		<view class="kc_body" :style="{paddingTop: `calc(44px + ${statusBarHeight}px + 32rpx)`}">
+			<view class="coursebox" @click="getLink(1)">
+				<image class="coursebox-img" :src="configJson.coverImg||courseInfo.imgUrl" mode="aspectFill"></image>
+				<view class="coursebox-title x-ac">
+					<image class="star" src="https://image.cdwjyyh.com/images/course_star.png"></image>
+					<view>{{courseInfo.title}}</view>
+					<image class="star" src="https://image.cdwjyyh.com/images/course_star.png"></image>
+				</view>
+			</view>
+			<view class="title">{{title}}</view>
+			<view class="name x-ac">
+				<image class="" src="https://image.cdwjyyh.com/images/course_select_icon.png"></image>
+				<text>播出主体:御君方互联网医院</text>
+			</view>
+			<view class="btn" @click="getLink(1)">点击开始观看</view>
+			<view class="desc-box line">监督投诉电话:400-1881-959</view>
+			<view class="desc-box x-baseline mt40" v-if="configJson.tvEnable">
+				<view class="label-dot"></view>
+				<text class="label">首播电视台:</text>
+				<view v-if="configJson.tv">
+					<view v-for="(it,index) in configJson.tv.split(',')">{{it}}</view>
+				</view>
+				<view v-else>
+					<view v-for="(it,index) in defaultInfo.tv.split(',')">{{it}}</view>
+				</view>
+			</view>
+			<view class="desc-box x-baseline mt20" v-if="configJson.networkEnable">
+				<view class="label-dot"></view>
+				<text class="label">网络播放平台:</text>
+				<view v-if="configJson.network">
+					<view v-for="(it,index) in configJson.network.split(',')">{{it}}</view>
+				</view>
+				<view v-else>
+					<view v-for="(it,index) in defaultInfo.network.split(',')">{{it}}</view>
+				</view>
+			</view>
+			<view class="desc-box x-baseline mt20" v-if="configJson.unitEnable">
+				<view class="label-dot"></view>
+				<text class="label">制作单位:</text>
+				<view v-if="configJson.unit">
+					<view v-for="(it,index) in configJson.unit.split(',')">{{it}}</view>
+				</view>
+				<view v-else>
+					<view v-for="(it,index) in defaultInfo.unit.split(',')">{{it}}</view>
+				</view>
+			</view>
+			<view class="desc-box x-baseline mt20" v-if="configJson.teamEnable">
+				<view class="label-dot"></view>
+				<text class="label">专家顾问团队:</text>
+				<view v-if="configJson.team">
+					<view v-for="(it,index) in configJson.team.split(',')">{{it}}</view>
+				</view>
+				<view v-else>
+					<view v-for="(it,index) in defaultInfo.team.split(',')">{{it}}</view>
+				</view>
+			</view>
+			<view class="desc-box x-baseline mt20" v-if="configJson.supportEnable">
+				<view class="label-dot"></view>
+				<text class="label">支持单位:</text>
+				<view v-if="configJson.support">
+					<view v-for="(it,index) in configJson.support.split(',')">{{it}}</view>
+				</view>
+				<view v-else>
+					<view v-for="(it,index) in defaultInfo.support.split(',')">{{it}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getRealLink,getH5CourseByVideoId} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				title:'<<以下资料已审核>>',
+				urlOption: {},
+				videoId: '',
+				courseInfo: {},
+				loading: false,
+				configJson: {
+					coverImg: "",
+					network: '芳华未来',
+					support: '华夏文化促进会大健康养生文化专委会',
+					team: '杜丁-副主任医师,于晓津-副主任医师,史士昊-主治医师,岳晓燕-主任医师,陈涛-执业医师,李俭-副主任医师',
+					tv: '贵州广播电视台公共频道,大石桥综合频道',
+					unit: '大石桥市融媒之声广播电视报刊,网络新传媒有限公司'
+				},
+				defaultInfo: {
+					coverImg: "",
+					network: '芳华未来',
+					support: '华夏文化促进会大健康养生文化专委会',
+					team: '杜丁-副主任医师,于晓津-副主任医师,史士昊-主治医师,岳晓燕-主任医师,陈涛-执业医师,李俭-副主任医师',
+					tv: '贵州广播电视台公共频道,大石桥综合频道',
+					unit: '大石桥市融媒之声广播电视报刊,网络新传媒有限公司'
+				}
+			}
+		},
+		onLoad(option) {
+			this.urlOption = option.course ? JSON.parse(decodeURIComponent(option.course)) : {}
+			console.log("this.urlOption==",this.urlOption,option)
+			this.videoId = this.urlOption.videoId || ''
+			this.sortLink = this.urlOption.link || ''
+			if (this.videoId) {
+				this.getH5CourseByVideo()
+			}
+		},
+		onShow() {
+			if(this.sortLink){
+				this.getLink()
+			} else {
+				uni.showToast({
+					title: '链接地址有误',
+					icon: 'none'
+				});
+			}
+		},
+		methods: {
+			goHome() {
+				if(getApp().globalData.appId == 'wx45cf09091aead547') {
+					uni.switchTab({
+						url: '/pages/home/index'
+					})
+				} else {
+					uni.navigateToMiniProgram({
+					  appId: 'wx45cf09091aead547',
+					  path: '/pages/home/index'
+					})
+				}
+			},
+			getH5CourseByVideo() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				getH5CourseByVideoId({
+					videoId: this.videoId
+				}).then(res => {
+					this.courseInfo = res.data || {}
+					this.configJson = res.data&&res.data.configJson ? JSON.parse(res.data.configJson) : this.defaultInfo
+					uni.hideLoading()
+				}).catch(() => {
+					uni.hideLoading()
+				})
+			},
+			getLink(type) {
+				let that = this;
+				if(this.loading) {
+					return
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.loading = true
+				getRealLink({sortLink:this.sortLink}).then(res=>{
+					uni.hideLoading()
+					this.loading = false
+					if(res.code == 200) {
+						if(type==1) {
+							uni.navigateTo({
+								url: '/pages_course/videoDetail?course='+ JSON.stringify(this.urlOption)
+							})
+						}
+					} else {
+						uni.showToast({
+							title: '课程已过期或链接无效',
+							icon: 'none'
+						});
+					}
+				}).catch(err=>{
+					uni.hideLoading()
+					this.loading = false
+					uni.showToast({
+						title: '发生错误,请稍后再试',
+						icon: 'none'
+					});
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.mt20 {
+		margin-top: 20rpx;
+	}
+	.mt40 {
+		margin-top: 40rpx;
+	}
+	.kc_bg {
+		min-height: 100vh;
+		background-image: url('https://image.cdwjyyh.com/images/kc_bg.png');
+		// background-repeat: no-repeat;
+		background-size: 100%;
+	}
+	.header-nav {
+		display: flex;
+		align-items: center;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		box-sizing: border-box;
+		background-image: url('https://image.cdwjyyh.com/images/kc_bg.png');
+		background-repeat: no-repeat;
+		background-size: 100%;
+		overflow: hidden;
+	}
+	.back_icon {
+		height: 70rpx;
+		width: 70rpx;
+		padding-left: 28rpx;
+	}
+	.kc_body {
+		padding:36rpx 36rpx 120rpx 36rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		.title {
+			font-family: Source Han Sans CN;
+			font-weight: 500;
+			font-size: 38rpx;
+			color: #FFFFFF;
+			padding: 10rpx 60rpx;
+			background: linear-gradient(269deg, #AE7F47, #CE9B5D);
+			border-radius: 4rpx;
+			display: inline-block;
+			margin-top: 54rpx;
+		}
+		.line {
+			padding: 42rpx 0 27rpx 0;
+			border-bottom: 1rpx solid #B9884C;
+			text-align: center;
+		}
+		.x-baseline {
+			display: flex;
+			align-items: baseline;
+		}
+		.desc-box {
+			width: 100%;
+			font-family: PingFang;
+			font-weight: bold;
+			font-size: 29rpx;
+			color: #C9985B;
+			background: linear-gradient(to right, #9B6B2F 0%, #C9985B 52%, #9B6B2F 98%);
+			-webkit-background-clip: text;
+			-webkit-text-fill-color: transparent;
+			.label {
+				flex-shrink: 0;
+			}
+			.label-dot {
+				width: 16rpx;
+				height: 16rpx;
+				background: #D3984F;
+				border-radius: 50%;
+				margin: 0 6rpx;
+			}
+		}
+		.coursebox {
+			background: #FFFFFF;
+			box-shadow: 0rpx 7rpx 5rpx 0rpx rgba(193,148,93,0.29);
+			border-radius: 29rpx;
+			padding: 20rpx 20rpx 0 20rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			border: 4px solid rgba(255, 239, 208, 1);
+			&-img {
+				height: 362rpx;
+				width: 633rpx;
+				border-radius: 16rpx;
+			}
+			&-title {
+				text-align: center;
+				margin: 40rpx 0;
+				font-family: Source Han Sans CN;
+				font-weight: bold;
+				font-size: 45rpx;
+				color: #9B6B2F;
+				line-height: 51rpx;
+				background: linear-gradient(0deg, #9B6B2F 0%, #C9985B 52.978515625%, #9B6B2F 98.291015625%);
+				-webkit-background-clip: text;
+				-webkit-text-fill-color: transparent;
+			}
+			.star {
+				flex-shrink: 0;
+				height: 48rpx;
+				width: 48rpx;
+				margin: 0 15rpx;
+			}
+		}
+		.name {
+			margin-top: 28rpx;
+			font-weight: bold;
+			font-size: 36rpx;
+			color: #9B6B2F;
+			line-height: 40rpx;
+			background: linear-gradient(0deg, #9B6B2F 0%, #C9985B 52.978515625%, #9B6B2F 98.291015625%);
+			-webkit-background-clip: text;
+			-webkit-text-fill-color: transparent;
+			image {
+				height: 44rpx;
+				width: 44rpx;
+				margin-right: 10rpx;
+			}
+		}
+		.btn {
+			width: 660rpx;
+			height: 81rpx;
+			margin-top: 55rpx;
+			background: linear-gradient(90deg, #9B6B2F 0%, #DDB37F 49%, #A57539 100%);
+			border-radius: 40rpx;
+			font-family: Source Han Sans CN;
+			font-weight: 500;
+			font-size: 42rpx;
+			color: #FFFFFF;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			will-change: transform;
+			animation: scaleAnimation 1s ease infinite;
+		}
+	}
+	@keyframes scaleAnimation {
+	  0% {
+	    transform: scale(1);
+	  }
+	  50% {
+	    transform: scale(0.9);
+	  }
+	  100% {
+	    transform: scale(1);
+	  }
+	}
+</style>

+ 2416 - 0
pages_course/videoDetail.vue

@@ -0,0 +1,2416 @@
+<template>
+	<view class="content">
+		<view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
+			<view class="arrow-left-warning" @click="feedback">
+				<image src="/static/images/warning.png"></image>
+				<text>投诉</text>
+			</view>
+			<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&&openCommentStatus==2">
+				<text v-for="(item, index) in activeDanmus" :key="item.commentId" class="danmu-item danmuMove"
+					:style="item.danmustyle" @animationend="animationend(item,index)">
+					{{ item.content }}
+				</text>
+			</template>
+				<cover-view class="video-danmu-btnbox" :style="{display: openCommentStatus==2&&isfull&&crtShow&&isLogin&&isAddKf==1 ? 'block':'none'}">
+					<cover-image class="video-danmu-image"
+					:src="baseUrl+'/images/danmu_set.png'"
+					 @click="openDanmu(1)"></cover-image>
+				</cover-view>
+				<treasureChest ref="treasureChest" :isfull="isfull" :onHide="onHide" :boxList="fsUserCourseRewardRoundStatusVO" @claimFun="claimFun"></treasureChest>
+			</video>
+		</view>
+		<!-- 弹幕方法 -->
+		<commentBox
+			v-if="openCommentStatus==2"
+			ref="danmuBox" 
+			:height="height" 
+			:urlOption="urlOption" 
+			:time="playTime"
+			:showDanmu="showDanmu"
+			:viewCommentNum="viewCommentNum"
+			:openCommentStatus="openCommentStatus"
+			:isSocketOpen="isSocketOpen"
+			@socketSend="socketSend"
+			@initSocket="initSocket"
+			@setInputText="setInputText" 
+			@getScrollTop="getScrollTop"
+			@getMore="getMore"
+			@getActiveDanmus="getActiveDanmus"></commentBox>
+		<view id="title-contentnav">
+			<template v-show="isLogin&&notice">
+				<u-notice-bar :text="notice" color="red" speed='60' fontSize="18"></u-notice-bar>
+			</template>
+			<view class="title-content" v-if="openCommentStatus!=1">
+				<!-- 答题时展示小节课程名,其他展示课程名 -->
+				<!-- 小节课程名 -->
+				<view class="subtitlebox" v-if="isLogin&&isAddKf==1">
+					{{courseInfo.title|| ''}}
+				</view>
+				<!-- 课程名字 -->
+				<view class="miantitlebox" v-else>
+					{{courseInfo.courseName|| ''}}
+				</view>
+				<!-- 投诉 -->
+				<!-- <view class="warning" @click="feedback" v-if="isLogin&&videoId">
+					<image src="/static/images/warning.png"></image>
+					<text>投诉</text>
+				</view> -->
+			</view>
+			<view class="tabbox-bar" v-if="openCommentStatus==1">
+				<view class="tabbox">
+					<view :class="currentTab == nav.id ? 'tabbox-active':''" v-for="nav in navList" :key="nav.id" @click="handleTab(nav.id)">{{nav.name}}</view>
+				</view>
+				<!-- 投诉 -->
+				<!-- <view class="warning" @click="feedback">
+					<image src="/static/images/warning.png"></image>
+					<text>投诉</text>
+				</view> -->
+			</view>
+		</view>
+		<scroll-view
+		class="scroll-view" 
+		:style="{height: height}" 
+		:scroll-top="scrollTop" 
+		:scroll-y="true" 
+		:refresher-enabled="currentTab == 2"
+		:refresher-triggered="triggered"
+		@refresherrefresh="handleRefresher">
+			<template v-if="openCommentStatus==1">
+				<view v-show="currentTab==0">
+					<descInfoNav ref="descInfoNav" :isLogin="isLogin" :isAddKf="isAddKf" :courseInfo="courseInfo"></descInfoNav>
+				</view>
+				<view v-show="currentTab==2">
+					<commentBox 
+					ref="commentBox" 
+					:height="height" 
+					:urlOption="urlOption" 
+					:time="playTime"
+					:flagTime="flagTime"
+					:showDanmu="showDanmu"
+					:viewCommentNum="viewCommentNum"
+					:openCommentStatus="openCommentStatus"
+					:isSocketOpen="isSocketOpen"
+					@socketSend="socketSend"
+					@initSocket="initSocket"
+					@setInputText="setInputText" 
+					@getScrollTop="getScrollTop"
+					@getMore="getMore"></commentBox>
+				</view>
+			</template>
+			<view v-show="currentTab==1">
+				<template v-if="openCommentStatus!=1">
+					<!-- 介绍 -->
+					<descInfo ref="descInfo" :isLogin="isLogin" :isAddKf="isAddKf" :courseInfo="courseInfo"></descInfo>
+				</template>
+				<!-- 问题 -->
+				<template v-if="isLogin&&isAddKf==1">
+					<ques ref="ques" :urlOption="urlOption" :courseNote="courseNote" :showNote="showNote" :treatmentPackage="treatmentPackage" :showTreatment="showTreatment" :quesList="quesList" :openCommentStatus="openCommentStatus" @handleAnswer="handleAnswer" @showBtnType="showBtnType"></ques>
+				</template>
+			</view>
+		</scroll-view>
+		<!-- 线路 -->
+		<view class="video-line" v-if="isLogin&&isAddKf==1" @click="openPop">
+			<image src="https://cos.his.cdwjyyh.com/fs/20250915/04889779f7f44e22a7a378d26823b2e8.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="https://cos.his.cdwjyyh.com/fs/20250915/b950ff20d115453f9d7f908590c9c0e7.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(index + 1)}}</view>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 发送弹幕 -->
+		<view class="video-line danmu-line" v-if="isLogin&&isAddKf==1&&openCommentStatus==2" @click="openDanmu(0)" >
+			<image class="set_image" src="https://cos.his.cdwjyyh.com/fs/20250418/5e508642737a44169061382566043ac9.png" mode="aspectFill"></image>
+			<text>发弹幕</text>
+		</view>
+		<!-- 发送弹幕弹窗 -->
+		<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?baseUrl+'/images/danmu-off.png':baseUrl+'/images/danmu-on.png'" mode="heightFix" @click="switchDanmu()"></image>
+					<view class="u-border">
+						<u-input 
+						class="danmuPopup-input" 
+						placeholder="发个弹幕吧~" 
+						border="border"
+						:focus="focus"
+						:adjustPosition="false" 
+						:autoBlur="true" 
+						maxlength="50"
+						v-model.trim="inputText">
+						</u-input>
+						<text style="font-size: 24rpx;color: #bbb;margin-left: 10rpx;">{{inputText?inputText.trim().length:0}}/50</text>
+					</view>
+					<button class="danmuPopup-send" @click="handleChatInput">发送</button>
+				</view>
+			</view>
+		</uni-popup>
+		<!-- 答题弹窗 -->
+		<uni-popup ref="answerPopup" type="center">
+			<view :class="errTitle == '恭喜你,回答正确' ? 'answerPopup-box bg':'answerPopup-box'">
+				<!-- 正确 -->
+				<image class="tipimg" v-if="errTitle == '恭喜你,回答正确'" src="https://cos.his.cdwjyyh.com/fs/20250915/f7b1075c21b442069ec9721a1a4790ec.png"
+					mode="aspectFill"></image>
+				<!-- 错误 -->
+				<image class="tipimg" v-else src="https://cos.his.cdwjyyh.com/fs/20250915/a4b145c94b684c778c03ad9b52d717f3.png" mode="aspectFill">
+				</image>
+				<view class="answerPopup-title">{{errTitle}}</view>
+				<view class="answerPopup-desc" v-html="errDesc"></view>
+				<view style="color: #FF5C03;">{{currentRewardText}}</view>
+				<!-- 选择奖励 -->
+				<view class="reward-list" v-if="errTitle == '恭喜你,回答正确'">
+					<view :class="item.value == currentReward?'reward-item reward-active':'reward-item'" 
+					v-for="(item, index) in rewardType" :key="item.value" @click="rewardChange(item)">
+						{{item.name}}
+					</view>
+					<!-- <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)" color="#FF5C03" />
+							<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>
+		<!-- 展示兑换奖品弹窗 -->
+		<appPopup ref="appPopup"></appPopup>
+		<!-- 客服二维码弹窗 -->
+		<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="https://cos.his.cdwjyyh.com/fs/20250915/97978486cc6c47c6949c5bcc9bc0c4a3.png" mode="aspectFill"
+					@click="closeKFPop"></image>
+			</view>
+		</uni-popup>
+		<!-- 可以答题提示 -->
+		<view class="answerTip" v-if="currentTab!=1&&openCommentStatus==1&&showAnswerTip" @click="handleTab(1)">
+			可以答题啦
+		</view>
+		<!-- footer -->
+		<view class="footer" v-show="currentTab!=2&&videoId">
+			<view class="footer-btn" v-if="!isLogin || isAddKf !=1" @click="submit">
+				<text>立即学习</text>
+			</view>
+			<view v-if="isLogin&&isAddKf==1&&currentTab==1&&quesList&&quesList.length>0&&showBtn==0" class="footer-btn footer-btn-border" @click="submit">
+				<!-- <image class="footer-btn-img" :src="baseUrl+'/images/red_envelope_btnimg.png'" mode="aspectFill"></image> -->
+				<text>提交答案领取奖励</text>
+			</view>
+			<!-- <view @click="checked=!checked" class="agreement" v-if="!isLogin">
+				<radio value="r1" :checked="checked" color="#ff5c03" activeBorderColor="#ff5c03"
+					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 v-show="currentTab==2">
+			<view class="chatinput" :style="{bottom:danmuboxHeight>0?danmuboxHeight+'px':'calc(var(--window-bottom) + 24rpx)'}">
+				<input class="uni-input" v-model.trim="inputText" :adjustPosition="false" :autoBlur="false" maxlength="140" placeholder="发消息···" confirm-type="send" @confirm="handleChatInput" />
+				<button class="send" @click="handleChatInput">发送</button>
+			</view>
+		</view>
+		<turntableOne ref="turntableOne" @sendRewardFun="sendRewardFun" @openAppPop="openAppPop"></turntableOne>
+		<turntableTwo ref="turntableTwo" @sendRewardFun="sendRewardFun" @openAppPop="openAppPop"></turntableTwo>
+	</view>
+</template>
+
+<script>
+	import { mapGetters } from 'vuex';
+	import turntableOne from "./components/turntableOne.vue"
+	import turntableTwo from "./components/turntableTwo.vue"
+	import appPopup from "./components/appPopup.vue"
+	import ques from "./components/ques.vue"
+	import descInfo from "./components/descInfo.vue"
+	import descInfoNav from "./components/descInfoNav.vue"
+	import commentBox from "./components/commentBox.vue"
+	import treasureChest from "./components/treasureChest.vue"
+	import dayjs from 'dayjs';
+	import {
+		getErrMsg,
+		getH5CourseByVideoId,
+		getH5CourseVideoDetails,
+		courseAnswer,
+		getFinishCourseVideo,
+		getIsAddKf,
+		internetTraffic,
+		getIntegralByH5Video,
+		sendReward,
+		loginByMp,
+		getRealLink,
+		getConfigByKey,
+		claim,
+		getVideoRewardTypes,
+		getUserPhoneDeviceType
+	} from "@/api/course.js"
+	export default {
+		components: {
+			descInfoNav,
+			descInfo,
+			commentBox,
+			ques,
+			treasureChest,
+			appPopup,
+			turntableOne,
+			turntableTwo
+		},
+		data() {
+			return {
+				socket: null,
+				isSocketOpen: false,
+				pingpangTimes: null,
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 1 红包 2 芳华币
+				rewardType:[],
+				currentReward: -1,
+				player: null,
+				loading: true,
+				progress: 0,
+				code: null,
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
+				scrollTop: 0,
+				height: '0px',
+				isLogin: false,
+				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,
+				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
+						}
+					},
+				},
+				poster: "",
+				// 错误请求次数
+				errorCount: 0,
+				answerPopup: false,
+				sortLink:"",
+				// 课程是否过期
+				isExpire: false,
+				menuButtonLeft: 281,
+				menuButtonH: 45,
+				timer: null,
+				flag: false,
+				focus: false,
+				openDanmuType: 0,
+				danmuboxHeight: 0,
+				user: {},
+				crtShow: true,
+				// 是否获取到对应观看者的真实链接
+				isCheckRealUrl: false,
+				courseLogo: '',
+				isfull: false,
+				navList:[{
+					id: 0,
+					name: '介绍'
+				},{
+					id: 1,
+					name: '答题'
+				},{
+					id: 2,
+					name: '评论'
+				}],
+				currentTab: 1,
+				triggered: false,
+				// 没有更多
+				isMore: false,
+				inputText:"",
+				// 获取最多历史评论条数
+				viewCommentNum: 200,
+				// 1-开启评论;2-开启弹幕;3-关闭
+				openCommentStatus: 3,
+				showAnswerTip: false,
+				showDanmu: 1,
+				activeDanmus:[],
+				flagTime: 0,
+				notice: '',
+				fsUserCourseRewardRoundStatusVO: [],
+				onHide: false,
+				courseNote:'',
+				showBtn: 0,
+				showNote: 0,
+				showTreatment: 1, // 1不展示,0展示
+				treatmentPackage: []
+			}
+		},
+		computed:{
+			...mapGetters(['coureLogin']),
+			currentRewardText(){
+				const index = this.rewardType.findIndex(it=>it.value==this.currentReward)
+				return index > -1 ? this.rewardType[index].text || '':''
+			}
+		},
+		watch: {
+		    coureLogin: {
+		      immediate: true,          // 页面一进入就检查一次
+		      handler(val) {
+		        if (val == 2) {
+					console.log("AppToken失效,请重新登录")
+					this.isLogin = false
+					this.isAddKf = 0
+					this.goLogin()
+		        }
+		      }
+		    }
+		},
+		onLoad(option) {
+			this.code = option.code
+			this.urlOption = option.course ? JSON.parse(decodeURIComponent(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.getConfigByKey()
+			}
+			this.sortLink = this.urlOption.link || ''
+			this.getMenuButton()
+			// #ifndef H5
+			uni.onKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+		},
+		onShow() {
+			this.onHide = false
+			this.tipsOpen = false
+			// this.isLogin = this.utils.isLoginCourse()
+			this.uuId = this.utils.generateRandomString(16)
+			if(uni.getStorageSync('auto_userInfo') && JSON.stringify(uni.getStorageSync('auto_userInfo'))!='{}') {
+				this.user = JSON.parse(uni.getStorageSync('auto_userInfo'))
+			} else {
+				this.user = {}
+			}
+			if(this.sortLink){
+				this.getLink()
+			} else {
+				uni.showToast({
+					title: 'sortLink is not found',
+					icon: 'none'
+				});
+				if(this.isLogin) {
+					this.getUserPhoneDeviceType()
+				}
+			}
+		},
+		mounted() {
+			this.getIP()
+			this.getHeight()
+		},
+		onHide() {
+			this.onHide = true
+			// this.player = uni.createVideoContext('video-content-box');
+			if (this.player) {
+				this.player.pause()
+			}
+			// if (this.interval != null) {
+			// 	clearInterval(this.interval)
+			// 	this.interval = null
+			// }
+			this.closeSocket()
+		},
+		onUnload() {
+			if (this.interval != null) {
+				clearInterval(this.interval)
+				this.interval = null
+			}
+			this.clearIntegral()
+			// #ifndef H5
+			uni.offKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+			this.closeSocket()
+		},
+		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
+			}
+			this.clearIntegral()
+			// #ifndef H5
+			uni.offKeyboardHeightChange(this.keyboardHeightChange);
+			// #endif
+			this.closeSocket()
+		},
+		methods: {
+			getVideoRewardTypes() {
+				getVideoRewardTypes({...this.urlOption}).then(res=>{
+					if(res.code == 200) {
+						this.rewardType = res.data
+						this.currentReward = this.rewardType&&this.rewardType.length>0 ? this.rewardType[0].value : -1
+					}
+				})
+			},
+			getConfigByKey(){
+				let param = {key:"course.config"};
+				getConfigByKey(param).then(
+					res => {
+						if(res.code==200){
+							let data=res.data ? JSON.parse(res.data) : {};
+							this.notice = data.notify || ''
+						}
+					},
+					rej => {}
+				);
+			},
+			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)
+					const isNearEnd = this.playTime >= this.duration - 60;
+					this.showAnswerTip = this.isEnded || isNearEnd;
+				
+					const progress = this.duration ? (this.playTime || 0) / this.duration : 0;
+					const answerRate = Number(this.config.answerRate ?? 1);   // 默认 100%
+					const hitRate = progress >= answerRate;
+					
+					this.showNote = (this.isEnded || this.isFinish === 1 || hitRate) ? 1 : 0;
+					if(this.fsUserCourseRewardRoundStatusVO&&this.fsUserCourseRewardRoundStatusVO.length>0) {
+						this.$refs.treasureChest&&this.$refs.treasureChest.showTreasure(this.flagTime)
+					}
+					if(this.openCommentStatus == 2) {
+						this.$refs.danmuBox&&this.$refs.danmuBox.checkDanmu(this.flagTime)
+					}
+				}
+			},
+			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.showAnswerTip = true
+				this.isFinish = 1
+				this.showNote = 1
+				this.getFinishCourseVideo()
+			},
+			getWaiting() {
+				this.getErrMsg('','waiting')
+			},
+			fullscreenchange(event) {
+				this.isfull = event.detail.fullScreen
+				if(this.isfull) {
+					this.$refs.danmuBox&&this.$refs.danmuBox.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() {
+				setTimeout(()=>{
+					const query = uni.createSelectorQuery().in(this);
+					query
+						.select("#title-contentnav")
+						.boundingClientRect((data) => {
+							if(data) {
+								const footerH = this.showBtn==0? 80: 0
+								this.height =
+									`calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - ${footerH}px - 88rpx)`
+							}
+						})
+						.exec();
+				},200)
+			},
+			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
+				}
+			},
+			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.$nextTick(()=>{
+							this.$refs.descInfo&&this.$refs.descInfo.getDescHeight()
+							this.$refs.descInfoNav&&this.$refs.descInfoNav.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.courseNote = res.course&&res.course.note
+							this.isFinish = res.isFinish || 0
+							this.showNote = this.isFinish==1 ? 1:0
+							this.duration = res.course && res.course.duration ? res.course.duration : 0
+							this.playDuration = res.playDuration || 0
+							this.tipsTime = res.tipsTime || 0
+							const showTreatmentFlag = res.course&&res.course.showTreatment!=null ? res.course.showTreatment : 1
+							this.treatmentPackage = res.course&&res.course.treatmentPackage ? res.course.treatmentPackage : [],
+							this.showTreatment = showTreatmentFlag==0&&this.treatmentPackage.length>0 ? 0 : 1
+							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
+							this.courseLogo = res.config&&res.config.courseLogo
+							this.viewCommentNum = res.config&&res.config.viewCommentNum || 200
+					
+							this.openCommentStatus = res.config&&res.config.openCommentStatus || 3;
+							// this.openCommentStatus = source
+							// console.log('socket===',socket,this.openCommentStatus)
+							if(this.openCommentStatus == 3) {
+								this.closeSocket()
+							}else {
+								this.initSocket()
+							}
+							
+							this.currentTab = 1
+							if(this.openCommentStatus!=2 || this.showDanmu!=1) {
+								this.activeDanmus = []
+							}
+							this.fsUserCourseRewardRoundStatusVO = this.getBox(res)
+							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
+								this.playDurationSeek = this.playTime
+								setTimeout(()=>{
+									this.player = uni.createVideoContext('video-content-box');
+									this.player.seek(this.playTime)
+									this.player.play();
+								},500);
+							} 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.playDurationSeek = this.playTime
+								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.$nextTick(()=>{
+							this.$refs.descInfo&&this.$refs.descInfo.getDescHeight()
+							this.$refs.descInfoNav&&this.$refs.descInfoNav.getDescHeight()
+						})
+					},
+					rej => {}
+				)
+			},
+			handleAnswer(val) {
+				let {item, option,index} = val
+				let time = this.playTime
+				if(this.isEnded||this.isFinish==1) {
+					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[index].type == 1) {
+					// 单选option
+					this.quesList[index].answer = option.name
+				} else if (this.quesList[index].type == 2) {
+					// 多选
+					let answer = this.quesList[index].answer ? this.quesList[index].answer.split(',') : []
+					if (answer.indexOf(option.name) === -1) {
+						answer.push(option.name)
+						this.quesList[index].answer = answer.join(',')
+					} else {
+						answer.splice(answer.indexOf(option.name), 1)
+						this.quesList[index].answer = answer.join(',')
+					}
+				}
+			},
+			submit() {
+				if(this.isExpire){
+					uni.showToast({
+						title: '课程已过期或链接无效',
+						icon: 'none'
+					});
+					return
+				}
+				// 登录
+				this.utils.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 || this.isFinish==1) {
+					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.currentReward = this.rewardType&&this.rewardType.length>0 ? this.rewardType[0].value : -1
+								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.value
+			},
+			closeAnswerPopup() {
+				this.$refs.answerPopup.close()
+				if(!this.isCheckRealUrl) return;
+				if (this.errTitle == '恭喜你,回答正确') {
+					if(this.currentReward==4) {
+						this.$refs.turntableTwo.open(this.urlOption)
+					} else if(this.currentReward==3) {
+						this.$refs.turntableOne.open(this.urlOption)
+					} else {
+						this.sendRewardFun(this.currentReward)
+					}
+				}
+			},
+			sendRewardFun(currentReward) {
+				this.currentReward = currentReward
+				const param = {
+					...this.urlOption,
+					rewardType: Number(this.currentReward),
+					source: 2,
+					appId: getApp().globalData.appId
+				}
+				sendReward(param).then(res => {
+					if(res.code == 200) {
+						if(currentReward == 4) {
+							this.$refs.turntableTwo.endSuccess(res.data)
+						}else if(currentReward == 3) {
+							this.$refs.turntableOne.endSuccess(res.data)
+						}else {
+							uni.showToast({
+								title: res.msg,
+								icon: 'none'
+							})
+							// this.openAppPop()
+						}
+					} else {
+						this.currentReward == 4 ? this.$refs.turntableTwo.close('close') : this.currentReward == 3? this.$refs.turntableOne.close('close'):''
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			openAppPop() {
+				this.$refs.appPopup.openPop()
+			},
+			// 线路
+			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) {
+							// 官方群发通用链接
+							const url = res.courseLink.realLink.split('?course=')[1]
+							this.urlOption = JSON.parse(url)
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							this.getH5CourseVideoDetails()
+						} else if (res.code == 567) {
+							// 群聊通用链接
+							this.urlOption = {
+								...this.urlOption,
+								qwExternalId: res.qwExternalId
+							}
+							this.isAddKf = 1
+							this.isCheckRealUrl = true
+							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.isLogin||!this.playTime || !this.isCheckRealUrl) return
+				// {videoId: this.videoId,duration:this.playTime}
+				const param = {
+					duration: this.playTime,
+					...this.urlOption
+				}
+				getFinishCourseVideo(param)
+			},
+			// 每十分钟获得芳华币
+			getIntegralByH5Video() {
+				if(!this.isLogin||!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.isLogin||!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
+				internetTraffic(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.utils.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,appId:getApp().globalData.appId}).then(res=>{
+										 uni.hideLoading();
+										 if (res.code == 200) {
+											this.$store.commit('setCoureLogin', 1);
+											uni.setStorageSync('AppTokenmini_RTCourse', res.token);
+											uni.setStorageSync('auto_userInfo', JSON.stringify(res.user));
+											this.user = res.user
+											this.isLogin = true
+											this.getIsAddKf()
+											this.getVideoRewardTypes()
+											this.getUserPhoneDeviceType()
+										 } 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
+						if(this.isLogin) {
+							this.getUserPhoneDeviceType()
+						}
+						// 如果响应中包含真实链接,则跳转到真实链接
+						// 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.utils.isLoginCourse().then(
+								isLogin => {
+									this.isLogin = isLogin
+									if(isLogin){
+										this.getIsAddKf()
+										this.getVideoRewardTypes()
+									} 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.inputText = ''
+				if(type == 1) {
+					this.player.exitFullScreen()
+				}
+				this.$refs.danmuPopup.open()
+			},
+			changeShowPopup(val) {
+				this.focus = val.show
+			},
+			switchDanmu() {
+				this.showDanmu = this.showDanmu == 1 ? 0:1
+				if(this.showDanmu == 0&&this.$refs.danmuBox) {
+					this.$refs.danmuPopup.close()
+					this.activeDanmus = []
+					this.$refs.danmuBox.activeDanmus = []
+					this.$refs.danmuBox.initTracks()
+				}
+			},
+			getScrollTop(res) {
+				if(this.currentTab == 2) {
+					this.scrollTop = res
+				} else {
+					this.scrollTop = 0
+				}
+			},
+			handleTab(index) {
+				this.currentTab = index
+				if(this.currentTab==2) {
+					if(this.$refs.commentBox) {
+						this.$refs.commentBox.msgs = []
+						this.$refs.commentBox.pageNum = 1
+						this.$refs.commentBox.getComments()
+					}
+				} else {
+					setTimeout(()=>{
+						this.scrollTop = 0
+					},100)
+				}
+			},
+			handleRefresher() {
+				this.triggered = true;
+				if (!this.isMore&&this.currentTab==2&&this.openCommentStatus==1) {
+					this.$nextTick(()=>{
+						this.$refs.commentBox&&this.$refs.commentBox.getComments()
+					})
+				}
+				setTimeout(() => {
+					this.triggered = false;
+				}, 500);
+			},
+			getMore(val) {
+				this.triggered = false;
+				this.isMore = val == 1
+			},
+			handleChatInput() {
+				this.inputText = this.inputText.trim()
+				if (this.inputText == "" || this.inputText.trim() == "") {
+					uni.showToast({
+						title: '请输入评论',
+						icon: "none"
+					})
+					return;
+				}
+				if(this.openCommentStatus==1) {
+					this.$refs.commentBox&&this.$refs.commentBox.handleInput(this.inputText)
+				} else if(this.openCommentStatus==2) {
+					this.$refs.danmuBox&&this.$refs.danmuBox.handleInput(this.inputText)
+				}
+			},
+			setInputText() {
+				this.inputText = ""
+				if(this.openCommentStatus==2) {
+					this.$refs.danmuPopup.close()
+				}
+			},
+			getActiveDanmus(val) {
+				this.activeDanmus = val.map(item=>({
+					...item,
+					danmustyle: {
+						top: item.top + 'px',
+						...item.style, 
+						'animation-duration': '8s'
+					}
+				}))
+			},
+			animationend(moveItem, i) {
+				// 移除动画结束的弹幕(性能优化)
+				if(this.openCommentStatus==2) {
+					this.$refs.danmuBox&&this.$refs.danmuBox.animationend(moveItem, i)
+				}
+			},
+			feedback() {
+				const userId = this.user.userId || ''
+				const courseId = this.urlOption.courseId || ''
+				const videoId = this.urlOption.videoId || ''
+				uni.navigateTo({
+					url: './feedback?userId='+userId+'&courseId='+courseId+'&videoId='+videoId
+				})
+			},
+			getBox(data) {
+				if(data.fsUserCourseRewardRoundStatusVO&&data.fsUserCourseRewardRoundStatusVO.length>0) {
+					const list = data.fsUserCourseRewardRoundStatusVO.map(item=>({
+						...item,
+						time: Math.round(this.duration * Number(item.question || 0) * 0.01)
+					}))
+					return list
+				} else {
+					return []
+				}
+			},
+			claimFun(val) {
+				claim({
+					...this.urlOption,
+					second: val.time,
+					rewardId: val.rewardId,
+					status: val.status
+				}).then(res=>{
+					if(res.code == 200) {
+						this.$refs.treasureChest.claimSuccess(val.status)
+					} else {
+						this.$refs.treasureChest.close()
+					}
+					if(res.msg!="success") {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+							duration: 3000
+						})
+					}
+				})
+			},
+			showBtnType(value) {
+				this.showBtn = value
+				this.getHeight()
+			},
+			getUserPhoneDeviceType(){
+				uni.getSystemInfo({
+				  	success: (result) => {
+						const param = {
+							os: result.osName || '',
+							deviceId: result.deviceId || '',
+							appId: getApp().globalData.appId
+						}
+						getUserPhoneDeviceType({param:JSON.stringify(param)})
+					},
+					fail: (error) => {
+						console.log('获取型号失败',JSON.stringify(error))
+					}
+				})
+			},
+			initSocket(type) {
+				const userId = this.user.userId; // 假设你已经获取了用户ID
+				const that = this;
+
+				// 如果已经存在连接,先关闭
+				if (this.socket) {
+					this.socket.onClose(() => {
+					  console.log('旧的 WebSocket 连接已完全关闭');
+					  that.socket = null;
+					  if(that.pingpangTimes) {
+					  	clearInterval(that.pingpangTimes)
+					  	that.pingpangTimes= null
+					  }
+					  that.createNewSocket(type,userId);
+					});
+					this.socket.close();
+					return;
+				}
+				// 创建一个新的 WebSocket 连接
+				this.createNewSocket(type,userId);
+			},
+			createNewSocket(type,userId) {
+				if(this.openCommentStatus == 3) return
+				//创建一个socket连接
+				const that = this;
+				// if (this.socket) {
+				// 	this.socket.close()
+				// }
+				this.socket = uni.connectSocket({
+					url: getApp().globalData.wsUrl + "/app/webSocket/" + userId,
+					multiple: true,
+					success: res => {
+						that.isSocketOpen = true
+						console.log('WebSocket连接已打开1!');
+						// 保持心跳
+						if(that.pingpangTimes) {
+							clearInterval(that.pingpangTimes)
+							that.pingpangTimes= null
+						}
+						that.pingpangTimes=setInterval(()=>{
+							let data={
+								userId: 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"){
+						if(that.openCommentStatus==1) {
+							that.$refs.commentBox.isSend=true;
+							that.$refs.commentBox.addMsg(redata);
+						} else if(that.openCommentStatus==2) {
+							that.$refs.danmuBox.isSend=true;
+							that.$refs.danmuBox.addMsg(redata);
+						}
+						// that.isSend=true;
+						// that.addMsg(redata);
+					}
+				})
+				//监听socket打开
+				this.socket.onOpen(() => {
+					that.isSocketOpen = true
+					console.log('WebSocket连接已打开2!');
+					// that.isSend = true;
+					if(that.openCommentStatus==1) {
+						that.$refs.commentBox.isSend=true;
+					} else if(that.openCommentStatus==2) {
+						that.$refs.danmuBox.isSend=true;
+					}
+					if(type=='reStart') {
+						// 重连的时候重新发消息
+						if(that.openCommentStatus==1) {
+							that.$refs.commentBox.saveMsg()
+						} else if(that.openCommentStatus==2) {
+							that.$refs.danmuBox.saveMsg()
+						}
+						// 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
+					}
+				})
+			},
+			socketSend(data) {
+				let that = this
+				this.socket.send({
+					data: JSON.stringify(data),
+					success: () => {
+						console.log("发送成功")
+						// this.isSend = false;
+						if(that.openCommentStatus==1) {
+							that.$refs.commentBox.isSend = false;
+						} else if(that.openCommentStatus==2) {
+							that.$refs.danmuBox.isSend = false;
+						}
+					},
+					fail: () => {
+						console.log("发送失败")
+					}
+				});
+			},
+			closeSocket() {
+				if (this.socket) {
+				  this.socket.close();
+				}
+				if (this.pingpangTimes) {
+				  clearInterval(this.pingpangTimes);
+				  this.pingpangTimes = null;
+				}
+			}
+		}
+	}
+</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;
+	}
+	.reward-list {
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		margin-top: 40rpx;
+		margin-bottom: -24rpx;
+	}
+	.reward-item{
+		padding: 16rpx 10rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+		width: calc(50% - 14rpx);
+		overflow: hidden;
+		text-align: center;
+		border-radius: 8rpx;
+		border: 1rpx solid #ededef;
+		// margin: 10rpx 5px;
+		margin-bottom: 24rpx;
+		color: #222;
+		background-color: #fff;
+		&:nth-child(odd) {
+			margin-right: 20rpx;
+		}
+	}
+	.reward-active {
+		border: 1rpx solid #ff5c03 !important;
+		color: #ff5c03 !important;
+		background: #FCF0E7 !important;
+	}
+	.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));
+		.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;
+			box-sizing: border-box;
+			@include u-flex(row, center, space-between);
+			.title {
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #414858;
+			}
+
+			.time-or-subtitle {
+				margin-top: 12rpx;
+				color: #666666;
+			}
+		}
+		.warning {
+			flex-shrink: 0;
+			color: #888;
+			font-size: 24rpx;
+			@include u-flex(column, center, center);
+			image {
+				flex-shrink: 0;
+				height: 36rpx;
+				width: 36rpx;
+			}
+		}
+		.video-line {
+			min-width: 140rpx;
+			max-width: 200rpx;
+			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));
+			box-sizing: border-box;
+			z-index: 9;
+
+			&-btn {
+				width: calc(100% - 64rpx);
+				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);
+				margin: 24rpx 32rpx;
+				box-sizing: border-box;
+				&-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);
+		.u-border {
+			flex: 1;
+			@include u-flex(row,center,flex-start);
+			padding: 0 6rpx;
+			border-radius: 6px;
+		}
+		&-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: 10px;
+			}
+		}
+		&-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: 6px;
+			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-icon{
+		height: 24px;
+		width: 24px;
+		margin-right: 12px;
+	}
+	.logo {
+		display: inline-block;
+		width: 30px;
+		height: auto;
+		margin: 20px 0 0 10px;
+		pointer-events: none;
+		object-fit: cover;
+	}
+	.logo-full {
+		display: inline-block;
+		width: 40px;
+		height: auto;
+		margin: 50px 0 0 30px;
+		pointer-events: none;
+		object-fit: cover;
+	}
+	.tabbox-bar {
+		@include u-flex(row, center, flex-start);
+		background-color: #fff;
+		.warning {
+			flex-shrink: 0;
+			padding-right: 20rpx;
+		}
+	}
+	.tabbox {
+		flex: 1;
+		@include u-flex(row, center, center);
+		border-bottom: 2rpx solid #F5F7FA;
+		height: 44px;
+		background-color: #fff;
+		view {
+			flex: 1;
+			padding: 20rpx 0;
+			margin-right: 40rpx;
+			text-align: center;
+		}
+		&-active {
+			position: relative;
+			&::after {
+				position: absolute;
+				bottom: 0;
+				left: 50%;
+				transform: translateX(-50%);
+				content: "";
+				width: 3rem;
+				border-bottom: 4px solid #FF5C03;
+			}
+		}
+	}
+	.chatinput {
+		position: fixed;
+		left: 32rpx;
+		right: 32rpx;
+		z-index: 999;
+		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;
+			}
+		}
+	}
+	.answerTip {
+		position: fixed;
+		right: 0;
+		z-index: 9;
+		bottom: calc(var(--window-bottom) + 380rpx);
+		box-shadow: 0rpx 8rpx 21rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 24rpx 24rpx 24rpx 24rpx;
+		background-color: #ff5c03;
+		color: #fff;
+		border-radius: 50%;
+		height: 100rpx;
+		width: 100rpx;
+		font-size: 25rpx;
+		text-align: center;
+		padding: 10rpx;
+		@include u-flex(row, center, center);
+	}
+	.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%);
+		}
+	}
+	.arrow-left-warning {
+		position: absolute;
+		left: 24rpx;
+		height: 88rpx;
+		overflow: hidden;
+		color: #888;
+		font-size: 24rpx;
+		@include u-flex(column, center, center);
+		image {
+			flex-shrink: 0;
+			height: 36rpx;
+			width: 36rpx;
+		}
+	}
+</style>

+ 2242 - 0
pages_course/videoOld.vue

@@ -0,0 +1,2242 @@
+<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="footer-btn" v-if="!isLogin || isAddKf !=1" @click="submit">
+				<text>立即学习</text>
+			</view>
+			<view v-if="isLogin&&isAddKf==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
+				<image class="footer-btn-img" :src="baseUrl+'/images/red_envelope_btnimg.png'" mode="aspectFill"></image>
+				<text>提交答案领取奖励</text>
+			</view>
+			<!-- <view @click="checked=!checked" class="agreement" v-if="!isLogin">
+				<radio value="r1" :checked="checked" color="#ff5c03" activeBorderColor="#ff5c03"
+					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 dayjs from 'dayjs';
+	import {
+		getErrMsg,
+		getH5CourseByVideoId,
+		getH5CourseVideoDetails,
+		courseAnswer,
+		getFinishCourseVideo,
+		getIsAddKf,
+		internetTraffic,
+		getIntegralByH5Video,
+		sendReward,
+		loginByMp,
+		getRealLink,
+		getDanmuList,
+		errorLogUpload
+	} from "@/api/course.js"
+	export default {
+		data() {
+			return {
+				baseUrl:uni.getStorageSync('requestImagesPath'),
+				// 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: false,
+				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.utils.isLoginCourse()
+			this.uuId = this.utils.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 : ''
+							});
+						} else {
+							
+						}
+						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: ''
+								}))
+						} else {
+							if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+								this.sendErrorLog('/app/course/getH5CourseVideoDetails',this.urlOption)
+							}
+						}
+						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.utils.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"
+								})
+							}
+							if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+								this.sendErrorLog('/app/course/courseAnswer',param)
+							}
+						}
+					},
+					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'
+						// 	})
+						// }
+						if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+							this.sendErrorLog('/app/course/sendReward',param)
+						}
+					})
+				}
+			},
+			// 线路
+			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'
+							});
+							if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+								this.sendErrorLog('/app/course/isAddKf',this.urlOption)
+							}
+						}
+					},
+					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).then(res=>{
+					if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+						this.sendErrorLog('/app/course/updateWatchDuration',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"
+						})
+					} else {
+						if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+							this.sendErrorLog('/app/course/getIntegralByH5Video',param)
+						}
+					}
+				})
+			},
+			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
+				internetTraffic(param).then(res=>{
+					if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+						this.sendErrorLog('/app/course/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.utils.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,appId:"wx19c8813ffc33d1cb"}).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'
+											});
+											if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+												this.sendErrorLog('/app/wx/courseLogin',{code: loginRes.code,encryptedData:infoRes.encryptedData,iv:infoRes.iv})
+											}
+										 }
+									 }).catch(err=>{
+										uni.hideLoading();
+										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.utils.isLoginCourse().then(
+								isLogin => {
+									this.isLogin = isLogin
+									if(isLogin){
+										this.getIsAddKf() 
+									} else {
+										this.goLogin()
+									}
+								},
+								rej => {}
+							);
+						}
+					} else {
+						this.isExpire = true
+						uni.showToast({
+							title: '课程已过期或链接无效',
+							icon: 'none'
+						});
+						if(res&&res.code==500&&res.msg == '未知异常,请联系管理员'){
+							this.sendErrorLog('/app/course/getRealLink',{sortLink:this.sortLink})
+						}
+					}
+				}).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.wsUrl + "/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()
+				}
+			},
+			// 未知异常,请联系管理员
+			sendErrorLog(url,param){
+				const data = {
+					url:url || '',
+					param:param?JSON.stringify(param) : ''
+				}
+				errorLogUpload(data)
+			}
+		}
+	}
+</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>

+ 162 - 0
pages_course/webview.vue

@@ -0,0 +1,162 @@
+<template>
+	<view class="container">
+		<!-- 加载提示 -->
+		<view class="loading" v-if="loading">
+			<text>加载中...</text>
+		</view>
+
+		<!-- web-view组件 -->
+		<web-view :src="webviewUrl" @message="handleMessage" @load="onLoads" @error="onError"></web-view>
+	</view>
+</template>
+
+<script>
+	// import {
+	// 	loginByMp
+	// } from '@/api/user'
+	export default {
+		data() {
+			return {
+				loading: true,
+				webviewUrl: 'https://h5.fbylive.com/weixinOauth',
+				userInfo: null
+			}
+		},
+		onLoad(options) {
+			console.log("webview",options)
+			uni.setStorageSync('webview', "webview");
+			if (options.code) {
+				// uni.$emit('usercode', {  code: options.code });
+				this.loginweixin(options.code)
+
+			}
+			// 生成带参的H5授权页面URL
+			// this.webviewUrl = this.generateAuthUrl()
+		},
+		methods: {
+			loginweixin(datas) {
+				var data = {
+					code: datas,
+				}
+				loginByMp(data).then(res => {
+						this.res = res
+						uni.hideLoading();
+						if (res.code == 200) {
+							console.log(res)
+							uni.hideLoading();
+							uni.showToast({
+								icon: 'none',
+								title: "成功获取用户信息",
+							});
+							uni.setStorageSync('userInfos', JSON.stringify(res.user));
+							this.userInfo = res.user;
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 1
+								});
+							}, 200)
+						} else {
+							uni.hideLoading();
+							uni.showToast({
+								title: res.msg || '获取用户信息失败',
+								icon: 'none'
+							})
+						}
+					},
+					err => {}
+				).catch(err => {
+					uni.hideLoading();
+					uni.showToast({
+						icon: 'none',
+						title: "授权登录失败,请重新登录",
+					});
+				});
+			},
+			// 生成授权页面URL,附带小程序传递的参数
+			generateAuthUrl() {
+				// 获取当前小程序的场景值,用于后续业务处理
+				const scene = uni.getLaunchOptionsSync().scene
+
+				// 这里替换为你的uniapp H5项目域名
+
+				// 拼接参数,可包含小程序特有的信息
+				const params = {
+					scene,
+					appid: 'wx961fadab9bcb792b', // 公众号AppID
+					redirect_uri: encodeURIComponent('https://h5.fbylive.com/weixinOauth'),
+					scope: 'snsapi_userinfo',
+					state: 'wechat_redirect'
+				}
+
+				// 微信公众号授权URL
+				return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${params.appid}&redirect_uri=${params.redirect_uri}&response_type=code&scope=${params.scope}&state=${params.state}#wechat_redirect`
+			},
+
+			// 处理web-view向小程序发送的消息
+			handleMessage(e) {
+				console.log('收到web-view消息:', e.detail)
+				console.log('收到web-view消息:', e)
+				// 获取H5页面传递过来的用户信息
+				if (e.detail && e.detail.type === 'user_info') {
+					this.userInfo = e.detail.data
+					this.token = e.detail.token
+					// 存储用户信息到本地
+					uni.setStorageSync('userInfo', this.userInfo)
+					uni.setStorageSync('TOKEN_WEXIN', this.userInfo)
+
+					// 返回上一页或跳转到首页
+					uni.showToast({
+						title: '登录成功',
+						icon: 'success'
+					})
+
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 1500)
+				}
+			},
+
+			// web-view加载完成
+			onLoads() {
+				this.loading = false
+				console.log('web-view加载完成')
+			},
+
+			// web-view加载失败
+			onError(e) {
+				this.loading = false
+				console.error('web-view加载失败:', e)
+				uni.showToast({
+					title: '页面加载失败',
+					icon: 'none'
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	.container {
+		width: 100%;
+		height: 100%;
+		position: relative;
+	}
+
+	.loading {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background-color: #fff;
+		z-index: 100;
+	}
+
+	web-view {
+		width: 100%;
+		height: 100%;
+	}
+</style>

二進制
static/images/warning.png


+ 23 - 0
store/index.js

@@ -0,0 +1,23 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+Vue.use(Vuex)
+
+const store = new Vuex.Store({
+  state: {
+    coureLogin: uni.getStorageSync('coureLogin') || 0,
+  },
+  mutations: {
+    setCoureLogin(state, payload) {
+    	uni.setStorageSync('coureLogin', payload);
+    	state.coureLogin = payload;
+    }
+  },
+  actions: {
+  },
+  getters: {
+    coureLogin: (state) => state.coureLogin,
+  }
+})
+
+export default store

+ 97 - 0
uni_modules/uni-popup/changelog.md

@@ -0,0 +1,97 @@
+## 1.9.9(2025-06-11)
+- 修复 uni-popup-dialog 中 setVal 方法报错的问题
+- 修复 uni-popup-dialog 数据双向绑定问题。
+## 1.9.8(2025-04-16)
+- 修复 更新组件示例 ,解决更新数据或保存项目导致弹窗消失的问题
+## 1.9.7(2025-04-14)
+- 修复 uni-popup-dialog 弹出框在vue3中双向绑定问题
+## 1.9.6(2025-01-08)
+- 修复 示例中过期图片地址
+## 1.9.5(2024-10-15)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.9.2(2024-09-21)
+- 修复 uni-popup在android上的重复点击弹出位置不正确的bug
+## 1.9.1(2024-04-02)
+- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法)
+## 1.9.0(2024-03-28)
+- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
+## 1.8.9(2024-03-20)
+- 修复 uni-popup-dialog 数据输入时修正为双向绑定
+## 1.8.8(2024-02-20)
+- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
+## 1.8.7(2024-02-02)
+- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
+## 1.8.6(2024-01-30)
+- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
+## 1.8.5(2024-01-26)
+- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
+## 1.8.4(2023-11-15)
+- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
+## 1.8.3(2023-04-17)
+- 修复 uni-popup 重复打开时的 bug
+## 1.8.2(2023-02-02)
+- uni-popup-dialog 组件新增 inputType 属性
+## 1.8.1(2022-12-01)
+- 修复 nvue 下 v-show 报错
+## 1.8.0(2022-11-29)
+- 优化 主题样式
+## 1.7.9(2022-04-02)
+- 修复 弹出层内部无法滚动的bug
+## 1.7.8(2022-03-28)
+- 修复 小程序中高度错误的bug
+## 1.7.7(2022-03-17)
+- 修复 快速调用open出现问题的Bug
+## 1.7.6(2022-02-14)
+- 修复 safeArea 属性不能设置为false的bug
+## 1.7.5(2022-01-19)
+- 修复 isMaskClick 失效的bug
+## 1.7.4(2022-01-19)
+- 新增 cancelText \ confirmText 属性 ,可自定义文本
+- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
+- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
+## 1.7.3(2022-01-13)
+- 修复 设置 safeArea 属性不生效的bug
+## 1.7.2(2021-11-26)
+- 优化 组件示例
+## 1.7.1(2021-11-26)
+- 修复 vuedoc 文字错误
+## 1.7.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
+## 1.6.2(2021-08-24)
+- 新增 支持国际化
+## 1.6.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.6.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.5.0(2021-06-23)
+- 新增 mask-click 遮罩层点击事件
+## 1.4.5(2021-06-22)
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.4(2021-06-18)
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.3(2021-06-08)
+- 修复 错误的 watch 字段
+- 修复 safeArea 属性不生效的问题
+- 修复 点击内容,再点击遮罩无法关闭的Bug
+## 1.4.2(2021-05-12)
+- 新增 组件示例地址
+## 1.4.1(2021-04-29)
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
+## 1.4.0 (2021-04-29)
+- 新增 type 属性的 left\right 值,支持左右弹出
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
+- 新增 safeArea 属性,是否适配底部安全区
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
+- 修复 App 端弹出等待的Bug
+- 优化 提升低配设备性能,优化动画卡顿问题
+- 优化 更简单的组件自定义方式
+## 1.2.9(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.2.8(2021-02-05)
+- 调整为uni_modules目录规范
+## 1.2.7(2021-02-05)
+- 调整为uni_modules目录规范
+- 新增 支持 PC 端
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端

+ 45 - 0
uni_modules/uni-popup/components/uni-popup-dialog/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    this.$once('hook:beforeDestroy', () => {
+      document.removeEventListener('keyup', listener)
+    })
+  },
+	render: () => {}
+}
+// #endif

+ 327 - 0
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -0,0 +1,327 @@
+<template>
+	<view class="uni-popup-dialog">
+		<view class="uni-dialog-title">
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
+		</view>
+		<view v-if="mode === 'base'" class="uni-dialog-content">
+			<slot>
+				<text class="uni-dialog-content-text">{{content}}</text>
+			</slot>
+		</view>
+		<view v-else class="uni-dialog-content">
+			<slot>
+				<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
+					:placeholder="placeholderText" :focus="focus">
+			</slot>
+		</view>
+		<view class="uni-dialog-button-group">
+			<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
+				<text class="uni-dialog-button-text">{{closeText}}</text>
+			</view>
+			<view class="uni-dialog-button" :class="showClose?'uni-border-left':''" @click="onOk">
+				<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+		initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {
+		t
+	} = initVueI18n(messages)
+	/**
+	 * PopUp 弹出层-对话框样式
+	 * @description 弹出层-对话框样式
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} value input 模式下的默认值
+	 * @property {String} placeholder input 模式下输入提示
+	 * @property {Boolean} focus input模式下是否自动聚焦,默认为true
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} mode = [base|input] 模式、
+	 * 	@value base 基础对话框
+	 * 	@value input 可输入对话框
+	 * @showClose {Boolean} 是否显示关闭按钮
+	 * @property {String} content 对话框内容
+	 * @property {Boolean} beforeClose 是否拦截取消事件
+	 * @property {Number} maxlength 输入
+	 * @event {Function} confirm 点击确认按钮触发
+	 * @event {Function} close 点击取消按钮触发
+	 */
+
+	export default {
+		name: "uniPopupDialog",
+		mixins: [popup],
+		emits: ['confirm', 'close', 'update:modelValue', 'input'],
+		props: {
+			inputType: {
+				type: String,
+				default: 'text'
+			},
+			showClose: {
+				type: Boolean,
+				default: true
+			},
+			// #ifdef VUE2
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			// #endif
+			// #ifdef VUE3
+			modelValue: {
+				type: [Number, String],
+				default: ''
+			},
+			// #endif
+
+
+			placeholder: {
+				type: [String, Number],
+				default: ''
+			},
+			type: {
+				type: String,
+				default: 'error'
+			},
+			mode: {
+				type: String,
+				default: 'base'
+			},
+			title: {
+				type: String,
+				default: ''
+			},
+			content: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			},
+			cancelText: {
+				type: String,
+				default: ''
+			},
+			confirmText: {
+				type: String,
+				default: ''
+			},
+			maxlength: {
+				type: Number,
+				default: -1,
+			},
+			focus: {
+				type: Boolean,
+				default: true,
+			}
+		},
+		data() {
+			return {
+				dialogType: 'error',
+				val: ""
+			}
+		},
+		computed: {
+			okText() {
+				return this.confirmText || t("uni-popup.ok")
+			},
+			closeText() {
+				return this.cancelText || t("uni-popup.cancel")
+			},
+			placeholderText() {
+				return this.placeholder || t("uni-popup.placeholder")
+			},
+			titleText() {
+				return this.title || t("uni-popup.title")
+			}
+		},
+		watch: {
+			type(val) {
+				this.dialogType = val
+			},
+			mode(val) {
+				if (val === 'input') {
+					this.dialogType = 'info'
+				}
+			},
+			value(val) {
+				this.setVal(val)
+			},
+			// #ifdef VUE3
+			modelValue(val) {
+				this.setVal(val)
+			},
+			// #endif
+			val(val) {
+				// #ifdef VUE2
+				// TODO 兼容 vue2
+				this.$emit('input', val);
+				// #endif
+				// #ifdef VUE3
+				// TODO 兼容 vue3
+				this.$emit('update:modelValue', val);
+				// #endif
+			}
+		},
+		created() {
+			// 对话框遮罩不可点击
+			this.popup.disableMask()
+			// this.popup.closeMask()
+			if (this.mode === 'input') {
+				this.dialogType = 'info'
+				this.val = this.value;
+				// #ifdef VUE3
+				this.val = this.modelValue;
+				// #endif
+			} else {
+				this.dialogType = this.type
+			}
+		},
+		methods: {
+			/**
+			 * 给val属性赋值
+			 */
+			setVal(val) {
+				if (this.maxlength != -1 && this.mode === 'input') {
+					this.val = val.slice(0, this.maxlength);
+				} else {
+					this.val = val
+				}
+			},
+			/**
+			 * 点击确认按钮
+			 */
+			onOk() {
+				if (this.mode === 'input') {
+					this.$emit('confirm', this.val)
+				} else {
+					this.$emit('confirm')
+				}
+				if (this.beforeClose) return
+				this.popup.close()
+			},
+			/**
+			 * 点击取消按钮
+			 */
+			closeDialog() {
+				this.$emit('close')
+				if (this.beforeClose) return
+				this.popup.close()
+			},
+			close() {
+				this.popup.close()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.uni-popup-dialog {
+		width: 300px;
+		border-radius: 11px;
+		background-color: #fff;
+	}
+
+	.uni-dialog-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 25px;
+	}
+
+	.uni-dialog-title-text {
+		font-size: 16px;
+		font-weight: 500;
+	}
+
+	.uni-dialog-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		padding: 20px;
+	}
+
+	.uni-dialog-content-text {
+		font-size: 14px;
+		color: #6C6C6C;
+	}
+
+	.uni-dialog-button-group {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-top-color: #f5f5f5;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-dialog-button {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+	}
+
+	.uni-border-left {
+		border-left-color: #f0f0f0;
+		border-left-style: solid;
+		border-left-width: 1px;
+	}
+
+	.uni-dialog-button-text {
+		font-size: 16px;
+		color: #333;
+	}
+
+	.uni-button-color {
+		color: #007aff;
+	}
+
+	.uni-dialog-input {
+		flex: 1;
+		font-size: 14px;
+		border: 1px #eee solid;
+		height: 40px;
+		padding: 0 10px;
+		border-radius: 5px;
+		color: #555;
+	}
+
+	.uni-popup__success {
+		color: #4cd964;
+	}
+
+	.uni-popup__warn {
+		color: #f0ad4e;
+	}
+
+	.uni-popup__error {
+		color: #dd524d;
+	}
+
+	.uni-popup__info {
+		color: #909399;
+	}
+</style>

+ 143 - 0
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class="uni-popup-message">
+		<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
+			<slot>
+				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
+			</slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	/**
+	 * PopUp 弹出层-消息提示
+	 * @description 弹出层-消息提示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} message 消息提示文字
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+	 */
+
+	export default {
+		name: 'uniPopupMessage',
+		mixins:[popup],
+		props: {
+			/**
+			 * 主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'success'
+			},
+			/**
+			 * 消息文字
+			 */
+			message: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 显示时间,设置为 0 则不会自动关闭
+			 */
+			duration: {
+				type: Number,
+				default: 3000
+			},
+			maskShow:{
+				type:Boolean,
+				default:false
+			}
+		},
+		data() {
+			return {}
+		},
+		created() {
+			this.popup.maskShow = this.maskShow
+			this.popup.messageChild = this
+		},
+		methods: {
+			timerClose(){
+				if(this.duration === 0) return
+				clearTimeout(this.timer) 
+				this.timer = setTimeout(()=>{
+					this.popup.close()
+				},this.duration)
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-message {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+	}
+
+	.uni-popup-message__box {
+		background-color: #e1f3d8;
+		padding: 10px 15px;
+		border-color: #eee;
+		border-style: solid;
+		border-width: 1px;
+		flex: 1;
+	}
+
+	@media screen and (min-width: 500px) {
+		.fixforpc-width {
+			margin-top: 20px;
+			border-radius: 4px;
+			flex: none;
+			min-width: 380px;
+			/* #ifndef APP-NVUE */
+			max-width: 50%;
+			/* #endif */
+			/* #ifdef APP-NVUE */
+			max-width: 500px;
+			/* #endif */
+		}
+	}
+
+	.uni-popup-message-text {
+		font-size: 14px;
+		padding: 0;
+	}
+
+	.uni-popup__success {
+		background-color: #e1f3d8;
+	}
+
+	.uni-popup__success-text {
+		color: #67C23A;
+	}
+
+	.uni-popup__warn {
+		background-color: #faecd8;
+	}
+
+	.uni-popup__warn-text {
+		color: #E6A23C;
+	}
+
+	.uni-popup__error {
+		background-color: #fde2e2;
+	}
+
+	.uni-popup__error-text {
+		color: #F56C6C;
+	}
+
+	.uni-popup__info {
+		background-color: #F2F6FC;
+	}
+
+	.uni-popup__info-text {
+		color: #909399;
+	}
+</style>

+ 188 - 0
uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue

@@ -0,0 +1,188 @@
+<template>
+	<view class="uni-popup-share">
+		<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
+		<view class="uni-share-content">
+			<view class="uni-share-content-box">
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+					<text class="uni-share-text">{{item.text}}</text>
+				</view>
+
+			</view>
+		</view>
+		<view class="uni-share-button-box">
+			<button class="uni-share-button" @click="close">{{cancelText}}</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {	t	} = initVueI18n(messages)
+	export default {
+		name: 'UniPopupShare',
+		mixins:[popup],
+		emits:['select'],
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				// TODO 替换为自己的图标
+				bottomData: [{
+						text: '微信',
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
+						name: 'wx'
+					},
+					{
+						text: '支付宝',
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
+						name: 'ali'
+					},
+					{
+						text: 'QQ',
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
+						name: 'qq'
+					},
+					{
+						text: '新浪',
+						icon: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png',
+						name: 'sina'
+					},
+					// {
+					// 	text: '百度',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
+					// 	name: 'copy'
+					// },
+					// {
+					// 	text: '其他',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
+					// 	name: 'more'
+					// }
+				]
+			}
+		},
+		created() {},
+		computed: {
+			cancelText() {
+				return t("uni-popup.cancel")
+			},
+		shareTitleText() {
+				return this.title || t("uni-popup.shareTitle")
+			}
+		},
+		methods: {
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				this.$emit('select', {
+					item,
+					index
+				})
+				this.close()
+
+			},
+			/**
+			 * 关闭窗口
+			 */
+			close() {
+				if(this.beforeClose) return
+				this.popup.close()
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-share {
+		background-color: #fff;
+		border-top-left-radius: 11px;
+		border-top-right-radius: 11px;
+	}
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+	}
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 10px;
+	}
+
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 360px;
+	}
+
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+
+	.uni-share-image {
+		width: 30px;
+		height: 30px;
+	}
+
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 15px;
+	}
+
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/en.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "cancel",
+	"uni-popup.ok": "ok",
+	"uni-popup.placeholder": "pleace enter",
+	"uni-popup.title": "Hint",
+	"uni-popup.shareTitle": "Share to"
+}

+ 8 - 0
uni_modules/uni-popup/components/uni-popup/i18n/index.js

@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+	en,
+	'zh-Hans': zhHans,
+	'zh-Hant': zhHant
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "确定",
+	"uni-popup.placeholder": "请输入",
+		"uni-popup.title": "提示",
+		"uni-popup.shareTitle": "分享到"
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "確定",
+	"uni-popup.placeholder": "請輸入",
+	"uni-popup.title": "提示",
+	"uni-popup.shareTitle": "分享到"
+}

+ 45 - 0
uni_modules/uni-popup/components/uni-popup/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    // this.$once('hook:beforeDestroy', () => {
+    //   document.removeEventListener('keyup', listener)
+    // })
+  },
+	render: () => {}
+}
+// #endif

+ 26 - 0
uni_modules/uni-popup/components/uni-popup/popup.js

@@ -0,0 +1,26 @@
+
+export default {
+	data() {
+		return {
+			
+		}
+	},
+	created(){
+		this.popup = this.getParent()
+	},
+	methods:{
+		/**
+		 * 获取父元素实例
+		 */
+		getParent(name = 'uniPopup') {
+			let parent = this.$parent;
+			let parentName = parent.$options.name;
+			while (parentName !== name) {
+				parent = parent.$parent;
+				if (!parent) return false
+				parentName = parent.$options.name;
+			}
+			return parent;
+		},
+	}
+}

+ 90 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.uvue

@@ -0,0 +1,90 @@
+<template>
+  <view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
+    <view @click.stop>
+      <slot></slot>
+    </view>
+  </view>
+</template>
+
+<script>
+  type CloseCallBack = ()=> void;
+  let closeCallBack:CloseCallBack = () :void => {};
+  export default {
+    emits:["close","clickMask"],
+    data() {
+      return {
+        isShow:false,
+        isOpen:false
+      }
+    },
+    props: {
+      maskClick: {
+        type: Boolean,
+        default: true
+      },
+    },
+    watch: {
+      // 设置show = true 时,如果没有 open 需要设置为 open
+      isShow:{
+        handler(isShow) {
+          // console.log("isShow",isShow)
+          if(isShow && this.isOpen == false){
+            this.isOpen = true
+          }
+        },
+        immediate:true
+      },
+      // 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
+      isOpen:{
+        handler(isOpen) {
+          // console.log("isOpen",isOpen)
+          if(isOpen && this.isShow == false){
+            this.isShow = true
+          }
+        },
+        immediate:true
+      }
+    },
+    methods:{
+      open(){
+        // ...funs : CloseCallBack[]
+        // if(funs.length > 0){
+        //   closeCallBack = funs[0]
+        // }
+        this.isOpen = true;
+      },
+      clickMask(){
+        if(this.maskClick == true){
+          this.$emit('clickMask')
+          this.close()
+        }
+      },
+      close(): void{
+        this.isOpen = false;
+        this.$emit('close')
+        closeCallBack()
+      },
+      hiden(){
+        this.isShow = false
+      },
+      show(){
+        this.isShow = true
+      }
+    }
+  }
+</script>
+
+<style>
+.popup-root {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 750rpx;
+  height: 100%;
+  flex: 1;
+  background-color: rgba(0, 0, 0, 0.3);
+  justify-content: center;
+  align-items: center;
+  z-index: 99;
+}
+</style>

+ 518 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -0,0 +1,518 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
+		<view @touchstart="touchstart">
+			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
+				:duration="duration" :show="showTrans" @click="onTap" />
+			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
+				:show="showTrans" @click="onTap">
+				<view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear">
+					<slot />
+				</view>
+			</uni-transition>
+		</view>
+		<!-- #ifdef H5 -->
+		<keypress v-if="maskShow" @esc="onTap" />
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifdef H5
+	import keypress from './keypress.js'
+	// #endif
+
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value left		左侧弹出
+	 * 	@value right  右侧弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [true|false] 是否开启动画
+	 * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
+	 * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
+	 * @property {String}  backgroundColor 主窗口背景色
+	 * @property {String}  maskBackgroundColor 蒙版颜色
+	 * @property {String}  borderRadius 设置圆角(左上、右上、右下和左下) 示例:"10px 10px 10px 10px"
+	 * @property {Boolean} safeArea		   是否适配底部安全区
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 * @event {Function} maskClick 点击遮罩触发
+	 */
+
+	export default {
+		name: 'uniPopup',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
+		},
+		emits: ['change', 'maskClick'],
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			isMaskClick: {
+				type: Boolean,
+				default: null
+			},
+			// TODO 2 个版本后废弃属性 ,使用 isMaskClick
+			maskClick: {
+				type: Boolean,
+				default: null
+			},
+			backgroundColor: {
+				type: String,
+				default: 'none'
+			},
+			safeArea: {
+				type: Boolean,
+				default: true
+			},
+			maskBackgroundColor: {
+				type: String,
+				default: 'rgba(0, 0, 0, 0.4)'
+			},
+			borderRadius:{
+				type: String,
+			}
+		},
+
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(type) {
+					if (!this.config[type]) return
+					this[this.config[type]](true)
+				},
+				immediate: true
+			},
+			isDesktop: {
+				handler: function(newVal) {
+					if (!this.config[newVal]) return
+					this[this.config[this.type]](true)
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			},
+			isMaskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			},
+			// H5 下禁止底部滚动
+			showPopup(show) {
+				// #ifdef H5
+				// fix by mehaotian 处理 h5 滚动穿透的问题
+				document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
+				// #endif
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				popupWidth: 0,
+				popupHeight: 0,
+				config: {
+					top: 'top',
+					bottom: 'bottom',
+					center: 'center',
+					left: 'left',
+					right: 'right',
+					message: 'top',
+					dialog: 'center',
+					share: 'bottom'
+				},
+				maskClass: {
+					position: 'fixed',
+					bottom: 0,
+					top: 0,
+					left: 0,
+					right: 0,
+					backgroundColor: 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					backgroundColor: 'transparent',
+					borderRadius: this.borderRadius || "0",
+					position: 'fixed',
+					left: 0,
+					right: 0
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: 'top'
+			}
+		},
+		computed: {
+			getStyles() {
+				let res = { backgroundColor: this.bg };
+				if (this.borderRadius || "0") {
+					res = Object.assign(res, { borderRadius: this.borderRadius })
+				}
+				return res;
+			},
+			isDesktop() {
+				return this.popupWidth >= 500 && this.popupHeight >= 500
+			},
+			bg() {
+				if (this.backgroundColor === '' || this.backgroundColor === 'none') {
+					return 'transparent'
+				}
+				return this.backgroundColor
+			}
+		},
+		mounted() {
+			const fixSize = () => {
+				// #ifdef MP-WEIXIN
+				const {
+					windowWidth,
+					windowHeight,
+					windowTop,
+					safeArea,
+					screenHeight,
+					safeAreaInsets
+				} = uni.getWindowInfo()
+				// #endif
+				// #ifndef MP-WEIXIN
+				const {
+					windowWidth,
+					windowHeight,
+					windowTop,
+					safeArea,
+					screenHeight,
+					safeAreaInsets
+				} = uni.getSystemInfoSync()
+				// #endif
+				this.popupWidth = windowWidth
+				this.popupHeight = windowHeight + (windowTop || 0)
+				// TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
+				if (safeArea && this.safeArea) {
+					// #ifdef MP-WEIXIN
+					this.safeAreaInsets = screenHeight - safeArea.bottom
+					// #endif
+					// #ifndef MP-WEIXIN
+					this.safeAreaInsets = safeAreaInsets.bottom
+					// #endif
+				} else {
+					this.safeAreaInsets = 0
+				}
+			}
+			fixSize()
+			// #ifdef H5
+			// window.addEventListener('resize', fixSize)
+			// this.$once('hook:beforeDestroy', () => {
+			// 	window.removeEventListener('resize', fixSize)
+			// })
+			// #endif
+		},
+		// #ifndef VUE3
+		// TODO vue2
+		destroyed() {
+			this.setH5Visible()
+		},
+		// #endif
+		// #ifdef VUE3
+		// TODO vue3
+		unmounted() {
+			this.setH5Visible()
+		},
+		// #endif
+		activated() {
+   	  this.setH5Visible(!this.showPopup);
+    },
+    deactivated() {
+      this.setH5Visible(true);
+    },
+		created() {
+			// this.mkclick =  this.isMaskClick || this.maskClick
+			if (this.isMaskClick === null && this.maskClick === null) {
+				this.mkclick = true
+			} else {
+				this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
+			}
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+			// TODO 处理 message 组件生命周期异常的问题
+			this.messageChild = null
+			// TODO 解决头条冒泡的问题
+			this.clearPropagation = false
+			this.maskClass.backgroundColor = this.maskBackgroundColor
+		},
+		methods: {
+			setH5Visible(visible = true) {
+				// #ifdef H5
+				// fix by mehaotian 处理 h5 滚动穿透的问题
+				document.getElementsByTagName('body')[0].style.overflow =  visible ? "visible" : "hidden";
+				// #endif
+			},
+			/**
+			 * 公用方法,不显示遮罩层
+			 */
+			closeMask() {
+				this.maskShow = false
+			},
+			/**
+			 * 公用方法,遮罩层禁止点击
+			 */
+			disableMask() {
+				this.mkclick = false
+			},
+			// TODO nvue 取消冒泡
+			clear(e) {
+				// #ifndef APP-NVUE
+				e.stopPropagation()
+				// #endif
+				this.clearPropagation = true
+			},
+
+			open(direction) {
+				// fix by mehaotian 处理快速打开关闭的情况
+				if (this.showPopup) {
+					return
+				}
+				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
+				if (!(direction && innerType.indexOf(direction) !== -1)) {
+					direction = this.type
+				}
+				if (!this.config[direction]) {
+					console.error('缺少类型:', direction)
+					return
+				}
+				this[this.config[direction]]()
+				this.$emit('change', {
+					show: true,
+					type: direction
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$emit('change', {
+					show: false,
+					type: this.type
+				})
+				clearTimeout(this.timer)
+				// // 自定义关闭事件
+				// this.customOpen && this.customClose()
+				this.timer = setTimeout(() => {
+					this.showPopup = false
+				}, 300)
+			},
+			// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
+			touchstart() {
+				this.clearPropagation = false
+			},
+
+			onTap() {
+				if (this.clearPropagation) {
+					// fix by mehaotian 兼容 nvue
+					this.clearPropagation = false
+					return
+				}
+				this.$emit('maskClick')
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top(type) {
+				this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					right: 0,
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0"
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+				this.$nextTick(() => {
+					this.showPoptrans()
+					if (this.messageChild && this.type === 'message') {
+						this.messageChild.timerClose()
+					}
+				})
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom(type) {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					right: 0,
+					bottom: 0,
+					paddingBottom: this.safeAreaInsets + 'px',
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0",
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center(type) {
+				this.popupstyle = 'center'
+				//微信小程序下,组合动画会出现文字向上闪动问题,再此做特殊处理
+				// #ifdef MP-WEIXIN
+					this.ani = ['fade']
+				// #endif
+				// #ifndef MP-WEIXIN
+					this.ani = ['zoom-out', 'fade']
+				// #endif
+				this.transClass = {
+					position: 'fixed',
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column',
+					/* #endif */
+					bottom: 0,
+					left: 0,
+					right: 0,
+					top: 0,
+					justifyContent: 'center',
+					alignItems: 'center',
+					borderRadius:this.borderRadius || "0"
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			left(type) {
+				this.popupstyle = 'left'
+				this.ani = ['slide-left']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					bottom: 0,
+					top: 0,
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0",
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column'
+					/* #endif */
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			right(type) {
+				this.popupstyle = 'right'
+				this.ani = ['slide-right']
+				this.transClass = {
+					position: 'fixed',
+					bottom: 0,
+					right: 0,
+					top: 0,
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0",
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column'
+					/* #endif */
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			showPoptrans(){
+				this.$nextTick(()=>{
+					this.showPopup = true
+					this.showTrans = true
+				})
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+
+		/* #endif */
+		&.top,
+		&.left,
+		&.right {
+			/* #ifdef H5 */
+			top: var(--window-top);
+			/* #endif */
+			/* #ifndef H5 */
+			top: 0;
+			/* #endif */
+		}
+
+		.uni-popup__wrapper {
+			/* #ifndef APP-NVUE */
+			display: block;
+			/* #endif */
+			position: relative;
+
+			/* iphonex 等安全区设置,底部安全区适配 */
+			/* #ifndef APP-NVUE */
+			// padding-bottom: constant(safe-area-inset-bottom);
+			// padding-bottom: env(safe-area-inset-bottom);
+			/* #endif */
+			&.left,
+			&.right {
+				/* #ifdef H5 */
+				padding-top: var(--window-top);
+				/* #endif */
+				/* #ifndef H5 */
+				padding-top: 0;
+				/* #endif */
+				flex: 1;
+			}
+		}
+	}
+
+	.fixforpc-z-index {
+		/* #ifndef APP-NVUE */
+		z-index: 999;
+		/* #endif */
+	}
+
+	.fixforpc-top {
+		top: 0;
+	}
+</style>

+ 107 - 0
uni_modules/uni-popup/package.json

@@ -0,0 +1,107 @@
+{
+  "id": "uni-popup",
+  "displayName": "uni-popup 弹出层",
+  "version": "1.9.9",
+  "description": " Popup 组件,提供常用的弹层",
+  "keywords": [
+    "uni-ui",
+    "弹出层",
+    "弹窗",
+    "popup",
+    "弹框"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "",
+    "uni-app": "^4.01",
+    "uni-app-x": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue",
+    "darkmode": "x",
+    "i18n": "x",
+    "widescreen": "x"
+  },
+  "uni_modules": {
+    "dependencies": [
+      "uni-scss",
+      "uni-transition"
+    ],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "x",
+        "aliyun": "x",
+        "alipay": "x"
+      },
+      "client": {
+        "uni-app": {
+          "vue": {
+            "vue2": "√",
+            "vue3": "√"
+          },
+          "web": {
+            "safari": "√",
+            "chrome": "√"
+          },
+          "app": {
+            "vue": "√",
+            "nvue": "√",
+            "android": "√",
+            "ios": "√",
+            "harmony": "x"
+          },
+          "mp": {
+            "weixin": "√",
+            "alipay": "√",
+            "toutiao": "√",
+            "baidu": "√",
+            "kuaishou": "√",
+            "jd": "√",
+            "harmony": "√",
+            "qq": "√",
+            "lark": "√"
+          },
+          "quickapp": {
+            "huawei": "-",
+            "union": "-"
+          }
+        },
+        "uni-app-x": {
+          "web": {
+            "safari": "-",
+            "chrome": "-"
+          },
+          "app": {
+            "android": "-",
+            "ios": "-",
+            "harmony": "-"
+          },
+          "mp": {
+            "weixin": "-"
+          }
+        }
+      }
+    }
+  }
+}

+ 17 - 0
uni_modules/uni-popup/readme.md

@@ -0,0 +1,17 @@
+
+
+## Popup 弹出层
+> **组件名:uni-popup**
+> 代码块: `uPopup`
+> 关联组件:`uni-transition`
+
+
+弹出层组件,在应用中弹出一个消息提示窗口、提示框等
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+
+
+
+

+ 8 - 0
uni_modules/uni-scss/changelog.md

@@ -0,0 +1,8 @@
+## 1.0.3(2022-01-21)
+- 优化 组件示例
+## 1.0.2(2021-11-22)
+- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
+## 1.0.1(2021-11-22)
+- 修复 vue3中scss语法兼容问题
+## 1.0.0(2021-11-18)
+- init

+ 1 - 0
uni_modules/uni-scss/index.scss

@@ -0,0 +1 @@
+@import './styles/index.scss';

+ 82 - 0
uni_modules/uni-scss/package.json

@@ -0,0 +1,82 @@
+{
+  "id": "uni-scss",
+  "displayName": "uni-scss 辅助样式",
+  "version": "1.0.3",
+  "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
+  "keywords": [
+    "uni-scss",
+    "uni-ui",
+    "辅助样式"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "JS SDK",
+        "通用 SDK"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "n",
+          "联盟": "n"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 4 - 0
uni_modules/uni-scss/readme.md

@@ -0,0 +1,4 @@
+`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 7 - 0
uni_modules/uni-scss/styles/index.scss

@@ -0,0 +1,7 @@
+@import './setting/_variables.scss';
+@import './setting/_border.scss';
+@import './setting/_color.scss';
+@import './setting/_space.scss';
+@import './setting/_radius.scss';
+@import './setting/_text.scss';
+@import './setting/_styles.scss';

+ 3 - 0
uni_modules/uni-scss/styles/setting/_border.scss

@@ -0,0 +1,3 @@
+.uni-border {
+	border: 1px $uni-border-1 solid;
+}

+ 66 - 0
uni_modules/uni-scss/styles/setting/_color.scss

@@ -0,0 +1,66 @@
+
+// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
+// @mixin get-styles($k,$c) {
+// 	@if $k == size or $k == weight{
+// 		font-#{$k}:#{$c}
+// 	}@else{
+// 		#{$k}:#{$c}
+// 	}
+// }
+$uni-ui-color:(
+	// 主色
+	primary: $uni-primary,
+	primary-disable: $uni-primary-disable,
+	primary-light: $uni-primary-light,
+	// 辅助色
+	success: $uni-success,
+	success-disable: $uni-success-disable,
+	success-light: $uni-success-light,
+	warning: $uni-warning,
+	warning-disable: $uni-warning-disable,
+	warning-light: $uni-warning-light,
+	error: $uni-error,
+	error-disable: $uni-error-disable,
+	error-light: $uni-error-light,
+	info: $uni-info,
+	info-disable: $uni-info-disable,
+	info-light: $uni-info-light,
+	// 中性色
+	main-color: $uni-main-color,
+	base-color: $uni-base-color,
+	secondary-color: $uni-secondary-color,
+	extra-color: $uni-extra-color,
+	// 背景色
+	bg-color: $uni-bg-color,
+	// 边框颜色
+	border-1: $uni-border-1,
+	border-2: $uni-border-2,
+	border-3: $uni-border-3,
+	border-4: $uni-border-4,
+	// 黑色
+	black:$uni-black,
+	// 白色
+	white:$uni-white,
+	// 透明
+	transparent:$uni-transparent
+) !default;
+@each $key, $child in $uni-ui-color {
+	.uni-#{"" + $key} {
+		color: $child;
+	}
+	.uni-#{"" + $key}-bg {
+		background-color: $child;
+	}
+}
+.uni-shadow-sm {
+	box-shadow: $uni-shadow-sm;
+}
+.uni-shadow-base {
+	box-shadow: $uni-shadow-base;
+}
+.uni-shadow-lg {
+	box-shadow: $uni-shadow-lg;
+}
+.uni-mask {
+	background-color:$uni-mask;
+}

+ 55 - 0
uni_modules/uni-scss/styles/setting/_radius.scss

@@ -0,0 +1,55 @@
+@mixin radius($r,$d:null ,$important: false){
+  $radius-value:map-get($uni-radius, $r) if($important, !important, null);
+  // Key exists within the $uni-radius variable
+  @if (map-has-key($uni-radius, $r) and  $d){
+		@if $d == t {
+				border-top-left-radius:$radius-value;
+				border-top-right-radius:$radius-value;
+		}@else if $d == r {
+				border-top-right-radius:$radius-value;
+				border-bottom-right-radius:$radius-value;
+		}@else if $d == b {
+				border-bottom-left-radius:$radius-value;
+				border-bottom-right-radius:$radius-value;
+		}@else if $d == l {
+				border-top-left-radius:$radius-value;
+				border-bottom-left-radius:$radius-value;
+		}@else if $d == tl {
+				border-top-left-radius:$radius-value;
+		}@else if $d == tr {
+				border-top-right-radius:$radius-value;
+		}@else if $d == br {
+				border-bottom-right-radius:$radius-value;
+		}@else if $d == bl {
+				border-bottom-left-radius:$radius-value;
+		}
+  }@else{
+		border-radius:$radius-value;
+  }
+}
+
+@each $key, $child in $uni-radius {
+	@if($key){
+		.uni-radius-#{"" + $key} {
+				@include radius($key)
+		}
+	}@else{
+		.uni-radius {
+				@include radius($key)
+		}
+	}
+}
+
+@each $direction in t, r, b, l,tl, tr, br, bl {
+	@each $key, $child in $uni-radius {
+		@if($key){
+			.uni-radius-#{"" + $direction}-#{"" + $key} {
+				@include radius($key,$direction,false)
+			}
+		}@else{
+			.uni-radius-#{$direction} {
+				@include radius($key,$direction,false)
+			}
+		}
+	}
+}

+ 56 - 0
uni_modules/uni-scss/styles/setting/_space.scss

@@ -0,0 +1,56 @@
+
+@mixin fn($space,$direction,$size,$n) {
+	@if $n {
+		#{$space}-#{$direction}: #{$size*$uni-space-root}px
+	} @else {
+		 #{$space}-#{$direction}: #{-$size*$uni-space-root}px
+	}
+}
+@mixin get-styles($direction,$i,$space,$n){
+	@if $direction == t {
+		@include fn($space, top,$i,$n);
+	} 
+	@if $direction == r {
+		@include fn($space, right,$i,$n);
+	} 
+	@if $direction == b {
+		@include fn($space, bottom,$i,$n);
+	} 
+	@if $direction == l {
+	 @include fn($space, left,$i,$n);
+	} 
+	@if $direction == x {
+		@include fn($space, left,$i,$n);
+		@include fn($space, right,$i,$n);
+	} 
+	@if $direction == y {
+		@include fn($space, top,$i,$n);
+		@include fn($space, bottom,$i,$n);
+	} 
+	@if $direction == a {
+		@if $n {
+			#{$space}:#{$i*$uni-space-root}px;
+		} @else {
+			#{$space}:#{-$i*$uni-space-root}px;
+		}
+	} 
+}
+
+@each $orientation in m,p {
+	$space: margin;
+	@if $orientation == m {
+		$space: margin;
+	} @else {
+		$space: padding;
+	}
+	@for $i from 0 through 16 {
+		@each $direction in t, r, b, l, x, y, a {
+			.uni-#{$orientation}#{$direction}-#{$i} { 
+				@include  get-styles($direction,$i,$space,true);
+			} 
+			.uni-#{$orientation}#{$direction}-n#{$i} { 
+				@include  get-styles($direction,$i,$space,false);
+			}
+		}
+	}
+}

+ 167 - 0
uni_modules/uni-scss/styles/setting/_styles.scss

@@ -0,0 +1,167 @@
+/* #ifndef APP-NVUE */
+
+$-color-white:#fff;
+$-color-black:#000;
+@mixin base-style($color) {
+	color: #fff;
+	background-color: $color;
+	border-color: mix($-color-black, $color, 8%);
+	&:not([hover-class]):active {
+		background: mix($-color-black, $color, 10%);
+		border-color: mix($-color-black, $color, 20%);
+		color: $-color-white;
+		outline: none;
+	}
+}
+@mixin is-color($color) {
+	@include base-style($color);
+	&[loading] {
+		@include base-style($color);
+		&::before {
+			margin-right:5px;
+		}
+	}
+	&[disabled] {
+	  &,
+		&[loading],
+	  &:not([hover-class]):active {
+	    color: $-color-white;
+			border-color: mix(darken($color,10%), $-color-white);
+	    background-color: mix($color, $-color-white);
+	  }
+	}
+
+}
+@mixin base-plain-style($color) {
+	color:$color;
+	background-color: mix($-color-white, $color, 90%);
+	border-color: mix($-color-white, $color, 70%);
+	&:not([hover-class]):active {
+	  background: mix($-color-white, $color, 80%);
+	  color: $color;
+	  outline: none;
+		border-color: mix($-color-white, $color, 50%);
+	}
+}
+@mixin is-plain($color){
+	&[plain] {
+		@include base-plain-style($color);
+		&[loading] {
+			@include base-plain-style($color);
+			&::before {
+				margin-right:5px;
+			}
+		}
+		&[disabled] {
+		  &,
+		  &:active {
+		    color: mix($-color-white, $color, 40%);
+		    background-color: mix($-color-white, $color, 90%);
+				border-color: mix($-color-white, $color, 80%);
+		  }
+		}
+	}
+}
+
+
+.uni-btn {
+	margin: 5px;
+	color: #393939;
+	border:1px solid #ccc;
+	font-size: 16px;
+	font-weight: 200;
+	background-color: #F9F9F9;
+	// TODO 暂时处理边框隐藏一边的问题
+	overflow: visible;
+	&::after{
+		border: none;
+	}
+
+	&:not([type]),&[type=default] {
+		color: #999;
+		&[loading] {
+			background: none;
+			&::before {
+				margin-right:5px;
+			}
+		}
+
+
+
+		&[disabled]{
+			color: mix($-color-white, #999, 60%);
+		  &,
+			&[loading],
+		  &:active {
+				color: mix($-color-white, #999, 60%);
+		    background-color: mix($-color-white,$-color-black , 98%);
+				border-color: mix($-color-white,  #999, 85%);
+		  }
+		}
+
+		&[plain] {
+			color: #999;
+			background: none;
+			border-color: $uni-border-1;
+			&:not([hover-class]):active {
+				background: none;
+			  color: mix($-color-white, $-color-black, 80%);
+				border-color: mix($-color-white, $-color-black, 90%);
+			  outline: none;
+			}
+			&[disabled]{
+			  &,
+				&[loading],
+			  &:active {
+			    background: none;
+					color: mix($-color-white, #999, 60%);
+					border-color: mix($-color-white,  #999, 85%);
+			  }
+			}
+		}
+	}
+
+	&:not([hover-class]):active {
+	  color: mix($-color-white, $-color-black, 50%);
+	}
+
+	&[size=mini] {
+		font-size: 16px;
+		font-weight: 200;
+		border-radius: 8px;
+	}
+
+
+
+	&.uni-btn-small {
+		font-size: 14px;
+	}
+	&.uni-btn-mini {
+		font-size: 12px;
+	}
+
+	&.uni-btn-radius {
+		border-radius: 999px;
+	}
+	&[type=primary] {
+		@include is-color($uni-primary);
+		@include is-plain($uni-primary)
+	}
+	&[type=success] {
+		@include is-color($uni-success);
+		@include is-plain($uni-success)
+	}
+	&[type=error] {
+		@include is-color($uni-error);
+		@include is-plain($uni-error)
+	}
+	&[type=warning] {
+		@include is-color($uni-warning);
+		@include is-plain($uni-warning)
+	}
+	&[type=info] {
+		@include is-color($uni-info);
+		@include is-plain($uni-info)
+	}
+}
+/* #endif */

+ 24 - 0
uni_modules/uni-scss/styles/setting/_text.scss

@@ -0,0 +1,24 @@
+@mixin get-styles($k,$c) {
+	@if $k == size or $k == weight{
+		font-#{$k}:#{$c}
+	}@else{
+		#{$k}:#{$c}
+	}
+}
+
+@each $key, $child in $uni-headings {
+	/* #ifndef APP-NVUE */
+	.uni-#{$key} {
+		@each $k, $c in $child {
+			@include get-styles($k,$c)
+		}
+	}
+	/* #endif */
+	/* #ifdef APP-NVUE */
+	.container .uni-#{$key} {
+		@each $k, $c in $child {
+			@include get-styles($k,$c)
+		}
+	}
+	/* #endif */
+}

+ 146 - 0
uni_modules/uni-scss/styles/setting/_variables.scss

@@ -0,0 +1,146 @@
+// @use "sass:math";
+@import  '../tools/functions.scss';
+// 间距基础倍数
+$uni-space-root: 2 !default;
+// 边框半径默认值
+$uni-radius-root:5px !default;
+$uni-radius: () !default;
+// 边框半径断点
+$uni-radius: map-deep-merge(
+  (
+    0: 0,
+		// TODO 当前版本暂时不支持 sm 属性
+    // 'sm': math.div($uni-radius-root, 2),
+    null: $uni-radius-root,
+    'lg': $uni-radius-root * 2,
+    'xl': $uni-radius-root * 6,
+    'pill': 9999px,
+    'circle': 50%
+  ),
+  $uni-radius
+);
+// 字体家族
+$body-font-family: 'Roboto', sans-serif !default;
+// 文本
+$heading-font-family: $body-font-family !default;
+$uni-headings: () !default;
+$letterSpacing: -0.01562em;
+$uni-headings: map-deep-merge(
+  (
+    'h1': (
+      size: 32px,
+			weight: 300,
+			line-height: 50px,
+			// letter-spacing:-0.01562em
+    ),
+    'h2': (
+      size: 28px,
+      weight: 300,
+      line-height: 40px,
+      // letter-spacing: -0.00833em
+    ),
+    'h3': (
+      size: 24px,
+      weight: 400,
+      line-height: 32px,
+      // letter-spacing: normal
+    ),
+    'h4': (
+      size: 20px,
+      weight: 400,
+      line-height: 30px,
+      // letter-spacing: 0.00735em
+    ),
+    'h5': (
+      size: 16px,
+      weight: 400,
+      line-height: 24px,
+      // letter-spacing: normal
+    ),
+    'h6': (
+      size: 14px,
+      weight: 500,
+      line-height: 18px,
+      // letter-spacing: 0.0125em
+    ),
+    'subtitle': (
+      size: 12px,
+      weight: 400,
+      line-height: 20px,
+      // letter-spacing: 0.00937em
+    ),
+    'body': (
+      font-size: 14px,
+			font-weight: 400,
+			line-height: 22px,
+			// letter-spacing: 0.03125em
+    ),
+    'caption': (
+      'size': 12px,
+      'weight': 400,
+      'line-height': 20px,
+      // 'letter-spacing': 0.03333em,
+      // 'text-transform': false
+    )
+  ),
+  $uni-headings
+);
+
+
+
+// 主色
+$uni-primary: #2979ff !default;
+$uni-primary-disable:lighten($uni-primary,20%) !default;
+$uni-primary-light: lighten($uni-primary,25%) !default;
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37 !default;
+$uni-success-disable:lighten($uni-success,20%) !default;
+$uni-success-light: lighten($uni-success,25%) !default;
+
+$uni-warning: #f3a73f !default;
+$uni-warning-disable:lighten($uni-warning,20%) !default;
+$uni-warning-light: lighten($uni-warning,25%) !default;
+
+$uni-error: #e43d33 !default;
+$uni-error-disable:lighten($uni-error,20%) !default;
+$uni-error-light: lighten($uni-error,25%) !default;
+
+$uni-info: #8f939c !default;
+$uni-info-disable:lighten($uni-info,20%) !default;
+$uni-info-light: lighten($uni-info,25%) !default;
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a !default; 			// 主要文字
+$uni-base-color: #6a6a6a !default;			// 常规文字
+$uni-secondary-color: #909399 !default;	// 次要文字
+$uni-extra-color: #c7c7c7 !default;			// 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0 !default;
+$uni-border-2: #EDEDED !default;
+$uni-border-3: #DCDCDC !default;
+$uni-border-4: #B9B9B9 !default;
+
+// 常规色
+$uni-black: #000000 !default;
+$uni-white: #ffffff !default;
+$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
+
+// 背景色
+$uni-bg-color: #f7f7f7 !default;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px !default;
+$uni-spacing-base: 15px !default;
+$uni-spacing-lg: 30px !default;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;

+ 19 - 0
uni_modules/uni-scss/styles/tools/functions.scss

@@ -0,0 +1,19 @@
+// 合并 map
+@function map-deep-merge($parent-map, $child-map){
+	$result: $parent-map;
+	@each $key, $child in $child-map {
+		$parent-has-key: map-has-key($result, $key);
+		$parent-value: map-get($result, $key);
+		$parent-type: type-of($parent-value);
+		$child-type: type-of($child);
+		$parent-is-map: $parent-type == map;
+		$child-is-map: $child-type == map;
+			
+		@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
+			$result: map-merge($result, ( $key: $child ));
+		}@else {
+			$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
+		}
+	}
+	@return $result;
+};

+ 31 - 0
uni_modules/uni-scss/theme.scss

@@ -0,0 +1,31 @@
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+// 主色
+$uni-primary: #2979ff;
+// 辅助色
+$uni-success: #4cd964;
+// 警告色
+$uni-warning: #f0ad4e;
+// 错误色
+$uni-error: #dd524d;
+// 描述色
+$uni-info: #909399;
+// 中性色
+$uni-main-color: #303133;
+$uni-base-color: #606266;
+$uni-secondary-color: #909399;
+$uni-extra-color: #C0C4CC;
+// 背景色
+$uni-bg-color: #f5f5f5;
+// 边框颜色
+$uni-border-1: #DCDFE6;
+$uni-border-2: #E4E7ED;
+$uni-border-3: #EBEEF5;
+$uni-border-4: #F2F6FC;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);

+ 62 - 0
uni_modules/uni-scss/variables.scss

@@ -0,0 +1,62 @@
+@import './styles/setting/_variables.scss';
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+
+// 主色
+$uni-primary: #2979ff;
+$uni-primary-disable:mix(#fff,$uni-primary,50%);
+$uni-primary-light: mix(#fff,$uni-primary,80%);
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37;
+$uni-success-disable:mix(#fff,$uni-success,50%);
+$uni-success-light: mix(#fff,$uni-success,80%);
+
+$uni-warning: #f3a73f;
+$uni-warning-disable:mix(#fff,$uni-warning,50%);
+$uni-warning-light: mix(#fff,$uni-warning,80%);
+
+$uni-error: #e43d33;
+$uni-error-disable:mix(#fff,$uni-error,50%);
+$uni-error-light: mix(#fff,$uni-error,80%);
+
+$uni-info: #8f939c;
+$uni-info-disable:mix(#fff,$uni-info,50%);
+$uni-info-light: mix(#fff,$uni-info,80%);
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a; 			// 主要文字
+$uni-base-color: #6a6a6a;			// 常规文字
+$uni-secondary-color: #909399;	// 次要文字
+$uni-extra-color: #c7c7c7;			// 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0;
+$uni-border-2: #EDEDED;
+$uni-border-3: #DCDCDC;
+$uni-border-4: #B9B9B9;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
+
+// 背景色
+$uni-bg-color: #f7f7f7;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px;
+$uni-spacing-base: 15px;
+$uni-spacing-lg: 30px;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4);

+ 29 - 0
uni_modules/uni-transition/changelog.md

@@ -0,0 +1,29 @@
+## 1.3.5(2025-06-11)
+- 修复 第一次执行不显示动画的问题
+## 1.3.4(2025-04-16)
+- 修复 页面数据更新到底动画复原的问题
+- 修复 示例页面打开报错的问题
+## 1.3.3(2024-04-23)
+- 修复 当元素会受变量影响自动隐藏的bug
+## 1.3.2(2023-05-04)
+- 修复 NVUE 平台报错的问题
+## 1.3.1(2021-11-23)
+- 修复 init 方法初始化问题
+## 1.3.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
+## 1.2.1(2021-09-27)
+- 修复 init 方法不生效的 Bug
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.1(2021-05-12)
+- 新增 示例地址
+- 修复 示例项目缺少组件的 Bug
+## 1.1.0(2021-04-22)
+- 新增 通过方法自定义动画
+- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
+- 优化 动画触发逻辑,使动画更流畅
+- 优化 支持单独的动画类型
+- 优化 文档示例
+## 1.0.2(2021-02-05)
+- 调整为 uni_modules 目录规范

+ 131 - 0
uni_modules/uni-transition/components/uni-transition/createAnimation.js

@@ -0,0 +1,131 @@
+// const defaultOption = {
+// 	duration: 300,
+// 	timingFunction: 'linear',
+// 	delay: 0,
+// 	transformOrigin: '50% 50% 0'
+// }
+// #ifdef APP-NVUE
+const nvueAnimation = uni.requireNativePlugin('animation')
+// #endif
+class MPAnimation {
+	constructor(options, _this) {
+		this.options = options
+		// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
+		this.animation = uni.createAnimation({
+			...options
+		})
+		this.currentStepAnimates = {}
+		this.next = 0
+		this.$ = _this
+
+	}
+
+	_nvuePushAnimates(type, args) {
+		let aniObj = this.currentStepAnimates[this.next]
+		let styles = {}
+		if (!aniObj) {
+			styles = {
+				styles: {},
+				config: {}
+			}
+		} else {
+			styles = aniObj
+		}
+		if (animateTypes1.includes(type)) {
+			if (!styles.styles.transform) {
+				styles.styles.transform = ''
+			}
+			let unit = ''
+			if(type === 'rotate'){
+				unit = 'deg'
+			}
+			styles.styles.transform += `${type}(${args+unit}) `
+		} else {
+			styles.styles[type] = `${args}`
+		}
+		this.currentStepAnimates[this.next] = styles
+	}
+	_animateRun(styles = {}, config = {}) {
+		let ref = this.$.$refs['ani'].ref
+		if (!ref) return
+		return new Promise((resolve, reject) => {
+			nvueAnimation.transition(ref, {
+				styles,
+				...config
+			}, res => {
+				resolve()
+			})
+		})
+	}
+
+	_nvueNextAnimate(animates, step = 0, fn) {
+		let obj = animates[step]
+		if (obj) {
+			let {
+				styles,
+				config
+			} = obj
+			this._animateRun(styles, config).then(() => {
+				step += 1
+				this._nvueNextAnimate(animates, step, fn)
+			})
+		} else {
+			this.currentStepAnimates = {}
+			typeof fn === 'function' && fn()
+			this.isEnd = true
+		}
+	}
+
+	step(config = {}) {
+		// #ifndef APP-NVUE
+		this.animation.step(config)
+		// #endif
+		// #ifdef APP-NVUE
+		this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config)
+		this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin
+		this.next++
+		// #endif
+		return this
+	}
+
+	run(fn) {
+		// #ifndef APP-NVUE
+		this.$.animationData = this.animation.export()
+		this.$.timer = setTimeout(() => {
+			typeof fn === 'function' && fn()
+		}, this.$.durationTime)
+		// #endif
+		// #ifdef APP-NVUE
+		this.isEnd = false
+		let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref
+		if(!ref) return
+		this._nvueNextAnimate(this.currentStepAnimates, 0, fn)
+		this.next = 0
+		// #endif
+	}
+}
+
+
+const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
+	'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
+	'translateZ'
+]
+const animateTypes2 = ['opacity', 'backgroundColor']
+const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']
+animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => {
+	MPAnimation.prototype[type] = function(...args) {
+		// #ifndef APP-NVUE
+		this.animation[type](...args)
+		// #endif
+		// #ifdef APP-NVUE
+		this._nvuePushAnimates(type, args)
+		// #endif
+		return this
+	}
+})
+
+export function createAnimation(option, _this) {
+	if(!_this) return
+	clearTimeout(_this.timer)
+	return new MPAnimation(option, _this)
+}

+ 286 - 0
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@@ -0,0 +1,286 @@
+<template>
+	<!-- #ifndef APP-NVUE -->
+	<view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick">
+		<slot></slot>
+	</view>
+	<!-- #endif -->
+	<!-- #ifdef APP-NVUE -->
+	<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick">
+		<slot></slot>
+	</view>
+	<!-- #endif -->
+</template>
+
+<script>
+	import { createAnimation } from './createAnimation'
+
+	/**
+	 * Transition 过渡动画
+	 * @description 简单过渡动画组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=985
+	 * @property {Boolean} show = [false|true] 控制组件显示或隐藏
+	 * @property {Array|String} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
+	 *  @value fade 渐隐渐出过渡
+	 *  @value slide-top 由上至下过渡
+	 *  @value slide-right 由右至左过渡
+	 *  @value slide-bottom 由下至上过渡
+	 *  @value slide-left 由左至右过渡
+	 *  @value zoom-in 由小到大过渡
+	 *  @value zoom-out 由大到小过渡
+	 * @property {Number} duration 过渡动画持续时间
+	 * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+	 */
+	export default {
+		name: 'uniTransition',
+		emits: ['click', 'change'],
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			modeClass: {
+				type: [Array, String],
+				default () {
+					return 'fade'
+				}
+			},
+			duration: {
+				type: Number,
+				default: 300
+			},
+			styles: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			customClass: {
+				type: String,
+				default: ''
+			},
+			onceRender: {
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {
+				isShow: false,
+				transform: '',
+				opacity: 0,
+				animationData: {},
+				durationTime: 300,
+				config: {}
+			}
+		},
+		watch: {
+			show: {
+				handler(newVal) {
+					if (newVal) {
+						this.open()
+					} else {
+						// 避免上来就执行 close,导致动画错乱
+						if (this.isShow) {
+							this.close()
+						}
+					}
+				},
+				immediate: true
+			}
+		},
+		computed: {
+			// 生成样式数据
+			stylesObject() {
+				let styles = {
+					...this.styles,
+					'transition-duration': this.duration / 1000 + 's'
+				}
+				let transform = ''
+				for (let i in styles) {
+					let line = this.toLine(i)
+					transform += line + ':' + styles[i] + ';'
+				}
+				return transform
+			},
+			// 初始化动画条件
+			transformStyles() {
+				return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject
+			}
+		},
+		created() {
+			// 动画默认配置
+			this.config = {
+				duration: this.duration,
+				timingFunction: 'ease',
+				transformOrigin: '50% 50%',
+				delay: 0
+			}
+			this.durationTime = this.duration
+		},
+		methods: {
+			/**
+			 *  ref 触发 初始化动画
+			 */
+			init(obj = {}) {
+				if (obj.duration) {
+					this.durationTime = obj.duration
+				}
+				this.animation = createAnimation(Object.assign(this.config, obj), this)
+			},
+			/**
+			 * 点击组件触发回调
+			 */
+			onClick() {
+				this.$emit('click', {
+					detail: this.isShow
+				})
+			},
+			/**
+			 * ref 触发 动画分组
+			 * @param {Object} obj
+			 */
+			step(obj, config = {}) {
+				if (!this.animation) return this
+				Object.keys(obj).forEach(key => {
+					const value = obj[key]
+					if (typeof this.animation[key] === 'function') {
+						Array.isArray(value) ?
+							this.animation[key](...value) :
+							this.animation[key](value)
+					}
+				})
+				this.animation.step(config)
+				return this
+			},
+			/**
+			 *  ref 触发 执行动画
+			 */
+			run(fn) {
+				if (!this.animation) return
+				this.animation.run(fn)
+			},
+			// 开始过度动画
+			open() {
+				clearTimeout(this.timer)
+				this.isShow = true
+				// 新增初始状态重置逻辑(关键)
+				this.transform = this.styleInit(false).transform || ''
+				this.opacity = this.styleInit(false).opacity || 0
+
+				// 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
+				this.$nextTick(() => {
+					// TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
+					this.timer = setTimeout(() => {
+						this.animation = createAnimation(this.config, this)
+						this.tranfromInit(false).step()
+						this.animation.run(() => {
+							this.transform = ''
+							this.opacity = this.styleInit(false).opacity || 1
+							this.$emit('change', {
+								detail: this.isShow
+							})
+						})
+					}, 80)
+				})
+			},
+			// 关闭过度动画
+			close(type) {
+				if (!this.animation) return
+				this.tranfromInit(true)
+					.step()
+					.run(() => {
+						this.isShow = false
+						this.animationData = null
+						this.animation = null
+						let { opacity, transform } = this.styleInit(false)
+						this.opacity = opacity || 1
+						this.transform = transform
+						this.$emit('change', {
+							detail: this.isShow
+						})
+					})
+			},
+			// 处理动画开始前的默认样式
+			styleInit(type) {
+				let styles = { transform: '', opacity: 1 }
+				const buildStyle = (type, mode) => {
+					const value = this.animationType(type)[mode] // 直接使用 type 控制状态
+					if (mode.startsWith('fade')) {
+						styles.opacity = value
+					} else {
+						styles.transform += value + ' '
+					}
+				}
+
+				if (typeof this.modeClass === 'string') {
+					buildStyle(type, this.modeClass)
+				} else {
+					this.modeClass.forEach(mode => buildStyle(type, mode))
+				}
+				return styles
+			},
+			// 处理内置组合动画
+			tranfromInit(type) {
+				let buildTranfrom = (type, mode) => {
+					let aniNum = null
+					if (mode === 'fade') {
+						aniNum = type ? 0 : 1
+					} else {
+						aniNum = type ? '-100%' : '0'
+						if (mode === 'zoom-in') {
+							aniNum = type ? 0.8 : 1
+						}
+						if (mode === 'zoom-out') {
+							aniNum = type ? 1.2 : 1
+						}
+						if (mode === 'slide-right') {
+							aniNum = type ? '100%' : '0'
+						}
+						if (mode === 'slide-bottom') {
+							aniNum = type ? '100%' : '0'
+						}
+					}
+					this.animation[this.animationMode()[mode]](aniNum)
+				}
+				if (typeof this.modeClass === 'string') {
+					buildTranfrom(type, this.modeClass)
+				} else {
+					this.modeClass.forEach(mode => {
+						buildTranfrom(type, mode)
+					})
+				}
+
+				return this.animation
+			},
+			animationType(type) {
+				return {
+					fade: type ? 1 : 0,
+					'slide-top': `translateY(${type ? '0' : '-100%'})`,
+					'slide-right': `translateX(${type ? '0' : '100%'})`,
+					'slide-bottom': `translateY(${type ? '0' : '100%'})`,
+					'slide-left': `translateX(${type ? '0' : '-100%'})`,
+					'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
+					'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
+				}
+			},
+			// 内置动画类型与实际动画对应字典
+			animationMode() {
+				return {
+					fade: 'opacity',
+					'slide-top': 'translateY',
+					'slide-right': 'translateX',
+					'slide-bottom': 'translateY',
+					'slide-left': 'translateX',
+					'zoom-in': 'scale',
+					'zoom-out': 'scale'
+				}
+			},
+			// 驼峰转中横线
+			toLine(name) {
+				return name.replace(/([A-Z])/g, '-$1').toLowerCase()
+			}
+		}
+	}
+</script>
+
+<style></style>

+ 124 - 0
uni_modules/uni-transition/package.json

@@ -0,0 +1,124 @@
+{
+  "id": "uni-transition",
+  "displayName": "uni-transition 过渡动画",
+  "version": "1.3.5",
+  "description": "元素的简单过渡动画",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "动画",
+    "过渡",
+    "过渡动画"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "",
+    "uni-app": "^4.01",
+    "uni-app-x": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue",
+    "darkmode": "x",
+    "i18n": "x",
+    "widescreen": "x"
+  },
+  "uni_modules": {
+    "dependencies": [
+      "uni-scss"
+    ],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "√",
+        "aliyun": "√",
+        "alipay": "x"
+      },
+      "client": {
+        "uni-app": {
+          "vue": {
+            "vue2": "√",
+            "vue3": "√"
+          },
+          "web": {
+            "safari": "√",
+            "chrome": "√"
+          },
+          "app": {
+            "vue": "√",
+            "nvue": "√",
+            "android": "√",
+            "ios": "√",
+            "harmony": "-"
+          },
+          "mp": {
+            "weixin": {
+                "extVersion": "1.0.2",
+                "minVersion": ""
+            },
+            "alipay": {
+                "extVersion": "1.0.2",
+                "minVersion": ""
+            },
+            "toutiao": {
+                "extVersion": "1.0.2",
+                "minVersion": ""
+            },
+            "baidu": {
+                "extVersion": "1.0.2",
+                "minVersion": ""
+            },
+            "kuaishou": {
+                "extVersion": "1.1.0",
+                "minVersion": ""
+            },
+            "jd": {
+                "extVersion": "1.0.2",
+                "minVersion": ""
+            },
+            "harmony": "x",
+            "qq": "-",
+            "lark": "-"
+          },
+          "quickapp": {
+            "huawei": "-",
+            "union": "-"
+          }
+        },
+        "uni-app-x": {
+          "web": {
+            "safari": "-",
+            "chrome": "-"
+          },
+          "app": {
+            "android": "-",
+            "ios": "-",
+            "harmony": "-"
+          },
+          "mp": {
+            "weixin": "-"
+          }
+        }
+      }
+    }
+  }
+}

+ 11 - 0
uni_modules/uni-transition/readme.md

@@ -0,0 +1,11 @@
+
+
+## Transition 过渡动画
+> **组件名:uni-transition**
+> 代码块: `uTransition`
+
+
+元素过渡动画
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 21 - 0
uni_modules/uview-ui/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 www.uviewui.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 66 - 0
uni_modules/uview-ui/README.md

@@ -0,0 +1,66 @@
+<p align="center">
+    <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
+</p>
+<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView 2.0</h3>
+<h3 align="center">多平台快速开发的UI框架</h3>
+
+[![stars](https://img.shields.io/github/stars/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0)
+[![forks](https://img.shields.io/github/forks/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0)
+[![issues](https://img.shields.io/github/issues/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0/issues)
+[![Website](https://img.shields.io/badge/uView-up-blue?style=flat-square)](https://uviewui.com)
+[![release](https://img.shields.io/github/v/release/umicro/uView2.0?style=flat-square)](https://gitee.com/umicro/uView2.0/releases)
+[![license](https://img.shields.io/github/license/umicro/uView2.0?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
+
+## 说明
+
+uView UI,是[uni-app](https://uniapp.dcloud.io/)全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
+
+## [官方文档:https://uviewui.com](https://uviewui.com)
+
+
+## 预览
+
+您可以通过**微信**扫码,查看最佳的演示效果。
+<br>
+<br>
+<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
+
+
+## 链接
+
+- [官方文档](https://www.uviewui.com/)
+- [更新日志](https://www.uviewui.com/components/changelog.html)
+- [升级指南](https://www.uviewui.com/components/changeGuide.html)
+- [关于我们](https://www.uviewui.com/cooperation/about.html)
+
+## 交流反馈
+
+欢迎加入我们的QQ群交流反馈:[点此跳转](https://www.uviewui.com/components/addQQGroup.html)
+
+## 关于PR
+
+> 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uView2.0是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。
+> 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
+
+## 安装
+
+#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?id=1593](https://ext.dcloud.net.cn/plugin?id=1593)
+
+请通过[官网安装文档](https://www.uviewui.com/components/install.html)了解更详细的内容
+
+## 快速上手
+
+请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
+
+## 使用方法
+配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
+
+```html
+<template>
+	<u-button text="按钮"></u-button>
+</template>
+```
+
+## 版权信息
+uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。
+

+ 376 - 0
uni_modules/uview-ui/changelog.md

@@ -0,0 +1,376 @@
+## 2.0.38(2024-06-12)
+插件市场处理
+## 2.0.37(2024-03-17)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复表单校验`trigger`触发器参数无效问题
+2. 修复`u-input`组件的`password`属性在动态切换为`false`时失效的问题
+3. 添加微信小程序用户同意隐私协议事件回调
+4. 修复支付宝小程序picker样式问题
+5. `u-modal`添加`duration`字段控制动画过度时间
+6. 修复`picker` `lastIndex`异常导致的`column`异常问题
+7. `tabs`增加长按事件支持
+8. 修复`u-avatar` `square`属性在小程序`open-data`下无效问题
+9. 其他一些修复
+## 2.0.36(2023-03-27)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 重构`deepClone` & `deepMerge`方法
+2. 其他优化
+## 2.0.34(2022-09-24)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. `u-input`、`u-textarea`增加`ignoreCompositionEvent`属性
+2. 修复`route`方法调用可能报错的问题
+3. 修复`u-no-network`组件`z-index`无效的问题
+4. 修复`textarea`组件在h5上confirmType=""报错的问题
+5. `u-rate`适配`nvue`
+6. 优化验证手机号码的正则表达式(根据工信部发布的《电信网编号计划(2017年版)》进行修改。)
+7. `form-item`添加`labelPosition`属性
+8. `u-calendar`修复`maxDate`设置为当前日期,并且当前时间大于08:00时无法显示日期列表的问题 (#724)
+9. `u-radio`增加一个默认插槽用于自定义修改label内容 (#680)
+10. 修复`timeFormat`函数在safari重的兼容性问题 (#664)
+## 2.0.33(2022-06-17)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复`loadmore`组件`lineColor`类型错误问题
+2. 修复`u-parse`组件`imgtap`、`linktap`不生效问题
+## 2.0.32(2022-06-16)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+1. `u-loadmore`新增自定义颜色、虚/实线
+2. 修复`u-swiper-action`组件部分平台不能上下滑动的问题
+3. 修复`u-list`回弹问题
+4. 修复`notice-bar`组件动画在低端安卓机可能会抖动的问题
+5. `u-loading-page`添加控制图标大小的属性`iconSize`
+6. 修复`u-tooltip`组件`color`参数不生效的问题
+7. 修复`u--input`组件使用`blur`事件输出为`undefined`的bug
+8. `u-code-input`组件新增键盘弹起时,是否自动上推页面参数`adjustPosition`
+9. 修复`image`组件`load`事件无回调对象问题
+10. 修复`button`组件`loadingSize`设置无效问题
+10. 其他修复
+## 2.0.31(2022-04-19)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复`upload`在`vue`页面上传成功后没有成功标志的问题
+2. 解决演示项目中微信小程序模拟上传图片一直出于上传中问题
+3. 修复`u-code-input`组件在`nvue`页面编译到`app`平台上光标异常问题(`app`去除此功能)
+4. 修复`actionSheet`组件标题关闭按钮点击事件名称错误的问题
+5. 其他修复
+## 2.0.30(2022-04-04)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. `u-rate`增加`readonly`属性
+2. `tabs`滑块支持设置背景图片
+3. 修复`u-subsection` `mode`为`subsection`时,滑块样式不正确的问题
+4. `u-code-input`添加光标效果动画
+5. 修复`popup`的`open`事件不触发
+6. 修复`u-flex-column`无效的问题
+7. 修复`u-datetime-picker`索引在特定场合异常问题
+8. 修复`u-datetime-picker`最小时间字符串模板错误问题
+9. `u-swiper`添加`m3u8`验证
+10. `u-swiper`修改判断image和video逻辑
+11. 修复`swiper`无法使用本地图片问题,增加`type`参数
+12. 修复`u-row-notice`格式错误问题
+13. 修复`u-switch`组件当`unit`为`rpx`时,`nodeStyle`消失的问题
+14. 修复`datetime-picker`组件`showToolbar`与`visibleItemCount`属性无效的问题
+15. 修复`upload`组件条件编译位置判断错误,导致`previewImage`属性设置为`false`时,整个组件都会被隐藏的问题
+16. 修复`u-checkbox-group`设置`shape`属性无效的问题
+17. 修复`u-upload`的`capture`传入字符串的时候不生效的问题
+18. 修复`u-action-sheet`组件,关闭事件逻辑错误的问题
+19. 修复`u-list`触顶事件的触发错误的问题
+20. 修复`u-text`只有手机号可拨打的问题
+21. 修复`u-textarea`不能换行的问题
+22. 其他修复
+## 2.0.29(2022-03-13)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复`u--text`组件设置`decoration`属性未生效的问题
+2. 修复`u-datetime-picker`使用`formatter`后返回值不正确
+3. 修复`u-datetime-picker` `intercept` 可能为undefined
+4. 修复已设置单位 uni..config.unit = 'rpx'时,线型指示器 `transform` 的位置翻倍,导致指示器超出宽度
+5. 修复mixin中bem方法生成的类名在支付宝和字节小程序中失效
+6. 修复默认值传值为空的时候,打开`u-datetime-picker`报错,不能选中第一列时间的bug
+7. 修复`u-datetime-picker`使用`formatter`后返回值不正确
+8. 修复`u-image`组件`loading`无效果的问题
+9. 修复`config.unit`属性设为`rpx`时,导航栏占用高度不足导致塌陷的问题
+10. 修复`u-datetime-picker`组件`itemHeight`无效问题
+11. 其他修复
+## 2.0.28(2022-02-22)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. search组件新增searchIconSize属性
+2. 兼容Safari/Webkit中传入时间格式如2022-02-17 12:00:56
+3. 修复text value.js 判断日期出format错误问题
+4. priceFormat格式化金额出现精度错误
+5. priceFormat在部分情况下出现精度损失问题
+6. 优化表单rules提示
+7. 修复avatar组件src为空时,展示状态不对
+8. 其他修复
+## 2.0.27(2022-01-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1.样式修复
+## 2.0.26(2022-01-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1.样式修复
+## 2.0.25(2022-01-27)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复text组件mode=price时,可能会导致精度错误的问题
+2. 添加$u.setConfig()方法,可设置uView内置的config, props, zIndex, color属性,详见:[修改uView内置配置方案](https://uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE)
+3. 优化form组件在errorType=toast时,如果输入错误页面会有抖动的问题
+4. 修复$u.addUnit()对配置默认单位可能无效的问题
+## 2.0.24(2022-01-25)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复swiper在current指定非0时缩放有误
+2. 修复u-icon添加stop属性的时候报错
+3. 优化遗留的通过正则判断rpx单位的问题
+4. 优化Layout布局 vue使用gutter时,会超出固定区域
+5. 优化search组件高度单位问题(rpx -> px)
+6. 修复u-image slot 加载和错误的图片失去了高度
+7. 修复u-index-list中footer插槽与header插槽存在性判断错误
+8. 修复部分机型下u-popup关闭时会闪烁
+9. 修复u-image在nvue-app下失去宽高
+10. 修复u-popup运行报错
+11. 修复u-tooltip报错
+12. 修复box-sizing在app下的警告
+13. 修复u-navbar在小程序中报运行时错误
+14. 其他修复
+## 2.0.23(2022-01-24)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复image组件在hx3.3.9的nvue下可能会显示异常的问题
+2. 修复col组件gutter参数带rpx单位处理不正确的问题
+3. 修复text组件单行时无法显示省略号的问题
+4. navbar添加titleStyle参数
+5. 升级到hx3.3.9可消除nvue下控制台样式警告的问题
+## 2.0.22(2022-01-19)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. $u.page()方法优化,避免在特殊场景可能报错的问题
+2. picker组件添加immediateChange参数
+3. 新增$u.pages()方法
+## 2.0.21(2022-01-19)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化:form组件在用户设置rules的时候提示用户model必传
+2. 优化遗留的通过正则判断rpx单位的问题
+3. 修复微信小程序环境中tabbar组件开启safeAreaInsetBottom属性后,placeholder高度填充不正确
+4. 修复swiper在current指定非0时缩放有误
+5. 修复u-icon添加stop属性的时候报错
+6. 修复upload组件在accept=all的时候没有作用
+7. 修复在text组件mode为phone时call属性无效的问题
+8. 处理u-form clearValidate方法
+9. 其他修复
+## 2.0.20(2022-01-14)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复calendar默认会选择一个日期,如果直接点确定的话,无法取到值的问题
+2. 修复Slider缺少disabled props 还有注释
+3. 修复u-notice-bar点击事件无法拿到index索引值的问题
+4. 修复u-collapse-item在vue文件下,app端自定义插槽不生效的问题
+5. 优化头像为空时显示默认头像 
+6. 修复图片地址赋值后判断加载状态为完成问题
+7. 修复日历滚动到默认日期月份区域
+8. search组件暴露点击左边icon事件
+9. 修复u-form clearValidate方法不生效
+10. upload h5端增加返回文件参数(文件的name参数)
+11. 处理upload选择文件后url为blob类型无法预览的问题
+12. u-code-input 修复输入框没有往左移出一半屏幕
+13. 修复Upload上传 disabled为true时,控制台报hoverClass类型错误
+14. 临时处理ios app下grid点击坍塌问题
+15. 其他修复
+## 2.0.19(2021-12-29)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化微信小程序包体积可在微信中预览,请升级HbuilderX3.3.4,同时在“运行->运行到小程序模拟器”中勾选“运行时是否压缩代码”
+2. 优化微信小程序setData性能,处理某些方法如$u.route()无法在模板中使用的问题
+3. navbar添加autoBack参数
+4. 允许avatar组件的事件冒泡
+5. 修复cell组件报错问题
+6. 其他修复
+## 2.0.18(2021-12-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复app端编译报错问题
+2. 重新处理微信小程序端setData过大的性能问题
+3. 修复边框问题
+4. 修复最大最小月份不大于0则没有数据出现的问题
+5. 修复SwipeAction微信小程序端无法上下滑动问题
+6. 修复input的placeholder在小程序端默认显示为true问题
+7. 修复divider组件click事件无效问题
+8. 修复u-code-input maxlength 属性值为 String 类型时显示异常
+9. 修复当 grid只有 1到2时 在小程序端algin设置无效的问题
+10. 处理form-item的label为top时,取消错误提示的左边距
+11. 其他修复
+## 2.0.17(2021-12-26)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 解决HBuilderX3.3.3.20211225版本导致的样式问题
+2. calendar日历添加monthNum参数
+3. navbar添加center slot
+## 2.0.16(2021-12-25)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 解决微信小程序setData性能问题
+2. 修复count-down组件change事件不触发问题
+## 2.0.15(2021-12-21)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复Cell单元格titleWidth无效
+2. 修复cheakbox组件ischecked不更新
+3. 修复keyboard是否显示"."按键默认值问题
+4. 修复number-keyboard是否显示键盘的"."符号问题
+5. 修复Input输入框 readonly无效
+6. 修复u-avatar 导致打包app、H5时候报错问题
+7. 修复Upload上传deletable无效
+8. 修复upload当设置maxSize时无效的问题
+9. 修复tabs lineWidth传入带单位的字符串的时候偏移量计算错误问题
+10. 修复rate组件在有padding的view内,显示的星星位置和可触摸区域不匹配,无法正常选中星星
+## 2.0.13(2021-12-14)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复配置默认单位为rpx可能会导致自定义导航栏高度异常的问题
+## 2.0.12(2021-12-14)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复tabs组件在vue环境下划线消失的问题
+2. 修复upload组件在安卓小程序无法选择视频的问题
+3. 添加uni.$u.config.unit配置,用于配置参数默认单位,详见:[默认单位配置](https://www.uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE)
+4. 修复textarea组件在没绑定v-model时,字符统计不生效问题
+5. 修复nvue下控制是否出现滚动条失效问题
+## 2.0.11(2021-12-13)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. text组件align参数无效的问题
+2. subsection组件添加keyName参数
+3. upload组件无法判断[Object file]类型的问题
+4. 处理notify层级过低问题
+5. codeInput组件添加disabledDot参数
+6. 处理actionSheet组件round参数无效的问题
+7. calendar组件添加round参数用于控制圆角值
+8. 处理swipeAction组件在vue环境下默认被打开的问题
+9. button组件的throttleTime节流参数无效的问题
+10. 解决u-notify手动关闭方法close()无效的问题
+11. input组件readonly不生效问题
+12. tag组件type参数为info不生效问题
+## 2.0.10(2021-12-08)
+## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复button sendMessagePath属性不生效
+2. 修复DatetimePicker选择器title无效
+3. 修复u-toast设置loading=true不生效
+4. 修复u-text金额模式传0报错
+5. 修复u-toast组件的icon属性配置不生效
+6. button的icon在特殊场景下的颜色优化
+7. IndexList优化,增加#
+## 2.0.9(2021-12-01)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化swiper的height支持100%值(仅vue有效),修复嵌入视频时click事件无法触发的问题
+2. 优化tabs组件对list值为空的判断,或者动态变化list时重新计算相关尺寸的问题
+3. 优化datetime-picker组件逻辑,让其后续打开的默认值为上一次的选中值,需要通过v-model绑定值才有效
+4. 修复upload内嵌在其他组件中,选择图片可能不会换行的问题
+## 2.0.8(2021-12-01)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复toast的position参数无效问题
+2. 处理input在ios nvue上无法获得焦点的问题
+3. avatar-group组件添加extraValue参数,让剩余展示数量可手动控制
+4. tabs组件添加keyName参数用于配置从对象中读取的键名
+5. 处理text组件名字脱敏默认配置无效的问题
+6. 处理picker组件item文本太长换行问题
+## 2.0.7(2021-11-30)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复radio和checkbox动态改变v-model无效的问题。
+2. 优化form规则validator在微信小程序用法
+3. 修复backtop组件mode参数在微信小程序无效的问题
+4. 处理Album的previewFullImage属性无效的问题
+5. 处理u-datetime-picker组件mode='time'在选择改变时间时,控制台报错的问题
+## 2.0.6(2021-11-27)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 处理tag组件在vue下边框无效的问题。
+2. 处理popup组件圆角参数可能无效的问题。
+3. 处理tabs组件lineColor参数可能无效的问题。
+4. propgress组件在值很小时,显示异常的问题。
+## 2.0.5(2021-11-25)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. calendar在vue下显示异常问题。 
+2. form组件labelPosition和errorType参数无效的问题
+3. input组件inputAlign无效的问题
+4. 其他一些修复
+## 2.0.4(2021-11-23)
+## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+0. input组件缺失@confirm事件,以及subfix和prefix无效问题
+1. component.scss文件样式在vue下干扰全局布局问题
+2. 修复subsection在vue环境下表现异常的问题
+3. tag组件的bgColor等参数无效的问题
+4. upload组件不换行的问题
+5. 其他的一些修复处理
+## 2.0.3(2021-11-16)
+## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. uView2.0已实现全面兼容nvue
+2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升
+3. 目前uView2.0为公测阶段,相关细节可能会有变动
+4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html)
+5. 处理modal的confirm回调事件拼写错误问题
+6. 处理input组件@input事件参数错误问题
+7. 其他一些修复
+## 2.0.2(2021-11-16)
+## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. uView2.0已实现全面兼容nvue
+2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升
+3. 目前uView2.0为公测阶段,相关细节可能会有变动
+4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html)
+5. 修复input组件formatter参数缺失问题
+6. 优化loading-icon组件的scss写法问题,防止不兼容新版本scss
+## 2.0.0(2020-11-15)
+## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. uView2.0已实现全面兼容nvue
+2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升
+3. 目前uView2.0为公测阶段,相关细节可能会有变动
+4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html)
+5. 修复input组件formatter参数缺失问题
+
+

+ 78 - 0
uni_modules/uview-ui/components/u--form/u--form.vue

@@ -0,0 +1,78 @@
+<template>
+	<uvForm
+		ref="uForm"
+		:model="model"
+		:rules="rules"
+		:errorType="errorType"
+		:borderBottom="borderBottom"
+		:labelPosition="labelPosition"
+		:labelWidth="labelWidth"
+		:labelAlign="labelAlign"
+		:labelStyle="labelStyle"
+		:customStyle="customStyle"
+	>
+		<slot />
+	</uvForm>
+</template>
+
+<script>
+	/**
+	 * 此组件存在的理由是,在nvue下,u-form被uni-app官方占用了,u-form在nvue中相当于form组件
+	 * 所以在nvue下,取名为u--form,内部其实还是u-form.vue,只不过做一层中转
+	 */
+	import uvForm from '../u-form/u-form.vue';
+	import props from '../u-form/props.js'
+	export default {
+		// #ifdef MP-WEIXIN
+		name: 'u-form',
+		// #endif
+		// #ifndef MP-WEIXIN
+		name: 'u--form',
+		// #endif
+		mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+		components: {
+			uvForm
+		},
+		created() {
+			this.children = []
+		},
+		methods: {
+			// 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
+			setRules(rules) {
+				this.$refs.uForm.setRules(rules)
+			},
+			validate() {
+				/**
+				 * 在微信小程序中,通过this.$parent拿到的父组件是u--form,而不是其内嵌的u-form
+				 * 导致在u-form组件中,拿不到对应的children数组,从而校验无效,所以这里每次调用u-form组件中的
+				 * 对应方法的时候,在小程序中都先将u--form的children赋值给u-form中的children
+				 */
+				// #ifdef MP-WEIXIN
+				this.setMpData()
+				// #endif
+				return this.$refs.uForm.validate()
+			},
+			validateField(value, callback, event) {
+				// #ifdef MP-WEIXIN
+				this.setMpData()
+				// #endif
+				return this.$refs.uForm.validateField(value, callback, event)
+			},
+			resetFields() {
+				// #ifdef MP-WEIXIN
+				this.setMpData()
+				// #endif
+				return this.$refs.uForm.resetFields()
+			},
+			clearValidate(props) {
+				// #ifdef MP-WEIXIN
+				this.setMpData()
+				// #endif
+				return this.$refs.uForm.clearValidate(props)
+			},
+			setMpData() {
+				this.$refs.uForm.children = this.children
+			}
+		},
+	}
+</script>

+ 47 - 0
uni_modules/uview-ui/components/u--image/u--image.vue

@@ -0,0 +1,47 @@
+<template>
+	<uvImage 
+		:src="src"
+		:mode="mode"
+		:width="width"
+		:height="height"
+		:shape="shape"
+		:radius="radius"
+		:lazyLoad="lazyLoad"
+		:showMenuByLongpress="showMenuByLongpress"
+		:loadingIcon="loadingIcon"
+		:errorIcon="errorIcon"
+		:showLoading="showLoading"
+		:showError="showError"
+		:fade="fade"
+		:webp="webp"
+		:duration="duration"
+		:bgColor="bgColor"
+		:customStyle="customStyle"
+		@click="$emit('click')"
+		@error="$emit('error')"
+		@load="$emit('load')"
+	>
+		<template v-slot:loading>
+			<slot name="loading"></slot>
+		</template>
+		<template v-slot:error>
+			<slot name="error"></slot>
+		</template>
+	</uvImage>
+</template>
+
+<script>
+	/**
+	 * 此组件存在的理由是,在nvue下,u-image被uni-app官方占用了,u-image在nvue中相当于image组件
+	 * 所以在nvue下,取名为u--image,内部其实还是u-iamge.vue,只不过做一层中转
+	 */
+	import uvImage from '../u-image/u-image.vue';
+	import props from '../u-image/props.js';
+	export default {
+		name: 'u--image',
+		mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+		components: {
+			uvImage
+		},
+	}
+</script>

+ 73 - 0
uni_modules/uview-ui/components/u--input/u--input.vue

@@ -0,0 +1,73 @@
+<template>
+	<uvInput 
+		:value="value"
+		:type="type"
+		:fixed="fixed"
+		:disabled="disabled"
+		:disabledColor="disabledColor"
+		:clearable="clearable"
+		:password="password"
+		:maxlength="maxlength"
+		:placeholder="placeholder"
+		:placeholderClass="placeholderClass"
+		:placeholderStyle="placeholderStyle"
+		:showWordLimit="showWordLimit"
+		:confirmType="confirmType"
+		:confirmHold="confirmHold"
+		:holdKeyboard="holdKeyboard"
+		:focus="focus"
+		:autoBlur="autoBlur"
+		:disableDefaultPadding="disableDefaultPadding"
+		:cursor="cursor"
+		:cursorSpacing="cursorSpacing"
+		:selectionStart="selectionStart"
+		:selectionEnd="selectionEnd"
+		:adjustPosition="adjustPosition"
+		:inputAlign="inputAlign"
+		:fontSize="fontSize"
+		:color="color"
+		:prefixIcon="prefixIcon"
+		:suffixIcon="suffixIcon"
+		:suffixIconStyle="suffixIconStyle"
+		:prefixIconStyle="prefixIconStyle"
+		:border="border"
+		:readonly="readonly"
+		:shape="shape"
+		:customStyle="customStyle"
+		:formatter="formatter"
+		:ignoreCompositionEvent="ignoreCompositionEvent"
+		@focus="$emit('focus')"
+		@blur="e => $emit('blur', e)"
+		@keyboardheightchange="$emit('keyboardheightchange')"
+		@change="e => $emit('change', e)"
+		@input="e => $emit('input', e)"
+		@confirm="e => $emit('confirm', e)"
+		@clear="$emit('clear')"
+		@click="$emit('click')"
+	>
+		<!-- #ifdef MP -->
+		<slot name="prefix"></slot>
+		<slot name="suffix"></slot>
+		<!-- #endif -->
+		<!-- #ifndef MP -->
+		<slot name="prefix" slot="prefix"></slot>
+		<slot name="suffix" slot="suffix"></slot>
+		<!-- #endif -->
+	</uvInput>
+</template>
+
+<script>
+	/**
+	 * 此组件存在的理由是,在nvue下,u-input被uni-app官方占用了,u-input在nvue中相当于input组件
+	 * 所以在nvue下,取名为u--input,内部其实还是u-input.vue,只不过做一层中转
+	 */
+	import uvInput from '../u-input/u-input.vue';
+	import props from '../u-input/props.js'
+	export default {
+		name: 'u--input',
+		mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+		components: {
+			uvInput
+		},
+	}
+</script>

+ 44 - 0
uni_modules/uview-ui/components/u--text/u--text.vue

@@ -0,0 +1,44 @@
+<template>
+    <uvText
+        :type="type"
+        :show="show"
+        :text="text"
+        :prefixIcon="prefixIcon"
+        :suffixIcon="suffixIcon"
+        :mode="mode"
+        :href="href"
+        :format="format"
+        :call="call"
+        :openType="openType"
+        :bold="bold"
+        :block="block"
+        :lines="lines"
+        :color="color"
+		:decoration="decoration"
+        :size="size"
+        :iconStyle="iconStyle"
+        :margin="margin"
+        :lineHeight="lineHeight"
+        :align="align"
+        :wordWrap="wordWrap"
+        :customStyle="customStyle"
+        @click="$emit('click')"
+    ></uvText>
+</template>
+
+<script>
+/**
+ * 此组件存在的理由是,在nvue下,u-text被uni-app官方占用了,u-text在nvue中相当于input组件
+ * 所以在nvue下,取名为u--input,内部其实还是u-text.vue,只不过做一层中转
+ * 不使用v-bind="$attrs",而是分开独立写传参,是因为微信小程序不支持此写法
+ */
+import uvText from "../u-text/u-text.vue";
+import props from "../u-text/props.js";
+export default {
+    name: "u--text",
+    mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+    components: {
+        uvText,
+    },
+};
+</script>

+ 48 - 0
uni_modules/uview-ui/components/u--textarea/u--textarea.vue

@@ -0,0 +1,48 @@
+<template>
+	<uvTextarea
+		:value="value"
+		:placeholder="placeholder"
+		:height="height"
+		:confirmType="confirmType"
+		:disabled="disabled"
+		:count="count"
+		:focus="focus"
+		:autoHeight="autoHeight"
+		:fixed="fixed"
+		:cursorSpacing="cursorSpacing"
+		:cursor="cursor"
+		:showConfirmBar="showConfirmBar"
+		:selectionStart="selectionStart"
+		:selectionEnd="selectionEnd"
+		:adjustPosition="adjustPosition"
+		:disableDefaultPadding="disableDefaultPadding"
+		:holdKeyboard="holdKeyboard"
+		:maxlength="maxlength"
+		:border="border"
+		:customStyle="customStyle"
+		:formatter="formatter"
+		:ignoreCompositionEvent="ignoreCompositionEvent"
+		@focus="e => $emit('focus')"
+		@blur="e => $emit('blur')"
+		@linechange="e => $emit('linechange', e)"
+		@confirm="e => $emit('confirm')"
+		@input="e => $emit('input', e)"
+		@keyboardheightchange="e => $emit('keyboardheightchange')"
+	></uvTextarea>
+</template>
+
+<script>
+	/**
+	 * 此组件存在的理由是,在nvue下,u--textarea被uni-app官方占用了,u-textarea在nvue中相当于textarea组件
+	 * 所以在nvue下,取名为u--textarea,内部其实还是u-textarea.vue,只不过做一层中转
+	 */
+	import uvTextarea from '../u-textarea/u-textarea.vue';
+	import props from '../u-textarea/props.js'
+	export default {
+		name: 'u--textarea',
+		mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+		components: {
+			uvTextarea
+		},
+	}
+</script>

+ 54 - 0
uni_modules/uview-ui/components/u-action-sheet/props.js

@@ -0,0 +1,54 @@
+export default {
+    props: {
+        // 操作菜单是否展示 (默认false)
+        show: {
+            type: Boolean,
+            default: uni.$u.props.actionSheet.show
+        },
+        // 标题
+        title: {
+            type: String,
+            default: uni.$u.props.actionSheet.title
+        },
+        // 选项上方的描述信息
+        description: {
+            type: String,
+            default: uni.$u.props.actionSheet.description
+        },
+        // 数据
+        actions: {
+            type: Array,
+            default: uni.$u.props.actionSheet.actions
+        },
+        // 取消按钮的文字,不为空时显示按钮
+        cancelText: {
+            type: String,
+            default: uni.$u.props.actionSheet.cancelText
+        },
+        // 点击某个菜单项时是否关闭弹窗
+        closeOnClickAction: {
+            type: Boolean,
+            default: uni.$u.props.actionSheet.closeOnClickAction
+        },
+        // 处理底部安全区(默认true)
+        safeAreaInsetBottom: {
+            type: Boolean,
+            default: uni.$u.props.actionSheet.safeAreaInsetBottom
+        },
+        // 小程序的打开方式
+        openType: {
+            type: String,
+            default: uni.$u.props.actionSheet.openType
+        },
+        // 点击遮罩是否允许关闭 (默认true)
+        closeOnClickOverlay: {
+            type: Boolean,
+            default: uni.$u.props.actionSheet.closeOnClickOverlay
+        },
+        // 圆角值
+        round: {
+            type: [Boolean, String, Number],
+            default: uni.$u.props.actionSheet.round
+        }
+    }
+}

+ 278 - 0
uni_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue

@@ -0,0 +1,278 @@
+
+<template>
+	<u-popup
+	    :show="show"
+	    mode="bottom"
+	    @close="closeHandler"
+	    :safeAreaInsetBottom="safeAreaInsetBottom"
+	    :round="round"
+	>
+		<view class="u-action-sheet">
+			<view
+			    class="u-action-sheet__header"
+			    v-if="title"
+			>
+				<text class="u-action-sheet__header__title u-line-1">{{title}}</text>
+				<view
+				    class="u-action-sheet__header__icon-wrap"
+				    @tap.stop="cancel"
+				>
+					<u-icon
+					    name="close"
+					    size="17"
+					    color="#c8c9cc"
+					    bold
+					></u-icon>
+				</view>
+			</view>
+			<text
+			    class="u-action-sheet__description"
+				:style="[{
+					marginTop: `${title && description ? 0 : '18px'}`
+				}]"
+			    v-if="description"
+			>{{description}}</text>
+			<slot>
+				<u-line v-if="description"></u-line>
+				<view class="u-action-sheet__item-wrap">
+					<template v-for="(item, index) in actions">
+						<!-- #ifdef MP -->
+						<button
+						    :key="index"
+						    class="u-reset-button"
+						    :openType="item.openType"
+						    @getuserinfo="onGetUserInfo"
+						    @contact="onContact"
+						    @getphonenumber="onGetPhoneNumber"
+						    @error="onError"
+						    @launchapp="onLaunchApp"
+						    @opensetting="onOpenSetting"
+						    :lang="lang"
+						    :session-from="sessionFrom"
+						    :send-message-title="sendMessageTitle"
+						    :send-message-path="sendMessagePath"
+						    :send-message-img="sendMessageImg"
+						    :show-message-card="showMessageCard"
+						    :app-parameter="appParameter"
+						    @tap="selectHandler(index)"
+						    :hover-class="!item.disabled && !item.loading ? 'u-action-sheet--hover' : ''"
+						>
+							<!-- #endif -->
+							<view
+							    class="u-action-sheet__item-wrap__item"
+							    @tap.stop="selectHandler(index)"
+							    :hover-class="!item.disabled && !item.loading ? 'u-action-sheet--hover' : ''"
+							    :hover-stay-time="150"
+							>
+								<template v-if="!item.loading">
+									<text
+									    class="u-action-sheet__item-wrap__item__name"
+									    :style="[itemStyle(index)]"
+									>{{ item.name }}</text>
+									<text
+									    v-if="item.subname"
+									    class="u-action-sheet__item-wrap__item__subname"
+									>{{ item.subname }}</text>
+								</template>
+								<u-loading-icon
+								    v-else
+								    custom-class="van-action-sheet__loading"
+								    size="18"
+								    mode="circle"
+								/>
+							</view>
+							<!-- #ifdef MP -->
+						</button>
+						<!-- #endif -->
+						<u-line v-if="index !== actions.length - 1"></u-line>
+					</template>
+				</view>
+			</slot>
+			<u-gap
+			    bgColor="#eaeaec"
+			    height="6"
+			    v-if="cancelText"
+			></u-gap>
+			<view hover-class="u-action-sheet--hover">
+				<text
+				    @touchmove.stop.prevent
+				    :hover-stay-time="150"
+				    v-if="cancelText"
+				    class="u-action-sheet__cancel-text"
+				    @tap="cancel"
+				>{{cancelText}}</text>
+			</view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	import openType from '../../libs/mixin/openType'
+	import button from '../../libs/mixin/button'
+	import props from './props.js';
+	/**
+	 * ActionSheet 操作菜单
+	 * @description 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
+	 * @tutorial https://www.uviewui.com/components/actionSheet.html
+	 * 
+	 * @property {Boolean}			show				操作菜单是否展示 (默认 false )
+	 * @property {String}			title				操作菜单标题
+	 * @property {String}			description			选项上方的描述信息
+	 * @property {Array<Object>}	actions				按钮的文字数组,见官方文档示例
+	 * @property {String}			cancelText			取消按钮的提示文字,不为空时显示按钮
+	 * @property {Boolean}			closeOnClickAction	点击某个菜单项时是否关闭弹窗 (默认 true )
+	 * @property {Boolean}			safeAreaInsetBottom	处理底部安全区 (默认 true )
+	 * @property {String}			openType			小程序的打开方式 (contact | launchApp | getUserInfo | openSetting |getPhoneNumber |error )
+	 * @property {Boolean}			closeOnClickOverlay	点击遮罩是否允许关闭  (默认 true )
+	 * @property {Number|String}	round				圆角值,默认无圆角  (默认 0 )
+	 * @property {String}			lang				指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文
+	 * @property {String}			sessionFrom			会话来源,openType="contact"时有效
+	 * @property {String}			sendMessageTitle	会话内消息卡片标题,openType="contact"时有效
+	 * @property {String}			sendMessagePath		会话内消息卡片点击跳转小程序路径,openType="contact"时有效
+	 * @property {String}			sendMessageImg		会话内消息卡片图片,openType="contact"时有效
+	 * @property {Boolean}			showMessageCard		是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效 (默认 false )
+	 * @property {String}			appParameter		打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效
+	 * 
+	 * @event {Function} select			点击ActionSheet列表项时触发 
+	 * @event {Function} close			点击取消按钮时触发
+	 * @event {Function} getuserinfo	用户点击该按钮时,会返回获取到的用户信息,回调的 detail 数据与 wx.getUserInfo 返回的一致,openType="getUserInfo"时有效
+	 * @event {Function} contact		客服消息回调,openType="contact"时有效
+	 * @event {Function} getphonenumber	获取用户手机号回调,openType="getPhoneNumber"时有效
+	 * @event {Function} error			当使用开放能力时,发生错误的回调,openType="error"时有效
+	 * @event {Function} launchapp		打开 APP 成功的回调,openType="launchApp"时有效
+	 * @event {Function} opensetting	在打开授权设置页后回调,openType="openSetting"时有效
+	 * @example <u-action-sheet :actions="list" :title="title" :show="show"></u-action-sheet>
+	 */
+	export default {
+		name: "u-action-sheet",
+		// 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
+		mixins: [openType, button, uni.$u.mixin, props],
+		data() {
+			return {
+
+			}
+		},
+		computed: {
+			// 操作项目的样式
+			itemStyle() {
+				return (index) => {
+					let style = {};
+					if (this.actions[index].color) style.color = this.actions[index].color
+					if (this.actions[index].fontSize) style.fontSize = uni.$u.addUnit(this.actions[index].fontSize)
+					// 选项被禁用的样式
+					if (this.actions[index].disabled) style.color = '#c0c4cc'
+					return style;
+				}
+			},
+		},
+		methods: {
+			closeHandler() {
+				// 允许点击遮罩关闭时,才发出close事件
+				if(this.closeOnClickOverlay) {
+					this.$emit('close')
+				}
+			},
+			// 点击取消按钮
+			cancel() {
+				this.$emit('close')
+			},
+			selectHandler(index) {
+				const item = this.actions[index]
+				if (item && !item.disabled && !item.loading) {
+					this.$emit('select', item)
+					if (this.closeOnClickAction) {
+						this.$emit('close')
+					}
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+	$u-action-sheet-reset-button-width:100% !default;
+	$u-action-sheet-title-font-size: 16px !default;
+	$u-action-sheet-title-padding: 12px 30px !default;
+	$u-action-sheet-title-color: $u-main-color !default;
+	$u-action-sheet-header-icon-wrap-right:15px !default;
+	$u-action-sheet-header-icon-wrap-top:15px !default;
+	$u-action-sheet-description-font-size:13px !default;
+	$u-action-sheet-description-color:14px !default;
+	$u-action-sheet-description-margin: 18px 15px !default;
+	$u-action-sheet-item-wrap-item-padding:15px !default;
+	$u-action-sheet-item-wrap-name-font-size:16px !default;
+	$u-action-sheet-item-wrap-subname-font-size:13px !default;
+	$u-action-sheet-item-wrap-subname-color: #c0c4cc !default;
+	$u-action-sheet-item-wrap-subname-margin-top:10px !default;
+	$u-action-sheet-cancel-text-font-size:16px !default;
+	$u-action-sheet-cancel-text-color:$u-content-color !default;
+	$u-action-sheet-cancel-text-font-size:15px !default;
+	$u-action-sheet-cancel-text-hover-background-color:rgb(242, 243, 245) !default;
+
+	.u-reset-button {
+		width: $u-action-sheet-reset-button-width;
+	}
+
+	.u-action-sheet {
+		text-align: center;
+		&__header {
+			position: relative;
+			padding: $u-action-sheet-title-padding;
+			&__title {
+				font-size: $u-action-sheet-title-font-size;
+				color: $u-action-sheet-title-color;
+				font-weight: bold;
+				text-align: center;
+			}
+
+			&__icon-wrap {
+				position: absolute;
+				right: $u-action-sheet-header-icon-wrap-right;
+				top: $u-action-sheet-header-icon-wrap-top;
+			}
+		}
+
+		&__description {
+			font-size: $u-action-sheet-description-font-size;
+			color: $u-tips-color;
+			margin: $u-action-sheet-description-margin;
+			text-align: center;
+		}
+
+		&__item-wrap {
+
+			&__item {
+				padding: $u-action-sheet-item-wrap-item-padding;
+				@include flex;
+				align-items: center;
+				justify-content: center;
+				flex-direction: column;
+
+				&__name {
+					font-size: $u-action-sheet-item-wrap-name-font-size;
+					color: $u-main-color;
+					text-align: center;
+				}
+
+				&__subname {
+					font-size: $u-action-sheet-item-wrap-subname-font-size;
+					color: $u-action-sheet-item-wrap-subname-color;
+					margin-top: $u-action-sheet-item-wrap-subname-margin-top;
+					text-align: center;
+				}
+			}
+		}
+
+		&__cancel-text {
+			font-size: $u-action-sheet-cancel-text-font-size;
+			color: $u-action-sheet-cancel-text-color;
+			text-align: center;
+			padding: $u-action-sheet-cancel-text-font-size;
+		}
+
+		&--hover {
+			background-color: $u-action-sheet-cancel-text-hover-background-color;
+		}
+	}
+</style>

+ 59 - 0
uni_modules/uview-ui/components/u-album/props.js

@@ -0,0 +1,59 @@
+export default {
+    props: {
+        // 图片地址,Array<String>|Array<Object>形式
+        urls: {
+            type: Array,
+            default: uni.$u.props.album.urls
+        },
+        // 指定从数组的对象元素中读取哪个属性作为图片地址
+        keyName: {
+            type: String,
+            default: uni.$u.props.album.keyName
+        },
+        // 单图时,图片长边的长度
+        singleSize: {
+            type: [String, Number],
+            default: uni.$u.props.album.singleSize
+        },
+        // 多图时,图片边长
+        multipleSize: {
+            type: [String, Number],
+            default: uni.$u.props.album.multipleSize
+        },
+        // 多图时,图片水平和垂直之间的间隔
+        space: {
+            type: [String, Number],
+            default: uni.$u.props.album.space
+        },
+        // 单图时,图片缩放裁剪的模式
+        singleMode: {
+            type: String,
+            default: uni.$u.props.album.singleMode
+        },
+        // 多图时,图片缩放裁剪的模式
+        multipleMode: {
+            type: String,
+            default: uni.$u.props.album.multipleMode
+        },
+        // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
+        maxCount: {
+            type: [String, Number],
+            default: uni.$u.props.album.maxCount
+        },
+        // 是否可以预览图片
+        previewFullImage: {
+            type: Boolean,
+            default: uni.$u.props.album.previewFullImage
+        },
+        // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
+        rowCount: {
+            type: [String, Number],
+            default: uni.$u.props.album.rowCount
+        },
+        // 超出maxCount时是否显示查看更多的提示
+        showMore: {
+            type: Boolean,
+            default: uni.$u.props.album.showMore
+        }
+    }
+}

+ 259 - 0
uni_modules/uview-ui/components/u-album/u-album.vue

@@ -0,0 +1,259 @@
+<template>
+    <view class="u-album">
+        <view
+            class="u-album__row"
+            ref="u-album__row"
+            v-for="(arr, index) in showUrls"
+            :forComputedUse="albumWidth"
+            :key="index"
+        >
+            <view
+                class="u-album__row__wrapper"
+                v-for="(item, index1) in arr"
+                :key="index1"
+                :style="[imageStyle(index + 1, index1 + 1)]"
+                @tap="previewFullImage ? onPreviewTap(getSrc(item)) : ''"
+            >
+                <image
+                    :src="getSrc(item)"
+                    :mode="
+                        urls.length === 1
+                            ? imageHeight > 0
+                                ? singleMode
+                                : 'widthFix'
+                            : multipleMode
+                    "
+                    :style="[
+                        {
+                            width: imageWidth,
+                            height: imageHeight
+                        }
+                    ]"
+                ></image>
+                <view
+                    v-if="
+                        showMore &&
+                        urls.length > rowCount * showUrls.length &&
+                        index === showUrls.length - 1 &&
+                        index1 === showUrls[showUrls.length - 1].length - 1
+                    "
+                    class="u-album__row__wrapper__text"
+                >
+                    <u--text
+                        :text="`+${urls.length - maxCount}`"
+                        color="#fff"
+                        :size="multipleSize * 0.3"
+                        align="center"
+                        customStyle="justify-content: center"
+                    ></u--text>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+import props from './props.js'
+// #ifdef APP-NVUE
+// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
+const dom = uni.requireNativePlugin('dom')
+// #endif
+
+/**
+ * Album 相册
+ * @description 本组件提供一个类似相册的功能,让开发者开发起来更加得心应手。减少重复的模板代码
+ * @tutorial https://www.uviewui.com/components/album.html
+ *
+ * @property {Array}           urls             图片地址列表 Array<String>|Array<Object>形式
+ * @property {String}          keyName          指定从数组的对象元素中读取哪个属性作为图片地址
+ * @property {String | Number} singleSize       单图时,图片长边的长度  (默认 180 )
+ * @property {String | Number} multipleSize     多图时,图片边长 (默认 70 )
+ * @property {String | Number} space            多图时,图片水平和垂直之间的间隔 (默认 6 )
+ * @property {String}          singleMode       单图时,图片缩放裁剪的模式 (默认 'scaleToFill' )
+ * @property {String}          multipleMode     多图时,图片缩放裁剪的模式 (默认 'aspectFill' )
+ * @property {String | Number} maxCount         取消按钮的提示文字 (默认 9 )
+ * @property {Boolean}         previewFullImage 是否可以预览图片 (默认 true )
+ * @property {String | Number} rowCount         每行展示图片数量,如设置,singleSize和multipleSize将会无效	(默认 3 )
+ * @property {Boolean}         showMore         超出maxCount时是否显示查看更多的提示 (默认 true )
+ *
+ * @event    {Function}        albumWidth       某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送  (回调参数 width )
+ * @example <u-album :urls="urls2" @albumWidth="width => albumWidth = width" multipleSize="68" ></u-album>
+ */
+export default {
+    name: 'u-album',
+    mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+    data() {
+        return {
+            // 单图的宽度
+            singleWidth: 0,
+            // 单图的高度
+            singleHeight: 0,
+            // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比
+            singlePercent: 0.6
+        }
+    },
+    watch: {
+        urls: {
+            immediate: true,
+            handler(newVal) {
+                if (newVal.length === 1) {
+                    this.getImageRect()
+                }
+            }
+        }
+    },
+    computed: {
+        imageStyle() {
+            return (index1, index2) => {
+                const { space, rowCount, multipleSize, urls } = this,
+                    { addUnit, addStyle } = uni.$u,
+                    rowLen = this.showUrls.length,
+                    allLen = this.urls.length
+                const style = {
+                    marginRight: addUnit(space),
+                    marginBottom: addUnit(space)
+                }
+                // 如果为最后一行,则每个图片都无需下边框
+                if (index1 === rowLen) style.marginBottom = 0
+                // 每行的最右边一张和总长度的最后一张无需右边框
+                if (
+                    index2 === rowCount ||
+                    (index1 === rowLen &&
+                        index2 === this.showUrls[index1 - 1].length)
+                )
+                    style.marginRight = 0
+                return style
+            }
+        },
+        // 将数组划分为二维数组
+        showUrls() {
+            const arr = []
+            this.urls.map((item, index) => {
+                // 限制最大展示数量
+                if (index + 1 <= this.maxCount) {
+                    // 计算该元素为第几个素组内
+                    const itemIndex = Math.floor(index / this.rowCount)
+                    // 判断对应的索引是否存在
+                    if (!arr[itemIndex]) {
+                        arr[itemIndex] = []
+                    }
+                    arr[itemIndex].push(item)
+                }
+            })
+            return arr
+        },
+        imageWidth() {
+            return uni.$u.addUnit(
+                this.urls.length === 1 ? this.singleWidth : this.multipleSize
+            )
+        },
+        imageHeight() {
+            return uni.$u.addUnit(
+                this.urls.length === 1 ? this.singleHeight : this.multipleSize
+            )
+        },
+        // 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度
+        // 因为用户在某些特殊的情况下,需要让文字与相册的宽度相等,所以这里事件的形式对外发送
+        albumWidth() {
+            let width = 0
+            if (this.urls.length === 1) {
+                width = this.singleWidth
+            } else {
+                width =
+                    this.showUrls[0].length * this.multipleSize +
+                    this.space * (this.showUrls[0].length - 1)
+            }
+            this.$emit('albumWidth', width)
+            return width
+        }
+    },
+    methods: {
+        // 预览图片
+        onPreviewTap(url) {
+            const urls = this.urls.map((item) => {
+                return this.getSrc(item)
+            })
+            uni.previewImage({
+                current: url,
+                urls
+            })
+        },
+        // 获取图片的路径
+        getSrc(item) {
+            return uni.$u.test.object(item)
+                ? (this.keyName && item[this.keyName]) || item.src
+                : item
+        },
+        // 单图时,获取图片的尺寸
+        // 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸
+        // 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent)
+        getImageRect() {
+            const src = this.getSrc(this.urls[0])
+            uni.getImageInfo({
+                src,
+                success: (res) => {
+                    // 判断图片横向还是竖向展示方式
+                    const isHorizotal = res.width >= res.height
+                    this.singleWidth = isHorizotal
+                        ? this.singleSize
+                        : (res.width / res.height) * this.singleSize
+                    this.singleHeight = !isHorizotal
+                        ? this.singleSize
+                        : (res.height / res.width) * this.singleWidth
+                },
+                fail: () => {
+                    this.getComponentWidth()
+                }
+            })
+        },
+        // 获取组件的宽度
+        async getComponentWidth() {
+            // 延时一定时间,以获取dom尺寸
+            await uni.$u.sleep(30)
+            // #ifndef APP-NVUE
+            this.$uGetRect('.u-album__row').then((size) => {
+                this.singleWidth = size.width * this.singlePercent
+            })
+            // #endif
+
+            // #ifdef APP-NVUE
+            // 这里ref="u-album__row"所在的标签为通过for循环出来,导致this.$refs['u-album__row']是一个数组
+            const ref = this.$refs['u-album__row'][0]
+            ref &&
+                dom.getComponentRect(ref, (res) => {
+                    this.singleWidth = res.size.width * this.singlePercent
+                })
+            // #endif
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+@import '../../libs/css/components.scss';
+
+.u-album {
+    @include flex(column);
+
+    &__row {
+        @include flex(row);
+        flex-wrap: wrap;
+
+        &__wrapper {
+            position: relative;
+
+            &__text {
+                position: absolute;
+                top: 0;
+                left: 0;
+                right: 0;
+                bottom: 0;
+                background-color: rgba(0, 0, 0, 0.3);
+                @include flex(row);
+                justify-content: center;
+                align-items: center;
+            }
+        }
+    }
+}
+</style>

+ 44 - 0
uni_modules/uview-ui/components/u-alert/props.js

@@ -0,0 +1,44 @@
+export default {
+    props: {
+        // 显示文字
+        title: {
+            type: String,
+            default: uni.$u.props.alert.title
+        },
+        // 主题,success/warning/info/error
+        type: {
+            type: String,
+            default: uni.$u.props.alert.type
+        },
+        // 辅助性文字
+        description: {
+            type: String,
+            default: uni.$u.props.alert.description
+        },
+        // 是否可关闭
+        closable: {
+            type: Boolean,
+            default: uni.$u.props.alert.closable
+        },
+        // 是否显示图标
+        showIcon: {
+            type: Boolean,
+            default: uni.$u.props.alert.showIcon
+        },
+        // 浅或深色调,light-浅色,dark-深色
+        effect: {
+            type: String,
+            default: uni.$u.props.alert.effect
+        },
+        // 文字是否居中
+        center: {
+            type: Boolean,
+            default: uni.$u.props.alert.center
+        },
+        // 字体大小
+        fontSize: {
+            type: [String, Number],
+            default: uni.$u.props.alert.fontSize
+        }
+    }
+}

+ 243 - 0
uni_modules/uview-ui/components/u-alert/u-alert.vue

@@ -0,0 +1,243 @@
+<template>
+	<u-transition
+	    mode="fade"
+	    :show="show"
+	>
+		<view
+		    class="u-alert"
+		    :class="[`u-alert--${type}--${effect}`]"
+		    @tap.stop="clickHandler"
+		    :style="[$u.addStyle(customStyle)]"
+		>
+			<view
+			    class="u-alert__icon"
+			    v-if="showIcon"
+			>
+				<u-icon
+				    :name="iconName"
+				    size="18"
+				    :color="iconColor"
+				></u-icon>
+			</view>
+			<view
+			    class="u-alert__content"
+			    :style="[{
+					paddingRight: closable ? '20px' : 0
+				}]"
+			>
+				<text
+				    class="u-alert__content__title"
+				    v-if="title"
+					:style="[{
+						fontSize: $u.addUnit(fontSize),
+						textAlign: center ? 'center' : 'left'
+					}]"
+				    :class="[effect === 'dark' ? 'u-alert__text--dark' : `u-alert__text--${type}--light`]"
+				>{{ title }}</text>
+				<text
+				    class="u-alert__content__desc"
+					v-if="description"
+					:style="[{
+						fontSize: $u.addUnit(fontSize),
+						textAlign: center ? 'center' : 'left'
+					}]"
+				    :class="[effect === 'dark' ? 'u-alert__text--dark' : `u-alert__text--${type}--light`]"
+				>{{ description }}</text>
+			</view>
+			<view
+			    class="u-alert__close"
+			    v-if="closable"
+			    @tap.stop="closeHandler"
+			>
+				<u-icon
+				    name="close"
+				    :color="iconColor"
+				    size="15"
+				></u-icon>
+			</view>
+		</view>
+	</u-transition>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * Alert  警告提示
+	 * @description 警告提示,展现需要关注的信息。
+	 * @tutorial https://www.uviewui.com/components/alertTips.html
+	 * 
+	 * @property {String}			title       显示的文字 
+	 * @property {String}			type        使用预设的颜色  (默认 'warning' )
+	 * @property {String}			description 辅助性文字,颜色比title浅一点,字号也小一点,可选  
+	 * @property {Boolean}			closable    关闭按钮(默认为叉号icon图标)  (默认 false )
+	 * @property {Boolean}			showIcon    是否显示左边的辅助图标   ( 默认 false )
+	 * @property {String}			effect      多图时,图片缩放裁剪的模式  (默认 'light' )
+	 * @property {Boolean}			center		文字是否居中  (默认 false )
+	 * @property {String | Number}	fontSize    字体大小  (默认 14 )
+	 * @property {Object}			customStyle	定义需要用到的外部样式
+	 * @event    {Function}        click       点击组件时触发
+	 * @example  <u-alert :title="title"  type = "warning" :closable="closable" :description = "description"></u-alert>
+	 */
+	export default {
+		name: 'u-alert',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+		data() {
+			return {
+				show: true
+			}
+		},
+		computed: {
+			iconColor() {
+				return this.effect === 'light' ? this.type : '#fff'
+			},
+			// 不同主题对应不同的图标
+			iconName() {
+				switch (this.type) {
+					case 'success':
+						return 'checkmark-circle-fill';
+						break;
+					case 'error':
+						return 'close-circle-fill';
+						break;
+					case 'warning':
+						return 'error-circle-fill';
+						break;
+					case 'info':
+						return 'info-circle-fill';
+						break;
+					case 'primary':
+						return 'more-circle-fill';
+						break;
+					default: 
+						return 'error-circle-fill';
+				}
+			}
+		},
+		methods: {
+			// 点击内容
+			clickHandler() {
+				this.$emit('click')
+			},
+			// 点击关闭按钮
+			closeHandler() {
+				this.show = false
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-alert {
+		position: relative;
+		background-color: $u-primary;
+		padding: 8px 10px;
+		@include flex(row);
+		align-items: center;
+		border-top-left-radius: 4px;
+		border-top-right-radius: 4px;
+		border-bottom-left-radius: 4px;
+		border-bottom-right-radius: 4px;
+
+		&--primary--dark {
+			background-color: $u-primary;
+		}
+
+		&--primary--light {
+			background-color: #ecf5ff;
+		}
+
+		&--error--dark {
+			background-color: $u-error;
+		}
+
+		&--error--light {
+			background-color: #FEF0F0;
+		}
+
+		&--success--dark {
+			background-color: $u-success;
+		}
+
+		&--success--light {
+			background-color: #f5fff0;
+		}
+
+		&--warning--dark {
+			background-color: $u-warning;
+		}
+
+		&--warning--light {
+			background-color: #FDF6EC;
+		}
+
+		&--info--dark {
+			background-color: $u-info;
+		}
+
+		&--info--light {
+			background-color: #f4f4f5;
+		}
+
+		&__icon {
+			margin-right: 5px;
+		}
+
+		&__content {
+			@include flex(column);
+			flex: 1;
+
+			&__title {
+				color: $u-main-color;
+				font-size: 14px;
+				font-weight: bold;
+				color: #fff;
+				margin-bottom: 2px;
+			}
+
+			&__desc {
+				color: $u-main-color;
+				font-size: 14px;
+				flex-wrap: wrap;
+				color: #fff;
+			}
+		}
+
+		&__title--dark,
+		&__desc--dark {
+			color: #FFFFFF;
+		}
+
+		&__text--primary--light,
+		&__text--primary--light {
+			color: $u-primary;
+		}
+
+		&__text--success--light,
+		&__text--success--light {
+			color: $u-success;
+		}
+
+		&__text--warning--light,
+		&__text--warning--light {
+			color: $u-warning;
+		}
+
+		&__text--error--light,
+		&__text--error--light {
+			color: $u-error;
+		}
+
+		&__text--info--light,
+		&__text--info--light {
+			color: $u-info;
+		}
+
+		&__close {
+			position: absolute;
+			top: 11px;
+			right: 10px;
+		}
+	}
+</style>

+ 52 - 0
uni_modules/uview-ui/components/u-avatar-group/props.js

@@ -0,0 +1,52 @@
+export default {
+    props: {
+        // 头像图片组
+        urls: {
+            type: Array,
+            default: uni.$u.props.avatarGroup.urls
+        },
+        // 最多展示的头像数量
+        maxCount: {
+            type: [String, Number],
+            default: uni.$u.props.avatarGroup.maxCount
+        },
+        // 头像形状
+        shape: {
+            type: String,
+            default: uni.$u.props.avatarGroup.shape
+        },
+        // 图片裁剪模式
+        mode: {
+            type: String,
+            default: uni.$u.props.avatarGroup.mode
+        },
+        // 超出maxCount时是否显示查看更多的提示
+        showMore: {
+            type: Boolean,
+            default: uni.$u.props.avatarGroup.showMore
+        },
+        // 头像大小
+        size: {
+            type: [String, Number],
+            default: uni.$u.props.avatarGroup.size
+        },
+        // 指定从数组的对象元素中读取哪个属性作为图片地址
+        keyName: {
+            type: String,
+            default: uni.$u.props.avatarGroup.keyName
+        },
+		// 头像之间的遮挡比例
+        gap: {
+            type: [String, Number],
+            validator(value) {
+                return value >= 0 && value <= 1
+            },
+            default: uni.$u.props.avatarGroup.gap
+        },
+		// 需额外显示的值
+		extraValue: {
+			type: [Number, String],
+			default: uni.$u.props.avatarGroup.extraValue
+		}
+    }
+}

+ 103 - 0
uni_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue

@@ -0,0 +1,103 @@
+<template>
+	<view class="u-avatar-group">
+		<view
+		    class="u-avatar-group__item"
+		    v-for="(item, index) in showUrl"
+		    :key="index"
+		    :style="{
+				marginLeft: index === 0 ? 0 : $u.addUnit(-size * gap)
+			}"
+		>
+			<u-avatar
+			    :size="size"
+			    :shape="shape"
+			    :mode="mode"
+			    :src="$u.test.object(item) ? keyName && item[keyName] || item.url : item"
+			></u-avatar>
+			<view
+			    class="u-avatar-group__item__show-more"
+			    v-if="showMore && index === showUrl.length - 1 && (urls.length > maxCount || extraValue > 0)"
+				@tap="clickHandler"
+			>
+				<u--text
+				    color="#ffffff"
+				    :size="size * 0.4"
+				    :text="`+${extraValue || urls.length - showUrl.length}`"
+					align="center"
+					customStyle="justify-content: center"
+				></u--text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * AvatarGroup  头像组
+	 * @description 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。
+	 * @tutorial https://www.uviewui.com/components/avatar.html
+	 * 
+	 * @property {Array}           urls     头像图片组 (默认 [] )
+	 * @property {String | Number} maxCount 最多展示的头像数量 ( 默认 5 )
+	 * @property {String}          shape    头像形状( 'circle' (默认) | 'square' )
+	 * @property {String}          mode     图片裁剪模式(默认 'scaleToFill' )
+	 * @property {Boolean}         showMore 超出maxCount时是否显示查看更多的提示 (默认 true )
+	 * @property {String | Number} size      头像大小 (默认 40 )
+	 * @property {String}          keyName  指定从数组的对象元素中读取哪个属性作为图片地址 
+	 * @property {String | Number} gap      头像之间的遮挡比例(0.4代表遮挡40%)  (默认 0.5 )
+	 * @property {String | Number} extraValue  需额外显示的值
+	 * @event    {Function}        showMore 头像组更多点击
+	 * @example  <u-avatar-group:urls="urls" size="35" gap="0.4" ></u-avatar-group:urls=>
+	 */
+	export default {
+		name: 'u-avatar-group',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+		data() {
+			return {
+
+			}
+		},
+		computed: {
+			showUrl() {
+				return this.urls.slice(0, this.maxCount)
+			}
+		},
+		methods: {
+			clickHandler() {
+				this.$emit('showMore')
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-avatar-group {
+		@include flex;
+
+		&__item {
+			margin-left: -10px;
+			position: relative;
+
+			&--no-indent {
+				// 如果你想质疑作者不会使用:first-child,说明你太年轻,因为nvue不支持
+				margin-left: 0;
+			}
+
+			&__show-more {
+				position: absolute;
+				top: 0;
+				bottom: 0;
+				left: 0;
+				right: 0;
+				background-color: rgba(0, 0, 0, 0.3);
+				@include flex;
+				align-items: center;
+				justify-content: center;
+				border-radius: 100px;
+			}
+		}
+	}
+</style>

+ 78 - 0
uni_modules/uview-ui/components/u-avatar/props.js

@@ -0,0 +1,78 @@
+export default {
+    props: {
+        // 头像图片路径(不能为相对路径)
+        src: {
+            type: String,
+            default: uni.$u.props.avatar.src
+        },
+        // 头像形状,circle-圆形,square-方形
+        shape: {
+            type: String,
+            default: uni.$u.props.avatar.shape
+        },
+        // 头像尺寸
+        size: {
+            type: [String, Number],
+            default: uni.$u.props.avatar.size
+        },
+        // 裁剪模式
+        mode: {
+            type: String,
+            default: uni.$u.props.avatar.mode
+        },
+        // 显示的文字
+        text: {
+            type: String,
+            default: uni.$u.props.avatar.text
+        },
+        // 背景色
+        bgColor: {
+            type: String,
+            default: uni.$u.props.avatar.bgColor
+        },
+        // 文字颜色
+        color: {
+            type: String,
+            default: uni.$u.props.avatar.color
+        },
+        // 文字大小
+        fontSize: {
+            type: [String, Number],
+            default: uni.$u.props.avatar.fontSize
+        },
+        // 显示的图标
+        icon: {
+            type: String,
+            default: uni.$u.props.avatar.icon
+        },
+        // 显示小程序头像,只对百度,微信,QQ小程序有效
+        mpAvatar: {
+            type: Boolean,
+            default: uni.$u.props.avatar.mpAvatar
+        },
+        // 是否使用随机背景色
+        randomBgColor: {
+            type: Boolean,
+            default: uni.$u.props.avatar.randomBgColor
+        },
+        // 加载失败的默认头像(组件有内置默认图片)
+        defaultUrl: {
+            type: String,
+            default: uni.$u.props.avatar.defaultUrl
+        },
+        // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
+        colorIndex: {
+            type: [String, Number],
+            // 校验参数规则,索引在0-19之间
+            validator(n) {
+                return uni.$u.test.range(n, [0, 19]) || n === ''
+            },
+            default: uni.$u.props.avatar.colorIndex
+        },
+        // 组件标识符
+        name: {
+            type: String,
+            default: uni.$u.props.avatar.name
+        }
+    }
+}

文件差異過大導致無法顯示
+ 58 - 0
uni_modules/uview-ui/components/u-avatar/u-avatar.vue


+ 54 - 0
uni_modules/uview-ui/components/u-back-top/props.js

@@ -0,0 +1,54 @@
+export default {
+    props: {
+        // 返回顶部的形状,circle-圆形,square-方形
+        mode: {
+            type: String,
+            default: uni.$u.props.backtop.mode
+        },
+        // 自定义图标
+        icon: {
+            type: String,
+            default: uni.$u.props.backtop.icon
+        },
+        // 提示文字
+        text: {
+            type: String,
+            default: uni.$u.props.backtop.text
+        },
+        // 返回顶部滚动时间
+        duration: {
+            type: [String, Number],
+            default: uni.$u.props.backtop.duration
+        },
+        // 滚动距离
+        scrollTop: {
+            type: [String, Number],
+            default: uni.$u.props.backtop.scrollTop
+        },
+        // 距离顶部多少距离显示,单位px
+        top: {
+            type: [String, Number],
+            default: uni.$u.props.backtop.top
+        },
+        // 返回顶部按钮到底部的距离,单位px
+        bottom: {
+            type: [String, Number],
+            default: uni.$u.props.backtop.bottom
+        },
+        // 返回顶部按钮到右边的距离,单位px
+        right: {
+            type: [String, Number],
+            default: uni.$u.props.backtop.right
+        },
+        // 层级
+        zIndex: {
+            type: [String, Number],
+            default: uni.$u.props.backtop.zIndex
+        },
+        // 图标的样式,对象形式
+        iconStyle: {
+            type: Object,
+            default: uni.$u.props.backtop.iconStyle
+        }
+    }
+}

+ 129 - 0
uni_modules/uview-ui/components/u-back-top/u-back-top.vue

@@ -0,0 +1,129 @@
+<template>
+	<u-transition
+	    mode="fade"
+	    :customStyle="backTopStyle"
+	    :show="show"
+	>
+		<view
+		    class="u-back-top"
+			:style="[contentStyle]"
+		    v-if="!$slots.default && !$slots.$default"
+			@click="backToTop"
+		>
+			<u-icon
+			    :name="icon"
+			    :custom-style="iconStyle"
+			></u-icon>
+			<text
+			    v-if="text"
+			    class="u-back-top__text"
+			>{{text}}</text>
+		</view>
+		<slot v-else />
+	</u-transition>
+</template>
+
+<script>
+	import props from './props.js';
+	// #ifdef APP-NVUE
+	const dom = weex.requireModule('dom')
+	// #endif
+	/**
+	 * backTop 返回顶部
+	 * @description 本组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。
+	 * @tutorial https://uviewui.com/components/backTop.html
+	 * 
+	 * @property {String}			mode  		返回顶部的形状,circle-圆形,square-方形 (默认 'circle' )
+	 * @property {String} 			icon 		自定义图标 (默认 'arrow-upward' ) 见官方文档示例
+	 * @property {String} 			text 		提示文字 
+	 * @property {String | Number}  duration	返回顶部滚动时间 (默认 100)
+	 * @property {String | Number}  scrollTop	滚动距离 (默认 0 )
+	 * @property {String | Number}  top  		距离顶部多少距离显示,单位px (默认 400 )
+	 * @property {String | Number}  bottom  	返回顶部按钮到底部的距离,单位px (默认 100 )
+	 * @property {String | Number}  right  		返回顶部按钮到右边的距离,单位px (默认 20 )
+	 * @property {String | Number}  zIndex 		层级   (默认 9 )
+	 * @property {Object<Object>}  	iconStyle 	图标的样式,对象形式   (默认 {color: '#909399',fontSize: '19px'})
+	 * @property {Object}			customStyle	定义需要用到的外部样式
+	 * 
+	 * @example <u-back-top :scrollTop="scrollTop"></u-back-top>
+	 */
+	export default {
+		name: 'u-back-top',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
+		computed: {
+			backTopStyle() {
+				// 动画组件样式
+				const style = {
+					bottom: uni.$u.addUnit(this.bottom),
+					right: uni.$u.addUnit(this.right),
+					width: '40px',
+					height: '40px',
+					position: 'fixed',
+					zIndex: 10,
+				}
+				return style
+			},
+			show() {
+				return uni.$u.getPx(this.scrollTop) > uni.$u.getPx(this.top)
+			},
+			contentStyle() {
+				const style = {}
+				let radius = 0
+				// 是否圆形
+				if(this.mode === 'circle') {
+					radius = '100px'
+				} else {
+					radius = '4px'
+				}
+				// 为了兼容安卓nvue,只能这么分开写
+				style.borderTopLeftRadius = radius
+				style.borderTopRightRadius = radius
+				style.borderBottomLeftRadius = radius
+				style.borderBottomRightRadius = radius
+				return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
+			}
+		},
+		methods: {
+			backToTop() {
+				// #ifdef APP-NVUE
+				if (!this.$parent.$refs['u-back-top']) {
+					uni.$u.error(`nvue页面需要给页面最外层元素设置"ref='u-back-top'`)
+				}
+				dom.scrollToElement(this.$parent.$refs['u-back-top'], {
+					offset: 0
+				})
+				// #endif
+				
+				// #ifndef APP-NVUE
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: this.duration
+				});
+				// #endif
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import '../../libs/css/components.scss';
+     $u-back-top-flex:1 !default;
+     $u-back-top-height:100% !default;
+     $u-back-top-background-color:#E1E1E1 !default;
+     $u-back-top-tips-font-size:12px !default;
+	.u-back-top {
+		@include flex;
+		flex-direction: column;
+		align-items: center;
+		flex:$u-back-top-flex;
+		height: $u-back-top-height;
+		justify-content: center;
+		background-color: $u-back-top-background-color;
+
+		&__tips {
+			font-size:$u-back-top-tips-font-size;
+			transform: scale(0.8);
+		}
+	}
+</style>

+ 72 - 0
uni_modules/uview-ui/components/u-badge/props.js

@@ -0,0 +1,72 @@
+export default {
+    props: {
+        // 是否显示圆点
+        isDot: {
+            type: Boolean,
+            default: uni.$u.props.badge.isDot
+        },
+        // 显示的内容
+        value: {
+            type: [Number, String],
+            default: uni.$u.props.badge.value
+        },
+        // 是否显示
+        show: {
+            type: Boolean,
+            default: uni.$u.props.badge.show
+        },
+        // 最大值,超过最大值会显示 '{max}+'
+        max: {
+            type: [Number, String],
+            default: uni.$u.props.badge.max
+        },
+        // 主题类型,error|warning|success|primary
+        type: {
+            type: String,
+            default: uni.$u.props.badge.type
+        },
+        // 当数值为 0 时,是否展示 Badge
+        showZero: {
+            type: Boolean,
+            default: uni.$u.props.badge.showZero
+        },
+        // 背景颜色,优先级比type高,如设置,type参数会失效
+        bgColor: {
+            type: [String, null],
+            default: uni.$u.props.badge.bgColor
+        },
+        // 字体颜色
+        color: {
+            type: [String, null],
+            default: uni.$u.props.badge.color
+        },
+        // 徽标形状,circle-四角均为圆角,horn-左下角为直角
+        shape: {
+            type: String,
+            default: uni.$u.props.badge.shape
+        },
+        // 设置数字的显示方式,overflow|ellipsis|limit
+        // overflow会根据max字段判断,超出显示`${max}+`
+        // ellipsis会根据max判断,超出显示`${max}...`
+        // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
+        numberType: {
+            type: String,
+            default: uni.$u.props.badge.numberType
+        },
+        // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
+        offset: {
+            type: Array,
+            default: uni.$u.props.badge.offset
+        },
+        // 是否反转背景和字体颜色
+        inverted: {
+            type: Boolean,
+            default: uni.$u.props.badge.inverted
+        },
+        // 是否绝对定位
+        absolute: {
+            type: Boolean,
+            default: uni.$u.props.badge.absolute
+        }
+    }
+}

+ 171 - 0
uni_modules/uview-ui/components/u-badge/u-badge.vue

@@ -0,0 +1,171 @@
+<template>
+	<text
+		v-if="show && ((Number(value) === 0 ? showZero : true) || isDot)"
+		:class="[isDot ? 'u-badge--dot' : 'u-badge--not-dot', inverted && 'u-badge--inverted', shape === 'horn' && 'u-badge--horn', `u-badge--${type}${inverted ? '--inverted' : ''}`]"
+		:style="[$u.addStyle(customStyle), badgeStyle]"
+		class="u-badge"
+	>{{ isDot ? '' :showValue }}</text>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * badge 徽标数
+	 * @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。
+	 * @tutorial https://uviewui.com/components/badge.html
+	 * 
+	 * @property {Boolean} 			isDot 		是否显示圆点 (默认 false )
+	 * @property {String | Number} 	value 		显示的内容
+	 * @property {Boolean} 			show 		是否显示 (默认 true )
+	 * @property {String | Number} 	max 		最大值,超过最大值会显示 '{max}+'  (默认999)
+	 * @property {String} 			type 		主题类型,error|warning|success|primary (默认 'error' )
+	 * @property {Boolean} 			showZero	当数值为 0 时,是否展示 Badge (默认 false )
+	 * @property {String} 			bgColor 	背景颜色,优先级比type高,如设置,type参数会失效
+	 * @property {String} 			color 		字体颜色 (默认 '#ffffff' )
+	 * @property {String} 			shape 		徽标形状,circle-四角均为圆角,horn-左下角为直角 (默认 'circle' )
+	 * @property {String} 			numberType	设置数字的显示方式,overflow|ellipsis|limit  (默认 'overflow' )
+	 * @property {Array}} 			offset		设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
+	 * @property {Boolean} 			inverted	是否反转背景和字体颜色(默认 false )
+	 * @property {Boolean} 			absolute	是否绝对定位(默认 false )
+	 * @property {Object}			customStyle	定义需要用到的外部样式
+	 * @example <u-badge :type="type" :count="count"></u-badge>
+	 */
+	export default {
+		name: 'u-badge',
+		mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+		computed: {
+			// 是否将badge中心与父组件右上角重合
+			boxStyle() {
+				let style = {};
+				return style;
+			},
+			// 整个组件的样式
+			badgeStyle() {
+				const style = {}
+				if(this.color) {
+					style.color = this.color
+				}
+				if (this.bgColor && !this.inverted) {
+					style.backgroundColor = this.bgColor
+				}
+				if (this.absolute) {
+					style.position = 'absolute'
+					// 如果有设置offset参数
+					if(this.offset.length) {
+						// top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top
+						const top = this.offset[0]
+						const right = this.offset[1] || top
+						style.top = uni.$u.addUnit(top)
+						style.right = uni.$u.addUnit(right)
+					}
+				}
+				return style
+			},
+			showValue() {
+				switch (this.numberType) {
+					case "overflow":
+						return Number(this.value) > Number(this.max) ? this.max + "+" : this.value
+						break;
+					case "ellipsis":
+						return Number(this.value) > Number(this.max) ? "..." : this.value
+						break;
+					case "limit":
+						return Number(this.value) > 999 ? Number(this.value) >= 9999 ?
+							Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value /
+								1e3 * 100) / 100 + "k" : this.value
+						break;
+					default:
+						return Number(this.value)
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	$u-badge-primary: $u-primary !default;
+	$u-badge-error: $u-error !default;
+	$u-badge-success: $u-success !default;
+	$u-badge-info: $u-info !default;
+	$u-badge-warning: $u-warning !default;
+	$u-badge-dot-radius: 100px !default;
+	$u-badge-dot-size: 8px !default;
+	$u-badge-dot-right: 4px !default;
+	$u-badge-dot-top: 0 !default;
+	$u-badge-text-font-size: 11px !default;
+	$u-badge-text-right: 10px !default;
+	$u-badge-text-padding: 2px 5px !default;
+	$u-badge-text-align: center !default;
+	$u-badge-text-color: #FFFFFF !default;
+
+	.u-badge {
+		border-top-right-radius: $u-badge-dot-radius;
+		border-top-left-radius: $u-badge-dot-radius;
+		border-bottom-left-radius: $u-badge-dot-radius;
+		border-bottom-right-radius: $u-badge-dot-radius;
+		@include flex;
+		line-height: $u-badge-text-font-size;
+		text-align: $u-badge-text-align;
+		font-size: $u-badge-text-font-size;
+		color: $u-badge-text-color;
+
+		&--dot {
+			height: $u-badge-dot-size;
+			width: $u-badge-dot-size;
+		}
+		
+		&--inverted {
+			font-size: 13px;
+		}
+		
+		&--not-dot {
+			padding: $u-badge-text-padding;
+		}
+
+		&--horn {
+			border-bottom-left-radius: 0;
+		}
+
+		&--primary {
+			background-color: $u-badge-primary;
+		}
+		
+		&--primary--inverted {
+			color: $u-badge-primary;
+		}
+
+		&--error {
+			background-color: $u-badge-error;
+		}
+		
+		&--error--inverted {
+			color: $u-badge-error;
+		}
+
+		&--success {
+			background-color: $u-badge-success;
+		}
+		
+		&--success--inverted {
+			color: $u-badge-success;
+		}
+
+		&--info {
+			background-color: $u-badge-info;
+		}
+		
+		&--info--inverted {
+			color: $u-badge-info;
+		}
+
+		&--warning {
+			background-color: $u-badge-warning;
+		}
+		
+		&--warning--inverted {
+			color: $u-badge-warning;
+		}
+	}
+</style>

+ 46 - 0
uni_modules/uview-ui/components/u-button/nvue.scss

@@ -0,0 +1,46 @@
+$u-button-active-opacity:0.75 !default;
+$u-button-loading-text-margin-left:4px !default;
+$u-button-text-color: #FFFFFF !default;
+$u-button-text-plain-error-color:$u-error !default;
+$u-button-text-plain-warning-color:$u-warning !default;
+$u-button-text-plain-success-color:$u-success !default;
+$u-button-text-plain-info-color:$u-info !default;
+$u-button-text-plain-primary-color:$u-primary !default;
+.u-button {
+	&--active {
+		opacity: $u-button-active-opacity;
+	}
+	
+	&--active--plain {
+		background-color: rgb(217, 217, 217);
+	}
+	
+	&__loading-text {
+		margin-left:$u-button-loading-text-margin-left;
+	}
+	
+	&__text,
+	&__loading-text {
+		color:$u-button-text-color;
+	}
+	
+	&__text--plain--error {
+		color:$u-button-text-plain-error-color;
+	}
+	
+	&__text--plain--warning {
+		color:$u-button-text-plain-warning-color;
+	}
+	
+	&__text--plain--success{
+		color:$u-button-text-plain-success-color;
+	}
+	
+	&__text--plain--info {
+		color:$u-button-text-plain-info-color;
+	}
+	
+	&__text--plain--primary {
+		color:$u-button-text-plain-primary-color;
+	}
+}

+ 161 - 0
uni_modules/uview-ui/components/u-button/props.js

@@ -0,0 +1,161 @@
+/*
+ * @Author       : LQ
+ * @Description  :
+ * @version      : 1.0
+ * @Date         : 2021-08-16 10:04:04
+ * @LastAuthor   : LQ
+ * @lastTime     : 2021-08-16 10:04:24
+ * @FilePath     : /u-view2.0/uview-ui/components/u-button/props.js
+ */
+export default {
+    props: {
+        // 是否细边框
+        hairline: {
+            type: Boolean,
+            default: uni.$u.props.button.hairline
+        },
+        // 按钮的预置样式,info,primary,error,warning,success
+        type: {
+            type: String,
+            default: uni.$u.props.button.type
+        },
+        // 按钮尺寸,large,normal,small,mini
+        size: {
+            type: String,
+            default: uni.$u.props.button.size
+        },
+        // 按钮形状,circle(两边为半圆),square(带圆角)
+        shape: {
+            type: String,
+            default: uni.$u.props.button.shape
+        },
+        // 按钮是否镂空
+        plain: {
+            type: Boolean,
+            default: uni.$u.props.button.plain
+        },
+        // 是否禁止状态
+        disabled: {
+            type: Boolean,
+            default: uni.$u.props.button.disabled
+        },
+        // 是否加载中
+        loading: {
+            type: Boolean,
+            default: uni.$u.props.button.loading
+        },
+        // 加载中提示文字
+        loadingText: {
+            type: [String, Number],
+            default: uni.$u.props.button.loadingText
+        },
+        // 加载状态图标类型
+        loadingMode: {
+            type: String,
+            default: uni.$u.props.button.loadingMode
+        },
+        // 加载图标大小
+        loadingSize: {
+            type: [String, Number],
+            default: uni.$u.props.button.loadingSize
+        },
+        // 开放能力,具体请看uniapp稳定关于button组件部分说明
+        // https://uniapp.dcloud.io/component/button
+        openType: {
+            type: String,
+            default: uni.$u.props.button.openType
+        },
+        // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
+        // 取值为submit(提交表单),reset(重置表单)
+        formType: {
+            type: String,
+            default: uni.$u.props.button.formType
+        },
+        // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
+        // 只微信小程序、QQ小程序有效
+        appParameter: {
+            type: String,
+            default: uni.$u.props.button.appParameter
+        },
+        // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
+        hoverStopPropagation: {
+            type: Boolean,
+            default: uni.$u.props.button.hoverStopPropagation
+        },
+        // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
+        lang: {
+            type: String,
+            default: uni.$u.props.button.lang
+        },
+        // 会话来源,open-type="contact"时有效。只微信小程序有效
+        sessionFrom: {
+            type: String,
+            default: uni.$u.props.button.sessionFrom
+        },
+        // 会话内消息卡片标题,open-type="contact"时有效
+        // 默认当前标题,只微信小程序有效
+        sendMessageTitle: {
+            type: String,
+            default: uni.$u.props.button.sendMessageTitle
+        },
+        // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
+        // 默认当前分享路径,只微信小程序有效
+        sendMessagePath: {
+            type: String,
+            default: uni.$u.props.button.sendMessagePath
+        },
+        // 会话内消息卡片图片,open-type="contact"时有效
+        // 默认当前页面截图,只微信小程序有效
+        sendMessageImg: {
+            type: String,
+            default: uni.$u.props.button.sendMessageImg
+        },
+        // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
+        // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
+        showMessageCard: {
+            type: Boolean,
+            default: uni.$u.props.button.showMessageCard
+        },
+        // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
+        dataName: {
+            type: String,
+            default: uni.$u.props.button.dataName
+        },
+        // 节流,一定时间内只能触发一次
+        throttleTime: {
+            type: [String, Number],
+            default: uni.$u.props.button.throttleTime
+        },
+        // 按住后多久出现点击态,单位毫秒
+        hoverStartTime: {
+            type: [String, Number],
+            default: uni.$u.props.button.hoverStartTime
+        },
+        // 手指松开后点击态保留时间,单位毫秒
+        hoverStayTime: {
+            type: [String, Number],
+            default: uni.$u.props.button.hoverStayTime
+        },
+        // 按钮文字,之所以通过props传入,是因为slot传入的话
+        // nvue中无法控制文字的样式
+        text: {
+            type: [String, Number],
+            default: uni.$u.props.button.text
+        },
+        // 按钮图标
+        icon: {
+            type: String,
+            default: uni.$u.props.button.icon
+        },
+        // 按钮图标
+        iconColor: {
+            type: String,
+            default: uni.$u.props.button.icon
+        },
+        // 按钮颜色,支持传入linear-gradient渐变色
+        color: {
+            type: String,
+            default: uni.$u.props.button.color
+        }
+    }
+}

+ 495 - 0
uni_modules/uview-ui/components/u-button/u-button.vue

@@ -0,0 +1,495 @@
+<template>
+    <!-- #ifndef APP-NVUE -->
+    <button
+        :hover-start-time="Number(hoverStartTime)"
+        :hover-stay-time="Number(hoverStayTime)"
+        :form-type="formType"
+        :open-type="openType"
+        :app-parameter="appParameter"
+        :hover-stop-propagation="hoverStopPropagation"
+        :send-message-title="sendMessageTitle"
+        :send-message-path="sendMessagePath"
+        :lang="lang"
+        :data-name="dataName"
+        :session-from="sessionFrom"
+        :send-message-img="sendMessageImg"
+        :show-message-card="showMessageCard"
+        @getphonenumber="getphonenumber"
+        @getuserinfo="getuserinfo"
+        @error="error"
+        @opensetting="opensetting"
+        @launchapp="launchapp"
+        @agreeprivacyauthorization="agreeprivacyauthorization"
+        :hover-class="!disabled && !loading ? 'u-button--active' : ''"
+        class="u-button u-reset-button"
+        :style="[baseColor, $u.addStyle(customStyle)]"
+        @tap="clickHandler"
+        :class="bemClass"
+    >
+        <template v-if="loading">
+            <u-loading-icon
+                :mode="loadingMode"
+                :size="loadingSize * 1.15"
+                :color="loadingColor"
+            ></u-loading-icon>
+            <text
+                class="u-button__loading-text"
+                :style="[{ fontSize: textSize + 'px' }]"
+                >{{ loadingText || text }}</text
+            >
+        </template>
+        <template v-else>
+            <u-icon
+                v-if="icon"
+                :name="icon"
+                :color="iconColorCom"
+                :size="textSize * 1.35"
+                :customStyle="{ marginRight: '2px' }"
+            ></u-icon>
+            <slot>
+                <text
+                    class="u-button__text"
+                    :style="[{ fontSize: textSize + 'px' }]"
+                    >{{ text }}</text
+                >
+            </slot>
+        </template>
+    </button>
+    <!-- #endif -->
+
+    <!-- #ifdef APP-NVUE -->
+    <view
+        :hover-start-time="Number(hoverStartTime)"
+        :hover-stay-time="Number(hoverStayTime)"
+        class="u-button"
+        :hover-class="
+            !disabled && !loading && !color && (plain || type === 'info')
+                ? 'u-button--active--plain'
+                : !disabled && !loading && !plain
+                ? 'u-button--active'
+                : ''
+        "
+        @tap="clickHandler"
+        :class="bemClass"
+        :style="[baseColor, $u.addStyle(customStyle)]"
+    >
+        <template v-if="loading">
+            <u-loading-icon
+                :mode="loadingMode"
+                :size="loadingSize * 1.15"
+                :color="loadingColor"
+            ></u-loading-icon>
+            <text
+                class="u-button__loading-text"
+                :style="[nvueTextStyle]"
+                :class="[plain && `u-button__text--plain--${type}`]"
+                >{{ loadingText || text }}</text
+            >
+        </template>
+        <template v-else>
+            <u-icon
+                v-if="icon"
+                :name="icon"
+                :color="iconColorCom"
+                :size="textSize * 1.35"
+            ></u-icon>
+            <text
+                class="u-button__text"
+                :style="[
+                    {
+                        marginLeft: icon ? '2px' : 0,
+                    },
+                    nvueTextStyle,
+                ]"
+                :class="[plain && `u-button__text--plain--${type}`]"
+                >{{ text }}</text
+            >
+        </template>
+    </view>
+    <!-- #endif -->
+</template>
+
+<script>
+import button from "../../libs/mixin/button.js";
+import openType from "../../libs/mixin/openType.js";
+import props from "./props.js";
+/**
+ * button 按钮
+ * @description Button 按钮
+ * @tutorial https://www.uviewui.com/components/button.html
+ *
+ * @property {Boolean}			hairline				是否显示按钮的细边框 (默认 true )
+ * @property {String}			type					按钮的预置样式,info,primary,error,warning,success (默认 'info' )
+ * @property {String}			size					按钮尺寸,large,normal,mini (默认 normal)
+ * @property {String}			shape					按钮形状,circle(两边为半圆),square(带圆角) (默认 'square' )
+ * @property {Boolean}			plain					按钮是否镂空,背景色透明 (默认 false)
+ * @property {Boolean}			disabled				是否禁用 (默认 false)
+ * @property {Boolean}			loading					按钮名称前是否带 loading 图标(App-nvue 平台,在 ios 上为雪花,Android上为圆圈) (默认 false)
+ * @property {String | Number}	loadingText				加载中提示文字
+ * @property {String}			loadingMode				加载状态图标类型 (默认 'spinner' )
+ * @property {String | Number}	loadingSize				加载图标大小 (默认 15 )
+ * @property {String}			openType				开放能力,具体请看uniapp稳定关于button组件部分说明
+ * @property {String}			formType				用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
+ * @property {String}			appParameter			打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 (注:只微信小程序、QQ小程序有效)
+ * @property {Boolean}			hoverStopPropagation	指定是否阻止本节点的祖先节点出现点击态,微信小程序有效(默认 true )
+ * @property {String}			lang					指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文(默认 en )
+ * @property {String}			sessionFrom				会话来源,openType="contact"时有效
+ * @property {String}			sendMessageTitle		会话内消息卡片标题,openType="contact"时有效
+ * @property {String}			sendMessagePath			会话内消息卡片点击跳转小程序路径,openType="contact"时有效
+ * @property {String}			sendMessageImg			会话内消息卡片图片,openType="contact"时有效
+ * @property {Boolean}			showMessageCard			是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效(默认false)
+ * @property {String}			dataName				额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
+ * @property {String | Number}	throttleTime			节流,一定时间内只能触发一次 (默认 0 )
+ * @property {String | Number}	hoverStartTime			按住后多久出现点击态,单位毫秒 (默认 0 )
+ * @property {String | Number}	hoverStayTime			手指松开后点击态保留时间,单位毫秒 (默认 200 )
+ * @property {String | Number}	text					按钮文字,之所以通过props传入,是因为slot传入的话(注:nvue中无法控制文字的样式)
+ * @property {String}			icon					按钮图标
+ * @property {String}			iconColor				按钮图标颜色
+ * @property {String}			color					按钮颜色,支持传入linear-gradient渐变色
+ * @property {Object}			customStyle				定义需要用到的外部样式
+ *
+ * @event {Function}	click			非禁止并且非加载中,才能点击
+ * @event {Function}	getphonenumber	open-type="getPhoneNumber"时有效
+ * @event {Function}	getuserinfo		用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo
+ * @event {Function}	error			当使用开放能力时,发生错误的回调
+ * @event {Function}	opensetting		在打开授权设置页并关闭后回调
+ * @event {Function}	launchapp		打开 APP 成功的回调
+ * @event {Function}	agreeprivacyauthorization	用户同意隐私协议事件回调
+ * @example <u-button>月落</u-button>
+ */
+export default {
+    name: "u-button",
+    // #ifdef MP
+    mixins: [uni.$u.mpMixin, uni.$u.mixin, button, openType, props],
+    // #endif
+    // #ifndef MP
+    mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+    // #endif
+    data() {
+        return {};
+    },
+    computed: {
+        // 生成bem风格的类名
+        bemClass() {
+            // this.bem为一个computed变量,在mixin中
+            if (!this.color) {
+                return this.bem(
+                    "button",
+                    ["type", "shape", "size"],
+                    ["disabled", "plain", "hairline"]
+                );
+            } else {
+                // 由于nvue的原因,在有color参数时,不需要传入type,否则会生成type相关的类型,影响最终的样式
+                return this.bem(
+                    "button",
+                    ["shape", "size"],
+                    ["disabled", "plain", "hairline"]
+                );
+            }
+        },
+        loadingColor() {
+            if (this.plain) {
+                // 如果有设置color值,则用color值,否则使用type主题颜色
+                return this.color
+                    ? this.color
+                    : uni.$u.config.color[`u-${this.type}`];
+            }
+            if (this.type === "info") {
+                return "#c9c9c9";
+            }
+            return "rgb(200, 200, 200)";
+        },
+        iconColorCom() {
+            // 如果是镂空状态,设置了color就用color值,否则使用主题颜色,
+            // u-icon的color能接受一个主题颜色的值
+			if (this.iconColor) return this.iconColor;
+			if (this.plain) {
+                return this.color ? this.color : this.type;
+            } else {
+                return this.type === "info" ? "#000000" : "#ffffff";
+            }
+        },
+        baseColor() {
+            let style = {};
+            if (this.color) {
+                // 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
+                style.color = this.plain ? this.color : "white";
+                if (!this.plain) {
+                    // 非镂空,背景色使用自定义的颜色
+                    style["background-color"] = this.color;
+                }
+                if (this.color.indexOf("gradient") !== -1) {
+                    // 如果自定义的颜色为渐变色,不显示边框,以及通过backgroundImage设置渐变色
+                    // weex文档说明可以写borderWidth的形式,为什么这里需要分开写?
+                    // 因为weex是阿里巴巴为了部门业绩考核而做的你懂的东西,所以需要这么写才有效
+                    style.borderTopWidth = 0;
+                    style.borderRightWidth = 0;
+                    style.borderBottomWidth = 0;
+                    style.borderLeftWidth = 0;
+                    if (!this.plain) {
+                        style.backgroundImage = this.color;
+                    }
+                } else {
+                    // 非渐变色,则设置边框相关的属性
+                    style.borderColor = this.color;
+                    style.borderWidth = "1px";
+                    style.borderStyle = "solid";
+                }
+            }
+            return style;
+        },
+        // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
+        nvueTextStyle() {
+            let style = {};
+            // 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
+            if (this.type === "info") {
+                style.color = "#323233";
+            }
+            if (this.color) {
+                style.color = this.plain ? this.color : "white";
+            }
+            style.fontSize = this.textSize + "px";
+            return style;
+        },
+        // 字体大小
+        textSize() {
+            let fontSize = 14,
+                { size } = this;
+            if (size === "large") fontSize = 16;
+            if (size === "normal") fontSize = 14;
+            if (size === "small") fontSize = 12;
+            if (size === "mini") fontSize = 10;
+            return fontSize;
+        },
+    },
+    methods: {
+        clickHandler() {
+            // 非禁止并且非加载中,才能点击
+            if (!this.disabled && !this.loading) {
+				// 进行节流控制,每this.throttle毫秒内,只在开始处执行
+				uni.$u.throttle(() => {
+					this.$emit("click");
+				}, this.throttleTime);
+            }
+        },
+        // 下面为对接uniapp官方按钮开放能力事件回调的对接
+        getphonenumber(res) {
+            this.$emit("getphonenumber", res);
+        },
+        getuserinfo(res) {
+            this.$emit("getuserinfo", res);
+        },
+        error(res) {
+            this.$emit("error", res);
+        },
+        opensetting(res) {
+            this.$emit("opensetting", res);
+        },
+        launchapp(res) {
+            this.$emit("launchapp", res);
+        },
+        agreeprivacyauthorization(res) {
+            this.$emit("agreeprivacyauthorization", res);
+        },
+    },
+};
+</script>
+
+<style lang="scss" scoped>
+@import "../../libs/css/components.scss";
+
+/* #ifndef APP-NVUE */
+@import "./vue.scss";
+/* #endif */
+
+/* #ifdef APP-NVUE */
+@import "./nvue.scss";
+/* #endif */
+
+$u-button-u-button-height: 40px !default;
+$u-button-text-font-size: 15px !default;
+$u-button-loading-text-font-size: 15px !default;
+$u-button-loading-text-margin-left: 4px !default;
+$u-button-large-width: 100% !default;
+$u-button-large-height: 50px !default;
+$u-button-normal-padding: 0 12px !default;
+$u-button-large-padding: 0 15px !default;
+$u-button-normal-font-size: 14px !default;
+$u-button-small-min-width: 60px !default;
+$u-button-small-height: 30px !default;
+$u-button-small-padding: 0px 8px !default;
+$u-button-mini-padding: 0px 8px !default;
+$u-button-small-font-size: 12px !default;
+$u-button-mini-height: 22px !default;
+$u-button-mini-font-size: 10px !default;
+$u-button-mini-min-width: 50px !default;
+$u-button-disabled-opacity: 0.5 !default;
+$u-button-info-color: #323233 !default;
+$u-button-info-background-color: #fff !default;
+$u-button-info-border-color: #ebedf0 !default;
+$u-button-info-border-width: 1px !default;
+$u-button-info-border-style: solid !default;
+$u-button-success-color: #fff !default;
+$u-button-success-background-color: $u-success !default;
+$u-button-success-border-color: $u-button-success-background-color !default;
+$u-button-success-border-width: 1px !default;
+$u-button-success-border-style: solid !default;
+$u-button-primary-color: #fff !default;
+$u-button-primary-background-color: $u-primary !default;
+$u-button-primary-border-color: $u-button-primary-background-color !default;
+$u-button-primary-border-width: 1px !default;
+$u-button-primary-border-style: solid !default;
+$u-button-error-color: #fff !default;
+$u-button-error-background-color: $u-error !default;
+$u-button-error-border-color: $u-button-error-background-color !default;
+$u-button-error-border-width: 1px !default;
+$u-button-error-border-style: solid !default;
+$u-button-warning-color: #fff !default;
+$u-button-warning-background-color: $u-warning !default;
+$u-button-warning-border-color: $u-button-warning-background-color !default;
+$u-button-warning-border-width: 1px !default;
+$u-button-warning-border-style: solid !default;
+$u-button-block-width: 100% !default;
+$u-button-circle-border-top-right-radius: 100px !default;
+$u-button-circle-border-top-left-radius: 100px !default;
+$u-button-circle-border-bottom-left-radius: 100px !default;
+$u-button-circle-border-bottom-right-radius: 100px !default;
+$u-button-square-border-top-right-radius: 3px !default;
+$u-button-square-border-top-left-radius: 3px !default;
+$u-button-square-border-bottom-left-radius: 3px !default;
+$u-button-square-border-bottom-right-radius: 3px !default;
+$u-button-icon-min-width: 1em !default;
+$u-button-plain-background-color: #fff !default;
+$u-button-hairline-border-width: 0.5px !default;
+
+.u-button {
+    height: $u-button-u-button-height;
+    position: relative;
+    align-items: center;
+    justify-content: center;
+    @include flex;
+    /* #ifndef APP-NVUE */
+    box-sizing: border-box;
+    /* #endif */
+    flex-direction: row;
+
+    &__text {
+        font-size: $u-button-text-font-size;
+    }
+
+    &__loading-text {
+        font-size: $u-button-loading-text-font-size;
+        margin-left: $u-button-loading-text-margin-left;
+    }
+
+    &--large {
+        /* #ifndef APP-NVUE */
+        width: $u-button-large-width;
+        /* #endif */
+        height: $u-button-large-height;
+        padding: $u-button-large-padding;
+    }
+
+    &--normal {
+        padding: $u-button-normal-padding;
+        font-size: $u-button-normal-font-size;
+    }
+
+    &--small {
+        /* #ifndef APP-NVUE */
+        min-width: $u-button-small-min-width;
+        /* #endif */
+        height: $u-button-small-height;
+        padding: $u-button-small-padding;
+        font-size: $u-button-small-font-size;
+    }
+
+    &--mini {
+        height: $u-button-mini-height;
+        font-size: $u-button-mini-font-size;
+        /* #ifndef APP-NVUE */
+        min-width: $u-button-mini-min-width;
+        /* #endif */
+        padding: $u-button-mini-padding;
+    }
+
+    &--disabled {
+        opacity: $u-button-disabled-opacity;
+    }
+
+    &--info {
+        color: $u-button-info-color;
+        background-color: $u-button-info-background-color;
+        border-color: $u-button-info-border-color;
+        border-width: $u-button-info-border-width;
+        border-style: $u-button-info-border-style;
+    }
+
+    &--success {
+        color: $u-button-success-color;
+        background-color: $u-button-success-background-color;
+        border-color: $u-button-success-border-color;
+        border-width: $u-button-success-border-width;
+        border-style: $u-button-success-border-style;
+    }
+
+    &--primary {
+        color: $u-button-primary-color;
+        background-color: $u-button-primary-background-color;
+        border-color: $u-button-primary-border-color;
+        border-width: $u-button-primary-border-width;
+        border-style: $u-button-primary-border-style;
+    }
+
+    &--error {
+        color: $u-button-error-color;
+        background-color: $u-button-error-background-color;
+        border-color: $u-button-error-border-color;
+        border-width: $u-button-error-border-width;
+        border-style: $u-button-error-border-style;
+    }
+
+    &--warning {
+        color: $u-button-warning-color;
+        background-color: $u-button-warning-background-color;
+        border-color: $u-button-warning-border-color;
+        border-width: $u-button-warning-border-width;
+        border-style: $u-button-warning-border-style;
+    }
+
+    &--block {
+        @include flex;
+        width: $u-button-block-width;
+    }
+
+    &--circle {
+        border-top-right-radius: $u-button-circle-border-top-right-radius;
+        border-top-left-radius: $u-button-circle-border-top-left-radius;
+        border-bottom-left-radius: $u-button-circle-border-bottom-left-radius;
+        border-bottom-right-radius: $u-button-circle-border-bottom-right-radius;
+    }
+
+    &--square {
+        border-bottom-left-radius: $u-button-square-border-top-right-radius;
+        border-bottom-right-radius: $u-button-square-border-top-left-radius;
+        border-top-left-radius: $u-button-square-border-bottom-left-radius;
+        border-top-right-radius: $u-button-square-border-bottom-right-radius;
+    }
+
+    &__icon {
+        /* #ifndef APP-NVUE */
+        min-width: $u-button-icon-min-width;
+        line-height: inherit !important;
+        vertical-align: top;
+        /* #endif */
+    }
+
+    &--plain {
+        background-color: $u-button-plain-background-color;
+    }
+
+    &--hairline {
+        border-width: $u-button-hairline-border-width !important;
+    }
+}
+</style>

+ 80 - 0
uni_modules/uview-ui/components/u-button/vue.scss

@@ -0,0 +1,80 @@
+// nvue下hover-class无效
+$u-button-before-top:50% !default;
+$u-button-before-left:50% !default;
+$u-button-before-width:100% !default;
+$u-button-before-height:100% !default;
+$u-button-before-transform:translate(-50%, -50%) !default;
+$u-button-before-opacity:0 !default;
+$u-button-before-background-color:#000 !default;
+$u-button-before-border-color:#000 !default;
+$u-button-active-before-opacity:.15 !default;
+$u-button-icon-margin-left:4px !default;
+$u-button-plain-u-button-info-color:$u-info;
+$u-button-plain-u-button-success-color:$u-success;
+$u-button-plain-u-button-error-color:$u-error;
+$u-button-plain-u-button-warning-color:$u-error;
+
+.u-button {
+	width: 100%;
+	
+	&__text {
+		white-space: nowrap;
+		line-height: 1;
+	}
+	
+	&:before {
+		position: absolute;
+		top:$u-button-before-top;
+		left:$u-button-before-left;
+		width:$u-button-before-width;
+		height:$u-button-before-height;
+		border: inherit;
+		border-radius: inherit;
+		transform:$u-button-before-transform;
+		opacity:$u-button-before-opacity;
+		content: " ";
+		background-color:$u-button-before-background-color;
+		border-color:$u-button-before-border-color;
+	}
+	
+	&--active {
+		&:before {
+			opacity: .15
+		}
+	}
+	
+	&__icon+&__text:not(:empty),
+	&__loading-text {
+		margin-left:$u-button-icon-margin-left;
+	}
+	
+	&--plain {
+		&.u-button--primary {
+			color: $u-primary;
+		}
+	}
+	
+	&--plain {
+		&.u-button--info {
+			color:$u-button-plain-u-button-info-color;
+		}
+	}
+	
+	&--plain {
+		&.u-button--success {
+			color:$u-button-plain-u-button-success-color;
+		}
+	}
+	
+	&--plain {
+		&.u-button--error {
+			color:$u-button-plain-u-button-error-color;
+		}
+	}
+	
+	&--plain {
+		&.u-button--warning {
+			color:$u-button-plain-u-button-warning-color;
+		}
+	}
+}

+ 99 - 0
uni_modules/uview-ui/components/u-calendar/header.vue

@@ -0,0 +1,99 @@
+<template>
+	<view class="u-calendar-header u-border-bottom">
+		<text
+			class="u-calendar-header__title"
+			v-if="showTitle"
+		>{{ title }}</text>
+		<text
+			class="u-calendar-header__subtitle"
+			v-if="showSubtitle"
+		>{{ subtitle }}</text>
+		<view class="u-calendar-header__weekdays">
+			<text class="u-calendar-header__weekdays__weekday">一</text>
+			<text class="u-calendar-header__weekdays__weekday">二</text>
+			<text class="u-calendar-header__weekdays__weekday">三</text>
+			<text class="u-calendar-header__weekdays__weekday">四</text>
+			<text class="u-calendar-header__weekdays__weekday">五</text>
+			<text class="u-calendar-header__weekdays__weekday">六</text>
+			<text class="u-calendar-header__weekdays__weekday">日</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'u-calendar-header',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin],
+		props: {
+			// 标题
+			title: {
+				type: String,
+				default: ''
+			},
+			// 副标题
+			subtitle: {
+				type: String,
+				default: ''
+			},
+			// 是否显示标题
+			showTitle: {
+				type: Boolean,
+				default: true
+			},
+			// 是否显示副标题
+			showSubtitle: {
+				type: Boolean,
+				default: true
+			},
+		},
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+			name() {
+
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-calendar-header {
+		padding-bottom: 4px;
+
+		&__title {
+			font-size: 16px;
+			color: $u-main-color;
+			text-align: center;
+			height: 42px;
+			line-height: 42px;
+			font-weight: bold;
+		}
+
+		&__subtitle {
+			font-size: 14px;
+			color: $u-main-color;
+			height: 40px;
+			text-align: center;
+			line-height: 40px;
+			font-weight: bold;
+		}
+
+		&__weekdays {
+			@include flex;
+			justify-content: space-between;
+
+			&__weekday {
+				font-size: 13px;
+				color: $u-main-color;
+				line-height: 30px;
+				flex: 1;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 579 - 0
uni_modules/uview-ui/components/u-calendar/month.vue

@@ -0,0 +1,579 @@
+<template>
+	<view class="u-calendar-month-wrapper" ref="u-calendar-month-wrapper">
+		<view v-for="(item, index) in months" :key="index" :class="[`u-calendar-month-${index}`]"
+			:ref="`u-calendar-month-${index}`" :id="`month-${index}`">
+			<text v-if="index !== 0" class="u-calendar-month__title">{{ item.year }}年{{ item.month }}月</text>
+			<view class="u-calendar-month__days">
+				<view v-if="showMark" class="u-calendar-month__days__month-mark-wrapper">
+					<text class="u-calendar-month__days__month-mark-wrapper__text">{{ item.month }}</text>
+				</view>
+				<view class="u-calendar-month__days__day" v-for="(item1, index1) in item.date" :key="index1"
+					:style="[dayStyle(index, index1, item1)]" @tap="clickHandler(index, index1, item1)"
+					:class="[item1.selected && 'u-calendar-month__days__day__select--selected']">
+					<view class="u-calendar-month__days__day__select" :style="[daySelectStyle(index, index1, item1)]">
+						<text class="u-calendar-month__days__day__select__info"
+							:class="[item1.disabled && 'u-calendar-month__days__day__select__info--disabled']"
+							:style="[textStyle(item1)]">{{ item1.day }}</text>
+						<text v-if="getBottomInfo(index, index1, item1)"
+							class="u-calendar-month__days__day__select__buttom-info"
+							:class="[item1.disabled && 'u-calendar-month__days__day__select__buttom-info--disabled']"
+							:style="[textStyle(item1)]">{{ getBottomInfo(index, index1, item1) }}</text>
+						<text v-if="item1.dot" class="u-calendar-month__days__day__select__dot"></text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-NVUE
+	// 由于nvue不支持百分比单位,需要查询宽度来计算每个日期的宽度
+	const dom = uni.requireNativePlugin('dom')
+	// #endif
+	import dayjs from '../../libs/util/dayjs.js';
+	export default {
+		name: 'u-calendar-month',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin],
+		props: {
+			// 是否显示月份背景色
+			showMark: {
+				type: Boolean,
+				default: true
+			},
+			// 主题色,对底部按钮和选中日期有效
+			color: {
+				type: String,
+				default: '#3c9cff'
+			},
+			// 月份数据
+			months: {
+				type: Array,
+				default: () => []
+			},
+			// 日期选择类型
+			mode: {
+				type: String,
+				default: 'single'
+			},
+			// 日期行高
+			rowHeight: {
+				type: [String, Number],
+				default: 58
+			},
+			// mode=multiple时,最多可选多少个日期
+			maxCount: {
+				type: [String, Number],
+				default: Infinity
+			},
+			// mode=range时,第一个日期底部的提示文字
+			startText: {
+				type: String,
+				default: '开始'
+			},
+			// mode=range时,最后一个日期底部的提示文字
+			endText: {
+				type: String,
+				default: '结束'
+			},
+			// 默认选中的日期,mode为multiple或range是必须为数组格式
+			defaultDate: {
+				type: [Array, String, Date],
+				default: null
+			},
+			// 最小的可选日期
+			minDate: {
+				type: [String, Number],
+				default: 0
+			},
+			// 最大可选日期
+			maxDate: {
+				type: [String, Number],
+				default: 0
+			},
+			// 如果没有设置maxDate,则往后推多少个月
+			maxMonth: {
+				type: [String, Number],
+				default: 2
+			},
+			// 是否为只读状态,只读状态下禁止选择日期
+			readonly: {
+				type: Boolean,
+				default: uni.$u.props.calendar.readonly
+			},
+			// 日期区间最多可选天数,默认无限制,mode = range时有效
+			maxRange: {
+				type: [Number, String],
+				default: Infinity
+			},
+			// 范围选择超过最多可选天数时的提示文案,mode = range时有效
+			rangePrompt: {
+				type: String,
+				default: ''
+			},
+			// 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
+			showRangePrompt: {
+				type: Boolean,
+				default: true
+			},
+			// 是否允许日期范围的起止时间为同一天,mode = range时有效
+			allowSameDay: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				// 每个日期的宽度
+				width: 0,
+				// 当前选中的日期item
+				item: {},
+				selected: []
+			}
+		},
+		watch: {
+			selectedChange: {
+				immediate: true,
+				handler(n) {
+					this.setDefaultDate()
+				}
+			}
+		},
+		computed: {
+			// 多个条件的变化,会引起选中日期的变化,这里统一管理监听
+			selectedChange() {
+				return [this.minDate, this.maxDate, this.defaultDate]
+			},
+			dayStyle(index1, index2, item) {
+				return (index1, index2, item) => {
+					const style = {}
+					let week = item.week
+					// 不进行四舍五入的形式保留2位小数
+					const dayWidth = Number(parseFloat(this.width / 7).toFixed(3).slice(0, -1))
+					// 得出每个日期的宽度
+					// #ifdef APP-NVUE
+					style.width = uni.$u.addUnit(dayWidth)
+					// #endif
+					style.height = uni.$u.addUnit(this.rowHeight)
+					if (index2 === 0) {
+						// 获取当前为星期几,如果为0,则为星期天,减一为每月第一天时,需要向左偏移的item个数
+						week = (week === 0 ? 7 : week) - 1
+						style.marginLeft = uni.$u.addUnit(week * dayWidth)
+					}
+					if (this.mode === 'range') {
+						// 之所以需要这么写,是因为DCloud公司的iOS客户端的开发者能力有限导致的bug
+						style.paddingLeft = 0
+						style.paddingRight = 0
+						style.paddingBottom = 0
+						style.paddingTop = 0
+					}
+					return style
+				}
+			},
+			daySelectStyle() {
+				return (index1, index2, item) => {
+					let date = dayjs(item.date).format("YYYY-MM-DD"),
+						style = {}
+					// 判断date是否在selected数组中,因为月份可能会需要补0,所以使用dateSame判断,而不用数组的includes判断
+					if (this.selected.some(item => this.dateSame(item, date))) {
+						style.backgroundColor = this.color
+					}
+					if (this.mode === 'single') {
+						if (date === this.selected[0]) {
+							// 因为需要对nvue的兼容,只能这么写,无法缩写,也无法通过类名控制等等
+							style.borderTopLeftRadius = '3px'
+							style.borderBottomLeftRadius = '3px'
+							style.borderTopRightRadius = '3px'
+							style.borderBottomRightRadius = '3px'
+						}
+					} else if (this.mode === 'range') {
+						if (this.selected.length >= 2) {
+							const len = this.selected.length - 1
+							// 第一个日期设置左上角和左下角的圆角
+							if (this.dateSame(date, this.selected[0])) {
+								style.borderTopLeftRadius = '3px'
+								style.borderBottomLeftRadius = '3px'
+							}
+							// 最后一个日期设置右上角和右下角的圆角
+							if (this.dateSame(date, this.selected[len])) {
+								style.borderTopRightRadius = '3px'
+								style.borderBottomRightRadius = '3px'
+							}
+							// 处于第一和最后一个之间的日期,背景色设置为浅色,通过将对应颜色进行等分,再取其尾部的颜色值
+							if (dayjs(date).isAfter(dayjs(this.selected[0])) && dayjs(date).isBefore(dayjs(this
+									.selected[len]))) {
+								style.backgroundColor = uni.$u.colorGradient(this.color, '#ffffff', 100)[90]
+								// 增加一个透明度,让范围区间的背景色也能看到底部的mark水印字符
+								style.opacity = 0.7
+							}
+						} else if (this.selected.length === 1) {
+							// 之所以需要这么写,是因为DCloud公司的iOS客户端的开发者能力有限导致的bug
+							// 进行还原操作,否则在nvue的iOS,uni-app有bug,会导致诡异的表现
+							style.borderTopLeftRadius = '3px'
+							style.borderBottomLeftRadius = '3px'
+						}
+					} else {
+						if (this.selected.some(item => this.dateSame(item, date))) {
+							style.borderTopLeftRadius = '3px'
+							style.borderBottomLeftRadius = '3px'
+							style.borderTopRightRadius = '3px'
+							style.borderBottomRightRadius = '3px'
+						}
+					}
+					return style
+				}
+			},
+			// 某个日期是否被选中
+			textStyle() {
+				return (item) => {
+					const date = dayjs(item.date).format("YYYY-MM-DD"),
+						style = {}
+					// 选中的日期,提示文字设置白色
+					if (this.selected.some(item => this.dateSame(item, date))) {
+						style.color = '#ffffff'
+					}
+					if (this.mode === 'range') {
+						const len = this.selected.length - 1
+						// 如果是范围选择模式,第一个和最后一个之间的日期,文字颜色设置为高亮的主题色
+						if (dayjs(date).isAfter(dayjs(this.selected[0])) && dayjs(date).isBefore(dayjs(this
+								.selected[len]))) {
+							style.color = this.color
+						}
+					}
+					return style
+				}
+			},
+			// 获取底部的提示文字
+			getBottomInfo() {
+				return (index1, index2, item) => {
+					const date = dayjs(item.date).format("YYYY-MM-DD")
+					const bottomInfo = item.bottomInfo
+					// 当为日期范围模式时,且选择的日期个数大于0时
+					if (this.mode === 'range' && this.selected.length > 0) {
+						if (this.selected.length === 1) {
+							// 选择了一个日期时,如果当前日期为数组中的第一个日期,则显示底部文字为“开始”
+							if (this.dateSame(date, this.selected[0])) return this.startText
+							else return bottomInfo
+						} else {
+							const len = this.selected.length - 1
+							// 如果数组中的日期大于2个时,第一个和最后一个显示为开始和结束日期
+							if (this.dateSame(date, this.selected[0]) && this.dateSame(date, this.selected[1]) &&
+								len === 1) {
+								// 如果长度为2,且第一个等于第二个日期,则提示语放在同一个item中
+								return `${this.startText}/${this.endText}`
+							} else if (this.dateSame(date, this.selected[0])) {
+								return this.startText
+							} else if (this.dateSame(date, this.selected[len])) {
+								return this.endText
+							} else {
+								return bottomInfo
+							}
+						}
+					} else {
+						return bottomInfo
+					}
+				}
+			}
+		},
+		mounted() {
+			this.init()
+		},
+		methods: {
+			init() {
+				// 初始化默认选中
+				this.$emit('monthSelected', this.selected)
+				this.$nextTick(() => {
+					// 这里需要另一个延时,因为获取宽度后,会进行月份数据渲染,只有渲染完成之后,才有真正的高度
+					// 因为nvue下,$nextTick并不是100%可靠的
+					uni.$u.sleep(10).then(() => {
+						this.getWrapperWidth()
+						this.getMonthRect()
+					})
+				})
+			},
+			// 判断两个日期是否相等
+			dateSame(date1, date2) {
+				return dayjs(date1).isSame(dayjs(date2))
+			},
+			// 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度
+			getWrapperWidth() {
+				// #ifdef APP-NVUE
+				dom.getComponentRect(this.$refs['u-calendar-month-wrapper'], res => {
+					this.width = res.size.width
+				})
+				// #endif
+				// #ifndef APP-NVUE
+				this.$uGetRect('.u-calendar-month-wrapper').then(size => {
+					this.width = size.width
+				})
+				// #endif
+			},
+			getMonthRect() {
+				// 获取每个月份数据的尺寸,用于父组件在scroll-view滚动事件中,监听当前滚动到了第几个月份
+				const promiseAllArr = this.months.map((item, index) => this.getMonthRectByPromise(
+					`u-calendar-month-${index}`))
+				// 一次性返回
+				Promise.all(promiseAllArr).then(
+					sizes => {
+						let height = 1
+						const topArr = []
+						for (let i = 0; i < this.months.length; i++) {
+							// 添加到months数组中,供scroll-view滚动事件中,判断当前滚动到哪个月份
+							topArr[i] = height
+							height += sizes[i].height
+						}
+						// 由于微信下,无法通过this.months[i].top的形式(引用类型)去修改父组件的month的top值,所以使用事件形式对外发出
+						this.$emit('updateMonthTop', topArr)
+					})
+			},
+			// 获取每个月份区域的尺寸
+			getMonthRectByPromise(el) {
+				// #ifndef APP-NVUE
+				// $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://www.uviewui.com/js/getRect.html
+				// 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
+				return new Promise(resolve => {
+					this.$uGetRect(`.${el}`).then(size => {
+						resolve(size)
+					})
+				})
+				// #endif
+
+				// #ifdef APP-NVUE
+				// nvue下,使用dom模块查询元素高度
+				// 返回一个promise,让调用此方法的主体能使用then回调
+				return new Promise(resolve => {
+					dom.getComponentRect(this.$refs[el][0], res => {
+						resolve(res.size)
+					})
+				})
+				// #endif
+			},
+			// 点击某一个日期
+			clickHandler(index1, index2, item) {
+				if (this.readonly) {
+					return;
+				}
+				this.item = item
+				const date = dayjs(item.date).format("YYYY-MM-DD")
+				if (item.disabled) return
+				// 对上一次选择的日期数组进行深度克隆
+				let selected = uni.$u.deepClone(this.selected)
+				if (this.mode === 'single') {
+					// 单选情况下,让数组中的元素为当前点击的日期
+					selected = [date]
+				} else if (this.mode === 'multiple') {
+					if (selected.some(item => this.dateSame(item, date))) {
+						// 如果点击的日期已在数组中,则进行移除操作,也就是达到反选的效果
+						const itemIndex = selected.findIndex(item => item === date)
+						selected.splice(itemIndex, 1)
+					} else {
+						// 如果点击的日期不在数组中,且已有的长度小于总可选长度时,则添加到数组中去
+						if (selected.length < this.maxCount) selected.push(date)
+					}
+				} else {
+					// 选择区间形式
+					if (selected.length === 0 || selected.length >= 2) {
+						// 如果原来就为0或者大于2的长度,则当前点击的日期,就是开始日期
+						selected = [date]
+					} else if (selected.length === 1) {
+						// 如果已经选择了开始日期
+						const existsDate = selected[0]
+						// 如果当前选择的日期小于上一次选择的日期,则当前的日期定为开始日期
+						if (dayjs(date).isBefore(existsDate)) {
+							selected = [date]
+						} else if (dayjs(date).isAfter(existsDate)) {
+							// 当前日期减去最大可选的日期天数,如果大于起始时间,则进行提示
+							if(dayjs(dayjs(date).subtract(this.maxRange, 'day')).isAfter(dayjs(selected[0])) && this.showRangePrompt) {
+								if(this.rangePrompt) {
+									uni.$u.toast(this.rangePrompt)
+								} else {
+									uni.$u.toast(`选择天数不能超过 ${this.maxRange} 天`)
+								}
+								return
+							}
+							// 如果当前日期大于已有日期,将当前的添加到数组尾部
+							selected.push(date)
+							const startDate = selected[0]
+							const endDate = selected[1]
+							const arr = []
+							let i = 0
+							do {
+								// 将开始和结束日期之间的日期添加到数组中
+								arr.push(dayjs(startDate).add(i, 'day').format("YYYY-MM-DD"))
+								i++
+								// 累加的日期小于结束日期时,继续下一次的循环
+							} while (dayjs(startDate).add(i, 'day').isBefore(dayjs(endDate)))
+							// 为了一次性修改数组,避免computed中多次触发,这里才用arr变量一次性赋值的方式,同时将最后一个日期添加近来
+							arr.push(endDate)
+							selected = arr
+						} else {
+							// 选择区间时,只有一个日期的情况下,且不允许选择起止为同一天的话,不允许选择自己
+							if (selected[0] === date && !this.allowSameDay) return
+							selected.push(date)
+						}
+					}
+				}
+				this.setSelected(selected)
+			},
+			// 设置默认日期
+			setDefaultDate() {
+				if (!this.defaultDate) {
+					// 如果没有设置默认日期,则将当天日期设置为默认选中的日期
+					const selected = [dayjs().format("YYYY-MM-DD")]
+					return this.setSelected(selected, false)
+				}
+				let defaultDate = []
+				const minDate = this.minDate || dayjs().format("YYYY-MM-DD")
+				const maxDate = this.maxDate || dayjs(minDate).add(this.maxMonth - 1, 'month').format("YYYY-MM-DD")
+				if (this.mode === 'single') {
+					// 单选模式,可以是字符串或数组,Date对象等
+					if (!uni.$u.test.array(this.defaultDate)) {
+						defaultDate = [dayjs(this.defaultDate).format("YYYY-MM-DD")]
+					} else {
+						defaultDate = [this.defaultDate[0]]
+					}
+				} else {
+					// 如果为非数组,则不执行
+					if (!uni.$u.test.array(this.defaultDate)) return
+					defaultDate = this.defaultDate
+				}
+				// 过滤用户传递的默认数组,取出只在可允许最大值与最小值之间的元素
+				defaultDate = defaultDate.filter(item => {
+					return dayjs(item).isAfter(dayjs(minDate).subtract(1, 'day')) && dayjs(item).isBefore(dayjs(
+						maxDate).add(1, 'day'))
+				})
+				this.setSelected(defaultDate, false)
+			},
+			setSelected(selected, event = true) {
+				this.selected = selected
+				event && this.$emit('monthSelected', this.selected)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-calendar-month-wrapper {
+		margin-top: 4px;
+	}
+
+	.u-calendar-month {
+
+		&__title {
+			font-size: 14px;
+			line-height: 42px;
+			height: 42px;
+			color: $u-main-color;
+			text-align: center;
+			font-weight: bold;
+		}
+
+		&__days {
+			position: relative;
+			@include flex;
+			flex-wrap: wrap;
+
+			&__month-mark-wrapper {
+				position: absolute;
+				top: 0;
+				bottom: 0;
+				left: 0;
+				right: 0;
+				@include flex;
+				justify-content: center;
+				align-items: center;
+
+				&__text {
+					font-size: 155px;
+					color: rgba(231, 232, 234, 0.83);
+				}
+			}
+
+			&__day {
+				@include flex;
+				padding: 2px;
+				/* #ifndef APP-NVUE */
+				// vue下使用css进行宽度计算,因为某些安卓机会无法进行js获取父元素宽度进行计算得出,会有偏移
+				width: calc(100% / 7);
+				box-sizing: border-box;
+				/* #endif */
+
+				&__select {
+					flex: 1;
+					@include flex;
+					align-items: center;
+					justify-content: center;
+					position: relative;
+
+					&__dot {
+						width: 7px;
+						height: 7px;
+						border-radius: 100px;
+						background-color: $u-error;
+						position: absolute;
+						top: 12px;
+						right: 7px;
+					}
+
+					&__buttom-info {
+						color: $u-content-color;
+						text-align: center;
+						position: absolute;
+						bottom: 5px;
+						font-size: 10px;
+						text-align: center;
+						left: 0;
+						right: 0;
+
+						&--selected {
+							color: #ffffff;
+						}
+
+						&--disabled {
+							color: #cacbcd;
+						}
+					}
+
+					&__info {
+						text-align: center;
+						font-size: 16px;
+
+						&--selected {
+							color: #ffffff;
+						}
+
+						&--disabled {
+							color: #cacbcd;
+						}
+					}
+
+					&--selected {
+						background-color: $u-primary;
+						@include flex;
+						justify-content: center;
+						align-items: center;
+						flex: 1;
+						border-radius: 3px;
+					}
+
+					&--range-selected {
+						opacity: 0.3;
+						border-radius: 0;
+					}
+
+					&--range-start-selected {
+						border-top-right-radius: 0;
+						border-bottom-right-radius: 0;
+					}
+
+					&--range-end-selected {
+						border-top-left-radius: 0;
+						border-bottom-left-radius: 0;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 144 - 0
uni_modules/uview-ui/components/u-calendar/props.js

@@ -0,0 +1,144 @@
+export default {
+    props: {
+        // 日历顶部标题
+        title: {
+            type: String,
+            default: uni.$u.props.calendar.title
+        },
+        // 是否显示标题
+        showTitle: {
+            type: Boolean,
+            default: uni.$u.props.calendar.showTitle
+        },
+        // 是否显示副标题
+        showSubtitle: {
+            type: Boolean,
+            default: uni.$u.props.calendar.showSubtitle
+        },
+        // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围
+        mode: {
+            type: String,
+            default: uni.$u.props.calendar.mode
+        },
+        // mode=range时,第一个日期底部的提示文字
+        startText: {
+            type: String,
+            default: uni.$u.props.calendar.startText
+        },
+        // mode=range时,最后一个日期底部的提示文字
+        endText: {
+            type: String,
+            default: uni.$u.props.calendar.endText
+        },
+        // 自定义列表
+        customList: {
+            type: Array,
+            default: uni.$u.props.calendar.customList
+        },
+        // 主题色,对底部按钮和选中日期有效
+        color: {
+            type: String,
+            default: uni.$u.props.calendar.color
+        },
+        // 最小的可选日期
+        minDate: {
+            type: [String, Number],
+            default: uni.$u.props.calendar.minDate
+        },
+        // 最大可选日期
+        maxDate: {
+            type: [String, Number],
+            default: uni.$u.props.calendar.maxDate
+        },
+        // 默认选中的日期,mode为multiple或range是必须为数组格式
+        defaultDate: {
+            type: [Array, String, Date, null],
+            default: uni.$u.props.calendar.defaultDate
+        },
+        // mode=multiple时,最多可选多少个日期
+        maxCount: {
+            type: [String, Number],
+            default: uni.$u.props.calendar.maxCount
+        },
+        // 日期行高
+        rowHeight: {
+            type: [String, Number],
+            default: uni.$u.props.calendar.rowHeight
+        },
+        // 日期格式化函数
+        formatter: {
+            type: [Function, null],
+            default: uni.$u.props.calendar.formatter
+        },
+        // 是否显示农历
+        showLunar: {
+            type: Boolean,
+            default: uni.$u.props.calendar.showLunar
+        },
+        // 是否显示月份背景色
+        showMark: {
+            type: Boolean,
+            default: uni.$u.props.calendar.showMark
+        },
+        // 确定按钮的文字
+        confirmText: {
+            type: String,
+            default: uni.$u.props.calendar.confirmText
+        },
+        // 确认按钮处于禁用状态时的文字
+        confirmDisabledText: {
+            type: String,
+            default: uni.$u.props.calendar.confirmDisabledText
+        },
+        // 是否显示日历弹窗
+        show: {
+            type: Boolean,
+            default: uni.$u.props.calendar.show
+        },
+        // 是否允许点击遮罩关闭日历
+        closeOnClickOverlay: {
+            type: Boolean,
+            default: uni.$u.props.calendar.closeOnClickOverlay
+        },
+        // 是否为只读状态,只读状态下禁止选择日期
+        readonly: {
+            type: Boolean,
+            default: uni.$u.props.calendar.readonly
+        },
+        // 	是否展示确认按钮
+        showConfirm: {
+            type: Boolean,
+            default: uni.$u.props.calendar.showConfirm
+        },
+        // 日期区间最多可选天数,默认无限制,mode = range时有效
+        maxRange: {
+            type: [Number, String],
+            default: uni.$u.props.calendar.maxRange
+        },
+        // 范围选择超过最多可选天数时的提示文案,mode = range时有效
+        rangePrompt: {
+            type: String,
+            default: uni.$u.props.calendar.rangePrompt
+        },
+        // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
+        showRangePrompt: {
+            type: Boolean,
+            default: uni.$u.props.calendar.showRangePrompt
+        },
+        // 是否允许日期范围的起止时间为同一天,mode = range时有效
+        allowSameDay: {
+            type: Boolean,
+            default: uni.$u.props.calendar.allowSameDay
+        },
+		// 圆角值
+		round: {
+		    type: [Boolean, String, Number],
+		    default: uni.$u.props.calendar.round
+		},
+		// 最多展示月份数量
+		monthNum: {
+			type: [Number, String],
+			default: 3
+		}	
+    }
+}

+ 384 - 0
uni_modules/uview-ui/components/u-calendar/u-calendar.vue

@@ -0,0 +1,384 @@
+<template>
+	<u-popup
+		:show="show"
+		mode="bottom"
+		closeable
+		@close="close"
+		:round="round"
+		:closeOnClickOverlay="closeOnClickOverlay"
+	>
+		<view class="u-calendar">
+			<uHeader
+				:title="title"
+				:subtitle="subtitle"
+				:showSubtitle="showSubtitle"
+				:showTitle="showTitle"
+			></uHeader>
+			<scroll-view
+				:style="{
+                    height: $u.addUnit(listHeight)
+                }"
+				scroll-y
+				@scroll="onScroll"
+				:scroll-top="scrollTop"
+				:scrollIntoView="scrollIntoView"
+			>
+				<uMonth
+					:color="color"
+					:rowHeight="rowHeight"
+					:showMark="showMark"
+					:months="months"
+					:mode="mode"
+					:maxCount="maxCount"
+					:startText="startText"
+					:endText="endText"
+					:defaultDate="defaultDate"
+					:minDate="innerMinDate"
+					:maxDate="innerMaxDate"
+					:maxMonth="monthNum"
+					:readonly="readonly"
+					:maxRange="maxRange"
+					:rangePrompt="rangePrompt"
+					:showRangePrompt="showRangePrompt"
+					:allowSameDay="allowSameDay"
+					ref="month"
+					@monthSelected="monthSelected"
+					@updateMonthTop="updateMonthTop"
+				></uMonth>
+			</scroll-view>
+			<slot name="footer" v-if="showConfirm">
+				<view class="u-calendar__confirm">
+					<u-button
+						shape="circle"
+						:text="
+                            buttonDisabled ? confirmDisabledText : confirmText
+                        "
+						:color="color"
+						@click="confirm"
+						:disabled="buttonDisabled"
+					></u-button>
+				</view>
+			</slot>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+import uHeader from './header.vue'
+import uMonth from './month.vue'
+import props from './props.js'
+import util from './util.js'
+import dayjs from '../../libs/util/dayjs.js'
+import Calendar from '../../libs/util/calendar.js'
+/**
+ * Calendar 日历
+ * @description  此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中.
+ * @tutorial https://www.uviewui.com/components/calendar.html
+ *
+ * @property {String}				title				标题内容 (默认 日期选择 )
+ * @property {Boolean}				showTitle			是否显示标题  (默认 true )
+ * @property {Boolean}				showSubtitle		是否显示副标题	(默认 true )
+ * @property {String}				mode				日期类型选择  single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围 ( 默认 'single' )
+ * @property {String}				startText			mode=range时,第一个日期底部的提示文字  (默认 '开始' )
+ * @property {String}				endText				mode=range时,最后一个日期底部的提示文字 (默认 '结束' )
+ * @property {Array}				customList			自定义列表
+ * @property {String}				color				主题色,对底部按钮和选中日期有效  (默认 ‘#3c9cff' )
+ * @property {String | Number}		minDate				最小的可选日期	 (默认 0 )
+ * @property {String | Number}		maxDate				最大可选日期  (默认 0 )
+ * @property {Array | String| Date}	defaultDate			默认选中的日期,mode为multiple或range是必须为数组格式
+ * @property {String | Number}		maxCount			mode=multiple时,最多可选多少个日期  (默认 	Number.MAX_SAFE_INTEGER  )
+ * @property {String | Number}		rowHeight			日期行高 (默认 56 )
+ * @property {Function}				formatter			日期格式化函数
+ * @property {Boolean}				showLunar			是否显示农历  (默认 false )
+ * @property {Boolean}				showMark			是否显示月份背景色 (默认 true )
+ * @property {String}				confirmText			确定按钮的文字 (默认 '确定' )
+ * @property {String}				confirmDisabledText	确认按钮处于禁用状态时的文字 (默认 '确定' )
+ * @property {Boolean}				show				是否显示日历弹窗 (默认 false )
+ * @property {Boolean}				closeOnClickOverlay	是否允许点击遮罩关闭日历 (默认 false )
+ * @property {Boolean}				readonly	        是否为只读状态,只读状态下禁止选择日期 (默认 false )
+ * @property {String | Number}		maxRange	        日期区间最多可选天数,默认无限制,mode = range时有效
+ * @property {String}				rangePrompt	        范围选择超过最多可选天数时的提示文案,mode = range时有效
+ * @property {Boolean}				showRangePrompt	    范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 (默认 true )
+ * @property {Boolean}				allowSameDay	    是否允许日期范围的起止时间为同一天,mode = range时有效 (默认 false )
+ * @property {Number|String}	    round				圆角值,默认无圆角  (默认 0 )
+ * @property {Number|String}	    monthNum			最多展示的月份数量  (默认 3 )
+ *
+ * @event {Function()} confirm 		点击确定按钮时触发		选择日期相关的返回参数
+ * @event {Function()} close 		日历关闭时触发			可定义页面关闭时的回调事件
+ * @example <u-calendar  :defaultDate="defaultDateMultiple" :show="show" mode="multiple" @confirm="confirm">
+	</u-calendar>
+ * */
+export default {
+	name: 'u-calendar',
+	mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+	components: {
+		uHeader,
+		uMonth
+	},
+	data() {
+		return {
+			// 需要显示的月份的数组
+			months: [],
+			// 在月份滚动区域中,当前视图中月份的index索引
+			monthIndex: 0,
+			// 月份滚动区域的高度
+			listHeight: 0,
+			// month组件中选择的日期数组
+			selected: [],
+			scrollIntoView: '',
+			scrollTop:0,
+			// 过滤处理方法
+			innerFormatter: (value) => value
+		}
+	},
+	watch: {
+		selectedChange: {
+			immediate: true,
+			handler(n) {
+				this.setMonth()
+			}
+		},
+		// 打开弹窗时,设置月份数据
+		show: {
+			immediate: true,
+			handler(n) {
+				this.setMonth()
+			}
+		}
+	},
+	computed: {
+		// 由于maxDate和minDate可以为字符串(2021-10-10),或者数值(时间戳),但是dayjs如果接受字符串形式的时间戳会有问题,这里进行处理
+		innerMaxDate() {
+			return uni.$u.test.number(this.maxDate)
+				? Number(this.maxDate)
+				: this.maxDate
+		},
+		innerMinDate() {
+			return uni.$u.test.number(this.minDate)
+				? Number(this.minDate)
+				: this.minDate
+		},
+		// 多个条件的变化,会引起选中日期的变化,这里统一管理监听
+		selectedChange() {
+			return [this.innerMinDate, this.innerMaxDate, this.defaultDate]
+		},
+		subtitle() {
+			// 初始化时,this.months为空数组,所以需要特别判断处理
+			if (this.months.length) {
+				return `${this.months[this.monthIndex].year}年${
+					this.months[this.monthIndex].month
+				}月`
+			} else {
+				return ''
+			}
+		},
+		buttonDisabled() {
+			// 如果为range类型,且选择的日期个数不足1个时,让底部的按钮出于disabled状态
+			if (this.mode === 'range') {
+				if (this.selected.length <= 1) {
+					return true
+				} else {
+					return false
+				}
+			} else {
+				return false
+			}
+		}
+	},
+	mounted() {
+		this.start = Date.now()
+		this.init()
+	},
+	methods: {
+		// 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
+		setFormatter(e) {
+			this.innerFormatter = e
+		},
+		// month组件内部选择日期后,通过事件通知给父组件
+		monthSelected(e) {
+			this.selected = e
+			if (!this.showConfirm) {
+				// 在不需要确认按钮的情况下,如果为单选,或者范围多选且已选长度大于2,则直接进行返还
+				if (
+					this.mode === 'multiple' ||
+					this.mode === 'single' ||
+					(this.mode === 'range' && this.selected.length >= 2)
+				) {
+					this.$emit('confirm', this.selected)
+				}
+			}
+		},
+		init() {
+			// 校验maxDate,不能小于minDate
+			if (
+				this.innerMaxDate &&
+				this.innerMinDate &&
+				new Date(this.innerMaxDate).getTime() < new Date(this.innerMinDate).getTime()
+			) {
+				return uni.$u.error('maxDate不能小于minDate')
+			}
+			// 滚动区域的高度
+			this.listHeight = this.rowHeight * 5 + 30
+			this.setMonth()
+		},
+		close() {
+			this.$emit('close')
+		},
+		// 点击确定按钮
+		confirm() {
+			if (!this.buttonDisabled) {
+				this.$emit('confirm', this.selected)
+			}
+		},
+		// 获得两个日期之间的月份数
+		getMonths(minDate, maxDate) {
+			const minYear = dayjs(minDate).year()
+			const minMonth = dayjs(minDate).month() + 1
+			const maxYear = dayjs(maxDate).year()
+			const maxMonth = dayjs(maxDate).month() + 1
+			return (maxYear - minYear) * 12 + (maxMonth - minMonth) + 1
+		},
+		// 设置月份数据
+		setMonth() {
+			// 最小日期的毫秒数
+			const minDate = this.innerMinDate || dayjs().valueOf()
+			// 如果没有指定最大日期,则往后推3个月
+			const maxDate =
+				this.innerMaxDate ||
+				dayjs(minDate)
+					.add(this.monthNum - 1, 'month')
+					.valueOf()
+			// 最大最小月份之间的共有多少个月份,
+			const months = uni.$u.range(
+				1,
+				this.monthNum,
+				this.getMonths(minDate, maxDate)
+			)
+			// 先清空数组
+			this.months = []
+			for (let i = 0; i < months; i++) {
+				this.months.push({
+					date: new Array(
+						dayjs(minDate).add(i, 'month').daysInMonth()
+					)
+						.fill(1)
+						.map((item, index) => {
+							// 日期,取值1-31
+							let day = index + 1
+							// 星期,0-6,0为周日
+							const week = dayjs(minDate)
+								.add(i, 'month')
+								.date(day)
+								.day()
+							const date = dayjs(minDate)
+								.add(i, 'month')
+								.date(day)
+								.format('YYYY-MM-DD')
+							let bottomInfo = ''
+							if (this.showLunar) {
+								// 将日期转为农历格式
+								const lunar = Calendar.solar2lunar(
+									dayjs(date).year(),
+									dayjs(date).month() + 1,
+									dayjs(date).date()
+								)
+								bottomInfo = lunar.IDayCn
+							}
+							let config = {
+								day,
+								week,
+								// 小于最小允许的日期,或者大于最大的日期,则设置为disabled状态
+								disabled:
+									dayjs(date).isBefore(
+										dayjs(minDate).format('YYYY-MM-DD')
+									) ||
+									dayjs(date).isAfter(
+										dayjs(maxDate).format('YYYY-MM-DD')
+									),
+								// 返回一个日期对象,供外部的formatter获取当前日期的年月日等信息,进行加工处理
+								date: new Date(date),
+								bottomInfo,
+								dot: false,
+								month:
+									dayjs(minDate).add(i, 'month').month() + 1
+							}
+							const formatter =
+								this.formatter || this.innerFormatter
+							return formatter(config)
+						}),
+					// 当前所属的月份
+					month: dayjs(minDate).add(i, 'month').month() + 1,
+					// 当前年份
+					year: dayjs(minDate).add(i, 'month').year()
+				})
+			}
+
+		},
+		// 滚动到默认设置的月份
+		scrollIntoDefaultMonth(selected) {
+			// 查询默认日期在可选列表的下标
+			const _index = this.months.findIndex(({
+				  year,
+				  month
+			  }) => {
+				month = uni.$u.padZero(month)
+				return `${year}-${month}` === selected
+			})
+			if (_index !== -1) {
+				// #ifndef MP-WEIXIN
+				this.$nextTick(() => {
+					this.scrollIntoView = `month-${_index}`
+				})
+				// #endif
+				// #ifdef MP-WEIXIN
+				this.scrollTop = this.months[_index].top || 0;
+				// #endif
+			}
+		},
+		// scroll-view滚动监听
+		onScroll(event) {
+			// 不允许小于0的滚动值,如果scroll-view到顶了,继续下拉,会出现负数值
+			const scrollTop = Math.max(0, event.detail.scrollTop)
+			// 将当前滚动条数值,除以滚动区域的高度,可以得出当前滚动到了哪一个月份的索引
+			for (let i = 0; i < this.months.length; i++) {
+				if (scrollTop >= (this.months[i].top || this.listHeight)) {
+					this.monthIndex = i
+				}
+			}
+		},
+		// 更新月份的top值
+		updateMonthTop(topArr = []) {
+			// 设置对应月份的top值,用于onScroll方法更新月份
+			topArr.map((item, index) => {
+				this.months[index].top = item
+			})
+
+			// 获取默认日期的下标
+			if (!this.defaultDate) {
+				// 如果没有设置默认日期,则将当天日期设置为默认选中的日期
+				const selected = dayjs().format("YYYY-MM")
+				this.scrollIntoDefaultMonth(selected)
+				return
+			}
+			let selected = dayjs().format("YYYY-MM");
+			// 单选模式,可以是字符串或数组,Date对象等
+			if (!uni.$u.test.array(this.defaultDate)) {
+				selected = dayjs(this.defaultDate).format("YYYY-MM")
+			} else {
+				selected = dayjs(this.defaultDate[0]).format("YYYY-MM");
+			}
+			this.scrollIntoDefaultMonth(selected)
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+@import '../../libs/css/components.scss';
+
+.u-calendar {
+	&__confirm {
+		padding: 7px 18px;
+	}
+}
+</style>

+ 85 - 0
uni_modules/uview-ui/components/u-calendar/util.js

@@ -0,0 +1,85 @@
+export default {
+    methods: {
+        // 设置月份数据
+        setMonth() {
+            // 月初是周几
+            const day = dayjs(this.date).date(1).day()
+            const start = day == 0 ? 6 : day - 1
+
+            // 本月天数
+            const days = dayjs(this.date).endOf('month').format('D')
+
+            // 上个月天数
+            const prevDays = dayjs(this.date).endOf('month').subtract(1, 'month').format('D')
+
+            // 日期数据
+            const arr = []
+            // 清空表格
+            this.month = []
+
+            // 添加上月数据
+            arr.push(
+                ...new Array(start).fill(1).map((e, i) => {
+                    const day = prevDays - start + i + 1
+
+                    return {
+                        value: day,
+                        disabled: true,
+                        date: dayjs(this.date).subtract(1, 'month').date(day).format('YYYY-MM-DD')
+                    }
+                })
+            )
+
+            // 添加本月数据
+            arr.push(
+                ...new Array(days - 0).fill(1).map((e, i) => {
+                    const day = i + 1
+
+                    return {
+                        value: day,
+                        date: dayjs(this.date).date(day).format('YYYY-MM-DD')
+                    }
+                })
+            )
+
+            // 添加下个月
+            arr.push(
+                ...new Array(42 - days - start).fill(1).map((e, i) => {
+                    const day = i + 1
+
+                    return {
+                        value: day,
+                        disabled: true,
+                        date: dayjs(this.date).add(1, 'month').date(day).format('YYYY-MM-DD')
+                    }
+                })
+            )
+
+            // 分割数组
+            for (let n = 0; n < arr.length; n += 7) {
+                this.month.push(
+                    arr.slice(n, n + 7).map((e, i) => {
+                        e.index = i + n
+
+                        // 自定义信息
+                        const custom = this.customList.find((c) => c.date == e.date)
+
+                        // 农历
+                        if (this.lunar) {
+                            const {
+                                IDayCn,
+                                IMonthCn
+                            } = this.getLunar(e.date)
+                            e.lunar = IDayCn == '初一' ? IMonthCn : IDayCn
+                        }
+
+                        return {
+                            ...e,
+                            ...custom
+                        }
+                    })
+                )
+            }
+        }
+    }
+}

+ 14 - 0
uni_modules/uview-ui/components/u-car-keyboard/props.js

@@ -0,0 +1,14 @@
+export default {
+    props: {
+        // 是否打乱键盘按键的顺序
+        random: {
+            type: Boolean,
+            default: false
+        },
+        // 输入一个中文后,是否自动切换到英文
+        autoChange: {
+            type: Boolean,
+            default: false
+        }
+    }
+}

+ 311 - 0
uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue

@@ -0,0 +1,311 @@
+<template>
+	<view
+		class="u-keyboard"
+		@touchmove.stop.prevent="noop"
+	>
+		<view
+			v-for="(group, i) in abc ? engKeyBoardList : areaList"
+			:key="i"
+			class="u-keyboard__button"
+			:index="i"
+			:class="[i + 1 === 4 && 'u-keyboard__button--center']"
+		>
+			<view
+				v-if="i === 3"
+				class="u-keyboard__button__inner-wrapper"
+			>
+				<view
+					class="u-keyboard__button__inner-wrapper__left"
+					hover-class="u-hover-class"
+					:hover-stay-time="200"
+					@tap="changeCarInputMode"
+				>
+					<text
+						class="u-keyboard__button__inner-wrapper__left__lang"
+						:class="[!abc && 'u-keyboard__button__inner-wrapper__left__lang--active']"
+					>中</text>
+					<text class="u-keyboard__button__inner-wrapper__left__line">/</text>
+					<text
+						class="u-keyboard__button__inner-wrapper__left__lang"
+						:class="[abc && 'u-keyboard__button__inner-wrapper__left__lang--active']"
+					>英</text>
+				</view>
+			</view>
+			<view
+				class="u-keyboard__button__inner-wrapper"
+				v-for="(item, j) in group"
+				:key="j"
+			>
+				<view
+					class="u-keyboard__button__inner-wrapper__inner"
+					:hover-stay-time="200"
+					@tap="carInputClick(i, j)"
+					hover-class="u-hover-class"
+				>
+					<text class="u-keyboard__button__inner-wrapper__inner__text">{{ item }}</text>
+				</view>
+			</view>
+			<view
+				v-if="i === 3"
+				@touchstart="backspaceClick"
+				@touchend="clearTimer"
+				class="u-keyboard__button__inner-wrapper"
+			>
+				<view
+					class="u-keyboard__button__inner-wrapper__right"
+					hover-class="u-hover-class"
+					:hover-stay-time="200"
+				>
+					<u-icon
+						size="28"
+						name="backspace"
+						color="#303133"
+					></u-icon>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * keyboard 键盘组件
+	 * @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
+	 * @tutorial https://uviewui.com/components/keyboard.html
+	 * @property {Boolean} random 是否打乱键盘的顺序
+	 * @event {Function} change 点击键盘触发
+	 * @event {Function} backspace 点击退格键触发
+	 * @example <u-keyboard ref="uKeyboard" mode="car" v-model="show"></u-keyboard>
+	 */
+	export default {
+		name: "u-keyboard",
+		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+		data() {
+			return {
+				// 车牌输入时,abc=true为输入车牌号码,bac=false为输入省份中文简称
+				abc: false
+			};
+		},
+		computed: {
+			areaList() {
+				let data = [
+					'京',
+					'沪',
+					'粤',
+					'津',
+					'冀',
+					'豫',
+					'云',
+					'辽',
+					'黑',
+					'湘',
+					'皖',
+					'鲁',
+					'苏',
+					'浙',
+					'赣',
+					'鄂',
+					'桂',
+					'甘',
+					'晋',
+					'陕',
+					'蒙',
+					'吉',
+					'闽',
+					'贵',
+					'渝',
+					'川',
+					'青',
+					'琼',
+					'宁',
+					'挂',
+					'藏',
+					'港',
+					'澳',
+					'新',
+					'使',
+					'学'
+				];
+				let tmp = [];
+				// 打乱顺序
+				if (this.random) data = uni.$u.randomArray(data);
+				// 切割成二维数组
+				tmp[0] = data.slice(0, 10);
+				tmp[1] = data.slice(10, 20);
+				tmp[2] = data.slice(20, 30);
+				tmp[3] = data.slice(30, 36);
+				return tmp;
+			},
+			engKeyBoardList() {
+				let data = [
+					1,
+					2,
+					3,
+					4,
+					5,
+					6,
+					7,
+					8,
+					9,
+					0,
+					'Q',
+					'W',
+					'E',
+					'R',
+					'T',
+					'Y',
+					'U',
+					'I',
+					'O',
+					'P',
+					'A',
+					'S',
+					'D',
+					'F',
+					'G',
+					'H',
+					'J',
+					'K',
+					'L',
+					'Z',
+					'X',
+					'C',
+					'V',
+					'B',
+					'N',
+					'M'
+				];
+				let tmp = [];
+				if (this.random) data = uni.$u.randomArray(data);
+				tmp[0] = data.slice(0, 10);
+				tmp[1] = data.slice(10, 20);
+				tmp[2] = data.slice(20, 30);
+				tmp[3] = data.slice(30, 36);
+				return tmp;
+			}
+		},
+		methods: {
+			// 点击键盘按钮
+			carInputClick(i, j) {
+				let value = '';
+				// 不同模式,获取不同数组的值
+				if (this.abc) value = this.engKeyBoardList[i][j];
+				else value = this.areaList[i][j];
+				// 如果允许自动切换,则将中文状态切换为英文
+				if (!this.abc && this.autoChange) uni.$u.sleep(200).then(() => this.abc = true)
+				this.$emit('change', value);
+			},
+			// 修改汽车牌键盘的输入模式,中文|英文
+			changeCarInputMode() {
+				this.abc = !this.abc;
+			},
+			// 点击退格键
+			backspaceClick() {
+				this.$emit('backspace');
+				clearInterval(this.timer); //再次清空定时器,防止重复注册定时器
+				this.timer = null;
+				this.timer = setInterval(() => {
+					this.$emit('backspace');
+				}, 250);
+			},
+			clearTimer() {
+				clearInterval(this.timer);
+				this.timer = null;
+			},
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+	$u-car-keyboard-background-color: rgb(224, 228, 230) !default;
+	$u-car-keyboard-padding:6px 0 6px !default;
+	$u-car-keyboard-button-inner-width:64rpx !default;
+	$u-car-keyboard-button-inner-background-color:#FFFFFF !default;
+	$u-car-keyboard-button-height:80rpx !default;
+	$u-car-keyboard-button-inner-box-shadow:0 1px 0px #999992 !default;
+	$u-car-keyboard-button-border-radius:4px !default;
+	$u-car-keyboard-button-inner-margin:8rpx 5rpx !default;
+	$u-car-keyboard-button-text-font-size:16px !default;
+	$u-car-keyboard-button-text-color:$u-main-color !default;
+	$u-car-keyboard-center-inner-margin: 0 4rpx !default;
+	$u-car-keyboard-special-button-width:134rpx !default;
+	$u-car-keyboard-lang-font-size:16px !default;
+	$u-car-keyboard-lang-color:$u-main-color !default;
+	$u-car-keyboard-active-color:$u-primary !default;
+	$u-car-keyboard-line-font-size:15px !default;
+	$u-car-keyboard-line-color:$u-main-color !default;
+	$u-car-keyboard-line-margin:0 1px !default;
+	$u-car-keyboard-u-hover-class-background-color:#BBBCC6 !default;
+
+	.u-keyboard {
+		@include flex(column);
+		justify-content: space-around;
+		background-color: $u-car-keyboard-background-color;
+		align-items: stretch;
+		padding: $u-car-keyboard-padding;
+
+		&__button {
+			@include flex;
+			justify-content: center;
+			flex: 1;
+			/* #ifndef APP-NVUE */
+			/* #endif */
+
+			&__inner-wrapper {
+				box-shadow: $u-car-keyboard-button-inner-box-shadow;
+				margin: $u-car-keyboard-button-inner-margin;
+				border-radius: $u-car-keyboard-button-border-radius;
+
+				&__inner {
+					@include flex;
+					justify-content: center;
+					align-items: center;
+					width: $u-car-keyboard-button-inner-width;
+					background-color: $u-car-keyboard-button-inner-background-color;
+					height: $u-car-keyboard-button-height;
+					border-radius: $u-car-keyboard-button-border-radius;
+
+					&__text {
+						font-size: $u-car-keyboard-button-text-font-size;
+						color: $u-car-keyboard-button-text-color;
+					}
+				}
+
+				&__left,
+				&__right {
+					border-radius: $u-car-keyboard-button-border-radius;
+					width: $u-car-keyboard-special-button-width;
+					height: $u-car-keyboard-button-height;
+					background-color: $u-car-keyboard-u-hover-class-background-color;
+					@include flex;
+					justify-content: center;
+					align-items: center;
+					box-shadow: $u-car-keyboard-button-inner-box-shadow;
+				}
+
+				&__left {
+					&__line {
+						font-size: $u-car-keyboard-line-font-size;
+						color: $u-car-keyboard-line-color;
+						margin: $u-car-keyboard-line-margin;
+					}
+
+					&__lang {
+						font-size: $u-car-keyboard-lang-font-size;
+						color: $u-car-keyboard-lang-color;
+
+						&--active {
+							color: $u-car-keyboard-active-color;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.u-hover-class {
+		background-color: $u-car-keyboard-u-hover-class-background-color;
+	}
+</style>

+ 14 - 0
uni_modules/uview-ui/components/u-cell-group/props.js

@@ -0,0 +1,14 @@
+export default {
+    props: {
+        // 分组标题
+        title: {
+            type: String,
+            default: uni.$u.props.cellGroup.title
+        },
+        // 是否显示外边框
+        border: {
+            type: Boolean,
+            default: uni.$u.props.cellGroup.border
+        }
+    }
+}

+ 61 - 0
uni_modules/uview-ui/components/u-cell-group/u-cell-group.vue

@@ -0,0 +1,61 @@
+<template>
+    <view :style="[$u.addStyle(customStyle)]" :class="[customClass]" class="u-cell-group">
+        <view v-if="title" class="u-cell-group__title">
+            <slot name="title">
+				<text class="u-cell-group__title__text">{{ title }}</text>
+			</slot>
+        </view>
+        <view class="u-cell-group__wrapper">
+			<u-line v-if="border"></u-line>
+            <slot />
+        </view>
+    </view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * cellGroup  单元格
+	 * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
+	 * @tutorial https://uviewui.com/components/cell.html
+	 * 
+	 * @property {String}	title		分组标题
+	 * @property {Boolean}	border		是否显示外边框 (默认 true )
+	 * @property {Object}	customStyle	定义需要用到的外部样式
+	 * 
+	 * @event {Function} click 	点击cell列表时触发
+	 * @example <u-cell-group title="设置喜好">
+	 */
+	export default {
+		name: 'u-cell-group',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+	
+	$u-cell-group-title-padding: 16px 16px 8px !default;
+	$u-cell-group-title-font-size: 15px !default;
+	$u-cell-group-title-line-height: 16px !default;
+	$u-cell-group-title-color: $u-main-color !default;
+
+    .u-cell-group {
+		flex: 1;
+		
+        &__title {
+            padding: $u-cell-group-title-padding;
+
+            &__text {
+                font-size: $u-cell-group-title-font-size;
+                line-height: $u-cell-group-title-line-height;
+                color: $u-cell-group-title-color;
+            }
+        }
+		
+		&__wrapper {
+			position: relative;
+		}
+    }
+</style>
+

+ 110 - 0
uni_modules/uview-ui/components/u-cell/props.js

@@ -0,0 +1,110 @@
+export default {
+    props: {
+        // 标题
+        title: {
+            type: [String, Number],
+            default: uni.$u.props.cell.title
+        },
+        // 标题下方的描述信息
+        label: {
+            type: [String, Number],
+            default: uni.$u.props.cell.label
+        },
+        // 右侧的内容
+        value: {
+            type: [String, Number],
+            default: uni.$u.props.cell.value
+        },
+        // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
+        icon: {
+            type: String,
+            default: uni.$u.props.cell.icon
+        },
+        // 是否禁用cell
+        disabled: {
+            type: Boolean,
+            default: uni.$u.props.cell.disabled
+        },
+        // 是否显示下边框
+        border: {
+            type: Boolean,
+            default: uni.$u.props.cell.border
+        },
+        // 内容是否垂直居中(主要是针对右侧的value部分)
+        center: {
+            type: Boolean,
+            default: uni.$u.props.cell.center
+        },
+        // 点击后跳转的URL地址
+        url: {
+            type: String,
+            default: uni.$u.props.cell.url
+        },
+        // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
+        linkType: {
+            type: String,
+            default: uni.$u.props.cell.linkType
+        },
+        // 是否开启点击反馈(表现为点击时加上灰色背景)
+        clickable: {
+            type: Boolean,
+            default: uni.$u.props.cell.clickable
+        },
+        // 是否展示右侧箭头并开启点击反馈
+        isLink: {
+            type: Boolean,
+            default: uni.$u.props.cell.isLink
+        },
+        // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
+        required: {
+            type: Boolean,
+            default: uni.$u.props.cell.required
+        },
+        // 右侧的图标箭头
+        rightIcon: {
+            type: String,
+            default: uni.$u.props.cell.rightIcon
+        },
+        // 右侧箭头的方向,可选值为:left,up,down
+        arrowDirection: {
+            type: String,
+            default: uni.$u.props.cell.arrowDirection
+        },
+        // 左侧图标样式
+        iconStyle: {
+            type: [Object, String],
+            default: () => {
+				return uni.$u.props.cell.iconStyle
+			}
+        },
+        // 右侧箭头图标的样式
+        rightIconStyle: {
+            type: [Object, String],
+            default: () => {
+				return uni.$u.props.cell.rightIconStyle
+			}
+        },
+        // 标题的样式
+        titleStyle: {
+            type: [Object, String],
+			default: () => {
+				return uni.$u.props.cell.titleStyle
+			}
+        },
+        // 单位元的大小,可选值为large
+        size: {
+            type: String,
+            default: uni.$u.props.cell.size
+        },
+        // 点击cell是否阻止事件传播
+        stop: {
+            type: Boolean,
+            default: uni.$u.props.cell.stop
+        },
+        // 标识符,cell被点击时返回
+        name: {
+            type: [Number, String],
+            default: uni.$u.props.cell.name
+        }
+    }
+}

+ 229 - 0
uni_modules/uview-ui/components/u-cell/u-cell.vue

@@ -0,0 +1,229 @@
+<template>
+	<view class="u-cell" :class="[customClass]" :style="[$u.addStyle(customStyle)]"
+		:hover-class="(!disabled && (clickable || isLink)) ? 'u-cell--clickable' : ''" :hover-stay-time="250"
+		@tap="clickHandler">
+		<view class="u-cell__body" :class="[ center && 'u-cell--center', size === 'large' && 'u-cell__body--large']">
+			<view class="u-cell__body__content">
+				<view class="u-cell__left-icon-wrap" v-if="$slots.icon || icon">
+					<slot name="icon" v-if="$slots.icon">
+					</slot>
+					<u-icon v-else :name="icon" :custom-style="iconStyle" :size="size === 'large' ? 22 : 18"></u-icon>
+				</view>
+				<view class="u-cell__title">
+					<slot name="title">
+						<text v-if="title" class="u-cell__title-text" :style="[titleTextStyle]"
+							:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
+					</slot>
+					<slot name="label">
+						<text class="u-cell__label" v-if="label"
+							:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__label--large']">{{ label }}</text>
+					</slot>
+				</view>
+			</view>
+			<slot name="value">
+				<text class="u-cell__value"
+					:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__value--large']"
+					v-if="!$u.test.empty(value)">{{ value }}</text>
+			</slot>
+			<view class="u-cell__right-icon-wrap" v-if="$slots['right-icon'] || isLink"
+				:class="[`u-cell__right-icon-wrap--${arrowDirection}`]">
+				<slot name="right-icon" v-if="$slots['right-icon']">
+				</slot>
+				<u-icon v-else :name="rightIcon" :custom-style="rightIconStyle" :color="disabled ? '#c8c9cc' : 'info'"
+					:size="size === 'large' ? 18 : 16"></u-icon>
+			</view>
+		</view>
+		<u-line v-if="border"></u-line>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * cell  单元格
+	 * @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
+	 * @tutorial https://uviewui.com/components/cell.html
+	 * @property {String | Number}	title			标题
+	 * @property {String | Number}	label			标题下方的描述信息
+	 * @property {String | Number}	value			右侧的内容
+	 * @property {String}			icon			左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
+	 * @property {Boolean}			disabled		是否禁用cell	
+	 * @property {Boolean}			border			是否显示下边框 (默认 true )
+	 * @property {Boolean}			center			内容是否垂直居中(主要是针对右侧的value部分) (默认 false )
+	 * @property {String}			url				点击后跳转的URL地址
+	 * @property {String}			linkType		链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作 (默认 'navigateTo' )
+	 * @property {Boolean}			clickable		是否开启点击反馈(表现为点击时加上灰色背景) (默认 false ) 
+	 * @property {Boolean}			isLink			是否展示右侧箭头并开启点击反馈 (默认 false )
+	 * @property {Boolean}			required		是否显示表单状态下的必填星号(此组件可能会内嵌入input组件) (默认 false )
+	 * @property {String}			rightIcon		右侧的图标箭头 (默认 'arrow-right')
+	 * @property {String}			arrowDirection	右侧箭头的方向,可选值为:left,up,down
+	 * @property {Object | String}			rightIconStyle	右侧箭头图标的样式
+	 * @property {Object | String}			titleStyle		标题的样式
+	 * @property {Object | String}			iconStyle		左侧图标样式
+	 * @property {String}			size			单位元的大小,可选值为 large,normal,mini 
+	 * @property {Boolean}			stop			点击cell是否阻止事件传播 (默认 true )
+	 * @property {Object}			customStyle		定义需要用到的外部样式
+	 * 
+	 * @event {Function}			click			点击cell列表时触发
+	 * @example 该组件需要搭配cell-group组件使用,见官方文档示例
+	 */
+	export default {
+		name: 'u-cell',
+		data() {
+			return {
+
+			}
+		},
+		mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+		computed: {
+			titleTextStyle() {
+				return uni.$u.addStyle(this.titleStyle)
+			}
+		},
+		methods: {
+			// 点击cell
+			clickHandler(e) {
+				if (this.disabled) return
+				this.$emit('click', {
+					name: this.name
+				})
+				// 如果配置了url(此props参数通过mixin引入)参数,跳转页面
+				this.openPage()
+				// 是否阻止事件传播
+				this.stop && this.preventEvent(e)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	$u-cell-padding: 10px 15px !default;
+	$u-cell-font-size: 15px !default;
+	$u-cell-line-height: 24px !default;
+	$u-cell-color: $u-main-color !default;
+	$u-cell-icon-size: 16px !default;
+	$u-cell-title-font-size: 15px !default;
+	$u-cell-title-line-height: 22px !default;
+	$u-cell-title-color: $u-main-color !default;
+	$u-cell-label-font-size: 12px !default;
+	$u-cell-label-color: $u-tips-color !default;
+	$u-cell-label-line-height: 18px !default;
+	$u-cell-value-font-size: 14px !default;
+	$u-cell-value-color: $u-content-color !default;
+	$u-cell-clickable-color: $u-bg-color !default;
+	$u-cell-disabled-color: #c8c9cc !default;
+	$u-cell-padding-top-large: 13px !default;
+	$u-cell-padding-bottom-large: 13px !default;
+	$u-cell-value-font-size-large: 15px !default;
+	$u-cell-label-font-size-large: 14px !default;
+	$u-cell-title-font-size-large: 16px !default;
+	$u-cell-left-icon-wrap-margin-right: 4px !default;
+	$u-cell-right-icon-wrap-margin-left: 4px !default;
+	$u-cell-title-flex:1 !default;
+	$u-cell-label-margin-top:5px !default;
+
+
+	.u-cell {
+		&__body {
+			@include flex();
+			/* #ifndef APP-NVUE */
+			box-sizing: border-box;
+			/* #endif */
+			padding: $u-cell-padding;
+			font-size: $u-cell-font-size;
+			color: $u-cell-color;
+			// line-height: $u-cell-line-height;
+			align-items: center;
+
+			&__content {
+				@include flex(row);
+				align-items: center;
+				flex: 1;
+			}
+
+			&--large {
+				padding-top: $u-cell-padding-top-large;
+				padding-bottom: $u-cell-padding-bottom-large;
+			}
+		}
+
+		&__left-icon-wrap,
+		&__right-icon-wrap {
+			@include flex();
+			align-items: center;
+			// height: $u-cell-line-height;
+			font-size: $u-cell-icon-size;
+		}
+
+		&__left-icon-wrap {
+			margin-right: $u-cell-left-icon-wrap-margin-right;
+		}
+
+		&__right-icon-wrap {
+			margin-left: $u-cell-right-icon-wrap-margin-left;
+			transition: transform 0.3s;
+
+			&--up {
+				transform: rotate(-90deg);
+			}
+
+			&--down {
+				transform: rotate(90deg);
+			}
+		}
+
+		&__title {
+			flex: $u-cell-title-flex;
+
+			&-text {
+				font-size: $u-cell-title-font-size;
+				line-height: $u-cell-title-line-height;
+				color: $u-cell-title-color;
+
+				&--large {
+					font-size: $u-cell-title-font-size-large;
+				}
+			}
+
+		}
+
+		&__label {
+			margin-top: $u-cell-label-margin-top;
+			font-size: $u-cell-label-font-size;
+			color: $u-cell-label-color;
+			line-height: $u-cell-label-line-height;
+
+			&--large {
+				font-size: $u-cell-label-font-size-large;
+			}
+		}
+
+		&__value {
+			text-align: right;
+			font-size: $u-cell-value-font-size;
+			line-height: $u-cell-line-height;
+			color: $u-cell-value-color;
+
+			&--large {
+				font-size: $u-cell-value-font-size-large;
+			}
+		}
+
+		&--clickable {
+			background-color: $u-cell-clickable-color;
+		}
+
+		&--disabled {
+			color: $u-cell-disabled-color;
+			/* #ifndef APP-NVUE */
+			cursor: not-allowed;
+			/* #endif */
+		}
+
+		&--center {
+			align-items: center;
+		}
+	}
+</style>

+ 82 - 0
uni_modules/uview-ui/components/u-checkbox-group/props.js

@@ -0,0 +1,82 @@
+export default {
+    props: {
+        // 标识符
+        name: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.name
+        },
+        // 绑定的值
+        value: {
+            type: Array,
+            default: uni.$u.props.checkboxGroup.value
+        },
+        // 形状,circle-圆形,square-方形
+        shape: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.shape
+        },
+        // 是否禁用全部checkbox
+        disabled: {
+            type: Boolean,
+            default: uni.$u.props.checkboxGroup.disabled
+        },
+
+        // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
+        activeColor: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.activeColor
+        },
+        // 未选中的颜色
+        inactiveColor: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.inactiveColor
+        },
+
+        // 整个组件的尺寸,默认px
+        size: {
+            type: [String, Number],
+            default: uni.$u.props.checkboxGroup.size
+        },
+        // 布局方式,row-横向,column-纵向
+        placement: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.placement
+        },
+        // label的字体大小,px单位
+        labelSize: {
+            type: [String, Number],
+            default: uni.$u.props.checkboxGroup.labelSize
+        },
+        // label的字体颜色
+        labelColor: {
+            type: [String],
+            default: uni.$u.props.checkboxGroup.labelColor
+        },
+        // 是否禁止点击文本操作
+        labelDisabled: {
+            type: Boolean,
+            default: uni.$u.props.checkboxGroup.labelDisabled
+        },
+        // 图标颜色
+        iconColor: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.iconColor
+        },
+        // 图标的大小,单位px
+        iconSize: {
+            type: [String, Number],
+            default: uni.$u.props.checkboxGroup.iconSize
+        },
+        // 勾选图标的对齐方式,left-左边,right-右边
+        iconPlacement: {
+            type: String,
+            default: uni.$u.props.checkboxGroup.iconPlacement
+        },
+        // 竖向配列时,是否显示下划线
+        borderBottom: {
+            type: Boolean,
+            default: uni.$u.props.checkboxGroup.borderBottom
+        }
+
+    }
+}

+ 103 - 0
uni_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue

@@ -0,0 +1,103 @@
+<template>
+	<view
+	    class="u-checkbox-group"
+	    :class="bemClass"
+	>
+		<slot></slot>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * checkboxGroup 复选框组
+	 * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
+	 * @tutorial https://www.uviewui.com/components/checkbox.html
+	 * @property {String}			name			标识符 
+	 * @property {Array}			value			绑定的值
+	 * @property {String}			shape			形状,circle-圆形,square-方形 (默认 'square' )
+	 * @property {Boolean}			disabled		是否禁用全部checkbox (默认 false )
+	 * @property {String}			activeColor		选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 (默认 '#2979ff' )
+	 * @property {String}			inactiveColor	未选中的颜色 (默认 '#c8c9cc' )
+	 * @property {String | Number}	size			整个组件的尺寸 单位px (默认 18 )
+	 * @property {String}			placement		布局方式,row-横向,column-纵向 (默认 'row' )
+	 * @property {String | Number}	labelSize		label的字体大小,px单位  (默认 14 )
+	 * @property {String}			labelColor		label的字体颜色 (默认 '#303133' )
+	 * @property {Boolean}			labelDisabled	是否禁止点击文本操作 (默认 false )
+	 * @property {String}			iconColor		图标颜色 (默认 '#ffffff' )
+	 * @property {String | Number}	iconSize		图标的大小,单位px (默认 12 )
+	 * @property {String}			iconPlacement	勾选图标的对齐方式,left-左边,right-右边  (默认 'left' )
+	 * @property {Boolean}			borderBottom	placement为row时,是否显示下边框 (默认 false )
+	 * @event {Function}	change	任一个checkbox状态发生变化时触发,回调为一个对象
+	 * @event {Function}	input	修改通过v-model绑定的值时触发,回调为一个对象
+	 * @example <u-checkbox-group></u-checkbox-group>
+	 */
+	export default {
+		name: 'u-checkbox-group',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
+		computed: {
+			// 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
+			// 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group)
+			// 拉取父组件新的变化后的参数
+			parentData() {
+				return [this.value, this.disabled, this.inactiveColor, this.activeColor, this.size, this.labelDisabled, this.shape,
+					this.iconSize, this.borderBottom, this.placement
+				]
+			},
+			bemClass() {
+				// this.bem为一个computed变量,在mixin中
+				return this.bem('checkbox-group', ['placement'])
+			},
+		},
+		watch: {
+			// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
+			parentData() {
+				if (this.children.length) {
+					this.children.map(child => {
+						// 判断子组件(u-checkbox)如果有init方法的话,就就执行(执行的结果是子组件重新从父组件拉取了最新的值)
+						typeof(child.init) === 'function' && child.init()
+					})
+				}
+			},
+		},
+		data() {
+			return {
+
+			}
+		},
+		created() {
+			this.children = []
+		},
+		methods: {
+			// 将其他的checkbox设置为未选中的状态
+			unCheckedOther(childInstance) {
+				const values = []
+				this.children.map(child => {
+					// 将被选中的checkbox,放到数组中返回
+					if (child.isChecked) {
+						values.push(child.name)
+					}
+				})
+				// 发出事件
+				this.$emit('change', values)
+				// 修改通过v-model绑定的值
+				this.$emit('input', values)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-checkbox-group {
+
+		&--row {
+			@include flex;
+		}
+
+		&--column {
+			@include flex(column);
+		}
+	}
+</style>

+ 69 - 0
uni_modules/uview-ui/components/u-checkbox/props.js

@@ -0,0 +1,69 @@
+export default {
+    props: {
+        // checkbox的名称
+        name: {
+            type: [String, Number, Boolean],
+            default: uni.$u.props.checkbox.name
+        },
+        // 形状,square为方形,circle为圆型
+        shape: {
+            type: String,
+            default: uni.$u.props.checkbox.shape
+        },
+        // 整体的大小
+        size: {
+            type: [String, Number],
+            default: uni.$u.props.checkbox.size
+        },
+        // 是否默认选中
+        checked: {
+            type: Boolean,
+            default: uni.$u.props.checkbox.checked
+        },
+        // 是否禁用
+        disabled: {
+            type: [String, Boolean],
+            default: uni.$u.props.checkbox.disabled
+        },
+        // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
+        activeColor: {
+            type: String,
+            default: uni.$u.props.checkbox.activeColor
+        },
+        // 未选中的颜色
+        inactiveColor: {
+            type: String,
+            default: uni.$u.props.checkbox.inactiveColor
+        },
+        // 图标的大小,单位px
+        iconSize: {
+            type: [String, Number],
+            default: uni.$u.props.checkbox.iconSize
+        },
+        // 图标颜色
+        iconColor: {
+            type: String,
+            default: uni.$u.props.checkbox.iconColor
+        },
+        // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
+        label: {
+            type: [String, Number],
+            default: uni.$u.props.checkbox.label
+        },
+        // label的字体大小,px单位
+        labelSize: {
+            type: [String, Number],
+            default: uni.$u.props.checkbox.labelSize
+        },
+        // label的颜色
+        labelColor: {
+            type: String,
+            default: uni.$u.props.checkbox.labelColor
+        },
+        // 是否禁止点击提示语选中复选框
+        labelDisabled: {
+            type: [String, Boolean],
+            default: uni.$u.props.checkbox.labelDisabled
+        }
+    }
+}

+ 344 - 0
uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue

@@ -0,0 +1,344 @@
+<template>
+	<view
+	    class="u-checkbox"
+	    :style="[checkboxStyle]"
+	    @tap.stop="wrapperClickHandler"
+	    :class="[`u-checkbox-label--${parentData.iconPlacement}`, parentData.borderBottom && parentData.placement === 'column' && 'u-border-bottom']"
+	>
+		<view
+		    class="u-checkbox__icon-wrap"
+		    @tap.stop="iconClickHandler"
+		    :class="iconClasses"
+		    :style="[iconWrapStyle]"
+		>
+			<slot name="icon">
+				<u-icon
+				    class="u-checkbox__icon-wrap__icon"
+				    name="checkbox-mark"
+				    :size="elIconSize"
+				    :color="elIconColor"
+				/>
+			</slot>
+		</view>
+		<text
+		    @tap.stop="labelClickHandler"
+		    :style="{
+				color: elDisabled ? elInactiveColor : elLabelColor,
+				fontSize: elLabelSize,
+				lineHeight: elLabelSize
+			}"
+		>{{label}}</text>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	/**
+	 * checkbox  复选框
+	 * @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
+	 * @tutorial https://uviewui.com/components/checkbox.html
+	 * @property {String | Number | Boolean}	name			checkbox组件的标示符
+	 * @property {String}						shape			形状,square为方形,circle为圆型
+	 * @property {String | Number}				size			整体的大小
+	 * @property {Boolean}						checked			是否默认选中
+	 * @property {String | Boolean}				disabled		是否禁用
+	 * @property {String}						activeColor		选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
+	 * @property {String}						inactiveColor	未选中的颜色
+	 * @property {String | Number}				iconSize		图标的大小,单位px
+	 * @property {String}						iconColor		图标颜色
+	 * @property {String | Number}				label			label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
+	 * @property {String}						labelColor 		label的颜色
+	 * @property {String | Number}				labelSize		label的字体大小,px单位
+	 * @property {String | Boolean}				labelDisabled	是否禁止点击提示语选中复选框
+	 * @property {Object}						customStyle		定义需要用到的外部样式
+	 * 
+	 * @event {Function}	change	任一个checkbox状态发生变化时触发,回调为一个对象
+	 * @example <u-checkbox v-model="checked" :disabled="false">天涯</u-checkbox>
+	 */
+	export default {
+		name: "u-checkbox",
+		mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
+		data() {
+			return {
+				isChecked: false,
+				// 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
+				// 故只能使用如此方法
+				parentData: {
+					iconSize: 12,
+					labelDisabled: null,
+					disabled: null,
+					shape: 'square',
+					activeColor: null,
+					inactiveColor: null,
+					size: 18,
+					value: null,
+					iconColor: null,
+					placement: 'row',
+					borderBottom: false,
+					iconPlacement: 'left'
+				}
+			}
+		},
+		computed: {
+			// 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
+			elDisabled() {
+				return this.disabled !== '' ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
+			},
+			// 是否禁用label点击
+			elLabelDisabled() {
+				return this.labelDisabled !== '' ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled :
+					false;
+			},
+			// 组件尺寸,对应size的值,默认值为21px
+			elSize() {
+				return this.size ? this.size : (this.parentData.size ? this.parentData.size : 21);
+			},
+			// 组件的勾选图标的尺寸,默认12px
+			elIconSize() {
+				return this.iconSize ? this.iconSize : (this.parentData.iconSize ? this.parentData.iconSize : 12);
+			},
+			// 组件选中激活时的颜色
+			elActiveColor() {
+				return this.activeColor ? this.activeColor : (this.parentData.activeColor ? this.parentData.activeColor : '#2979ff');
+			},
+			// 组件选未中激活时的颜色
+			elInactiveColor() {
+				return this.inactiveColor ? this.inactiveColor : (this.parentData.inactiveColor ? this.parentData.inactiveColor :
+					'#c8c9cc');
+			},
+			// label的颜色
+			elLabelColor() {
+				return this.labelColor ? this.labelColor : (this.parentData.labelColor ? this.parentData.labelColor : '#606266')
+			},
+			// 组件的形状
+			elShape() {
+				return this.shape ? this.shape : (this.parentData.shape ? this.parentData.shape : 'circle');
+			},
+			// label大小
+			elLabelSize() {
+				return uni.$u.addUnit(this.labelSize ? this.labelSize : (this.parentData.labelSize ? this.parentData.labelSize :
+					'15'))
+			},
+			elIconColor() {
+				const iconColor = this.iconColor ? this.iconColor : (this.parentData.iconColor ? this.parentData.iconColor :
+					'#ffffff');
+				// 图标的颜色
+				if (this.elDisabled) {
+					// disabled状态下,已勾选的checkbox图标改为elInactiveColor
+					return this.isChecked ? this.elInactiveColor : 'transparent'
+				} else {
+					return this.isChecked ? iconColor : 'transparent'
+				}
+			},
+			iconClasses() {
+				let classes = []
+				// 组件的形状
+				classes.push('u-checkbox__icon-wrap--' + this.elShape)
+				if (this.elDisabled) {
+					classes.push('u-checkbox__icon-wrap--disabled')
+				}
+				if (this.isChecked && this.elDisabled) {
+					classes.push('u-checkbox__icon-wrap--disabled--checked')
+				}
+				// 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
+				// #ifdef MP-ALIPAY || MP-TOUTIAO
+				classes = classes.join(' ')
+				// #endif
+				return classes
+			},
+			iconWrapStyle() {
+				// checkbox的整体样式
+				const style = {}
+				style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : '#ffffff'
+				style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor
+				style.width = uni.$u.addUnit(this.elSize)
+				style.height = uni.$u.addUnit(this.elSize)
+				// 如果是图标在右边的话,移除它的右边距
+				if (this.parentData.iconPlacement === 'right') {
+					style.marginRight = 0
+				}
+				return style
+			},
+			checkboxStyle() {
+				const style = {}
+				if (this.parentData.borderBottom && this.parentData.placement === 'row') {
+					uni.$u.error('检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效')
+				}
+				// 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
+				if (this.parentData.borderBottom && this.parentData.placement === 'column') {
+					style.paddingBottom = '8px'
+				}
+				return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
+			}
+		},
+		mounted() {
+			this.init()
+		},
+		methods: {
+			init() {
+				// 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用
+				this.updateParentData()
+				if (!this.parent) {
+					uni.$u.error('u-checkbox必须搭配u-checkbox-group组件使用')
+				}
+				// 设置初始化时,是否默认选中的状态,父组件u-checkbox-group的value可能是array,所以额外判断
+				if (this.checked) {
+					this.isChecked = true
+				} else if (uni.$u.test.array(this.parentData.value)) {
+					// 查找数组是是否存在this.name元素值
+					this.isChecked = this.parentData.value.some(item => {
+						return item === this.name
+					})
+				}
+			},
+			updateParentData() {
+				this.getParentData('u-checkbox-group')
+			},
+			// 横向两端排列时,点击组件即可触发选中事件
+			wrapperClickHandler(e) {
+				this.parentData.iconPlacement === 'right' && this.iconClickHandler(e)
+			},
+			// 点击图标
+			iconClickHandler(e) {
+				this.preventEvent(e)
+				// 如果整体被禁用,不允许被点击
+				if (!this.elDisabled) {
+					this.setRadioCheckedStatus()
+				}
+			},
+			// 点击label
+			labelClickHandler(e) {
+				this.preventEvent(e)
+				// 如果按钮整体被禁用或者label被禁用,则不允许点击文字修改状态
+				if (!this.elLabelDisabled && !this.elDisabled) {
+					this.setRadioCheckedStatus()
+				}
+			},
+			emitEvent() {
+				this.$emit('change', this.isChecked)
+				// 尝试调用u-form的验证方法,进行一定延迟,否则微信小程序更新可能会不及时
+				this.$nextTick(() => {
+					uni.$u.formValidate(this, 'change')
+				})
+			},
+			// 改变组件选中状态
+			// 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例
+			// 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
+			setRadioCheckedStatus() {
+				// 将本组件标记为与原来相反的状态
+				this.isChecked = !this.isChecked
+				this.emitEvent()
+				typeof this.parent.unCheckedOther === 'function' && this.parent.unCheckedOther(this)
+			}
+		},
+		watch:{
+			checked(){
+				this.isChecked = this.checked
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+	$u-checkbox-icon-wrap-margin-right:6px !default;
+	$u-checkbox-icon-wrap-font-size:6px !default;
+	$u-checkbox-icon-wrap-border-width:1px !default;
+	$u-checkbox-icon-wrap-border-color:#c8c9cc !default;
+	$u-checkbox-icon-wrap-icon-line-height:0 !default;
+	$u-checkbox-icon-wrap-circle-border-radius:100% !default;
+	$u-checkbox-icon-wrap-square-border-radius:3px !default;
+	$u-checkbox-icon-wrap-checked-color:#fff !default;
+	$u-checkbox-icon-wrap-checked-background-color:red !default;
+	$u-checkbox-icon-wrap-checked-border-color:#2979ff !default;
+	$u-checkbox-icon-wrap-disabled-background-color:#ebedf0 !default;
+	$u-checkbox-icon-wrap-disabled-checked-color:#c8c9cc !default;
+	$u-checkbox-label-margin-left:5px !default;
+	$u-checkbox-label-margin-right:12px !default;
+	$u-checkbox-label-color:$u-content-color !default;
+	$u-checkbox-label-font-size:15px !default;
+	$u-checkbox-label-disabled-color:#c8c9cc !default;
+
+	.u-checkbox {
+		/* #ifndef APP-NVUE */
+		@include flex(row);
+		/* #endif */
+		overflow: hidden;
+		flex-direction: row;
+		align-items: center;
+
+		&-label--left {
+			flex-direction: row
+		}
+
+		&-label--right {
+			flex-direction: row-reverse;
+			justify-content: space-between
+		}
+
+		&__icon-wrap {
+			/* #ifndef APP-NVUE */
+			box-sizing: border-box;
+			// nvue下,border-color过渡有问题
+			transition-property: border-color, background-color, color;
+			transition-duration: 0.2s;
+			/* #endif */
+			color: $u-content-color;
+			@include flex;
+			align-items: center;
+			justify-content: center;
+			color: transparent;
+			text-align: center;
+			margin-right: $u-checkbox-icon-wrap-margin-right;
+
+			font-size: $u-checkbox-icon-wrap-font-size;
+			border-width: $u-checkbox-icon-wrap-border-width;
+			border-color: $u-checkbox-icon-wrap-border-color;
+			border-style: solid;
+
+			/* #ifdef MP-TOUTIAO */
+			// 头条小程序兼容性问题,需要设置行高为0,否则图标偏下
+			&__icon {
+				line-height: $u-checkbox-icon-wrap-icon-line-height;
+			}
+
+			/* #endif */
+
+			&--circle {
+				border-radius: $u-checkbox-icon-wrap-circle-border-radius;
+			}
+
+			&--square {
+				border-radius: $u-checkbox-icon-wrap-square-border-radius;
+			}
+
+			&--checked {
+				color: $u-checkbox-icon-wrap-checked-color;
+				background-color: $u-checkbox-icon-wrap-checked-background-color;
+				border-color: $u-checkbox-icon-wrap-checked-border-color;
+			}
+
+			&--disabled {
+				background-color: $u-checkbox-icon-wrap-disabled-background-color !important;
+			}
+
+			&--disabled--checked {
+				color: $u-checkbox-icon-wrap-disabled-checked-color !important;
+			}
+		}
+
+		&__label {
+			/* #ifndef APP-NVUE */
+			word-wrap: break-word;
+			/* #endif */
+			margin-left: $u-checkbox-label-margin-left;
+			margin-right: $u-checkbox-label-margin-right;
+			color: $u-checkbox-label-color;
+			font-size: $u-checkbox-label-font-size;
+
+			&--disabled {
+				color: $u-checkbox-label-disabled-color;
+			}
+		}
+	}
+</style>

+ 8 - 0
uni_modules/uview-ui/components/u-circle-progress/props.js

@@ -0,0 +1,8 @@
+export default {
+    props: {
+        percentage: {
+            type: [String, Number],
+            default: uni.$u.props.circleProgress.percentage
+        }
+    }
+}

+ 198 - 0
uni_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue

@@ -0,0 +1,198 @@
+<template>
+	<view class="u-circle-progress">
+		<view class="u-circle-progress__left">
+			<view
+			    class="u-circle-progress__left__circle"
+			    :style="[leftSyle]"
+			    ref="left-circle"
+			>
+
+			</view>
+		</view>
+		<view
+		    class="u-circle-progress__right"
+		>
+			<view
+			    class="u-circle-progress__right__circle"
+			    ref="right-circle"
+				:style="[rightSyle]"
+			>
+
+			</view>
+		</view>
+		<view class="u-circle-progress__circle">
+
+		</view>
+	</view>
+</template>
+
+<script>
+	import props from './props.js';
+	// #ifdef APP-NVUE
+	const animation = uni.requireNativePlugin('animation')
+	// #endif
+	/**
+	 * CircleProgress 圆形进度条 TODO: 待完善 
+	 * @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度环。
+	 * @tutorial https://www.uviewui.com/components/circleProgress.html
+	 * @property {String | Number}	percentage	圆环进度百分比值,为数值类型,0-100 (默认 30 )
+	 * @example
+	 */
+	export default {
+		name: 'u-circle-progress',
+		mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
+		data() {
+			return {
+				leftBorderColor: 'rgb(200, 200, 200)',
+				rightBorderColor: 'rgb(200, 200, 200)',
+			}
+		},
+		computed: {
+			leftSyle() {
+				const style = {}
+				style.borderTopColor = this.leftBorderColor
+				style.borderRightColor = this.leftBorderColor
+				return style
+			},
+			rightSyle() {
+				const style = {}
+				style.borderLeftColor = this.rightBorderColor
+				style.borderBottomColor = this.rightBorderColor
+				return style
+			}
+		},
+		mounted() {
+			uni.$u.sleep().then(() => {
+				this.rightBorderColor = 'rgb(66, 185, 131)'
+				// this.init()
+			})
+		},
+		methods: {
+			init() {
+				animation.transition(this.$refs['right-circle'].ref, {
+					styles: {
+						transform: 'rotate(45deg)',
+						transformOrigin: 'center center'
+					},
+				}, () => {
+					this.rightBorderColor = 'rgb(66, 185, 131)'
+					// animation.transition(this.$refs['right-circle'].ref, {
+					// 	styles: {
+					// 		transform: 'rotate(225deg)',
+					// 		transformOrigin: 'center center'
+					// 	},
+					// 	duration: 3000,
+					// }, () => {
+					// 	animation.transition(this.$refs['left-circle'].ref, {
+					// 		styles: {
+					// 			transform: 'rotate(45deg)',
+					// 			transformOrigin: 'center center'
+					// 		},
+					// 	}, () => {
+					// 		this.leftBorderColor = 'rgb(66, 185, 131)'
+					// 		animation.transition(this.$refs['left-circle'].ref, {
+					// 			styles: {
+					// 				transform: 'rotate(225deg)',
+					// 				transformOrigin: 'center center'
+					// 			},
+					// 			duration: 1500,
+					// 		}, () => {
+
+					// 		})
+					// 	})
+					// })
+				})
+
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/components.scss";
+
+	.u-circle-progress {
+		@include flex(row);
+		position: relative;
+		border-radius: 100px;
+		height: 100px;
+		width: 100px;
+		// transform: rotate(0deg);
+		// background-color: rgb(66, 185, 131);
+		background-color: rgb(200, 200, 200);
+		overflow: hidden;
+		justify-content: space-between;
+
+		&__circle {
+			border-radius: 100px;
+			height: 90px;
+			width: 90px;
+			transform: translate(-50%, -50%);
+			background-color: rgb(255, 255, 255);
+			left: 50px;
+			top: 50px;
+			position: absolute;
+		}
+
+		&__left {
+			position: absolute;
+			left: 0;
+			width: 50px;
+			height: 100px;
+			overflow: hidden;
+			box-sizing: border-box;
+			// background-color: rgb(66, 185, 131);
+			// background-color: rgb(200, 200, 200);
+			// transform-origin: left center;
+
+			&__circle {
+				box-sizing: border-box;
+				// background-color: red;
+				border-left-color: transparent;
+				border-bottom-color: transparent;
+				border-top-left-radius: 50px;
+				border-top-right-radius: 50px;
+				border-bottom-right-radius: 50px;
+				// border-left-color: rgb(66, 185, 131);
+				// border-bottom-color: rgb(66, 185, 131);
+				border-top-color: rgb(66, 185, 131);
+				border-right-color: rgb(66, 185, 131);
+				border-width: 5px;
+				width: 100px;
+				height: 100px;
+				transform: rotate(225deg);
+				// border-radius: 100px;
+			}
+		}
+
+		&__right {
+			position: absolute;
+			right: 0;
+			width: 50px;
+			height: 100px;
+			overflow: hidden;
+
+			&__circle {
+				position: absolute;
+				right: 0;
+				box-sizing: border-box;
+				// background-color: red;
+				border-top-color: transparent;
+				border-right-color: transparent;
+				border-top-left-radius: 50px;
+				border-bottom-left-radius: 50px;
+				border-bottom-right-radius: 50px;
+				// border-left-color: rgb(66, 185, 131);
+				// border-bottom-color: rgb(66, 185, 131);
+				border-left-color: rgb(200, 200, 200);
+				border-bottom-color: rgb(200, 200, 200);
+				border-width: 5px;
+				width: 100px;
+				height: 100px;
+				transform: rotate(45deg);
+				transform-origin: center center;
+				// border-radius: 100px;
+			}
+		}
+	}
+</style>

+ 79 - 0
uni_modules/uview-ui/components/u-code-input/props.js

@@ -0,0 +1,79 @@
+export default {
+    props: {
+		// 键盘弹起时,是否自动上推页面
+		adjustPosition: {
+			type: Boolean,
+            default: uni.$u.props.codeInput.adjustPosition
+		},
+        // 最大输入长度
+        maxlength: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.maxlength
+        },
+        // 是否用圆点填充
+        dot: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.dot
+        },
+        // 显示模式,box-盒子模式,line-底部横线模式
+        mode: {
+            type: String,
+            default: uni.$u.props.codeInput.mode
+        },
+        // 是否细边框
+        hairline: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.hairline
+        },
+        // 字符间的距离
+        space: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.space
+        },
+        // 预置值
+        value: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.value
+        },
+        // 是否自动获取焦点
+        focus: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.focus
+        },
+        // 字体是否加粗
+        bold: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.bold
+        },
+        // 字体颜色
+        color: {
+            type: String,
+            default: uni.$u.props.codeInput.color
+        },
+        // 字体大小
+        fontSize: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.fontSize
+        },
+        // 输入框的大小,宽等于高
+        size: {
+            type: [String, Number],
+            default: uni.$u.props.codeInput.size
+        },
+        // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true
+        disabledKeyboard: {
+            type: Boolean,
+            default: uni.$u.props.codeInput.disabledKeyboard
+        },
+        // 边框和线条颜色
+        borderColor: {
+            type: String,
+            default: uni.$u.props.codeInput.borderColor
+        },
+		// 是否禁止输入"."符号
+		disabledDot: {
+			type: Boolean,
+			default: uni.$u.props.codeInput.disabledDot
+		}
+    }
+}

部分文件因文件數量過多而無法顯示