<!-- 
[报名] 样式3 - 排名列表
http://localhost:5173/card/#/pages/bm/style4/rankList
https://oss-mbh5.colormaprun.com/card/#/pages/bm/style4/rankList
 -->
<template>
	<view class="body">
		<view class="content uni-column">
			<view class="uni-column" :class="cssTop">
				<view class="topbar uni-row" :class="cssTopbarColor">
					<uni-icons type="left" class="topbar-back" @click="btnBack"></uni-icons>
					<text class="mcName">{{mcName}}</text>
					<text class="topbar-rule" @click="btnInfo">规则</text>
					<!-- <image mode="aspectFit" class="topbar-info" @click="btnInfo" src="/static/default/info.png"></image> -->
				</view>

				<view class="topcontent uni-column uni-jcsa">
					<view class="logo"></view>
					<view class="tcbar uni-row uni-jcsb">
						<text class="tcbar-text">赛事总里程：{{fmtDistanct(totalDistance)}} 千米</text>
						<text class="tcbar-text">{{configParam.labelRightAnswerNum}}：{{totalRightAnswerNum}} 次</text>
					</view>
				</view>

				<!-- <view class="topbtm uni-row">
					<view class="topbtm-egg" @click="btnMyEgg">蛋叔券</view>
					<text class="topbtm-name">{{nickName}}</text>
					<view class="topbtm-egg" @click="btnExchg">兑换地址</view>
				</view> -->
			</view>
			<view class="main uni-column">
				<my-tab ref="tab1" :tabItems="tab1Items" :type="1" @onTabClick="onTab1Click"
					@onSelectChange="onSelectChange"></my-tab>
				<my-tab ref="tab2" :tabItems="tab2Items" :tabItemsMark="tab2ItemsMark" :type="0"
					@onTabClick="onTab2Click" :fontSize="12"></my-tab>

				<view class="tab-view uni-column">
					<!-- 团体成绩列表 -->
					<template v-if="tab1Current==0" v-for="(item, index) in rank1List" :key="index">
						<my-ranklist v-show="tab2Current === index" :rankRs="rankList[item]"
							:rank-type="rankTypeList[index]"></my-ranklist>
					</template>

					<!-- 个人成绩列表 -->
					<template v-if="tab1Current==1" v-for="(item, index) in rank2List" :key="index">
						<my-ranklist v-show="tab2Current === index" :rankRs="rankList[item]"
							:rank-type="rankTypeList[index]"></my-ranklist>
					</template>
				</view>

				<button class="btnBack" @click="btnStartGame">我要比赛</button>
				<!-- <button class="btnBack" @click="btnBack">返回</button> -->
			</view>

			<my-popup ref="mypopup" :dataList="popupDataList" :acttime="acttime"></my-popup>
			<my-popup ref="mypopupExchg" :dataList="popupExchgList"></my-popup>

		</view>
	</view>
</template>

