<template>
	<view>
		<view class="content">
			<swiper class="screen-swiper" style="height: 320rpx;width: 686rpx;margin-top: 24rpx;border-radius: 32rpx;"
				:circular="true" :autoplay="true" interval="2500" duration="800">
				<swiper-item v-for="(item,index) in swiperList" :key="index" @tap="goNav(item.url)">
					<image :src="item.imageUrl" webp class="bannerImg"></image>
				</swiper-item>
			</swiper>
			<view class="tabview1" v-if="XCXIsSelect != '否'">
				<view class="type_box" v-if="typeList && typeList.length > 1">
					<view class="icon-box"  @tap="selTab(-1,0)">
						<view style="font-weight: 700;"
							:style="{color:tabIndex == -1?'#FF6E98':'',fontSize:tabIndex==-1?'36rpx':'32rpx'}">
							全部</view>
						<view style="height: 32rpx;">
							<svg t="1761021751826" v-show="tabIndex == -1" class="icon" viewBox="0 0 2970 1024"
								version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4553" width="24" height="24">
								<path
									d="M1483.968134 1024A1945.340076 1945.340076 0 0 1 65.537898 403.558292a245.597905 245.597905 0 0 1 0-334.217817 214.898167 214.898167 0 0 1 316.002639 0 1501.114864 1501.114864 0 0 0 2204.752863 0 214.898167 214.898167 0 0 1 316.002638 0 245.597905 245.597905 0 0 1 0 334.217817A1945.237743 1945.237743 0 0 1 1483.968134 1024z"
									fill="#FF6E98" p-id="4554"></path>
							</svg>
						</view>
					</view>
					<view class="icon-box" v-for="(item,index) in typeList" @tap="selTab(index,item.id)">
						<view style="font-weight: 700;"
							:style="{color:tabIndex == index?'#FF6E98':'',fontSize:tabIndex==index?'36rpx':'32rpx'}">
							{{item.value}}</view>
						<view style="height: 32rpx;">
							<svg t="1761021751826" v-show="tabIndex == index" class="icon" viewBox="0 0 2970 1024"
								version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4553" width="24" height="24">
								<path
									d="M1483.968134 1024A1945.340076 1945.340076 0 0 1 65.537898 403.558292a245.597905 245.597905 0 0 1 0-334.217817 214.898167 214.898167 0 0 1 316.002639 0 1501.114864 1501.114864 0 0 0 2204.752863 0 214.898167 214.898167 0 0 1 316.002638 0 245.597905 245.597905 0 0 1 0 334.217817A1945.237743 1945.237743 0 0 1 1483.968134 1024z"
									fill="#FF6E98" p-id="4554"></path>
							</svg>
						</view>
					</view>
				</view>
				<view class="tabsx">
					<view style="margin-right: 20rpx;" v-for="(item,index) in list" :key="index" :class="listIndex==index?'active':'normal'"
						@click="change(index)">{{item.name}}</view>
				</view>
			</view>

			<view class="list_item" v-for="(item,index) in orderList" :key="index" @tap="goOrder(item)">
				<view style="position: relative;">
					<image :src="item.massageImg" mode="aspectFill"
						style="border-radius: 24rpx;width: 160rpx;height: 160rpx;"></image>
					<view class="flex justify-center align-center "
						style="color: #54CC84;font-size: 24rpx;width: 148rpx;height: 40rpx;background: #DCFFEA;border-radius: 36rpx;position: absolute;left: 6rpx;bottom: -20rpx;">
						<image src="../../static/time.png" style="width: 26rpx;height: 26rpx;margin-right: 8rpx;">
						</image>
						<view>{{item.duration}}分钟</view>
					</view>
				</view>
				<view class="listitem_rightview">
					<view class="titleview">
						<view class="item_title">{{item.title}}</view>
						<view class="item_yishou">已售{{item.sales}}</view>
					</view>
					<view class="flex flex-wrap margin-top-sm" v-if="item.labels.length>0">
						<text class="margin-bottom-xs box" v-for="(ites,index) in item.labels"
							:key="index">{{ites}}</text>
					</view>
					<view class="btnview align-center" :style="item.labels.length > 0 ? '' : 'margin-top:20rpx'">
						<view class="item_money flex align-center">
							<view><text>￥</text>{{item.price}}
								<text class="oldPrice_view">￥{{item.oldPrice}}</text>
							</view>
							<!-- <view class="flex justify-between margin-tb-sm align-center margin-left"
								style="color: #999999;font-size: 22rpx;">
								<image src="../../static/time.png"
									style="width: 26rpx;height: 26rpx;margin-right: 8rpx;"></image>
								<view>{{item.duration}}分钟</view>
							</view> -->
						</view>

						<view class="item_btn" v-if="item.classifyName === '足浴按摩'" @click.stop="goOrder(item)">
							预约服务
							<image style="position: absolute;width: 39rpx;height: 39rpx;top: -4rpx;right: -8rpx;"
								src="../../static/image/btn-icon.png" mode=""></image>
						</view>
						<view class="item_btn" v-if="item.classifyName === '健身私教'" @click.stop="goOrder(item)">
							预约服务
						</view>
						<view class="item_btn" v-if="item.classifyName != '健身私教' && item.classifyName != '足浴按摩'"
							@click.stop="goOrder(item)">
							预约服务
						</view>
					</view>
				</view>
			</view>
			
		</view>
		
		<empty v-if="orderList.length==0" style="position: relative;top: -120rpx;z-index: 9;"></empty>
		<view style="position: fixed;z-index: 999;bottom: 160rpx;" v-if="showTP">
			<image src="/static/image/city_open.png" style="width: 690rpx;margin: 30rpx;height: 600rpx;"></image>
			<view
				style="position: absolute;bottom: 100rpx;width: 100%;text-align: center;display: flex;justify-content: center;">
				<view>
					<view style="color: #333333;font-size: 28rpx;"><text
							style="font-size: 44rpx;color:#ee6c54">{{tpCount}}</text>人已投票</view>
					<view class="tp_view" v-if="tpSel == 2" @tap="saveTP">投票</view>
					<view class="ytp_view" v-if="tpSel == 1">已投票</view>
				</view>
			</view>
			
		</view>
		<!-- 新人红包 -->
		<uni-popup ref="popushongbao" type="center">
			<view>
				<image @tap="GetQuan" src="../../static/images/hb_bg.png" style="width: 564upx;height:618upx "></image>
			</view>
		</uni-popup>
		<view style="padding-bottom:40rpx;color: #ccc;font-size: 32rpx;text-align: center;" @click="handleGo">
			黔ICP备2025056155号-1
		</view>
	</view>
