<template>
	<view class="page">
		<u-navbar title="门店详情" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000"
			title-size='44' height='40'></u-navbar>
		<image src="https://api.ccttiot.com/smartmeter/img/static/usAJ4tIRtLh7lOQy5Ij6" class="bjimg" mode=""></image>
		<view class="listbox" v-if="falga">
			<view class="moshi">
				<image src="https://api.ccttiot.com/smartmeter/img/static/uqv3e5ThWL8DqrRNBfoA" mode="aspectFit"
					@click="btndt(1)"></image>
				<image src="https://api.ccttiot.com/smartmeter/img/static/u7yxUJZqgPzESeI4tmiz" mode="aspectFit"
					@click="btndt(2)" v-if="isMch"></image>
			</view>
			<view class="saoyisao">
				<view @click="scanQRCode">
					<image src="https://api.ccttiot.com/smartmeter/img/static/uBh15vzRx6gV0wRQj7gi" mode="aspectFit"></image>
					<text>扫一扫</text>
				</view>
			</view>
		</view>
         <view class="pic">
			<view class="container">
			    <swiper
			      class="swiper"
			      indicator-dots="true"
			      autoplay="true"
			      interval="3000"
			      duration="500"
			      circular="true"
			    >
			      <swiper-item v-for="(item, index) in listobj.picture.split(',')" :key="index">
			        <image :src="item" class="slide-image" mode="aspectFill"></image>
			      </swiper-item>
			    </swiper>
			  </view>
         </view>
		<view class="list_item" v-if="falgb">
			<view class="list">
				<view class="cen">
					<view class="" style="display: flex;justify-content: space-between;width: 100%;">
						<view class="cena" style="font-weight: 600;">
							<image src="https://api.ccttiot.com/smartmeter/img/static/uG3yQ6rqronIihzq1HaB" mode="aspectFit"></image> {{listobj.name == undefined ? '--' : listobj.name}}
						</view>
						<view class="right">
							<image src="https://api.ccttiot.com/smartmeter/img/static/u4Q5lajsFuAv7YEzBFib" mode="aspectFit"
								@click.stop="mapFun(item)"></image>
							<image src="https://api.ccttiot.com/smartmeter/img/static/uPeCVStFHIF0rAhMKhlK" mode="aspectFit"
								@click.stop="btntel(item)"></image>
						</view>
					</view>
					<view class="cenb">
						<image src="https://api.ccttiot.com/smartmeter/img/static/uHK2aJHvzEm3nbOPwpdr" mode="aspectFit"></image>
						{{listobj.address == undefined ? '--' : listobj.address}}
					</view>
					<view class="cenc">
						营业时间：{{listobj.businessTimeStart == undefined ? '--' : listobj.businessTimeStart}}-{{listobj.businessTimeEnd == undefined ? '--' : listobj.businessTimeEnd}}
					</view>
				</view>
			</view>
			
			<view class="warp_box" style="width: 100%;
                   height: 100%;
                   overflow: scroll;
                   position: relative;
                   top: -100rpx;">
				<view class="swiper" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
					<view>
						<view class="swiper-item ">
							<view class="card_box" v-for="(item,index) in wateringList" :key="index">
								<view class="card" @click="btnxq(item.deviceNo)">
									<view class="card_right">
										<image v-if="item.customPicture" :src="item.customPicture" mode="aspectFit"></image>
										<image v-else :src="item.picture" mode="aspectFit"></image>
									</view>
									<view class="card_left">
										<view class="card_left_tit">
											{{item.deviceName}}
										</view>
										<view class="card_left_sta">
											<image
												src="https://api.ccttiot.com/smartmeter/img/static/uZSiz7XWpxcXEkl6sTwj"
												mode="aspectFit"></image>
											<view class="sta_txt" v-if="item.status==3">
												维修中
											</view>
											<view class="sta_txt" v-if="item.status==2" style="color:greenyellow;">
												使用中
											</view>
											<view class="sta_txt" v-if="item.status==1" style="color:seagreen;">
												空闲
											</view>
										</view>
										<view class="card_left_no">
											S/N码：{{item.deviceNo}}
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					
					<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
						<image style="width: 200rpx;height: 200rpx;"
							src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode="aspectFit"></image>
						<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多设备...</view>
					</view>
					
				</view>
			</view>
			<view class="saoma" @click="scanQRCode">
				<view>
					<image src="https://api.ccttiot.com/smartmeter/img/static/uBh15vzRx6gV0wRQj7gi" mode="aspectFit"></image>
					扫一扫
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				latitude: '', // 初始纬度  
				longitude: '', // 初始经度   
				covers: [], // 覆盖物数组  
				index: 1,
				falga: true,
				falgb: false,
				storeId: '',
				listobj: {},
				mapname: '',
				mapaddress: '',
				isMch: '',
				bgc: {
					backgroundColor: "",
				},
				mapScale: 15,
				mapContext: null,
				mapScaleInterval: null,
				listmap: [],
				iconflag: false,
				pagenum: 1,
				wateringList: [],
				pagesize: 10,
				isLoading: false,
				noMoreData: false,
				total: 0,
				showflag:false,
			}
		},
		onLoad(option) {
			this.storeId = option.markerId
			if (option.markerId) {
				this.falga = false
				this.falgb = true
			}
			this.getxq()
			this.getlist()
		},
		onReady() {
			this.mapContext = uni.createMapContext('map', this);
			this.mapScaleInterval = setInterval(this.updateMarkers, 1000);
		},
		beforeDestroy() {
			// 在组件卸载前清除定时器  
			if (this.mapScaleInterval) {
				clearInterval(this.mapScaleInterval);
				this.mapScaleInterval = null;
			}
		},
		// 分享到好友（会话）
		  onShareAppMessage: function () {  
		    return {  
		      title: '创想物联',  
		      path: '/pages/shouye/index'  
		    }  
		  },  
		  
		  // 分享到朋友圈  
		  onShareTimeline: function () {  
		    return {  
		      title: '创想物联',  
		      query: '',  
		      path: '/pages/shouye/index'  
		    }  
		  },
		methods: {
			// 点击拨打电话
			btntel(){
				uni.makePhoneCall({
					phoneNumber: this.listobj.contactMobile,
					success: function(res) {
						console.log('拨打电话成功', res)
					},
					fail: function(err) {
						console.error('拨打电话失败', err)
						uni.showToast({
							title: '未配置客服电话',
							icon: 'none'
						})
					}
				})
			},
			getlist() {
				this.$u.get(`/app/device/listByStore/${this.storeId}?pageNum=${this.pagenum}&pageSize=${this.pagesize}`)
					.then((res) => { 
						if (res.code == 200) {
							this.total = res.total
							if (this.total > 0) {
								this.showflag = false
							} else {
								this.showflag = true
							}
							if (res.rows.length > 0) {
								// 有数据，追加到列表  
								this.wateringList = this.wateringList.concat(res.rows)
								this.pagenum++
							} else {
								// 没有更多数据  
								this.noMoreData = true;
							}
							this.isLoading = false;
						}
					})
			},
			onReachBottom() {
				let sum = this.total / this.pagesize
				if (this.pagenum - 1 < sum) {
					this.getlist(); // 上拉加载更多  
				} else {
					uni.showToast({
						title: '没有更多设备了',
						icon: 'none',
						duration: 1000
					});
				}
			},
			// 查询拖动到指定为止的店铺
			regionchange(e) {
				this.iconflag = true
				if (e.type == 'end') {
					this.jinweidu = e.detail.centerLocation.longitude + ',' + e.detail.centerLocation.latitude
					this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 20000).then(res => {
						if (res.code == 200) {
							this.covers = []
							this.listmap = res.data
							// this.gxlist = res.data
							// this.gxlist.forEach(item => {
							// 	// if (item.deviceCount !== null && item.deviceCount > 0) {
							// 	const shopCover = {
							// 		id: parseFloat(item.storeId),
							// 		latitude: item.lat,
							// 		longitude: item.lng,
							// 		width: 25,
							// 		height: 30,
							// 		iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
							// 		// iconPath:item.picture
							// 		label: {
							// 			content: item.name,
							// 			anchorX: this.calculateAnchorX(item.name),
							// 			fontWeight: 700,
							// 			color: '#8883F0',
							// 			borderColor: '#fff',
							// 			borderRadius: 5,
							// 			bgColor: '#fff'
							// 		}
							// 	}
							// 	this.covers.push(shopCover)
							// 	// console.log(this.covers);
							// 	// }
							// })
						}
					})
					this.iconflag = false
				} else {
					// this.iconflag = false
				}
			},
			updateMarkers() {
				this.mapContext.getScale({
					success: (res) => {
						this.covers = []; // 清空之前的覆盖物  
						if (res.scale <= 14) {
							this.addMarkersWithoutLabels();
						} else {
							this.addMarkersWithLabels();
						}
					},
					fail: (error) => {
						// console.error('获取地图缩放级别失败：', error);
					},
				})
			},
			addMarkersWithoutLabels() {
				this.listmap.forEach((item) => {
					// if (item.deviceCount !== null && item.deviceCount > 0){
						const shopCover = {
						id: parseFloat(item.storeId),
						latitude: item.lat,
						longitude: item.lng,
						width: 25,
						height: 30,
						iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
						borderColor:'#fff',
						borderRadius:5,
						bgColor: '#fff'
					};
					this.covers.push(shopCover);
					// }
				});
			},
			addMarkersWithLabels() {
				this.listmap.forEach((item) => {
					// if (item.deviceCount !== null && item.deviceCount > 0){
						const shopCover = {
						id: parseFloat(item.storeId),
						latitude: item.lat,
						longitude: item.lng,
						width: 25,
						height: 30,
						iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
						label: {
							content: item.name,
							anchorX: this.calculateAnchorX(item.name),
							fontWeight: 700,
							color: '#8883F0',
							textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
							borderColor:'#fff',
							borderRadius:5,
							bgColor: '#fff'
						}
					}
					this.covers.push(shopCover);
					// }
					
				});
			},
			calculateAnchorX(name) {
				let chineseLength = 0;
				let englishLength = 0;
				for (let i = 0; i < name.length; i++) {
					const charCode = name.charCodeAt(i);
					// 判断是否为中文字符（这里简化了判断，只考虑了基本的中文字符范围）  
					if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
						chineseLength++;
					} else if (/[a-zA-Z]/.test(name[i])) { // 判断是否为英文字符  
						englishLength = englishLength + 0.3; // 英文长度加0.3，但视为两个中文字符长度  
					}
				}
				const totalLength = chineseLength + englishLength * 2; // 总长度（以中文字符为单位）  
				return -totalLength * 6.5; // 假设每个中文字符对应的 anchorX 偏移是 -6.5
			},

			scanQRCode() {
				uni.scanCode({
					onlyFromCamera: true,
					scanType: ['qrCode'],
					success: res => {
						function getQueryParam(url, paramName) {
							let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
							let results = regex.exec(url);
							return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
						}
						let sceneValue = res.result
						let decodedValue = decodeURIComponent(sceneValue);
						let id = getQueryParam(decodedValue, 's')
						this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
							if (res.code == 200) {
								uni.navigateTo({
									url: '/page_components/fuwu/index?id=' + id
								})
							}
						})
					},
					fail: err => {
						console.error('扫描失败：', err);
						uni.showToast({
							title: '扫描失败',
							icon: 'none'
						});
					}
				});
			},

			btnchak(id) {
				uni.navigateTo({
					url: '/page_fenbao/sbshouye?storeId=' + id
				})
			},

			getxq() {
				this.$u.get("/app/store/" + this.storeId).then(res => {
					if (res.code == 200) {
						this.listobj = res.data
					}
				})
			},
			getshanghu() {
				this.$u.get("/app/user/userInfo").then((res) => {
					if (res.code == 200) {
						this.isMch = res.data.isMch
					}
				})
			},

			mapFun() {
				uni.openLocation({
					latitude: this.listobj.lat, //纬度 - 目的地/坐标点
					longitude: this.listobj.lng, //经度 - 目的地/坐标点
					name: this.mapname, //地点名称
					address: this.mapaddress //详细地点名称
				});
			},

			// 地图回正
			async setMapScale(e, val) {
				let mapContext = uni.createMapContext('map', this);
				let setScale = () => {
					return new Promise((resolve, reject) => {
						mapContext.getScale({
							success: r => {
								this.mapScale = 15
								resolve()
							}
						})
					})
				};
				await setScale();
				mapContext.moveToLocation({
					success: (res) => {
						const timer = setTimeout(() => {
							this.mapScale = 15
							clearTimeout(timer);
						}, 500);
					},   
				})
			},
            btnxq(id) {
            	uni.navigateTo({
            		url: '/page_components/fuwu/index?id=' + id
            	})
            },
			getMyLocation() {
				uni.getLocation({
					type: 'wgs84',
					success: (res) => {
						this.jinweidu = res.longitude + ',' + res.latitude
						this.latitude = Number(res.latitude.toFixed(5)) - 0.005
						this.longitude = Number(res.longitude.toFixed(5)) + 0.005
						this.setMapScale()
						// 请求附近的店铺  
						this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 20000).then(
							res => {
								if (res.code == 200) {
									this.listmap = res.data
									// 假设返回的店铺数据在res.rows中，并且每个店铺有latitude和longitude字段  
									res.data.forEach(item => {
										// if (item.deviceCount !== null && item.deviceCount > 0) {
											const shopCover = {
												id: parseFloat(item.storeId),
												latitude: item.lat,
												longitude: item.lng,
												width: 25,
												height: 30,
												iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
												label: {
													content: item.name,
													anchorX: (() => {
														if (item.name.length <= 2) {
															return -12
														} else if (item.name.length <= 3) {
															return -20
														} else if (item.name.length <= 4) {
															return -25
														} else if (item.name.length <= 5) {
															return -30
														} else if (item.name.length <= 6) {
															return -35
														} else if (item.name.length <= 8) {
															return -40
														} else if (item.name.length <= 10) {
															return -45
														} else {
															return -item.name.length * 5
														}
													})(),
													fontWeight: 700,
													color: '#8883F0',
													textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
													borderColor:'#fff',
													borderRadius:5,
													bgColor: '#fff'
												}
											};
											this.covers.push(shopCover);
										// }

									});
								}
							});
					},
					fail: (err) => {
						console.error('获取位置失败：', err);
					}
				});
			},

			handleMarkerClick(e) {
				console.log(e);
				this.$u.get("/app/store/" + e.markerId).then(res => {
					if (res.code == 200) {
						this.listobj = res.data
						this.mapname = res.data.city
						this.mapaddress = res.data.address
					}
				})
				this.falga = false
				this.falgb = true
			},


			btntab(num) {
				this.index = num
			},

			btndt(num) {
				if (num == 1) {
					uni.navigateBack()
				}
			},

			btnitem() {
				this.falga = false
				this.falgb = true
			}
		},
		mounted() {
			this.getMyLocation();
		}
	}