<script>
	import tools from '/common/tools';
	import {
		teamName,
		defaultPopUpDataList
	} from '/common/define';
	import {
		token,
		apiMatchRsDetailQuery,
		apiCardRankDetailQuery,
		apiCardConfigQuery,
		apiUserCurrentRankNumQuery,
		apiIsAllowMcSignUp,
		apiMapListQuery,
		apiCompStatisticQuery,
		checkResCode
	} from '/common/api';

	export default {
		data() {
			return {
				pageName: "rankList",
				firstEnterKey: 'firstEnter-bm-style4',
				rankKey: "rank-bm-style4",
				mapKey: "rank-bm-style4-map",
				queryObj: {},
				queryString: "",
				token: "",
				ovtype: "",

				ecId: 0, // 卡片id
				mcId: 0, // 赛事id
				mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
				mcName: "", // 赛事名称
				acttime: "", // 活动时间
				beginSecond: null, // 活动或赛事开始时间戳，单位秒
				endSecond: null, // 活动或赛事结束时间戳，单位秒
				ocaId: 0, // 关联id，带入到App活动详情页面
				nickName: "", // 昵称

				mapList: [], // 卡片对应地图列表详情
				totalDistance: 0, // 赛事所有人累计里程，单位米
				totalRightAnswerNum: 0, // 赛事所有人正确答题数（校园文化输出）

				mcState: 0, // 赛事/活动状态 0: 未开始  1: 进行中  2: 已结束
				allowMcSignUp: false, // 是否允许重新分组
				countdown: "", // 倒计时
				rankList: { // 排名列表
					// totalDistanceRs: [],
					// totalCpRs: [],
					// totalSysPointRs: [],
					// fastPaceRs: []
				},
				interval: null,

				teamType: 0, // 队伍类型
				// dispArrStr: "totalDistance,totalCp,totalSysPoint,fastPace",
				dispArrStr: "teamCp,teamDistance,teamRightAnswerPer,teamPace,teamSpeed,regionCp,regionDistance,regionRightAnswerPer,regionPace,regionSpeed", // 要显示的集合范围
				tab1Current: 0,
				tab2Current: 0,
				tab1Items: ["团体"],
				// tab1Items: ["团体", {
				// 	selectValue: 1,
				// 	data: [
				// 		{text: "个人(中心校区)", value: 1},
				// 		{text: "个人(千佛山校区南区)", value: 2},
				// 		{text: "个人(兴隆校区)", value: 3}
				// 	]}
				// ],
				// tab2Items: ["总距离", "打点数", "百味豆", "配速"],
				tab2Items: ["总里程", "累计打点", "校园文化", "最快配速", "单场用时"],
				tab2ItemsMark: [{
					textColor: "#ff6203",
					icon: "static/common/award.png"
				}],
				tabActiveColor: "#81cd00",

				// 成绩类型列表
				rankTypeList: ["totalDistance", "totalCp", "rightAnswerPer", "fastPace", "speed"],
				// 团体成绩列表
				rank1List: ["teamDistanceRs", "teamCpRs", "teamRightAnswerPerRs", "teamPaceRs", "teamSpeedRs"],
				// 个人成绩列表
				rank2List: ["regionDistanceRs", "regionCpRs", "regionRightAnswerPerRs", "regionPaceRs", "regionSpeedRs"],

				cssTop: "",
				cssTopbarColor: "",
				configParam: {
					labelRightAnswerNum: "文化输出"
				},
				selectedMapId: 0, // 用户选择的地图ID
				popupDataList: [],
				popupExchgList: []
			}
		},
		computed: {},
		onLoad(query) { // 类型非必填，可自动推导
			// console.log(query);
			this.queryObj = query;
			this.queryString = tools.objectToQueryString(this.queryObj);
			// console.log(queryString);
			this.token = query["token"] ?? token;
			this.ecId = query["id"] ?? 0;
			this.ovtype = query["ovtype"] ?? "";

			this.firstEnterKey += "-" + this.ecId;
			console.log("firstEnterKey:", this.firstEnterKey);

			this.rankKey += "-" + this.ecId;
			console.log("rankKey:", this.rankKey);

			this.mapKey += "-" + this.ecId;
			console.log("mapKey:", this.mapKey);

			tools.removeCssCode();

			const mapValue = uni.getStorageSync(this.mapKey);
			if (mapValue) {
				console.log("mapValue:", mapValue);
				this.selectedMapId = mapValue;
			}

			this.getCardConfigQuery();
		},
		// 页面初次渲染完成，此时组件已挂载完成，DOM 树($el)已可用
		onReady() {
			// this.dealFirstEnter();
		},
		onUnload() {
			this.clear();
		},
		methods: {
			dealNotice(rank) {
				// console.log('[dealFirstEnter]');
				let that = this;
				uni.getStorage({
					key: that.rankKey,
					success: (res) => {
						console.log('[getStorage]', that.rankKey, res.data);
						const oldRank = res.data;
						if (oldRank != rank) {
							// that.notice = true;
							that.setRankValue(rank);
						}
					},
					fail: (e) => {
						console.log('[getStorage] fail', that.rankKey, e);
						// that.notice = false;
						that.setRankValue(rank);
					},
				})
			},
			setRankValue(data) {
				let that = this;
				uni.setStorage({
					key: that.rankKey,
					data: data,
					success: () => {
						console.log('[setStorage] success', that.rankKey, data);
					},
					fail: (e) => {
						console.log('[setStorage] fail', that.rankKey, e);
					},
				})
			},
			dealFirstEnter() {
				// console.log('[dealFirstEnter]');
				let that = this;
				uni.getStorage({
					key: that.firstEnterKey,
					success: (res) => {
						console.log('[getStorage]', that.firstEnterKey, res.data);
					},
					fail: (e) => {
						console.log('[getStorage] fail', that.firstEnterKey, e);
						that.btnInfo();
						that.setFirstEnterValue(true);
					},
				})
			},
			setFirstEnterValue(data) {
				let that = this;
				uni.setStorage({
					key: that.firstEnterKey,
					data: data,
					success: () => {
						console.log('[setStorage] success', that.firstEnterKey, data);
					},
					fail: (e) => {
						console.log('[setStorage] fail', that.firstEnterKey, e);
					},
				})
			},
			clear() {
				if (this.interval != null) {
					clearInterval(this.interval);
					this.interval = null;
				}
			},
			loadConfig(config) {
				// console.log("config", config);

				// 加载CSS样式
				const css = config.css;
				if (css != undefined && css.length > 0) {
					tools.loadCssCode(css);

					if (css.indexOf(".top{") >= 0) {
						this.cssTop = "top";
					}
					if (css.indexOf(".topbar-color{") >= 0) {
						this.cssTopbarColor = "topbar-color";
					}
				}

				if (this.cssTop == "") {
					this.cssTop = "top-default";
				}
				if (this.cssTopbarColor == "") {
					this.cssTopbarColor = "topbar-color-default";
				}
				console.log("[loadConfig] cssTop:", this.cssTop);
				console.log("[loadConfig] cssTopbarColor:", this.cssTopbarColor);

				const tabActiveColor = config.tabActiveColor;
				if (tabActiveColor != undefined && tabActiveColor.length > 0) {
					this.tabActiveColor = tabActiveColor;
				}

				// 加载弹窗数据
				const popupDataList = config.popupDataList;
				// console.log("[loadConfig] popupDataList:", popupDataList);
				if (popupDataList != undefined && popupDataList.length > 0) {
					for (var i = 0; i < popupDataList.length; i++) {
						// console.log("[loadConfig] popupDataList", i, popupDataList[i]);
						if (popupDataList[i] == 'default') {
							for (var j = 0; j < defaultPopUpDataList.length; j++) {
								this.popupDataList.push(defaultPopUpDataList[j]);
							}
						} else {
							this.popupDataList.push(popupDataList[i]);
						}
					}
				} else {
					this.popupDataList = defaultPopUpDataList;
					console.log("[loadConfig] popupDataList 加载默认列表");
				}
				// console.log("[loadConfig] popupDataList:", this.popupDataList);

				// 加载弹窗(兑换地点)数据
				const popupExchgList = config.popupExchgList;
				if (popupExchgList != undefined && popupExchgList.length > 0) {
					for (var i = 0; i < popupExchgList.length; i++) {
						// console.log("[loadConfig] popupExchgList", i, popupExchgList[i]);
						this.popupExchgList.push(popupExchgList[i]);
					}
				}
				// console.log("[loadConfig] popupExchgList:", this.popupExchgList);
				
				// 加载页面参数
				const param = config.param;
				if (param != undefined) {
					if (param.labelRightAnswerNum != undefined && param.labelRightAnswerNum.length > 0) {
						this.configParam.labelRightAnswerNum = param.labelRightAnswerNum;
					}
				}
				// console.log("[loadConfig] param:", this.configParam);
			},
			// 获取倒计时
			getCountdown() {
				// console.log(this.endSecond)
				if (this.endSecond > 0) {
					const now = Date.now() / 1000;
					const dif = this.endSecond - now;
					// const dif = 3600*24 - 60;
					if (dif > 0) {
						this.countdown = '距结束 ' + tools.convertSecondsToDHM(dif);
					} else {
						this.countdown = "活动已结束";
					}
					// this.countdown = tools.convertSecondsToHMS(dif);
				} else {
					this.countdown = "距结束 --天--小时";
				}
			},
			// 格式化 距离
			fmtDistanct(val) {
				return Math.round(val * 100 / 1000) / 100;
				/* if (val < 10000)
					return Math.round(val * 10 / 1000) / 10;
				else
					return Math.round(val / 1000); */
			},
			fmtMcTime(timestamp) {
				return tools.fmtMcTime(timestamp);
			},
			// 获取活动时间
			getActtime() {
				this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
			},
			getTeamName(teamType, teamIndex) {
				return teamName[teamType][teamIndex];
			},
			getCardConfigQuery() {
				uni.request({
					url: apiCardConfigQuery,
					header: {
						"Content-Type": "application/x-www-form-urlencoded",
						"token": this.token,
					},
					method: "POST",
					data: {
						ecId: this.ecId,
						pageName: this.pageName
					},
					success: (res) => {
						// console.log("getCardConfigQuery", res)
						const data = res.data.data;
						// console.log("configJson", data.configJson);
						const config = data.configJson != "" ? JSON.parse(data.configJson) : "";
						// console.log("configJson", data.configJson);
						/* const config = {
							"css": `
								.top{
									width: 100%;
									height: 170px;
									padding-top: 36px;
									justify-content: space-between;
									background-image: url('static/backgroud/top_bg_sddx.png');
									background-repeat: no-repeat;
									background-position-x: center;
									background-position-y: bottom;
									background-size: cover;
								}
								.logo{
									background-image: url('static/logo/sddx.png');
								}
								.tcbar{
									display: flex !important;
								}
								.topbar-color{
									color: #ffffff;
								}
								.btnBack{
									background-color: #a43a07 !important;
								}
								.tab-active{
									background-color: #a43a07 !important;
								}
								.swiper-item-button {
									background-color: #a43a07 !important;
								}
								.uni-swiper-dot-active {
									background: #a43a07 !important;
								}
							`,
							"tabActiveColor": "#a43a07",
							"popupDataList": [{
									"type": 1,
									"data": {
										"title": "山大校园定向赛",
										"img": "/static/logo/sddx.png",
										"content": "　　开学季来袭！山大校园定向赛燃情启幕！探索校园每一个角落，挑战智慧与体能，全校师生共同开启新学期活力篇章！等你来挑战！"
									}
								},
								"default"
							],
							"popupExchgList": [{
								"type": 5,
								"data": {
									"title": "兑换地点",
									"img": "/static/common/wslgwcs.png",
									"point": {
										"longitude": 117.022194,
										"latitude": 36.661612,
										"name": "万盛隆购物超市"
									}
								}
							}],
							"param": {
								"labelRightAnswerNum": "校园文化输出"
							}
						}; */

						this.loadConfig(config);
						this.matchRsDetailQuery();

						setTimeout(this.dealFirstEnter, 500);
					},
					fail: (err) => {
						console.log("getCardConfigQuery err", err)
					},
				});
			},
			// 卡片对应活动或赛事详情查询
			// getCardDetailQuery() {
			// 	uni.request({
			// 		url: apiCardDetailQuery,
			// 		header: {
			// 			"Content-Type": "application/x-www-form-urlencoded",
			// 			"token": this.token,
			// 		},
			// 		method: "POST",
			// 		data: {
			// 			ecId: this.ecId
			// 		},
			// 		success: (res) => {
			// 			// console.log("getCardDetailQuery", res)
			// 			const data = res.data.data;
			// 			this.mcType = data.mcType;
			// 			this.mcId = data.mcId;
			// 			this.mcName = data.mcName;
			// 			this.beginSecond = data.beginSecond;
			// 			this.endSecond = data.endSecond;
			// 			this.coiName = data.coiName;
			// 			this.teamNum = data.teamNum;

			// 			this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);

			// 			this.getCountdown();
			// 			this.getActtime();
			// 			this.getCardRankDetailQuery();

			// 			this.clear();
			// 			this.interval = setInterval(this.getCountdown, 60000);
			// 		},
			// 		fail: (err) => {
			// 			console.log("getCardDetailQuery err", err)
			// 		},
			// 	});
			// },
			// 卡片对应线上赛多个活动查询
			matchRsDetailQuery() {
				uni.request({
					url: apiMatchRsDetailQuery,
					header: {
						"Content-Type": "application/x-www-form-urlencoded",
						"token": this.token,
					},
					method: "POST",
					data: {
						ecId: this.ecId
					},
					success: (res) => {
						// console.log("matchRsDetailQuery", res);
						if (checkResCode(res)) {
							const data = res.data.data;
							this.mcType = data.mcType;
							this.mcId = data.mcId;
							this.mcName = data.mcName;
							this.beginSecond = data.beginSecond;
							this.endSecond = data.endSecond;
							this.nickName = data.nickName;
							// this.totalNum = data.totalNum;
							// this.totalDistanct = data.totalDistanct;
							// this.totalDistanctRankNum = data.totalDistanctRankNum;
							// this.totalCp = data.totalCp;
							// this.totalCpRankNum = data.totalCpRankNum;
							// this.totalSysPoint = data.totalSysPoint;
							// this.totalSysPointRankNum = data.totalSysPointRankNum;
							// this.fastPace = data.fastPace;
							// this.fastPaceRankNum = data.fastPaceRankNum;
							// this.ocaRs = data.ocaRs;

							this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);

							this.getCountdown();
							this.getActtime();
							this.mapListQuery();
							this.compStatisticQuery();
							this.getCardRankDetailQuery();

							this.clear();
							this.interval = setInterval(this.getCountdown, 60000);
						}
					},
					fail: (err) => {
						console.log("matchRsDetailQuery err", err)
					},
				});
			},
			// 卡片对应地图列表详情查询
			mapListQuery() {
				uni.request({
					url: apiMapListQuery,
					header: {
						"Content-Type": "application/x-www-form-urlencoded",
						"token": this.token,
					},
					method: "POST",
					data: {
						mcId: this.mcId
					},
					success: (res) => {
						// console.log("mapListQuery", res);
						if (res.data.code == 0) {
							const data = res.data.data;
							this.mapList = data;

							let mapItems = {
								selectValue: this.selectedMapId,
								data: []
							};
							for (var i = 0; i < data.length; i++) {
								if (mapItems.selectValue == 0 && i == 0) {
									mapItems.selectValue = data[i].ocaId;
								}
								let map = {};
								map.text = "个人(" + data[i].mapName + ")";
								map.value = data[i].ocaId;
								mapItems.data.push(map);
							}
							this.tab1Items.push(mapItems);
						}
					},
					fail: (err) => {
						console.log("mapListQuery err", err);
					},
				});
			},
			// 赛事总成绩统计查询
			compStatisticQuery() {
				uni.request({
					url: apiCompStatisticQuery,
					header: {
						"Content-Type": "application/x-www-form-urlencoded",
						"token": this.token,
					},
					method: "POST",
					data: {
						mcId: this.mcId
					},
					success: (res) => {
						console.log("compStatisticQuery", res);
						if (res.data.code == 0) {
							const data = res.data.data;
							this.totalDistance = data.totalDistance;
							this.totalRightAnswerNum = data.totalRightAnswerNum;
						}
					},
					fail: (err) => {
						console.log("compStatisticQuery err", err);
					},
				});
			},
			// 排名查询
			getCardRankDetailQuery() {
				uni.request({
					url: apiCardRankDetailQuery,
					header: {
						"Content-Type": "application/x-www-form-urlencoded",
						"token": this.token,
					},
					method: "POST",
					data: {
						mcIdListStr: this.mcId,
						mcType: this.mcType,
						ocaId: this.ocaId,
						dispArrStr: this.dispArrStr
					},
					success: (res) => {
						console.log("getCardRankDetailQuery", res);
						const rankdata = res.data.data;
						// this.rankList.totalDistanceRs = rankdata.totalDistanceRs;
						// this.rankList.totalCpRs = rankdata.totalCpRs;
						// this.rankList.totalSysPointRs = rankdata.totalSysPointRs;
						// this.rankList.fastPaceRs = rankdata.fastPaceRs;
						this.rankList = rankdata;
					},
					fail: (err) => {
						console.log("getCardRankDetailQuery err", err)
					},
				});
			},
			// 卡片用户当前排名查询
			// getUserCurrentRankNumQuery() {
			// 	uni.request({
			// 		url: apiUserCurrentRankNumQuery,
			// 		header: {
			// 			"Content-Type": "application/x-www-form-urlencoded",
			// 			"token": this.token,
			// 		},
			// 		method: "POST",
			// 		data: {
			// 			ecId: this.ecId
			// 		},
			// 		success: (res) => {
			// 			// console.log("getUserCurrentRankNumQuery", res)
			// 			if (res.data.code == 0) {
			// 				const data = res.data.data;
			// 				const rankNum = data.rankNum;
			// 				this.dealNotice(rankNum);
			// 			}
			// 		},
			// 		fail: (err) => {
			// 			console.log("getUserCurrentRankNumQuery err", err)
			// 		},
			// 	});
			// },
			// 是否允许重新分组（报名）
			isAllowMcSignUp() {
				uni.request({
					url: apiIsAllowMcSignUp,
					header: {
						"Content-Type": "application/x-www-form-urlencoded",
						"token": this.token,
					},
					method: "POST",
					data: {
						ecId: this.ecId
					},
					success: (res) => {
						// console.log("isAllowMcSignUp", res)
						if (res.data.code == 0) {
							const data = res.data.data;
							this.allowMcSignUp = data.allowSignUp;
						}
					},
					fail: (err) => {
						console.log("isAllowMcSignUp err", err)
					},
				});
			},
			btnBack() {
				// window.history.back();
				/* uni.navigateTo({
					url: "/pages/bm/style4/rankOverview?" + this.queryString
				}); */

				const url = `action://to_home/`;
				// window.location.href = url;
				tools.appAction(url);
			},
			btnStartGame() {
				uni.navigateTo({
					url: "/pages/bm/style4/rankOverview?" + this.queryString
				});
			},
			btnInfo() {
				// console.log(this.$refs.mypopup);
				this.$refs.mypopup.popupOpen();
			},
			btnMyEgg() {
				uni.navigateTo({
					url: "/pages/achievement/index2?tabCurrent=2&" + this.queryString
				});
			},
			btnExchg() {
				this.$refs.mypopupExchg.popupOpen();
			},
			onTab1Click(val) {
				// console.log("onTab1Click: ", val);
				this.tab1Current = val;
			},
			onTab2Click(val) {
				// console.log("onTab2Click: ", val);
				this.tab2Current = val;
			},
			onSelectChange(val) {
				console.log("onSelectChange: ", val);
				this.ocaId = val.value;
				this.getCardRankDetailQuery();
				uni.setStorageSync(this.mapKey, this.ocaId);
			},
		}
	}
