feat: 1. [我的]菜单,添加人脸认证的人脸录制的操作入口
2. 调试入班二维码进入,根据 classId 的条件进行逻辑提示进入 3. 调试考试二维码进入,根据 classId 的条件进行逻辑提示进入 4. 签到信息页面内, 字段校对 5. 入班人脸识别接口逻辑和考试人脸识别接口逻辑的调试xgf-training-dev
parent
661458ac6c
commit
7c245ffe68
|
@ -74,7 +74,14 @@ export const getHistoricalApprovalRecords = (params) => post('/app/Task/getHis',
|
|||
export const getIsUploadFace = (params) => post('/app/user/getUserFace', params) // 获取是否上传人脸信息
|
||||
export const getClassList = (params) => post('/app/stagestudentrelation/pageTaskByUser', params) //获取班级列表
|
||||
export const joinClass = (params) => uploads('/app/student/joinClass', params) // 实名认证信息提交
|
||||
export const getTaskScoreInfo = (params) => post('/app/stageexam/findResult', params) // 考试成绩详情
|
||||
export const getSignInfo = (params) => post('/app/student/signinfo', params) // 获取签到信息
|
||||
export const getTaskScoreInfo = (params) => post('/app/stageexam/findResult', params) // 考试成绩记录详情
|
||||
export const getExamExercises = (params) => post('/app/stageexam/getExam', params) // 考试习题
|
||||
export const setTestPaperSubmission = (params) => post('/app/stageexam/submit', params) // 考试交卷
|
||||
export const submitEditUserFace = (params) => post('/app/user/editUserFace', params) // 提交照片人脸
|
||||
export const submitEditUserVideoFace = (params) => post('/app/user/editUserVideoFace', params) // 提交视频人脸
|
||||
export const compareUserFaceCertify = (params) => post('/app/user/compareFace', params) // 照片人脸认证
|
||||
export const compareUserVideoFaceCertify = (params) => post('/app/user/compareVideoFace', params) // 视频人脸验证
|
||||
export const compareUserExamFaceCertify = (params) => post('/app/user/compareExamFace', params) // 考试照片人脸认证
|
||||
export const compareUserExamVideoFaceCertify = (params) => post('/app/user/compareExamVideoFace', params) // 考试视频人脸认证
|
||||
// ********************* end ***********************
|
||||
|
|
|
@ -1,144 +1,180 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<view class="status_bar">
|
||||
<view class="top_view"></view>
|
||||
</view>
|
||||
<view class="wui_banner">
|
||||
<view class="banner_img">
|
||||
<image src="../../static/home-bg.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps">
|
||||
<view class="home-apps-item" @click="fnScan">
|
||||
<view class="home-apps-item-img">
|
||||
<image src="../../static/icon-apps/app_icons6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>扫码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps-item" v-for="(item,index) in baseList" :key="index" @click="fnNavigator(index)">
|
||||
<view class="home-apps-item-img">
|
||||
<image :src="item.img" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal :show="updateVersion.modalShow" title="温馨提示" :showConfirmButton="updateVersion.showConfirmButton"
|
||||
:showCancelButton="updateVersion.showCancelButton" :confirmText="updateVersion.confirmText"
|
||||
:cancelText="updateVersion.cancelText"
|
||||
@cancel="modalCancel" @confirm="modalConfirm">
|
||||
<view style="text-align: center;color:#606266">
|
||||
<rich-text :nodes="updateVersion.modalContent"></rich-text>
|
||||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
<view class="page">
|
||||
<view class="status_bar">
|
||||
<view class="top_view"></view>
|
||||
</view>
|
||||
<view class="wui_banner">
|
||||
<view class="banner_img">
|
||||
<image src="../../static/home-bg.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps">
|
||||
<view class="home-apps-item" @click="fnScan">
|
||||
<view class="home-apps-item-img">
|
||||
<image src="../../static/icon-apps/app_icons6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>扫码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="home-apps-item" v-for="(item, index) in baseList" :key="index" @click="fnNavigator(index)">
|
||||
<view class="home-apps-item-img">
|
||||
<image :src="item.img" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-modal
|
||||
:show="updateVersion.modalShow"
|
||||
title="温馨提示"
|
||||
:showConfirmButton="updateVersion.showConfirmButton"
|
||||
:showCancelButton="updateVersion.showCancelButton"
|
||||
:confirmText="updateVersion.confirmText"
|
||||
:cancelText="updateVersion.cancelText"
|
||||
@cancel="modalCancel"
|
||||
@confirm="modalConfirm"
|
||||
>
|
||||
<view style="text-align: center; color: #606266">
|
||||
<rich-text :nodes="updateVersion.modalContent"></rich-text>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import updateVersion from "../../utils/updateVersion";
|
||||
import {setEntry} from "../../api";
|
||||
import updateVersion from '../../utils/updateVersion'
|
||||
import { setEntry, getIsUploadFace } from '../../api'
|
||||
|
||||
export default {
|
||||
mixins: [updateVersion],
|
||||
data() {
|
||||
return {
|
||||
baseList: [
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons.png'),
|
||||
title: '电子工牌',
|
||||
url: '/pages/electronic_work_card/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons2.png'),
|
||||
title: '服务单位 管理',
|
||||
url: '/pages/service_unit_management/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons3.png'),
|
||||
title: '我的信息',
|
||||
url: '/pages/mine/information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons4.png'),
|
||||
title: '证书信息',
|
||||
url: '/pages/certificate_information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons5.png'),
|
||||
title: '就职单位',
|
||||
url: '/pages/employed_by/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons7.png'),
|
||||
title: '高危作业',
|
||||
url: '/pages/eight_assignments/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons8.png'),
|
||||
title: '培训管理',
|
||||
url: '/pages/train_management/index'
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.getters.getUserInfo
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnUpdateVersion(false)
|
||||
},
|
||||
methods: {
|
||||
async fnScan() {
|
||||
uni.scanCode({
|
||||
success: async (res) => {
|
||||
let obj = JSON.parse(res.result)
|
||||
let type = obj[0].CODE_TYPE
|
||||
if (type === '0') {
|
||||
let info = await setEntry({
|
||||
USER_ID: this.userInfo.USER_ID,
|
||||
CORPINFO_ID: obj[0].CORPINFO_ID,
|
||||
RELEVANT_UNIT_NAME: obj[0].RELEVANT_UNIT_NAME
|
||||
});
|
||||
if (info.code === 200){
|
||||
uni.$u.toast('入职成功')
|
||||
}else {
|
||||
uni.$u.toast('入职失败,请联系管理员')
|
||||
}
|
||||
|
||||
} else if (type === '1') {
|
||||
// type=1时跳转电子工牌页面
|
||||
uni.$u.route({
|
||||
url: '/pages/electronic_work_card/index',
|
||||
params: {
|
||||
USER_ID: obj[0].USER_ID,
|
||||
CODE_TYPE: obj[0].CODE_TYPE
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
fnIsShow(index){
|
||||
if(index === 5) return !!this.userInfo.CORPINFO_ID
|
||||
return true
|
||||
},
|
||||
fnNavigator(e) {
|
||||
uni.$u.route({
|
||||
url: this.baseList[e].url
|
||||
})
|
||||
},
|
||||
},
|
||||
mixins: [updateVersion],
|
||||
data() {
|
||||
return {
|
||||
baseList: [
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons.png'),
|
||||
title: '电子工牌',
|
||||
url: '/pages/electronic_work_card/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons2.png'),
|
||||
title: '服务单位 管理',
|
||||
url: '/pages/service_unit_management/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons3.png'),
|
||||
title: '我的信息',
|
||||
url: '/pages/mine/information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons4.png'),
|
||||
title: '证书信息',
|
||||
url: '/pages/certificate_information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons5.png'),
|
||||
title: '就职单位',
|
||||
url: '/pages/employed_by/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons7.png'),
|
||||
title: '高危作业',
|
||||
url: '/pages/eight_assignments/index'
|
||||
},
|
||||
{
|
||||
img: require('../../static/icon-apps/app_icons8.png'),
|
||||
title: '培训管理',
|
||||
url: '/pages/train_management/index'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return this.$store.getters.getUserInfo
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.fnUpdateVersion(false)
|
||||
this.getUserFaceCompleted()
|
||||
},
|
||||
methods: {
|
||||
async fnScan() {
|
||||
uni.scanCode({
|
||||
success: async (res) => {
|
||||
let obj = JSON.parse(res.result)
|
||||
let type = obj[0].CODE_TYPE
|
||||
if (type === '0') {
|
||||
let info = await setEntry({
|
||||
USER_ID: this.userInfo.USER_ID,
|
||||
CORPINFO_ID: obj[0].CORPINFO_ID,
|
||||
RELEVANT_UNIT_NAME: obj[0].RELEVANT_UNIT_NAME
|
||||
})
|
||||
if (info.code === 200) {
|
||||
uni.$u.toast('入职成功')
|
||||
} else {
|
||||
uni.$u.toast('入职失败,请联系管理员')
|
||||
}
|
||||
} else if (type === '1') {
|
||||
// type=1时跳转电子工牌页面
|
||||
uni.$u.route({
|
||||
url: '/pages/electronic_work_card/index',
|
||||
params: {
|
||||
USER_ID: obj[0].USER_ID,
|
||||
CODE_TYPE: obj[0].CODE_TYPE
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fnIsShow(index) {
|
||||
if (index === 5) return !!this.userInfo.CORPINFO_ID
|
||||
return true
|
||||
},
|
||||
fnNavigator(e) {
|
||||
uni.$u.route({
|
||||
url: this.baseList[e].url
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取是否已经完成上传人脸信息
|
||||
*/
|
||||
async getUserFaceCompleted() {
|
||||
const userFaceData = await getIsUploadFace()
|
||||
// userFaceData.authentication --> 0: 未完成人脸认证
|
||||
// userFaceData.authentication --> 1: 已完成人脸认证
|
||||
this.$store.dispatch('setVerification', userFaceData.authentication ? userFaceData.authentication : "0"); // 设置本地存储人脸检测验证状态
|
||||
const isPassedVerification = userFaceData.authentication === '0'
|
||||
if (isPassedVerification) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '为了能够得到更好的体验,我们会获取您个人信息,请完成人脸信息认证!',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
type: 'facial_input'
|
||||
}
|
||||
})
|
||||
}
|
||||
if (res.cancel) {
|
||||
uni.$u.toast("您可进入[我的]-[人脸认证]完成信息认证")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
background-color: #f7f9ff;
|
||||
min-height: 100vh;
|
||||
background-color: #f7f9ff;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -64,6 +64,11 @@ export default {
|
|||
name: '个人信息',
|
||||
url: '/pages/mine/information/index'
|
||||
},
|
||||
{
|
||||
img: require('../../../static/images/my_ico2.png'),
|
||||
name: '人脸认证',
|
||||
url: '/pages/train_management/face_authentication?type=update_facial_input'
|
||||
},
|
||||
{
|
||||
img: require('../../../static/images/my_ico3.png'),
|
||||
name: '问题反馈',
|
||||
|
|
|
@ -18,19 +18,19 @@
|
|||
</text>
|
||||
</view>
|
||||
<view v-show="options[current].QUESTIONTYPE === '1'" class="options">
|
||||
<view class="item" :class="{ active: options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('radio', 'A')">
|
||||
<text class="option">A</text>
|
||||
<text class="text">{{ options[current].OPTIONA }}</text>
|
||||
</view>
|
||||
<view class="item" :class="{ active: options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('radio', 'B')">
|
||||
<text class="option">B</text>
|
||||
<text class="text">{{ options[current].OPTIONB }}</text>
|
||||
</view>
|
||||
<view class="item" :class="{ active: options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'C' }" @click="fnChooseTopic('radio', 'C')">
|
||||
<text class="option">C</text>
|
||||
<text class="text">{{ options[current].OPTIONC }}</text>
|
||||
</view>
|
||||
<view class="item" :class="{ active: options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'D' }" @click="fnChooseTopic('radio', 'D')">
|
||||
<text class="option">D</text>
|
||||
<text class="text">{{ options[current].OPTIOND }}</text>
|
||||
</view>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
active: options[current].checked && options[current].checked.indexOf('A') !== -1
|
||||
'active': options[current].checked && options[current].checked.indexOf('A') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'A')"
|
||||
>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
active: options[current].checked && options[current].checked.indexOf('B') !== -1
|
||||
'active': options[current].checked && options[current].checked.indexOf('B') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'B')"
|
||||
>
|
||||
|
@ -59,7 +59,7 @@
|
|||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
active: options[current].checked && options[current].checked.indexOf('C') !== -1
|
||||
'active': options[current].checked && options[current].checked.indexOf('C') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'C')"
|
||||
>
|
||||
|
@ -69,7 +69,7 @@
|
|||
<view
|
||||
class="item"
|
||||
:class="{
|
||||
active: options[current].checked && options[current].checked.indexOf('D') !== -1
|
||||
'active': options[current].checked && options[current].checked.indexOf('D') !== -1
|
||||
}"
|
||||
@click="fnChooseTopic('multiple', 'D')"
|
||||
>
|
||||
|
@ -78,11 +78,11 @@
|
|||
</view>
|
||||
</view>
|
||||
<view v-show="options[current].QUESTIONTYPE === '3'" class="options">
|
||||
<view class="item" :class="{ active: options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'A' }" @click="fnChooseTopic('judge', 'A')">
|
||||
<text class="option">{{ options[current].OPTIONA }}</text>
|
||||
<text class="text"></text>
|
||||
</view>
|
||||
<view class="item" :class="{ active: options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')">
|
||||
<view class="item" :class="{ 'active': options[current].checked === 'B' }" @click="fnChooseTopic('judge', 'B')">
|
||||
<text class="option">{{ options[current].OPTIONB }}</text>
|
||||
<text class="text"></text>
|
||||
</view>
|
||||
|
@ -108,7 +108,7 @@ import {
|
|||
getExamExercises,
|
||||
// getStrengthenExam,
|
||||
setTestPaperSubmission,
|
||||
} from '../../api'
|
||||
} from '@/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -133,7 +133,6 @@ export default {
|
|||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
console.log('query :>> ', query);
|
||||
this.routeQuery = query
|
||||
// this.STAGEEXAMPAPER_ID = query.STAGEEXAMPAPER_ID;
|
||||
// this.entrySite = query.entrySite;
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
</view>
|
||||
|
||||
<view class="counter">
|
||||
当前试题: <text style="color: orange">{{ current + 1 }}</text
|
||||
>/{{ questionList.length }}
|
||||
当前试题: <text style="color: orange">{{ current + 1 }}</text>/{{ questionList.length }}
|
||||
</view>
|
||||
|
||||
<view class="topic">
|
||||
|
@ -92,7 +91,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getTaskScoreInfo } from "../../api";
|
||||
import { getTaskScoreInfo } from "@/api";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -125,7 +124,7 @@ export default {
|
|||
// stagestudentrelationId,
|
||||
// classId
|
||||
// })
|
||||
// console.log('resData :>> ', resData);
|
||||
// this.questionList = resData.list
|
||||
this.questionList = [
|
||||
{
|
||||
stageexamrecordId: '7cea826c3c974cb69028dd0624b632ba',
|
||||
|
|
|
@ -1,207 +1,205 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<view class="fat">
|
||||
<text class="fatt">请将人脸置于圆圈内</text>
|
||||
</view>
|
||||
<view class="livefater">
|
||||
<view
|
||||
style="
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
border-radius: 700upx;
|
||||
overflow: hidden;
|
||||
"
|
||||
>
|
||||
<live-pusher
|
||||
id="livePusher"
|
||||
ref="livePusher"
|
||||
class="livePusher"
|
||||
url=""
|
||||
mode="SD"
|
||||
:muted="true"
|
||||
:enable-camera="true"
|
||||
:auto-focus="true"
|
||||
:beauty="1"
|
||||
whiteness="2"
|
||||
aspect="1:1"
|
||||
/>
|
||||
</view>
|
||||
<cover-image src="/static/images/gaiz.png" class="gaiimg"></cover-image>
|
||||
</view>
|
||||
<view class="container">
|
||||
<view class="fat">
|
||||
<text class="fatt">请将人脸置于圆圈内</text>
|
||||
</view>
|
||||
<view class="livefater">
|
||||
<view style="width: 700upx; height: 700upx; border-radius: 700upx; overflow: hidden">
|
||||
<live-pusher id="livePusher" ref="livePusher" class="livePusher" url="" mode="SD" :muted="true" :enable-camera="true" :auto-focus="true" :beauty="1" whiteness="2" aspect="1:1" />
|
||||
</view>
|
||||
<cover-image src="/static/images/gaiz.png" class="gaiimg"></cover-image>
|
||||
</view>
|
||||
|
||||
<view style="margin: 0 100upx">
|
||||
<u-button :text="btnTextStr" type="primary" @click="snapshot" />
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 0 100upx">
|
||||
<u-button :text="btnTextStr" type="primary" @click="snapshot" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {setMeetingFace, setScanCodeToVerifyFace, setUserFace, setVerifyFace} from "@/api";
|
||||
import { submitEditUserFace, compareUserFaceCertify, compareUserExamFaceCertify } from '@/api';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startPreviewTimer: null, // 开始预览计时器实例
|
||||
isFirst: "", // 是否为第一次开启摄像头
|
||||
type: "", // 摄像头使用类别
|
||||
// showButton: "yes",
|
||||
routeQueryparams: {}, // 额外携带的参数
|
||||
btnTextStr: "拍照"
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
this.context = uni.createLivePusherContext("livePusher", this);
|
||||
this.startPreviewTimer = setInterval(() => {
|
||||
this.startPreview();
|
||||
}, 1000);
|
||||
},
|
||||
onLoad(query) {
|
||||
// facial_input 更新人脸 isFirst 1 第一次登录添加人脸
|
||||
// scan_face 扫码
|
||||
// learning_certification 学习认证
|
||||
// meeting_attendance 会议签到
|
||||
const typeKey = ["facial_input", "scan_face", "learning_certification"];
|
||||
if (!typeKey.includes(query.type)) {
|
||||
uni.$u.toast("type参数错误");
|
||||
return;
|
||||
}
|
||||
this.isFirst = query.isFirst || "";
|
||||
if (query.type === "facial_input") this.btnTextStr = "人脸认证";
|
||||
if (query.type === "scan_face") this.btnTextStr = "签到";
|
||||
if (query.type === "learning_certification") this.btnTextStr = "开始考试";
|
||||
this.type = query.type;
|
||||
// this.showButton = query.showButton || "yes";
|
||||
this.routeQueryparams = query ?? {};
|
||||
},
|
||||
onBackPress(event) {
|
||||
if (event.from === "backbutton") {
|
||||
if (this.type === "facial_input" ||
|
||||
(this.type === "scan_face" && this.isFirst === "1") ||
|
||||
this.type === "learning_certification"
|
||||
) {
|
||||
uni.$u.toast("请完成人脸验证");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
methods: {
|
||||
snapshot() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
this.context.snapshot({
|
||||
success: (e) => {
|
||||
this.getMinImage(e.message.tempImagePath);
|
||||
},
|
||||
});
|
||||
},
|
||||
startPreview() {
|
||||
this.context.stopPreview();
|
||||
this.context.startPreview({
|
||||
success: () => {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer);
|
||||
// this.showButton === "no" && this.snapshot();
|
||||
},
|
||||
});
|
||||
},
|
||||
getMinImage(imgPath) {
|
||||
plus.zip.compressImage(
|
||||
{
|
||||
src: imgPath,
|
||||
dst: imgPath,
|
||||
overwrite: true,
|
||||
quality: 40
|
||||
},
|
||||
(zipRes) => {
|
||||
setTimeout(() => {
|
||||
const reader = new plus.io.FileReader();
|
||||
reader.onloadend = async (res) => {
|
||||
const speech = res.target.result;
|
||||
// 获取 base 64 图片编码的前缀
|
||||
const USERAVATARPREFIX = speech.substring(
|
||||
0,
|
||||
speech.indexOf("base64,") + 7,
|
||||
);
|
||||
// 获取 base 64 图片的二进制到文本
|
||||
const USERAVATARURL = speech.substring(
|
||||
speech.indexOf("base64,") + 7,
|
||||
);
|
||||
try {
|
||||
if (this.type === "facial_input") {
|
||||
uni.$u.toast("人脸认证成功");
|
||||
uni.navigateBack({ delta: 1 });
|
||||
} else if (this.type === "scan_face") {
|
||||
// await setScanCodeToVerifyFace({
|
||||
// USERAVATARPREFIX,
|
||||
// USERAVATARURL,
|
||||
// ...this.params,
|
||||
// });
|
||||
uni.$u.toast("认证成功");
|
||||
uni.navigateBack({ delta: 2 });
|
||||
} else if (this.type === "learning_certification") {
|
||||
// await setVerifyFace({
|
||||
// USERAVATARPREFIX,
|
||||
// USERAVATARURL,
|
||||
// ...this.params,
|
||||
// });
|
||||
// await this.$store.dispatch("setVerification", true);
|
||||
uni.$u.toast("认证成功");
|
||||
// uni.navigateBack();
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/course_exam',
|
||||
params: { ...this.routeQueryparams }
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
if(e && e.msg){
|
||||
uni.$u.toast(e.msg,);
|
||||
data() {
|
||||
return {
|
||||
startPreviewTimer: null, // 开始预览计时器实例
|
||||
isFirst: '', // 是否为第一次开启摄像头
|
||||
type: '', // 摄像头使用类别
|
||||
// showButton: "yes",
|
||||
routeQueryparams: {}, // 额外携带的参数
|
||||
btnTextStr: '拍照'
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.context = uni.createLivePusherContext('livePusher', this)
|
||||
this.startPreviewTimer = setInterval(() => {
|
||||
this.startPreview()
|
||||
}, 1000)
|
||||
},
|
||||
onLoad(query) {
|
||||
// facial_input 人脸认证 isFirst 1 第一次登录添加人脸
|
||||
// scan_face 扫码
|
||||
// update_facial_input 更新人脸
|
||||
// learning_certification 学习认证
|
||||
// meeting_attendance 会议签到
|
||||
const typeKey = ['facial_input', 'scan_face', 'learning_certification', 'update_facial_input']
|
||||
if (!typeKey.includes(query.type)) {
|
||||
uni.$u.toast('type参数错误')
|
||||
return
|
||||
}
|
||||
this.isFirst = query.isFirst || ''
|
||||
if (query.type === 'facial_input' || 'update_facial_input') this.btnTextStr = '人脸认证'
|
||||
if (query.type === 'scan_face') this.btnTextStr = '签到'
|
||||
if (query.type === 'learning_certification') this.btnTextStr = '开始考试'
|
||||
this.type = query.type
|
||||
// this.showButton = query.showButton || "yes";
|
||||
this.routeQueryparams = query ?? {}
|
||||
},
|
||||
onBackPress(event) {
|
||||
if (event.from === 'backbutton') {
|
||||
if ((this.type === 'scan_face' && this.isFirst === '1') || this.type === 'learning_certification' || this.type === 'facial_input') {
|
||||
uni.$u.toast('请完成人脸验证')
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
onUnload() {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
},
|
||||
methods: {
|
||||
snapshot() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.context.snapshot({
|
||||
success: (e) => {
|
||||
this.getMinImage(e.message.tempImagePath)
|
||||
}
|
||||
// this.showButton === "no" && this.snapshot();
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(
|
||||
plus.io.convertLocalFileSystemURL(zipRes.target),
|
||||
);
|
||||
}, 4000);
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
})
|
||||
},
|
||||
startPreview() {
|
||||
this.context.stopPreview()
|
||||
this.context.startPreview({
|
||||
success: () => {
|
||||
this.startPreviewTimer && clearInterval(this.startPreviewTimer)
|
||||
// this.showButton === "no" && this.snapshot();
|
||||
}
|
||||
})
|
||||
},
|
||||
getMinImage(imgPath) {
|
||||
plus.zip.compressImage(
|
||||
{
|
||||
src: imgPath,
|
||||
dst: imgPath,
|
||||
overwrite: true,
|
||||
quality: 40
|
||||
},
|
||||
(zipRes) => {
|
||||
setTimeout(() => {
|
||||
const reader = new plus.io.FileReader()
|
||||
reader.onloadend = async (res) => {
|
||||
const speech = res.target.result
|
||||
// 获取 base 64 图片编码的前缀
|
||||
const USERAVATARPREFIX = speech.substring(0, speech.indexOf('base64,') + 7)
|
||||
// 获取 base 64 图片的二进制到文本
|
||||
const USERAVATARURL = speech.substring(speech.indexOf('base64,') + 7)
|
||||
try {
|
||||
const otherParams = {
|
||||
...this.routeQueryparams
|
||||
}
|
||||
delete otherParams.type
|
||||
if (this.type === 'facial_input' || this.type === 'update_facial_input') {
|
||||
await submitEditUserFace({
|
||||
...otherParams,
|
||||
USERAVATARPREFIX,
|
||||
USERAVATARURL
|
||||
})
|
||||
await this.$store.dispatch('setVerification', '1')
|
||||
uni.$u.toast('人脸信息认证成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1000)
|
||||
} else if (this.type === 'scan_face') {
|
||||
await compareUserFaceCertify({
|
||||
...otherParams,
|
||||
USERAVATARPREFIX,
|
||||
USERAVATARURL
|
||||
})
|
||||
uni.$u.toast('人脸认证成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
})
|
||||
}, 1000)
|
||||
} else if (this.type === 'learning_certification') {
|
||||
const res = await compareUserExamFaceCertify({
|
||||
...otherParams,
|
||||
USERAVATARPREFIX,
|
||||
USERAVATARURL
|
||||
})
|
||||
await uni.$u.toast('人脸认证成功, 请进入考试答题')
|
||||
setTimeout(() => {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/course_exam',
|
||||
params: {
|
||||
...this.routeQueryparams
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('扫描人脸过程中捕获的错误 :>>> ', e)
|
||||
if (e && e.msg) {
|
||||
uni.$u.toast(e.msg)
|
||||
}
|
||||
// this.showButton === "no" && this.snapshot();
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(plus.io.convertLocalFileSystemURL(zipRes.target))
|
||||
}, 4000)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
background-color: #fff;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.livePusher {
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
}
|
||||
|
||||
.livefater {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 100upx;
|
||||
height: 700upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 100upx;
|
||||
height: 700upx;
|
||||
}
|
||||
|
||||
.fat {
|
||||
margin: 100upx;
|
||||
margin: 100upx;
|
||||
}
|
||||
|
||||
.fatt {
|
||||
text-align: center;
|
||||
font-size: 36upx;
|
||||
font-weight: 800;
|
||||
text-align: center;
|
||||
font-size: 36upx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.gaiimg {
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
margin-top: -700upx;
|
||||
width: 700upx;
|
||||
height: 700upx;
|
||||
margin-top: -700upx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -45,11 +45,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getClassList, getIsUploadFace } from '../../api'
|
||||
import { getClassList, getIsUploadFace } from '@/api';
|
||||
import store from '@/store/index';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
verification: store.state.verification, // 本地读取人脸检测验证状态
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
totalPage: 0,
|
||||
|
@ -65,27 +67,32 @@ export default {
|
|||
|
||||
/* 监听页面显示,页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面 */
|
||||
onShow() {
|
||||
this.resetList()
|
||||
// this.resetList();
|
||||
},
|
||||
|
||||
async onLoad(query) {
|
||||
await this.getUserFaceCompleted()
|
||||
await this.resetList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getData() {
|
||||
let resData = await getClassList({
|
||||
showCount: this.pageSize,
|
||||
currentPage: this.currentPage
|
||||
})
|
||||
this.trainList = [...this.trainList, ...resData.page.list]
|
||||
this.totalPage = resData.page.totalPage
|
||||
},
|
||||
resetList() {
|
||||
async resetList() {
|
||||
this.pageSize = 10
|
||||
this.currentPage = 1
|
||||
this.trainList = []
|
||||
this.getData()
|
||||
await this.getData()
|
||||
},
|
||||
async getData() {
|
||||
// verification --> 0: 未完成人脸认证
|
||||
// verification --> 1: 已完成人脸认证
|
||||
if (this.verification === '1') {
|
||||
let resData = await getClassList({
|
||||
showCount: this.pageSize,
|
||||
currentPage: this.currentPage
|
||||
})
|
||||
this.trainList = [...this.trainList, ...resData.page.list]
|
||||
this.totalPage = resData.page.totalPage
|
||||
}
|
||||
},
|
||||
scrolltolower() {
|
||||
this.currentPage++
|
||||
|
@ -100,30 +107,39 @@ export default {
|
|||
// scanType: ['qrCode'], // 仅支持二维码扫码
|
||||
onlyFromCamera: false, // 是否只能从相机扫码,允许从相册选择图片
|
||||
hideAlbum: false, // 显示相册,允许从相册选择图片
|
||||
success: function (response) {
|
||||
success: (response) => {
|
||||
const { stageexampaperinputId, classId, postId, studentId, numberofexams, type } = JSON.parse(response.result)
|
||||
const findClassId = this.trainList.some((item) => item.classId === classId)
|
||||
if (type === '0') {
|
||||
// 签到二维码方式进入
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/realname_info_auth',
|
||||
params: {
|
||||
type: 'scan_face',
|
||||
classId
|
||||
}
|
||||
})
|
||||
if (findClassId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/realname_info_auth',
|
||||
params: {
|
||||
type: 'scan_face',
|
||||
classId
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('您未在培训计划内,无法入班签到,请联系教师')
|
||||
}
|
||||
} else if (type === '1') {
|
||||
// 考试二维码方式进入
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
type: 'learning_certification',
|
||||
stageexampaperinputId,
|
||||
classId,
|
||||
postId,
|
||||
studentId,
|
||||
numberofexams
|
||||
}
|
||||
})
|
||||
if (findClassId) {
|
||||
uni.$u.route({
|
||||
url: '/pages/train_management/face_authentication',
|
||||
params: {
|
||||
type: 'learning_certification',
|
||||
stageexampaperinputId,
|
||||
classId,
|
||||
postId,
|
||||
studentId,
|
||||
numberofexams
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast('您未在培训计划内,无法进行考试,请联系教师')
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function (error) {
|
||||
|
@ -138,9 +154,10 @@ export default {
|
|||
* 获取是否已经完成上传人脸信息
|
||||
*/
|
||||
async getUserFaceCompleted() {
|
||||
const userFaceData = await getIsUploadFace()
|
||||
console.log('userFaceData :>> ', userFaceData)
|
||||
if (!userFaceData?.data) {
|
||||
// const userFaceData = await getIsUploadFace()
|
||||
// verification --> 0: 未完成人脸认证
|
||||
// verification --> 1: 已完成人脸认证
|
||||
if (this.verification === '0') {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '检测到您还未完成人脸信息读取,请先完成人脸信息认证!',
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getDataDictionary, joinClass } from '../../api'
|
||||
import { getDataDictionary, joinClass } from '@/api';
|
||||
import Sign from '@/components/sign/sign.vue'
|
||||
import { validateFieldPhone, validateFieldIdCard } from '@/utils/formValidateField.js'
|
||||
|
||||
|
|
|
@ -1,163 +1,191 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<u-list @scrolltolower="scrolltolower">
|
||||
<u-list-item v-for="(item, index) in signList" :key="index">
|
||||
<view class="sign_item">
|
||||
<view class="sign_item_avatar">
|
||||
<!-- 用来给图片资源添加前置的统一的访问路径头部: $filePath, 这个将会用在下面的 u-image 组件中的 src 属性中, 示例为: src="$filePath + item.FILEPATH" -->
|
||||
<u-image
|
||||
width="200rpx"
|
||||
height="200rpx"
|
||||
model="widthFix"
|
||||
:src="item.FILEPATH"
|
||||
/>
|
||||
</view>
|
||||
<view class="info_body">
|
||||
<view class="info_name">
|
||||
<text>{{ item.userName }}</text>
|
||||
</view>
|
||||
<view class="info_raw">
|
||||
<text class="content_label">班级名称: </text>
|
||||
<text class="content_value">{{ item.className }}</text>
|
||||
</view>
|
||||
<view class="info_raw">
|
||||
<text class="content_label">签到时间: </text>
|
||||
<text class="content_value">{{ item.signTime }}</text>
|
||||
</view>
|
||||
<view class="info_raw">
|
||||
<text class="content_label">培训地点: </text>
|
||||
<text class="content_value">{{ item.train }}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<u-list @scrolltolower="scrolltolower">
|
||||
<u-list-item v-for="(item, index) in signList" :key="index">
|
||||
<view class="sign_item">
|
||||
<view class="sign_item_avatar">
|
||||
<!-- 用来给图片资源添加前置的统一的访问路径头部: $filePath, 这个将会用在下面的 u-image 组件中的 src 属性中, 示例为: src="$filePath + item.FILEPATH" -->
|
||||
<u-image width="200rpx" height="200rpx" model="widthFix" :src="item.useravatarurl" />
|
||||
</view>
|
||||
<view class="info_body">
|
||||
<view class="info_name">
|
||||
<text>{{ item.userName }}</text>
|
||||
</view>
|
||||
<view class="info_raw">
|
||||
<text class="content_label">班级名称: </text>
|
||||
<text class="content_value">{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="info_raw">
|
||||
<text class="content_label">签到时间: </text>
|
||||
<text class="content_value">{{ item.studyStartTime }}</text>
|
||||
</view>
|
||||
<view class="info_raw">
|
||||
<text class="content_label">培训地点: </text>
|
||||
<text class="content_value">{{ item.trainingLocation }}</text>
|
||||
</view>
|
||||
<view class="info_raw flex_layout">
|
||||
<text class="content_label">签到状态: </text>
|
||||
<text class="tag" :class="studyStateMap[item.studystate].color">{{ studyStateMap[item.studystate].value }}</text>
|
||||
</view>
|
||||
<view class="info_raw flex_layout">
|
||||
<text class="content_label">签到状态: </text>
|
||||
<text class="tag_flag">{{ handleCalcSignStatus(item.trainStatus) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</view>
|
||||
<text class="content_label">考试状态: </text>
|
||||
<text class="tag" :class="stageexamStateMap[item.stageexamstate].color">{{ stageexamStateMap[item.stageexamstate].value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSignInfo } from '@/api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
totalPage: 0,
|
||||
signList: [],
|
||||
signStatusMap: {
|
||||
0: '认证签到',
|
||||
1: '考试签到'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.resetList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getData() {
|
||||
// let resData = await getCertificateInformationList({
|
||||
// showCount: this.pageSize,
|
||||
// currentPage: this.currentPage,
|
||||
// });
|
||||
this.signList = [
|
||||
{
|
||||
userName: '齐天大圣1',
|
||||
FILEPATH:
|
||||
'https://img.alicdn.com/img/i1/131787161/O1CN01z67Qvv22lnCzgPob4_!!0-saturn_solar.jpg_.webp',
|
||||
className: '班级名称1班级名称1班级名称1班级名称1',
|
||||
signTime: '2025-02-11 09:40',
|
||||
train: '教三大教室',
|
||||
trainStatus: 0 // 认证签到
|
||||
data() {
|
||||
return {
|
||||
routeQuery: {},
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
totalPage: 0,
|
||||
signList: [],
|
||||
// 签到状态枚举
|
||||
studyStateMap: {
|
||||
'0': {
|
||||
value: '未签到',
|
||||
color: 'tag__red'
|
||||
},
|
||||
{
|
||||
userName: '齐天大圣2',
|
||||
FILEPATH:
|
||||
'https://img.alicdn.com/img/i1/131787161/O1CN01z67Qvv22lnCzgPob4_!!0-saturn_solar.jpg_.webp',
|
||||
className: '班级名称2',
|
||||
signTime: '2025-02-14 18:00',
|
||||
train: '教一大教室',
|
||||
trainStatus: 1 // 考试签到
|
||||
'1': {
|
||||
value: '已签到',
|
||||
color: 'tag__green'
|
||||
}
|
||||
]
|
||||
this.totalPage = 2
|
||||
},
|
||||
resetList() {
|
||||
this.pageSize = 10
|
||||
this.currentPage = 1
|
||||
this.trainList = []
|
||||
this.getData()
|
||||
},
|
||||
scrolltolower() {
|
||||
this.currentPage++
|
||||
if (this.totalPage >= this.currentPage) this.getData()
|
||||
},
|
||||
handleCalcSignStatus(type) {
|
||||
return this.signStatusMap[type]
|
||||
}
|
||||
}
|
||||
},
|
||||
// 考试状态枚举
|
||||
stageexamStateMap: {
|
||||
'0': {
|
||||
value: '无需考试',
|
||||
color: 'tag__orange'
|
||||
},
|
||||
'1': {
|
||||
value: '未签到',
|
||||
color: 'tag__red'
|
||||
},
|
||||
'5': {
|
||||
value: '已签到',
|
||||
color: 'tag__green'
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.resetList()
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.routeQuery = query
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getData() {
|
||||
const { classId } = this.routeQuery
|
||||
// let resData = await getSignInfo({
|
||||
// showCount: this.pageSize,
|
||||
// currentPage: this.currentPage,
|
||||
// classId
|
||||
// });
|
||||
// this.signList = [...this.signList, ...resData.page.list]
|
||||
// this.totalPage = resData.page.totalPage
|
||||
this.signList = [
|
||||
{
|
||||
userName: '齐天大圣1',
|
||||
useravatarurl: 'https://img.alicdn.com/img/i1/131787161/O1CN01z67Qvv22lnCzgPob4_!!0-saturn_solar.jpg_.webp',
|
||||
name: '班级名称1班级名称1班级名称1班级名称1',
|
||||
studyStartTime: '2025-02-11 09:40',
|
||||
trainingLocation: '教三大教室',
|
||||
studystate: '0',
|
||||
stageexamstate: '0'
|
||||
},
|
||||
]
|
||||
this.totalPage = 2
|
||||
},
|
||||
resetList() {
|
||||
this.pageSize = 10
|
||||
this.currentPage = 1
|
||||
this.trainList = []
|
||||
this.getData()
|
||||
},
|
||||
scrolltolower() {
|
||||
this.currentPage++
|
||||
if (this.totalPage >= this.currentPage) this.getData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sign_item {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
.sign_item_avatar {
|
||||
font-size: 0;
|
||||
}
|
||||
.sign_item_avatar {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.info_body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
.info_body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
|
||||
.info_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.info_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.info_raw {
|
||||
color: #acafb3;
|
||||
font-size: 30rpx;
|
||||
.info_raw {
|
||||
color: #acafb3;
|
||||
font-size: 30rpx;
|
||||
|
||||
.content_label {
|
||||
display: inline-block;
|
||||
width: 160rpx;
|
||||
}
|
||||
.content_label {
|
||||
display: inline-block;
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
.content_value {
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
line-height: 1.2;
|
||||
transform: translateY(8rpx);
|
||||
padding: 0;
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.content_value {
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
padding: 0;
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.tag_flag {
|
||||
background: #5ac725;
|
||||
color: #fff;
|
||||
.tag {
|
||||
padding: 2rpx 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.flex_layout {
|
||||
display: flex;
|
||||
margin-top: 8rpx;
|
||||
.tag__orange {
|
||||
background: #ff9e43;
|
||||
}
|
||||
}
|
||||
|
||||
.tag__green {
|
||||
background: #5ac725;
|
||||
}
|
||||
|
||||
.tag__red {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.flex_layout {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -5,6 +5,8 @@ import createPersistedState from 'vuex-persistedstate'
|
|||
Vue.use(Vuex)
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
/** 人脸检测验证状态 ["0": 未完成人脸认证; "1": 已完成人脸认证] */
|
||||
verification: "0",
|
||||
userInfo: {
|
||||
CORPINFO_ID: '',
|
||||
DEPARTMENT_ID: '',
|
||||
|
@ -19,16 +21,23 @@ const store = new Vuex.Store({
|
|||
},
|
||||
getters: {
|
||||
getUserInfo: state => state.userInfo,
|
||||
getVerification: state => state.verification,
|
||||
},
|
||||
mutations: {
|
||||
setUserInfo(state, userInfo) {
|
||||
state.userInfo = userInfo
|
||||
}
|
||||
},
|
||||
setVerification(state, verification) {
|
||||
state.verification = verification
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setUserInfo({commit}, userInfo) {
|
||||
commit('setUserInfo', userInfo)
|
||||
}
|
||||
},
|
||||
setVerification({commit}, verification) {
|
||||
commit('setVerification', verification)
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
createPersistedState({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// let requestPath = 'https://qggf.qhdsafety.com/xgfApi/'; // 后台请求地址
|
||||
let requestPath = 'http://192.168.0.37:8058//xgf_gwj/'; // 后台请求地址
|
||||
let requestPath = 'http://192.168.0.37:8058/xgf_gwj_2.0'; // 后台请求地址
|
||||
// let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址
|
||||
// let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址
|
||||
import store from '../store/index'
|
||||
|
|
Loading…
Reference in New Issue