blob: 5bb6dacb269bab7af7c02706b00d2bf63e57476b [file] [log] [blame]
guangchao.xu070005a2020-12-07 09:56:40 +08001<template>
2 <view class="activateCard">
3 <view class="activateCard-list">
4 <u-field v-model="name" label="姓名" placeholder="请输入真实姓名" clear-size="40"></u-field>
5 <u-field v-model="tel" label="电话" placeholder="请填写联系电话" clear-size="40"></u-field>
6 <u-field v-model="address" label="地址" placeholder="请填写地址" clear-size="40"></u-field>
7 </view>
8 <view class="activateCard-getId">
9 <text class="activateCard-getId-title">身份证上传</text>
10 <view class="activateCard-getId-photo">
11 <u-upload ref="uUpload" @on-uploaded="onUploaded" :action="action" :auto-upload="false" max-count="1" :custom-btn="true">
12 <view slot="addBtn" class="slot-btn">
guangchao.xu6cdd45e2021-04-16 17:44:30 +080013 <u-image src="/images/activateCard/photo.png" width="100%" height="100%" mode="aspectFit"></u-image>
guangchao.xu070005a2020-12-07 09:56:40 +080014 </view>
15 </u-upload>
16 <u-upload ref="uUpload" @on-uploaded="onUploaded" :action="action" :auto-upload="false" max-count="1" :custom-btn="true">
17 <view slot="addBtn" class="slot-btn">
guangchao.xu6cdd45e2021-04-16 17:44:30 +080018 <u-image src="/images/activateCard/photo1.png" width="100%" height="100%" mode="aspectFit"></u-image>
guangchao.xu070005a2020-12-07 09:56:40 +080019 </view>
20 </u-upload>
21 </view>
22 </view>
23 <view class="activateCard-getId">
24 <text class="activateCard-getId-title">其他证件上传</text>
25 <view class="activateCard-getId-photo">
26 <u-upload ref="uUpload" @on-uploaded="onUploaded" :action="action" :auto-upload="false" max-count="1" :custom-btn="true">
27 <view slot="addBtn" class="slot-btn">
guangchao.xu6cdd45e2021-04-16 17:44:30 +080028 <u-image src="/images/activateCard/photo2.png" width="100%" height="100%" mode="aspectFit"></u-image>
guangchao.xu070005a2020-12-07 09:56:40 +080029 </view>
30 </u-upload>
31 <u-upload ref="uUpload" @on-uploaded="onUploaded" :action="action" :auto-upload="false" max-count="1" :custom-btn="true">
32 <view slot="addBtn" class="slot-btn">
guangchao.xu6cdd45e2021-04-16 17:44:30 +080033 <u-image src="/images/activateCard/photo2.png" width="100%" height="100%" mode="aspectFit"></u-image>
guangchao.xu070005a2020-12-07 09:56:40 +080034 </view>
35 </u-upload>
36 </view>
37 </view>
38 <view class="activateCard-footer">
39 <text>规则说明:</text>
40 <text>若是外来居民,则需要上传居住证;</text>
41 <text>若是申请普通卡,则需要上传身份证;</text>
42 <text>若是申请学生卡,则需要上传身份证、学生证、户口本;</text>
43 <text>若是申请爱心卡,则需要上传身份证、低保证;</text>
44 <text>若是申请老年卡,则需要上传身份证、老年优待证。</text>
45 </view>
46 <u-button :custom-style="activateCardBtn" @click="submit">提交</u-button>
47 </view>
48</template>
49
50<script>
51 export default {
52 data() {
53 return {
54 name: "",
55 tel: "",
56 address: "",
57 filesArr: [],
58 action: "http://www.example.com/upload",
59 activateCardBtn: {
60 width: '600rpx',
61 backgroundColor: '#2FA8E1',
62 color: '#FFFFFF',
63 fontFamily: "PingFang-SC-Medium",
64 fontSize: '30rpx',
65 marginTop: '30rpx',
66 padding: '50rpx 0'
67 }
68
69 }
70 },
71 methods: {
72 onUploaded(lists) {
73 this.filesArr = lists;
74 },
75 submit() {
76 this.$refs.uUpload.upload();
77 },
78 submit(){
79 uni.showToast({
80 title:"app开卡功能尚未开启",
81 icon:'none',
82 duration:1500
83 })
84 }
85 }
86 }
87</script>
88
89<style scoped lang="scss">
90 .slot-btn {
91 width: 350rpx;
92 height: 300rpx;
93 }
94
95 .activateCard {
96 width: 100vw;
97 // height: 100vh;
98 background-color: #F3F3F3;
99 overflow: hidden;
100 padding-bottom: 30rpx;
101
102 &-list {
103 margin-top: 30rpx;
104 background-color: #FFFFFF;
105 }
106
107 &-getId {
108 width: 720rpx;
109 margin: 30rpx auto 0;
110 background-color: #FFFFFF;
111 border-radius: 10rpx;
112 padding: 30rpx 10rpx;
113
114 &-title {
115 font-family: "PingFang-SC-Medium";
116 font-size: 30rpx;
117 }
118
119 &-photo {
120 display: flex;
121 justify-content: space-between;
122 margin-top: 30rpx;
123 }
124 }
125
126 &-footer {
127 // margin-top: 30rpx;
128 padding: 30rpx;
129 display: flex;
130 flex-direction: column;
131 font-family: "PingFang-SC-Medium";
132 font-size: 26rpx;
133
134 text {
135 &:nth-child(1) {
136 font-size: 30rpx;
137 margin-bottom: 10rpx;
138 }
139 }
140 }
141
142 &-btn {
143 width: 600rpx;
144 background-color: #2FA8E1;
145 color: #FFFFFF;
146 font-family: "PingFang-SC-Medium";
147 font-size: 30rpx;
148 margin-top: 30rpx;
149 padding: 50rpx 0;
150 }
151 }
152</style>