</template>

<script>
	import empty from '@/components/empty.vue'
	import RenDropdownFilter from '@/components/ren-dropdown-filter/ren-dropdown-filter.vue'
	// 调用手机系统权限
	// #ifdef APP-PLUS
	import permision from "@/components/permission.js";
	// #endif
	export default {
		components: {
			RenDropdownFilter,
			empty
		},
		onShareAppMessage(res) { //发送给朋友
			return {
				title: this.tuiguang,
				path: '/pages/index/index?invitation=' + this.invitationCode,
				imageUrl: this.tuiguangImg,
			}
		},
		onShareTimeline(res) { //分享到朋友圈
			return {
				title: this.tuiguang,
				path: '/pages/index/index?invitation=' + this.invitationCode,
				imageUrl: this.tuiguangImg,
			}
		},
		data() {
			return {
				tpSel: 0,
				tpCount: 0,
				showTP: false,
				invitationCode: '',
				tuiguang: '',
				tuiguangImg: '',
				city: '请选择城市',
				latitude: '',
				longitude: '',
				page: 1,
				limit: 10,
				orderList: [],
				tabIndex: -1,
				swiperList: [],
				typeList: [],
				value1: 0,
				value2: 0,
				value3: 0,
				defaultIndex: [0, 0, 0],
				classifyId: '',
				filterData: [
					[{
						label: '推荐',
						value: '',
					}, ],
					[{
							label: '价格',
							value: '0',
						},

						{
							label: '从高到低',
							value: '1',
						},
						{
							label: '从低到高',
							value: '2',
						}
					],
					[{
							label: '销量',
							value: '0',
						},
						{
							label: '从高到低',
							value: '1',
						},
						{
							label: '从低到高',
							value: '2',
						}
					],
				],
				txAppKey: '',
				list: [{
					name: '综合排序',
					id: 1
				}, {
					name: '价格',
					id: 2
				}, {
					name: '销量',
					id: 3
				}, {
					name: '好评度',
					id: 4
				}],
				arr: [],
				showModal: true,
				listIndex: 0,
				XCXIsSelect: '否',
			}
		},
		onLoad(e) {

			let that = this
			// 获取邀请码保存到本地
			if (e.invitation) {
				that.$queue.setData('inviterCode', e.invitation);
			}
			// #ifdef MP-WEIXIN
			if (e.scene) {
				const scene = decodeURIComponent(e.scene);
				this.$queue.setData('inviterCode', scene.split(',')[0]);
			}
			// #endif

			that.$Request.getT('/app/common/type/250').then(res => { //商家完成通知
				if (res.code == 0) {
					if (res.data && res.data.value) {
						that.arr.push(res.data.value)
					}
				}
			})

			that.$Request.getT('/app/common/type/248').then(res => { //商家取消通知
				if (res.code == 0) {
					if (res.data && res.data.value) {
						that.arr.push(res.data.value)
					}
				}
			})
			that.$Request.getT('/app/common/type/217').then(res => { //腾讯地图key
				if (res.code == 0) {
					if (res.data && res.data.value) {
						that.txAppKey = res.data.value;
					}
				}
			})
			that.getBannerList();
			that.getZiZhi()
			that.XCXIsSelect = that.$queue.getData('XCXIsSelect');
			that.invitationCode = uni.getStorageSync('invitationCode')
			uni.getLocation({
				type: 'gcj02',
				geocode: true, //设置该参数为true可直接获取经纬度及城市信息
				success: function(res) {
					console.log(res, '地理位置')
					that.latitude = res.latitude
					that.longitude = res.longitude
					uni.setStorageSync('latitude', res.latitude)
					uni.setStorageSync('longitude', res.longitude)

					// #ifdef APP-PLUS
					that.city = res.address.city
					that.selectCity(that.longitude, that.latitude);
					uni.setStorageSync('city', res.address.city)
					// that.page = 1
					// that.getorderlist('')
					that.getKTCityList();
					// #endif

					// #ifdef H5
					that.selectCity(that.longitude, that.latitude);
					// #endif

					// #ifdef MP-WEIXIN
					uni.request({
						url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + that.latitude +
							',' + that.longitude + '&key=' + that.txAppKey,
						success(re) {
							if (re.statusCode === 200) {
								let citydata = re.data.result.address_component.city
								// console.log("获取城市名称成功", citydata)/
								that.city = citydata ? citydata : '未知'
								uni.setStorageSync('city', citydata)
								that.getKTCityList();
								// that.page = 1
								// that.getorderlist('')
							} else {
								console.log("获取信息失败，请重试！")
							}
						}
					});
					// #endif
				},
				fail: function(err) {
					console.log(err);
					// #ifdef APP-PLUS
					that.checkPermission();
					// #endif
				}
			})
			that.page = 1
			that.getorderlist('')
		},
		onShow() {
			this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
			this.$Request.get('/app/common/type/297').then(res => {
				if (res.code == 0) {
					// #ifdef MP-WEIXIN
					this.$queue.setData('XCXIsSelect', res.data.value);
					// #endif
					// #ifndef MP-WEIXIN
					this.$queue.setData('XCXIsSelect', '是');
					// #endif
					this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
				}
			});
			let userId = this.$queue.getData('userId');
			if (userId) {
				this.getTpMy();
				this.getTpCount();
				this.checkNewUser();
				// #ifdef MP-WEIXIN
				//订阅
				if (this.showModal) {
					this.openMsg()
				}
				// #endif
				this.city = uni.getStorageSync('city')
				this.getKTCityList();
				this.latitude = uni.getStorageSync('latitude')
				this.longitude = uni.getStorageSync('longitude')
			}
			this.page = 1
			this.getorderlist('')
		},
		methods: {
			handleGo(){
				window.open('https://beian.miit.gov.cn/','_target')
			},
			goNav(url) {
				let userId = this.$queue.getData('userId');
				if (!userId) {
					uni.navigateTo({
						url: '/pages/public/login'
					});
					return;
				}
				if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
					uni.navigateTo({
						url
					});
				} else {
					//#ifndef H5
					uni.navigateTo({
						url: '/pages/index/webView?url=' + url
					});
					//#endif
					//#ifdef H5
					window.location.href = url;
					//#endif
				}
			},
			async checkPermission() {
				console.log(11111111)
				let status = permision.isIOS ? await permision.requestIOS('location') : await permision.requestAndroid(
					'android.permission.ACCESS_FINE_LOCATION');
				if (status === null || status === 1) {
					status = 1;
				} else if (status === 2) {
					uni.showModal({
						content: "系统定位已关闭",
						confirmText: "确定",
						showCancel: false,
						success: function(res) {}
					})
				} else if (status.code) {
					uni.showModal({
						content: status.message
					})
				} else {
					uni.showModal({
						title: '定位服务已关闭',
						content: "您需要打开定位权限，否则我们将无法获得到您附近的项目服务，导致我们无法为您提供服务，请到>设置>隐私>定位服务>中开启【上门服务】定位权限",
						confirmText: "设置",
						success: function(res) {
							if (res.confirm) {
								permision.gotoAppSetting();
							}
						}
					})
				}
				return status;
			},
			saveTP() {
				let userId = this.$queue.getData('userId');
				if (!userId) {
					uni.navigateTo({
						url: '/pages/public/login'
					});
					return;
				}
				let userName = this.$queue.getData('userName');
				this.$queue.showLoading('投票中...');
				this.$Request.postJson('/app/message/insertMessage', {
						state: 11,
						content: this.city,
						userName: userName,
						userId: userId
					})
					.then(res => {
						if (res.code === 0) {
							uni.showToast({
								title: '投票成功！'
							});
							this.getTpCount();
							this.getTpMy();
						} else {
							uni.hideLoading();
							uni.showModal({
								showCancel: false,
								title: '投票失败',
								content: res.msg
							});
						}
					});
			},
			getTpMy() {
				this.$Request.getT('/app/message/selectMessageByUserId?page=1&limit=1&state=11').then(res => {
					if (res.code == 0) {
						if (res.data && res.data.list && res.data.list.length > 0) {
							this.tpSel = 1;
						} else {
							this.tpSel = 2;
						}
					}
				});
			},
			getTpCount() {
				this.$Request.getT('/app/message/selectCityCount?city=' + this.city).then(res => {
					if (res.code == 0) {
						this.tpCount = res.data ? res.data : 0;
					}
				});
			},
			getCity(e) {
				console.log(e[0].label);
				this.city = e[0].label;
				uni.setStorageSync('city', this.city)
				this.getKTCityList();
				this.page = 1
				this.getlist()
			},
			getKTCityList() {
				let cityName = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市'
				if (cityName === '请选择城市') {
					return;
				}
				this.$Request.getT('/app/trip/selectTripList').then(res => {
					if (res.code == 0) {
						this.cityList = [];
						let isOpen = false
						let cityName = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市'
						res.data.forEach((d, index) => {
							if (cityName === d.city) {
								isOpen = true;
							}
							let data = {}
							data.label = d.city
							data.value = index
							this.cityList.push(data);
						});

						if (!isOpen) {
							// this.orderList = []
							// this.showTP = true;
							// uni.showToast({
							// 	title: '当前城市暂未开通，请切换城市',
							// 	duration: 2000,
							// 	icon: 'none'
							// });
						} else {
							this.showTP = false;
						}
					}
				});
			},
			// 开启订阅消息
			openMsg() {
				console.log('订阅消息')
				var that = this
				uni.getSetting({
					withSubscriptions: true, //是否获取用户订阅消息的订阅状态，默认false不返回
					success(ret) {
						console.log(ret.subscriptionsSetting, '------------------')
						// if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
						if (ret.subscriptionsSetting.itemSettings) {
							uni.setStorageSync('sendMsg', true)
							uni.openSetting({ // 打开设置页 
								success(rea) {
									console.log(rea.authSetting)
								}
							});
						} else { // 用户没有点击“总是保持以上，不再询问”则每次都会调起订阅消息
							uni.setStorageSync('sendMsg', false)
							uni.showModal({
								title: '提示',
								content: '为了更好的体验,请绑定消息推送',
								confirmText: '确定',
								cancelText: '取消',
								success: function(res) {
									if (res.confirm) {
										wx.requestSubscribeMessage({
											tmplIds: that.arr,
											success(re) {
												var datas = JSON.stringify(re);
												if (datas.indexOf("accept") != -1) {
													console.log(re)
													// uni.setStorageSync('sendMsg', true)
												}
											},
											fail: (res) => {
												console.log(res)
											}
										})
										// uni.setStorageSync('sendMsg', true)

										that.showModal = false
									} else if (res.cancel) {
										console.log('取消')
										// uni.setStorageSync('sendMsg', false)
										that.showModal = true
									}
								}
							})
						}
					}
				})
			},
			// 分享文案和图片
			getZiZhi() {
				this.$Request.getT('/app/common/type/299').then(res => { //分享文案 299
					if (res.code === 0) {
						this.tuiguang = res.data.value;
					}
				});
				this.$Request.getT('/app/common/type/300').then(res => { //分享图片 300
					if (res.code === 0) {
						this.tuiguangImg = res.data.value;
					}
				});
			},
			// 筛选
			change(index) {
				// this.value1 = e[0][0].value
				// this.value2 = e[1][0].value
				// this.value3 = e[2][0].value
				this.listIndex = index
				this.page = 1
				this.getorderlist('')
			},
			GetQuan() {
				let userId = this.$queue.getData('userId');
				this.$Request.getT('/app/coupon/insertNewUserCoupon').then(res => {
					if (res.code == 0) {
						this.$refs.popushongbao.close();
						this.$queue.showToast('领取成功！')
						setTimeout(d => {
							uni.navigateTo({
								url: '/my/hongbao/youhuijuan'
							});
						}, 1000);
					} else {
						this.$queue.showToast(res.msg)
					}
				});
			},
			checkNewUser() {
				this.$Request.getT("/app/user/selectUserById").then(res => {
					if (res.code == 0) {
						if (res.data && res.data.isCoupon != 1) {
							setTimeout(d => {
								this.$refs.popushongbao.open();
							}, 2000);
						}
						if (!res.data.wxOpenId) { //授权微信
							let url = window.location.origin + '/pages/index/order/test'
							console.log('url==========', url);
							return window.location.href =
								`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbcba29ef4f698074&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect`
						}
					}
				});
			},
			//获取轮播图
			getBannerList() {
				this.$Request.get("/app/banner/selectBannerList", {
					classify: 1
				}).then(res => {
					if (res.code == 0) {
						this.swiperList = res.data
						console.log(this.swiperList);
					}
				});

				this.$Request.get("/app/dict/list", {
					type: '服务类型'
				}).then(res => {
					if (res.code == 0) {
						if (res.data) {
							this.typeList = res.data
							console.log(res.data, 'dsaaaa');
							this.classifyId = res.data[0].id;
							this.page = 1
							this.getorderlist('')
						}
					}
				});
			},
			// 跳转订单
			goOrder(e) {
				// #ifdef MP-WEIXIN
				if (uni.getStorageSync('sendMsg')) {
					wx.requestSubscribeMessage({
						tmplIds: this.arr,
						success(re) {
							var datas = JSON.stringify(re);
							if (datas.indexOf("accept") != -1) {
								console.log(re)
							}
						},
						fail: (res) => {
							console.log(res)
						}
					})
				}
				// #endif
				let token = this.$queue.getData('token')
				if (token) {
					uni.navigateTo({
						url: '/pages/index/order/order?massageTypeId=' + e.massageTypeId
					});
				} else {
					uni.navigateTo({
						url: '/pages/public/login'
					});
				}

			},
			// 选择城市
			goSelectCity() {
				uni.navigateTo({
					url: '/pages/index/citys/citys'
				});
			},
			// 跳转搜索
			goSearch(index) {
				// #ifdef MP-WEIXIN
				if (uni.getStorageSync('sendMsg')) {
					wx.requestSubscribeMessage({
						tmplIds: this.arr,
						success(re) {
							var datas = JSON.stringify(re);
							if (datas.indexOf("accept") != -1) {
								console.log(re)
							}
						},
						fail: (res) => {
							console.log(res)
						}
					})
				}
				// #endif
				uni.navigateTo({
					url: '/pages/index/search/index?index=' + index
				});
			},
			selectCity(longitude, latitude) {
				this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
					if (res.code == 0) {
						this.city = res.data.city ? res.data.city : '未知'
						uni.setStorageSync('city', res.data.city)
						this.page = 1
						this.getorderlist('')
						this.getKTCityList();
					}
				});
			},
			selTab(index, id) {
				// #ifdef APP-PLUS
				if (this.latitude === '' || this.longitude === '') {
					this.checkPermission();
					return;
				}
				// #endif
				this.tabIndex = index;
				this.classifyId = id;
				this.page = 1
				this.getorderlist('')
			},
			getorderlist(type) {
				console.log('city', this.city);
				let city = this.city;
				if (this.city === '请选择城市') {
					// city = '';
					if (type === 'refresh') {
						uni.stopPullDownRefresh();
					}
					return;
				}
				let index = this.list[this.listIndex].id
				let data = {
					classifyId:this.tabIndex==-1?0: this.classifyId,
					page: this.page,
					limit: this.limit,
					status: 1,
					by: index, //销量
					latitude: this.latitude,
					longitude: this.longitude,
					city: city
				}
				this.$Request.get("/app/artificer/selectMassageTypePage", data).then(res => {
					if (res.code == 0) {
						if (this.page == 1) {
							for (let i = 0; i < res.data.list.length; i++) {
								if (res.data.list[i].labels) {
									res.data.list[i].labels = res.data.list[i].labels.split(",");
								} else {
									res.data.list[i].labels = []
								}
							}
							this.orderList = res.data.list
						} else {
							for (let i = 0; i < res.data.list.length; i++) {
								if (res.data.list[i].labels) {
									res.data.list[i].labels = res.data.list[i].labels.split(",");
								} else {
									res.data.list[i].labels = []
								}
							}
							this.orderList = [...this.orderList, ...res.data.list]
						}
						// if (this.orderList.length == 0) {
						// 	this.orderList = []
						// 	uni.showToast({
						// 		title: '当前城市暂未开通，请切换城市',
						// 		duration: 2000,
						// 		icon: 'none'
						// 	});
						// }
					}

					if (type === 'refresh') {
						uni.stopPullDownRefresh();
					}
				})
			}
		},
		onReachBottom: function() {
			this.page = this.page + 1;
			this.getorderlist('')
		},
		onPullDownRefresh: function() {
			this.page = 1;
			this.getorderlist('refresh');
			this.getZiZhi()
		}
	}
