| | |
| | | <meta charset="UTF-8"> |
| | | <link rel="icon" href="/favicon.ico"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
| | | <title>广东省技能人才评价考务管理系统</title> |
| | | <title>广东技能人才评价考务管理服务</title> |
| | | </head> |
| | | <body> |
| | | <div id="app"></div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { isWeixin } from '@/utils/UA.js' |
| | | import { getWxSignature } from '@/utils/wxjssdk.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return {} |
| | | }, |
| | | watch: { |
| | | '$route.path': function(){ |
| | | let count = localStorage.getItem('refreshCount') || 0 |
| | | count = Number(count) + 1 |
| | | localStorage.setItem('refreshCount', count++) |
| | | if (isWeixin) { |
| | | getWxSignature(this.$route) |
| | | '$route': function() { |
| | | getWxSignature() |
| | | } |
| | | }, |
| | | }, |
| | | created() {} |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | // ?qxydebug2=true 触发 |
| | | const urlParams = new URLSearchParams(window.location.search); |
| | | if (urlParams.get('qxydebug2') === 'true') { |
| | | localStorage.setItem('debug2', 'true') |
| | | } |
| | | if (localStorage.getItem('debug2') == 'true') { |
| | | import('vconsole').then((module) => { |
| | | new module.default(); |
| | | }); |
| | | } |
| | | // import('vconsole').then((module) => { |
| | | // new module.default(); |
| | | // }); |
| | | |
| | | app.config.globalProperties.$rules = ruleGenerator |
| | | app.config.globalProperties.$property = property |
| | |
| | | component: () => import('@/views/h5/addrVerify/form.vue'), |
| | | }, |
| | | { |
| | | path: 'noTask', |
| | | name: '暂无任务', |
| | | component: () => import('@/views/h5/noTask/index.vue'), |
| | | }, |
| | | { |
| | | path: 'map', |
| | | name: '签到', |
| | | component: () => import('@/views/h5/map/index.vue'), |
| | |
| | | ], |
| | | }, |
| | | { |
| | | path: '/h5/noTask', |
| | | name: '暂无任务', |
| | | component: () => import('@/views/h5/noTask/index.vue'), |
| | | }, |
| | | { |
| | | path: '/h5/login', |
| | | name: '身份验证登录', |
| | | component: () => import('@/views/h5/login/index.vue'), |
| | |
| | | routes: [ ...errorPage, ...h5], |
| | | }) |
| | | |
| | | router.beforeEach((to, from, next) => { |
| | | router.beforeEach(async (to, from, next) => { |
| | | if (!to.matched.length) { |
| | | if (to.path === '/') { |
| | | next({ path: '/error/404', query: { errorUrl: to.path } }) |
| | | next({ path: '/error/404', query: { errorUrl: to.fullPath } }) |
| | | return |
| | | } |
| | | } else { |
| | | next() |
| | | } |
| | | }) |
| | | |
| | | export default router |
| | |
| | | }, 1000) |
| | | } |
| | | } |
| | | |
| | | export default { |
| | | isWeixin, |
| | | isWeixinWork, |
| | | isMobile, |
| | | isTBSX5, |
| | | isiOS, |
| | | isiOSApp, |
| | | isAndroid, |
| | | isAndroidApp, |
| | | isApp, |
| | | isOldVerApp, |
| | | iosInputBlur, |
| | | wxWorkIosScrollToTop, |
| | | isHarmony, |
| | | isHarmonyApp |
| | | } |
| | | export { |
| | | isWeixin, |
| | | isWeixinWork, |
| | |
| | | } |
| | | if (response.data && resultCode == '401') { |
| | | let filterUrlList = ['/system/wx/js/signature'] |
| | | console.log(filterUrlList.includes(response.config.url)) |
| | | if (filterUrlList.includes(response.config.url)){ return } |
| | | |
| | | if (!originalRequest._retry && tokenUtils.getRefreshToken) { |
| | |
| | | } |
| | | } |
| | | xhr.onerror = (evt) => { // 上传失败回调 |
| | | store.commit("snack/error", "上传失败!") |
| | | // store.commit("snack/error", "上传失败!") |
| | | console.log(JSON.stringify(evt.target)) |
| | | resolve(false) |
| | | } |
| | |
| | | import wx from 'weixin-js-sdk' |
| | | import axios from './axios' |
| | | import $qxueyou from '@/config/qxueyou.js' |
| | | import { isWeixin, isMobile } from '@/utils/UA.js' |
| | | import { isWeixin, isMobile, isiOS } from '@/utils/UA.js' |
| | | |
| | | let newFeature = false |
| | | let oldShare = ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareQZone'] |
| | |
| | | |
| | | /** |
| | | * 微信获取签名 |
| | | * @param {*} toRoute 目标路由 |
| | | */ |
| | | function getWxSignature(toRoute) { |
| | | function getWxSignature() { |
| | | if (!weixinFlag) { return false } |
| | | |
| | | let signUrl = getSignUrl() |
| | | |
| | | axios.get('/system/wx/js/signature', { |
| | | params: { url: location.href } |
| | | params: { url: window.location.href } |
| | | }).then(res => { |
| | | if (!res || !res.data) { |
| | | return false |
| | |
| | | }) |
| | | } |
| | | |
| | | function getSignUrl() { |
| | | const currentUrl = window.location.href.split('#')[0] |
| | | |
| | | if (isiOS) { |
| | | const cachedEntryUrl = sessionStorage.getItem('qxyKwWxVerifyEntryUrl') |
| | | if (!cachedEntryUrl) { |
| | | sessionStorage.setItem('qxyKwWxVerifyEntryUrl', currentUrl) |
| | | return currentUrl |
| | | } |
| | | return cachedEntryUrl |
| | | } |
| | | return currentUrl |
| | | } |
| | | |
| | | function chooseImage(){ |
| | | return new Promise((resolve) => { |
| | | wx.chooseImage({ |
| | |
| | | <el-row justify="center" class="mt-5" v-if="status=='auditing'"> |
| | | <el-text>正在审核中,请耐心等待...</el-text> |
| | | </el-row> |
| | | <el-button v-if="mode=='local'" |
| | | @click="handlerSuccess" |
| | | type="primary" |
| | | size="large" class="mt-5" |
| | | style="width: 100%;" |
| | | > |
| | | 上传现场照片 |
| | | </el-button> |
| | | <el-button |
| | | v-if="status=='unStart'" |
| | | v-else-if="status=='unStart'" |
| | | @click="submitAudit" |
| | | :loading="status=='auditing'" |
| | | type="primary" |
| | |
| | | > |
| | | 完成验证 |
| | | </el-button> |
| | | <template v-else-if="status=='fail'"> |
| | | <el-button |
| | | v-else-if="status=='fail'" |
| | | @click="dialogFlag=false" |
| | | type="primary" |
| | | size="large" class="mt-5" |
| | |
| | | > |
| | | 确定 |
| | | </el-button> |
| | | <template v-if="verifyErrorCount >= 2" > |
| | | <el-row justify="center"> |
| | | <el-text |
| | | tag="ins" class="text-red mt-6" |
| | | @click="uploadLocalImg()" |
| | | > |
| | | 核验异常,工作人员上传现场照片 |
| | | </el-text> |
| | | </el-row> |
| | | <el-row justify="center" style="width: 100%;"> |
| | | <el-text |
| | | class="text-xs text-info px-1" |
| | | > |
| | | 请拍摄【本人手持身份证且背景体现现场元素的照片】 |
| | | </el-text> |
| | | </el-row> |
| | | </template> |
| | | </template> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | return { |
| | | dialogFlag: false, |
| | | status: '', |
| | | url: '' |
| | | url: '', |
| | | verifyErrorCount: 0 |
| | | } |
| | | }, |
| | | props: { |
| | |
| | | default: false |
| | | }, |
| | | base64: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | mode: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | |
| | | this.$axios.get('/system/auth/staff/checkin/face-match', { params }).then(res => { |
| | | if (res.data.code == 0) { |
| | | this.status = res.data.data ? 'success' : 'fail' |
| | | if (!res.data.data) { |
| | | this.verifyErrorCount += 1 |
| | | } |
| | | } else { |
| | | this.status = 'fail' |
| | | this.$message.error(res.data.msg || "人脸比对失败") |
| | |
| | | handlerSuccess() { |
| | | this.dialogFlag = false |
| | | this.$emit('handlerSuccess', this.url) |
| | | } |
| | | }, |
| | | uploadLocalImg() { |
| | | this.dialogFlag = false |
| | | this.$emit('uploadLocalImg') |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <auditDialog |
| | | v-model="auditDialogFlag" |
| | | :base64="base64" |
| | | :mode="mode" |
| | | @handlerSuccess="auditSuccess" |
| | | @uploadLocalImg="uploadLocalImg" |
| | | > |
| | | </auditDialog> |
| | | </div> |
| | |
| | | ], |
| | | openCameraFlag: false, |
| | | base64: '', |
| | | auditDialogFlag: false |
| | | auditDialogFlag: false, |
| | | mode: 'verify', // verify人脸核验照片 / local现场照片 |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | auditSuccess(evt) { |
| | | this.$router.replace({ path: '/h5/map', query: { appId: this.appId, url: evt } }) |
| | | }, |
| | | uploadLocalImg() { |
| | | this.mode = 'local' |
| | | this.startCapture() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </template> |
| | | <script> |
| | | import { useSessionStore } from '@/stores/session.js' |
| | | import { storeToRefs } from 'pinia'; |
| | | import { tokenUtils } from '@/utils/axios.js' |
| | | import { storeToRefs } from 'pinia' |
| | | export default { |
| | | setup() { |
| | | const { setUserInfo } = useSessionStore() |
| | |
| | | }, |
| | | created() { |
| | | const path = this.$route.path |
| | | const regionCode = this.$route.query.regionCode |
| | | const regionCode = this.$route.query.regionCode //未使用 |
| | | const fullPath = this.$route.fullPath |
| | | let personType = null |
| | | if (path == '/h5/addrVer') { //0==工作人员 2==考点核验员 |
| | |
| | | localStorage.setItem('_personType', personType) |
| | | localStorage.setItem('_regionCode', regionCode) |
| | | localStorage.setItem('_enterUrl', fullPath) |
| | | // const lastPersonType = localStorage.getItem('_personType') |
| | | // if (lastPersonType && lastPersonType !== personType) { |
| | | // tokenUtils.clearTokens() |
| | | // } |
| | | this.getUserInfo() |
| | | }, |
| | | methods: { |
| | |
| | | this.$axios.get('/system/auth/staff/profile').then(res => { |
| | | if (res.data.code == 0) { |
| | | this.setUserInfo(res.data.data || {}) |
| | | } else if (res.data.code != 401) { |
| | | const tip = res.data.msg || '获取账号信息异常' |
| | | this.$message.error(tip) |
| | | this.$router.replace({ path: '/h5/noTask', query: { tip } }) |
| | | } |
| | | }).catch(() => { |
| | | const tip = '获取账号信息异常' |
| | | this.$router.replace({ path: '/h5/noTask', query: { tip }}) |
| | | this.$message.error(tip) |
| | | }) |
| | | }, |
| | | } |
| | |
| | | this.redirectUrl() |
| | | this.redirectCount = localStorage.getItem('weChatRedirectCount') || 0 |
| | | this.redirectCount = Number(this.redirectCount) + 1 |
| | | localStorage.setItem('weChatRedirectCount', redirectCount) |
| | | localStorage.setItem('weChatRedirectCount', this.redirectCount) |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | } |
| | | } else { |
| | | setTimeout(() => { |
| | | this.$router.replace({ path: '/h5/noTask', query: { tip: res.data.msg }}) |
| | | }, 1000) |
| | | } |
| | | }) |
| | | } |
| | |
| | | const newPoint = new BMapGL.Point(that.userPosition.lng, that.userPosition.lat); |
| | | that.map.setCenter(newPoint) |
| | | } |
| | | that.$emit('getPosition', { point: that.userPosition, address: positionAddressText }) |
| | | } else { |
| | | that.$emit('getUserPositionStatus', { status: 'fail' }) |
| | | } |
| | |
| | | @getUserPositionStatus="getUserPositionStatus" |
| | | @getMapStatus="(evt) => mapStatus = evt" |
| | | @getDistance="getDistance" |
| | | @getPosition="getUserPosition" |
| | | /> |
| | | </div> |
| | | <div class="center-sign"> |
| | |
| | | }, |
| | | clickCount: 0, |
| | | personType: 0, |
| | | limitDistanceFlag: false |
| | | limitDistanceFlag: false, |
| | | userPosition: {} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | created() { |
| | | const type = localStorage.getItem('_personType') |
| | | this.personType = Number(type) |
| | | this.personType = 0 |
| | | if (this.personType == 2) { |
| | | this.limitDistanceFlag = true |
| | | this.getVerifyAddress() |
| | |
| | | this.currentTimeText = this.$dayjs().format('HH:mm') |
| | | }, |
| | | methods: { |
| | | getUserPosition(evt) { |
| | | this.userPosition = evt |
| | | }, |
| | | getVerifyAddress() { |
| | | const params = { applicationId: this.appId } |
| | | this.$axios.get('/exam/verify-record/get-by-application-id', { params }).then(res => { |
| | |
| | | targetId: this.appId, |
| | | targetType: this.personType, |
| | | url: this.url, |
| | | type: this.url ? 0 : 2 |
| | | type: this.url ? 0 : 2, |
| | | details: JSON.stringify(this.userPosition) |
| | | } |
| | | this.confirmLoading = true |
| | | this.$axios.post('/exam/staff/checkin', data).then(res => { |
| | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | return {} |
| | | }, |
| | | computed: { |
| | | tip() { |
| | | return this.$route.query.tip || '您非相关工作人员,无法签到,请联系工作人员确认。' |
| | | } |
| | | } |
| | | }, |
| | | created() {}, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | padding: 60px; |
| | |
| | | // https://vite.dev/config/ |
| | | export default defineConfig({ |
| | | base: '/examination/verify', |
| | | plugins: [vue(), vueDevTools()], |
| | | plugins: [ |
| | | vue(), |
| | | vueDevTools() |
| | | ], |
| | | esbuild: { |
| | | drop: ['console', 'debugger'] |
| | | }, |