<template>
	<view class="index tn-safe-area-inset-bottom">

		

		<view class="">
			<uv-sticky bgColor="#ffffff">
				<uni-search-bar radius="15" placeholder="搜索" @confirm="search" v-model="searchValue" @blur="search"
					@cancel="cancel" @clear="clear" cancelButton="auto" clearButton="auto"
					style="border-bottom: 1rpx solid #f1f1f1cc;">
				</uni-search-bar></uv-sticky>


			<!-- 图文信息 -->
			<block v-for="(item,index) in content" :key="item.id" >
				<view class="blogger__item">
					<view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
						<view class="justify__author__info" @click="tn('')">
							<view class="tn-flex tn-flex-row-center">
								<view class="tn-flex tn-flex-row-center tn-flex-col-center">
									<!-- <view class="">
										<tn-avatar class="" shape="circle" :src="item.userAvatar" size="lg">
										</tn-avatar>
									</view> -->
									<view class="tn-padding-right tn-text-ellipsis">
										<view class="tn-padding-right  tn-color-grey tn-text-lg">
											{{ item.company }}
										</view>

									</view>
								</view>
							</view>
						</view>
						<view v-if="item.validDate"
							class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
							<text class="" style="background: #3F51B542;font-size: 12px;
    padding: 8px;
    color: #0000FF;
    border-radius: 24px;
    border-top-right-radius: 0;" @click="showValid(item.validDate)">{{item.validDate}}</text>
						</view>
					</view>

					<view
						class="blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"
						@click="tn('')">
						<!-- <view v-for="(label_item,label_index) in item.label" :key="label_index"
							class="blogger__desc__label tn-float-left tn-margin-right">
							<text class="blogger__desc__label--prefix tn-icon-topics-fill"></text>
							<text class="tn-text-df">{{ label_item }}</text>
						</view> -->
						<!-- 不用限制长度了，因为发布的时候限制长度了-->
						<text
							class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.content }}</text>
					</view>



					<block v-if="item.imgList">
						<view v-if="[1,2,4].indexOf(item.imgList.length) != -1" class="tn-padding-top-xs"
							@click="tn('')">
							<image v-for="(image_item,image_index) in item.imgList" :key="image_index"
								class="blogger__main-image" :class="{
	            'blogger__main-image--1 tn-margin-bottom-sm': item.imgList.length === 1,
	            'blogger__main-image--2 tn-margin-right-sm tn-margin-bottom-sm': item.imgList.length === 2 || item.imgList.length === 4
	          }" :src="image_item.ftpUrl" mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
						</view>
						<view v-else class="tn-padding-top-xs">
							<tn-grid hoverClass="none" :col="3">
								<block v-for="(image_item,image_index) in item.imgList" :key="image_index">
									<!-- #ifndef MP-WEIXIN -->
									<tn-grid-item style="width: 30%;margin: 10rpx;">
										<image class="blogger__main-image blogger__main-image--3"
											:src="image_item.ftpUrl" mode="aspectFill"
											@click="showImg(item.imgList,image_index)"></image>
									</tn-grid-item>
									<!-- #endif-->
									<!-- #ifdef MP-WEIXIN -->
									<tn-grid-item style="width: 30%;margin: 10rpx;">
										<image class="blogger__main-image blogger__main-image--3"
											:src="image_item.ftpUrl" mode="aspectFill"
											@click="showImg(item.imgList,image_index)"></image>
									</tn-grid-item>
									<!-- #endif-->
								</block>
							</tn-grid>
						</view>
					</block>
					<view v-for="file in item.fileDetailList" style="margin-bottom: 4px;" :key="file.id" v-if="!isImage(file.fileName)">
						<view>
							<text class="tn-icon-link"></text>
							<view style="display: inline-block;margin-left:8px" @click="clickLink(file.ftpUrl,file.fileName)">
								{{file.fileName}}</view>

						</view>
					</view>


					<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
						<view class="justify-content-item tn-color-gray tn-text-center">
							<view class="tn-padding-right   tn-padding-top-xs tn-color-gray">
								{{ item.createTime|formatDate }}
							</view>

						</view>
						<view class="justify-content-item tn-flex tn-flex-col-center">
							<text class="tn-icon-more-vertical tn-color-gray tn-text-bold tn-text-xxl"
								@click="showActionSheet(item)"></text>
						</view>
					</view>
				</view>

				<!-- 边距间隔 -->
				<view class="tn-strip-bottom" v-if="index != content.length - 1"></view>
			</block>
			<view v-if="showEmpty&&content.length==0" style="margin-top: 32vh;">
				<tn-empty mode="data"></tn-empty>
			</view>
			<!-- 结尾 -->
			<view v-if="content.length==totalSize&&totalSize!=0" style="background-color: #f1f1f1cc;padding: 16px 0;">
				<tn-load-more status="nomore" :loadText="loadText"></tn-load-more>
			</view>


		</view>

		<view class='tn-tabbar-height' :style="{marginTop: vuex_custom_bar_height + 'px'}"></view>
		
		
		<tn-popup v-model="showSheet" mode="center" closeBtn="true" borderRadius="16">
			<view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 320px;"
				v-if="!showContact">
				<button @click="linkTel()" style="border-radius:30px;color:#fff;background-color: #1d60b1;"><text
						class="tn-icon-service" style="margin-right: 12px;"></text> 联系需方</button>
				<!-- <view>联系我们帮助对接</view> -->
				<button v-if="!collStatus" @click="addColl"
					style="margin-top:10px;border-radius:30px;" type="default" plain="true"><text
						class="tn-icon-star" style="margin-right: 12px;"></text>
					收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;藏</button>
				<button v-if="collStatus" @click="delColl"
					style="margin-top:10px;border-radius:30px;" type="default" plain="true"><text
						class="tn-icon-star-fill" style="margin-right: 12px;"></text> 取消收藏</button>
				<button open-type="share"
					style="margin-top:10px;border-radius:30px;" type="default" plain="true" :data-coupon="curItem"><text
						class="tn-icon-send" style="margin-right: 12px;"></text>
					转&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发</button>
			</view>
			<view class="content bg-content" style="padding: 50px 36px;padding-bottom: 32px;font-size: 16px;width:320px;line-height: 24px;"
				v-if="showContact">
				<view><text style="font-size: 20px;font-weight: bold;" v-if="curContact.company">{{curContact.company}}</text></view>
				<view style="margin-top:20px;
    font-weight: bold;
    font-size: 20px;"><text class="tn-icon-my-formal"></text><text style="margin-left: 6px;">{{curContact.contactPerson}}</text> </view>
				<view style="margin-top:20px;font-size: 20px;font-weight: bold;" @click="showTel(curContact.contactMethod)"><text class="tn-icon-tel"></text>
 <text style="margin-left: 4px;">{{curContact.contactMethod}}</text> </view>
			</view>

		</tn-popup>
		<tn-toast ref="toast"></tn-toast>
	</view>
