123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view class="content">
- <u-field required labelWidth="180" v-model="state.ocrData.name" input-align='right' label="姓名" disabled
- :fieldStyle="fieldStyle">
- </u-field>
- <!-- <u-field required labelWidth="180" v-model="state.ocrData.gender" input-align='right' label="性别"
- :fieldStyle="fieldStyle">
- </u-field> -->
- <u-field required labelWidth="180" v-model="state.ocrData.userCardId" input-align='right' label="身份证号"
- :fieldStyle="fieldStyle" disabled>
- </u-field>
- <!-- <u-field required labelWidth="180" v-model="state.ocrData.add" input-align='right' label="地址"
- :fieldStyle="fieldStyle">
- </u-field> -->
-
- <!-- <u-cell-item required title="证件有效期" :borderBottom="false" @click="timeClick"
- :titleStyle="{fontSize:'28rpx',color:'#777777'}" :valueStyle="{fontSize:'28rpx',color:'#333333'}"
- :value="state.ocrData.type"></u-cell-item> -->
- <u-field required labelWidth="180" :borderTop="true" v-model="state.ocrData.tel" input-align='right'
- label="联系方式" :fieldStyle="fieldStyle" disabled>
- </u-field>
- </view>
-
- <!-- <view class="subBtn">
- <submit-button title="去修改" form-type="submit" @submit="formSubmit">
- </submit-button>
- </view> -->
- </template>
- <script setup lang="ts">
- import {
- reactive
- } from "vue";
- import {
- msg,
- navTo
- } from "@/utils/utils";
- import {
- stringToJson
- } from "@/utils/network/encryption";
- import {
- userInfoQuery
- } from "@/utils/network/api.js";
- import{
- getItem
- } from "@/utils/storage.ts"
- import {
- request
- } from "@/utils/network/request.js";
- const fieldStyle = {
- height: '60rpx',
- color: '#333333',
- fontSize: '28rpx'
- };
- import {onLoad} from"@dcloudio/uni-app"
- const state = reactive({
- ocrData: {
- name:'',
- gender:'',
- userCardId:'',
- add:"",
- tel:''
-
- },
- customerId:''
- })
-
- const getUserinfo = () => {
- const options = {
- type: 2,
- data: {openId: getItem('openId')},
- method: "POST",
- showLoading: true,
- };
- request(userInfoQuery, options).then((res) => {
- const data = stringToJson(res.bizContent);
- console.log(data,"用户信息");
- state.ocrData.name=data.list[0].customerName
- state.ocrData.userCardId=data.list[0].customerIdNum
- state.ocrData.tel=data.list[0].tel
- state.customerId=data.list[0].customerId
- });
- }
-
-
-
- const timeClick = () => {
- msg('证件有效期')
- }
-
- const formSubmit = () => {
- navTo(`/personal-center/setting/personal-information/user-card?customerId=${state.customerId}`)
- };
-
- onLoad(()=>{
- getUserinfo()
- })
- </script>
-
- <style>
- page {
- background-color: #EEF7F7;
- padding-top: 30rpx;
- }
- </style>
-
- <style lang="scss" scoped>
- .content {
- background-color: white;
-
- :deep(.u-cell) {
- padding: 23rpx 32rpx;
- }
-
- ::v-deep .u-flex-1 {
- width: 100%;
- }
- }
-
- .subBtn {
- padding: 500rpx 40rpx 60rpx;
- }
- </style>
|