index.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="rzbox">
  3. <view class="f15 co23 fw5 mb24">请使用注册人身份证</view>
  4. <view class="flexcj mb20">
  5. <view class="carbox">
  6. <image :src="cardz" class="img" @click="getaddImage"></image>
  7. <view class="tit">拍摄正面</view>
  8. <!-- <view class="tit">身份证正面</view> -->
  9. </view>
  10. <view class="carbox">
  11. <image :src="cardf" class="img"></image>
  12. <view class="tit">拍摄反面</view>
  13. <!-- <view class="tit">身份证反面</view> -->
  14. </view>
  15. </view>
  16. <view class="mb28">
  17. <view class="cardtip">身份信息会跟进上传的证件照片自动识别,支持手动输入</view>
  18. <view class="cardtip">如果识别错误,可尝试再次拍照</view>
  19. </view>
  20. <!-- 身份信息 -->
  21. <uni-forms ref="form" :model="user">
  22. <uni-forms-item label="真实姓名" name="nickName">
  23. <uni-easyinput v-model="user.email" :inputBorder='false' placeholder="自动识别" />
  24. </uni-forms-item>
  25. <uni-forms-item label="身份证号" name="phonenumber">
  26. <uni-easyinput v-model="user.email" :inputBorder='false' placeholder="自动识别" />
  27. </uni-forms-item>
  28. <uni-forms-item label="证件有效期" name="email">
  29. <uni-easyinput v-model="user.email" :inputBorder='false' placeholder="自动识别" />
  30. </uni-forms-item>
  31. <uni-forms-item label="居住地址" name="email">
  32. <uni-easyinput type="textarea" :autoHeight="true" v-model="user.email" :inputBorder='false' placeholder="自动识别" />
  33. </uni-forms-item>
  34. <uni-forms-item label="手机号码" name="email">
  35. <uni-easyinput v-model="user.email" :inputBorder='false' placeholder="请输入手机号码,以便接收短信" />
  36. </uni-forms-item>
  37. </uni-forms>
  38. <view class="formtip">* 请确保填写的信息准确无误</view>
  39. <view class="rzbtn mt38" @click="getNext">下一步</view>
  40. </view>
  41. </template>
  42. <script>
  43. import config from '@/config'
  44. const baseUrl = config.baseUrl
  45. import {uploadmore} from '@/utils/common.js'
  46. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  47. export default{
  48. components:{},
  49. data(){
  50. return{
  51. cardz:require('@/work/static/images/prove/cardz.png'),
  52. cardf:require('@/work/static/images/prove/cardf.png'),
  53. faceimg:require('@/work/static/images/prove/faceimg.png'),
  54. ftipa:require('@/work/static/images/prove/ftipa.png'),
  55. ftipb:require('@/work/static/images/prove/ftipb.png'),
  56. ftipc:require('@/work/static/images/prove/ftipc.png'),
  57. count:1,
  58. file:[],
  59. user:{
  60. }
  61. }
  62. },
  63. methods:{
  64. checkPermi, checkRole,
  65. getNext(){
  66. this.$tab.navigateTo("/work/pages/prove/face")
  67. },
  68. getaddImage(e){
  69. let that = this;
  70. let file =[],count=9
  71. // if(e=='zj'){
  72. // file = that.zjfile;
  73. // count=9
  74. // }else{
  75. // file = that.mjfile;
  76. // count=9
  77. // }
  78. uni.chooseImage({
  79. count: 1,
  80. success:function(res){
  81. let img= res.tempFilePaths;
  82. if(img.length + file.length > count){
  83. uni.showToast({
  84. title: '最多上传'+count+'张图片',
  85. icon: 'none',
  86. duration: 2000
  87. })
  88. }else{
  89. let imglen = res.tempFilePaths.length;
  90. var fuwufile = [];
  91. uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  92. if(e=='zj'){
  93. that.zjfile = that.zjfile.concat(rs);
  94. that.datainfo.identificationPhoto=that.zjfile.join(',')
  95. }
  96. })
  97. }
  98. }
  99. });
  100. },
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. page{
  106. background:#ffffff;
  107. }
  108. .rzbox /deep/ .uni-forms-item{min-height: 116rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:22rpx 0;}
  109. .rzbox /deep/ .uni-forms-item__label{font-weight: bold;font-size: 30rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
  110. .rzbox /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 30rpx;color: #222327;}
  111. .rzbox /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 30rpx;}
  112. .rzbox /deep/ .uni-easyinput__placeholder-class{font-size: 30rpx;color: #AAAAAA;}
  113. .rzbox /deep/ .uni-input-input{font-size: 30rpx;}
  114. .rzbox /deep/ .uni-textarea-textarea{font-size: 30rpx;}
  115. .rzbox{padding: 44rpx 34rpx 76rpx;
  116. .carbox{width: 320rpx;border-radius: 14rpx;overflow: hidden;
  117. .img{width: 320rpx;height: 216rpx;}
  118. .tit{width: 100%;height: 60rpx;background: #A0C6D5;text-align: center;font-weight: 500;
  119. font-size: 26rpx;line-height: 60rpx;
  120. color: #FFFFFF;}
  121. }
  122. .cardtip{font-weight: 500;font-size: 24rpx;color: #999999;line-height: 40rpx;}
  123. .inttxet{font-weight: 500;font-size: 30rpx;flex: 1;text-align: right;color: #222327;}
  124. .formtip{font-weight: 500;font-size: 24rpx;color: #FF6969;margin-top: 40rpx;text-align: right;}
  125. .rzbtn{width: 100%;background: #00A9F0;border-radius:10rpx;height: 100rpx;display: flex;align-items: center;justify-content: center;font-weight: bold;font-size: 30rpx;color: #FFFFFF;}
  126. }
  127. </style>