<template>
	<view class="container">
    <!--                 -->
		<view class="container_title">
			<l-liquid v-model:current="modelVale" :percent="target" :outline="true" background="#007545"
				waveColor="#007545" innerColor="rgba(#007545, 0.1)">
				<text class="liquid_text">{{devicedata.soc*1}} <text class="income_unit">%</text></text>
			</l-liquid>
		</view>
		<view class="container_box">
			<view class="income_box">
				<view class="income_top">
					<view class="income_yesterday_discharge">
						<image class="income_image" src="/static/put.png" mode="aspectFit" />
						<view class="income_yesterday1" v-if="devicedata.conscolidationType==0">
						<!-- 空闲 -->
						{{$t('hostdetails.idle')}}
						</view>
						<view class="income_yesterday1" v-if="devicedata.conscolidationType==1">
						<!-- 充电 -->
						{{$t('hostdetails.charging')}}
						</view>
						<view class="income_yesterday1" v-if="devicedata.conscolidationType==2">
						<!-- 放电 -->
						{{$t('hostdetails.discharging')}}
						</view>
						<view class="income_yesterday1" v-if="devicedata.conscolidationType==3">
						<!-- 充满 -->
						{{$t('hostdetails.full')}}
						</view>
						<view class="income_yesterday1" v-if="devicedata.conscolidationType==4">
						<!-- 放空 -->
						{{$t('hostdetails.empty')}}
						</view>
						<view class="income_yesterday1" v-if="devicedata.conscolidationType==5">
						<!-- 故障 -->
						{{$t('hostdetails.fault')}}
						</view>
						<!-- <view class="income_yesterday2">-1元</view> -->
					</view>
				
					<view class="income_tired_soc">
						<image class="income_image" src="/static/soc.png" mode="aspectFit" />
						<!-- <view class="income_tired1">今日放电</view> -->
						<view class="income_tired2">{{devicedata.soc*1}} <text class="income_unit">%</text></view>
					</view>
				</view>
				<view class="income">
					<view class="income_yesterday">
						<view class="income_yesterday1">{{$t('hostdetails.va')}}：</view>
						<view class="income_yesterday2">{{devicedata.abLinevoltage*1}} <text class="income_unit">V</text></view>
					</view>
				
					<view class="income_tired">
						<view class="income_tired1">{{$t('hostdetails.ia')}}：</view>
						<view class="income_tired2">{{devicedata.aphasecurrent*1}} <text class="income_unit">A</text></view>
					</view>
				</view>
				<view class="income">
					<view class="income_yesterday">
						<view class="income_yesterday1">{{$t('hostdetails.vb')}}：</view>
						<view class="income_yesterday2">{{devicedata.bcLinevoltage*1}} <text class="income_unit">V</text></view>
					</view>
				
					<view class="income_tired">
						<view class="income_tired1">{{$t('hostdetails.ib')}}：</view>
						<view class="income_tired2">{{devicedata.bphasecurrent*1}} <text class="income_unit">A</text></view>
					</view>
				</view>
				<view class="income">
					<view class="income_yesterday">
						<view class="income_yesterday1">{{$t('hostdetails.vc')}}：</view>
						<view class="income_yesterday2">{{devicedata.caLinevoltage*1}} <text class="income_unit">V</text></view>
					</view>
				
					<view class="income_tired">
						<view class="income_tired1">{{$t('hostdetails.ic')}}：</view>
						<view class="income_tired2">{{devicedata.cphasecurrent*1}} <text class="income_unit">A</text></view>
					</view>
				</view>
				<view class="income">
					<view class="income_yesterday" style="margin-left: 20rpx;">
						<view class="income_yesterday1">{{$t('hostdetails.ac')}}：</view>
						<view class="income_yesterday2">{{devicedata.acPower*1}} <text class="income_unit">kWh</text></view>
					</view>
				
					<view class="income_tired">
					<!-- 	<view class="income_tired1">C相电流：</view>
						<view class="income_tired2">143.80A</view> -->
					</view>
				</view>
			</view>
		</view>
  
