123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <template>
- <view style="padding: 20rpx;font-size: 30rpx;">
- <view class="tit">姓名</view>
- <input class="srk" placeholder="请输入姓名" v-model="data.realname" />
-
- <view class="tit">身份证号</view>
- <input class="srk" placeholder="请输入身份证号" v-model="data.idcard" />
-
- <button type="warn" style="margin-top: 40rpx;background: #f3a511;font-size: 30rpx;" @click="onClick_1">提交认证</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- constants: {},
- noimg:"/static/lanhu_record/ps3lynngrkw77ya7zb5jydv23q6xcffyj53c6fe453-54c4-4078-b021-8c1b292a08c2.png",
- data: {
- uid: '0',
- realname: '',
- idcard: '',
- idcardimg1: '',
- idcardimg2: '',
- },
- userinfo: null
- };
- },
- onShow() {
- var user = this.$api.getUserinfo();
- if (user) {
- this.userinfo = user;
- this.data.uid=this.userinfo.id;
- this.data.realname=this.userinfo.xm;
- this.data.idcard=this.userinfo.sfz;
- this.data.idcardimg1=this.userinfo.idcardimg1;
- this.data.idcardimg2=this.userinfo.idcardimg2;
- } else {
- this.userinfo = null;
- }
- },
- methods: {
- onClick_1() {
- var data = new Object();
- data.uid=this.data.uid;
- data.xm=this.data.realname;
- data.sfz=this.data.idcard;
- // console.log(this.userinfo.sfz);
- if(data.uid=="0"){
- uni.showToast({
- title: "请重新登录",
- icon: 'none'
- });
- uni.switchTab({
- url:"/pages/my/index"
- })
- return;
- }
- this.$api
- .MhPostModel(data, 'user/shiming')
- .then(res => {
- // console.log('MhUserRenzheng信息', JSON.stringify(res));
- if (res.data.code != 1) {
- uni.showModal({
- title: '提示',
- content: res.data.msg,
- showCancel:false,
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- this.getCode();
- return;
- } else {
- uni.showModal({
- title: '提示',
- content: res.data.msg,
- showCancel:false,
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- })
- .catch(err => {
- // console.log('request fail', JSON.stringify(err));
- });
- }
- }
- };
- </script>
- <style lang='css'>
- @import '../common/common.css';
- @import './assets/style/index.rpx.css';
- page {
- padding: 15rpx;
- background: #98a737;
- background-attachment: fixed !important;
- background-repeat: no-repeat !important;
- }
- .srk {
- color: #000;
- height: 60rpx;
- line-height: 60rpx;
- background: #fff;
- border-radius: 10rpx;
- padding-left: 20rpx;
- font-size: 30rpx;
- }
- .tit {
- color: #fff;
- height: 60rpx;
- line-height: 60rpx;
- margin-top: 10rpx;
- }
- </style>
|