</script>

<style lang="scss">
	/deep/ .u-title {
		padding-bottom: 22rpx;
	}

	/deep/ .u-icon__icon {
		padding-bottom: 22rpx;
	}

	/deep/ .map {
		width: 100%;
		height: 100%;
	}

	page {
		background:#f8f8f8;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}
    .bjimg{
		width: 100%;
		height: 180rpx;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 99;
	}
	.pic {
		width: 100%;
		height: 434rpx;
		image {
			width: 100%;
			height: 434rpx;
			mode: "aspectFill";
		}
		.container {
		  height: 100%;
		  display: flex;
		  justify-content: center;
		  align-items: center;
		}
		 
		.swiper {
		  width: 100%;
		  height: 100%; /* 根据需要调整高度 */
		}
		 
		.slide-image {
		  width: 100%;
		  height: 100%;
		}
	}
	.page {
		// width: 750rpx;
		// position: fixed;
		// top: 0;
		// left: 0;
        .swiper {
        	.swiper-item {
        		height: 100%;
        
        		.card_box {
        			margin-top: 34rpx;
        			display: flex;
        			flex-wrap: wrap;
        
        			.card {
        				display: flex;
						// justify-content:space-between;
        				margin-top: 20rpx;
        				width: 672rpx;
        				height: 250rpx;
        				background: #fff;
        				box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(255, 255, 255, 0);
        				border-radius: 24rpx 24rpx 24rpx 24rpx;
        
        				.card_left {
        					width: 310rpx;
        					margin-top: 46rpx;
        					margin-left: 50rpx;
        
        					.card_left_tit {
        						font-size: 44rpx;
        						font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
        						font-weight: 500;
        						color: #8883F0;
        					}
        
        					.card_left_sta {
        
        						margin-top: 15rpx;
        						display: flex;
        						flex-wrap: nowrap;
        						align-items: center;
        
        						image {
        							width: 23.32rpx;
        							height: 36.47rpx;
        
        						}
        
        						.sta_txt {
        							margin-left: 15rpx;
        							color: #262B37;
        							font-size: 26rpx;
        							font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
        							font-weight: 400;
        						}
        					}
        
        					.card_left_no {
        						margin-top: 15rpx;
        						font-size: 26rpx;
        						font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
        						font-weight: 400;
        						color: #95989D;
        					}
        				}
        
        				.card_right {
        					margin-top: 30rpx;
        					margin-left: 40rpx;
        
        					image {
        						width: 180rpx;
        						height: 180rpx;
        						border-radius: 20rpx;
        					}
        				}
        			}
        		}
        	}
        }
		.list_item {
			// position: fixed;
			//     top: 160rpx;
			//     left: 50%;
			//     -webkit-transform: translateX(-50%);
			//     transform: translateX(-50%);
			    width: 100%;
			    max-height: 9999rpx;
			    background: #f8f8f8;
			    margin: auto;
			    padding: 46rpx 40rpx;
				padding-bottom: 100rpx;
			    box-sizing: border-box;
                
			.chakan {
				display: flex;
				justify-content: space-between;
				width: 625rpx;
				height: 60rpx;
				line-height: 60rpx;
				padding: 0 22rpx;
				box-sizing: border-box;
				background: #D9D8FF;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
				margin-top: 10rpx;

				view {
					font-size: 28rpx;
					color: #8883F0;
				}
			}

			.anniu {
				display: flex;
				    justify-content: space-between;
				    margin-top: 20rpx;
				    position: fixed;
				    left: 50%;
				    transform: translateX(-50%);
				    width: 100%;
				    padding: 60rpx;
				    bottom: 20rpx;

				view {
					width: 300rpx;
					height: 82rpx;
					line-height: 80rpx;
					border-radius: 45rpx 45rpx 45rpx 45rpx;
					border: 2rpx solid #8883F0;
					text-align: center;
					font-weight: 500;
					font-size: 36rpx;
					color: #8883F0;
					;
				}
			}
			.list {
				display: flex;
				padding-bottom: 16rpx;
                justify-content: space-between;
				align-items: center;
                width:100%;
                height: 210rpx;
				box-sizing: border-box;
                border-radius: 20rpx;
				padding: 0 20rpx;
                background: #FFFFFF;
                box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.15);
				position: relative;
				top: -100rpx;
				left: 50%;
				transform: translateX(-50%);
				.cen {
					margin-left: 20rpx;
					width: 100%;
					.right{
						padding-top: 0;
						image{
							margin-right: 10rpx;
							width: 58rpx;
							height: 58rpx;
						}
					}
					.cena {
						image{
							width: 44rpx;
							height: 42rpx;
							margin-right: 10rpx;
						}
						display: flex;
						align-items: center;
						font-weight: 500;
						font-size: 30rpx;
						color: #3D3D3D;
						line-height: 38rpx;
					}
					.cenb {
						font-weight: 400;
						font-size: 26rpx;
						color: #3D3D3D;
						line-height: 32rpx;
						margin-top: 14rpx;
						image {
							display: inline-block;
							width: 22rpx;
							height: 22rpx;
							margin-right: 6rpx;
						}
					}
					.cenc {
						font-weight: 400;
						font-size: 26rpx;
						color: #3D3D3D;
						line-height: 32rpx;
						margin-top: 14rpx;
						text {
							display: inline-block;
							padding: 4rpx 18rpx;
							box-sizing: border-box;
							border-radius: 20rpx;
						}
						.bu {
							margin-left: 22rpx;
							background: #D9D8FF;
							color: #4D48B5;
						}
					}
				}
				.right {
					padding-top: 40rpx;
					image {
						width: 40rpx;
						height: 40rpx;
					}
					text {
						display: block;
						font-weight: 400;
						font-size: 20rpx;
						color: #808080;
						line-height: 28rpx;
					}
				}
			}
		}

		.picsm {
			width: 48rpx;
			height: 48rpx;
			vertical-align: middle;
			display: inline-block;
			margin-bottom: 10rpx;
			margin-right: 10rpx;
		}

		.dtxs {
			width: 100%;
			height: 100vh;
			// position: fixed;
			// top: 0;
			// left: 0;
			// z-index: -1;
			.picimg {
				width: 120rpx;
				height: 120rpx;
				position: absolute;
				left: 50%;
				transform: translateX(-50%);
				top: 50%;
			}
		}

		.listbox {
			background: #FFFFFF;
			border-radius: 64rpx 64rpx 0 0;
			box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
			height: 186rpx;
			width: 100%;
			overflow-y: scroll;
			// position: fixed;
			// bottom: 0;
			// left: 0;

			.saoyisao {
				margin-top: 44rpx;

				view {
					border-radius: 54rpx 54rpx 54rpx 54rpx;
					text-align: center;
					width: 676rpx;
					height: 102rpx;
					background: linear-gradient(90deg, #8883F0 0%, #837EEB 100%);
					line-height: 102rpx;
					margin: auto;

					image {
						width: 56rpx;
						height: 56rpx;
						vertical-align: middle;
						display: inline-block;
						margin-bottom: 12rpx;
						margin-right: 10rpx;
					}

					text {
						font-weight: 500;
						font-size: 40rpx;
						color: #FFFFFF;
					}
				}
			}

			.moshi {
				position: fixed;
				bottom: 210rpx;
				left: 30rpx;
				z-index: 99;

				image {
					width: 210rpx;
					height: 74rpx;
				}
			}

			.title {
				border-radius: 64rpx 64rpx 0 0;
				display: flex;
				justify-content: space-between;
				font-weight: 500;
				font-size: 36rpx;
				color: #3D3D3D;
				line-height: 160rpx;
				padding: 0 76rpx;
				width: 100%;
				background-color: #fff;
				// position: fixed;
				// height: 160rpx;
				// top: 40vh;
				// left: 0;
				padding-bottom: 20rpx;
			}

		}
	}
    .saoma {
    	width: 750rpx;
    	height: 166rpx;
    	background: #FFFFFF;
    	position: fixed;
    	left: 0;
    	bottom: 0;
    	padding-top: 22rpx;
    	border-radius: 54rpx 54rpx 0 0;
    	margin-top: 20rpx;
    	view {
    		text-align: center;
    		width: 676rpx;
    		height: 102rpx;
    		background: linear-gradient(270deg, #8883F0 0%, #8883F0 100%);
    		border-radius: 54rpx 54rpx 54rpx 54rpx;
    		font-weight: 500;
    		font-size: 40rpx;
    		color: #FFFFFF;
    		margin: auto;
    		line-height: 102rpx;
    	}
    	image {
    		width: 56rpx;
    		height: 56rpx;
    		vertical-align: middle;
    		margin-right: 10rpx;
    		margin-bottom: 10rpx;
    	}
    }
	.active {
		border-bottom: 10rpx solid #D9D8FF;
		border-radius: 7rpx;
		padding-bottom: 10rpx;
		font-weight: 700;
	}
</style>