123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <view>
- <view class="tips">
- <text class="icon"></text>
- <text>为保障资金安全,用户需进行实名认证,请务必认真填写</text>
- </view>
- <view class="main">
- <view class="form">
- <view class="form_group">
- <view class="lable re">姓名</view>
- <input type="text" placeholder="请输入姓名" v-model="item.name" />
- </view>
- <view class="form_group">
- <view class="lable re">身份证</view>
- <input type="text" placeholder="请输入姓名" v-model="item.idCard" />
- </view>
- </view>
- <u-divider text="上传本人二代身份证"></u-divider>
- <view class="r">
- <view class="r50">
- <card v-model="item.p1" text="点击拍摄/上传人像面" icon=""></card>
- </view>
- <view class="r50">
- <card v-model="item.p2" text="点击拍摄/上传国徽面" icon=""></card>
- </view>
- </view>
- <button class="btn" @click="save()">确定</button>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- item: {}
- };
- },
- onLoad() {
-
- },
- methods: {
- save() {
- let rule = [
- { name: 'name', checkType: 'notnull', errorMsg: '请输入姓名' },
- { name: 'idCard', checkType: 'notnull', errorMsg: '请输入身份证' },
- { name: 'p1', checkType: 'notnull', errorMsg: '请上传身份证人面像' },
- { name: 'p2', checkType: 'notnull', errorMsg: '请上传身份证人徽面' }
- ];
- if (!this.verify.check(this.item, rule)) {
- uni.showModal({ content: this.verify.error, showCancel: false });
- return false;
- }
- this.http.request({
- url: '/app/user/authentication',
- data: this.item,
- method: 'POST',
- success: (res) => {
- uni.showModal({
- title: '提示',
- content: '提交成功,等待后台审核。',
- showCancel: false,
- success: (res) => {
- uni.navigateBack();
- }
- });
- }
- });
- }
- }
- };
- </script>
- <style lang="scss">
- .btn {
- margin-top: 30px;
- }
- </style>
|