chuangte-mattress-app/pages/my.vue

72 lines
1.6 KiB
Vue
Raw Permalink Normal View History

2023-12-05 16:45:28 +08:00
<template>
2024-01-27 16:37:52 +08:00
<view class="page">
2024-09-15 18:02:40 +08:00
<button @click="click" style="margin-top:500rpx ;">按钮</button>
<input type="text" v-model="name" placeholder="请输入您的姓名" />
<input type="text" v-model="namemobel" placeholder="请输入您的身份证号" />
2023-12-05 16:45:28 +08:00
</view>
</template>
<script>
export default {
data() {
return {
2024-01-27 16:37:52 +08:00
bgc: {
2024-08-28 11:04:46 +08:00
backgroundColor: "#4C97E7",
2024-01-27 16:37:52 +08:00
},
2024-09-15 18:02:40 +08:00
name:'',
namemobel:'',
paw:'',
title:'提示',
2024-01-23 19:15:52 +08:00
}
},
methods: {
2024-09-15 18:02:40 +08:00
click(){
// 检查是否支持生物认证
uni.checkIsSupportSoterAuthentication({
success: (res) => {
// 调用人脸识别API
wx.startFacialRecognitionVerify({
name: this.name, // 用户名称
idCardNumber: this.namemobel, // 身份证号码
success: (result) => {
if (result.errMsg === 'startFacialRecognitionVerify:ok') {
// 处理人脸识别成功的情况
console.log('人脸识别成功');
}
},
fail: (error) => {
// 处理人脸识别失败的情况
uni.showToast({
title: '人脸识别失败',
icon: 'none',
duration: 2000
});
}
});
},
fail: (err) => {
console.log('支持生物认证失败', err);
}
});
}
2024-08-28 11:04:46 +08:00
2024-01-23 19:15:52 +08:00
}
}
2023-12-05 16:45:28 +08:00
</script>
2024-08-28 11:04:46 +08:00
<style lang="scss">
page {
background-color: #fff;
2024-01-27 16:37:52 +08:00
}
2024-09-15 18:02:40 +08:00
.title{
width: 100%;
height: 100%;
background-color: #fff;
border-radius: 50rpx;
padding: 20rpx;
margin: auto;
}
2024-08-28 11:04:46 +08:00
</style>