<!-- 蓝牙平台限制 todo https://uniapp.dcloud.io/api/system/bluetooth?id=stopbluetoothdevicesdiscovery -->
<template>
	<view>
		<uni-nav-bar id="nav-bar" status-bar="true" @clickLeft="onBack()" title="设备升级" color="#000000" fixed="true" :border="false">
			<view slot="left">
				<view class=" flex align-center margin-left">
					<image class="p-left-arrow" src="../../../static/p-left-arrow.png"></image>
				</view>
			</view>

		</uni-nav-bar>

		<view class="card-view padding-top padding-bottom" v-for="(item,index) in devicesList" :key="index" :class="item.bRatio?'hardware-border':''">
			<view class="flex justify-between align-center">

				<image style="margin-left: 30rpx; width: 200rpx;height: 120rpx;" :src="item.icon" mode="aspectFit"></image>
				<view style="width: 250rpx;">
					<view style="font-weight: bold; font-size: 18px; color: #565656; margin: 20rpx 0;">{{item.cname}}</view>
					<view v-if="send_index<=0&&item.currentVersion !== ''">
						<view style="margin: 20rpx 0; font-size: 12px; color: grey;">固件版本号:{{item.currentVersion}}</view>
						<!-- <view style="margin: 20rpx; font-size: 12px;" class="make-text-bPurple">更新版本号:{{item.latestVersion}}</view> -->
					</view>
					<!-- <view class="flex">
						<view style="margin: 20rpx; font-size: 12px; color: grey;">硬件rom:{{item.currentRomVersion}}</view>
						<view style="margin: 20rpx; font-size: 12px;" class="make-text-bPurple">更新版本rom:{{item.latestRomVersion}}</view>
					</view> -->
					<!-- <view class="flex">
						<view style="margin: 20rpx; font-size: 12px; color: grey;">Bytes:{{bin_offset}} 总 {{bin_byteLength}}</view>
					</view> -->
					<view v-if="send_index>0" class="flex justify-between align-center" style="width: 210rpx;">

						<view class="cu-progress round" style="  width: 140rpx; height: 15rpx;">
							<view class="bg-green" :style="[{ width:percentage+'%'}]"></view>
						</view>
						<view class="" style=" font-size: 12px; color: grey;">{{percentage}}%</view>

						<!-- <view>
							<progress :percent="percentage" stroke-width="3" />
						</view> -->
						<!-- ,total {{bin_total}} send:{{send_index}} -->
						<!-- <view style=" font-size: 12px; color: grey;"> {{percentage}}% </view> -->
					</view>

				</view>

				<view v-if = "!bStart" style="width: 180rpx;margin-right: 30rpx;">
					<view v-if="send_index<=0&&item.latestVersion !== ''">
						<view v-if="bCanUpdate&&downLoadOTA!==''" class="text-11px make-text-bPurple " style="text-decoration:underline"
						 @click="onSendConnect"> 请更新版本{{item.latestVersion}}
						</view>
						<view v-else class="text-11px text-grey">最新版本{{item.latestVersion}}</view>
						<!-- <button v-else class="text-11px make-bg-bPurple text-white" @click="onCheckDeviceFiles">检查更新</button> -->
						<!-- <button v-if="item.currentVersion !== ''" class="text-11px margin" @click="onSendConnect">开始</button> -->
						<!-- <button v-if="item.currentVersion !== ''" class="text-11px margin" @click="onStop">停止</button> -->
					</view>
					<view v-if="send_index<=0&&item.latestVersion === ''" class="text-26px text-grey text-center"><text class="cuIcon-loading2 cuIconfont-spin"></text></view>
				</view>
				<view v-else style="width: 180rpx;margin-right: 30rpx;">
					<view v-if="send_index<=0&&!sending_file" class="text-11px text-grey">{{writeTip}}</view>
					<view v-else class="text-11px text-grey">{{writeTip}}</view>
				</view>

			</view>
			<!-- <view class="flex">
				<view style="margin: 20rpx; font-size: 12px; color: grey;">发送和接收的次数：send:{{send_index}}</view>
				<view style="margin: 20rpx; font-size: 12px;" class="make-text-bPurple">time:{{send_index/100}}</view>
			</view> -->

			<!-- <scroll-view class="text-box" scroll-y="true">
				<scroll-view scroll-x="true">
					<text selectable="true">{{text}}</text>
				</scroll-view>
			</scroll-view> -->
		</view>



	</view>


