landRelease.vue
5.5 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<template>
<view class="">
<!-- 手机号 -->
<view class="box flexJ">
<view class="left">
手机号码
</view>
<view class="right">
<input type="text" placeholder="请输入11位手机号码" maxlength="11">
</view>
</view>
<!-- 验证码 -->
<view class="box flexJ">
<view class="left">
验证码
</view>
<view class="getVerification flexC" @click="sendOut">
{{time==60?'获取验证码':`${time}秒后获取`}}
</view>
</view>
<!-- 土地详细地址 -->
<view class="box flexJ">
<view class="left">
土地详细地址
</view>
<view class="right">
<input type="text" placeholder="请输入详细地址">
</view>
</view>
<!-- 土地面积 -->
<view class="box flexJ">
<view class="left">
土地面积
</view>
<view class="quantity flexC">
<view class="enterQuantity"><input type="text" placeholder="请输入土地面积"></view>
<view class="company">单位</view>
<img src="/static/dropDown.png" alt="">
</view>
</view>
<!-- 土地描述 -->
<view class="describe">
<view class="title">
土地描述
</view>
<u--textarea height=112 v-model="value2" placeholder="请输入内容" count maxlength=200 border='none'>
</u--textarea>
</view>
<!-- 上传图品 -->
<view class="uploadPictures">
<view class="titleOne">
上传图品
</view>
<view class="">
<!-- maxCount规定上传图片数量,超出数量隐藏上传按钮 -->
<u-upload :fileList="fileList3" @afterRead="afterRead" @delete="deletePic" name="3" multiple
:maxCount="5" :previewFullImage="true"></u-upload>
</view>
<view class="position flexA" @click="openMap">
<img src="/static/loc.png" alt="">
<view class="flexC">天津市西青区鑫茂科技园C1</view>
</view>
</view>
<!-- 空盒子 -->
<view class="nullBox"></view>
<!-- 发布按钮 -->
<view class="releaseBtn flexC" @click="toBuyersReleased">
发布
</view>
</view>
</template>
<script>
export default {
data() {
return {
value2: '请填写您的土地信息,土地附近是否有水源,土地目前的状态(在用 未用),交通是否便利,地上物信息(是否有房屋、大棚、其他作物等)请填写您的土地信息,土地附近是否有水源,土地目前的状态(在用、未用),交通是否便利,地上物信息(是否有房屋、大棚其他作物等)',
fileList3: [{
url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
}],
time:60,
monitorTime:null,
}
},
onLoad() {
},
methods: {
// 跳转到
toBuyersReleased(){
uni.navigateTo({
url:``
})
},
// 打开地图
openMap(){
uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function(res) {
console.log(res)
const latitude = res.latitude;
const longitude = res.longitude;
// sconsole.log(11)
uni.openLocation({
latitude: latitude,
longitude: longitude,
success: function() {
console.log('success');
},
fail: function() {
console.log('fail');
}
});
},
fail(err) {
console.log('获取经纬度失败1', err);
}
});
},
// 发送验证码请求
sendOut(){
this.monitorTime = setInterval(()=>{
this.time = this.time-1
console.log(this.time)
},1000)
},
},
watch:{
time(oldTime,newTime){
if(newTime==1){
clearInterval(this.monitorTime)
this.time = 60
}
}
}
}
</script>
<style lang="scss">
.box {
width: 750rpx;
height: 104rpx;
border-bottom: solid #F2F2F2;
// border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);
padding: 0rpx 32rpx;
box-sizing: border-box;
.left {
color: rgba(0, 0, 0, 0.9);
font-size: 28rpx;
letter-spacing: 1rpx;
}
.right {
input {
color: rgba(0, 0, 0, 0.4);
font-size: 28rpx;
text-align: right;
}
}
}
.getVerification {
width: 144rpx;
height: 56rpx;
border-radius: 12rpx;
background: rgba(98, 205, 206, 1);
color: rgba(255, 255, 255, 1);
font-size: 24rpx;
font-weight: 700;
}
.quantity {
display: flex;
.enterQuantity {
input {
color: rgba(0, 0, 0, 0.4);
font-size: 28rpx;
text-align: right;
}
}
.company {
color: rgba(0, 0, 0, 0.9);
font-size: 28rpx;
margin-left: 16rpx;
margin-right: 4rpx;
}
img {
width: 16rpx;
height: 24rpx;
}
}
.describe {
height: 386rpx;
padding: 32rpx 32rpx 0rpx;
background: rgba(255, 255, 255, 1);
border-bottom: solid #F2F2F2;
.title {
color: rgba(0, 0, 0, 0.9);
font-size: 28rpx;
margin-bottom: 16rpx;
}
}
.uploadPictures {
border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);
padding: 32rpx 32rpx 32rpx;
background: rgba(255, 255, 255, 1);
.titleOne {
color: rgba(0, 0, 0, 0.9);
font-size: 28rpx;
margin-bottom: 24rpx;
}
}
.position {
margin-top: 24rpx;
img {
width: 40rpx;
height: 40rpx;
margin-right: 8rpx;
}
:nth-child(2) {
color: rgba(33, 83, 212, 1);
font-size: 28rpx;
}
}
.nullBox {
width: 100%;
height: 100rpx;
background-color: #F5F7FB;
}
.releaseBtn {
position: fixed;
left: 32rpx;
bottom: 46rpx;
width: 686rpx;
height: 88rpx;
border-radius: 28rpx;
color: rgba(255, 255, 255, 1);
font-size: 32rpx;
font-weight: 700;
background: linear-gradient(90deg, rgba(25, 204, 205, 1) 0%, rgba(99, 217, 218, 1) 100%);
}
</style>