<view class="energy_hostbox">
	<view class="energy_host">
		<view class="energy_title">
			{{$t('hostdetails.myDevices')}}
		</view>
		<view class="energy_box" v-for="item in devicedata.emssytem" :key="item.emsDeviceId" @click="ondetails(item)">
			<image class="energy_boximage" src="/static/powerdian.png" mode=""></image>
			<view class="energy_boxtitle">
				<view class="energy_boxtitle1">
					{{item.emsDeviceId}}
				</view>
				<view class="energy_boxtitle2">
					{{$t('hostdetails.ac')}}：{{item.communicationPower*1}} <text class="income_unit">kW</text>
				</view>
			</view>
			<view class="energy_right">
				<view class="energy_boxright">
					<view class="energy_boxright1" v-if="item.batteryStatus==0">
						<!-- 空闲 -->
						{{$t('hostdetails.idle')}}
					</view>
					<view class="energy_boxright1" v-if="item.batteryStatus==1">
						<!-- 充电 -->
						{{$t('hostdetails.charging')}}
					</view>
					<view class="energy_boxright1" v-if="item.batteryStatus==2">
						<!-- 放电 -->
						{{$t('hostdetails.discharging')}}
					</view>
					
					<view class="energy_boxright1" v-if="item.batteryStatus==3">
						<!-- 充满 -->
						{{$t('hostdetails.full')}}
					</view>
					<view class="energy_boxright1" v-if="item.batteryStatus==4">
						<!-- 放空 -->
						{{$t('hostdetails.empty')}}
					</view>
					<view class="energy_boxright1" v-if="item.batteryStatus==5">
						<!-- 故障 -->
						{{$t('hostdetails.fault')}}
					</view>
					<view class="energy_boxright2">
						SOC:{{item.soc*1}} <text class="income_unit">%</text>
					</view>
				</view>
				<image class="energy_jumpto" src="/static/jumpto.png" mode=""></image>
			</view>
	 <view class="micro" v-if="item.conscolidationType==1">
	 	主
	 </view>
		</view>
	</view>
</view>
		
		<view class="energy">
			<view class="energy_title">
				<!-- 运行计划 -->
				{{$t('hostdetails.schedule')}}
			</view>
				<view class="energy_calendar">
				    <uni-calendar 
				    :insert="true"
				    :lunar="true" 
					:selected="selecteddata"
				    @change="oncalendar"
					@monthSwitch="oncalendar"
				     />
				</view>
		</view>
		<view class="container_box">
			<view class="income_box">
				<view class="incomeweekday">
					<view class="weekday1" @click="weekday(1)" :style="weekdaytype==1?'border: 1rpx solid #2979ff;color:#2979ff':'border: 1rpx solid #fff'">
						<view class="weekday"></view>
						<view class="income_yesterday1" :style="weekdaytype==1?'color:#2979ff':'color: #999999;'">{{$t('hostdetails.weekdays')}}</view>
					</view>
					<view class="restday1" @click="weekday(2)" :style="weekdaytype==2?'border: 1rpx solid #2979ff;color:#2979ff':'border: 1rpx solid #fff'">
						<view class="restday"></view>
						<view class="income_moon1" :style="weekdaytype==2?'color:#2979ff':'color: #999999;'">{{$t('hostdetails.weekends')}}</view>
					</view>
				 <view class="restday2"> </view>
				 <view class="restday2"> </view>
				</view>
			 
			</view>
		</view>
	<view class="power_box1">
		<view class="powerstation">
			<view class="power_yesterdaystrategy" @click="ondevices">
				<view class="strategybox">
				<image class="strategycalendar" src="/static/calendar.png" mode=""></image>
					<view class="power_iconstrategy">
					<view class="power_yesterday11">{{date}}</view>
					<view class="power_yesterday11">{{$t('hostdetails.listTitle')}}：{{weekdaytype==1?$t('hostdetails.weekdays'):$t('hostdetails.weekends')}}</view>
					</view>
				</view>
			
				<view class="power_strategy">{{$t('hostdetails.detailTitle')}}<image class="energy_jumpto" src="/static/jumpto.png" mode=""></image></view>
			</view>
		</view>
	</view>
	<view class="power_box2">
		<view class="powerstation">
			<view class="power_yesterdaystrategy">
				<view class="strategybox">
				<image class="strategy" src="/static/startstop.png" mode=""></image>
					<view class="power_iconstrategy">
					<view class="power_yesterday11">{{$t('hostdetails.powerControl')}}</view>
					<!-- <view class="power_yesterday1">2024-09-13</view> -->
					</view>
				</view>
			<l-switch v-model="defaultValue" disabled="false" :placeholder="[$t('hostdetails.on'), $t('hostdetails.off')]" dotSize="14px" height="22px" width="32px"></l-switch>
				<!-- <view class="power_strategy1" @click="toggle('center')">开启<image class="energy_jumpto" src="/static/jumpto.png" mode=""></image></view> -->
				<!-- <view class="power_strategy2" @click="toggle('center')">停止<image class="energy_jumpto" src="/static/jumpto.png" mode=""></image></view> -->
			</view>
		</view>
	</view>
		<!-- 普通弹窗-->
				<uni-popup ref="popupRef" background-color="#fff" @change="change" borderRadius="10rpx">
					<view class="popup-content" :class="{ 'popup-height': devicetype === 'left' || devicetype === 'right' }">
						<view class="popuptext">
							   是否开启?
							</view>
							<view class="popupbutton">
								      <button class="cancel-button" size="mini" @click="handleCancel">取消</button>
															
								      <button class="confirm-button" @click="handleConfirm">确认</button>
							</view>
					
							</view>
				</uni-popup>
	</view>