</script>

<style scoped>
	.content {
		width: 100vw;
		height: 100vh;
	}

	.top-default {
		width: 100%;
		height: 170px;
		padding-top: 36px;
		justify-content: space-between;
		background-image: url('static/backgroud/top_bg_sddx.png');
		background-repeat: no-repeat;
		background-position: center;
		background-size: cover;
	}

	.topbar {
		width: 90%;
		justify-content: space-between;
	}

	.topbar-color-default {
		color: #ffffff !important;
	}

	.topbar-back {
		width: 43rpx;
		height: 43rpx;
		color: inherit !important;
		font-size: 48rpx !important;
		/* opacity: 0; */
	}

	.topbar-info {
		width: 46rpx;
		height: 46rpx;
	}

	.topbar-rule {
		font-size: 32rpx;
	}

	.topcontent {
		width: 90%;
		/* height: 90%; */
		margin-bottom: 20px;
	}

	.logo {
		width: 80px;
		height: 80px;
		margin-top: 10px;
		margin-bottom: 10px;
		/* background-image: url('/static/logo/sddx.png'); */
		background-repeat: no-repeat;
		background-position-x: center;
		background-position-y: center;
		background-size: contain;
	}

	.tcbar {
		display: none;
		width: 92%;
		padding: 6px 12px;
		background: #9a300e;
		border-radius: 6px;
	}

	.tcbar-text {
		font-family: Source Han Sans CN;
		font-weight: 500;
		color: #f3d809;
		font-size: 13px;
	}

	.mcName {
		font-size: 40rpx;
		font-weight: 550;
	}

	.topbtm {
		width: 100%;
		margin-bottom: 5px;
		justify-content: space-around;
	}

	.topbtm-name {
		padding: 3px 12px;
		background-color: #9fda39;
		border-radius: 5px;
		text-align: center;
		font-weight: 500;
		color: #497400;
		font-size: 14px;
	}

	.topbtm-egg {
		width: 60px;
		padding: 3px 12px;
		background-color: #c6690a;
		border-radius: 50px;
		text-align: center;
		color: #ffffff;
		font-size: 14px;
	}

	.topbtm-null {
		width: 60px;
		padding: 3px 12px;
	}

	.cal {
		width: 46rpx;
		height: 46rpx;
		margin-right: 20rpx;
	}

	.main {
		width: 100%;
		/* height: 70vh; */
		flex-grow: 1;
		justify-content: space-around;
		/* justify-content: space-between; */
	}

	/* /deep/ .tab-active {
		background-color: #a43a07 !important;
	} */

	.main-tab {
		width: 90%;
		margin-top: 20rpx;
	}

	.tab-view {
		width: 100%;
		/* height: 69vh; */
		flex-grow: 1;
	}

	.btnBack {
		width: 70%;
		height: 80rpx;
		margin-bottom: 20rpx;
		/* font-weight: bold; */
		color: white;
		font-size: 32rpx;
		line-height: 80rpx;
		border-radius: 27px;
		background-color: #2e85ec;
	}

	/* .swiper-item-button {
		background-color: #ff870e !important;
	}
	
	.uni-swiper-dot-active {
		background: #ff870e !important;
	} */
</style>