</template>

<script>
	import config from '@/common/config.js'
	import reqUtil from '@/util/util-js/requstUtil.js';

	import {
		mapState,
		mapMutations
	} from 'vuex';

	export default {
		computed: mapState(['bOpenBluetooth', 'bOpenSuccess', 'bListenAdapterStateChange', 'bListenDeviceFound',
			'BLEConnectDevice', 'cIndex'
		]),
		data() {
			return {
				/**
				 * OTA config
				 */
				UUID_OTA_SERVICE: "f000ffc0-0451-4000-b000-000000000000", //OTA 服务对应的服务的 UUID
				UUID_IDENTFY: "f000ffc1-0451-4000-b000-000000000000", //OTA 版本特征值的UUID，读取版本就是写向这个特征值写入:0x00
				UUID_BLOCK: "f000ffc2-0451-4000-b000-000000000000", //OTA 写bin文件特征值UUID，发送bin文件就是写这个特征值
				/*****/


				boxingList: [{
					cname: "蓝牙手柄",
					ename: "BLEHandle",
					icon: "/static/devicesIcon/handle.png",
					mIcon: "/static/devicesIcon/handle.png",
					bRatio: false,
					limitType: 'noRebound', //app处理蓝牙发送的数据
					deviceType: 'BLEHandle', //指的是外部蓝牙,目前定义为BLEHandle
					deviceName: 'PBox', //连接的设备名称
					limitDis: 100, //
					primaryUUID: 'f000ffc0', //OTA升级主服务id
					currentVersion: '', //当前固件版本
					latestVersion: '', //服务器最新固件版本
					currentRomVersion: '',
					latestRomVersion: '',
					UUID_OTA_SERVICE: "f000ffc0-0451-4000-b000-000000000000", //OTA 服务对应的服务的 UUID
					UUID_IDENTFY: "f000ffc1-0451-4000-b000-000000000000", //OTA 版本特征值的UUID，读取版本就是写向这个特征值写入:0x00
					UUID_BLOCK: "f000ffc2-0451-4000-b000-000000000000", //OTA 写bin文件特征值UUID，发送bin文件就是写这个特征值
				}],
				devicesList: [],

				downLoadOTA: '',
				//文件数据
				bin_buffer: [],
				bin_file_len: 0,
				bin_byteLength: 0,
				bin_total: 0,
				bin_offset: 0,
				//当前发送的下标
				send_index: 0,
				sending_file: false,
				// 当前进度
				percentage: 0,
				//是否可以发送
				bSend: true,
				//是否可以更新
				bCanUpdate: false,
				//是否开始
				bStart: false,

				bListenValueChange: false,
				//测试
				text: '',
				extraLine: [],

				//timeout 对象
				writeHeadTimeout: null,
				backTimeout: null,
				sendFileHeaderTimeout: null,
				
				writeTip:'准备写入数据..',
				
				bBacking:false,
			}
		},
		onLoad(option) {
			uni.$on('callbackCloseBLE', this.updateCallbackCloseBLE);
			this.devicesList = this.boxingList;

			//比如现在BLEHandle 对应的 1,
			//获得游戏列表
			reqUtil
				.requestData(config.URL.GETOTA, {
					bleType: 1, //目前只有一种设备，就是 BLEHandle,todo 后面如果设备多了需要设备多种ota
				})
				.then(
					res => {
						console.log('GETOTA =====', res);
						if (res.code == 0) {
							//设置对应的下载地址
							this.downLoadOTA = res.data.otaDownload;

							//读取需要更新的设备，存储在数据库
							this.onCheckServerFiles();

							this.onCheckDeviceFiles();
							
							uni.showToast({
								title: '获取信息...',
								icon: 'loading',
								duration: 20000
							})
						}
					},
					e => {
						console.log(e);
					}
				);



		},
		onUnload() {
			uni.$off('callbackCloseBLE', this.updateCallbackCloseBLE);
			//如果是获取版本指令timeout
			if (this.writeHeadTimeout) {
				clearTimeout(this.writeHeadTimeout);
				this.writeHeadTimeout = null;
			}

			//回退timeout
			if (this.backTimeout) {
				clearTimeout(this.backTimeout);
				this.backTimeout = null;
			}

			//发送头指令timeout
			if (this.sendFileHeaderTimeout) {
				clearTimeout(this.sendFileHeaderTimeout);
				this.sendFileHeaderTimeout = null;
			}
			
			this.onBack();
		},
		onShow() {
			
		},
		onHide() {},
		methods: {
			...mapMutations(['initAdapter', 'onCloseBLEConnection',
				'onGetRSSITransDistance'
			]),
			updateCallbackCloseBLE() {
				this.onBack();
			},
			onBack() {
				// if(this.bStart){

				// }
				if(this.bBacking)return;
				this.bBacking = true;
				//停止发送数据
				this.onStop();
				console.log('onBack：',this.BLEConnectDevice);
				//关闭当前的蓝牙连接
				this.onCloseBLEConnection({
					getSuccess: () => {
						console.log("close ble");
						this.$store.state.bConnection = false;
					}
				});
				console.log('onBack');
				
				this.$store.state.cIndex = -1;
				this.$store.state.BLEConnectDevice = null;
				this.$store.state.BLEGetServices = null;
				this.$store.state.bOpenBluetooth = false;

				uni.navigateBack({
					delta: 1
				})
			},

			//获取版本
			onCheckDeviceFiles() {
				// console.log('onCheckDeviceFiles:', this.BLEConnectDevice);
				//直接连接对应服务
				this.notifyBLECharacteristicValueChange({
					deviceId: this.BLEConnectDevice.deviceId,
					serviceId: this.UUID_OTA_SERVICE,
					characteristicId: this.UUID_IDENTFY
				});
			},
			//开始写数据
			onSendConnect() {
				uni.showModal({
					title: '更新提示',
					content: '设备更新成功后会自动关闭，是否继续更新？',
					success: (resValue) => {
						if (resValue.confirm) {
							//直接连接对应服务
							this.notifyBLECharacteristicValueChange({
								deviceId: this.BLEConnectDevice.deviceId,
								serviceId: this.UUID_OTA_SERVICE,
								characteristicId: this.UUID_BLOCK
							});
							uni.showToast({
								title: '请求硬件更新数据...',
								icon: 'none',
								duration: 3000,
								mask:true
							})
							//发送头指令timeout
							if (this.sendFileHeaderTimeout) {
								clearTimeout(this.sendFileHeaderTimeout);
								this.sendFileHeaderTimeout = null;
							}

							this.sendFileHeaderTimeout = setTimeout(() => {
								this.sendFileHeader();
								// this.send_index = -1;
							}, 2000)

							this.bStart = true;
						}
					}
				})
			},


			//启用低功耗蓝牙设备特征值变化时的 notify 功能，订阅特征值。
			//注意：必须设备的特征值支持notify或者indicate才可以成功调用，具体参照 characteristic 的 properties 属性
			notifyBLECharacteristicValueChange(context) {
				var _self = this;
				let {
					deviceId,
					serviceId,
					characteristicId
				} = context;
				// 启用notify功能
				uni.notifyBLECharacteristicValueChange({
					state: true,
					deviceId: deviceId,
					serviceId: serviceId,
					characteristicId: characteristicId,
					success: function(res) {
						if (!_self.bListenValueChange) {
							_self.onBLECharacteristicValueChange(); //监听特征值变化
							_self.bListenValueChange = true;
						}
						if (characteristicId == _self.UUID_IDENTFY) {
							_self.onGetDeviceVersion(context);
						}

					},
					fail: function(res) {
						uni.showToast({
							title: 'notify启动失败',
							icon: "none",
							mask: true
						});

					}
				})
			},
			
			onGetDeviceVersion(context){
				let _self = this;
				let {
					deviceId,
					serviceId,
					characteristicId
				} = context;
				//如果是获取版本,延迟写一个指令
				if (_self.writeHeadTimeout) {
					clearTimeout(_self.writeHeadTimeout);
					_self.writeHeadTimeout = null;
				}
				_self.writeHeadTimeout = setTimeout(() => {
					// 向蓝牙设备发送一个0x00的16进制数据
					let bufferDevice = new ArrayBuffer(1)
					let dataViewDevice = new DataView(bufferDevice)
					dataViewDevice.setUint8(0, 0)
				
					uni.writeBLECharacteristicValue({
						deviceId: deviceId,
						serviceId: serviceId,
						characteristicId: characteristicId,
						value: bufferDevice,
						success:(res) => {
							console.log('获取版本：writeBLECharacteristicValue success', res.errMsg)
						},
						fail:(fail)=>{
							console.error('获取版本：writeBLECharacteristicValue fail', fail.errMsg)
							
							uni.showModal({
								title:'获取固件版本',
								content:'获取不成功，是否重新获取',
								success: (resValue) => {
									if(resValue.confirm){
										_self.onGetDeviceVersion(context);
									}
								}
							})
						}
					})
				}, 1500)
			},
			//监听低功耗蓝牙设备的特征值变化。必须先启用notify接口才能接收到设备推送的notification。
			onBLECharacteristicValueChange() {
				var _self = this;
				// ArrayBuffer转16进制字符串示例
				// console.log("onBLECharacteristicValueChange");
				uni.onBLECharacteristicValueChange(function(res) {

					if (res.characteristicId.toLocaleLowerCase() === _self.UUID_IDENTFY) {
						//如果硬件的版本获取版本
						var resValue = ab2hext(res.value); //16进制字符串
						// console.log("Device 版本:", resValue.substr(0, 4), "Rom 版本号:", resValue.substr(16, 4));
						_self.devicesList[0].currentRomVersion = resValue.substr(16, 4);
						_self.devicesList[0].currentVersion = resValue.substr(0, 4);

						//读取到硬件版本，判断是否需要更新
						if (_self.devicesList[0].currentVersion === _self.devicesList[0].latestVersion && _self.devicesList[0].currentRomVersion ===
							_self.devicesList[0].latestRomVersion) {
							uni.showToast({
								title: '版本一致，无需升级',
								icon: 'none',
								mask: true,

							})
							_self.bCanUpdate = false;
							return;
						}
						uni.showToast({
							title: '获取信息成功',
							icon: 'success',
							mask: true,
						})
						//设置状态
						_self.bCanUpdate = true;

					} else {
						uni.hideToast();
						//成功发送头文件会走一个回调
						let uint8_buf = new DataView(res.value);
						_self.send_index = ((uint8_buf.getUint8(1) << 8) | uint8_buf.getUint8(0));
						console.log("val===>> data:" + ab2hext(res.value) + ",rv index:" + _self.send_index + _self.sending_file)

						if (_self.sending_file == false) {
							_self.sending_file = true;
							// console.log("SendBlePkg");
							_self.writeTip = "正在写入设备...";
							_self.SendBlePkg();
						}
					}
				});
			},
			//下载后读取
			onCheckServerFiles() {
				this.bin_buffer = [];
				this.bin_offset = 0;
				this.bin_total = 0;
				this.reset();

				uni.request({
					url: this.downLoadOTA,
					method: "GET",
					responseType: "arraybuffer",
					success: (res) => {
						//记录二进制数据
						this.bin_buffer = res.data;
						let binData = new Uint8Array(this.bin_buffer, 0, 16); //new Uint8Array(this.bin_buffer);
						this.bin_file_len = (binData[7] << 8) | binData[6]
						this.bin_total = (this.bin_file_len) / 4
						this.bin_byteLength = this.bin_buffer.byteLength;

						function uint8_to_hex_str(data) {
							var v = data.toString(16).slice(-2) + ''
							if (v == '0') {
								v = '00'
							}
							if (v.length == 1) {
								v = '0' + v
							}
							return v
						}
						// console.log("ver2:", uint8_to_hex_str(binData[4]) + uint8_to_hex_str(binData[5]), ",rom:", uint8_to_hex_str(
						// 		binData[14]) +
						// 	uint8_to_hex_str(binData[15]));
						//显示信息
						this.devicesList[0].latestRomVersion = uint8_to_hex_str(binData[14]) + uint8_to_hex_str(binData[15]); //str.substr(28, 2);
						this.devicesList[0].latestVersion = uint8_to_hex_str(binData[4]) + uint8_to_hex_str(binData[5]); //str.substr(8, 2);

					},
					fail: (fail) => {
						uni.showToast({
							title: '下载固件失败..',
							icon: 'none'
						});
					}
				});
			},

			//发送文件头信息（配置信息）
			sendFileHeader() {
				console.log('---------- sendFileHeader --------------')
				let _self = this
				let buffer = new ArrayBuffer(16)
				let dataView = new DataView(buffer)
				var b = new Uint8Array(_self.bin_buffer, 0, 16);
				for (var i = 0; i < 16; i++) {
					dataView.setUint8(i, b[i])
				}
				console.log('send header:' + ab2hext(buffer))
				// return;
				uni.writeBLECharacteristicValue({
					deviceId: _self.BLEConnectDevice.deviceId,
					serviceId: _self.UUID_OTA_SERVICE.toLocaleUpperCase(),
					characteristicId: _self.UUID_IDENTFY.toLocaleUpperCase(),
					value: buffer,
					success: function(res) {
						// _self.send_index = -1
						// _self.sending_file = false
						uni.showToast({
							title: '准备更新数据...',
							icon: 'none',
							duration: 3000,
							mask:true
						})
						console.log('开始发送文件success', _self.sending_file)
						// _self.SendBlePkg()
					},
					fail: function(err) {
						console.log('read version fail! ' + JSON.stringify(err))
						uni.showModal({
							title:'请求更新',
							content:'请求更新失败,是否重新尝试继续。',
							success: (resValue) => {
								if(resValue.confirm){
									_self.sendFileHeader();
								}else if(resValue.cancel){
									_self.bStart = false;
								}
							}
						})
					}
				})
			},
			//发送一包数据
			SendBlePkg() {
				var _self = this;
				if (!_self.bSend) return;

				if (_self.send_index == -1) {
					return
				}

				if (_self.send_index >= _self.bin_total) {
					_self.percentage = 100;
					uni.showToast({
						title: "更新完成",
						duration: 2000,
						mask: true
					})
					//回退timeout
					if (this.backTimeout) {
						clearTimeout(this.backTimeout);
						this.backTimeout = null;
					}

					this.backTimeout = setTimeout(() => {
						//更新成功后设备会断开，此时回退出此页面
						uni.hideToast();
						_self.onBack();
					}, 1500)

					return;
				}
				_self.percentage = parseInt(_self.send_index / _self.bin_total * 100);

				//分包长度,16字节有效数据（总数据/16=次数）
				let length = 16;
				//发送每包数据的结构：2个字节的序号 + 16个字节的有效数据
				//设置数据包序号
				let lo = getLow8(_self.send_index);
				let hi = getHeight8(_self.send_index);
				//最要一个18字节的包
				let send_ab = new ArrayBuffer(18);
				let a = new Uint8Array(send_ab);
				//2个字节的序号
				a[0] = lo;
				a[1] = hi;

				if (_self.bin_offset + length > _self.bin_buffer.byteLength) {
					length = _self.bin_buffer.byteLength - _self.bin_offset;
				}
				var b = new Uint8Array(_self.bin_buffer, _self.bin_offset, length);
				a.set(b, 2);
				uni.writeBLECharacteristicValue({
					deviceId: _self.BLEConnectDevice.deviceId,
					serviceId: _self.UUID_OTA_SERVICE, //  _deviceId,
					characteristicId: _self.UUID_BLOCK,
					value: send_ab,
					fail: function(res) {
						console.log('write BLEChar fail')
						_self.SendBlePkg();
					},
					success: function(res) {
						_self.send_index++;
						//发送的有效字节数
						_self.bin_offset += length;
						// _self.sending_file = false;
						_self.SendBlePkg();
						// console.log('success')
					},

				})


			},
			reset() {

				//发送字节的下标
				this.send_index = 0;
				//发送的有效字节数
				this.bin_offset = 0;

				this.percentage = 0;


				this.bSend = true;

			},
			onStop() {
				this.bSend = false;
			},
			onReadFile(url) {
				//游戏列表
				// firmwareList: [{
				// 	name: "24_LYY_3431Q_H2_S3_bk3435_ble_app_oad.bin",
				// 	downloadUrl: "https://www.yuyekeji.cn/Cocos/bin_version/24_LYY_3431Q_H2_S3_bk3435_ble_app_oad.bin",
				// 	fileName: "bin_version",
				// 	suffix: "bin",
				// 	type: "bin",
				// 	task: null,
				// 	progressVal: 0,
				// 	bFileExists: false,
				// 	bDownload: false,
				// }],
				// data URIs to buffer
				function dataURL2Buffer(dataURI) {
					var byteStr
					var intArray
					var ab
					var i
					var mimetype
					var parts

					parts = dataURI.split(',')
					parts[1] = parts[1].replace(/\s/g, '')
					// console.log(parts);
					if (~parts[0].indexOf('base64')) {
						byteStr = atob(parts[1])
					} else {
						byteStr = decodeURIComponent(parts[1])
					}

					// // ab = new ArrayBuffer(byteStr.length)
					// intArray = new Uint8Array(byteStr.length)

					// for (i = 0; i < byteStr.length; i++) {
					// 	intArray[i] = byteStr.charCodeAt(i)
					// }
					// console.log(intArray.length, intArray.byteLength);
					return byteStr;
				}
				let item = this.firmwareList[0];
				console.log("url:" + JSON.stringify(url));
				plus.io.resolveLocalFileSystemURL(url, function(entry) {
					entry.file(function(file) {
						var fileReader = new plus.io.FileReader();
						fileReader.readAsDataURL(file);
						fileReader.onloadend = function(evt) {
							// console.log("_buffer1:" + JSON.stringify(evt.target.result));
							// let _arrayBuffer = dataURL2Buffer(evt.target.result)
							let parts = evt.target.result.split(',')
							let _arrayBuffer = parts[1].replace(/\s/g, '')
							console.log("_buffer1:" + JSON.stringify(_arrayBuffer));
							let _buffer = uni.base64ToArrayBuffer(_arrayBuffer);
							console.log("_buffer2:", JSON.stringify(_buffer));
							console.log("_buffer:", _buffer.length, _buffer.byteLength, _buffer.byteOffset);

						}
					});
				}, function(e) {
					console.log("Resolve file URL failed: " + e.message);
				});


			},
			//下载固件
			downLoadBin() {
				let _self = this;
				let item = this.firmwareList[0];
				let downloadUrl = item.downloadUrl;
				let _filename = '_doc/' + item.name; //+'/'+item.name
				console.log(_filename, downloadUrl);
				item.task = plus.downloader.createDownload(downloadUrl, {
					filename: _filename
				});
				item.task.addEventListener("statechanged", (download, status) => {
					// console.log("status", status);
					//连接服务器后
					// no default
					switch (download.state) {
						case 1:
							console.log('开始下载');
							// item.bDownload = true;
							break;
						case 2:
							console.log('链接到服务器...');
							item.bDownload = true;
							break;
						case 3:
							if (status !== 200) {
								uni.showToast({
									title: 'status=' + status
								})
								return;
							}
							item.progressVal = Math.ceil(download.downloadedSize / download.totalSize * 100);
							// _this.precent = progressVal;
							console.log(item.progressVal);
							break;
						case 4:
							// 下载完成
							console.log("监听下载 success: " + download.getFileName());
							setTimeout(() => {
								item.bDownload = false;
							}, 500)
							break;
					}
				}, false);
				item.task.start();
			},
			add: function(data) {
				// console.log(data)

				if (this.extraLine.length > 500) {
					this.extraLine = [];
					this.text = this.extraLine.join('\n');
				}

				this.extraLine.push(data);
				this.text = this.extraLine.join('\n');


			},
			remove: function(e) {
				if (this.extraLine.length > 0) {
					// this.extraLine.pop();
					this.extraLine = [];
					this.text = this.extraLine.join('\n');
				}
			},

		}

	}

	function ab2hext(buffer) {
		var hexArr = Array.prototype.map.call(
			new Uint8Array(buffer),
			function(bit) {
				return ('00' + bit.toString(16)).slice(-2)
			}
		)
		return hexArr.join('');
	}

	function getHeight8(data) { //获取高8位
		let height;
		height = (data >> 8);
		return height;
	}

	function getLow8(data) { //获取低8位
		let low;
		low = (data & 0xFF);
		return low;
	}
</script>

<style>
	.hardware-border {
		border: 1rpx solid #9898FF;
		box-sizing: border-box;
	}

	.text-box {
		margin: 20rpx;
		display: flex;
		width: 95%;
		min-height: 300rpx;
		max-height: 600rpx;
		background-color: #EEEEEE;
		justify-content: center;
		align-items: center;
		text-align: center;
		font-size: 30upx;
		color: #353535;
		line-height: 1.8;
		border: 1rpx solid #555555;
		overflow-y: hidden;
	}
</style>
