浏览代码

适应性培训

空白格 3 年之前
父节点
当前提交
74ed695df6
共有 28 个文件被更改,包括 2195 次插入332 次删除
  1. 26 1
      h5_web/common/apiurl.js
  2. 18 2
      h5_web/common/http.api.js
  3. 1 1
      h5_web/common/http.interceptor.js
  4. 20 0
      h5_web/components/wyb-pagination/iconfont.css
  5. 455 0
      h5_web/components/wyb-pagination/wyb-pagination.vue
  6. 21 1
      h5_web/pages.json
  7. 14 17
      h5_web/pages/applyEducationCode/applyEducationCode.vue
  8. 183 0
      h5_web/pages/basicTraining/basicTraining - 副本.vue
  9. 168 0
      h5_web/pages/basicTraining/basicTraining.scss
  10. 133 84
      h5_web/pages/basicTraining/basicTraining.vue
  11. 128 0
      h5_web/pages/basicTraining/basicTrainingDetails/basicTrainingDetails - 副本.vue
  12. 126 0
      h5_web/pages/basicTraining/components/online - 副本.vue
  13. 16 110
      h5_web/pages/basicTraining/components/online.vue
  14. 89 0
      h5_web/pages/basicTraining/offlineTrainingDetails/offlineTrainingDetails.vue
  15. 266 0
      h5_web/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails.scss
  16. 329 0
      h5_web/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails.vue
  17. 24 9
      h5_web/pages/mine/mine.scss
  18. 7 5
      h5_web/pages/mine/mine.vue
  19. 24 1
      h5_web/pages/myInterview/myInterview.vue
  20. 7 3
      h5_web/pages/mycode/mycode.vue
  21. 3 3
      h5_web/pages/policyInfo/policyInfo.vue
  22. 7 4
      h5_web/pages/policyInfo/scss/policyInfo.scss
  23. 11 3
      h5_web/pages/progressiveIntegral/progressiveIntegral.scss
  24. 119 88
      h5_web/pages/progressiveIntegral/progressiveIntegral.vue
  25. 二进制
      h5_web/static/img/basic-training-bg.png
  26. 二进制
      h5_web/static/img/basic-training-tab-bg.png
  27. 二进制
      h5_web/static/img/certified-icon.png
  28. 二进制
      h5_web/static/img/passed-icon.png

+ 26 - 1
h5_web/common/apiurl.js

@@ -131,7 +131,32 @@ const apiurl = {
 	 */
 	mine: {
 		// 提交就业情况
-		employmentConditionUrl: '/employmentcollect'
+		employmentConditionUrl: '/employmentcollect',
+		// 查询积分统计
+		totalCountUrl: '/integral/count',
+		// 积分列表
+		integralListUrl: '/integral/list'
+	},
+	/**
+	 * 
+	 */
+	training: {
+		// 获取线上课程列表
+		getOnlineListurl: '/adaptTrainOnline/queryList',
+		// 课程状态
+		getOnlineStatusUrl: '/adaptTrainOnline/queryStatus',
+		// 课程详情
+		getOnlineDetailsUrl: '/adaptTrainOnline/',
+		// 保存课程播放时长
+		videoTimeLongUrl: '/adaptTrainOnline/duration',
+		// 获取课程评论
+		getClassesCommentUrl: '/coursecomment',
+		// 添加评论
+		addClassesCommentUrl: '/coursecomment',
+		// 线下课程
+		getOfflineListUrl: '/adaptTrainOffline/queryList',
+		// 获取线下课程详情
+		getOfflineDetailsUrl: '/adaptTrainOffline/getDetail/'
 	}
 }
 

+ 18 - 2
h5_web/common/http.api.js

