<template>
	<view style="background-color: #EBF4F7;letter-spacing: 1rpx;">
		<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
			<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
				<view style="padding-left: 15rpx;" @click="goBack()">
					<text class="tn-icon-left" style="font-size: 40rpx;"></text>
				</view>
				<view class="tn-margin-top"
					style=";text-shadow:  1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
					<tn-tabs :list="[{name:'供需服务'}]" :current="topCurrent" activeColor="#000" :bold="false"
						:fontSize="36"></tn-tabs>
				</view>
			</view>
		</tn-nav-bar>
		<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
			<view style="background-color: #FFFFFF;">
				<tn-tabs :list="list" :isScroll="false" :activeItemStyle="{'fontWeight':'600','fontSize':'30rpx'}"
					activeColor="#000" :barWidth="50" :barHeight="6" backgroundColor="#FFFFFF"
					:barStyle="{'background': 'linear-gradient(-45deg, #4AA2EF, #3A7FF4)','borderRadius': '4rpx'}"
					:current="current" name="name" @change="change"></tn-tabs>
			</view>
			<view style="padding: 30rpx;">
				<view v-for="(item,index) in 10" @click="openUrl('/pages/index/goods_info')" style="background-color: #FFF;padding: 20rpx;border-radius: 20rpx;
				box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.1);margin-bottom: 20rpx;">
					<view class="tn-text-ellipsis">
						<tn-tag v-if="current==0" shape="radius" size="sm"
							backgroundColor="tn-main-gradient-red--reverse" width="60rpx">需求</tn-tag>
						<tn-tag v-if="current==1" shape="radius" size="sm" backgroundColor="tn-main-gradient-blue"
							width="60rpx">供应</tn-tag>
						<text style="vertical-align: middle;padding-left: 20rpx;font-size:30rpx;">
							劲捷飞燕系列P056C旅拍三脚架碳纤维摄影旅拍三脚架碳纤维摄影</text>
					</view>
					<view style="font-size: 24rpx;color: #808080;margin-top: 20rpx;">洛阳灵睿网络技术有限公司</view>
					<view>
						<tn-tag shape="radius" width="auto" backgroundColor="#F7F7F7" fontColor="#808080">洛阳市</tn-tag>
						<tn-tag shape="radius" margin="20rpx" width="auto" backgroundColor="#EBF4F7"
							fontColor="#3377FF">合作意向18人</tn-tag>
						<tn-tag shape="radius" width="auto" backgroundColor="#F7F3EB"
							fontColor="#FF8C19">项目金额1万以下</tn-tag>
					</view>
					<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-flex-row-center"
						style="margin-top: 20rpx;">
						<view style="color: #808080;font-size: 24rpx;">2023-12-19</view>
						<view>
							<tn-button shape="round" :fontSize="22" width="148rpx" height="50rpx"
								backgroundColor="tn-main-gradient-orange" fontColor="#ffffff">意向合作</tn-button>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				topCurrent: 0,
				list: [{
					name: '供应'
				}, {
					name: '需求'
				}],
				current: 0
			}
		},
		methods: {
			openUrl(e) {
				uni.navigateTo({
					url: e
				})
			},
			change(e) {
				this.current = e;
			},
			goBack() {
				if (getCurrentPages().length > 1) {
					uni.navigateBack()
				} else {
					uni.redirectTo({
						url: '/pages/index/index'
					})

				}
			}
		}
	}
</script>

<style>

</style>