bind_card.vue
2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<template>
<view style="background-color: #f5f5f5; height: 100vh;">
<view class="title_bg" :style="'padding-top:' + (common.statusBarH + 10)+ 'px; '">
<image style="width: 40rpx; height: 40rpx;" src='../../static/common/icon_back.png' @click="onBack()">
</image>
<text style="color: white; font-size: 36rpx; font-weight: 700; margin-left: 15rpx;">绑定身份证</text>
<image style="width: 40rpx; height: 40rpx;">
</image>
</view>
<view :style="'height: ' + titleHeight + 'px'"></view>
<view style="font-size: 32rpx; color: #393939; padding: 20rpx; margin-bottom: 3rpx; background-color: white;">
<text>用于实名认证,修改个人信息.非常非常重要。</text>
</view>
<view class="item">
<text class="text1">姓 名:</text>
<view class="input-class">
<input placeholder="请填写真实姓名"/>
</view>
</view>
<view class="item">
<text class="text1">身份证:</text>
<view class="input-class" >
<input type="idcard" :value="idCard" placeholder="请填写身份证号" />
</view>
</view>
<button :class="userInfo.IdCard ? 'un-button-class' : 'button-class'">{{userInfo.IdCard ? "无法修改" : "修改"}}</button>
</view>
</template>
<script>
import common from '@/utils/common.js'
import loginHelper from "../../utils/loginHelper.js"
export default {
data() {
return {
titleHeight: 60,
common,
idCard: "",
userInfo: {}
}
},
onReady() {
var this_ = this
uni.createSelectorQuery()
.in(this)
.select('.title_bg')
.boundingClientRect((rect) => {
if (rect) {
this_.titleHeight = rect.height
console.log("rect.height:" + rect.height)
}
})
.exec();
this.userInfo = loginHelper.getUserInfo()
this.idCard = this.userInfo.IdCard
},
methods: {
}
}
</script>
<style>
.title_bg {
background: linear-gradient(90deg, #FF6F38 0%, #FFA04B 100%);
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 24rpx;
padding-right: 24rpx;
padding-bottom: 20rpx;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
}
.item {
display: flex;
align-items: center;
padding: 20rpx;
background-color: white;
}
.text1 {
color: #393939;
font-size: 32rpx;
}
.input-class {
border: 2px solid #F39801;
border-radius: 6rpx;
background-color: white;
flex: 1;
padding: 15rpx;
}
.button-class {
margin: 30rpx;
background-color: #F39801;
}
.un-button-class {
margin: 30rpx;
background-color: #7a7a7a;
}
</style>