Compare commits
7 Commits
f5bd523985
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d912df3ef | ||
| a88b3a84eb | |||
| 2b0a0993c2 | |||
| 2de7ea4ac9 | |||
| e14be76ac8 | |||
|
|
949caf5589 | ||
|
|
844ff8c582 |
@@ -114,15 +114,15 @@ const generateTabbarList = () => {
|
|||||||
// 求职者用户(包括未登录状态):显示招聘会
|
// 求职者用户(包括未登录状态):显示招聘会
|
||||||
// H5端隐藏招聘会
|
// H5端隐藏招聘会
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
baseItems.splice(1, 0, {
|
// baseItems.splice(1, 0, {
|
||||||
id: 1,
|
// id: 1,
|
||||||
text: '招聘会',
|
// text: '招聘会',
|
||||||
path: '/pages/careerfair/careerfair',
|
// path: '/pages/careerfair/careerfair',
|
||||||
iconPath: '/static/tabbar/post.png',
|
// iconPath: '/static/tabbar/post.png',
|
||||||
selectedIconPath: '/static/tabbar/posted.png',
|
// selectedIconPath: '/static/tabbar/posted.png',
|
||||||
centerItem: false,
|
// centerItem: false,
|
||||||
badge: readMsg.badges[1]?.count || 0,
|
// badge: readMsg.badges[1]?.count || 0,
|
||||||
});
|
// });
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
config.js
10
config.js
@@ -1,16 +1,16 @@
|
|||||||
export default {
|
export default {
|
||||||
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
||||||
baseUrl: 'http://222.80.110.161:11111/api/ks', // 测试
|
baseUrl: 'http://222.80.110.161:80/api/ks', // 测试
|
||||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
|
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
|
||||||
|
|
||||||
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口
|
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口
|
||||||
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
||||||
// imgBaseUrl:'http://10.110.145.145/images', //图片基础url
|
// imgBaseUrl:'http://10.110.145.145/images', //图片基础url
|
||||||
// trainVideoImgUrl:'http://10.110.145.145:9100/file/file/minio',
|
// trainVideoImgUrl:'http://10.110.145.145:9100/file/file/minio',
|
||||||
LCBaseUrl:'http://222.80.110.161:11111/prod-api',//内网端口
|
LCBaseUrl:'http://222.80.110.161:80/prod-api',//内网端口
|
||||||
LCBaseUrlInner:'http://222.80.110.161:11111/prod-psout-api',//招聘、培训、帮扶
|
LCBaseUrlInner:'http://222.80.110.161:80/prod-psout-api',//招聘、培训、帮扶
|
||||||
imgBaseUrl:'http://222.80.110.161:11111/images', //图片基础url
|
imgBaseUrl:'http://222.80.110.161:80/images', //图片基础url
|
||||||
trainVideoImgUrl:'http://222.80.110.161:11111/prod-api/file/file/minio',
|
trainVideoImgUrl:'http://222.80.110.161:80/prod-api/file/file/minio',
|
||||||
// sseAI+
|
// sseAI+
|
||||||
// StreamBaseURl: 'http://39.98.44.136:8000',
|
// StreamBaseURl: 'http://39.98.44.136:8000',
|
||||||
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
||||||
|
|||||||
301
packageB/login2.vue
Normal file
301
packageB/login2.vue
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
<template>
|
||||||
|
<AppLayout title="" :use-scroll-view="false">
|
||||||
|
<view class="wrap">
|
||||||
|
<view class="login_index">
|
||||||
|
<input class="input" placeholder="请输入账号" placeholder-class="inputplace" v-model="form.username" />
|
||||||
|
<view class="login_yzm">
|
||||||
|
<input class="input" type="password" placeholder="请输入密码" placeholder-class="inputplace"
|
||||||
|
v-model="form.password" />
|
||||||
|
</view>
|
||||||
|
<view class="login_yzm">
|
||||||
|
<input class="input" placeholder="请输入验证码" placeholder-class="inputplace" v-model="form.code" />
|
||||||
|
<image class="yzm" :src="codeUrl" @click="getCodeImg"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<button class="com-btn" @click="register">登 录</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</AppLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
reactive,
|
||||||
|
inject,
|
||||||
|
watch,
|
||||||
|
ref,
|
||||||
|
onMounted,
|
||||||
|
onUnmounted
|
||||||
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
const {
|
||||||
|
$api,
|
||||||
|
navTo,
|
||||||
|
vacanciesTo,
|
||||||
|
navBack
|
||||||
|
} = inject("globalFunction");
|
||||||
|
const placeholderStyle = 'font-size:30rpx'
|
||||||
|
const checked = ref(true)
|
||||||
|
const codeUrl = ref('')
|
||||||
|
const flag=ref('nw')
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
username: '',
|
||||||
|
password: '',
|
||||||
|
rememberMe: false,
|
||||||
|
code: '',
|
||||||
|
uuid: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
console.log("111")
|
||||||
|
if(option.flag){
|
||||||
|
flag.value=option.flag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getCodeImg()
|
||||||
|
// let form={}
|
||||||
|
// if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
// form={
|
||||||
|
// usertype: '1',
|
||||||
|
// idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
// name: uni.getStorageSync('userInfo').name,
|
||||||
|
// enterprisecode:"",
|
||||||
|
// enterprisename: "",
|
||||||
|
// contactperson: "",
|
||||||
|
// contactphone: "",
|
||||||
|
// }
|
||||||
|
// }else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
// form={
|
||||||
|
// usertype: "2",
|
||||||
|
// enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
// enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
// contactperson: "",
|
||||||
|
// contactphone: "",
|
||||||
|
// idno: "",
|
||||||
|
// name: ""
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// $api.myRequest('/auth/login2/ks',form,'post',10100).then((res) => {
|
||||||
|
// if (res.code=='200') {
|
||||||
|
// uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta:2
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }).catch(() => {
|
||||||
|
// uni.hideLoading()
|
||||||
|
// uni.showToast({
|
||||||
|
// icon: 'none',
|
||||||
|
// title: '登录失败,请重试'
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
|
||||||
|
function register() {
|
||||||
|
if (!form.username) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入用户名'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!form.password) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入密码'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!form.uuid) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入验证码'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '登录中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
if(flag.value=='hlw'){
|
||||||
|
$api.myRequest('/auth/login',form,'post',10100).then((res) => {
|
||||||
|
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + res.img
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '登录失败,请重试'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else if(flag.value=='nw'){
|
||||||
|
$api.myRequest('/auth/login',form,'post',9100).then((res) => {
|
||||||
|
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/packageB/priority/helpFilter'
|
||||||
|
})
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + res.img
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '登录失败,请重试'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCodeImg() {
|
||||||
|
if(flag.value=='hlw'){
|
||||||
|
$api.myRequest('/code',{},'get',10100).then((resData) => {
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
||||||
|
form.uuid = resData.uuid
|
||||||
|
});
|
||||||
|
}else if(flag.value=='nw'){
|
||||||
|
$api.myRequest('/code',{},'get',9100).then((resData) => {
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
||||||
|
form.uuid = resData.uuid
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="stylus">
|
||||||
|
.wrap {
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.lg-head {
|
||||||
|
height: 480rpx;
|
||||||
|
background: #46ca98;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.view_logo {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.login_logo {
|
||||||
|
width: 300rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-cover {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -4rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 30rpx;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_index {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
width: 596rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
::v-deep .is-input-border {
|
||||||
|
border: 0;
|
||||||
|
border-bottom: 1px solid #dcdfe6 !important;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .uni-input-input {
|
||||||
|
font-size: 32rpx;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .uniui-contact-filled:before {
|
||||||
|
color: #46ca98;
|
||||||
|
font-size: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .uniui-locked-filled:before {
|
||||||
|
color: #46ca98;
|
||||||
|
font-size: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_yzm {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.yzm {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.com-btn {
|
||||||
|
height: 100rpx;
|
||||||
|
background: #46ca98;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
color: #fff;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_wt {
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(134, 134, 136, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.lg-bottom {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -3px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.bottom-svg {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -3px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.login_tongyi {
|
||||||
|
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(196, 196, 196, 1);
|
||||||
|
width: 620rpx;
|
||||||
|
margin: 32rpx auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: rgba(86, 176, 236, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
padding: 0 30rpx 0 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputplace {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #B5B5B5;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -226,12 +226,31 @@ const handleReset = () =>{
|
|||||||
getDataList('refresh')
|
getDataList('refresh')
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await loadLevelData('201');
|
// await loadLevelData('201');
|
||||||
});
|
});
|
||||||
onLoad(() => {
|
onLoad(async () => {
|
||||||
getDictionary()
|
let token=uni.getStorageSync('Padmin-Token')
|
||||||
// getDeptOptions()
|
console.log("token",token)
|
||||||
getDataList('refresh');
|
if(token){
|
||||||
|
await loadLevelData('201');
|
||||||
|
getDictionary()
|
||||||
|
getDataList('refresh');
|
||||||
|
}else{
|
||||||
|
navTo('/packageB/login2');
|
||||||
|
}
|
||||||
|
// if (resLogin.code=='200') {
|
||||||
|
// uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
// return true;
|
||||||
|
// }else{
|
||||||
|
// uni.showToast({
|
||||||
|
// icon: 'none',
|
||||||
|
// title: '单点异常'
|
||||||
|
// })
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// getDictionary()
|
||||||
|
// // getDeptOptions()
|
||||||
|
// getDataList('refresh');
|
||||||
});
|
});
|
||||||
function getDictionary(){
|
function getDictionary(){
|
||||||
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
||||||
|
|||||||
@@ -9,10 +9,20 @@
|
|||||||
<view class="video-detail-container">
|
<view class="video-detail-container">
|
||||||
<!-- 视频播放组件 -->
|
<!-- 视频播放组件 -->
|
||||||
<view class="video-wrapper">
|
<view class="video-wrapper">
|
||||||
<video v-if="videoInfo && videoInfo.cover" id="myVideo" :src="videoInfo.currentUrl" :poster="trainVideoImgUrl+ videoInfo.cover" @seeked="onSeeked"
|
<video
|
||||||
|
v-if="videoInfo && videoInfo.cover && isVideoReady"
|
||||||
preload="metadata"
|
id="myVideo"
|
||||||
enable-danmu controls style="width: 100%;" @pause="onPause" @timeupdate="onTimeupdate" @ended="onEnded"></video>
|
:src="videoInfo.currentUrl"
|
||||||
|
:poster="trainVideoImgUrl+ videoInfo.cover"
|
||||||
|
:initial-time="initialTime"
|
||||||
|
:autoplay="shouldAutoPlay"
|
||||||
|
enable-danmu
|
||||||
|
controls
|
||||||
|
style="width: 100%;"
|
||||||
|
@pause="onPause"
|
||||||
|
@timeupdate="onTimeupdate"
|
||||||
|
@ended="onEnded">
|
||||||
|
</video>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="video-info" :style="getItemBackgroundStyle('video-bj2.png')">
|
<view class="video-info" :style="getItemBackgroundStyle('video-bj2.png')">
|
||||||
@@ -134,7 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { inject, reactive,ref, onMounted, onUnmounted, nextTick } from 'vue';
|
import { inject, reactive,ref, onMounted, onUnmounted, nextTick ,watch} from 'vue';
|
||||||
import { onLoad,onHide,onUnload } from '@dcloudio/uni-app';
|
import { onLoad,onHide,onUnload } from '@dcloudio/uni-app';
|
||||||
const { $api, navTo, navBack } = inject('globalFunction');
|
const { $api, navTo, navBack } = inject('globalFunction');
|
||||||
import config from "@/config.js"
|
import config from "@/config.js"
|
||||||
@@ -148,10 +158,13 @@ const trainVideoImgUrl=config.trainVideoImgUrl
|
|||||||
const categories=ref([])
|
const categories=ref([])
|
||||||
const levalLabels=ref([])
|
const levalLabels=ref([])
|
||||||
const latestTime = ref(0)
|
const latestTime = ref(0)
|
||||||
|
const initialTime = ref(0)
|
||||||
const totalTime=ref(0)
|
const totalTime=ref(0)
|
||||||
const baseUrl = config.imgBaseUrl
|
const baseUrl = config.imgBaseUrl
|
||||||
const pageEnterTime = ref(0)
|
const pageEnterTime = ref(0)
|
||||||
const currentChapter = ref(0)
|
const currentChapter = ref(0)
|
||||||
|
const isVideoReady = ref(false)
|
||||||
|
const shouldAutoPlay = ref(false)
|
||||||
const getItemBackgroundStyle = (imageName) => ({
|
const getItemBackgroundStyle = (imageName) => ({
|
||||||
backgroundImage: `url(${baseUrl}/train/${imageName})`,
|
backgroundImage: `url(${baseUrl}/train/${imageName})`,
|
||||||
backgroundSize: '100% 100%', // 覆盖整个容器
|
backgroundSize: '100% 100%', // 覆盖整个容器
|
||||||
@@ -168,18 +181,38 @@ const params = reactive({
|
|||||||
videoId: '',
|
videoId: '',
|
||||||
userId: ''
|
userId: ''
|
||||||
})
|
})
|
||||||
|
// 监听 initialTime 变化,确保设置完成后再渲染
|
||||||
|
watch(initialTime, (newVal) => {
|
||||||
|
if (newVal >= 0 && videoInfo.value && videoInfo.value.cover) {
|
||||||
|
// 延迟渲染,确保初始时间设置生效
|
||||||
|
nextTick(() => {
|
||||||
|
isVideoReady.value = true
|
||||||
|
shouldAutoPlay.value = newVal > 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 监听 videoInfo 变化
|
||||||
|
watch([videoInfo, initialTime], ([newVideoInfo, newInitialTime]) => {
|
||||||
|
if (newVideoInfo && newVideoInfo.cover && newInitialTime >= 0) {
|
||||||
|
nextTick(() => {
|
||||||
|
isVideoReady.value = true
|
||||||
|
shouldAutoPlay.value = newInitialTime > 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, { deep: true })
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getHeart()
|
getHeart()
|
||||||
pageEnterTime.value = Date.now() // 记录毫秒时间戳
|
pageEnterTime.value = Date.now() // 记录毫秒时间戳
|
||||||
videoId.value=options.id
|
videoId.value=options.id
|
||||||
getDictionary()
|
getDictionary()
|
||||||
});
|
});
|
||||||
onHide(() => {
|
// onHide(() => {
|
||||||
updateVideoInfo() // 用缓存值,不要调 getCurrentTime
|
// updateVideoInfo() // 用缓存值,不要调 getCurrentTime
|
||||||
reportPageDuration()
|
// reportPageDuration()
|
||||||
})
|
// })
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
updateVideoInfo()
|
//updateVideoInfo()
|
||||||
|
saveCurrentChapterProgress()
|
||||||
reportPageDuration()
|
reportPageDuration()
|
||||||
})
|
})
|
||||||
function getData() {
|
function getData() {
|
||||||
@@ -197,6 +230,13 @@ function getData() {
|
|||||||
videoInfo.value.currentUrl=trainVideoImgUrl+videoInfo.value.trainClassList[0].url
|
videoInfo.value.currentUrl=trainVideoImgUrl+videoInfo.value.trainClassList[0].url
|
||||||
videoInfo.value.percentage=((videoInfo.value.process/(videoInfo.value.hour*60))*100).toFixed(2)
|
videoInfo.value.percentage=((videoInfo.value.process/(videoInfo.value.hour*60))*100).toFixed(2)
|
||||||
videoInfo.value.uploadTime=videoInfo.value.uploadTime.split(' ')[0]
|
videoInfo.value.uploadTime=videoInfo.value.uploadTime.split(' ')[0]
|
||||||
|
if(videoInfo.value.process !=null){
|
||||||
|
queryModelUserPlay(videoInfo.value.trainClassList[0].classId)
|
||||||
|
} else {
|
||||||
|
// 如果没有历史进度,直接准备渲染
|
||||||
|
initialTime.value = 0
|
||||||
|
}
|
||||||
|
updateVideoInfo()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getHeart() {
|
function getHeart() {
|
||||||
@@ -216,7 +256,6 @@ function getUserInfo(){
|
|||||||
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
||||||
userId.value=resData.info.userId
|
userId.value=resData.info.userId
|
||||||
getData()
|
getData()
|
||||||
updateVideoInfo()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getDictionary(){
|
function getDictionary(){
|
||||||
@@ -245,16 +284,18 @@ function getLevelLabelByValue(value) {
|
|||||||
}
|
}
|
||||||
function onPause(e){
|
function onPause(e){
|
||||||
updateVideoInfo()
|
updateVideoInfo()
|
||||||
|
saveCurrentChapterProgress()
|
||||||
}
|
}
|
||||||
function onEnded(e){
|
function onEnded(e){
|
||||||
updateVideoInfo()
|
updateVideoInfo()
|
||||||
|
saveCurrentChapterProgress()
|
||||||
}
|
}
|
||||||
function onTimeupdate(e){
|
function onTimeupdate(e){
|
||||||
latestTime.value = e.detail.currentTime
|
latestTime.value = e.detail.currentTime
|
||||||
}
|
}
|
||||||
function onSeeked(){
|
// function onSeeked(){
|
||||||
updateVideoInfo()
|
// updateVideoInfo()
|
||||||
}
|
// }
|
||||||
// 更新播放时长
|
// 更新播放时长
|
||||||
function updateVideoInfo(){
|
function updateVideoInfo(){
|
||||||
totalTime.value=0
|
totalTime.value=0
|
||||||
@@ -279,7 +320,7 @@ function updateVideoInfo(){
|
|||||||
|
|
||||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, header).then((resData) => {
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, header).then((resData) => {
|
||||||
if (resData.code == 200) {
|
if (resData.code == 200) {
|
||||||
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
|
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null && paramsData.process ==0 ){
|
||||||
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
||||||
console.log("视频播放时长更新成功")
|
console.log("视频播放时长更新成功")
|
||||||
});
|
});
|
||||||
@@ -313,8 +354,58 @@ function reportPageDuration() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function chapterChange(video,index){
|
function chapterChange(video,index){
|
||||||
|
saveCurrentChapterProgress()
|
||||||
currentChapter.value=index
|
currentChapter.value=index
|
||||||
videoInfo.value.currentUrl=trainVideoImgUrl+video.url
|
videoInfo.value.currentUrl=trainVideoImgUrl+video.url
|
||||||
|
isVideoReady.value = false
|
||||||
|
shouldAutoPlay.value = false
|
||||||
|
queryModelUserPlay(video.classId)
|
||||||
|
}
|
||||||
|
const updateUserPlayClassHousr = (classId,hour) => {
|
||||||
|
let paramsData={
|
||||||
|
userId:userId.value,
|
||||||
|
classId:classId,
|
||||||
|
hour:hour,
|
||||||
|
dqHour:latestTime.value
|
||||||
|
}
|
||||||
|
let header={
|
||||||
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
}
|
||||||
|
$api.myRequest('/train/public/videoUser/updateUserPlayClassHousr', paramsData,'post',9100,header).then((resData) => {
|
||||||
|
if(resData.code == 200){
|
||||||
|
console.log("学习时长更新成功")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const queryModelUserPlay = (classId) => {
|
||||||
|
let queryParams = {
|
||||||
|
classId: classId,
|
||||||
|
userId: userId.value,
|
||||||
|
};
|
||||||
|
let header = {
|
||||||
|
Authorization: uni.getStorageSync("Padmin-Token"),
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
};
|
||||||
|
$api.myRequest("/train/public/videoUser/modelUserPlay", queryParams, "post", 9100, header).then((resData) => {
|
||||||
|
if(resData.code == 200){
|
||||||
|
initialTime.value=Number(resData?.data?.dqHour ?? 0)
|
||||||
|
}else {
|
||||||
|
initialTime.value = 0
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
initialTime.value = 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存当前章节进度
|
||||||
|
function saveCurrentChapterProgress() {
|
||||||
|
if (videoInfo.value.trainClassList && videoInfo.value.trainClassList.length > 0) {
|
||||||
|
const currentVideo = videoInfo.value.trainClassList[currentChapter.value];
|
||||||
|
if (currentVideo) {
|
||||||
|
updateUserPlayClassHousr(currentVideo.classId, currentVideo.hour);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|
||||||
@@ -495,4 +586,4 @@ onUnmounted(() => {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -322,6 +322,12 @@
|
|||||||
"navigationBarTitleText": "登录"
|
"navigationBarTitleText": "登录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "login2",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "train/index",
|
"path": "train/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -154,6 +154,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="service-title">薪酬信息</view>
|
<view class="service-title">薪酬信息</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="service-item press-button" @click="handleJobFairClick">
|
||||||
|
<view class="service-icon service-icon-1">
|
||||||
|
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="service-title">招聘会</view>
|
||||||
|
</view>
|
||||||
|
<view class="service-item press-button" v-if="isFourLevelLinkagePurview" @click="helpClick">
|
||||||
|
<view class="service-icon service-icon-1">
|
||||||
|
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="service-title">帮扶</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
@@ -684,6 +696,8 @@ onUnmounted(() => {
|
|||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 获取最新的企业信息
|
// 获取最新的企业信息
|
||||||
getCompanyInfo();
|
getCompanyInfo();
|
||||||
|
//四级联动单点及权限
|
||||||
|
getIsFourLevelLinkagePurview()
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听用户信息变化,当登录状态改变时重新获取企业信息
|
// 监听用户信息变化,当登录状态改变时重新获取企业信息
|
||||||
@@ -711,6 +725,8 @@ const handleLoginSuccess = () => {
|
|||||||
|
|
||||||
// 重新获取企业信息
|
// 重新获取企业信息
|
||||||
getCompanyInfo();
|
getCompanyInfo();
|
||||||
|
//四级联动单点及权限
|
||||||
|
getIsFourLevelLinkagePurview()
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理附近工作点击
|
// 处理附近工作点击
|
||||||
@@ -760,11 +776,17 @@ const handleLiveClick = () => {
|
|||||||
const handleSalaryInfoClick = () => {
|
const handleSalaryInfoClick = () => {
|
||||||
navTo('/pages/service/salary-info');
|
navTo('/pages/service/salary-info');
|
||||||
};
|
};
|
||||||
|
const handleJobFairClick = () => {
|
||||||
|
navTo('/pages/careerfair/careerfair');
|
||||||
|
};
|
||||||
const handleH5SalaryClick = () => {
|
const handleH5SalaryClick = () => {
|
||||||
const salaryUrl = "https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/fwyd/202506/t20250627_544623.html";
|
const salaryUrl = "https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/fwyd/202506/t20250627_544623.html";
|
||||||
window.location.assign(salaryUrl);
|
window.location.assign(salaryUrl);
|
||||||
};
|
};
|
||||||
|
// 处理帮扶
|
||||||
|
const helpClick = () => {
|
||||||
|
navTo('/packageB/priority/helpFilter');
|
||||||
|
};
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
try {
|
try {
|
||||||
if (isLoaded.value) return;
|
if (isLoaded.value) return;
|
||||||
@@ -1047,7 +1069,21 @@ function getJobList(type = 'add') {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const isFourLevelLinkagePurview=ref(false)
|
||||||
|
const getIsFourLevelLinkagePurview=()=>{
|
||||||
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
|
if(userInfo){
|
||||||
|
$api.myRequest('/auth/login2/ks',{userid: userInfo.dwUserid, idcardno: userInfo.idCard},"POST",'9100',{}).then(res=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
uni.setStorageSync('fourLevelLinkage-token',res.data.access_token)
|
||||||
|
let roleIdList= ['103','106','107']
|
||||||
|
if(res.data.roleIdList.some(item=>roleIdList.includes(item))){
|
||||||
|
isFourLevelLinkagePurview.value=true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
function dataToImg(data) {
|
function dataToImg(data) {
|
||||||
const result = data.map((item) => ({
|
const result = data.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
|
|||||||
Reference in New Issue
Block a user