1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <template>
- <view class="container">
- <view class="prompt-item">
- 法律规定骑行电单车须满16周岁,请先进行实名认证,信息仅用于平台审核绝不泄露,请放心填写。
- </view>
- <view class="center-item">
- <view class="item-title">姓名</view>
- <view class="item-text">
- <input type="text" placeholder="请输入您的真实姓名" @blur="inputUserName">
- </view>
- <view class="item-title">身份证号</view>
- <view class="item-text">
- <input type="text" placeholder="请输入您的身份证号" @blur="inputCardNo">
- </view>
- </view>
- <view @tap="bindAuthentication" class="authentication-btn">
- 立即认证
- </view>
- </view>
- </template>
- <script>
- import { login } from '../../common/user.js';
- var config = require('../../common/config.js');
- var http = require('../../common/http.js');
- var common = require('../../common/common.js');
- var storage = require('../../common/storage.js')
- export default {
- data() {
- return {
- face_token: '',
- face_key: '',
- user_name: '',
- card_no: '',
- };
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function(options) {
- this.loadFaceToken()
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {
-
- },
- methods: {
- loadFaceToken() {
- http.postApi(config.API_USER_FACE_TOKEN,{},(resp) => {
- if (resp.data.code === 200) {
- this.face_token = resp.data.data.token
- this.face_key = resp.data.data.key
-
- } else{
- common.simpleToast(resp.data.msg)
- }
- })
- },
-
- inputUserName: function (e) {
- this.user_name = e.detail.value
- },
-
- inputCardNo: function (e) {
- this.card_no = e.detail.value
- },
-
-
- bindAuthentication() {
- if (common.isEmpty(this.user_name)) {
- common.simpleToast('请输入您的姓名')
- return
- }
- if (common.isEmpty(this.card_no)) {
- common.simpleToast('请输入您的身份证号')
- return
- }
- uni.navigateTo({
- url: '/pages/livenessView/livenessView?face_token=' + this.face_token + '&face_key=' + this.face_key,
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- }
- };
- </script>
- <style>
- @import './authIdentity.css';
- </style>
|