@@ -122,7 +122,22 @@ const install = (Vue, vm) => {
 	
 	// 我的
 	let mine = {
-		submitEmploymentCondition: (params = {}) => vm.$u.post(apiurl.mine.employmentConditionUrl, params)
+		submitEmploymentCondition: (params = {}) => vm.$u.post(apiurl.mine.employmentConditionUrl, params),
+		totalCount: (params = {}) => vm.$u.get(apiurl.mine.totalCountUrl, params),
+		integralList: (params = {}) => vm.$u.get(apiurl.mine.integralListUrl, params)
+	}
+	
+	// 适应性培训
+	let training = {
+		// 获取线上培训列表
+		getOnlineListApi: (params = {}) => vm.$u.get(apiurl.training.getOnlineListurl, params),
+		getOnlineStatusApi: (params = {}) => vm.$u.get(apiurl.training.getOnlineStatusUrl, params),
+		getOnlineDetailsApi: (params = {}) => vm.$u.get(apiurl.training.getOnlineDetailsUrl + params.id),
+		videoTimeLongApi: (params = {}) => vm.$u.post(apiurl.training.videoTimeLongUrl, params),
+		getClassesCommentApi: (params = {}) => vm.$u.get(apiurl.training.getClassesCommentUrl, params),
+		addClassesCommentApi: (params = {}) => vm.$u.post(apiurl.training.addClassesCommentUrl, params),
+		getOfflineListApi: (params = {}) => vm.$u.get(apiurl.training.getOfflineListUrl, params),
+		getOfflineDetailsApi: (params = {}) => vm.$u.get(apiurl.training.getOfflineDetailsUrl + params.id)
 	}
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 	vm.$u.api = {
@@ -159,7 +174,8 @@ const install = (Vue, vm) => {
 		resume,
 		modifyUserInfo,
 		evaluation,
-		mine
+		mine,
+		training
 	};
 }
 

+ 1 - 1
h5_web/common/http.interceptor.js

@@ -12,7 +12,7 @@ const install = (Vue, vm) => {
 		dataType: 'json',
 		showLoading: true, // 是否显示请求中的loading
 		loadingText: '请求中...', // 请求loading中的文字提示
-		loadingTime: 100, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
+		loadingTime: 500, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
 		originalData: false, // 是否在拦截器中返回服务端的原始数据
 		loadingMask: true, // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
 		// 配置请求头信息

+ 20 - 0
h5_web/components/wyb-pagination/iconfont.css

@@ -0,0 +1,20 @@
+@font-face {font-family: "iconfont";
+  src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALUAAsAAAAABtwAAAKFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCfgqBQIE1ATYCJAMMCwgABCAFhG0HRBsBBhEVjCOyrw7sYPj4I0QqzNq3zfnzDrGGnxGGLSGIJLifI6jWsJ7dDaIDIM/lo6IIVFyEAVaJdC8Ma5KsX18DIvAAvNrML65E6KwwVPnjwadURdk9jquzLCnj43Q3FiERMuvuW6CtkLIwkLa2RJ8WB1673A9cYIWJ1mV/lpeyxOTL57kc310BZdH8QIGltvZ+PiZgggWyN0aRFViUecPYBS/wPoFG/WbFduUD1CvsZYG41DlCfSGsKCxXL9Q27C3iTY369JLe4zX6fPyzHJHUZPZDOxcuwfrP5M0rFXuZ6+WcYIfImEUhdhvTO7JgjKwxXYxyrGnBz/RX/EwCqzgqMxF/nVvdDCahKj2RxFN7NAk8IIEMapPsCjYQvTsQUof9hYqOoxqqWHWbqJ9LAh/W3Mq8UOvnzz9Gr1/8fZwsnhvGHNLy5fPH0Q1H/TAu1g7uN/MIVHJPFhG/fhEIau4W/277/5oK+Govv4JgpdC81J/RE/w9ycCuYshsSy6a2BNb3mx4ojMBhdynmu3v9GO6tmdwNaFeT4akTh+yeqNEoc+iRpNV1KonXkOjGfXhJl3YXpQGTPsACO0+kbR6h6zdQhT6ihq9/lGrPfZotBtdZzYZD33YYmwEe2jfQXfBk2uTQ1x7hWq2DedlEesOedIxKNK8nKvRIy+xYXpRpQgBcXBQgcfQ2gCRw4idpINIPGcZNb0o7YLbHGxhqCFQD7TeAa0TeBQMFofK+68gZWY1uKOuzn8HsYkeHhRS+QCiVvtBdY/yzOSFUhKCAMICB1RgFrKsAMTmWSPUEalhQjI6y5x+NFSdbq91P1DEmrDX5EiRo2g8a/yovQUS5ourYW68Kpg2GwAAAA==') format('woff2')
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-danjiantou:before {
+  content: "\e62d";
+}
+
+.icon-shuangjiantou:before {
+  content: "\e62e";
+}
+

+ 455 - 0
h5_web/components/wyb-pagination/wyb-pagination.vue

@@ -0,0 +1,455 @@
+<template>
+	<view class="wyb-pagination-box" :style="{
+		paddingLeft: padding + 'rpx',
+		paddingRight: padding + 'rpx',
+		'--hover': autoHover}">
+		<view class="wyb-pagination-left" :style="{opacity: currentPage === 1 ? 0.5 : 1}">
+			<view
+			 v-if="showFirst"
+			 :class="'wyb-pagination-first-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr" 
+			 :hover-class="currentPage === 1 ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('first-page')">
+				<view v-if="showIcon" class="iconfont icon-shuangjiantou left-arrow" />
+				<text v-else>{{firstText}}</text>
+			</view>
+			<view 
+			 :class="'wyb-pagination-prev-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr"
+			 :hover-class="currentPage === 1 ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('prev-page')">
+				<view v-if="showIcon" class="iconfont icon-danjiantou left-arrow" />
+				<text v-else>{{prevText}}</text>
+			</view>
+		</view>
+		<view class="wyb-pagination-info" @tap.stop="onInfoTap">
+			<view class="wyb-pagination-num" v-if="!infoClick">
+				<text :style="{color: currentColor}">{{currentPage}}</text>
+				<text class="wyb-pagination-span" :style="{color: pageInfoColor}">/</text>
+				<text :style="{color: pageInfoColor}">{{totalPage}}</text>
+				<text 
+				 v-if="showTotalItem"
+				 class="wyb-pagination-info-total"
+				 :style="{color: RGBChange(pageInfoColor, 0.5, 'light')}">
+					({{totalItems}})
+				</text>
+			</view>
+			<!-- #ifndef MP-WEIXIN || APP-VUE || APP-NVUE || APP-PLUS || APP-PLUS-NVUE -->
+			<view class="wyb-pagination-input" v-else>
+				<input 
+				 type="number" 
+				 v-model="inputPage" 
+				 :onpaste="false"
+				 :focus="infoFocus" 
+				 :value="currentPage"
+				 :style="{color: currentColor}"
+				 :cursor-spacing="cursorSpacing"
+				 @confirm="onInfoConfirm" 
+				 @blur="onInfoBlur" />
+			</view>
+			<!-- #endif -->
+			<!-- #ifdef MP-WEIXIN || APP-VUE || APP-NVUE || APP-PLUS || APP-PLUS-NVUE -->
+			<view class="wyb-pagination-input" v-else>
+				<input 
+				 type="number" 
+				 v-model="inputPage" 
+				 :focus="infoFocus" 
+				 :name="currentPage"
+				 :style="{color: currentColor}"
+				 :cursor-spacing="cursorSpacing"
+				 @confirm="onInfoConfirm" 
+				 @blur="onInfoBlur" />
+			</view>
+			<!-- #endif -->
+		</view>
+		<view class="wyb-pagination-right" :style="{opacity: currentPage === totalPage ? 0.5 : 1}">
+			<view
+			 :class="'wyb-pagination-next-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr"
+			 :hover-class="currentPage === totalPage ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('next-page')">
+				<view v-if="showIcon" class="iconfont icon-danjiantou right-arrow" />
+				<text v-else>{{nextText}}</text>
+			</view>
+			<view
+			 v-if="showLast"
+			 :class="'wyb-pagination-last-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr"
+			 :hover-class="currentPage === totalPage ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('last-page')">
+				<view v-if="showIcon" class="iconfont icon-shuangjiantou right-arrow" />
+				<text v-else>{{lastText}}</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				currentPage: this.current || 1,
+				inputPage: '',
+				infoClick: false,
+				infoFocus: false
+			}
+		},
+		computed: {
+			totalPage() {
+				return Math.ceil(parseFloat(this.totalItems) / parseFloat(this.pageItems))
+			},
+			autoHover() {
+				if (this.btnStyle.backgroundColor) {
+					return this.RGBChange(this.btnStyle.backgroundColor, 0.1, 'dark')
+				} else {
+					return this.RGBChange('#f8f8f8', 0.05, 'dark')
+				}
+			},
+			btnStyleStr() {
+				let styleStr = ''
+				for (let key in this.btnStyle) {
+					styleStr += `${this.sortFieldMatch(key)}: ${this.btnStyle[key]}; `
+				}
+				return styleStr
+			}
+		},
+		watch: {
+			current(val) {
+				const oPage = this.currentPage
+				if (!Object.is(oPage, val)) {
+					this.currentPage = val
+					this.$emit('change', {
+						type: 'prop-page', 
+						current: this.currentPage,
+					})
+				}
+			}
+		},
+		props: {
+			totalItems: {
+				type: [String, Number],
+				default: 20
+			},
+			pageItems: {
+				type: [String, Number],
+				default: 5
+			},
+			current: {
+				type: Number,
+				default: 1
+			},
+			prevText: {
+				type: String,
+				default: '上一页'
+			},
+			nextText: {
+				type: String,
+				default: '下一页'
+			},
+			firstText: {
+				type: String,
+				default: '首页'
+			},
+			lastText: {
+				type: String,
+				default: '尾页'
+			},
+			pageInfoColor: {
+				type: String,
+				default: '#494949'
+			},
+			currentColor: {
+				type: String,
+				default: '#007aff'
+			},
+			padding: {
+				type: [String, Number],
+				default: 15
+			},
+			btnStyle: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			showIcon: {
+				type: Boolean,
+				default: false
+			},
+			showTotalItem: {
+				type: Boolean,
+				default: false
+			},
+			showFirst: {
+				type: Boolean,
+				default: true
+			},
+			showLast: {
+				type: Boolean,
+				default: true
+			},
+			couldInput: {
+				type: Boolean,
+				default: true
+			},
+			cursorSpacing: {
+				type: Number,
+				default: 0
+			}
+		},
+		methods: {
+			onPageBtnTap(type) {
+				switch (type) {
+					case 'first-page':
+						if (!Object.is(this.currentPage, 1)) {
+							this.currentPage = 1
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+					case 'prev-page':
+						if (!Object.is(this.currentPage, 1)) {
+							this.currentPage--
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+					case 'next-page':
+						if (!Object.is(this.currentPage, this.totalPage)) {
+							this.currentPage++
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+					case 'last-page':
+						if (!Object.is(this.currentPage, this.totalPage)) {
+							this.currentPage = this.totalPage
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+				}
+			},
+			onInfoTap() {
+				if (this.couldInput) {
+					this.infoClick = true
+					this.inputPage = this.currentPage
+					setTimeout(() => {
+						this.infoFocus = true
+					}, 10)
+				}
+			},
+			onInfoConfirm(e) {
+				let input = e.detail.value
+				const oPage = this.currentPage
+				if (parseFloat(input) > this.totalPage) {
+					this.currentPage = this.totalPage
+				} else if (parseFloat(input) < 1) {
+					this.currentPage = 1
+				} else if (input === '') {
+					this.currentPage = oPage
+				} else {
+					this.currentPage = parseFloat(input)
+				}
+				if (!Object.is(oPage, this.currentPage)) {
+					this.$emit('change', {
+						type: 'input-page', 
+						current: this.currentPage,
+					})
+				}
+				this.infoClick = false
+				this.$nextTick(() => {
+					this.infoFocus = false
+				})
+			},
+			onInfoBlur(e) {
+				let input = e.detail.value
+				const oPage = this.currentPage
+				if (parseFloat(input) > this.totalPage) {
+					this.currentPage = this.totalPage
+				} else if (parseFloat(input) < 1) {
+					this.currentPage = 1
+				} else if (input === '') {
+					this.currentPage = oPage
+				} else {
+					this.currentPage = parseFloat(input)
+				}
+				if (!Object.is(oPage, this.currentPage)) {
+					this.$emit('change', {
+						type: 'input-page', 
+						current: this.currentPage,
+					})
+				}
+				this.infoClick = false
+				this.$nextTick(() => {
+					this.infoFocus = false
+				})
+			},
+			RGBChange(color, level, type) {
+				// 判断颜色类型
+				let r = 0,
+					g = 0,
+					b = 0,
+					hasAlpha = false,
+					alpha = 1
+				if (color.indexOf('#') !== -1) {
+					// hex转rgb
+					if (color.length === 4) {
+						let arr = color.split('')
+						color = '#' + arr[1] + arr[1] + arr[2] + arr[2] + arr[3] + arr[3]
+					}
+					let color16List = [color.substring(1, 3), color.substring(3, 5), color.substring(5, 7)]
+					r = parseInt(color16List[0], 16)
+					g = parseInt(color16List[1], 16)
+					b = parseInt(color16List[2], 16)
+
+				} else {
+					hasAlpha = color.indexOf('a') !== -1
+					let root = color.slice()
+					let idx = root.indexOf('(') + 1
+					root = root.substring(idx)
+					let firstDotIdx = root.indexOf(',')
+					r = parseFloat(root.substring(0, firstDotIdx))
+					root = root.substring(firstDotIdx + 1)
+					let secondDotIdx = root.indexOf(',')
+					g = parseFloat(root.substring(0, secondDotIdx))
+					root = root.substring(secondDotIdx + 1)
+					if (hasAlpha) {
+						let thirdDotIdx = root.indexOf(',')
+						b = parseFloat(root.substring(0, thirdDotIdx))
+						alpha = parseFloat(root.substring(thirdDotIdx + 1))
+					} else {
+						b = parseFloat(root)
+					}
+				}
+
+				let rgbc = [r, g, b]
+				// 减淡或加深
+				for (var i = 0; i < 3; i++)
+					type === 'light' ? rgbc[i] = Math.floor((255 - rgbc[i]) * level + rgbc[i]) : rgbc[i] = Math.floor(rgbc[i] * (1 -
+						level))
+
+				if (hasAlpha) {
+					return `rgba(${rgbc[0]}, ${rgbc[1]}, ${rgbc[2]}, ${alpha})`
+				} else {
+					return `rgb(${rgbc[0]}, ${rgbc[1]}, ${rgbc[2]})`
+				}
+			},
+			sortFieldMatch(field) {
+				const stringArray = field.split('')
+				let newField = field
+				stringArray.forEach(t => {
+					if (/[A-Z]/.test(t)) {
+						newField = field.replace(t, `-${t.toLowerCase()}`)
+					}
+				})
+				return newField
+			}
+		}
+	}
+</script>
+
+<style>
+	@import 'iconfont.css';
+	.wyb-pagination-box {
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		box-sizing: border-box;
+		justify-content: space-between;
+		flex-wrap: nowrap;
+	}
+	
+	.wyb-pagination-left {
+		flex: 1;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		flex-wrap: nowrap;
+		justify-content: flex-start;
+	}
+	
+	.wyb-pagination-right {
+		flex: 1;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		flex-wrap: nowrap;
+		justify-content: flex-end;
+	}
+
+	.wyb-pagination-first-page-t,
+	.wyb-pagination-prev-page-t,
+	.wyb-pagination-next-page-t,
+	.wyb-pagination-last-page-t {
+		font-size: 27rpx;
+		padding: 14rpx 25rpx;
+		box-sizing: border-box;
+		background-color: #f8f8f8;
+		border: 1px solid #e5e5e5;
+		white-space: nowrap;
+	}
+	
+	.wyb-pagination-first-page-i,
+	.wyb-pagination-prev-page-i,
+	.wyb-pagination-next-page-i,
+	.wyb-pagination-last-page-i {
+		font-size: 27rpx;
+		padding: 14rpx 33rpx;
+		box-sizing: border-box;
+		background-color: #f8f8f8;
+		border: 1px solid #e5e5e5;
+		white-space: nowrap;
+	}
+
+	.wyb-pagination-first-page-t,
+	.wyb-pagination-first-page-i {
+		margin-right: 15rpx;
+	}
+
+	.wyb-pagination-last-page-t,
+	.wyb-pagination-last-page-i {
+		margin-left: 15rpx;
+	}
+
+	.wyb-pagination-info {
+		font-size: 33rpx;
+		white-space: nowrap;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		flex: 1;
+	}
+	
+	.wyb-pagination-input input {
+		text-align: center;
+	}
+
+	.wyb-pagination-span {
+		margin: 0 2rpx;
+	}
+	
+	.wyb-pagination-info-total {
+		margin-left: 10rpx;
+	}
+	
+	.wyb-pagination-first-page-t:active,
+	.wyb-pagination-prev-page-t:active,
+	.wyb-pagination-next-page-t:active,
+	.wyb-pagination-last-page-t:active,
+	.wyb-pagination-first-page-i:active,
+	.wyb-pagination-prev-page-i:active,
+	.wyb-pagination-next-page-i:active,
+	.wyb-pagination-last-page-i:active {
+		background-color: var(--hover) !important;
+	}
+	
+	.left-arrow {
+		transform: scale(0.9);
+		margin-right: 5rpx;
+	}
+	
+	.right-arrow {
+		margin-left: 5rpx;
+		transform: scale(0.9) rotate(180deg);
+		-webkit-transform: scale(0.8) rotate(180deg);
+	}
+</style>

+ 21 - 1
h5_web/pages.json

@@ -99,7 +99,9 @@
 		}, {
 			"path": "pages/basicTraining/basicTraining",
 			"style": {
-				"navigationBarTitleText": "适应性培训"
+				"navigationBarTitleText": "适应性培训",
+				"navigationBarBackgroundColor": "#3D5D4C",
+				"navigationBarTextStyle": "white"
 			}
 		}, {
 			"path": "pages/basicTraining/myBasicTraining/myBasicTraining",
@@ -422,6 +424,24 @@
 				"navigationStyle": "custom"
 			}
 
+		}, {
+			"path": "pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails",
+			"style": {
+				"navigationBarTitleText": "适应性培训线上课程",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#3D5D4C",
+				"navigationBarTextStyle": "white"
+			}
+
+		}, {
+			"path": "pages/basicTraining/offlineTrainingDetails/offlineTrainingDetails",
+			"style": {
+				"navigationBarTitleText": "线下课程详情",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#3D5D4C",
+				"navigationBarTextStyle": "white"
+			}
+
 		}
 	],
 	"globalStyle": {

+ 14 - 17
h5_web/pages/applyEducationCode/applyEducationCode.vue

@@ -14,14 +14,11 @@
 			<u-form-item label="民族:" prop="nation">
 				<u-input v-model="form.nation" placeholder="请输入您的民族" />
 			</u-form-item>
-			<!-- <u-form-item label="联系电话:" prop="vetePhone" :required="true">
-				<u-input v-model="form.vetePhone" placeholder="请输入您的联系电话" maxlength="11" />
-			</u-form-item> -->
-			<u-form-item label="文化程度:" prop="degrEduc" :required="true">
-				<u-input v-model="form.degrEduc" placeholder="请选择您的文化程度" type="select" @click="degrEducShow = true"/>
+			<u-form-item label="所在区域:" prop="veteHousehArea" :required="true">
+				<u-input v-model="form.veteHousehArea" placeholder="请选择您的户籍区域" type="select" @click="areaShow = true"/>
 			</u-form-item>
-			<u-form-item label="政治面貌:" prop="politOutlook" :required="true">
-				<u-input v-model="form.politOutlook" placeholder="请选择您的政治面貌" type="select" @click="politOutlookShow = true"/>
+			<u-form-item label="现家庭详细地址:" label-position="top" label-width="200" label-align="left" prop="veteResiAddress" :required="true">
+				<u-input v-model="form.veteResiAddress" placeholder="请输入您的现家庭详细地址" />
 			</u-form-item>
 			<u-form-item label="户籍类别:" prop="houseTypeId">
 				<u-radio-group v-model="form.houseTypeId" @change="houseTypeChange">
@@ -33,11 +30,11 @@
 			<u-form-item label="户籍地:" prop="veteHousehRegi">
 				<u-input v-model="form.veteHousehRegi" placeholder="请选择您的户籍地" type="select" @click="regionClick"/>
 			</u-form-item>
-			<u-form-item label="户籍区域:" prop="veteHousehArea" :required="true">
-				<u-input v-model="form.veteHousehArea" placeholder="请选择您的户籍区域" type="select" @click="areaShow = true"/>
+			<u-form-item label="文化程度:" prop="degrEduc" :required="true">
+				<u-input v-model="form.degrEduc" placeholder="请选择您的文化程度" type="select" @click="degrEducShow = true"/>
 			</u-form-item>
-			<u-form-item label="现家庭详细地址:" label-position="top" label-width="200" label-align="left" prop="veteResiAddress" :required="true">
-				<u-input v-model="form.veteResiAddress" placeholder="请输入您的现家庭详细地址" />
+			<u-form-item label="政治面貌:" prop="politOutlook" :required="true">
+				<u-input v-model="form.politOutlook" placeholder="请选择您的政治面貌" type="select" @click="politOutlookShow = true"/>
 			</u-form-item>
 			<u-form-item label="就业状况:" prop="jobStatus">
 				<u-radio-group v-model="form.jobStatus">
@@ -49,6 +46,12 @@
 			<u-form-item label="薪资范围:" prop="salaryRangeName">
 				<u-input v-model="form.salaryRangeName" placeholder="请选择您的薪资范围" type="select" @click="salaryRangeShow = true"/>
 			</u-form-item>
+			<u-form-item label="QQ:" prop="qqNum">
+				<u-input v-model="form.qqNum" placeholder="请输入您的QQ" />
+			</u-form-item>
+			<u-form-item label="微信:" prop="wxNum">
+				<u-input v-model="form.wxNum" placeholder="请输入您的微信" />
+			</u-form-item>
 			<u-form-item label="近期1寸免冠照片:" label-position="top" label-width="200" label-align="left" :required="true">
 				<view class="pic">
 					<u-upload
@@ -81,12 +84,6 @@
 					</view>
 				</view>
 			</u-form-item>
-			<u-form-item label="QQ:" prop="qqNum">
-				<u-input v-model="form.qqNum" placeholder="请输入您的QQ" />
-			</u-form-item>
-			<u-form-item label="微信:" prop="wxNum">
-				<u-input v-model="form.wxNum" placeholder="请输入您的微信" />
-			</u-form-item>
 			<u-form-item>
 				<u-button type="primary" class="submit" @click="submit">提交</u-button>
 			</u-form-item>

+ 183 - 0
h5_web/pages/basicTraining/basicTraining - 副本.vue

@@ -0,0 +1,183 @@
+<template>
+	<view>
+		<image class="bg" src="../../static/img/basic-training-bg.png" mode="widthFix"></image>
+		<view class="tab">
+			<view class="tab-bg">
+				<!-- <u-tabs ref="btabs" :list="tabs" :is-scroll="false" :current="tabIndex" @change="tabChange"></u-tabs> -->
+				<view class="tab-list">
+					<view class="tab-item" v-for="(item, index) in tabs" :key="index" :class="{'active': tabIndex === index}" @click="tabChange(index)">{{ item.name }}</view>
+				</view>
+				
+				<view class="training-data">
+					<view class="training-data-item" v-if="tabIndex === 0">
+						<view>已看课程</view>
+						<view><text>8</text>个</view>
+					</view>
+					<view class="training-data-item">
+						<view>还需观看</view>
+						<view><text>10</text>个</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<onlineTraining v-show="tabIndex=='0'" :key="1" :onlineData="onlineData" :rate="rate"></onlineTraining>
+		<offlineTraining v-show="tabIndex=='1'" :key="2" :offlineId="offlineId"></offlineTraining>
+	</view>
+</template>
+
+<script>
+	import onlineTraining from './components/online.vue';
+	import offlineTraining from './components/offline.vue';
+	export default{
+		components:{
+			onlineTraining,
+			offlineTraining
+		},
+		data(){
+			return{
+				tabs: [{name: '适应性培训'},{name:'线下培训'}],
+				tabIndex: 0 ,// tab下标
+				onlineData:[],
+				rate:{},
+				offlineId:'',
+				analysisParams:{
+					platform:'1',//平台:1-H5 2-APP 3-小程序 4-PC端
+					pages:location.href,//页面路径
+					btnName:'',//按钮名称
+					btnEvent:'1',//按钮事件: 1-点击 2-长按 3-滑动
+					ipAddress:'',//IP地址
+					typeName:'适应性培训',//类型名称 例:学校关注度 、适应性考试等
+					typeCode:'',//类型编码 例:类型名称首字母缩写(XXGZD)
+					categoryName:'',//类别名称 例:XX学校,SS考试
+				}
+			}
+		},
+		onLoad(page){
+			if(page?.type=='offline'){
+				this.tabIndex = 1;
+				if(page.id){
+					this.offlineId = page.id;
+					console.log('this.offlineId',this.offlineId)
+				}
+			};
+			
+		
+		},
+		onShow(){
+			this.getAdaptTrainOnline();
+			this.getAdaptTrainOnlineRate();			
+		},
+		mounted() {
+			this.postAnalysis();
+			
+		},
+		methods:{
+			getip(){
+				let that = this;
+				uni.request({
+				    url:'/apis/cityjson?ie=utf-8',
+					method:'GET',
+					success: (res) => {
+						// console.log('this',this);
+				        const reg = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/;
+						let ip = reg.exec(res.data);
+						// that.analysisParams.ipAddress = ip[0];
+						console.log('analysisParams',this.analysisParams);
+					}
+				});
+			},
+			async postAnalysis(){
+				await this.getip();
+				this.$u.api.postAnalysis(this.analysisParams).then(res=>{
+					console.log('res',res);
+				});
+			},
+			// 切换菜单
+			tabChange(index) {
+				console.log(index)
+				this.tabIndex = index;
+				
+			},
+			getAdaptTrainOnline(){
+				this.$u.api.getAdaptTrainOnline().then(res=>{
+					if(res.code == 200){
+						this.onlineData = res.data;
+					}else{
+						uni.showToast({
+							icon:'none',
+							title:res.msg
+						})
+					}
+					
+					console.log('getAdaptTrainOnline',JSON.parse(JSON.stringify(res)));
+				})
+			},
+			getAdaptTrainOnlineRate(){
+				this.$u.api.getAdaptTrainOnlineRate().then(res=>{
+					this.rate = res.data;
+					console.log('getAdaptTrainOnlineRate',JSON.parse(JSON.stringify(res)));
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{
+		background-color: #f9f9f9;
+		padding-bottom: 48rpx;
+	}
+	.bg {
+		width: 100%;
+	}
+	.tab {
+		background-color: #fff;
+		border-radius: 0 0 18rpx 18rpx;
+		height: 348rpx;
+	}
+	.tab-bg {
+		background: url(../../static/img/basic-training-tab-bg.png) no-repeat center center;
+		background-size: 100%;
+		height: 198rpx;
+	}
+	.tab-list {
+		display: flex;
+		justify-content: space-between;
+		text-align: center;
+		padding: 40rpx 160rpx 30rpx 160rpx;
+	}
+	.tab-item {
+		font-size: 34rpx;
+		color: #000000;
+	}
+	.active {
+		color: #335CEB;
+		border-bottom: solid 2px #335CEB;
+		padding-bottom: 10rpx;
+	}
+	.training-data {
+		width: calc(100% - 60rpx);
+		margin: 0 auto;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.11);
+		border-radius: 10rpx;
+		display: flex;
+		justify-content: space-between;
+		&-item {
+			width: 50%;
+			text-align: center;
+			padding: 36rpx 0;
+			view {
+				color: #656565;
+				font-size: 28rpx;
+				&:last-child {
+					font-size: 26rpx;
+					text {
+						color: #505050;
+						font-size: 60rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 168 - 0
h5_web/pages/basicTraining/basicTraining.scss

@@ -0,0 +1,168 @@
+/* 适应性培训 */
+page {
+	background-color: #f9f9f9;
+	padding-bottom: 100rpx;
+}
+.bg {
+	width: 100%;
+}
+.tab {
+	background-color: #fff;
+	border-radius: 0 0 18rpx 18rpx;
+	height: 348rpx;
+}
+.tab-bg {
+	background: url(../../static/img/basic-training-tab-bg.png) no-repeat center center;
+	background-size: 100%;
+	height: 198rpx;
+}
+.tab-list {
+	display: flex;
+	justify-content: space-between;
+	text-align: center;
+	padding: 40rpx 160rpx 30rpx 160rpx;
+}
+.tab-item {
+	font-size: 34rpx;
+	color: #000000;
+}
+.active {
+	color: #335CEB;
+	border-bottom: solid 2px #335CEB;
+	padding-bottom: 10rpx;
+}
+.training-data {
+	width: calc(100% - 60rpx);
+	margin: 0 auto;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.11);
+	border-radius: 10rpx;
+	display: flex;
+	justify-content: space-between;
+	&-item {
+		width: 50%;
+		text-align: center;
+		padding: 36rpx 0;
+		view {
+			color: #656565;
+			font-size: 28rpx;
+			&:last-child {
+				font-size: 26rpx;
+				text {
+					color: #505050;
+					font-size: 60rpx;
+				}
+			}
+		}
+	}
+}
+.training-offline {
+	width: calc(100% - 60rpx);
+	margin: 0 auto;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.11);
+	border-radius: 10rpx;
+	padding: 30rpx 0;
+	text-align: center;
+	view {
+		&:first-child {
+			color: #FF7E00;
+			font-size: 36rpx;
+			font-size: 500;
+		}
+		&:last-child {
+			color: #A3A3A3;
+			font-size: 24rpx;
+			margin-top: 20rpx;
+		}
+	}
+}
+.mt26 {
+	margin-top: 26rpx;
+}
+.training-adaptability {
+	background-color: #fff;
+	padding: 39rpx 30rpx 0 30rpx;
+	border-top-left-radius: 18rpx;
+	border-top-right-radius: 18rpx;
+	
+	&-title {
+		font-size: 38rpx;
+		color: #424242;
+	}
+	&-list {
+		&-item {
+			border-bottom: solid 1px #DBDBDB;
+			margin-bottom: 4rpx;
+			padding: 28rpx 0;
+			display: flex;
+			align-items: center;
+			.left {
+				margin-right: 14rpx;
+			}
+			.right {
+				font-size: 30rpx;
+				color: #424242;
+				view {
+					&:last-child {
+						font-size: 24rpx;
+						color: #6F6F6F;
+						margin-top: 20rpx;
+					}
+				}
+			}
+		}
+	}
+}
+
+.training-offline1 {
+	border-radius: 18rpx;
+	background-color: #fff;
+	padding: 50rpx 30rpx;
+	margin-top: 20rpx;
+	&-title {
+		font-size: 38rpx;
+		color: #424242;
+		margin-bottom: 20rpx;
+	}
+	&-list {
+		&-item {
+			margin-bottom: 4rpx;
+			padding: 12rpx 0;
+			border-bottom: solid 1px #DBDBDB;
+			.top {
+				display: flex;
+				justify-content: space-between;
+				margin-bottom: 20rpx;
+				view {
+					font-size: 30rpx;
+					color: #424242;
+					&:last-child {
+						min-width: 40%;
+						text-align: right;
+						color: #9A9A9A;
+					}
+				}
+			}
+			.bottom {
+				font-size: 24rpx;
+				color: #6F6F6F;
+				line-height: 40rpx;
+				padding-bottom: 10rpx;
+			}
+		}
+	}
+}
+
+.study-status {
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	width: 100%;
+	height: 96rpx;
+	line-height: 96rpx;
+	background-color: #709078;
+	color: #fff;
+	font-size: 36rpx;
+	text-align: center;
+}

+ 133 - 84
h5_web/pages/basicTraining/basicTraining.vue

@@ -1,103 +1,155 @@
 <template>
-	<view>
-		<image class="bg" src="../../static/img/basicTraining-bg.png" mode="widthFix"></image>
-		<u-tabs ref="btabs" :list="tabs" :is-scroll="false" :current="tabIndex" @change="tabChange"></u-tabs>
-		<onlineTraining v-show="tabIndex=='0'" :key="1" :onlineData="onlineData" :rate="rate"></onlineTraining>
-		<offlineTraining v-show="tabIndex=='1'" :key="2" :offlineId="offlineId"></offlineTraining>
+	<view class="training">
+		<image class="bg" src="../../static/img/basic-training-bg.png" mode="widthFix"></image>
+		<view class="tab">
+			<view class="tab-bg">
+				<view class="tab-list">
+					<view class="tab-item" v-for="(item, index) in tabs" :key="index" :class="{'active': tabIndex === index}" @click="tabChange(index)">{{ item.name }}</view>
+				</view>
+				
+				<view class="training-data" v-if="tabIndex === 0">
+					<view class="training-data-item">
+						<view>已看课程</view>
+						<view><text>{{ online.play }}</text>个</view>
+					</view>
+					<view class="training-data-item">
+						<view>还需观看</view>
+						<view><text>{{ online.playNot }}</text>个</view>
+					</view>
+				</view>
+				<view class="training-offline" v-if="tabIndex === 1">
+					<view>未参加线下培训</view>
+					<view>(注:必须参加线下培训才能通过适应性培训)</view>
+				</view>
+			</view>
+		</view>
+		
+		<!-- 适应性培训 -->
+		<view class="training-adaptability mt26" v-if="tabIndex === 0">
+			<view class="training-adaptability-title">线上课程</view>
+		</view>
+		<view class="training-adaptability" v-if="tabIndex === 0">
+			<view class="training-adaptability-list">
+				<view class="training-adaptability-list-item"
+				v-for="(item, index) in list"
+				:key="index"
+				@click="jumpPage('/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails', { id: item.id })"
+				>
+					<view class="left">
+						<u-image :src="item.titleImg" width="198" height="144"></u-image>
+					</view>
+					<view class="right">
+						<view>{{ item.adaptName }}</view>
+						<view>共{{ item.amount }}节课,已学完{{ item.finishCount }}节课,学习进度{{ item.finishPercent ? item.finishPercent : 0 }}%</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<!-- 线下培训 -->
+		<view class="training-offline1" v-if="tabIndex === 1">
+			<view class="training-offline1-title">
+				线下培训
+			</view>
+			<view class="training-offline1-list">
+				<view class="training-offline1-list-item" v-for="(item, index) in offLineList" :key="index" @click="jumpPage('pages/basicTraining/offlineTrainingDetails/offlineTrainingDetails', { id: item.id })">
+					<view class="top">
+						<view>{{ item.adaptName }}</view>
+						<view>{{ item.createTime }}</view>
+					</view>
+					<view class="bottom">{{ item.adaptAddress }}</view>
+				</view>
+			</view>
+		</view>
+		<view class="study-status" v-if="tabIndex === 0">学习状态:{{ online.status === 0 ? '未完成' : '已完成' }}</view>
+		<view class="study-status" v-if="tabIndex === 1">学习状态:{{ offlineStatus === 0 ? '未完成' : '已完成'}}</view>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
-	import onlineTraining from './components/online.vue';
-	import offlineTraining from './components/offline.vue';
 	export default{
-		components:{
-			onlineTraining,
-			offlineTraining
-		},
 		data(){
 			return{
-				tabs: [{name: '培训课程'},{name:'线下培训'}],
-				tabIndex: 0 ,// tab下标
-				onlineData:[],
-				rate:{},
-				offlineId:'',
-				analysisParams:{
-					platform:'1',//平台:1-H5 2-APP 3-小程序 4-PC端
-					pages:location.href,//页面路径
-					btnName:'',//按钮名称
-					btnEvent:'1',//按钮事件: 1-点击 2-长按 3-滑动
-					ipAddress:'',//IP地址
-					typeName:'适应性培训',//类型名称 例:学校关注度 、适应性考试等
-					typeCode:'',//类型编码 例:类型名称首字母缩写(XXGZD)
-					categoryName:'',//类别名称 例:XX学校,SS考试
-				}
+				tabs: [
+					{ name: '适应性培训' },
+					{ name:'线下培训' },
+				],
+				tabIndex: 0,
+				list: [],
+				online: {
+					status: 0,
+					play: 0,
+					playNot: 0
+				},
+				offlineStatus: 0,
+				offLineList: []
 			}
 		},
-		onLoad(page){
-			if(page?.type=='offline'){
-				this.tabIndex = 1;
-				if(page.id){
-					this.offlineId = page.id;
-					console.log('this.offlineId',this.offlineId)
-				}
-			};
-			
-		
-		},
-		onShow(){
-			this.getAdaptTrainOnline();
-			this.getAdaptTrainOnlineRate();			
-		},
-		mounted() {
-			this.postAnalysis();
-			
+		onShow() {
+			this.getOnlineList(1, 200000);
+			this.getOnlineStatus();
+			this.getOfflineList()
 		},
 		methods:{
-			getip(){
-				let that = this;
-				uni.request({
-				    url:'/apis/cityjson?ie=utf-8',
-					method:'GET',
-					success: (res) => {
-						// console.log('this',this);
-				        const reg = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/;
-						let ip = reg.exec(res.data);
-						that.analysisParams.ipAddress = ip[0];
-						console.log('analysisParams',this.analysisParams);
-					}
-				});
-			},
-			async postAnalysis(){
-				await this.getip();
-				this.$u.api.postAnalysis(this.analysisParams).then(res=>{
-					console.log('res',res);
-				});
-			},
 			// 切换菜单
 			tabChange(index) {
-				console.log('tabChange index',index)
 				this.tabIndex = index;
-				
 			},
-			getAdaptTrainOnline(){
-				this.$u.api.getAdaptTrainOnline().then(res=>{
-					if(res.code == 200){
-						this.onlineData = res.data;
-					}else{
-						uni.showToast({
-							icon:'none',
-							title:res.msg
+			/**
+			 * 获取在线课程
+			 * @param {Object} pageNum
+			 * @param {Object} pageSize
+			 */
+			getOnlineList(pageNum, pageSize) {
+				this.$u.api.training.getOnlineListApi({pageNum, pageSize}).then(res => {
+					if (res.code === 200) {
+						this.list = res.rows
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				})
+			},
+			/**
+			 * 获取在线课程学习状态
+			 */
+			getOnlineStatus() {
+				this.$u.api.training.getOnlineStatusApi().then(res => {
+					if (res.code === 200) {
+						this.online.status = res.data.status
+						this.online.play = res.data.play
+						this.online.playNot = res.data.playNot
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				})
+			},
+			getOfflineList() {
+				this.$u.api.training.getOfflineListApi({
+					pageNum: 1,
+					paheSize: 3000
+				}).then(res => {
+					console.log(res)
+					if (res.code === 200) {
+						this.offLineList = res.rows
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
 						})
 					}
-					
-					console.log('getAdaptTrainOnline',JSON.parse(JSON.stringify(res)));
 				})
 			},
-			getAdaptTrainOnlineRate(){
-				this.$u.api.getAdaptTrainOnlineRate().then(res=>{
-					this.rate = res.data;
-					console.log('getAdaptTrainOnlineRate',JSON.parse(JSON.stringify(res)));
+			jumpPage(url, params) {
+				this.$u.route({
+					url: url,
+					params: params
 				})
 			}
 		}
@@ -105,8 +157,5 @@
 </script>
 
 <style lang="scss" scoped>
-	page{background-color: #f9f9f9;padding-bottom: 48rpx;}
-	.bg{width: 100%;}
-	
-	// @import  './BasicTraining.scss'
+@import './basicTraining.scss';
 </style>

+ 128 - 0
h5_web/pages/basicTraining/basicTrainingDetails/basicTrainingDetails - 副本.vue

@@ -0,0 +1,128 @@
+<template>
+	<view>
+		<!-- <video id="vid"><source :src="details.videoUrl"></video> -->
+		<!-- <video width="320" height="240" controls="controls" preload="auto">
+		  <source src="static/img/11111.mp4" type="video/mp4">
+		您的浏览器不支持Video标签。
+		</video> -->
+		<!-- <video @timeupdate="updateTime" @canplay="getDuration" ref="video111" :src="details.videoUrl" controls="controls" preload="auto"></video> -->
+		<!-- <view id="player" style="width: 100%;"></view> -->
+		<video id="myVideo" @timeupdate="timeUpdate" :src="url" controls initial-time="initial_time" />
+		<u-button @click="changeRate">切换</u-button>
+		<u-parse :html="details.content" class="f-padding"></u-parse>
+	</view>
+</template>
+
+<script>
+	import Player from 'xgplayer';
+	
+	export default{
+		data(){
+			return{
+				videoContext: uni.createVideoContext('myVideo', this),
+				id:'',
+				content:'',
+				details:{},
+				duration:'',
+				url: "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400",
+				video_real_time: 0, //实时播放进度
+				nitial_time: '', //视频跳转进度 秒
+			}
+		},
+		onLoad(page){
+			console.log(page)
+			this.id = page.id;
+			this.getAdaptTrainOnlineDetails(this.id);
+			this.initial_time = '0'
+		},
+		onShow(){
+			
+		},
+		methods:{
+			getAdaptTrainOnlineDetails(id){
+				this.$u.api.getAdaptTrainOnlineDetails({id:id}).then(res=>{
+					this.details = res.data;
+					let player = new Player({
+					  id: 'player',
+					  autoplay: false,
+					  playsinline: true,
+					  url: this.details.videoUrl,
+					  "screenShot": true,
+					  fluid: true,
+					  videoInit: true,
+					  enableVideoDbltouch: true,
+					});
+					player.once('ended',()=>{
+						this.upAdaptTrainOnlineInfo();
+					});
+					player.once('canplay',(e)=>{
+						console.log('canplay',player.duration)
+						this.duration = player.duration;
+					});
+					player.on('timeupdate',()=>{
+						let that = this;
+						// console.log('that',that);
+						// console.log('currentTime',player.currentTime);
+						// // setInterval(that.aaa+=1,1000)
+						// console.log('that.aaa',that.aaa);
+					  //事件名称可以在上述查询
+					});
+					console.log('getAdaptTrainOnline',JSON.parse(JSON.stringify(res)));
+				})
+			},
+			upAdaptTrainOnlineInfo(){
+				let params ={
+					tabId:this.details.id,
+					adaptName:this.details.adaptName,
+					url:this.details.videoUrl,
+					type:this.details.videoType,
+					duration:this.duration,
+					playDuration:this.duration,
+				}
+				this.$u.api.upAdaptTrainOnlineInfo(params).then(res=>{
+					this.rate = res.data;
+					console.log('upAdaptTrainOnlineInfo',JSON.parse(JSON.stringify(res)));
+				})
+			},
+			timeUpdate(e) {
+				var isReady = 1; // 是否开启可以视频快进 1 禁止开启
+				//跳转到指定播放位置 initial-time 时间为秒
+				let that = this;
+				//播放的总时长
+				var duration = e.detail.duration
+				//实时播放进度 秒数
+				var currentTime = parseInt(e.detail.currentTime)
+				//当前视频进度
+				// console.log("视频播放到第" + currentTime + "秒")//查看正在播放时间,以秒为单位
+				if (that.video_real_time == 0){
+					var jump_time = parseInt(that.initial_time) + parseInt(that.video_real_time)
+				} else {
+					var jump_time = parseInt(that.video_real_time)
+				}
+				if(isReady==1){
+					if (currentTime > jump_time && currentTime - jump_time>3){
+						let videoContext = wx.createVideoContext('myVideo')
+						videoContext.seek(that.video_real_time)
+						wx.showToast({
+							title: '未完整看完该视频,不能快进',
+							icon: 'none',
+							duration: 2000,
+						})
+					}
+				}
+			 that.video_real_time = currentTime //实时播放进度
+			},
+			changeRate() {
+				this.videoContext.playbackRate(2.0)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	#player{margin-bottom: 24rpx;}
+	// @import  './basicTrainingDetails.scss'
+	#myVideo {
+		width: 100%;
+	}
+</style>

+ 126 - 0
h5_web/pages/basicTraining/components/online - 副本.vue

@@ -0,0 +1,126 @@
+<template>
+	<view class="online">
+		<!-- <view class="statistics u-flex u-row-between">
+			<view class="statistics-item">
+				<view class="up">已看课程</view>
+				<view class="down"><text>{{rate.play}}</text> 节</view>
+			</view>
+			<view class="statistics-item">
+				<view class="up">还需观看</view>
+				<view class="down"><text>{{rate.playNot}}</text> 节</view>
+			</view>
+		</view> -->
+		<view class="content">
+			<view class="instructions" v-if="onlineTabIndex==0">
+				<view class="text">
+					培训内容包括单不限于思想政治教育,法律法规政策介绍,就业创业指导,心里引导,求职技巧指导,服务项目指引等。
+				</view>
+				<!-- <image src="../../../static/img/instructions-01.png" mode=""></image> -->
+				<!-- <image src="../../../static/img/instructions-02.png" mode=""></image> -->
+				<view class="catalog f-padding">
+					<view 
+					class="catalog-item u-flex" 
+					:class="{ 'unstudy':item.flag == 0, 'studying':item.flag == 1, 'studyed':item.flag == 2 }"
+					v-for="(item,index) in onlineData" :key="item.id+index" 
+					@click="catalogItemClick(item)">
+						<view class="number">{{index + 1}}.</view>
+						<view class="name">{{item.adaptName}}</view>
+					</view>
+				</view>
+			</view>
+			<!-- <view class="catalog f-padding" v-if="onlineTabIndex==1">
+				<view 
+				class="catalog-item u-flex" 
+				:class="{ 'unstudy':item.flag == 0, 'studying':item.flag == 1, 'studyed':item.flag == 2 }"
+				v-for="(item,index) in onlineData" :key="item.id+index" 
+				@click="catalogItemClick(item)">
+					<view class="number">{{index + 1}}.</view>
+					<view class="name">{{item.adaptName}}</view>
+				</view>
+			</view> -->
+		</view>
+		<u-bottom>
+			<view slot="content" class="status-btn fix-bottom">
+				学习状态:{{rate.status|verifyStatusFilter}}
+			</view>
+		</u-bottom>
+	</view>
+</template>
+
+<script>
+	export default{
+		name: 'onlineTraining',
+		props:{
+			onlineData: {
+				type: Array,
+				default: function() {
+					return []
+				}
+			},
+			rate:{
+				type:Object,
+				default: function() {
+					return new Object()
+				}
+			}
+		},
+		data(){
+			return{
+				onlineTabs: [{name: '课程说明'},{name:'课程视频'}],
+				onlineTabIndex:0,
+				catalogList:[]
+			}
+		},
+		onLoad(){
+			
+		},
+		onShow(){
+			
+		},
+		filters: {
+		  verifyStatusFilter(value) {
+			if (value === 0) {
+			  return '未全部完成';
+			}else if(value === 1){
+				return '已全部完成';
+			}else {
+			  return '未知';
+			}
+		  },
+		},
+		methods:{
+			onlineTabChange(index){
+				this.onlineTabIndex = index;
+			},
+			catalogItemClick(item){
+				this.$u.route({
+					url: 'pages/basicTraining/basicTrainingDetails/basicTrainingDetails',
+					params: {
+						id: item.id
+					}
+				});
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.online{margin: 24rpx;}
+	.statistics{text-align: center;background-color: #fff;border-radius: 8rpx;padding: 24rpx;margin-bottom: 24rpx;}
+	.statistics-item{width: 50%;}
+	.statistics-item .up{font-size: 30rpx;color: #444;}
+	.statistics-item .down{color: #969696;}
+	.statistics-item .down text{font-weight: bold;margin-right: 5rpx;}
+	.catalog{background-color: #fff;font-size: 36rpx;padding-bottom: 24rpx;}
+	.catalog-item{margin-bottom: 24rpx;}
+	.catalog-item.unstudy{}
+	.catalog-item.studying{color: #e87c7c;}
+	.catalog-item.studyed{color: #c5c5c5;}
+	.catalog-item .number{margin-right: 15rpx;}
+	.content{background-color: #fff;}
+	.instructions .text{padding: 24rpx;color: #969696;}
+	.instructions image{width: 100%;}
+	.status-btn{background-color: #4433d9;color: #fff;margin: 0 24rpx;padding: 24rpx;border-radius: 8rpx;}
+	// @import  './online.scss'
+</style>

+ 16 - 110
h5_web/pages/basicTraining/components/online.vue

@@ -1,127 +1,33 @@
 <template>
 	<view class="online">
-		<view class="statistics u-flex u-row-between">
-			<view class="statistics-item">
-				<view class="up">已看课程</view>
-				<view class="down"><text>{{rate.play}}</text> 节</view>
-			</view>
-			<view class="statistics-item">
-				<view class="up">还需观看</view>
-				<view class="down"><text>{{rate.playNot}}</text> 节</view>
-			</view>
+		<z-paging
+			ref="paging"
+			v-model="classesList"
+			@query="queryList"
+		>
+		<view class="online-content">
+			<view class="online-content-header">线上课程</view>
 		</view>
-		<view class="content">
-			<!-- <u-tabs ref="otabs" :list="onlineTabs" :is-scroll="false" :current="onlineTabIndex" @change="onlineTabChange"></u-tabs> -->
-			<view class="instructions" v-if="onlineTabIndex==0">
-				<view class="text">
-					培训内容包括单不限于思想政治教育,法律法规政策介绍,就业创业指导,心里引导,求职技巧指导,服务项目指引等。
-				</view>
-				<!-- <image src="../../../static/img/instructions-01.png" mode=""></image> -->
-				<!-- <image src="../../../static/img/instructions-02.png" mode=""></image> -->
-				<view class="catalog f-padding">
-					<view 
-					class="catalog-item u-flex" 
-					:class="{ 'unstudy':item.flag == 0, 'studying':item.flag == 1, 'studyed':item.flag == 2 }"
-					v-for="(item,index) in onlineData" :key="item.id+index" 
-					@click="catalogItemClick(item)">
-						<view class="number">{{index + 1}}.</view>
-						<view class="name">{{item.adaptName}}</view>
-					</view>
-				</view>
-			</view>
-			<!-- <view class="catalog f-padding" v-if="onlineTabIndex==1">
-				<view 
-				class="catalog-item u-flex" 
-				:class="{ 'unstudy':item.flag == 0, 'studying':item.flag == 1, 'studyed':item.flag == 2 }"
-				v-for="(item,index) in onlineData" :key="item.id+index" 
-				@click="catalogItemClick(item)">
-					<view class="number">{{index + 1}}.</view>
-					<view class="name">{{item.adaptName}}</view>
-				</view>
-			</view> -->
-		</view>
-		<u-bottom>
-			<view slot="content" class="status-btn fix-bottom">
-				学习状态:{{rate.status|verifyStatusFilter}}
-			</view>
-		</u-bottom>
+		</z-paging>
 	</view>
 </template>
 
 <script>
 	export default{
 		name: 'onlineTraining',
-		props:{
-			onlineData: {
-				type: Array,
-				default: function() {
-					return []
-				}
-			},
-			rate:{
-				type:Object,
-				default: function() {
-					return new Object()
-				}
-			}
-		},
-		data(){
-			return{
-				onlineTabs: [{name: '课程说明'},{name:'课程视频'}],
-				onlineTabIndex:0,
-				catalogList:[]
+		data() {
+			return {
+				classesList: []
 			}
 		},
-		onLoad(){
-			
-		},
-		onShow(){
-			
-		},
-		filters: {
-		  verifyStatusFilter(value) {
-			if (value === 0) {
-			  return '未全部完成';
-			}else if(value === 1){
-				return '已全部完成';
-			}else {
-			  return '未知';
-			}
-		  },
-		},
-		methods:{
-			onlineTabChange(index){
-				this.onlineTabIndex = index;
-			},
-			catalogItemClick(item){
-				this.$u.route({
-					url: 'pages/basicTraining/basicTrainingDetails/basicTrainingDetails',
-					params: {
-						id: item.id
-					}
-				});
-			}
-			
+		methods: {
+			queryList() {}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.online{margin: 24rpx;}
-	.statistics{text-align: center;background-color: #fff;border-radius: 8rpx;padding: 24rpx;margin-bottom: 24rpx;}
-	.statistics-item{width: 50%;}
-	.statistics-item .up{font-size: 30rpx;color: #444;}
-	.statistics-item .down{color: #969696;}
-	.statistics-item .down text{font-weight: bold;margin-right: 5rpx;}
-	.catalog{background-color: #fff;font-size: 36rpx;padding-bottom: 24rpx;}
-	.catalog-item{margin-bottom: 24rpx;}
-	.catalog-item.unstudy{}
-	.catalog-item.studying{color: #e87c7c;}
-	.catalog-item.studyed{color: #c5c5c5;}
-	.catalog-item .number{margin-right: 15rpx;}
-	.content{background-color: #fff;}
-	.instructions .text{padding: 24rpx;color: #969696;}
-	.instructions image{width: 100%;}
-	.status-btn{background-color: #4433d9;color: #fff;margin: 0 24rpx;padding: 24rpx;border-radius: 8rpx;}
-	// @import  './online.scss'
+	.online{
+		margin: 26rpx 0;
+	}
 </style>

+ 89 - 0
h5_web/pages/basicTraining/offlineTrainingDetails/offlineTrainingDetails.vue

@@ -0,0 +1,89 @@
+<!-- 专业详情 -->
+<template>
+	<view class="details">
+		<view class="details-name">{{ info.adaptName }}</view>
+		<view class="details-code">({{ info.adaptAddress }})</view>
+		<view class="details-content">
+			<u-parse v-if="info.adaptPlan" :html="info.adaptPlan"></u-parse>
+			<u-empty v-else text="暂无专业详情" mode="data"></u-empty>
+		</view>
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// id
+				offlineId: '',
+				// 信息
+				info: ''
+			}
+		},
+		onLoad(page) {
+			if (page.id) {
+				this.offlineId = page.id
+			}
+		},
+		onShow() {
+			if (this.offlineId) {
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.getOfflineDetails(this.offlineId)
+			}
+		},
+		methods: {
+			/**
+			 * 通过本地获取专业信息
+			 */
+			getOfflineDetails(id) {
+				this.$u.api.training.getOfflineDetailsApi({
+					id: id
+				}).then(res => {
+					uni.hideLoading()
+					if (res.code === 200) {
+						this.info = res.data
+					}
+				}).catch(err => {
+					uni.hideLoading()
+					this.$refs.uToast.show({
+						title: '系统错误!',
+						type: 'error'
+					})
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.details {
+	padding: 0 32rpx;
+	font-family: 'PingFangSC-Medium, PingFang SC';
+	&-name {
+		padding-top: 60rpx;
+		text-align: center;
+		font-size: 42rpx;
+		color: #3D5D4C;
+		font-weight: 600;
+	}
+	&-code {
+		color: #606060;
+		font-size: 36rpx;
+		text-align: center;
+		margin: 30rpx 0;
+	}
+	&-content {
+		color: #545454;
+		font-size: 24rpx;
+		line-height: 40rpx;
+	}
+	&-total {
+		color: #9B9B9B;
+		font-size: 24rpx;
+		margin-top: 60rpx;
+	}
+}
+</style>

+ 266 - 0
h5_web/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails.scss

@@ -0,0 +1,266 @@
+/* 适应性培训线上课程 */
+page {
+	background-color: #f2f2f2;
+	font-family: 'PingFangSC-Regular, PingFang SC';
+	
+	.details {
+		
+		&-video {
+			
+			&-con {
+				width: 100%;
+				height: 400rpx;
+			}
+		}
+		
+		&-content {
+			background-color: #fff;
+			padding: 20rpx 30rpx;
+			margin-top: -6rpx;
+			border-radius: 0 0 18rpx 18rpx;
+			
+			&-title {
+				color: #424242;
+				font-size: 36rpx;
+				font-weight: 500;
+			}
+			
+			&-progress {
+				padding: 26rpx 0;
+				color: #EF651F;
+				font-size: 26rpx;
+			}
+			
+			&-teacher {
+				font-size: 32rpx;
+				color: #424242;
+				margin-bottom: 22rpx;
+			}
+			
+			&-info {
+				color: #545454;
+				font-size: 24rpx;
+				line-height: 44rpx;
+			}
+		}
+		
+		&-classes {
+			background-color: #fff;
+			border-radius: 18rpx 18rpx 0 0;
+			padding: 42rpx 30rpx;
+			margin-top: 26rpx;
+			&-header {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				color: #424242;
+				font-size: 36rpx;
+				view {
+					&:last-child {
+						color: #A3A3A3;
+						font-size: 24rpx;
+					}
+				}
+			}
+			&-list {
+				display: flex;
+				flex-wrap: wrap;
+				margin-top: 30rpx;
+				&-item {
+					margin-right: 20rpx;
+					view {
+						&:first-child {
+							padding: 20rpx 34rpx;
+							background-color: #C4C4C4;
+							color: #fff;
+							font-size: 40rpx;
+							border-radius: 16rpx;
+						}
+						&:last-child {
+							text-align: center;
+							margin-top: 10rpx;
+							color: #827F7F;
+							font-size: 24rpx;
+						}
+					}
+				}
+				.active {
+					view {
+						&:first-child {
+							background: linear-gradient(168deg, #A5C8AC 0%, #709078 100%);
+						}
+						&:last-child {
+							color: #709078;
+						}
+					}
+				}
+			}
+		}
+		
+		&-line {
+			height: 1px;
+			width: 100%;
+			background-color: #fff;
+			padding: 0 30rpx;
+			view {
+				height: 1px;
+				width: 100%;
+				background-color: #CDCDCD;
+			}
+		}
+		
+		&-comment {
+			background-color: #fff;
+			border-radius: 0 0 18rpx 18rpx;
+			padding: 30rpx;
+			&-header {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				margin-bottom: 30rpx;
+				view {
+					&:first-child {
+						font-size: 36rpx;
+						color: #424242;
+					}
+					&:last-child {
+						color: #8D8D8D;
+						font-size: 24rpx;
+					}
+				}
+			}
+			&-list {
+				&-item {
+					margin-bottom: 60rpx;
+					display: flex;
+					align-items: center;
+					// &:last-child {
+					// 	padding-bottom: 60rpx;
+					// 	margin-bottom: 20rpx;
+					// 	border-bottom: solid 1px #DBDBDB;
+					// }
+					.left {
+						margin-right: 24rpx;
+					}
+					.right {
+						view {
+							line-height: 40rpx;
+							&:last-child {
+								color: #3D3D3D;
+								font-size: 28prx;
+							}
+							&:nth-child(2) {
+								font-size: 24rpx;
+								color: #A5A5A5;
+								text {
+									margin-left: 10rpx;
+								}
+							}
+							&:last-child {
+								font-size: 24rpx;
+								color: #6C6C6C;
+							}
+						}
+					}
+				}
+			}
+			&-page {
+				border-bottom: solid 1px #DBDBDB;
+				padding-bottom: 10rpx;
+			}
+			&-mine {
+				margin-top: 46rpx;
+				font-size: 36rpx;
+				color: #000000;
+				margin-bottom: 20rpx;
+			}
+			&-conent {
+				&-star {
+					margin-bottom: 22rpx;
+				}
+				&-textarea {
+					background-color: #F5F5F5;
+				}
+				&-button {
+					height: 80rpx;
+					line-height: 80rpx;
+					background-color: #709078;
+					text-align: center;
+					color: #fff;
+					font-size: 30rpx;
+					margin-top: 52rpx;
+				}
+			}
+		}
+	}
+}
+
+.video-control {
+	background-color: rgba(0, 0, 0, 0.1);
+	height: 90rpx;
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	z-index: 997;
+}
+.video-wrap {
+	position: relative;
+}
+.multi-list.full-screen.vertical {
+	height: 100vh !important;
+	padding: 8vh 0;
+}
+.multi-list.full-screen.horizontal {
+	height: 100vw !important;
+	padding: 8vw 0;
+}
+.multi {
+	position: absolute;
+	right: 30rpx;
+	top: 50%;
+	transform: translateY(-50%);
+	z-index: 998;
+	width: 100rpx;
+	color: #fff;
+	padding: 10rpx 0;
+	text-align: center;
+	transition: color ease 0.3s;
+}
+.multi.rate {
+	right: 30rpx;
+}
+.multi-list {
+	position: absolute;
+	height: 100%;
+	width: 0;
+	background-color: rgba(0, 0, 0, 0.65);
+	top: 0;
+	right: 0;
+	transition: width 0.3s ease;
+	z-index: 999;
+	box-sizing: border-box;
+	padding: 20rpx 0;
+}
+.multi-list.rate {
+	padding: 25rpx 0;
+}
+.multi-list.active {
+	width: 200rpx;
+}
+.multi-item {
+	text-align: center;
+	color: #fff;
+	line-height: 80rpx;
+	transition: color ease 0.3s;
+}
+.multi-item.rate {
+	line-height: 70rpx;
+}
+.multi-item:hover,
+.multi:hover {
+	color: #00d8ff;
+}
+.multi-item.active {
+	color: #00d8ff;
+}

+ 329 - 0
h5_web/pages/basicTraining/onlineTrainingDetails/onlineTrainingDetails.vue

@@ -0,0 +1,329 @@
+<template>
+	<view class="details">
+		<!-- 视频 -->
+		<view class="details-video" v-if="isPaly">
+			<video class="details-video-con" id="myVideo" @timeupdate="timeUpdate" :src="videoInfo.videoUrl" controls
+				:initial-time="initial_time" object-fit="fill" play-btn-position="center" @tap="videoClick">
+				<cover-view class="video-control">
+					<cover-view class="multi rate" @tap.stop="showSwitchRate">x {{ currentRate }}</cover-view>
+				</cover-view>
+				<cover-view class="multi-list rate" :class="{ active: rateShow }">
+					<cover-view v-for="(item, index) in ['0.5', '1.0', '1.5', '2.0']" :key="index"
+						class="multi-item rate" :data-rate="item" @tap="switchRate"
+						:class="{ active: item == currentRate }">
+						{{ item }}
+					</cover-view>
+				</cover-view>
+			</video>
+		</view>
+		<!-- 介绍 -->
+		<view class="details-content">
+			<view class="details-content-title">{{ videoInfo.chapterName }}</view>
+			<view class="details-content-progress">本课程
+				共{{ info.amount }}课,已学完{{ info.finishCount }}课,共进度{{ info.finishPercent || 0 }}%</view>
+			<view class="details-content-teacher">主讲老师:{{ info.presenter }}</view>
+			<view class="details-content-info">{{ videoInfo.chapterInfo }}</view>
+		</view>
+
+		<!-- 课程章节 -->
+		<view class="details-classes">
+			<view class="details-classes-header">
+				<view>精选课程</view>
+				<view>更多
+					<u-icon name="arrow-right" size="22" color="#A3A3A3" />
+				</view>
+			</view>
+			<view class="details-classes-list">
+				<view class="details-classes-list-item" v-for="(item, index) in info.chapterList" :key="index"
+					:class="{'active': index === videoIndex }" @click="classesClick(index)">
+					<view>{{ index + 1 }}</view>
+					<view>{{ item.flag === 2 ? '已学' : (item.finishPercent + '%') }}</view>
+				</view>
+			</view>
+		</view>
+		<view class="details-line">
+			<view></view>
+		</view>
+		<!-- 评论 -->
+		<view class="details-comment">
+			<view class="details-comment-header">
+				<view>课程评论</view>
+				<view>共{{ total }}条评论</view>
+			</view>
+			<view class="details-comment-list">
+				<view class="details-comment-list-item" v-for="(item, index) in commentList" :key="index">
+					<view class="left">
+						<u-avatar :src="item.createByAvatar" size="96" mode="square"></u-avatar>
+					</view>
+					<view class="right">
+						<view>{{ item.createBy }}</view>
+						<view>
+							<u-rate :count="5" size="24" disabled="" active-color="#C4C4C4" v-model="item.starLevel">
+							</u-rate>
+							<text>{{ item.createTime }}</text>
+						</view>
+						<view>{{ item.content }}</view>
+					</view>
+				</view>
+			</view>
+			<view class="details-comment-page" v-if="total">
+				<wyb-pagination :padding="0" :totalItems="total" :current="query.pageNum" @change="pageChange" />
+			</view>
+
+			<view class="details-comment-mine">
+				<text>我的评论</text>
+			</view>
+
+			<view class="details-comment-conent">
+				<view class="details-comment-conent-star">
+					<u-rate :count="5" size="40" active-color="#FFBC00" v-model="form.starLevel"></u-rate>
+				</view>
+				<view class="details-comment-content-textarea">
+					<u-input v-model="form.content" placeholder="请输入您的评价" type="textarea"
+						:custom-style="{ backgroundColor: '#F5F5F5', padding: '30rpx', borderRadius: '10rpx', minHeight: '280rpx' }">
+					</u-input>
+				</view>
+				<view class="details-comment-conent-button" @click="submitCommet">提交</view>
+			</view>
+		</view>
+		<u-toast ref="uToast" />
+	</view>
+</template>
+
+<script>
+	import wybPagination from '@/components/wyb-pagination/wyb-pagination.vue'
+	export default {
+		data() {
+			return {
+				info: {},
+				videoContext: uni.createVideoContext('myVideo', this),
+				videoInfo: {},
+				videoIndex: 0,
+				// 视频实时时间
+				initial_time: 0,
+				// 视频已经播放时间
+				playedTime: 0,
+				rateShow: false, // 倍速浮层
+				currentRate: 1.0, // 默认倍速
+				// 视频实际时间
+				video_real_time: 0,
+				classesId: '',
+				isPaly: true,
+				query: {
+					pageNum: 1,
+					pageSize: 5,
+					tabId: ''
+				},
+				total: 0,
+				commentList: [],
+				form: {
+					tabId: '',
+					starLevel: 0,
+					content: ''
+				}
+			}
+		},
+		onLoad(page) {
+			if (page.id) {
+				this.getClassesDetails(page.id);
+				this.classesId = page.id
+			}
+		},
+		beforeDestroy() {
+			this.submitTimeLong({
+				tabId: this.videoInfo.id,
+				playDuration: this.video_real_time
+			}, 0, true)
+		},
+		methods: {
+			/**
+			 * 显示倍速浮层
+			 * @param {Object} rate
+			 */
+			showSwitchRate(rate) {
+				let that = this;
+				that.rateShow = true;
+			},
+			/**
+			 * 切换倍速
+			 * @param {Object} e
+			 */
+			switchRate(e) {
+				let that = this;
+				let rate = Number(e.currentTarget.dataset.rate);
+				that.currentRate = rate;
+				that.rateShow = false;
+				this.videoContext.playbackRate(rate);
+			},
+			/**
+			 * 视频点击
+			 * @param {Object} e
+			 */
+			videoClick(e) {
+				this.rateShow = false;
+			},
+			/**
+			 * 获取课程详情
+			 * @param {Object} id
+			 */
+			getClassesDetails(id) {
+				this.$u.api.training.getOnlineDetailsApi({
+					id
+				}).then(res => {
+					if (res.code === 200) {
+						this.info = res.data;
+						this.videoInfo = res.data.chapterList[this.videoIndex];
+						this.initial_time = Number(res.data.chapterList[this.videoIndex].playDuration)
+						this.video_real_time = Number(res.data.chapterList[this.videoIndex].playDuration)
+						this.playedTime = Number(res.data.chapterList[this.videoIndex].playDuration)
+						this.query.tabId = res.data.chapterList[this.videoIndex].id
+						this.form.tabId = res.data.chapterList[this.videoIndex].id
+						this.query.pageNum = res.data.page;
+						this.isPaly = true
+						this.getCommentList();
+					}
+				})
+			},
+			/**
+			 * 课程章节点击
+			 * @param {Object} index
+			 */
+			classesClick(index) {
+				this.isPaly = false
+				this.submitTimeLong ({
+					tabId: this.videoInfo.id,
+					playDuration: this.video_real_time
+				}, index);
+			},
+			/**
+			 * 控制视频不能快进
+			 * @param {Object} e
+			 */
+			timeUpdate(e) {
+				let isReady = 1; // 是否开启可以视频快进 1 禁止开启
+				if (this.videoInfo.finishPercent === 100) {
+					isReady = 3;
+				}
+				//跳转到指定播放位置 initial-time 时间为秒
+				let that = this;
+				//播放的总时长
+				let duration = e.detail.duration
+				//实时播放进度 秒数
+				let currentTime = parseInt(e.detail.currentTime)
+				//当前视频进度
+				let jump_time = 0
+				if (that.video_real_time == 0) {
+					jump_time = parseInt(that.initial_time) + parseInt(that.video_real_time)
+				} else {
+					jump_time = parseInt(that.video_real_time)
+				}
+				if (jump_time === currentTime) {
+					isReady = 3;
+				}
+				if(isReady === 1){
+					if (currentTime > jump_time && currentTime - jump_time > 3) {
+						let videoContext = wx.createVideoContext('myVideo')
+						videoContext.seek(that.video_real_time)
+						wx.showToast({
+							title: '未完整看完该视频,不能快进',
+							icon: 'none',
+							duration: 2000,
+						})
+					}
+				}
+				if (currentTime > this.playedTime) {
+					that.playedTime = currentTime //实时播放进度
+				}
+				that.video_real_time = currentTime //实时播放进度
+			},
+			/**
+			 * 提交课程时长
+			 */
+			submitTimeLong({
+				tabId,
+				playDuration
+			}, index, flag) {
+				this.$u.api.training.videoTimeLongApi({
+					tabId,
+					playDuration
+				}).then(res => {
+					if (res.code === 200) {
+						if (!flag) {
+							this.$refs.uToast.show({
+								title: '已记录章节时长!',
+								type: 'success'
+							})
+							this.videoInfo = this.info.chapterList[index]
+							this.form.tabId = this.videoInfo.id
+							this.query.tabId = this.videoInfo.id
+							this.videoIndex = index
+							this.getClassesDetails(this.classesId);
+						}
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				})
+			},
+			/**
+			 * 获取评论列表
+			 */
+			getCommentList() {
+				this.$u.api.training.getClassesCommentApi(this.query).then(res => {
+					if (res.code === 200) {
+						this.total = Number(res.data.total);
+						this.commentList = res.data.rows
+					}
+				})
+			},
+			/**
+			 * @param {Object} e 分页触发
+			 */
+			pageChange(e) {
+				this.query.pageNum = e.current
+				this.getCommentList()
+			},
+			/**
+			 * 提交评论
+			 */
+			submitCommet() {
+				if (this.form.starLevel && this.form.content) {
+					this.$u.api.training.addClassesCommentApi(this.form).then(res => {
+						if (res.code === 200) {
+							this.$refs.uToast.show({
+								title: '评论成功!',
+								type: 'success'
+							})
+							this.form.content = ''
+							this.form.starLevel = 0
+							this.getCommentList();
+						} else {
+							this.$refs.uToast.show({
+								title: res.msg,
+								type: 'error'
+							})
+						}
+					})
+				}
+				if (!this.form.starLevel) {
+					this.$refs.uToast.show({
+						title: '请选择星级',
+						type: 'warning'
+					})
+				}
+				if (!this.form.content) {
+					this.$refs.uToast.show({
+						title: '请输入评论内容',
+						type: 'warning'
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import './onlineTrainingDetails.scss';
+</style>

+ 24 - 9
h5_web/pages/mine/mine.scss

@@ -78,19 +78,34 @@
 			justify-content: space-between;
 			width: calc(100% - 220rpx);
 			margin: 50rpx auto;
-			font-size: 24rpx;
+			font-size: 26rpx;
 			color: rgba(255, 255, 255, .6);
 			&-item {
 				display: flex;
 				align-items: center;
-				view {
-					&:last-child {
-						padding: 6rpx 16rpx;
-						background-color: rgba(255, 255, 255, 0.2);
-						border-radius: 30rpx;
-						margin-left: 10rpx;
-						font-size: 18rpx;
-					}
+				.no-certified {
+					padding: 6rpx 16rpx;
+					background-color: rgba(255, 255, 255, 0.2);
+					border-radius: 30rpx;
+					margin-left: 10rpx;
+					font-size: 20rpx;
+				}
+				.had {
+					width: 134rpx;
+					height: 68rpx;
+					line-height: 72rpx;
+					text-align: right;
+					color: #684B06;
+					font-size: 20rpx;
+					padding-right: 18rpx;
+				}
+				.certified {
+					background: url(../../static/img/certified-icon.png) no-repeat center center;
+					background-size: 100% 100%;
+				}
+				.passed {
+					background: url(../../static/img/passed-icon.png) no-repeat center center;
+					background-size: 100% 100%;
 				}
 			}
 		}

+ 7 - 5
h5_web/pages/mine/mine.vue

@@ -18,7 +18,7 @@
 				</view>
 				<view class="mine-info-header-right" @click="jumpPage('/pages/progressiveIntegral/progressiveIntegral')">
 					<view>进步<br/>积分</view>
-					<view>0</view>
+					<view>{{ memberinfo.integral || 0 }}</view>
 					<u-icon name="arrow-right" color="#fff" size="30"/>
 				</view>
 			</view>
@@ -27,13 +27,15 @@
 			<view class="mine-info-authentication">
 				<view class="mine-info-authentication-item">
 					<view>退役军人</view>
-					<view v-if="memberinfo.auditStatus === 0">认证中</view>
-					<view v-else-if="memberinfo.auditStatus === 2">已认证</view>
-					<view v-else @click="jumpPage('/pages/applyEducationCode/applyEducationCode')">未认证</view>
+					<view v-if="memberinfo.auditStatus === 0" class="no-certified">认证中</view>
+					<view v-else-if="memberinfo.auditStatus === 2" class="had certified">已认证</view>
+					<view class="no-certified" v-else @click="jumpPage('/pages/applyEducationCode/applyEducationCode')">未认证</view>
 				</view>
 				<view class="mine-info-authentication-item">
 					<view>适应性培训</view>
-					<view @click="jumpPage('/pages/basicTraining/basicTraining')">未认证</view>
+					<view v-if="memberinfo.auditStatus === 0" class="no-certified">审核中</view>
+					<view v-else-if="memberinfo.auditStatus === 2" class="had passed">已通过</view>
+					<view @click="jumpPage('/pages/basicTraining/basicTraining')" class="no-certified" v-else>未通过</view>
 				</view>
 			</view>
 			

+ 24 - 1
h5_web/pages/myInterview/myInterview.vue

@@ -33,7 +33,9 @@
 							<view v-else>{{ item.createTime.split(' ')[0] }}</view>
 						</view>
 					</view>
-					
+					<!-- <view class="interview-list-item-button">
+						<view class="submit btn" @click="submit">发起视频面试</view>
+					</view> -->
 					<view class="interview-list-item-button" v-if="Number(item.status) === 20 && new Date('2021-10-29 10:00').valueOf() > new Date().valueOf()">
 						<view class="submit btn">发起视频面试</view>
 					</view>
@@ -54,6 +56,8 @@
 </template>
 
 <script>
+	import TRTCCalling from 'trtc-calling-js';
+	import {tim} from 'tim-js-sdk';
 	export default {
 		data() {
 			return {
@@ -126,6 +130,25 @@
 					}
 				})
 				return label;
+			},
+			submit () {
+				const userID = '2000'
+				let options = {
+				  SDKAppID: 1400594521, // 接入时需要将0替换为您的 SDKAppID
+				  // 从v0.10.2起,新增 tim 参数
+				  // tim 参数适用于业务中已存在 TIM 实例,为保证 TIM 实例唯一性
+				  tim: tim
+				};
+				const trtcCalling = new TRTCCalling(options);
+				trtcCalling.login({
+				  userID,
+				  userSig: 'eJw1zFELgjAUhuH-suuQ49xOKXRpEC4KSrwWnHqMYtmwZvTfG60uv*eD98VO6hhNemQZ4xGwxXdTo6*WWgoM8Pd7c66NoYZlsQCQqZA8Do*li-aKCYpkCUkaVD8Njd4RxArg16DOR*Wm3M0V9lxVzmGptoPc4*T6Q30rHtBO1oJGXnTDnK-Z*wMZFTAC',
+				});
+				trtcCalling.call({
+				  userID: '2001',  //用户 ID
+				  type: 2, //通话类型,0-未知, 1-语音通话,2-视频通话
+				  timeout: 10000  //邀请超时时间, 单位 s(秒)
+				});
 			}
 		}
 	}

+ 7 - 3
h5_web/pages/mycode/mycode.vue

@@ -127,7 +127,7 @@
 					isHeaderShow: false,
 					updateShow: false,
 					conditionForm: {
-						jobStatus:'',
+						jobStatus: '',
 						salaryRangeName: '',
 						salaryRange: ''
 					},
@@ -180,7 +180,11 @@
 							this.memberinfo = res.data;
 							if (this.memberinfo.auditStatus !== 2) {
 								this.memberinfo.id = null;
-								this.$refs.qrcode._clearCode()
+								this.$refs.qrcode._clearCode();
+							} else {
+								setTimeout(() => {
+									this.$refs.qrcode._makeCode();
+								}, 300)
 							}
 							this.conditionForm.jobStatus = res.data.jobStatus;
 							this.conditionForm.salaryRange = res.data.salaryRange;
@@ -296,7 +300,7 @@
 										title: '更新成功!',
 										type: 'success'
 									})
-									this.updateShow = false
+									this.updateShow = false;
 								} else {
 									this.$refs.uToast.show({
 										title: res.msg,

+ 3 - 3
h5_web/pages/policyInfo/policyInfo.vue

@@ -54,17 +54,17 @@
       </view>
     </z-paging>
 
-<!--    <view class="policybtn">
+   <view class="policybtn">
       <view class="policybtn-container">
         <view class="policybtn-content">
           <view>
             <u-button type="primary"
               @click="policySubmitBtnClick"
-              class="policysubmitbtn">政策咨询</u-button>
+              class="policysubmitbtn">政策咨询(0851-863789)</u-button>
           </view>
         </view>
       </view>
-    </view> -->
+    </view>
   </view>
 </template>
 

+ 7 - 4
h5_web/pages/policyInfo/scss/policyInfo.scss

@@ -72,28 +72,31 @@ page {
       bottom: 0;
       left: 0;
       width: 100%;
+			height: 96rpx;
+			line-height: 96rpx;
       z-index: 998;
       box-sizing: content-box;
-      background-color: #FFFFFF;
+      background-color: #709078;
       
       .policybtn-content{
         flex: 1;
         justify-content: center;
         width: 100%;
         height: 100%;
-        padding: 6px 0;
         display: flex;
         flex-direction: column;
         align-items: center;
         position: relative;
-        background-color: #FFFFFF;
+        background-color: #709078;
         
         view:first-child{
           width: 100%;
-          padding: 8rpx 30rpx;
+          // padding: 8rpx 30rpx;
           
           .policysubmitbtn{
             width: 100%;
+						background-color: #709078;
+						font-size: 36rpx;
           }
         }
       }

+ 11 - 3
h5_web/pages/progressiveIntegral/progressiveIntegral.scss

@@ -12,7 +12,7 @@
 	}
 	
 	&-content {
-		margin-top: -472rpx;
+		// margin-top: -472rpx;
 		&-header {
 			text-align: center;
 			font-size: 22rpx;
@@ -84,13 +84,21 @@
 		}
 		
 		&-first {
-			display: flex;
-			justify-content: space-between;
 			width: calc(100% - 60rpx);
 			margin: 30rpx auto;
 			background-color: #fff;
 			border-radius: 10rpx;
 			padding: 32rpx 60rpx;
+			text-align: center;
+			color: #393939;
+			font-size: 30rpx;
+			&-header {
+				margin-bottom: 20rpx;
+			}
+			&-box {
+				display: flex;
+				justify-content: space-between;
+			}
 			&-item {
 				text-align: center;
 				color: #393939;

+ 119 - 88
h5_web/pages/progressiveIntegral/progressiveIntegral.vue

@@ -1,66 +1,76 @@
 <!-- 进步积分 -->
 <template>
 	<view class="integral">
-		
-		<!-- 导航栏 -->
-		<u-navbar class="evaluate-intention-bar" back-text="" title="进步积分" :background="background" title-color="#fff" back-icon-color="#fff">
-		</u-navbar>
-		
-		<!-- 背景 -->
-		<view class="integral-bg"></view>
-		
-		<!-- 内容 -->
-		<view class="integral-content">
+		<z-paging
+			ref="paging"
+			v-model="integralList"
+			@query="queryList"
+		>
+			<!-- 导航栏 -->
+			<u-navbar class="evaluate-intention-bar" back-text="" title="进步积分" :background="background" title-color="#fff" back-icon-color="#fff" slot="top">
+			</u-navbar>
 			
-			<view class="integral-content-header">
-				<view class="integral-content-header-grade">0</view>
-				<view class="integral-content-header-point">
-					<view class="point">
-						<view></view>
+			<!-- 背景 -->
+			<view class="integral-bg" slot="top"></view>
+			
+			<!-- 内容 -->
+			<view class="integral-content" style="margin-top: -472rpx;" slot="top">
+				<view class="integral-content-header">
+					<view class="integral-content-header-grade">{{ totalCount }}</view>
+					<view class="integral-content-header-point">
+						<view class="point">
+							<view></view>
+						</view>
+						<view>累计获得积分</view>
+						<view class="point">
+							<view></view>
+						</view>
 					</view>
-					<view>累计获得积分</view>
-					<view class="point">
-						<view></view>
+					<view class="integral-content-header-rules" @click="jumpPage('/pages/integralRule/integralRule')">积分规则<u-icon name="arrow-right"/></view>
+					<view class="integral-content-header-behavior">
+						<view class="item" v-for="(item, index) in behaviorList" :key="index">{{ item.count }}<text>个{{ item.type === 1 ? '加' : '减' }}分行为</text></view>
+						<!-- <view class="item">0<text>个减分行为</text></view> -->
 					</view>
 				</view>
-				<view class="integral-content-header-rules" @click="jumpPage('/pages/integralRule/integralRule')">积分规则<u-icon name="arrow-right"/></view>
-				<view class="integral-content-header-behavior">
-					<view class="item">0<text>个加分行为</text></view>
-					<view class="item">0<text>个减分行为</text></view>
-				</view>
 			</view>
-			
-			<view class="integral-content-first">
-				<view class="integral-content-first-item">
-					<image src="../../static/img/priority-recommendation-icon.png" mode=""></image>
-					<view>优先推荐</view>
-				</view>
-				<view class="integral-content-first-item">
-					<image src="../../static/img/priority-shift-icon.png" mode=""></image>
-					<view>优先分班</view>
-				</view>
-				<view class="integral-content-first-item">
-					<image src="../../static/img/priority-feedback-icon.png" mode=""></image>
-					<view>优先反馈</view>
+			<view class="integral-content" slot="top">
+				<view class="integral-content-first">
+					<view class="integral-content-first-header">获得进步积分可以</view>
+					<view class="integral-content-first-box">
+						<view class="integral-content-first-item">
+							<image src="../../static/img/priority-recommendation-icon.png" mode=""></image>
+							<view>优先推荐</view>
+						</view>
+						<view class="integral-content-first-item">
+							<image src="../../static/img/priority-shift-icon.png" mode=""></image>
+							<view>优先分班</view>
+						</view>
+						<view class="integral-content-first-item">
+							<image src="../../static/img/priority-feedback-icon.png" mode=""></image>
+							<view>优先反馈</view>
+						</view>
+					</view>
 				</view>
 			</view>
-			
-			<view class="integral-content-list" v-if="integralList.length">
-				<view class="integral-content-list-item" v-for="(item, index) in integralList" :key="index">
-					<view class="left">
-						<view>{{ item.title }}</view>
-						<view>{{ item.date }}</view>
-					</view>
-					<view class="right">
-						<view v-if="item.type === 0">+{{ item.grade }}</view>
-						<view v-else class="reduce">-{{ item.grade }}</view>
+			<view class="integral-content" v-if="integralList.length">
+				<view class="integral-content-list">
+					<view class="integral-content-list-item" v-for="(item, index) in integralList" :key="index">
+						<view class="left">
+							<view>{{ item.remark }}</view>
+							<view>{{ item.createTime }}</view>
+						</view>
+						<view class="right">
+							<view v-if="item.type === 1">+{{ item.integral }}</view>
+							<view v-else class="reduce">{{ item.integral }}</view>
+						</view>
 					</view>
 				</view>
+				<!-- <view class="integral-content-list" v-else>
+					<u-empty mode="list"></u-empty>
+				</view> -->
 			</view>
-			<view class="integral-content-list" v-else>
-				<u-empty mode="list"></u-empty>
-			</view>
-		</view>
+		</z-paging>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
@@ -72,47 +82,68 @@
 					backgroundColor: '#FE7C0F'
 				},
 				// 积分列表
-				integralList: [
-					// {
-					// 	title: '签到成功',
-					// 	date: '2021-03-25',
-					// 	grade: 100,
-					// 	type: 0
-					// },
-					// {
-					// 	title: '积分商城兑换',
-					// 	date: '2021-03-24',
-					// 	grade: 5000,
-					// 	type: 1
-					// },
-					// {
-					// 	title: '签到成功',
-					// 	date: '2021-03-24',
-					// 	grade: 100,
-					// 	type: 0
-					// },
-					// {
-					// 	title: '签到成功',
-					// 	date: '2021-03-23',
-					// 	grade: 100,
-					// 	type: 0
-					// },
-					// {
-					// 	title: '签到成功',
-					// 	date: '2021-03-22',
-					// 	grade: 100,
-					// 	type: 0
-					// },
-					// {
-					// 	title: '签到成功',
-					// 	date: '2021-03-21',
-					// 	grade: 100,
-					// 	type: 0
-					// }
-				]
+				integralList: [],
+				// 积分行为
+				behaviorList: [],
+				// 总分
+				totalCount: 0
 			}
 		},
+		onLoad() {
+			this.getIntegralTotal();
+		},
 		methods: {
+			/**
+			 * @param { Number } pageNum
+			 * @param { Number } pageSize
+			 */
+			queryList(pageNum, pageSize) {
+				this.getintegralList(pageNum, pageSize);
+			},
+			/**
+			 * 获取积分统计情况
+			 */
+			getIntegralTotal() {
+				this.$u.api.mine.totalCount().then(res => {
+					if (res.code === 200) {
+						this.behaviorList = res.data;
+						// 计算总分
+						let total = 0
+						this.totalCount = res.data.reduce((total, item) => total + item.total, 0)
+					} else {
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				}).catch(() => {
+					this.$refs.uToast.show({
+						title: '系统错误!',
+						type: 'error'
+					})
+				})
+			},
+			/**
+			 * 积分列表
+			 */
+			getintegralList(pageNum, pageSize) {
+				this.$u.api.mine.integralList({pageNum, pageSize}).then(res => {
+					if (res.code === 200) {
+						this.$refs.paging.complete(res.rows);
+					} else {
+						this.$refs.paging.complete([]);
+						this.$refs.uToast.show({
+							title: res.msg,
+							type: 'error'
+						})
+					}
+				}).catch(() => {
+					this.$refs.uToast.show({
+						title: '系统错误!',
+						type: 'error'
+					})
+				})
+			},
 			/**
 			 * @param { String } url
 			 */

二进制
h5_web/static/img/basic-training-bg.png


二进制
h5_web/static/img/basic-training-tab-bg.png


二进制
h5_web/static/img/certified-icon.png


二进制
h5_web/static/img/passed-icon.png