</template>
<!--    -->
<script setup>
	import {
		onMounted,
		ref
	} from 'vue';
	import topTabbar from '@/components/top-tabbar.vue';
	import KDatePicker from '../../components/k-date-picker/KDatePicker.vue';
	import { formatAmount,Accumulateddischarge } from '@/utils/format.js'; // 引入格式化函数
	import request from '@/utils/request';
	import {
		getMonthRange,
		getMonth
	} from '@/utils/date.js';
 import { onLoad,onHide,onShow,onUnload } from '@dcloudio/uni-app';
 const date = ref();
 const deviceid = ref();
 const optionsinfo = ref();
 onLoad((options) => {
   console.log('页面加载，参数为:', options);
   if (options) {
	   optionsinfo.value = options;
     // uni.setNavigationBarTitle({
     //   title: options.name||'并网点'
     // });
  uni.setNavigationBarTitle({
       title: '并网点'
     });
   }
 });
 const interval = ref(null)
    onHide(() => {
      // 页面隐藏时也可以选择清理定时器
      if (interval.value) {
        clearInterval(interval.value);
        interval.value = null
      }
   });
   onUnload(() => {
      // 页面隐藏时也可以选择清理定时器
      if (interval.value) {
        clearInterval(interval.value);
        interval.value = null
      }
   });
  onShow(() => {
 	 
     // 页面再次显示时重新启动定时器
       if (!interval.value) {
          setIntervalDemo();
       }
  });
 
 const setIntervalDemo =() => {
     interval.value = setInterval(() => {
		 const monthRange = getMonthRange();
		 date.value = monthRange.firstDay.substring(0, 7);
 		 getoverview(date); // 首页收益充电
        }, 10000)
    };
	onMounted(() => {
		const monthRange = getMonthRange();
		date.value = monthRange.firstDay.substring(0, 7);
		console.log(date.value);
		getoverview(date); // 首页收益充电
		getelectricity(); // 运行计划
	});
	const target = ref(0)
	const modelVale = ref(0)
	const devicedata = ref({})
	const getoverview = async () => {
		try {
			const response = await request({
				url: `/connectionapp/energyblock?grid=${optionsinfo.value.id}`,
				method: 'get',
				header: {
					'Content-Type': 'application/x-www-form-urlencoded'
				}
			});
			console.log(response);
			devicedata.value = response.data
             target.value =response.data.soc*1
		} catch (error) {
			console.error('登录失败:', error);
		}
	}
	// 运行计划
	const selecteddata = ref()
 const getelectricity = async () => {
 	console.log(deviceid.value);
 	try {
 		const response = await request({
 			url: `/connectionapp/plan`,
 			method: 'get',
 			header: {
 				'Content-Type': 'application/x-www-form-urlencoded'
 			},
			data:{
				grid:optionsinfo.value.id,
				month:date.value
			}
 		});
		// console.log(response);
 		selecteddata.value = response.data
 
 	} catch (error) {
 		console.error('登录失败:', error);
 	}
 }
	// 策略详情
	const ondevices = () => {
		if(weekdaytype.value==1){
			uni.navigateTo({
				url: `/pages/strategy/index?id=${optionsinfo.value.id}&type=1`
			})
		}else{
			uni.navigateTo({
				url: `/pages/strategy/index?id=${optionsinfo.value.id}&type=2`
			})
		}
		
	}
	//  change
	// 日历
	const oncalendar = (e) => {
	  // console.log(e);
	  let month = 0
	  if(e.month*1<10){
		 month = '0' + e.month 
	  }else{
		month = e.month  
	  }
	  date.value = e.year +'-'+month
	  getelectricity();
	}
	const weekdaytype =ref(1);
	// 工作日 休息日
	const weekday = (e) => {
	  // console.log(e);
	  weekdaytype.value =e
	}

	// 设备启停
		const defaultValue =ref(1) 
		const devicetype =ref('center') 
					const msgType= ref('success')
					const messageText=ref('这是一条成功提示') 
					const value= ref('')
					 const popupRef = ref(null)
				const toggle=(type)=> {
					// console.log(type);
							devicetype.value = type
							// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
					  if (popupRef.value) {
					        popupRef.value.open(type);
					      }
						};
						   // 处理取消按钮点击事件
						    const handleCancel=()=> {
						      console.log('用户点击了取消');
						    $refs.popupRef.value.close(); // 关闭弹出层
						    };
						
						    // 处理确认按钮点击事件
						    const handleConfirm=()=> {
						      console.log('用户点击了确认');
						   $refs.popupRef.value.close(); // 关闭弹出层
						      // 在这里添加确认后的逻辑
						    };
						
						    // popup 状态变化事件
						    const change=(e)=> {
						      console.log('弹出层状态变化:', e);
						    }
							const ondetails =(e)=>{
								uni.navigateTo({
									url: `/pages/devicedetails/index?id=${e.emsDeviceId}`
								})
							}
