123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <template>
- <view class="body_content">
- <view class="login_text">
- <view class="login_input flex" style="padding-top: 45rpx;">
- <view class="login_name">姓名</view>
- <view class="login_name"><input class="uni-input" type="text" v-model="username" placeholder="请输入真实姓名" /></view>
- </view>
- <view class="login_input flex">
- <view class="login_name"><text>身份证号</text></view>
- <view class="login_name"><input class="uni-input" type="idcard" v-model="idCard" placeholder="请输入身份证号" /></view>
- </view>
- <view class="login_input flex">
- <view class="login_name"><text>手机号</text></view>
- <view class="login_name"><input class="uni-input" type="number" v-model="phone" placeholder="请输入手机号" /></view>
- </view>
- <view class="login_input flex">
- <view class="login_name"><text>验证码</text></view>
- <view class="login_name flex_item">
- <input style="width: 310rpx;" class="uni-input" type="number" v-model="vcode" placeholder="请输入验证码" />
- <view class="" style="font-size: 26rpx;color: #0C5AFA;">获取验证码</view>
- </view>
- </view>
- </view>
- <view class="uploadText">身份证照片(正反两面)</view>
- <view class="flex upLoadBox">
- <view class="imageBox flex">
- <image src="../../static/img/add.png" style="width: 180rpx;" mode="widthFix"></image>
- <image src="../../static/img/add.png" style="width: 180rpx;" mode="widthFix"></image>
- </view>
- </view>
- <view class="submission">
- <button class="golden" type="golden" hover-class="none" @click="submission">提交认证</button>
- </view>
- </view>
- </view>
- </template>
- <script type="text/javascript">
- // import { show_us,attestation } from '@/api/user.js';
- export default {
- data() {
- return {
- username:'',
- idCard:'',
- phone:'',
- vcode:''
- };
- },
- onLoad() {
- // this.uid = uni.getStorageSync('uid');
- // console.log(uni.getStorageSync('uid'),this.uid)
- // this.loadData();
- },
- methods: {
- //获取数据
- loadData() {
- show_us({
- uid:this.uid
- })
- .then(data => {
- let obj = this;
- obj.list = data.data;
- if(data.data.card == null){
- obj.number = "";
- }else{
- obj.number = data.data.card;
- }
- if(data.data.email == null){
- obj.mail = "";
- }else{
- obj.mail = data.data.email;
- }
- if( data.data.name == null){
- obj.username = '';
- }else{
- obj.username = data.data.name;
- }
-
- })
- .catch(err => {
- console.log(err);
- });
- },
- // 提交
- submission() {
- if (this.mail == '') {
- this.$api.msg('请输入电子邮箱');
- return;
- }
- if (this.username == '') {
- this.$api.msg('请输入真实姓名');
- return;
- }
- if (this.number == '') {
- this.$api.msg('请输入身份证号');
- return;
- }
- attestation({
- uid:this.uid,
- email: this.mail,
- name: this.username,
- card: this.number,
- })
- .then(function(e) {
- uni.showToast({
- title: e.message,
- duration: 1500,
- mask: false,
- icon: 'none'
- });
- })
- .catch(function(e) {
- console.log(e);
- });
- },
- //下拉刷新
- onPullDownRefresh() {
- let obj = this;
- //监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
- setTimeout(function() {
- obj.loadData();
- uni.stopPullDownRefresh(); //停止下拉刷新动画
- }, 1000);
- }
- }
- };
- </script>
- <style lang="scss">
- .login_text {
- width: 100%;
- // padding: 25rpx 0rpx;
- font-size: 28rpx !important;
- padding: 0rpx 25rpx;
- }
- .login_input {
- border-bottom: 1px solid #464755;
- padding: 35rpx;
- }
- .uploadText{
- padding: 47rpx 40rpx;
- color: #ffffff;
-
- }
- .imageBox{
- width: 100%;
- padding: 50rpx 15%;
- }
- .uni-input{
- width:450rpx;
- text-align: left !important;
- font-size: 26rpx;
- }
- .width {
- width: 265rpx !important;
- }
- .code {
- color: #EEC680;
- font-size: 23rpx;
- border-left: 1px solid #85858E;
- padding-left: 25rpx;
- }
- .submission{
- padding: 80rpx 25rpx;
- .golden{
- background: #0C5AFA;
- color: #ffffff;
- }
- }
- .login_name {
- color: #ffffff;
- }
- </style>
|