</template>

<script>
	import request from '../../utils/request'
	export default {
		name: 'Index',

		data() {
			return {
				loading: false,
				loadText: {
					loadmore: '下拉加载',
					loading: '快速加载中...',
					nomore: '恭喜你，已阅读完所有需求信息哦！'
				},
				showContact: false,
				curContact: {},
				totalSize: 0,
				curIndex: 1,
				showSheet: false,
				curItem: {},
				userNo: '',
				searchValue: '',
				collStatus: '',
				cardCur: 0,
				collId: '',
				isAndroid: true,
				content: [],

			}
		},
		filters: {
			formatDate(value) {
				if (!value) return '';
				const date = new Date(value);
				const today = new Date();
				const yesterday = new Date(today); // 昨天的日期
				yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天

				if (date.getFullYear() == today.getFullYear() && date.getMonth() == today.getMonth() && date.getDate() ==
					today.getDate()) {
					return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
						.getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
				}
				if (date.getFullYear() == yesterday.getFullYear() && date.getMonth() == yesterday.getMonth() && date
					.getDate() == yesterday.getDate()) {
					return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
						.getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
				}
				return date.toLocaleDateString() + ' ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
					.getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
			},


		},
		created() {
			const systemInfo = uni.getSystemInfoSync()
			if (systemInfo.system.toLocaleLowerCase().includes('ios')) {
				this.isAndroid = false
			} else {
				this.isAndroid = true
			}
			this.fetchData();
		},
		onReachBottom() {
			console.warn(12345);
		},
		 
		methods: {
			// cardSwiper
			cardSwiper(e) {
				this.cardCur = e.detail.current
			},
			clickLink(url,fileName) {
				uni.navigateTo({
					url:'/pages/webview/web-view?url='+encodeURIComponent('http://slb-m.dev.ml1993.com/webview?title='+fileName+'&url='+ url),
				})
				// uni.navigateTo({
				// 	url: '/pages/webview/web-view?url=' + url,
				// })
			},
			isImage(fileName) {
				const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'ico']
				const extension = fileName.split('.').pop().toLowerCase();
				return imageExtensions.includes(extension);
			},
			reFetchData() {
				this.loading = true;
				uni.showToast({
					title: '正在刷新...',
					icon: 'none'
				});
				this.fetchData();
			},
			fetchData(curIndex = 1) {
				let that = this;
				that.showEmpty = false;
				this.curIndex = curIndex;
				request.post('/slbResourceDemand/query', {
					index: curIndex,
					limit: 10,
					content: that.searchValue,
				}).then(res => {
					that.loading = false;
					if (res.success) {
						that.totalSize = res.total || 0;
						let newList = res.list || [];
						for (let i = 0; i < newList.length; i++) {
							newList[i].imgList = [];
							for (let j = 0; j < newList[i].fileDetailList.length; j++) {
								if (that.isImage(newList[i].fileDetailList[j].fileName)) {
									newList[i].imgList.push(newList[i].fileDetailList[j]);
								}
							}
						}
						if (curIndex == 1) {
							that.content = newList || [];
						} else {
							that.content = that.content.concat(newList || []);
						}
						that.showEmpty = true;
					}
					console.warn(res);
				})
			},

			// 跳转
			tn(e) {
				uni.navigateTo({
					url: e,
				});
			},
			hideSheet(){
				this.showSheet = false;
			},
			showActionSheet(item) {
				let that = this;
				console.warn(item);
				this.curItem = item;
				this.curItem.isNeed = 1;
				this.collStatus = false;
				this.showSheet = true;
				that.showContact = false;
				if (uni.getStorageSync('userNo')) {
					let params = {};

					params = {
						fkBisNo: that.curItem.bisNo,
						userNo: uni.getStorageSync('userNo'),
					};
					request.post('/slbCollect/query', params).then(res => {
						if (res.success) {
							if (res.list && res.list.length > 0) {
								that.collStatus = true;
								that.collId = res.list[0].id;
							}
						}
					})
				}
			},
			linkTel() {

				if (!uni.getStorageSync('userNo')) {
					uni.showToast({
						title: '请登录'
					})
					uni.navigateTo({
						url: '/pages/login/login'
					})
					return false;
				}
				let that = this;
				let params = {};
				params.slbBisContact = JSON.stringify({
					fkBisNo: that.curItem.bisNo,
					bisType: '1',
					type: '1',
					company: that.curItem.company,
					companyNo: that.curItem.companyNo,
					userNo: uni.getStorageSync('userNo'),
				});
				request.post('/slbBisContact/add', params).then(res => {
					if (res.success) {
						that.showContact = true;
						that.curContact.company = that.curItem.company;
						that.curContact.contactMethod = res.resultMap.contactMethod;
						that.curContact.contactPerson = res.resultMap.contactPerson;
					} else {
						that.showContact = false;
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				})
			},

			addColl() {
				if (!uni.getStorageSync('userNo')) {
					uni.showToast({
						title: '请登录'
					})
					uni.navigateTo({
						url: '/pages/login/login'
					})
					return false;
				}
				let that = this;
				let params = {};
				params.slbCollect = JSON.stringify({
					fkBisNo: that.curItem.bisNo,
					bisType: '1',
					userNo: uni.getStorageSync('userNo'),
				});
				request.post('/slbCollect/add', params).then(res => {
					if (res.success) {
						uni.showToast({
							title: '信息已收藏，请在我的收藏里查看阅读',
							duration: 2500,
							icon: 'none'
						});
						that.showSheet = false;
					} else {
						uni.showToast({
							title: res.msg
						})
					}
				})

			},
			delColl() {
				let that = this;
				request.post('/slbCollect/del', {
					id: that.collId
				}).then(res => {
					if (res.success) {
						uni.showToast({
							title: '此需求信息将不会保存在我的收藏里',
							icon:'none',
							duration:2500
						})
						that.showSheet = false;
					} else {
						uni.showToast({
							title: res.msg
						})
					}
				})
			},
			showImg(items, index) {
				let urls = [];
				for (let i = 0; i < items.length; i++) {
					urls.push(items[i].ftpUrl);
				}

				// 预览图片
				uni.previewImage({
					urls: urls,
					current: index,

				});
			},
			showValid(text){
				uni.showToast({
					title: '有效期：'+text,
					icon: 'none'
				})
			},
			addButton() {
				if (!uni.getStorageSync('userNo')) {
					uni.showToast({
						title: '请登录',
						icon:'none'
					})
					uni.navigateTo({
						url: '/pages/login/login'
					})
					return false;
				} else {
					uni.navigateTo({
						url: '/circlePages/circle'
					})
				}
				//未登录，去登录
				//已登录，去新增第一步
			},
			loadMore() {
				if (this.totalSize > this.content.length) {
					this.fetchData(this.curIndex + 1);
				}
				console.error('正在加载更多');
			},
			search() {
				this.fetchData();
			},
			cancel() {
				this.searchValue = '';
				this.fetchData();
			},
			clear() {
				this.searchValue = '';
				this.fetchData();
			},
			showTel(tel){
				uni.makePhoneCall({
				  phoneNumber: tel,
				});
			},
			showDetail(item){
				uni.navigateTo({
					url: '/pages/index/detail/detail?id='+item.bisNo+'&isNeed=1'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.index {
		max-height: 100vh;
	}

	/* 底部安全边距 start*/
	.tn-tabbar-height {
		min-height: 120rpx;
		height: calc(140rpx + env(safe-area-inset-bottom) / 2);
		height: calc(140rpx + constant(safe-area-inset-bottom));
	}

	/* 轮播视觉差 start */
	.card-swiper {
		height: 330rpx !important;
	}

	.card-swiper swiper-item {
		width: 750rpx !important;
		left: 0rpx;
		box-sizing: border-box;
		padding: 40rpx 30rpx 30rpx 30rpx;
		overflow: initial;
	}

	.card-swiper swiper-item .swiper-item {
		width: 100%;
		display: block;
		height: 100%;
		border-radius: 15rpx;
		transform: scale(1);
		transition: all 0.2s ease-in 0s;
		// overflow: hidden;
	}

	.card-swiper swiper-item.cur .swiper-item {
		transform: none;
		transition: all 0.2s ease-in 0s;
	}

	.card-swiper swiper-item .swiper-item-text {
		margin-top: -160rpx;
		text-align: center;
		width: 100%;
		display: block;
		height: 50%;
		border-radius: 10rpx;
		transform: translate(100rpx, -60rpx) scale(0.9, 0.9);
		transition: all 0.6s ease 0s;
		overflow: hidden;
	}

	.card-swiper swiper-item.cur .swiper-item-text {
		margin-top: -220rpx;
		width: 100%;
		transform: translate(0rpx, 0rpx) scale(0.9, 0.9);
		transition: all 0.6s ease 0s;
	}

	.image-banner {
		border: 1rpx solid #F8F7F8;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.image-banner image {
		width: 100%;
		height: 100%;
	}

	/* 轮播指示点 start*/
	.indication {
		z-index: 9999;
		width: 100%;
		height: 36rpx;
		position: absolute;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.spot {
		background-color: #FFFFFF;
		opacity: 0.6;
		width: 10rpx;
		height: 10rpx;
		border-radius: 20rpx;
		top: -70rpx;
		margin: 0 8rpx !important;
		position: relative;
	}

	.spot.active {
		opacity: 1;
		width: 30rpx;
		background-color: #FFFFFF;
	}



	/* 图标容器12 start */
	.tn-three {
		position: absolute;
		top: 50%;
		right: 50%;
		bottom: 50%;
		left: 50%;
		transform: translate(-38rpx, -20rpx) rotateX(20deg) rotateY(10deg) rotateZ(-20deg);
		text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
	}

	.icon12 {
		&__item {
			width: 30%;
			background-color: #FFFFFF;
			border-radius: 10rpx;
			padding: 30rpx;
			margin: 20rpx 10rpx;
			transform: scale(1);
			transition: transform 0.3s linear;
			transform-origin: center center;

			&--icon {
				width: 100rpx;
				height: 100rpx;
				font-size: 60rpx;
				border-radius: 50%;
				margin-bottom: 18rpx;
				position: relative;
				z-index: 1;

				&::after {
					content: " ";
					position: absolute;
					z-index: -1;
					width: 100%;
					height: 100%;
					left: 0;
					bottom: 0;
					border-radius: inherit;
					opacity: 1;
					transform: scale(1, 1);
					background-size: 100% 100%;
					background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);


				}
			}
		}
	}

	/* 自定义导航栏内容 start */
	.custom-nav {
		height: 100%;

		&__back {
			margin: auto 5rpx;
			font-size: 40rpx;
			margin-right: 10rpx;
			margin-left: 30rpx;
			flex-basis: 5%;
		}

		&__search {
			flex-basis: 70%;
			width: 100%;
			height: 100%;

			&__box {
				width: 100%;
				height: 70%;
				padding: 10rpx 0;
				margin: 0 30rpx;
				border-radius: 60rpx 60rpx 0 60rpx;
				font-size: 24rpx;
			}

			&__icon {
				padding-right: 10rpx;
				margin-left: 20rpx;
				font-size: 30rpx;
			}

			&__text {
				// color: #AAAAAA;
			}
		}
	}

	.logo-image {
		width: 65rpx;
		height: 65rpx;
		position: relative;
		border: 1rpx solid #F8F7F8;
		border-radius: 50%;
	}

	.logo-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 50%;
	}

	/* 自定义导航栏内容 end */


	/* 热门图片 start*/
	.image-tuniao1 {
		padding: 165rpx 0rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
	}

	.image-tuniao2 {
		padding: 75rpx 0rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
	}

	.image-tuniao3 {
		padding: 90rpx 0rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
	}

	.image-pic {
		border: 1rpx solid #F8F7F8;
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 10rpx;
	}

	/* 文章内容 start*/
	.tn-blogger-content {
		&__wrap {
			margin: 30rpx;
		}

		&__info {
			&__btn {
				margin-right: -12rpx;
				opacity: 0.5;
			}
		}

		&__label {
			&__item {
				color: #1D2541;
				background-color: #F3F2F7;
				border-radius: 10rpx;
				font-size: 22rpx;

				padding: 5rpx 15rpx;
				margin: 5rpx 0 0 18rpx;

				&--prefix {
					font-size: 24rpx;
					color: #1D2541;
					padding-right: 10rpx;
				}
			}

			&__desc {
				line-height: 55rpx;
			}
		}

		&__main-image {
			border: 1rpx solid #F8F7F8;
			border-radius: 16rpx;

			&--1 {
				max-width: 690rpx;
				min-width: 690rpx;
				max-height: 400rpx;
				min-height: 400rpx;
			}

			&--2 {
				max-width: 260rpx;
				max-height: 260rpx;
			}

			&--3 {
				height: 212rpx;
				width: 100%;
			}
		}

		&__count-icon {
			font-size: 40rpx;
			padding-right: 5rpx;
		}
	}

	.image-wallpaper {
		padding: 160rpx 0rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
	}

	.image-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 10rpx;
	}

	/* 文章内容 end*/
	.circle {
		max-height: 100vh;
	}

	/* 底部安全边距 start*/
	.tn-tabbar-height {
		min-height: 120rpx;
		height: calc(140rpx + env(safe-area-inset-bottom) / 2);
		height: calc(140rpx + constant(safe-area-inset-bottom));
	}

	/* 自定义导航栏内容 start */
	.custom-nav {
		height: 100%;

		&__back {
			margin: auto 5rpx;
			font-size: 40rpx;
			margin-right: 10rpx;
			margin-left: 30rpx;
			flex-basis: 5%;
		}

		&__search {
			flex-basis: 60%;
			width: 100%;
			height: 100%;

			&__box {
				width: 100%;
				height: 70%;
				padding: 10rpx 0;
				margin: 0 30rpx;
				border-radius: 60rpx 60rpx 0 60rpx;
				font-size: 24rpx;
			}

			&__icon {
				padding-right: 10rpx;
				margin-left: 20rpx;
				font-size: 30rpx;
			}

			&__text {
				color: #AAAAAA;
			}
		}
	}

	.logo-image {
		width: 60rpx;
		height: 60rpx;
		position: relative;
		margin-top: -15rpx;
	}

	.logo-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 50%;
	}

	/* 自定义导航栏内容 end */
	/* 博主头像 start*/
	.image-circle {
		// padding: 95rpx;
		width: 190rpx;
		height: 190rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
	}

	.image-pic {
		border: 1rpx solid #F8F7F8;
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 10rpx;
	}

	.tn-color-cat {
		color: #1D2541;
	}

	.tn-bg-cat {
		background-color: #1D2541;
	}

	/* 文章内容 start*/
	.blogger {
		&__item {
			padding: 30rpx;
		}

		&__author {
			&__btn {
				margin-right: -12rpx;
				opacity: 0.5;
			}
		}

		&__desc {
			line-height: 30rpx;

			&__label {

				color: #1D2541;
				background-color: #F3F2F7;
				border-radius: 10rpx;
				font-size: 22rpx;

				padding: 5rpx 15rpx;
				margin: 5rpx 18rpx 0 0;

				&--prefix {
					font-size: 24rpx;
					color: #1D2541;
					padding-right: 10rpx;
				}
			}

			&__content {
				line-height: 50rpx;
			}
		}

		&__content {
			margin-top: 18rpx;
			padding-right: 18rpx;

			&__data {
				line-height: 46rpx;
				text-align: justify;
				overflow: hidden;
				transition: all 0.25s ease-in-out;

			}

			&__status {
				margin-top: 10rpx;
				font-size: 26rpx;
				color: #82B2FF;
			}
		}

		&__main-image {
			border: 1rpx solid #F8F7F8;
			border-radius: 16rpx;

			&--1 {
				max-width: 80%;
				max-height: 300rpx;
			}

			&--2 {
				max-width: 260rpx;
				max-height: 260rpx;
			}

			&--3 {
				height: 212rpx;
				width: 100%;
			}
		}

		&__count-icon {
			font-size: 40rpx;
			padding-right: 5rpx;
		}

		&__ad {
			width: 100%;
			height: 500rpx;
			transform: translate3d(0px, 0px, 0px) !important;

			::v-deep .uni-swiper-slide-frame {
				transform: translate3d(0px, 0px, 0px) !important;
			}

			.uni-swiper-slide-frame {
				transform: translate3d(0px, 0px, 0px) !important;
			}

			&__item {
				position: absolute;
				width: 100%;
				height: 100%;
				transform-origin: left center;
				transform: translate3d(100%, 0px, 0px) scale(1) !important;
				transition: transform 0.25s ease-in-out;
				z-index: 1;

				&--0 {
					transform: translate3d(0%, 0px, 0px) scale(1) !important;
					z-index: 4;
				}

				&--1 {
					transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
					z-index: 3;
				}

				&--2 {
					transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
					z-index: 2;
				}
			}

			&__content {
				border-radius: 40rpx;
				width: 640rpx;
				height: 500rpx;
				overflow: hidden;
			}

			&__image {
				width: 100%;
				height: 100%;
			}
		}
	}

	/* 文章内容 end*/

	/* 间隔线 start*/
	.tn-strip-bottom {
		width: 100%;
		border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
	}

	/* 间隔线 end*/

	/* 广告内容 start */
	.ad-image {
		width: 80rpx;
		height: 80rpx;
		position: relative;
	}

	.ad-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 20%;
	}

	/* 自定义导航栏内容 end */


	/* 全屏轮播  start*/
	.card-swiper {
		height: 100vh !important;
	}

	.card-swiper swiper-item {
		width: 750rpx !important;
		left: 0rpx;
		box-sizing: border-box;
		overflow: initial;
	}

	.card-swiper swiper-item .swiper-item {
		width: 100%;
		display: block;
		height: 100vh;
		border-radius: 0rpx;
		transform: scale(1);
		transition: all 0.2s ease-in 0s;
		overflow: hidden;
	}

	.card-swiper swiper-item.cur .swiper-item {
		transform: none;
		transition: all 0.2s ease-in 0s;
	}

	.card-swiper swiper-item .swiper-item-png {
		margin-top: -50vh;
		width: 100%;
		display: block;
		border-radius: 0rpx;
		transform: translate(1040rpx, 20rpx) scale(0.5, 0.5);
		transition: all 0.6s ease 0s;
		// overflow: hidden;
	}

	.card-swiper swiper-item.cur .swiper-item-png {
		margin-top: -100vh;
		width: 900rpx;
		transform: translate(-80rpx, 0rpx) scale(1, 1);
		transition: all 0.6s ease 0s;
	}

	.image-banner {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.image-banner image {
		width: 100%;
	}

	/* 轮播指示点 start*/
	.indication {
		z-index: 9999;
		width: 100%;
		height: 36rpx;
		position: fixed;
		// display:flex;
		display: block;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.spot {
		background-color: #000;
		opacity: 0.3;
		width: 10rpx;
		height: 10rpx;
		border-radius: 20rpx;
		margin: 20rpx 0 !important;
		left: 95vw;
		top: -60vh;
		position: relative;
	}

	.spot.active {
		opacity: 0.6;
		height: 30rpx;
		background-color: #000;
	}

	/* 资讯主图 start*/
	.image-article {
		border-radius: 8rpx;
		border: 1rpx solid #F8F7F8;
		width: 200rpx;
		height: 200rpx;
		position: relative;
	}

	.image-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 10rpx;
	}

	.article-shadow {
		border-radius: 15rpx;
		box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
	}

	/* 文字截取*/
	.clamp-text-1 {
		-webkit-line-clamp: 1;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		text-overflow: ellipsis;
		overflow: hidden;
	}

	.clamp-text-2 {
		-webkit-line-clamp: 2;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		text-overflow: ellipsis;
		overflow: hidden;
	}

	/* 标签内容 start*/
	.tn-tag-content {
		&__item {
			display: inline-block;
			line-height: 35rpx;
			color: #1D2541;
			background-color: #F3F2F7;
			border-radius: 10rpx;
			font-size: 22rpx;
			padding: 5rpx 15rpx;

			&--prefix {
				padding-right: 10rpx;
			}
		}
	}


	/* 图标容器9 start */
	.icon9 {
		&__item {
			width: 30%;
			background-color: #FFFFFF;
			border-radius: 10rpx;
			padding: 30rpx;
			margin: 20rpx 10rpx;
			transform: scale(1);
			transition: transform 0.3s linear;
			transform-origin: center center;

			&--icon {
				width: 110rpx;
				height: 110rpx;
				font-size: 65rpx;
				border-radius: 50%;
				margin: 20rpx 40rpx;
				position: relative;
				z-index: 1;

				&::after {
					content: " ";
					position: absolute;
					z-index: -1;
					width: 100%;
					height: 100%;
					left: 0;
					bottom: 0;
					border-radius: inherit;
					opacity: 1;
					transform: scale(1, 1);
					background-size: 100% 100%;
					background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
				}
			}
		}
	}


	/* 悬浮 */
	.tnxuanfu {
		animation: suspension 3s ease-in-out infinite;
	}

	@keyframes suspension {

		0%,
		100% {
			transform: translateY(0);
		}

		50% {
			transform: translateY(-0.8rem);
		}
	}

	/* 悬浮按钮 */
	.button-shop {
		width: 90rpx;
		height: 90rpx;
		display: flex;
		flex-direction: row;
		position: fixed;
		/* bottom:200rpx;
        right: 20rpx; */
		left: 5rpx;
		top: 5rpx;
		z-index: 1001;
		border-radius: 100px;
		opacity: 0.9;
	}


	/* 按钮 */
	.edit {
		bottom: 300rpx;
		right: 75rpx;
		position: fixed;
		z-index: 9999;
	}


	.pa,
	.pa0 {
		position: absolute
	}

	.pa0 {
		left: 0;
		top: 0
	}


	.bg0 {
		width: 100rpx;
		height: 100rpx;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

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




	.hx-box {
		top: 50%;
		left: 50%;
		width: 100rpx;
		height: 100rpx;
		transform-style: preserve-3d;
		transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
	}

	.hx-box .pr {
		width: 100rpx;
		height: 100rpx;
		transform-style: preserve-3d;
		animation: hxz 20s linear infinite;
	}

	@keyframes hxz {
		0% {
			transform: rotateX(0deg);
		}

		100% {
			transform: rotateX(-360deg);
		}
	}



	.hx-box .pr .pa0 {
		width: 100rpx;
		height: 100rpx;
		/* border: 4px solid #5ec0ff; */
		border-radius: 1000px;
	}

	.hx-box .pr .pa0 .span {
		display: block;
		width: 100%;
		height: 100%;
		background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center;
		background-size: 100% 100%;
		animation: hx 4s linear infinite;
	}

	@keyframes hx {
		to {
			transform: rotate(360deg);
		}
	}

	.hx-k1 {
		transform: rotateX(-60deg) rotateZ(-60deg)
	}

	.hx-k2 {
		transform: rotateX(-30deg) rotateZ(-30deg)
	}

	.hx-k3 {
		transform: rotateX(0deg) rotateZ(0deg)
	}

	.hx-k4 {
		transform: rotateX(30deg) rotateZ(30deg)
	}

	.hx-k5 {
		transform: rotateX(60deg) rotateZ(60deg)
	}

	.hx-k6 {
		transform: rotateX(90deg) rotateZ(90deg)
	}

	/deep/ .tn-toast {
		background-color: #000c !important;
	}
	
	.bg-content{
		color: #fff;
		background-image: url(./../../static/bg.png);
		background-size: cover;
	}
</style>