submit
This commit is contained in:
parent
206a594395
commit
a30b63dd36
@ -42,6 +42,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/face-auth/index",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": false // 禁用原生导航
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/home/index",
|
"path": "pages/home/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -120,6 +131,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/mine/index",
|
"path": "pages/mine/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
111
src/pages/face-auth/index.vue
Normal file
111
src/pages/face-auth/index.vue
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<custom-title class="title-block" title="人脸核验">
|
||||||
|
</custom-title>
|
||||||
|
<div class="main">
|
||||||
|
<tm-message ref="msg" :lines="2"></tm-message>
|
||||||
|
<div class="content1">
|
||||||
|
人像识别认证
|
||||||
|
</div>
|
||||||
|
<div class="content2">
|
||||||
|
<camera device-position="front">
|
||||||
|
|
||||||
|
</camera>
|
||||||
|
</div>
|
||||||
|
<div class="content3" @click="submit">
|
||||||
|
提交
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import displayBox from '../../components/display-box/index.vue'
|
||||||
|
import {ref} from "vue";
|
||||||
|
import {getInfo, updateInfo} from "@/http/apis";
|
||||||
|
const msg=ref(null)
|
||||||
|
const getUserInfo = async () => {
|
||||||
|
const res=await getInfo()
|
||||||
|
if (res.code===200){
|
||||||
|
uni.setStorageSync('userInfo',res.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submit=async ()=>{
|
||||||
|
const res=await updateInfo({
|
||||||
|
idNum:idInfo.value.idCard,
|
||||||
|
realName:idInfo.value.name
|
||||||
|
})
|
||||||
|
if (res.code===200){
|
||||||
|
uni.showToast({
|
||||||
|
title: '实名成功',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
})
|
||||||
|
getUserInfo()
|
||||||
|
uni.navigateBack()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const idInfo=ref({
|
||||||
|
name:'',
|
||||||
|
idCard:''
|
||||||
|
})
|
||||||
|
const validateIDCardNumber=(idNumber)=> {
|
||||||
|
const regExpMainland = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/;
|
||||||
|
return regExpMainland.test(idNumber);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100vh;
|
||||||
|
.main{
|
||||||
|
overflow-y: auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0rpx 42rpx 0 42rpx;
|
||||||
|
width: 100vw;
|
||||||
|
flex: 1;
|
||||||
|
background-image: url('https://cdns.fontree.cn/fonchain-main/prod/image/1833/avatar/16968647-fc99-46fe-b95c-620c55b7646f.png');
|
||||||
|
background-size: 100%;
|
||||||
|
.content3{
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 156rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
width: 436rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #000;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
.content2{
|
||||||
|
margin-top: 118rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
camera{
|
||||||
|
width: 520rpx;
|
||||||
|
height: 520rpx;
|
||||||
|
border-radius: 360rpx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content1{
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 68rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
height: 82rpx;
|
||||||
|
background-color: #B1292E;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="wrap1_3" :style="{backgroundColor:item.isBlindBox===2?'#000':''}">
|
<div class="wrap1_3" :style="{backgroundColor:item.isBlindBox===2?'#000':''}">
|
||||||
<image @click="goViewVenues(item)" v-if="item.isBlindBox===1" src="../../static/zu762@3x.png" alt=""/>
|
<image @click="goViewVenues(item)" v-if="item.isBlindBox===1" src="../../static/zu762@3x.png" alt=""/>
|
||||||
<image @click.stop="exchange" v-if="item.isBlindBox===2" style="width: 79rpx;height: 34rpx" src="../../static/zu1216@3x.png" alt=""/>
|
<image @click.stop="exchange(item)" v-if="item.isBlindBox===2" style="width: 79rpx;height: 34rpx" src="../../static/zu1216@3x.png" alt=""/>
|
||||||
</div>
|
</div>
|
||||||
<tm-drawer hideHeader :width="510" :height="636" ref="calendarView" placement="center" v-model:show="showWin4">
|
<tm-drawer hideHeader :width="510" :height="636" ref="calendarView" placement="center" v-model:show="showWin4">
|
||||||
<div class="content8">
|
<div class="content8">
|
||||||
@ -141,26 +141,11 @@ const switchOptions=async (num)=>{
|
|||||||
}
|
}
|
||||||
currentTab.value=num
|
currentTab.value=num
|
||||||
}
|
}
|
||||||
const exchange=async ()=>{
|
const exchange=async (item)=>{
|
||||||
const data={
|
const res1= await getQrCode({appointUid:item.appointmentUid})
|
||||||
"userName": userInfo.value.realName, //用户姓名
|
|
||||||
"idCard": userInfo.value.idNum, //用户身份证号
|
|
||||||
"phone": userInfo.value.telNum, //预约电话
|
|
||||||
"blindBoxName": "博物馆开馆纪念盲盒" //盲盒名称
|
|
||||||
}
|
|
||||||
const res=await extractingBlindBoxes(data)
|
|
||||||
if (res.code===0){
|
|
||||||
uni.showToast({
|
|
||||||
icon:'none',
|
|
||||||
title: res.msg,
|
|
||||||
duration: 1000
|
|
||||||
})
|
|
||||||
}else if (res.code===200){
|
|
||||||
const res1= await getQrCode({appointUid:res.data.appointmentUid})
|
|
||||||
const arrayBuffer = new Uint8Array(res1)
|
const arrayBuffer = new Uint8Array(res1)
|
||||||
imageSrc.value = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBuffer)
|
imageSrc.value = "data:image/png;base64," + uni.arrayBufferToBase64(arrayBuffer)
|
||||||
showWin4.value=true
|
showWin4.value=true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const goViewVenues = (item) => {
|
const goViewVenues = (item) => {
|
||||||
uni.setStorageSync('ticket',item)
|
uni.setStorageSync('ticket',item)
|
||||||
@ -180,6 +165,49 @@ const goSetUp = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.content8{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.wrap1{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000;
|
||||||
|
margin-top: 36rpx;
|
||||||
|
}
|
||||||
|
.wrap2{
|
||||||
|
color: #B29E92;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.wrap3{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 360rpx;
|
||||||
|
height: 360rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
image{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.wrap4{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 436rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color:#F7963B;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius:30rpx ;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.wrap5{
|
||||||
|
margin-top: 6rpx;
|
||||||
|
color: #B29E92;
|
||||||
|
font-size: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.large-container {
|
.large-container {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #r3>
|
<template #r3>
|
||||||
<div class="box-right">
|
<div class="box-right">
|
||||||
{{dayjs(ticket.date).format('YYYY年MM月DD日')}}
|
{{ticket.date?dayjs(ticket.date).format('YYYY年MM月DD日'):'暂无'}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #l4>
|
<template #l4>
|
||||||
|
Loading…
Reference in New Issue
Block a user