buyersRelease.vue
7.9 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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<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="pleaseSelect flexC" @click="showpicker">
请选择 <image src="/static/ic-arrow-more@2x.png" mode=""></image>
</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>
<!-- 选择器组件 -->
<pxingPicker ref='pickerName' :deepLength='deepLength' :chooseList='chooseList'
:defaultChooseList='defaultChooseList' @confirm='confirm'></pxingPicker>
<!-- 发布按钮 -->
<view class="releaseBtn flexC" @click="toBuyersReleased">
发布
</view>
</view>
</template>
<script>
import pxingPicker from '@/heYang/pxing-picker/pxing-picker.vue';
export default {
components: {
pxingPicker
},
data() {
return {
deepLength: 0,
chooseList: [],
defaultChooseList: [],
areaList: [],
status:1,
time:60,
monitorTime:null,
}
},
onLoad() {
this.setData();
},
methods: {
// 发送验证码请求
sendOut(){
this.monitorTime = setInterval(()=>{
this.time = this.time-1
console.log(this.time)
},1000)
},
//发布页
toBuyersReleased(){
// console.log('1')
uni.navigateTo({
url:`/pages/index/buyersReleased?status=${this.status}`
})
},
setData(){
// var tempone = [
// {value:1,label:'苹果'},
// {value:2,label:'香蕉'},
// {value:3,label:'梨子'},
// {value:4,label:'菠萝'}
// ];
// var defaultone = [0];
// var lenone = 1;
var temptwo = [
{
value:1,
label:'农作物',
children:[
{value:11,label:'大豆'},
{value:12,label:'麦子'},
{value:12,label:'水稻'},
{value:12,label:'玉米'},
{value:12,label:'土豆'},
{value:12,label:'西米'}
]
},
{
value:2,
label:'水果',
children:[
{value:21,label:'葡萄'},
{value:22,label:'榴莲'},
{value:22,label:'西瓜'},
{value:22,label:'冬瓜'},
{value:22,label:'南瓜'},
{value:22,label:'猕猴桃'}
]
}
]
var defaulttwo = [0,0];
var lentwo = 2;
// var tempthree = [
// {
// value:1,
// label:'江苏省',
// children:[
// {
// value:11,
// label:'南京市',
// children:[
// {value:111,label:'江宁区'},
// {value:112,label:'浦口区'}
// ]
// },
// {
// value:12,
// label:'扬州市',
// children:[
// {value:121,label:'邗江区'},
// {value:122,label:'仪征市'}
// ]
// }
// ]
// },
// {
// value:2,
// label:'安徽省',
// children:[
// {
// value:21,
// label:'合肥市',
// children:[
// {value:211,label:'庐阳区'},
// {value:212,label:'瑶海区'}
// ]
// },
// {
// value:22,
// label:'芜湖市',
// children:[
// {value:221,label:'镜湖区'},
// {value:222,label:'弋江区'}
// ]
// }
// ]
// }
// ]
var defaultthree = [0,0,0];
var lenthree = 3;
var tempfour = [
{
value:1,
label:'type_A',
children:[
{
value:11,
label:'type_A_a',
children:[
{
value:111,
label:'type_A_a_1',
children:[
{value:1111,label:'tAa1_a'},
{value:1112,label:'tAa1_b'},
{value:1113,label:'tAa1_c'}
]
},
{
value:112,
label:'type_A_a_2',
children:[
{value:1121,label:'tAa2_a'},
{value:1122,label:'tAa2_b'},
{value:1123,label:'tAa2_c'}
]
},
{
value:113,
label:'type_A_a_3',
children:[
{value:1131,label:'tAa3_a'},
{value:1132,label:'tAa3_b'},
{value:1133,label:'tAa3_c'}
]
}
]
},
{
value:21,
label:'type_A_b',
children:[
{
value:211,
label:'type_A_b_1',
children:[
{value:2111,label:'tAb1_a'},
{value:2112,label:'tAb1_b'},
{value:2113,label:'tAb1_c'}
]
},
{
value:212,
label:'type_A_b_2',
children:[
{value:2121,label:'tAb2_a'},
{value:2122,label:'tAb2_b'},
{value:2123,label:'tAb2_c'}
]
}
]
}
]
},
{
value:2,
label:'type_B',
children:[
{
value:21,
label:'type_B_a',
children:[
{
value:211,
label:'type_B_a_1',
children:[
{value:2111,label:'tBa1_a'},
{value:2112,label:'tBa1_b'},
{value:2113,label:'tBa1_c'}
]
},
{
value:212,
label:'type_B_a_2',
children:[
{value:2121,label:'tBa2_a'},
{value:2122,label:'tBa2_b'},
{value:2123,label:'tBa2_c'}
]
},
{
value:213,
label:'type_B_a_3',
children:[
{value:2131,label:'tBa3_a'},
{value:2132,label:'tBa3_b'},
{value:2133,label:'tBa3_c'}
]
}
]
}
]
}
];
var defaultfour = [0,0,0,0];
var lenfour = 4;
this.chooseList = temptwo;
this.defaultChooseList = defaulttwo;
this.deepLength = lentwo;
},
showpicker() {
this.$refs.pickerName.show();
},
confirm(e) {
console.log(e)
this.select = e[this.deepLength - 1].label;
}
},
watch:{
time(oldTime,newTime){
if(newTime==1){
clearInterval(this.monitorTime)
this.time = 60
}
}
}
}
</script>
<style lang="scss">
.box {
width: 750rpx;
height: 104rpx;
opacity: 1;
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;
}
.pleaseSelect {
color: rgba(0, 0, 0, 0.4);
font-size: 28rpx;
image {
width: 16rpx;
height: 32rpx;
margin-left: 4rpx;
}
}
.quantity {
display: flex;
.enterQuantity {
input {
width: 144rpx;
color: rgba(0, 0, 0, 0.4);
font-size: 28rpx;
}
}
.company {
color: rgba(0, 0, 0, 0.9);
font-size: 28rpx;
margin-left: 16rpx;
}
img {
width: 16rpx;
height: 24rpx;
}
}
.zhujian {
height: 200rpx;
width: 100%;
// background-color: red;
margin-top: 300rpx;
}
.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>