yearning
18 小时以前 63fea2990e587837ed3dde2b9ac8f2b4ef729672
考点核验+签到
8个文件已删除
15个文件已修改
4个文件已添加
3 文件已重命名
558 ■■■■ 已修改文件
src/App.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/signInSuccess.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/json/cityItems.json 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/qxueyou.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/h5/router.js 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/appraisalPlan/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/center/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/certificate/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/examTicket/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/home/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/index.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/notice/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/main/score/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/axios.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/PdfPreview.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/Signature.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/addrVerify/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/faceAuth/components/auditDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/faceAuth/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/index.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/login/bind.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/login/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/login/redirect.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/map/BaiduMap.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/map/index.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/noTask/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/signIn/index.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/h5/signIn/signInSuccess.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -9,9 +9,7 @@
import { getWxSignature } from '@/utils/wxjssdk.js'
export default {
  data() {
    return {
    }
    return {}
  },
  watch: {
    '$route.path': function(){
@@ -23,9 +21,7 @@
      }
    },
  },
  created() {
    console.log('localHost')
  }
  created() {}
}
</script>
src/assets/images/signInSuccess.png
src/assets/json/cityItems.json
New file
@@ -0,0 +1,112 @@
[
  {
    "id": 1,
    "name": "广东省",
    "areaCode": "440000"
  },
  {
      "id": 54,
      "name": "广州市",
      "areaCode": "440100"
  },
  {
      "id": 55,
      "name": "韶关市",
      "areaCode": "440200"
  },
  {
      "id": 56,
      "name": "深圳市",
      "areaCode": "440300"
  },
  {
      "id": 57,
      "name": "珠海市",
      "areaCode": "440400"
  },
  {
      "id": 58,
      "name": "汕头市",
      "areaCode": "440500"
  },
  {
      "id": 59,
      "name": "佛山市",
      "areaCode": "440600"
  },
  {
      "id": 60,
      "name": "江门市",
      "areaCode": "440700"
  },
  {
      "id": 61,
      "name": "湛江市",
      "areaCode": "440800"
  },
  {
      "id": 62,
      "name": "茂名市",
      "areaCode": "440900"
  },
  {
      "id": 63,
      "name": "肇庆市",
      "areaCode": "441200"
  },
  {
      "id": 64,
      "name": "惠州市",
      "areaCode": "441300"
  },
  {
      "id": 65,
      "name": "梅州市",
      "areaCode": "441400"
  },
  {
      "id": 66,
      "name": "汕尾市",
      "areaCode": "441500"
  },
  {
      "id": 67,
      "name": "河源市",
      "areaCode": "441600"
  },
  {
      "id": 68,
      "name": "阳江市",
      "areaCode": "441700"
  },
  {
      "id": 69,
      "name": "清远市",
      "areaCode": "441800"
  },
  {
      "id": 70,
      "name": "东莞市",
      "areaCode": "441900"
  },
  {
      "id": 71,
      "name": "中山市",
      "areaCode": "442000"
  },
  {
      "id": 72,
      "name": "潮州市",
      "areaCode": "445100"
  },
  {
      "id": 73,
      "name": "揭阳市",
      "areaCode": "445200"
  },
  {
      "id": 74,
      "name": "云浮市",
      "areaCode": "445300"
  }
]
src/config/qxueyou.js
@@ -1,5 +1,5 @@
let baseDomain = `${location.protocol}//${location.host}`
let qxyRes = 'https://qxy-examination-dev.obs.cn-south-1.myhuaweicloud.com/'
let qxyRes = `https://qxy-examination${baseDomain.includes('dev.') || import.meta.env.MODE === 'development' ? '-dev': ''}.obs.cn-south-1.myhuaweicloud.com/`
let serverContext = '/app-api'
let htmlContext = '/examination/verify'
src/main.js
@@ -24,9 +24,9 @@
  app.component(key, component)
}
// import('vconsole').then((module) => {
//   new module.default()
// })
import('vconsole').then((module) => {
  new module.default()
})
app.config.globalProperties.$rules = ruleGenerator
app.config.globalProperties.$property = property
src/router/h5/router.js
@@ -10,19 +10,35 @@
        component: () => import('@/views/h5/addrVerify/index.vue'),
      },
      {
        path: 'examineeSignIn',
        name: '考生签到',
        component: () => import('@/views/h5/signIn/index.vue'),
      },
      {
        path: 'staffSignIn',
        name: '考评员签到',
        component: () => import('@/views/h5/signIn/index.vue'),
      },
      {
        path: 'verForm',
        name: '提交考点核验',
        component: () => import('@/views/h5/addrVerify/form.vue'),
      },
      {
        path: 'noVerAccess',
        name: '核验无权限',
        component: () => import('@/views/h5/addrVerify/noAccess.vue'),
        path: 'noTask',
        name: '暂无任务',
        component: () => import('@/views/h5/noTask/index.vue'),
      },
      {
        path: 'signup',
        path: 'map',
        name: '签到',
        component: () => import('@/views/h5/signup/index.vue'),
        component: () => import('@/views/h5/map/index.vue'),
      },
      {
        path: 'signInSuccess',
        name: '签到成功',
        component: () => import('@/views/h5/signIn/signInSuccess.vue')
      },
      {
        path: 'face',
src/router/main/appraisalPlan/index.js
File was deleted
src/router/main/center/index.js
File was deleted
src/router/main/certificate/index.js
File was deleted
src/router/main/examTicket/index.js
File was deleted
src/router/main/home/index.js
File was deleted
src/router/main/index.js
File was deleted
src/router/main/notice/index.js
File was deleted
src/router/main/score/index.js
File was deleted
src/utils/axios.js
@@ -46,7 +46,7 @@
    return !!(this.getAccessToken() && this.getRefreshToken());
  },
  reLogin() {
    router.push({ path: '/h5/login', query: router.currentRoute._value.query })
    router.push({ path: '/h5/login' })
  }
}
let isRefreshing = false;
src/views/components/PdfPreview.vue
@@ -18,11 +18,11 @@
    pdfViewer = new Pdfh5(container.value!, {
      pdfurl: props.url,
      textLayer: true,
      workerSrc: '/examination/admin/pdf.worker.min.js',
      cMapUrl: '/examination/admin/cmaps/',
      standardFontDataUrl: '/examination/admin/standard_fonts/',
      iccUrl: '/examination/admin/iccs/',
      wasmUrl: '/examination/admin/wasm/'
      workerSrc: '/examination/verify/pdf.worker.min.js',
      cMapUrl: '/examination/verify/cmaps/',
      standardFontDataUrl: '/examination/verify/standard_fonts/',
      iccUrl: '/examination/verify/iccs/',
      wasmUrl: '/examination/verify/wasm/'
    });
    const appElement = document.getElementById('app')
    