</script>
<style scoped>
	.uni-page {
		width: 100%;
		height: 100%;
	}

	.container {
		background: linear-gradient(to bottom, #007545 -40%, #f0f5f5 40%, #f0f5f5 100%);
		box-sizing: border-box;
		padding-bottom:1rpx;
	}

	.l-liquid {
		/* background-color: #007545; */
		border: 10rpx solid #007545;
	}

	.liquid_text {
		font-size: 38rpx;
		color: #fff;
	}

	.container_title {
		width: 100%;
		height: 400rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.container_box {
		width: 100%;
		padding: 0rpx 20rpx;
		box-sizing: border-box;
	}
.container_box1{
	width: 100%;
	padding: 0rpx 20rpx;
	box-sizing: border-box;
	margin-top: 20rpx;
}
	.container_parameter {
		width: 100%;
		height: 500rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
	}

	.income_box {
		width: 100%;
		background-color: #ffffff;
		box-sizing: border-box;
		border-radius: 16rpx;
		padding-bottom: 10rpx;
	}
.income_top{
	width: 100%;
	height: 80rpx;
	display: flex;
	align-items: center;
	justify-content: space-around;
	
}
	.income {
		width: 100%;
		height: 46rpx;
		display: flex;
		align-items: center;
		justify-content: space-around;
	}

	.income_image {
		width: 40rpx;
		height: 40rpx;
		margin-right: 10rpx;
		box-sizing: border-box;
	}
.income_yesterday_discharge{
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.income_tired_soc{
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
	.income_yesterday,
	.income_moon,
	.income_tired {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.income_yesterday1,
	.income_moon1,
	.income_tired1 {
		font-size: 28rpx;
		color: #999999;
	}

	.income_yesterday2,
	.income_moon2,
	.income_tired2 {
		font-size: 28rpx;
		font-weight: 400;
	}

	.qiun_data {
		width: 100%;
		padding: 16rpx;
		overflow: auto;
		box-sizing: border-box;
	}

	.qiun_title {
		height: 12%;
		font-size: 28rpx;
		margin-left: 20rpx;
	}

	.power_box {
		width: 100%;
		padding: 0rpx 20rpx;
		box-sizing: border-box;
		margin-bottom: 30rpx;
	}
.power_box1 {
		width: 100%;
		padding: 0rpx 20rpx;
		box-sizing: border-box;
	}
.power_box2{
	width: 100%;
	padding: 0rpx 20rpx;
	box-sizing: border-box;
   margin-bottom: 30rpx;
}
	.powerstation {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		overflow: hidden;
	}

	.power_yesterday,
	.power_moon,
	.power_tired {
		width: 31%;
		padding: 20rpx 0rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		border-radius: 10rpx;
		background-color: #ffffff;
	}

	.power_yesterday image,
	.power_moon image,
	.power_tired image {
		width: 40rpx;
		height: 40rpx;
	}

	.power_yesterday image {
		/* background-color: #007544; */
	}

	.power_moon image {
		/* background-color: #3774f3; */
	}

	.power_tired image {
		/* background-color: #b3cef9; */
	}
.power_icon{
	display: flex;
}
	.power_yesterday1,
	.power_moon1,
	.power_tired1 {
		font-size: 28rpx;
		margin-left:10rpx;
		color: #999999;
	}
	.power_yesterday11{
		font-size: 26rpx;
		margin-left:10rpx;
		color: #222;
	}
.power_moon2,.power_yesterday2,.power_tired2{
	margin-top:10rpx;
	font-size: 24rpx;
}

	.toptabbar {
		width: 100%;
		height: 80rpx;
		margin-top: 20px;
		padding: 10rpx 20rpx;
		box-sizing: border-box;
	}

	/deep/ .uni-scroll-view-content {
		display: flex;
		justify-content: center;
	}

	.datecalendar {
		display: flex;
		justify-content: space-between;
		padding: 0rpx 24rpx;
		margin-top: 60rpx;
	}

	.datecalendar_1 {
		width: 320rpx;
		height: 60rpx;
		display: flex;
		font-size: 28rpx;
		border: 0.2rpx solid #999999;
		border-radius: 40rpx;
		overflow: overlay;
	}

	.datecalendar_1sun {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #222222;
		background-color: #ffffff;
	}

	.datecalendar_1moon {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #ffffff;
		border-left: 0.2rpx solid #999999;
		border-right: 0.2rpx solid #999999;
	}

	.datecalendar_1year {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #ffffff;
	}

	.datecalendar_2 {
		width: 180rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 28rpx;
		border: 0.2rpx solid #999999;
		border-radius: 40rpx;
	}

	.qiun_data {
		width: 100%;
		height: 600rpx;
		padding: 16rpx;
		overflow: auto;
		box-sizing: border-box;
	}

	.qiun_title {
		height: 12%;
		font-size: 28rpx;
		margin-left: 20rpx;
	}
/* --------------------------------------- */
	.energy {
		width: 100%;
		padding: 20rpx;
		box-sizing: border-box;
	}
	.energy_hostbox{
		padding: 20rpx;
		box-sizing: border-box;
	}
.energy_host {
		width: 100%;
		padding: 20rpx;
		box-sizing: border-box;
		background-color: #ffffff;
		margin-bottom: 10rpx;
		border-radius: 10rpx;
	}
	.energy_title {
		width: 100%;
	}

	.energy_box {
		width: 100%;
		background-color: #B2D5CB;
		border-radius: 10rpx;
		margin-top: 20rpx;
		padding: 30rpx 16rpx;
		display: flex;
		align-items: center;
		box-sizing: border-box;
		position: relative;
		overflow: hidden;
	}
.micro{
	width: 50rpx;
	height: 50rpx;
	display: flex;
   align-items: center;
       justify-content: center;
 	position: absolute;
 top: -5rpx;
 right: -4rpx;
 
 background-color: #007545;
 color: #fff;
 border-radius: 12rpx;
	}
	.energy_boximage {
		width: 88rpx;
		height: 88rpx;
	}

	.energy_boxtitle {
		flex: 1;
		display: flex;
		flex-direction: column;
		margin-left: 20rpx;
	}

	.energy_boxtitle1 {
		font-size: 28rpx;
	}

	.energy_boxtitle2 {
		font-size: 28rpx;
		margin-top: 4rpx;
	}

	.energy_right {
		display: flex;
		align-items: center;
	}

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

	.energy_boxright1 {
		padding: 8rpx 30rpx;
		font-size: 26rpx;
		border-radius: 50rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: rgba(0, 116, 84, .3);
		color: #fff;
	}

	.energy_boxright2 {
		font-size: 24rpx;
		margin-top: 10rpx;
	}

	.energy_jumpto {
		width: 30rpx;
		height: 30rpx;
		margin-left: 8rpx;
	}
	.energy_calendar{
		margin-top:30rpx;
		border-radius: 10rpx; 
		overflow: hidden;
	}
	.incomeweekday{
		width: 100%;
		height: 100rpx;
		display: flex;
		align-items: center;
		/* justify-content: space-around; */
	}
	.weekday{
		width: 20rpx;
		height: 20rpx;
		border-radius: 50rpx;
		background-color: red;
		margin-right: 10rpx;
	}
	.restday1{
		display: flex;
		align-items: center;
		margin-left: 40rpx;
		padding: 10rpx;
		border-radius: 100rpx;
		box-sizing: border-box;
	}
	.restday2{
		display: flex;
		align-items: center;
		margin-left: 40rpx;
		border: 1rpx solid #fff;
		padding: 10rpx;
		border-radius: 100rpx;
		box-sizing: border-box;
	}
	.weekday1{
		display: flex;
		align-items: center;
		margin-left: 20rpx;
	  
	   padding: 10rpx;
	   border-radius: 100rpx;
	   box-sizing: border-box;
	}
	.restday{
		width: 20rpx;
		height: 20rpx;
		border-radius: 50rpx;
		background-color: #007545;
		margin-right: 10rpx;
	}
	.power_yesterdaystrategy{
		width: 100%;
		padding: 20rpx 20rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-radius: 10rpx;
		background-color: #ffffff;
		margin-top: 20rpx;
	} 
	.power_iconstrategy{
		flex-direction: column;
	}
	.strategy{
		width: 60rpx;
		height: 60rpx;
	}
	.strategycalendar{
		width: 60rpx;
		height: 60rpx;
		padding: 6rpx;
		box-sizing: border-box;
	}
	.strategybox{
	display: flex;
	align-items: center;
	}
	.power_strategy{
		font-size: 24rpx;
		color: #ccc;
		display: flex;
		align-items: center;
	}
		
	.power_strategy1{
		font-size: 24rpx;
		color: #B2D5CB;
		display: flex;
		align-items: center;
	}
	.power_strategy2{
	font-size: 24rpx;
	color: red;
	display: flex;
	align-items: center;	
	}
	@mixin flex {
			/* #ifndef APP-NVUE */
			display: flex;
			/* #endif */
			flex-direction: row;
		}
	
		@mixin height {
			/* #ifndef APP-NVUE */
			height: 100%;
			/* #endif */
			/* #ifdef APP-NVUE */
			flex: 1;
			/* #endif */
		}
	
		.box {
			@include flex;
		}
	
		.button {
			@include flex;
			align-items: center;
			justify-content: center;
			flex: 1;
			height: 35px;
			margin: 0 5px;
			border-radius: 5px;
		}
	
		.example-body {
			background-color: #fff;
			padding: 10px 0;
		}
	
		.button-text {
			color: #fff;
			font-size: 12px;
		}
	
		.popup-content {
			@include flex;
			align-items: center;
			justify-content: center;
			padding: 15px;
			background-color: #fff;
		}
	
		.popup-height {
			@include height;
			width: 400px;
		}
	
		.text {
			font-size: 12px;
			color: #333;
		}
	
		.popup-success {
			color: #fff;
			background-color: #e1f3d8;
		}
	
		.popup-warn {
			color: #fff;
			background-color: #faecd8;
		}
	
		.popup-error {
			color: #fff;
			background-color: #fde2e2;
		}
	
		.popup-info {
			color: #fff;
			background-color: #f2f6fc;
		}
	
		.success-text {
			color: #09bb07;
		}
	
		.warn-text {
			color: #e6a23c;
		}
	
		.error-text {
			color: #f56c6c;
		}
	
		.info-text {
			color: #909399;
		}
	
		.dialog,
		.share {
			/* #ifndef APP-NVUE */
			display: flex;
			/* #endif */
			flex-direction: column;
		}
	
		.dialog-box {
			padding: 10px;
		}
	
		.dialog .button,
		.share .button {
			/* #ifndef APP-NVUE */
			width: 100%;
			/* #endif */
			margin: 0;
			margin-top: 10px;
			padding: 3px 0;
			flex: 1;
		}
	
		.dialog-text {
			font-size: 14px;
			color: #333;
		}
		/* 弹出层内容样式 */
		.popup-content {
		  padding: 20px;
		  text-align: center;
		  border-radius: 20rpx;
		}
		
		/* 文本样式 */
		.popuptext {
		  font-size: 26rpx;
		  color: #333;
		  margin-bottom: 20rpx;
		}
		
		/* 取消按钮样式 */
		.cancel-button {
			width: 120rpx;
			height: 60rpx;
		  margin-top: 10rpx;
		  font-size: 24rpx;
		  background-color: #f0f0f0;
		  color: #333;
		  margin-right: 40rpx;
		}
		
		/* 确认按钮样式 */
		.confirm-button {
			width: 120rpx;
			height: 60rpx;
		  margin-top: 10rpx;
		  font-size: 24rpx;
		  background-color: #007aff;
		  color: #fff;
		}
		
		/* 根据设备类型调整高度 */
		.popup-height {
		  height: 200px;
		}
		.popupbutton{
			display: flex;
		}
	.income_unit{
		font-size: 20rpx;
	}
</style>

/*  */