real-name-certification.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!-- 实名认证 -->
  2. <template>
  3. <view class="wrap">
  4. <view class="label">请上传身份证正反面</view>
  5. <view class="module-wrap">
  6. <view class="module">
  7. <view class="left-sidebar">
  8. <text>头像面</text>
  9. <text>上传您的身份证头像面</text>
  10. </view>
  11. <view class="right-sidebar" @tap="uploadImg('imgA')">
  12. <image v-if="imgA.length === 0" src="../../../static/add-2.png" class="add-img" mode=""></image>
  13. <image v-else :src="imgA" mode="" class="add-img"></image>
  14. </view>
  15. </view>
  16. <view class="module">
  17. <view class="left-sidebar">
  18. <text>国徽面</text>
  19. <text>上传您的身份证国徽面</text>
  20. </view>
  21. <view class="right-sidebar" @tap="uploadImg('imgB')">
  22. <image v-if="imgB.length === 0" src="../../../static/add-1.png" class="add-img" mode=""></image>
  23. <image v-else :src="imgB" mode="" class="add-img"></image>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="label">请完善您的个人信息</view>
  28. <view class="column">
  29. <view class="row">
  30. <text class="row-name">真实姓名</text>
  31. <input type="text" value="" class="input" placeholder="请输入姓名" placeholder-class="placeholder" />
  32. </view>
  33. <view class="row">
  34. <text class="row-name">身份证号</text>
  35. <input type="text" value="" class="input" placeholder="请输入身份证号" placeholder-class="placeholder" />
  36. </view>
  37. </view>
  38. <view class="btn-box">
  39. <button type="default" class="active">认证</button>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. imgA: '',
  48. imgB: '',
  49. }
  50. },
  51. methods: {
  52. uploadImg() {
  53. uni.chooseImage({
  54. count: 1, //默认9
  55. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  56. sourceType: ['album'], //从相册选择
  57. success: res => {
  58. this.imgA = res.tempFilePaths
  59. this.imgB = res.tempFilePaths
  60. console.log(JSON.stringify(res.tempFilePaths));
  61. }
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. @import "./real-name-certification.css";
  69. </style>