</script>

<style lang="scss">
	.icon-box {
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-right: 50rpx;
	}

	.type_box {
		display: flex;
		align-items: center;
		margin-top: 20rpx;
	}

	page {
		background: linear-gradient(179deg, #FFC2D5 0%, #F6F6F6 800rpx);
	}

	.bg {
		background: #FFFFFF;
	}

	.ytp_view {
		background: #e3e3e3;
		width: 400rpx;
		border-radius: 10rpx;
		font-size: 28rpx;
		text-align: center;
		height: 80rpx;
		line-height: 80rpx;
		color: #848484;
		margin-top: 40rpx;
	}

	.tp_view {
		background: #ee6c54;
		width: 400rpx;
		border-radius: 10rpx;
		font-size: 28rpx;
		text-align: center;
		height: 80rpx;
		line-height: 80rpx;
		color: #FFFFFF;
		margin-top: 40rpx;
	}

	.bannerImg {
		width: 686rpx;
		height: 320upx;
		border-radius: 32rpx;
	}

	.box {
		// width: 128rpx;
		height: 48rpx;
		line-height: 48rpx;
		background: #FFECF2;
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		text-align: center;
		letter-spacing: 2rpx;
		margin-right: 8upx;
		font-size: 24rpx;
		padding: 0 16rpx;
		color: #FF6E98;
	}

	.list_item {
		// width: 650upx;
		// height: 160upx;
		width: 92%;
		// margin: 30rpx 0;
		background: #FFFFFF;
		border-radius: 24upx;
		padding: 20upx;
		display: flex;
		align-items: center;
		margin-bottom: 20upx;

		.listitem_rightview {
			margin-left: 20upx;
			width: 80%;
			padding-top: 10rpx;

			.btnview {
				display: flex;
				align-items: center;
				justify-content: space-between;
				// margin-top: 12upx;
				width: 100%;
			}

			.titleview {
				display: flex;
				align-items: flex-end;
				justify-content: space-between
			}

			.moneyview {
				display: flex;
				align-items: flex-end;

				image {
					width: 30upx;
					height: 30upx;
					margin-left: 20upx;
					margin-bottom: 2upx;
				}
			}

			.item_time {
				font-size: 24upx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
				margin-left: 10upx;
			}

			.item_money {
				font-size: 40rpx;
				font-family: PingFang SC;
				font-weight: 800;
				color: #FF6E98;

				.oldPrice_view {
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					text-decoration: line-through;
					color: #AAAAAA;
					margin-left: 8rpx;
				}

				text {
					font-size: 24upx;
				}
			}

			.item_oldmoney {
				font-size: 24upx;
				font-family: PingFang SC;
				font-weight: 500;
				text-decoration: line-through;
				color: #999999;
				margin-left: 10upx;
			}

			.item_btn {
				width: 160upx;
				height: 64rpx;
				background: linear-gradient(313deg, #FFE6EE 0%, #FFBACA 100%);
				border-radius: 36rpx;
				text-align: center;
				line-height: 64rpx;
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #222222;
				position: relative;
			}

			.item_yishou {
				font-size: 22upx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
			}

			.item_title {
				width: 320rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				font-size: 28upx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #1E1F31;
			}
		}

		image {
			width: 220upx;
			height: 160upx;
			border-radius: 24upx;
		}
	}

	.tabview1 {
		border-radius: 24rpx;
		z-index: 99;

		.tabview {
			// width: 686upx;
			// // height: 100upx;
			background: #F2FFF9;
			border-radius: 24rpx 24rpx 0 0;
			// margin-top: -50upx;
			// z-index: 99;
			display: flex;
			line-height: 100upx;

			.tabItem_sel {
				font-size: 30upx;
				font-family: PingFang SC;
				font-weight: 800;
				color: #20C675;
				flex: 1;
				text-align: center;
			}

			.tabItem {
				font-size: 26upx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
				flex: 1;
				text-align: center;
			}
		}

		.tabsx {
			width: 686upx;
			border-radius: 24rpx;
			padding-bottom: 10rpx;
			display: flex;
			align-items: center;
			padding: 20rpx 30rpx;
			font-size: 26rpx;

			.active {
				color: #FF6E98;
				font-size: 28rpx;
				font-weight: bold;
				padding: 4rpx 15rpx;
				box-sizing: border-box;
				background: linear-gradient(313deg, #FFE6EE 0%, #FFBACA 100%);
				border-radius: 36rpx 36rpx 36rpx 36rpx;
			}

			.normal {
				border-radius: 36rpx 36rpx 36rpx 36rpx;
				background-color: #fff;
				padding: 4rpx 15rpx;
			}
		}
	}

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

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>