index.vue 13.2 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 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610
<template>
	<view class="">
		<view class="head" style="font-weight:700">
			<u-navbar title="首页" :autoBack="true" leftIconSize="0rpx">
			</u-navbar>
		</view>
		<view class="main">
			<!-- 轮播图 -->
			<view class="swiper" @click="tologin">
				<u-swiper :list="list5" @change="e => current = e.current" height="320rpx" radius="24rpx">
					<view slot="indicator" class="indicator">
						<view class="indicator__dot" v-for="(item, index) in list5" :key="index"
							:class="[index === current && 'indicator__dot--active']">
						</view>
					</view>
				</u-swiper>
			</view>
			<view class="mainList">
				<view class="listName">
					生物质列表
				</view>
				<view class="">
					<u-tabs @click="switchTAb" :list="list1"
						:activeStyle="{color: 'rgba(0,0,0,0.9)', fontWeight: 'bold', transform: 'scale(1.05)'}"
						:scrollable="false" :lineWidth="43" :lineHeight="4"></u-tabs>
					<!-- 卖家信息列表 -->
					<view class="sellerList" v-if="cur==0">
						<view class="sellerListhead">
								<ren-dropdown-filter :filterData='filterData' :defaultIndex='defaultIndex' @ed='ed'
									:height="24"></ren-dropdown-filter>
									<!-- 我页不知道这个下拉框具体啥样式的,没调整,到时候自己改一下吧 -->
						</view>
						<view class="listCard flexA" v-for="(item,index) in sellerList" :key="index"
							@click="tosellerMessageDetail(item)">
							<view class="cardImg">
								<img src="/static/ic_4@2x.png" alt="">
							</view>
							<view class="cardTitle">
								<view class="cardTitlename">{{item.name}}</view>
								<view class="cardTitleadress flexA">
									<img src="/static/ic-loc@2x.png" alt="">
									<text>{{item.address}}</text>
								</view>
								<view class="cardTitleP flexJ">
									<view class="cardTitlePimg flexA">
										<img src="/static/ic_6@2x.png" alt="">
										{{item.title}}
									</view>
									<view class="cardTitletime">
										{{item.time}}
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 买家信息列表 -->
					<view class="buyerList" v-if="cur==1">
						<view class="buyerCard flexJ" v-for="(item,index) in 4" :key="index" @click="toauditPagetype">
							<view class="cardLeft">
								<view class="cardLeftname">作物-玉米</view>
								<view class="cardTitletime">2022-05-28 15:30</view>
							</view>
							<view class="cardTitlePimg flexA" style="margin-right: 24rpx;">
								<img src="/static/ic_6@2x.png" alt="">
								张小曼
							</view>
						</view>
					</view>
					<!-- 土地信息列表 -->
					<view class="sellerList" v-if="cur==2">
						<view class="listCard flexA" v-for="(item,index) in landList" :key="index" @click="tolandDetail">
							<view class="cardImg">
								<img src="/static/ic_4@2x.png" alt="">
							</view>
							<view class="cardTitle">
								<view class="cardTitlename">{{item.name}}</view>
								<view class="cardTitleadress flexA">
									<img src="/static/ic-loc@2x.png" alt="">
									<text>{{item.address}}</text>
								</view>
								<view class="cardTitleP flexJ">
									<view class="cardTitlePimg flexA">
										<img src="/static/ic_6@2x.png" alt="">
										{{item.title}}
									</view>

									<view class="cardTitletime">
										{{item.time}}
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 发布 -->
		<view class="release" @click="open">
			<img src="/static/ic_7@2x.png" alt="">
		</view>
		<!-- <navigator hover-class="none" url="/pages/popup/popup">领券</navigator> -->
		<!-- 弹出层 -->
		<!-- <view class="popup"> -->
		<view class="">
			<u-popup :show="show" mode="bottom" @close="close" @open="open">
				<view class="wraper">
					<view class="flexC popup1">
						<view class="popItem" @click="tosellerRelease">
							<view class="popImg">
								<img src="/static/ic_13@2x.png" alt="">
							</view>
							<view class="popName">我是卖家</view>
						</view>
						<view class="popItemT" @click="tobuyersRelease">
							<view class="popImg">
								<img src="/static/ic_14@2x.png" alt="">
							</view>
							<view class="popName">我是买家</view>
						</view>
						<view class="popItem" @click="tolandRelease">
							<view class="popImg">
								<img src="/static/ic_15@2x.png" alt="">
							</view>
							<view class="popName">土地信息发布</view>
						</view>
					</view>
					<view class="tui" @click="close">
						<img src="/static/ic-close@2x.png" alt="">
					</view>
				</view>
			</u-popup>
		</view>
		<!-- </view> -->
		<!-- 底部导航栏 -->
		<view class="" style="height: 200rpx;"></view>
		<view class="">
			<Tabbar :idx="0"></Tabbar>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				show: false,
				status: 0,
				current: 0,
				cur: 0,
				type:1,
				filterData: [
					[{
						text: '默认排序',
						value: ''
					}, {
						text: '默认排序1',
						value: 1
					}, {
						text: '默认排序2',
						value: 2
					}, {
						text: '默认排序3',
						value: 3
					}],
					[{
						text: '距离优先',
						value: ''
					}, {
						text: '类型1',
						value: 1
					}, {
						text: '类型2',
						value: 2
					}, {
						text: '类型3',
						value: 3
					}],
					[{
						text: '类型',
						value: ''
					}, {
						text: '玉米1',
						value: 1
					}, {
						text: '大豆2',
						value: 2
					}, {
						text: '高粱3',
						value: 3
					}],
				],
				defaultIndex: [0, 0, 0],
				list5: [
					'https://cdn.uviewui.com/uview/swiper/swiper3.png',
					'https://cdn.uviewui.com/uview/swiper/swiper2.png',
					'https://cdn.uviewui.com/uview/swiper/swiper1.png',
				],
				list1: [{
					name: '卖家信息列表',
				}, {
					name: '买家信息列表',
				}, {
					name: '土地信息列表'
				}],
				sellerListhead: [{
					name: '默认排序',
				}, {
					name: '距离优先',
				}, {
					name: '玉米'
				}],
				sellerList: [{
					id: 1,
					status: 1,
					url: "",
					name: "海南妃子笑荔枝5斤",
					address: "天津市南开区鑫茂科技园C1座",
					expertise: "擅长领域:小鼠银杏病",
					title: "张小曼",
					time: "2022-05-28 15:30",
				}, {
					id: 2,
					status: 2,
					url: "",
					name: "海南妃子笑荔枝5斤",
					address: "天津市南开区鑫茂科技园C1座",
					expertise: "擅长领域:小鼠银杏病",
					title: "张小曼",
					time: "2022-05-28 15:30",
				}, {
					id: 3,
					status: 3,
					url: "",
					name: "海南妃子笑荔枝5斤",
					address: "天津市南开区鑫茂科技园C1座",
					expertise: "擅长领域:小鼠银杏病",
					title: "张小曼",
					time: "2022-05-28 15:30",
				}, {
					id: 4,
					status: 4,
					url: "",
					name: "海南妃子笑荔枝5斤",
					address: "天津市南开区鑫茂科技园C1座",
					expertise: "擅长领域:小鼠银杏病",
					title: "张小曼",
					time: "2022-05-28 15:30",
				}, ],
				landList: [{
					id: 1,
					status: 1,
					url: "",
					name: "土地是包含地球特定地域表面及其以上和以下的大气、水源充足啦啦啦啦啦",
					address: "天津市南开区鑫茂科技园C1座",
					title: "张小曼",
					time: "2022-05-28 15:30",
					type:2
				}, {
					id: 2,
					status: 2,
					url: "",
					name: "土地是包含地球特定地域表面及其以上和以下的大气、水源充足啦啦啦啦啦",
					address: "天津市南开区鑫茂科技园C1座",
					title: "张小曼",
					time: "2022-05-28 15:30",
					type:2
				}, {
					id: 3,
					status: 3,
					url: "",
					name: "土地是包含地球特定地域表面及其以上和以下的大气、水源充足啦啦啦啦啦",
					address: "天津市南开区鑫茂科技园C1座",
					title: "张小曼",
					time: "2022-05-28 15:30",
					type:2
				}, {
					id: 4,
					status: 4,
					url: "",
					name: "土地是包含地球特定地域表面及其以上和以下的大气、水源充足啦啦啦啦啦",
					address: "天津市南开区鑫茂科技园C1座",
					title: "张小曼",
					time: "2022-05-28 15:30",
					type:2
				}, ]
			}
		},
		onLoad() {

		},
		onShow() {
			uni.hideTabBar()
		},
		methods: {
			toauditPagetype(e){
				uni.navigateTo({
					url: `/pages/index/auditPage?type=${this.type}&status=${2}`
				})
			},
			tologin() {
				uni.navigateTo({
					url:'/pages/login/login'
				})
			},
			tolandRelease() {
				uni.navigateTo({
					url:'/pages/index/landRelease'
				})
			},
			tosellerRelease() {
				uni.navigateTo({
					url:'/pages/index/sellerRelease'
				})
			},
			switchTAb(e) {
				console.log(e);
				this.cur = e.index
			},
			tosellerMessageDetail(item) {
				uni.navigateTo({
					url: `/pages/index/sellerMessageDetail?status=${item.status}`
				})
			},
			tolandDetail(item) {
				uni.navigateTo({
					url: `/pages/index/auditPage?status=${item.status}&type=${item.type}`
				})
			},
			tobuyersRelease() {
				uni.navigateTo({
					url: '/pages/index/buyersRelease'
				})
			},
			open() {
				// console.log('open');
				this.show = true

			},
			close() {
				this.show = false
				// console.log('close');
			}
		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		// height: 100%;
		background-image: linear-gradient(to right, #fff, #dff4ff);
	}

	.u-navbar__content.data-v-75dad532 {
		// background-color: #fff !important;
		background-image: linear-gradient(to right, #fff, #dff4ff) !important;
	}

	.u-status-bar {
		background-image: linear-gradient(to right, #fff, #dff4ff) !important;
	}

	.head {
		width: 100%;
		height: 176rpx;
	}

	.main {
		width: 686rpx;
		margin: 0rpx auto;

	}

	// 轮播图
	.indicator {
		@include flex(row);
		justify-content: center;

		&__dot {
			height: 6px;
			width: 6px;
			border-radius: 100px;
			background-color: rgba(255, 255, 255, 0.35);
			margin: 0 5px;
			transition: background-color 0.3s;

			&--active {
				background-color: #ffffff;
			}
		}
	}


	.u-tabs__wrapper__nav {
		// justify-content: space-around;
	}

	.u-tabs__wrapper__nav__item__text {
		// margin-right: 64rpx;
	}

	.u-tabs__wrapper__nav__line {
		background: linear-gradient(90deg, rgba(99, 217, 218, 1) 0%, rgba(99, 217, 218, 0) 100%) !important;
		left: -50rpx;
	}
	.listName {
		margin-top: 32rpx;
		margin-bottom: 24rpx;
		color: rgba(0,0,0,0.9);
		font-size: 32rpx;
		font-weight: 700;
	}

	.sellerList {
		margin-top: 24rpx;
	}
	.sellerListhead {
		font-size: 24rpx !important;
		height: 48rpx !important;
		background-color:transparent!important;
		z-index: 999;
	}

	.sellerListheaditem {
		width: 222rpx;
		// padding: 8rpx 62rpx;
		padding: 8rpx 0;
		border-radius: 52rpx;
		opacity: 1;
		background: rgba(255, 255, 255, 1);
		color: rgba(65, 171, 172, 1);
		font-size: 24rpx;
		margin-right: 26rpx;
	}

	.sellerListheaditem:last-child {
		margin-right: 0rpx;
	}

	.listCard {
		width: 686rpx;
		border-radius: 16rpx;
		opacity: 1;
		background: rgba(255, 255, 255, 1);
		margin-bottom: 24rpx;
		margin-top: 16rpx;
	}

	.cardImg {}

	.cardImg>img {
		width: 200rpx;
		height: 200rpx;
		opacity: 1;
	}

	.cardTitle {
		width: 100%;
		margin-left: 16rpx;
		// padding-right: 16rpx;
		padding: 28rpx 16rpx 28rpx 0rpx;
	}

	.cardTitlename {
		color: rgba(0, 0, 0, 0.9);
		font-size: 28rpx;
		font-weight: 700;
		// margin-top: 28rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2; // 控制多行的行数
		-webkit-box-orient: vertical;

	}

	.cardTitleadress {
		color: rgba(0, 0, 0, 0.4);
		font-size: 24rpx;
		margin: 16rpx 0 24rpx;
	}

	.cardTitleadress>text {
		width: 324rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.cardTitleadress>img {
		width: 32rpx;
		height: 32rpx;
		opacity: 1;
		margin-right: 8rpx;
	}

	.cardTitleP {}

	.cardTitlePimg {
		color: rgba(0, 0, 0, 0.26);
		font-size: 22rpx;
	}

	.cardTitlePimg>img {
		width: 40rpx;
		height: 40rpx;
		opacity: 1;
		margin-right: 8rpx;
	}

	.cardTitletime {
		color: rgba(0, 0, 0, 0.26);
		font-size: 22rpx;
	}

	.release {
		position: fixed;
		right: 0;
		bottom: 196rpx;
	}

	.release>img {
		width: 112rpx;
		height: 112rpx;
		opacity: 1;
	}

	.buyerList {
		width: 100%;
		height: 100%;
	}

	.buyerCard {
		width: 686rpx;
		height: 160rpx;
		border-radius: 16rpx;
		opacity: 1;
		background: rgba(255, 255, 255, 1);
		box-shadow: 0 4rpx 24rpx 0 rgba(101, 101, 101, 0.03);
		margin-bottom: 16rpx;
	}

	.cardLeft {
		margin-left: 24rpx;
	}

	.cardLeftname {
		color: rgba(0, 0, 0, 0.9);
		font-size: 32rpx;
		font-weight: 700;
		margin-bottom: 24rpx;
	}

	.popup1 {
		justify-content: space-between;
		padding: 64rpx 240rpx 0 240rpx;
	}

	.wraper {
		position: fixed;
		bottom: -193rpx;
		left: -171rpx;
		width: 1096rpx;
		height: 622rpx;
		z-index: 10;
		background-color: #FFFFFF;
		border-radius: 50%;
		padding-top: 40rpx;
		text-align: center;
	}

	.popItem {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
	}

	.popItemT {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		margin-top: -56rpx;
	}

	.popImg {}

	.popImg>img {
		width: 128rpx;
		height: 128rpx;
		// margin-bottom: 24rpx;
		opacity: 1;
	}

	.popName {
		color: rgba(0, 0, 0, 0.9);
		font-size: 28rpx;
	}

	.tui {
		margin: 64rpx auto;
	}

	.tui>img {
		width: 48rpx;
		height: 48rpx;
	}
</style>