You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

user-change.vue 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view class="content">
  3. <u-field required labelWidth="180" v-model="state.ocrData.conmpany" input-align='right' label="姓名" disabled=true
  4. :fieldStyle="fieldStyle">
  5. </u-field>
  6. <u-field required labelWidth="180" v-model="state.ocrData.type" input-align='right' label="性别"
  7. :fieldStyle="fieldStyle">
  8. </u-field>
  9. <u-field required labelWidth="180" v-model="state.ocrData.card" input-align='right' label="身份证号"
  10. :fieldStyle="fieldStyle">
  11. </u-field>
  12. <u-field required labelWidth="180" v-model="state.ocrData.type" input-align='right' label="地址"
  13. :fieldStyle="fieldStyle">
  14. </u-field>
  15. <u-cell-item required title="证件有效期" :borderBottom="false" @click="timeClick"
  16. :titleStyle="{fontSize:'28rpx',color:'#777777'}" :valueStyle="{fontSize:'28rpx',color:'#333333'}"
  17. :value="state.ocrData.type"></u-cell-item>
  18. <u-field required labelWidth="180" :borderTop="true" v-model="state.ocrData.type" input-align='right'
  19. label="联系方式" :fieldStyle="fieldStyle">
  20. </u-field>
  21. </view>
  22. <view class="subBtn">
  23. <submit-button title="提交绑定" form-type="submit" @submit="formSubmit">
  24. </submit-button>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import {
  29. reactive
  30. } from "vue";
  31. import {
  32. msg
  33. } from "@/utils/utils";
  34. import {
  35. stringToJson
  36. } from "@/utils/network/encryption";
  37. import {
  38. } from "@/utils/network/api.js";
  39. import {
  40. request
  41. } from "@/utils/network/request.js";
  42. const fieldStyle = {
  43. height: '60rpx',
  44. color: '#333333',
  45. fontSize: '28rpx'
  46. };
  47. const state = reactive({
  48. ocrData: {
  49. // 'conmpany': '贵州市空间加快速度公司',
  50. // 'type': '企业营业执照',
  51. // 'card': 'GZ2364174132894'
  52. },
  53. buchongData: {
  54. 'conmpany': '李某一',
  55. 'type': '居民身份证',
  56. 'card': '23728347626342332',
  57. 'phone': ''
  58. },
  59. })
  60. var data = {
  61. // openId: getItem(StorageKeys.OpenId),
  62. };
  63. const options = {
  64. type: 2,
  65. data: data,
  66. method: "POST",
  67. showLoading: true,
  68. };
  69. request(151, options).then((res) => {
  70. state.addressArray = []
  71. const data = stringToJson(res.bizContent);
  72. if (data.data == null) {
  73. console.log("这是空");
  74. state.addressArray = []
  75. } else {
  76. state.addressArray = data.data;
  77. console.log(state.addressArray, "列表数组");
  78. }
  79. });
  80. const timeClick = () => {
  81. msg('证件有效期')
  82. }
  83. const formSubmit = () => {
  84. msg('提交绑定')
  85. };
  86. </script>
  87. <style>
  88. page {
  89. background-color: #EEF7F7;
  90. padding-top: 30rpx;
  91. }
  92. </style>
  93. <style lang="scss" scoped>
  94. .content {
  95. background-color: white;
  96. :deep(.u-cell) {
  97. padding: 23rpx 32rpx;
  98. }
  99. ::v-deep .u-flex-1 {
  100. width: 100%;
  101. }
  102. }
  103. .subBtn {
  104. padding: 500rpx 40rpx 60rpx;
  105. }
  106. </style>