src/views/components/Signature.vue
@@ -2,10 +2,12 @@
  <div class="signature">
    <el-row justify="space-between">
      <el-text>签名</el-text>
      <el-text v-if="imageUrl" @click="imageUrl=''">清除签名</el-text>
      <el-text v-else @click="signatureDialog=true">点击签名</el-text>
      <template v-if="!disabled">
        <el-text v-if="imageUrl" @click="imageUrl=''">清除签名</el-text>
        <el-text v-else @click="signatureDialog=true">点击签名</el-text>
      </template>
    </el-row>
    <el-image v-if="imageUrl" :src="imageUrl"></el-image>
    <el-image v-if="imageUrl" :src="imageUrl.includes('data:image/png') ? imageUrl : $qxueyou.qxyRes + imageUrl"></el-image>
    <div v-else class="image-slot"></div>
    <el-dialog 
@@ -68,6 +70,10 @@
    modelValue: {
      type: String,
      default: ''
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  computed: {
@@ -193,9 +199,11 @@
      }
      let base64 = this.editCanvas.toDataURL('image/png', 1)
      let smallBase64 = await this.resizedataURL(base64, 240, 80)
      // let url = await uploadByBase64(smallBase64, '签名')
      // if (!url) return false
      this.imageUrl = smallBase64
      // this.imageUrl = smallBase64
      let url = await uploadByBase64(smallBase64, '签名')
      if (!url) return false
      this.imageUrl = url
      this.$emit('update:modelValue', url)
      this.signatureDialog = false
    },
    resizedataURL: function(base64, wantedWidth, wantedHeight){
src/views/h5/addrVerify/index.vue
@@ -5,7 +5,9 @@
export default {
  components: {},
  data() {
    return {}
    return {
      noTaskTip: ''
    }
  },
  computed: {
    appId() {
@@ -15,7 +17,7 @@
  async created() {
    const canVerify = await this.getCanVerify()
    if (!canVerify) {
      this.$router.replace('/h5/noVerAccess')
      this.$router.replace({ path: '/h5/noTask', query: { tip: this.noTaskTip }})
      return
    }
    const getCheckIsSubmit = await this.getCheckIsSubmit()
@@ -36,9 +38,13 @@
        }
        this.$axios.get('/exam/verify-record/can-verify', { params }).then(res => {
          if (res.data.code == 0) {
            if (!res.data.data) {
              this.noTaskTip = '您非此考点核验人员,无法签到,请联系工作人员确认。'
            }
            resolve(res.data.data)
          } else {
            resolve(false)
            this.noTaskTip = res.data.msg
          }
        }, () => {
          resolve(false)
src/views/h5/faceAuth/components/auditDialog.vue
@@ -13,7 +13,7 @@
        <el-image :src="base64" style="width: 100%;" fit="cover"></el-image>
        <div v-if="status=='auditing'" class="scan-line"></div>
      </div>
      <el-row justify="center" v-else-if="['success', 'fail'].includes(status)">
      <div style="display: flex; flex-direction: column; align-items: center;" v-else-if="['success', 'fail'].includes(status)">
        <el-image :src="$getImageUrl(`/h5/face_${status}.png`)"></el-image>
        <el-row>
          <el-text class="text-lg">人脸验证{{ status=='success'?'':'不' }}通过</el-text>
@@ -22,7 +22,7 @@
          <el-text v-if="status=='success'">系统已成功审核您的身份</el-text>
          <el-text v-else-if="status=='fail'">请重新验证您的身份</el-text>
        </el-row>
      </el-row>
      </div>
      <el-row justify="center" class="mt-5" v-if="status=='auditing'">
        <el-text>正在审核中,请耐心等待...</el-text>
      </el-row>
src/views/h5/faceAuth/index.vue
@@ -115,7 +115,7 @@
      }
    },
    auditSuccess(evt) {
      this.$router.replace({ path: '/h5/signup', query: { appId: this.appId, url: evt } })
      this.$router.replace({ path: '/h5/map', query: { appId: this.appId, url: evt } })
    },
  }
}
src/views/h5/index.vue
@@ -6,6 +6,7 @@
<script>
import { useSessionStore } from '@/stores/session.js'
import { storeToRefs } from 'pinia';
import { tokenUtils } from '@/utils/axios.js'
export default {
  setup() {
    const { setUserInfo } = useSessionStore()
@@ -15,10 +16,26 @@
  data() {
    return {}
  },
  computed: {
  },
  created() {
    if (this.$route.path == '/h5/verify' && this.$route.query.appId) {
      localStorage.setItem('verify_url', this.$route.fullPath)
    const path = this.$route.path
    const regionCode = this.$route.query.regionCode
    const fullPath = this.$route.fullPath
    let personType = null
    if (path == '/h5/addrVer') { //0==工作人员 2==考点核验员
      personType = '2'
    } else if (path == '/h5/staffSignIn') {
      personType = '0'
    }
    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: {
src/views/h5/login/bind.vue
@@ -34,6 +34,7 @@
import { tokenUtils } from '@/utils/axios.js';
import { useLoginStore } from '@/stores/login.js'
import { storeToRefs } from 'pinia';
import cityItems from '@/assets/json/cityItems.json'
export default {
  setup() {
    const { lastRouteInfo } = storeToRefs(useLoginStore())
@@ -106,12 +107,12 @@
      }
    },
    login() {
      const data = {
      let data = {
        mobile: this.form.mobile,
        code: this.form.code,
        state: this.state,
        openid: this.openid,
        wxCode: this.wxCode
        wxCode: this.wxCode,
      }
      this.loginLoading = true
      this.$axios.post('/system/auth/staff/checkin/bind', data).then(async res => {
@@ -119,7 +120,7 @@
          const resData = res.data.data
          tokenUtils.setTokens(resData.accessToken, resData.refreshToken)
          this.$message.success('绑定成功')
          const path = localStorage.getItem('verify_url')
          const path = localStorage.getItem('_enterUrl')
          if (path) {
            this.$router.replace(path)
          }
src/views/h5/login/index.vue
@@ -35,6 +35,7 @@
import { useLoginStore } from '@/stores/login.js'
import { storeToRefs } from 'pinia';
import { isWeixin } from '@/utils/UA.js'
import cityItems from '@/assets/json/cityItems.json'
export default {
  setup() {
    const { lastRouteInfo } = storeToRefs(useLoginStore())
@@ -54,7 +55,6 @@
    }
  },
  created() {
    tokenUtils.clearTokens()
    this.loginType = isWeixin ? 'weixin' : 'mobilePhone'
    if (isWeixin) {
@@ -110,7 +110,7 @@
      }
    },
    login() {
      const data = {
      let data = {
        mobile: this.form.mobile,
        code: this.form.code,
      }
@@ -120,7 +120,7 @@
          const resData = res.data.data
          tokenUtils.setTokens(resData.accessToken, resData.refreshToken)
          this.$message.success('登录成功')
          const path = localStorage.getItem('verify_url')
          const path = localStorage.getItem('_enterUrl')
          if (path) {
            this.$router.replace(path)
          }
src/views/h5/login/redirect.vue
@@ -86,11 +86,11 @@
          const resData = res.data.data || {}
          if (resData.userId) {
            tokenUtils.setTokens(resData.accessToken, resData.refreshToken)
            const path = localStorage.getItem('verify_url')
            const path = localStorage.getItem('_enterUrl')
            if (path) {
              this.$router.replace(path)
            } else {
              this.$router.replace('/h5/noVerAccess')
              this.$message.error('参数异常,请重新扫码或联系管理员')
            }
          } else {
            this.$router.replace({ 
@@ -103,7 +103,9 @@
            })
          }
        } else {
          this.$message.error(res.data.msg)
          setTimeout(() => {
            this.$router.replace({ path: '/h5/noTask', query: { tip: res.data.msg }})
          }, 1000)
        }
      })
    }
src/views/h5/map/BaiduMap.vue
File was renamed from src/views/h5/signup/BaiduMap.vue
@@ -39,6 +39,7 @@
      type: Object,
      default: () => ({ lng: 0, lat: 0 })
    },
    limitDistanceFlag: Boolean
  },
  data() {
    return {
@@ -60,7 +61,7 @@
    center: {
      handler: function(val) {
        const newPoint = new BMapGL.Point(val.lng, val.lat);
        this.map.map.setCenter(newPoint)
        this.map.setCenter(newPoint)
      },
      deep: true
    }
@@ -99,10 +100,19 @@
              lng: pt.lng,
              lat: pt.lat
            }
            that.$emit('getUserPositionStatus', 'success')
            that.diffDistance()
            const positionAddressText = r.address.province + r.address.city + r.address.district + r.address.street
            that.$emit('getUserPositionStatus', {
              status: 'success',
              userPositionText: positionAddressText
            })
            if (this.limitDistanceFlag) {
              that.diffDistance()
            } else {
              const newPoint = new BMapGL.Point(that.userPosition.lng, that.userPosition.lat);
              that.map.setCenter(newPoint)
            }
        } else {
          that.$emit('getUserPositionStatus', 'fail')
          that.$emit('getUserPositionStatus', { status: 'fail' })
        }
      });
    },
src/views/h5/map/index.vue
File was renamed from src/views/h5/signup/index.vue
@@ -11,7 +11,8 @@
          <div class="mapBox">
            <BaiduMap
              :center="centerPoint"
              @getUserPositionStatus="(evt) => userPositionStatus = evt"
              :limitDistanceFlag="limitDistanceFlag"
              @getUserPositionStatus="getUserPositionStatus"
              @getMapStatus="(evt) => mapStatus = evt"
              @getDistance="getDistance"
            />
@@ -20,19 +21,21 @@
            <el-image 
              style="width: 50px;height: 50px;" 
              fit="contain" 
              :src="$getImageUrl(`/map/position-marker-${positionError?'red':'green'}.png`)"
              :src="$getImageUrl(`/map/position-marker-${limitDistanceFlag&&positionError?'red':'green'}.png`)"
            ></el-image>
          </div>
          <div class="text-sign">
            <el-text style="color: #8c8c8c;" v-if="userPositionStatus=='loading'">定位中...</el-text>
            <el-text style="color: #e73f3f;" v-else-if="userPositionStatus=='fail'">获取定位失败,当前设备的定位服务</el-text>
            <el-text style="color: #e73f3f;" v-else-if="userPositionStatus=='fail'">获取定位失败,请检查当前设备的定位服务</el-text>
            <template v-else-if="userPositionStatus=='success'">
              <el-text v-if="distance>0&&distance<500" style="color: #56c16d;">
                位置正常 距离签到地点{{ distance }}米
              </el-text>
              <el-text v-else style="color: #e73f3f;">
                超出签到范围,不可签到
              </el-text>
              <template v-if="limitDistanceFlag">
                <el-text v-if="distance>0&&distance<500" style="color: #56c16d;">
                  位置正常 距离签到地点{{ distance }}米
                </el-text>
                <el-text v-else style="color: #e73f3f;">
                  超出签到范围,不可签到
                </el-text>
              </template>
            </template>
          </div>
        </div>
@@ -40,8 +43,8 @@
      <!-- <el-row justify="center">
        <el-text class="text-lg font-bold">{{ positionName }}</el-text>
      </el-row> -->
      <el-row justify="center" class="mt-1">
        <el-text class="text-lg text-info">{{ positionAddress }}</el-text>
      <el-row justify="center" class="mt-7">
        <el-text class="text-lg text-info" style="text-align: center;">{{ positionAddress }}</el-text>
      </el-row>
    </div>
    <el-row justify="center" class="mt-7">
@@ -59,7 +62,7 @@
</template>
<script>
import BaiduMap from '@/views/h5/signup/BaiduMap.vue'
import BaiduMap from '@/views/h5/map/BaiduMap.vue'
import { useSessionStore } from '@/stores/session.js'
import { storeToRefs } from 'pinia';
export default {
@@ -83,7 +86,9 @@
        lat: 23.135618,
        lng: 113.27077
      },
      clickCount: 0
      clickCount: 0,
      personType: 0,
      limitDistanceFlag: false
    }
  },
  computed: {
@@ -111,13 +116,20 @@
    }
  },
  created() {
    this.getSignupAddress()
    const type = localStorage.getItem('_personType')
    this.personType = Number(type)
    if (this.personType == 2) {
      this.limitDistanceFlag = true
      this.getVerifyAddress()
    } else {
      this.limitDistanceFlag = false
    }
  },
  async mounted() {
    this.currentTimeText = this.$dayjs().format('HH:mm')
  },
  methods: {
    getSignupAddress() {
    getVerifyAddress() {
      const params = { applicationId: this.appId }
      this.$axios.get('/exam/verify-record/get-by-application-id', { params }).then(res => {
        if (res.data.code == 0) {
@@ -135,7 +147,8 @@
      })
    },
    getUserPositionStatus(evt) {
      this.userPositionStatus = evt
      this.userPositionStatus = evt.status
      this.positionAddress = evt.userPositionText
    },
    getDistance(evt) {
      this.distance = evt
@@ -152,19 +165,27 @@
          return
        }
      }
      const data = {
      let data = {
        targetId: this.appId,
        targetType: 2,
        targetType: this.personType,
        url: this.url,
        type: 0
        type: this.url ? 0 : 2
      }
      this.confirmLoading = true
      this.$axios.post('/exam/staff/checkin', data).then(res => {
        if (res.data.code == 0) {
          this.$message.success('签到成功')
          setTimeout(() => {
            this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
            if (data.targetType == 2) {
              this.$message.success('签到成功')
              this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
            } else {
              this.$router.replace({ path: '/h5/signInSuccess', query: {
                timeText: this.$dayjs().format('HH:mm:ss'),
                address: this.positionAddress
              }})
            }
          }, 500)
        } else {
          this.$message.error(res.data.msg)
        }
src/views/h5/noTask/index.vue
File was renamed from src/views/h5/addrVerify/noAccess.vue
@@ -2,7 +2,7 @@
  <div class="content">
    <el-image style="width: 150px" fit="contain" :src="$getImageUrl('/h5/noVerify.png')"></el-image>
    <el-row style="margin-top: 40px;">
      <el-text class="text-center">您非本考点资质审核的核验员,无法核验,请联系工作人员确认。</el-text>
      <el-text class="text-center">{{ tip }}</el-text>
    </el-row>
  </div>
</template>
@@ -12,6 +12,11 @@
    return {
    }
  },
  computed: {
    tip() {
      return this.$route.query.tip || '您非相关工作人员,无法签到,请联系工作人员确认。'
    }
  }
}
</script>
src/views/h5/signIn/index.vue
New file
@@ -0,0 +1,75 @@
<template>
  <div></div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      noTaskTip: ''
    }
  },
  computed: {
    appId() {
      return this.$route.query.appId
    }
  },
  async created() {
    const canSignIn = await this.getCanSignIn()
    if (!canSignIn) {
      this.$router.replace({ path: '/h5/noTask', query: { tip: this.noTaskTip }})
      return
    }
    const setting = await this.getSignInSetting()
    if (setting === 0) {
      this.$router.replace({ path: '/h5/face', query: { appId: this.appId } })
    } else if (setting === 2) {
      this.$router.replace({ path: '/h5/map', query: { appId: this.appId } })
    } else {
      this.$router.replace({ path: '/h5/noTask', query: { tip: this.noTaskTip }})
    }
  },
  mounted() {
    document.title = '工作人员签到'
  },
  methods: {
    getCanSignIn() {
      return new Promise((resolve) => {
        const params = {
          targetId: '',
          appraisalPlanId: this.appId
        }
        this.$axios.get('/exam/staff/checkin/open', { params }).then(res => {
          if (res.data.code == 0) {
            if (!res.data.data) {
              this.noTaskTip = '当前评价计划未开启签到'
            }
            resolve(res.data.data)
          } else {
            resolve(false)
            this.$message.error(res.data.msg)
          }
        }, () => {
          resolve(false)
        })
      })
    },
    getSignInSetting() {
      return new Promise((resolve) => {
        const params = { appraisalPlanId: this.appId }
        this.$axios.get('/exam/staff/checkin/config', { params }).then(res => {
          if (res.data.code == 0) {
            resolve(res.data.data)
          } else {
            this.noTaskTip = res.data.msg
            resolve(null)
          }
        }, () => {
          resolve(null)
        })
      })
    },
  }
}
</script>
src/views/h5/signIn/signInSuccess.vue
New file
@@ -0,0 +1,49 @@
<template>
  <div class="p-7">
    <el-row justify="center" class="mt-7">
      <el-image style="width: 150px" fit="contain" :src="$getImageUrl('/signInSuccess.png')"></el-image>
    </el-row>
    <el-row justify="center">
      <el-text class="font-bold text-2xl">
        签到成功
      </el-text>
    </el-row>
    <div style="margin-top: 50px;" class="ml-4">
      <el-row align="middle">
        <Icon icon="material-symbols:person-rounded" width="20" height="20" class="mr-1" style="color: #cccccc" />
        <el-text>姓名:{{ userInfo.name }}</el-text>
      </el-row>
      <el-row class="mt-2" align="middle">
        <Icon icon="mingcute:idcard-fill" width="18" height="18" class="mr-1" style="color: #cccccc" />
        <el-text>身份证尾号:{{ userInfo.idCard?.slice(-4) }}</el-text>
      </el-row>
      <el-row class="mt-2" align="middle">
        <Icon icon="mdi:clock" width="18" height="18" class="mr-1" style="color: #cccccc" />
        <el-text>签到时间:{{ timeText }}</el-text>
      </el-row>
      <el-row class="mt-2" align="middle">
        <Icon icon="game-icons:position-marker" width="18" height="18" class="mr-1" style="color: #cccccc" />
        <el-text>{{ positionAddress }}</el-text>
      </el-row>
    </div>
  </div>
</template>
<script>
import { useSessionStore } from '@/stores/session.js'
import { storeToRefs } from 'pinia';
export default {
  setup() {
    const { userInfo } = storeToRefs(useSessionStore())
    return { userInfo }
  },
  computed: {
    positionAddress() {
      return this.$route.query.address
    },
    timeText() {
      return this.$route.query.timeText
    }
  },
}
</script>
vite.config.js
@@ -8,9 +8,9 @@
export default defineConfig({
  base: '/examination/verify',
  plugins: [vue(), vueDevTools()],
  esbuild: {
    drop: ['console', 'debugger']
  },
  // esbuild: {
  //   drop: ['console', 'debugger']
  // },
  define: {
    // 注入构建时间戳到代码中
    '__BUILD_TIME__': JSON.stringify(timestamp)
@@ -33,7 +33,7 @@
    host: '0.0.0.0',
    proxy: {
      '/app-api': {
        target: 'http://101.43.143.75:48180', // dev
        target: 'http://101.43.143.75:48080', // dev
        changeOrigin: true,
      },
    },