This commit is contained in:
binbin_pan 2024-11-13 16:21:21 +08:00
parent 1cda80d56e
commit 6989d93f17
12 changed files with 464 additions and 411 deletions

View File

@ -41,8 +41,8 @@
module.exports = {
// baseUrl:'/prod-api',
// http://192.168.0.14:19999
loginBaseUrl: 'http://112.29.103.165:1616',
// loginBaseUrl: 'http://192.168.0.14:27018',
// loginBaseUrl: 'http://112.29.103.165:1616',
loginBaseUrl: 'http://192.168.0.14:27018',
// loginBaseUrl:'http://192.168.0.14:19999',
// baseUrl:'http://192.168.0.14:2900',
baseUrl: 'http://192.168.0.14:19999',

View File

@ -1,6 +1,6 @@
{
"name" : "作业管控智慧平台",
"appid": "__UNI__5A28908",
"appid" : "__UNI__4165875",
"description" : "作业管控智慧平台",
"versionName" : "1.0.11",
"versionCode" : 111,
@ -206,10 +206,10 @@
}
},
"h5" : {
"template": "template.h5.html",
"template" : "",
"router" : {
"mode": "history",
"base": ""
"mode" : "hash",
"base" : "./"
},
"sdkConfigs" : {
"maps" : {
@ -223,6 +223,10 @@
},
"uniStatistics" : {
"enable" : true
},
"title" : "作业管控智慧平台",
"devServer" : {
"https" : true
}
},
"vueVersion" : "2",

View File

@ -284,14 +284,15 @@ export default {
)
console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random1)
console.log('🚀 ~ changeCountDown ~:', this.answerTime / 1000 == this.random2)
if (this.answerTime / 1000 == this.random1) {
console.log('🚀 ~ changeCountDown ~ 人脸识别')
// this.openFaceScan() // Android
this.openPhotograph() // IOS
} else if (this.answerTime / 1000 == this.random2) {
// this.openFaceScan()
this.openPhotograph()
} else if (this.answerTime == this.time) {
// if (this.answerTime / 1000 == this.random1) {
// console.log('🚀 ~ changeCountDown ~ ')
// // this.openFaceScan() // Android
// this.openPhotograph() // IOS
// } else if (this.answerTime / 1000 == this.random2) {
// // this.openFaceScan()
// this.openPhotograph()
// } else
if (this.answerTime == this.time) {
// : ,
this.$refs.uToast.show({
message: '考试时间结束, 系统将自动提交',

View File

@ -247,7 +247,7 @@ export default {
.search {
width: 100%;
margin: 0 auto;
margin: 10px auto 0;
display: flex;
align-items: center;
}

View File

@ -112,13 +112,13 @@ export default {
console.log('🚀 ~ 视频总时长: ~ this.allStudyDuration:', this.allStudyDuration)
console.log('🚀 ~ videoTimeUpdate ~ random1-2:', this.random1, this.random2)
if (this.currentTime != this.oldTime) {
if (this.currentTime == this.random2 || this.currentTime == this.random1) {
this.oldTime = this.currentTime // , , ,
this.video.pause()
this.openPhotograph()
}
}
// if (this.currentTime != this.oldTime) {
// if (this.currentTime == this.random2 || this.currentTime == this.random1) {
// this.oldTime = this.currentTime // , , ,
// this.video.pause()
// this.openPhotograph()
// }
// }
},
openModal() {
this.showModal = true

View File

@ -97,11 +97,11 @@ export default {
this.allStudyDuration--
this.params.studyDuration++
}
if (this.allStudyDuration == this.random) {
this.isShow = false
clearInterval(this.timer)
this.openPhotograph()
}
// if (this.allStudyDuration == this.random) {
// this.isShow = false
// clearInterval(this.timer)
// this.openPhotograph()
// }
console.log('🚀 ~ countDown ~ this.params.studyDuration:', this.params.studyDuration)
if (this.allStudyDuration <= 0) {
this.params.studyDuration = this.params.allStudyDuration

View File

@ -1,7 +1,15 @@
<template>
<view class="page">
<u-navbar title="学习项目" @leftClick="leftClick" placeholder />
<view class="status-secs">
<div class="tab-wrapper">
<div v-for="(item, index) in statusList" :key="index" class="tab-item" @click="chooseStatus(item, index)">
<div :style="{ color: activeIndex === index ? '#409eff' : '#333' }">
{{ item.text }}
</div>
<div :class="{ 'tab-line': activeIndex === index }"></div>
</div>
</div>
<!-- <view class="status-secs">
<view
v-for="(item, index) in statusList"
:key="item.id"
@ -10,12 +18,13 @@
>
{{ item.text }}
</view>
</view>
</view> -->
<uni-easyinput
prefixIcon="search"
v-model="totalStatus.keyword"
placeholder="请输入项目名称"
@iconClick="toggleSearch"
style="margin-bottom: 10px"
></uni-easyinput>
<view class="project-cont">
@ -47,6 +56,10 @@
</view>
</view>
</view>
<div class="no-data" v-if="projList.length == 0">
<image src="/static/images/zanwuneirong.png" mode="aspectFit" />
<view class="no-data-text">暂无内容</view>
</div>
</view>
</view>
</template>
@ -58,6 +71,7 @@ import config from '@/config'
export default {
data() {
return {
activeIndex: 0,
statusList: [
// status -1: 1: 0:
{ text: '全部', id: 0 },
@ -176,7 +190,8 @@ export default {
// this.projList = res.data
this.getStudentStudyWorkList(params)
},
async chooseStatus(count) {
async chooseStatus(count, index) {
this.activeIndex = index
this.projList = []
//
this.totalStatus.keyword = ''
@ -184,12 +199,12 @@ export default {
userId: uni.getStorageSync('userId'),
status: '-1'
}
this.totalStatus.statusCount = count
if (count === 0) {
this.totalStatus.statusCount = count.id
if (count.id === 0) {
params.status = '-1'
} else if (count === 1) {
} else if (count.id === 1) {
params.status = '1'
} else if (count === 2) {
} else if (count.id === 2) {
params.status = '0'
}
// const res = await getStudentStudyWorkList(params)
@ -265,6 +280,38 @@ export default {
</script>
<style lang="scss">
.tab-wrapper {
display: flex;
justify-content: space-around;
/* background: #fff; */
margin-bottom: 10px;
.tab-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
padding: 10px 0;
.tab-line {
margin-top: 5px;
width: 30%;
height: 2px;
background-color: #409eff;
transition: width 0.3s;
}
}
}
.no-data {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 100px;
.no-data-text {
margin-top: 10px;
color: #999;
}
}
.page {
width: 100vw;
height: 100vh;

View File

@ -87,16 +87,16 @@ export default {
this.allStudyDuration--
this.params.studyDuration++
}
if (this.allStudyDuration == this.random1) {
this.isShow = false
clearInterval(this.timer)
this.openPhotograph()
}
if (this.allStudyDuration == this.random2) {
this.isShow = false
clearInterval(this.timer)
this.openPhotograph()
}
// if (this.allStudyDuration == this.random1) {
// this.isShow = false
// clearInterval(this.timer)
// this.openPhotograph()
// }
// if (this.allStudyDuration == this.random2) {
// this.isShow = false
// clearInterval(this.timer)
// this.openPhotograph()
// }
console.log('🚀 ~ countDown ~ this.params.studyDuration:', this.params.studyDuration)
if (this.allStudyDuration <= 0) {
this.params.studyDuration = this.params.allStudyDuration

View File

@ -15,7 +15,6 @@
:isLink="true"
:border="false"
style="border-bottom: 1px solid #E9E9E9"
@click="handleAvatar"
>
<image
:src="infos.avatar"
@ -59,7 +58,8 @@ import config from '@/config'
data() {
return {
infos: {
avatar: config.fileUrl + uni.getStorageSync('facePath'),
// avatar: config.fileUrl + uni.getStorageSync('facePath'),
avatar: '/static/images/user.png',
username: '',
unit: ''
}

View File

@ -2,7 +2,7 @@
<view class="page">
<view class="user-edit">
<view class="user-avatar">
<image :src="facePath"></image>
<image src="/static/images/user.png"></image>
</view>
<view class="user-info" style="height: 120px;">
<span style="font-size: 24px">{{ userName }}</span>
@ -59,7 +59,7 @@ export default {
value: 0, //
secList: [
// { id: 1, title: '', src: '/static/eduImg/changeGate.png', path: 'changeGate' },
{ id: 2, title: '人脸识别', src: '/static/eduImg/faceScan.png', path: 'faceScan' },
// { id: 2, title: '', src: '/static/eduImg/faceScan.png', path: 'faceScan' },
{ id: 3, title: '我的消息', src: '/static/eduImg/myMsg.png', path: 'myMsg' },
// { id: 4, title: '', src: '/static/eduImg/settings.png', path: 'settings' }
],

View File

@ -282,131 +282,132 @@ export default {
})
}
})
} else if (name == '实名制移动端') {
uni.request({
url: config.realLoginUrl + 'login',
method: 'POST',
data: JSON.stringify(realParams),
header: {
'Content-Type': 'application/json'
},
success: res => {
console.log('🚀 ~ gotoYy ~ res:', res)
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
if (res.data.code == 200) {
// uni.setStorageSync('tjToken', res.data.token)
uni.setStorageSync('realNameToken', res.data.data.access_token)
uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
uni.removeStorageSync('hasChosenPro')
uni.removeStorageSync('hasViewAccess')
setTimeout(() => {
uni.reLaunch({
url: '/pages/realName/index/index'
})
}, 500)
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
},
fail: err => {
console.log('🚀 ~ gotoYy ~ err:', err)
uni.showToast({
title: '无权限访问',
icon: 'none'
})
}
})
} else if (name == '健康体检移动端') {
uni.request({
url: config.tjBaseUrl + '/app/loginNoPassword',
method: 'POST',
data: tjparams,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: res => {
console.log('🚀 ~ gotoYy ~ res:', res)
console.log('🚀 ~ gotoYy ~ res:', res.data.obj)
if (res.statusCode == 200) {
uni.removeStorageSync('tjToken')
uni.removeStorageSync('tjPhone')
uni.setStorageSync('tjToken', res.data.obj)
uni.setStorageSync('tjPhone', tjparams.telephone)
setTimeout(() => {
uni.reLaunch({
url: '/pages/HealthExaminationApp/index/index'
})
}, 500)
} else {
uni.showToast({
title: '无权限访问',
icon: 'none'
})
}
},
fail: err => {
console.log('🚀 ~ gotoYy ~ err:', err)
uni.showToast({
title: '无权限访问',
icon: 'none'
})
}
})
}
if (name === '作业计划移动端') {
const paramsWork = {
username: uni.getStorageSync('userPhone'),
password: 'YNsbd@123456'
// jwtToken: uni.getStorageSync('App-Token')
}
console.log('请求参数', paramsWork)
uni.request({
url: config.workPlanNewYnUrl + '/ynPlanApp/login',
method: 'POST',
data: paramsWork,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: res => {
console.log('登录成功!', res)
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
if (res.statusCode == 200) {
uni.setStorageSync('wkToken', res.data.user.token)
uni.setStorageSync('wkName', res.data.user.username)
uni.setStorageSync('wkRole', res.data.user.role)
uni.setStorageSync('wkPermissions', res.data.permissions)
// else if (name == '') {
// uni.request({
// url: config.realLoginUrl + 'login',
// method: 'POST',
// data: JSON.stringify(realParams),
// header: {
// 'Content-Type': 'application/json'
// },
// success: res => {
// console.log('🚀 ~ gotoYy ~ res:', res)
// // console.log('🚀 ~ gotoYy ~ res:', res.data.token)
// if (res.data.code == 200) {
// // uni.setStorageSync('tjToken', res.data.token)
// uni.setStorageSync('realNameToken', res.data.data.access_token)
// uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
// uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
// uni.removeStorageSync('hasChosenPro')
// uni.removeStorageSync('hasViewAccess')
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/realName/index/index'
// })
// }, 500)
// } else {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
// }
// },
// fail: err => {
// console.log('🚀 ~ gotoYy ~ err:', err)
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// })
// } else if (name == '') {
// uni.request({
// url: config.tjBaseUrl + '/app/loginNoPassword',
// method: 'POST',
// data: tjparams,
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// },
// success: res => {
// console.log('🚀 ~ gotoYy ~ res:', res)
// console.log('🚀 ~ gotoYy ~ res:', res.data.obj)
// if (res.statusCode == 200) {
// uni.removeStorageSync('tjToken')
// uni.removeStorageSync('tjPhone')
// uni.setStorageSync('tjToken', res.data.obj)
// uni.setStorageSync('tjPhone', tjparams.telephone)
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/HealthExaminationApp/index/index'
// })
// }, 500)
// } else {
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// },
// fail: err => {
// console.log('🚀 ~ gotoYy ~ err:', err)
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// })
// }
setTimeout(() => {
uni.reLaunch({
url: '/pages/workPlan/index/index'
})
}, 500)
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
},
fail: err => {
console.log('🚀 ~ gotoYy ~ err:', err)
uni.showToast({
title: '无权限访问',
icon: 'none'
})
}
})
}
// if (name === '') {
// const paramsWork = {
// username: uni.getStorageSync('userPhone'),
// password: 'YNsbd@123456'
// // jwtToken: uni.getStorageSync('App-Token')
// }
// console.log('', paramsWork)
// uni.request({
// url: config.workPlanNewYnUrl + '/ynPlanApp/login',
// method: 'POST',
// data: paramsWork,
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// },
// success: res => {
// console.log('', res)
// // console.log('🚀 ~ gotoYy ~ res:', res.data.token)
// if (res.statusCode == 200) {
// uni.setStorageSync('wkToken', res.data.user.token)
// uni.setStorageSync('wkName', res.data.user.username)
// uni.setStorageSync('wkRole', res.data.user.role)
// uni.setStorageSync('wkPermissions', res.data.permissions)
// // uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
// // uni.setStorageSync('realNamePermissions', res.data.data.loginUser.permissions)
// // uni.removeStorageSync('hasChosenPro')
// setTimeout(() => {
// uni.reLaunch({
// url: '/pages/workPlan/index/index'
// })
// }, 500)
// } else {
// uni.showToast({
// title: res.message,
// icon: 'none'
// })
// }
// },
// fail: err => {
// console.log('🚀 ~ gotoYy ~ err:', err)
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// }
// })
// }
},
getDayNoticeAnnoByUserId() {
getDayNoticeAnnoByUserId({}).then(response => {

View File

@ -241,8 +241,8 @@ export default {
// globalConfig: getApp().globalData.config,
selectTab: 1,
loginForm: {
phone: '', // 18955734761 18700000001 17681010134 15955147005
pd: '' //YNsbd@123456 Lv@200018
phone: '15955147005', // 18955734761 18700000001 17681010134 15955147005
pd: 'YNsbd@123456' //YNsbd@123456 Lv@200018
},
loginForm0: {
phone: this.$store.state.user.phone,