wzx 1 year ago
parent
commit
48ede477e2
42 changed files with 559 additions and 88 deletions
  1. 1 1
      card/common/api.js
  2. 209 0
      card/common/openmap.js
  3. 22 0
      card/common/tools.js
  4. 180 0
      card/components/my-popup-map/my-popup-map.vue
  5. 27 15
      card/pages/achievement/index.vue
  6. 12 12
      card/pages/bm/style1/cardconfig.md
  7. 13 7
      card/pages/bm/style1/index.vue
  8. 22 9
      card/pages/bm/style1/rankList.vue
  9. 15 4
      card/pages/bm/style1/signup.vue
  10. 2 2
      card/pages/jbs/cardconfig.md
  11. 9 8
      card/pages/jbs/index.vue
  12. 41 25
      card/pages/jbs/rankList.vue
  13. 3 3
      card/pages/mytz/detail.vue
  14. 3 2
      card/pages/mytz/index.vue
  15. BIN
      card/static/backgroud/top_medal.png
  16. BIN
      card/static/cup/1/1.png
  17. BIN
      card/static/cup/1/10.png
  18. BIN
      card/static/cup/1/10h.png
  19. BIN
      card/static/cup/1/11.png
  20. BIN
      card/static/cup/1/11h.png
  21. BIN
      card/static/cup/1/12.png
  22. BIN
      card/static/cup/1/12h.png
  23. BIN
      card/static/cup/1/1h.png
  24. BIN
      card/static/cup/1/2.png
  25. BIN
      card/static/cup/1/2h.png
  26. BIN
      card/static/cup/1/3.png
  27. BIN
      card/static/cup/1/3h.png
  28. BIN
      card/static/cup/1/4.png
  29. BIN
      card/static/cup/1/4h.png
  30. BIN
      card/static/cup/1/5.png
  31. BIN
      card/static/cup/1/5h.png
  32. BIN
      card/static/cup/1/6.png
  33. BIN
      card/static/cup/1/6h.png
  34. BIN
      card/static/cup/1/7.png
  35. BIN
      card/static/cup/1/7h.png
  36. BIN
      card/static/cup/1/8.png
  37. BIN
      card/static/cup/1/8h.png
  38. BIN
      card/static/cup/1/9.png
  39. BIN
      card/static/cup/1/9h.png
  40. BIN
      card/static/logo/map_baidu.png
  41. BIN
      card/static/logo/map_gaode.png
  42. BIN
      card/static/logo/map_tengxun.png

+ 1 - 1
card/common/api.js

@@ -4,7 +4,7 @@ export const ossUrl = 'http://oss-card.colormaprun.com/card/';
 // export const token = '';
 
 export const apiServer = 'https://t-mapi.colormaprun.com/api/card/';	// 测试版
-export const token = '1ea8fb7c1eb3259a9b1055cc68c1d435';
+export const token = '6052389aca5d8d5ecdc4b6f8b0fdfdd5';
 // export const token = '3ea08be20abc5f8dfee4a11b32606bc3';
 // export const token = '---';
 

+ 209 - 0
card/common/openmap.js

@@ -0,0 +1,209 @@
+// 判断设备类型
+export function getDeviceType() {
+  var userAgent = navigator.userAgent || navigator.vendor || window.opera;
+ 
+  if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {
+    return 'iOS'; // iOS device
+  } else if (userAgent.match(/Android/i)) {
+    return 'Android'; // Android device
+  } else {
+    return 'unknown'; // 其他设备
+  }
+}
+
+// 打开指定的地图APP
+// mapAppId 1: 高德地图  2:百度地图  3: 腾讯地图
+// longitude, latitude  地点经纬度
+// name	地点名称
+export function openNavigation(mapAppId, longitude, latitude, name) {
+	let url = ""; // app url
+	let webUrl = ""; // web url 用来为用户未安装导航软件时打开浏览器所使用url
+	let referer = "彩图奔跑"; //应用名称
+	
+	const deviceType = getDeviceType();
+	
+	switch (mapAppId) {
+		//下面是拼接url,不同系统以及不同地图都有不同的拼接字段
+		case 1: //打开高德地图
+			if (deviceType == "Android") { // 安卓
+				url =
+					`androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
+			} else { //苹果
+				url =
+					`iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
+			}
+			webUrl =
+				`https://uri.amap.com/marker?position=${longitude},${latitude}&name=${name}&src=mypage&coordinate=gaode`
+			break;
+		case 2: //打开百度地图
+			if (deviceType == "Android") { // 安卓
+				url =
+					`baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=andr.baidu.openAPIdemo&coord_type=gcj02`;
+			} else { //苹果
+				url =
+					`iosamap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`;
+			}
+			webUrl =
+				`http://api.map.baidu.com/marker?location=${latitude},${longitude}&title=${name}&content=${name}&output=html&src=webapp.baidu.openAPIdemo`
+			break;
+		case 3: //打开腾讯地图
+			if (deviceType == "Android") { // 安卓
+				url =
+					`qqmap://map/geocoder?coord=${latitude},${longitude}&title${name}&addr=${name}=&referer=${referer}`
+			} else { //苹果
+				url =
+					`qqmap://map/geocoder?coord=${latitude},${longitude}&title${name}&addr=${name}=&referer=${referer}`;
+			}
+			webUrl =
+				`https://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude}&title=${name}&addr=${name}&referer=${referer}`
+			break;
+	}
+	
+	// 如果选中
+	if (url != "") {
+		url = encodeURI(url);
+		
+		document.addEventListener('visibilitychange', function() {
+		    if (document.hidden) { // 当页面被切换至后台时
+		        // console.log("页面已经切换到了后台");
+				clearTimeout(t);
+				appInstalled = true;
+				// uni.showToast({
+				// 	title: chooseMap + '已安装,正在打开APP...',
+				// 	icon: 'none',
+				// 	duration: 2000
+				// });
+		    } else { // 当页面重新显示在前台时
+		        // console.log("页面已经切换回前台");
+		    }
+		});
+		
+		// window.open(url);
+		window.location.href = url;
+		
+		let chooseMap = ''
+		if (mapAppId == 1) {
+			chooseMap = "高德地图"
+		} else if (mapAppId == 2) {
+			chooseMap = "百度地图"
+		} else {
+			chooseMap = "腾讯地图"
+		}
+		
+		let appInstalled = false;
+		let t = setTimeout(() => {
+			if (appInstalled) {
+				return;
+			}
+			
+			uni.showModal({
+				title: '提示',
+				content: '您的手机尚未安装' + chooseMap + ',是否要使用浏览器打开?',
+				confirmText: '确定', //确定文本的文字
+				cancelText: '取消', //确定文本的文字
+				showCancel: true, //没有取消按钮的弹框
+				success: function(res) {
+					if (res.confirm) {
+						window.open(webUrl);
+						// window.location.href = webUrl;
+					} else if (res.cancel) {
+					}
+				}
+			})
+		}, 500); // 500毫秒后进行检查
+		
+	}
+}
+
+// [App平台] 打开地图
+// 导航 会打开导航菜单供用户选择
+export function openNavigation2(longitude, latitude, name) {
+	let url = ""; // app url
+	let webUrl = ""; // web url 用来为用户未安装导航软件时打开浏览器所使用url
+	let referer = "SKK"; //应用名称
+	
+	plus.nativeUI.actionSheet({ //选择菜单
+		title: "选择地图应用",
+		cancel: "取消",
+		buttons: [{
+			title: "高德地图"
+		}, {
+			title: "百度地图"
+		}, {
+			title: "腾讯地图"
+		}] // 可选的地图类型
+	}, (e) => {
+		// 判断用户选择的地图
+		switch (e.index) {
+			//下面是拼接url,不同系统以及不同地图都有不同的拼接字段
+			case 1: //打开高德地图
+				if (plus.os.name == "Android") { // 安卓
+					url =
+						`androidamap://viewMap?sourceApplication=appname&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
+				} else { //苹果
+					url =
+						`iosamap://viewMap?sourceApplication=applicationName&poiname=${name}&lat=${latitude}&lon=${longitude}&dev=0`;
+				}
+				webUrl =
+					`https://uri.amap.com/marker?position=${longitude},${latitude}&name=${name}&src=mypage&coordinate=gaode`
+				break;
+			case 2: //打开百度地图
+				if (plus.os.name == "Android") { // 安卓
+					url =
+						`baidumap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=andr.baidu.openAPIdemo&coord_type=gcj02`;
+				} else { //苹果
+					url =
+						`iosamap://map/marker?location=${latitude},${longitude}&title=${name}&content=${name}&src=ios.baidu.openAPIdemo&coord_type=gcj02`;
+				}
+				webUrl =
+					`http://api.map.baidu.com/marker?location=${latitude},${longitude}&title=${name}&content=${name}&output=html&src=webapp.baidu.openAPIdemo`
+				break;
+			case 3: //打开腾讯地图
+				if (plus.os.name == "Android") { // 安卓
+					url =
+						`qqmap://map/geocoder?coord=${latitude},${longitude}&title${name}&addr=${name}=&referer=${referer}`
+				} else { //苹果
+					url =
+						`qqmap://map/geocoder?coord=${latitude},${longitude}&title${name}&addr=${name}=&referer=${referer}`;
+				}
+				webUrl =
+					`https://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude}&title=${name}&addr=${name}&referer=${referer}`
+				break;
+		}
+		
+		// 如果选中
+		if (url != "") {
+			url = encodeURI(url);
+			// console.log(url, '地址')
+			// 打开 app 导航 
+			plus.runtime.openURL(url, (err) => { // 失败回到
+				// 毕竟用户可能没有安装app但一定安装的有浏览器						
+				// 如果失败则说明未安装 直接 打开网页版进行导航
+				let chooseMap = ''
+				if (e.index == 1) {
+					chooseMap = "高德地图"
+				} else if (e.index == 2) {
+					chooseMap = "百度地图"
+				} else {
+					chooseMap = "腾讯地图"
+				}
+				uni.showModal({
+					title: '提示',
+					content: '检测到您本机暂未安装' + chooseMap + '应用,是否要选择使用浏览器打开?',
+					confirmText: '确定', //确定文本的文字
+					cancelText: '取消', //确定文本的文字
+					showCancel: true, //没有取消按钮的弹框
+					success: function(res) {
+						if (res.confirm) {
+							plus.runtime.openURL(webUrl)
+							console.log('用户点击了确定')
+						} else if (res.cancel) {
+							console.log('用户点击了取消')
+							// plus.nativeUI.alert("本机未安装指定的地图应用");
+						}
+					}
+				})
+			});
+		}
+	})
+}

+ 22 - 0
card/common/tools.js

@@ -1,4 +1,26 @@
 var tools = {
+	
+	// 判断赛事/活动状态 0: 未开始  1: 进行中  2: 已结束
+	checkMcState(beginSecond, endSecond) {
+		let mcState = 0;	// 未开始
+		if (beginSecond > 0 && endSecond > 0) {
+			const now = Date.now() / 1000;
+			const dif1 = beginSecond - now;
+			const dif2 = endSecond - now;
+			// const dif = 3600*24 - 60;
+			if (dif1 > 0) {
+				console.log("活动未开始");
+				mcState = 0;	// 未开始
+			} else if (dif2 > 0) {
+				console.log("活动进行中");
+				mcState = 1;	// 进行中
+			} else {
+				console.log("活动已结束");
+				mcState = 2;	// 已结束
+			}
+		}
+		return mcState;
+	},
 
 	// 动态创建<style>标签,将CSS代码插入到文档中
 	loadCssCode(cssCode) {

+ 180 - 0
card/components/my-popup-map/my-popup-map.vue

@@ -0,0 +1,180 @@
+<template>
+	<uni-popup ref="popup" type="bottom" :mask-click="false" maskBackgroundColor="rgba(0, 0, 0, 0.6)">
+		<view class="uni-popup-share">
+			<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
+			<view class="uni-share-content">
+				<view class="uni-share-content-box">
+					<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index"
+						@click.stop="select(item,index)">
+						<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+						<text class="uni-share-text">{{item.text}}</text>
+					</view>
+
+				</view>
+			</view>
+			<view class="uni-share-button-box">
+				<button class="uni-share-button" @click="popupClose">{{cancelText}}</button>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import { openNavigation } from '../../common/openmap';
+
+	export default {
+		name: 'UniPopupShare',
+		emits: ['select'],
+		props: {
+			title: {
+				type: String,
+				default: ""
+			},
+			point: {
+				longitude: "",
+				latitude: "",
+				name: "",
+			}
+		},
+		data() {
+			return {
+				bottomData: [{
+						id: 1,
+						text: '高德地图',
+						icon: '/static/logo/map_gaode.png',
+					},
+					{
+						id: 2,
+						text: '百度地图',
+						icon: '/static/logo/map_baidu.png',
+					},
+					{
+						id: 3,
+						text: '腾讯地图',
+						icon: '/static/logo/map_tengxun.png',
+					},
+				]
+			}
+		},
+		created() {},
+		computed: {
+			cancelText() {
+				return "取消"
+			},
+			shareTitleText() {
+				return this.title || "请选择"
+			}
+		},
+		methods: {
+			popupOpen() {
+				this.$refs.popup.open()
+			},
+			popupClose() {
+				this.$refs.popup.close()
+				// this.$emit('popup-close');
+			},
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				// this.$emit('select', {
+				// 	item,
+				// 	index
+				// })
+				
+				openNavigation(item.id, this.point.longitude, this.point.latitude, this.point.name);
+				this.popupClose()
+			},
+		}
+	}
+</script>
+<style lang="scss">
+	.uni-popup-share {
+		background-color: #fff;
+		border-top-left-radius: 11px;
+		border-top-right-radius: 11px;
+	}
+
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: flex-end;
+		justify-content: center;
+		height: 40px;
+	}
+
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		// align-items: center;
+		padding-top: 10px;
+	}
+
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		justify-content: center;
+		width: 90vw;
+	}
+
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+
+	.uni-share-image {
+		width: 50px;
+		height: 50px;
+		border: 1px solid;
+		border-color: darkgray;
+		border-radius: 5px
+	}
+
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 25px;
+	}
+
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 27 - 15
card/pages/achievement/index.vue

@@ -9,7 +9,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 			<view class="topbar uni-row">
 				<view></view>
 				<text>成就</text>
-				<text style="color: rgba(46, 133, 236, 1);"><!-- 完成 --></text>
+				<text style="color: rgba(46, 133, 236, 1);" @click="test">导航</text>
 			</view>
 			<view class="tab uni-row">
 				<text :class="tabCurrent == 0 ? 'tab-active' : 'tab-unactive'" @click="tabCurrent=0">挑战</text>
@@ -24,7 +24,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 						<view class="list uni-row">
 							<view class="item uni-column" v-for="(item2, index2) in item.monthRs" :key="index2">
 								<view class="item-cup" :style="getCupStyle('cup', item2.month)">
-									<view class="item-cup-gray" :style="getCupStyle('cup-gray', item2.month, getCupProgress(item2.targetNum, item2.realNum))"></view>
+									<view class="item-cup-gray"
+										:style="getCupStyle('cup-gray', item2.month, getCupProgress(item2.targetNum, item2.realNum))">
+									</view>
 								</view>
 								<view class="item-title uni-row">
 									<text class="item-title-month">{{item2.month}}月</text>
@@ -54,14 +56,16 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 
 			</view>
 		</view>
-		
+
 		<my-popup ref="mypopup" :dataList="popupDataList" @popup-close="onPopupClose"></my-popup>
-		
+		<my-popup-map ref="mypopupmap" :point="point"></my-popup-map>
+
 	</view>
 </template>
 
 <script>
 	import tools from '../../common/tools';
+
 	import {
 		token,
 		apiMonthlyChallengeQuery,
@@ -85,6 +89,11 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 
 				tabCurrent: 0,
 				popupDataList: [],
+				point: {
+					longitude: 117.022194,
+					latitude: 36.661612,
+					name: "泉城广场定向赛起始点",
+				},
 			}
 		},
 		computed: {},
@@ -201,14 +210,14 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 					data: {},
 					success: (res) => {
 						// console.log("getUnReadMessageQuery", res);
-			
+
 						if (checkResCode(res)) {
 							if (res.statusCode == 401) { // 未登录
 								this.tokenValid = false;
 							} else {
 								this.tokenValid = true;
 							}
-			
+
 							this.unReadMessageRs = res.data.data;
 							this.mqIdListStr = "";
 							for (var i = 0; i < this.unReadMessageRs.length; i++) {
@@ -216,19 +225,19 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 									type: 3,
 									data: {}
 								};
-								if (this.unReadMessageRs[i].mqType == 1) {	// 消息类型  1: 成就
+								if (this.unReadMessageRs[i].mqType == 1) { // 消息类型  1: 成就
 									popupData.data.title = "恭喜";
 								}
 								popupData.data.img = this.unReadMessageRs[i].iconUrl;
 								popupData.data.content = "恭喜获得成就 \r\n" + this.unReadMessageRs[i].aiName;
 								this.popupDataList.push(popupData)
-								
+
 								this.mqIdListStr += this.unReadMessageRs[i].mqId;
-								if (i < this.unReadMessageRs.length-1) {
+								if (i < this.unReadMessageRs.length - 1) {
 									this.mqIdListStr += ",";
 								}
 							}
-							
+
 							if (this.popupDataList.length > 0) {
 								this.$refs.mypopup.popupOpen();
 							}
@@ -262,6 +271,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 			onPopupClose() {
 				console.log("onPopupClose");
 				this.readMessage();
+			},
+			test() {
+				this.$refs.mypopupmap.popupOpen();
 			}
 		}
 	}
@@ -320,7 +332,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 		padding-top: 30rpx;
 		padding-bottom: 30rpx;
 	}
-	
+
 	.norecord {
 		font-weight: 500;
 		color: #818181;
@@ -342,11 +354,11 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 		width: 100%;
 		padding-bottom: 10rpx;
 		flex-wrap: wrap;
-		justify-content: center;
+		justify-content: flex-start;
 	}
 
 	.item {
-		width: 31%;
+		width: 31.85%;
 		margin: 20rpx 5rpx;
 	}
 
@@ -366,7 +378,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 		background-repeat: no-repeat;
 		background-size: 100% auto;
 		/* background-clip: padding-box; */
-		
+
 		mask-image: url('/static/backgroud/mask.png');
 		mask-size: 100%;
 		mask-repeat: no-repeat;
@@ -391,7 +403,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/index
 		background-position-x: center;
 		/* background-position-y: center; */
 		background-repeat: no-repeat;
-		background-size: 100% auto;
+		background-size: auto 100%;
 	}
 
 	.item-title {

+ 12 - 12
card/pages/bm/style1/cardconfig.md

@@ -10,8 +10,8 @@
 		}
 		
 		.logo{
-			width: 120px;
-			height: 120px;
+			width: 50vw;
+			height: 50vw;
 			background: url('static/logo/xfl.png') no-repeat center;
 			background-size: contain;
 		}
@@ -22,8 +22,8 @@
 	"css": "
 		.top{
 			width: 100%;
-			height: 215px;
-			padding-top: 30px;
+			height: 206px;
+			padding-top: 36px;
 			padding-bottom: 30px;
 			justify-content: space-between;
 			background-image: url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#178bff 0%,#004d9b 100%);
@@ -50,8 +50,8 @@
 	"css": "
 		.top{
 			width: 100%;
-			height: 26vh;
-			padding-top: 30px;
+			height: 24.6vh;
+			padding-top: 36px;
 			justify-content: space-between;
 			background-image: url('static/backgroud/top_run.png'), url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#178bff 0%,#004d9b 100%);
 			background-repeat: no-repeat;
@@ -68,8 +68,8 @@
 "index": {
 	"css": "
 		.logo{
-			width: 150px;
-			height: 120px;
+			width: 50vw;
+			height: 50vw;
 			background: url('static/logo/sqsj.png') no-repeat center;
 			background-size: contain;
 		}
@@ -80,8 +80,8 @@
 	"css": "
 		.top{
 			width: 100%;
-			height: 215px;
-			padding-top: 30px;
+			height: 206px;
+			padding-top: 36px;
 			padding-bottom: 30px;
 			justify-content: space-between;
 			background-image: url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#7aedff 0%,#047200 100%);
@@ -123,8 +123,8 @@
 	"css": "
 		.top{
 			width: 100%;
-			height: 26vh;
-			padding-top: 30px;
+			height: 24.6vh;
+			padding-top: 36px;
 			justify-content: space-between;
 			background-image: url('static/backgroud/top_run.png'), url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#7aedff 0%,#047200 100%);
 			background-repeat: no-repeat;

+ 13 - 7
card/pages/bm/style1/index.vue

@@ -189,8 +189,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/index
 							}
 							
 							.logo{
-								width: 160px;
-								height: 120px;
+								width: 50vw;
+								height: 50vw;
 								background: url('static/logo/sqsj.png') no-repeat center;
 								background-size: contain;
 							}
@@ -217,11 +217,16 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/index
 						ecId: this.ecId
 					},
 					success: (res) => {
-						// console.log("getUserJoinCardQuery", res)
+						console.log("getUserJoinCardQuery", res)
 						const code = res.data.code;
 						const data = res.data.data;
 						if (code == 0) {
 							this.isJoin = data.isJoin;
+							if (this.isJoin) {
+								this.btnText = "已报名";
+							} /* else {
+								this.btnText = "未报名";
+							} */
 						}
 					},
 					fail: (err) => {
@@ -299,8 +304,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/index
 	}
 
 	.logo-default {
-		width: 120px;
-		height: 120px;
+		width: 50vw;
+		height: 50vw;
 		background-image: url('/static/logo/jbs.png');
 		background-repeat: no-repeat;
 		background-position-x: center;
@@ -313,20 +318,21 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/index
 		/* line-height: 25px; */
 		font-family: Roboto;
 		color: #ffffff;
-		font-size: 36rpx;
+		font-size: 40rpx;
 		text-align: center;
 	}
 
 	.name {
 		font-family: Roboto;
 		color: #ffffff;
-		font-size: 46rpx;
+		font-size: 50rpx;
 		text-align: center;
 	}
 
 	.button {
 		width: 320rpx;
 		height: 86rpx;
+		margin-top: 30rpx;
 		background: #ffffff;
 		border-radius: 56rpx;
 		font-size: 46rpx;

+ 22 - 9
card/pages/bm/style1/rankList.vue

@@ -26,9 +26,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 
 				<view class="topbtm uni-column">
 					<view class="topbtm-content uni-row">
-						<text class="topbtm-sspm"></text>
+						<text class="topbtm-sspm" v-if="mcState==1"></text>
 						<text class="topbtm-sspm">实时排名</text>
-						<view class="btnReGroup" @click="btnReGroup">重新分组</view>
+						<view class="btnReGroup" v-if="mcState==1" @click="btnReGroup">重新分组</view>
 					</view>
 				</view>
 				<!-- <text class="mcName">{{ecId}} - {{mcId}} - {{token}}</text> -->
@@ -53,7 +53,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 					<my-ranklist v-show="tabCurrent === 2" v-if="teamType==1" :rankRs="teamNum==2 ? rankList.inTeamRs : rankList.otherRs[2]"></my-ranklist>
 				</view>
 
-				<button class="btnStart" @click="btnStart">开始比赛</button>
+				<button class="btnStart btnStart-disable" v-if="mcState==0">活动尚未开始</button>
+				<button class="btnStart btnStart-enable" v-if="mcState==1" @click="btnStart">开始比赛</button>
+				<button class="btnStart btnStart-disable" v-if="mcState==2">活动已结束</button>
 			</view>
 			
 			<my-popup ref="mypopup" :dataList="popupDataList" :acttime="acttime"></my-popup>
@@ -92,6 +94,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 				coiName: "", // 已报名单位名称,可为空
 				teamNum: 0, // 已报名队伍编号,可为0
 
+				mcState: 0 ,// 赛事/活动状态 0: 未开始  1: 进行中  2: 已结束
 				countdown: "", // 倒计时
 				rankList: { // 排名列表
 					totalRankRs: [],
@@ -326,7 +329,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 						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();
@@ -399,8 +404,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 
 	.top-default {
 		width: 100%;
-		height: 26vh;
-		padding-top: 30px;
+		height: 24.6vh;
+		padding-top: 36px;
 		justify-content: space-between;
 		background-image: url("/static/backgroud/top_run.png"), url("/static/backgroud/top_colorbar.png"), linear-gradient(180deg,#f8a95a 0%,#d25f11 100%);
 		/* background-image: url("/static/backgroud/top_run.png"), url("/static/backgroud/top_colorbar.png"), linear-gradient(180deg,#7aedff 0%,#047200 100%); */
@@ -482,8 +487,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 	}
 
 	.topbtm-content {
-		width: 90%;
-		justify-content: space-between;
+		width: 100%;
+		justify-content: space-around;
+		/* justify-content: space-between; */
 	}
 
 	.topbtm-sspm {
@@ -520,8 +526,15 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/rankList
 		color: white;
 		font-size: 32rpx;
 		line-height: 80rpx;
-		background-color: #ffb40b;
 		border-radius: 27px;
 	}
+	
+	.btnStart-enable {
+		background-color: #ffb40b;
+	}
 
+	.btnStart-disable {
+		background-color: #c3c3c3;
+	}
+	
 </style>

+ 15 - 4
card/pages/bm/style1/signup.vue

@@ -29,7 +29,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/signup
 					<text
 						class="introduce-content">{{introduce.content}}</text>
 				</view>
-				<button class="btnSignup" @click="btnSignup">报 名</button>
+				<button class="btnSignup btnSignup-enable" v-if="mcState<=1" @click="btnSignup">报 名</button>
+				<button class="btnSignup btnSignup-disable" v-if="mcState==2">活动已结束</button>
 			</view>
 			
 			<my-popup ref="mypopup" :dataList="popupDataList" :acttime="acttime"></my-popup>
@@ -85,6 +86,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/signup
 				teamList: [], // 
 				interval: null,
 				
+				mcState: 0 ,// 赛事/活动状态 0: 未开始  1: 进行中  2: 已结束
 				teamType: 0, // 队伍类型  0: 红黄蓝紫 1: 学生/家长
 				cssTop: "",
 				cssLogo: "",
@@ -332,6 +334,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/signup
 						this.coiId = data.coiId;
 						this.coiName = data.coiName;
 						this.teamNum = data.teamNum;
+						
+						this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
 
 						this.getActtime();
 						this.getOnlineMcSignUpDetail();
@@ -487,8 +491,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/signup
 	.top-default {
 		width: 100%;
 		/* height: 35vh; */
-		height: 215px;
-		padding-top: 30px;
+		height: 206px;
+		padding-top: 36px;
 		padding-bottom: 30px;
 		justify-content: space-between;
 		background-image: url("/static/backgroud/top_colorbar.png"), linear-gradient(180deg,#f8a95a 0%,#d25f11 100%);
@@ -591,10 +595,17 @@ https://oss-mbh5.colormaprun.com/card/#/pages/bm/style1/signup
 		color: white;
 		font-weight: bold;
 		line-height: 100rpx;
-		background-color: #2e85ec;
 		border-radius: 55rpx;
 	}
+	
+	.btnSignup-enable {
+		background-color: #2e85ec;
+	}
 
+	.btnSignup-disable {
+		background-color: #c3c3c3;
+	}
+	
 	.dialog-content {
 		width: 279px;
 		height: 152px;

+ 2 - 2
card/pages/jbs/cardconfig.md

@@ -23,7 +23,7 @@
 		.top{
 			width: 100%;
 			height: 26vh;
-			padding-top: 30px;
+			padding-top: 36px;
 			justify-content: space-between;
 			background-image: url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#178bff 0%,#004d9b 100%);
 			background-repeat: no-repeat;
@@ -63,7 +63,7 @@
 		.top{
 			width: 100%;
 			height: 26vh;
-			padding-top: 30px;
+			padding-top: 36px;
 			justify-content: space-between;
 			background-image: url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#178bff 0%,#004d9b 100%);
 			background-repeat: no-repeat;

+ 9 - 8
card/pages/jbs/index.vue

@@ -177,14 +177,14 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/index
 						/* const config = {
 						"css": `
 							.content-bg{
-								background: url('static/cardbg/xfl.png');
+								background: url('static/cardbg/xfl.png') no-repeat;
 								background-size: cover;
 							}
 							
 							.logo{
-								width: 120px;
-								height: 120px;
-								background-image: url('static/logo/xfl.png');
+								width: 50vw;
+								height: 50vw;
+								background: url('static/logo/xfl.png') no-repeat;
 								background-size: contain;
 							}
 						`
@@ -290,8 +290,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/index
 	}
 
 	.logo-default {
-		width: 120px;
-		height: 120px;
+		width: 50vw;
+		height: 50vw;
 		background-image: url('/static/logo/jbs.png');
 		background-repeat: no-repeat;
 		background-position-x: center;
@@ -304,20 +304,21 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/index
 		/* line-height: 25px; */
 		font-family: Roboto;
 		color: #ffffff;
-		font-size: 36rpx;
+		font-size: 40rpx;
 		text-align: center;
 	}
 
 	.name {
 		font-family: Roboto;
 		color: #ffffff;
-		font-size: 46rpx;
+		font-size: 50rpx;
 		text-align: center;
 	}
 
 	.button {
 		width: 320rpx;
 		height: 86rpx;
+		margin-top: 30rpx;
 		background: #ffffff;
 		border-radius: 56rpx;
 		font-size: 46rpx;

+ 41 - 25
card/pages/jbs/rankList.vue

@@ -22,18 +22,23 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 			</view>
 			<view class="main uni-column">
 				<my-ranklist :rankRs="rankList.totalRankRs"></my-ranklist>
-				<button class="btnStart" @click="btnStart">开始比赛</button>
+				<button class="btnStart btnStart-disable" v-if="mcState==0">活动尚未开始</button>
+				<button class="btnStart btnStart-enable" v-if="mcState==1" @click="btnStart">开始比赛</button>
+				<button class="btnStart btnStart-disable" v-if="mcState==2">活动已结束</button>
+
 			</view>
-			
+
 			<my-popup ref="mypopup" :dataList="popupDataList"></my-popup>
-			
+
 		</view>
 	</view>
 </template>
 
 <script>
 	import tools from '../../common/tools';
-	import { defaultPopUpDataList } from '/common/define';
+	import {
+		defaultPopUpDataList
+	} from '/common/define';
 	import {
 		token,
 		apiCardDetailQuery,
@@ -50,14 +55,16 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 				firstEnterKey: 'firstEnter-jbs_rankList',
 				queryString: "",
 				token: "",
-				
+
 				ecId: 0, // 卡片id
 				coiId: 0, // 单位id
 				mcId: 0, // 赛事id
 				mcType: 0, // 赛事类型 1 普通活动 2 线下赛 3 线上赛
 				mcName: "", // 赛事名称
-				endSecond: null, // 赛事结束时间戳
-				
+				beginSecond: null, // 活动或赛事开始时间戳,单位秒
+				endSecond: null, // 活动或赛事结束时间戳,单位秒
+
+				mcState: 0, // 赛事/活动状态 0: 未开始  1: 进行中  2: 已结束
 				countdown: "", // 倒计时
 				rankList: { // 排名列表
 					totalRankRs: [],
@@ -65,7 +72,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 					inTeamRs: [],
 				},
 				interval: null,
-				
+
 				dispArrStr: "total", // 要显示的集合范围 (total,team,in,other)
 				cssTop: "",
 				cssLogo: "",
@@ -79,7 +86,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 			// console.log(queryString);
 			this.token = event["token"] ?? token;
 			this.ecId = event["id"] ?? 0;
-			
+
 			tools.removeCssCode();
 
 			this.getCardConfigQuery();
@@ -128,12 +135,12 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 			},
 			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";
 					}
@@ -141,7 +148,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 						this.cssLogo = "logo";
 					}
 				}
-				
+
 				if (this.cssTop == "") {
 					this.cssTop = "top-default";
 				}
@@ -150,7 +157,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 				}
 				console.log("[loadConfig] cssTop:", this.cssTop);
 				console.log("[loadConfig] cssLogo:", this.cssLogo);
-				
+
 				// 加载弹窗数据
 				const popupDataList = config.popupDataList;
 				// console.log("[loadConfig] popupDataList:", popupDataList);
@@ -209,7 +216,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 							.top{
 								width: 100%;
 								height: 26vh;
-								padding-top: 30px;
+								padding-top: 36px;
 								justify-content: space-between;
 								background-image: url('static/backgroud/top_colorbar.png'), linear-gradient(180deg,#178bff 0%,#004d9b 100%);
 								background-repeat: no-repeat;
@@ -240,7 +247,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 							"default"
 						]
 						}; */
-						
+
 						this.loadConfig(config);
 						this.getCardDetailQuery();
 					},
@@ -268,8 +275,11 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 						this.mcId = data.mcId;
 						this.mcType = data.mcType;
 						this.mcName = data.mcName;
+						this.beginSecond = data.beginSecond;
 						this.endSecond = data.endSecond;
 
+						this.mcState = tools.checkMcState(this.beginSecond, this.endSecond);
+
 						this.getCountdown();
 						this.getCardRankDetailQuery();
 
@@ -368,15 +378,15 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 
 	.top-default {
 		width: 100%;
-		height: 29vh;
+		height: 28vh;
 		/* height: 500rpx; */
-		padding-top: 30px;
+		padding-top: 36px;
 		justify-content: flex-start;
-		background-image: url("/static/backgroud/top_bg.png");
+		background-image: url("/static/backgroud/top_medal.png"), url("/static/backgroud/top_bg1.png");
 		background-repeat: no-repeat;
-		background-position-x: center;
-		background-position-y: center;
-		background-size: cover;
+		background-position-x: center, center;
+		background-position-y: 15vh, center;
+		background-size: 55vw auto, cover;
 	}
 
 	.logo-default {
@@ -389,7 +399,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 		background-position-y: center;
 		background-size: contain; */
 	}
-	
+
 	.topbar {
 		width: 90%;
 		/* padding: 0rpx 30rpx; */
@@ -443,14 +453,20 @@ https://oss-mbh5.colormaprun.com/card/#/pages/jbs/rankList
 		line-height: 5vh;
 		background-color: #ffb40b;
 	}
-
+	
+	.btnStart-enable {
+		background-color: #ffb40b;
+	}
+	
+	.btnStart-disable {
+		background-color: #c3c3c3;
+	}
+	
 </style>
 
 <style lang="scss" scoped>
-
 	::v-deep .list {
 		height: 58vh;
 		margin-top: 5px;
 	}
-	
 </style>

+ 3 - 3
card/pages/mytz/detail.vue

@@ -251,9 +251,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/mytz/detail
 
 	.top {
 		width: 100%;
-		height: 360rpx;
-		padding-top: 60rpx;
-		padding-bottom: 60rpx;
+		height: 350rpx;
+		padding-top: 36px;
+		padding-bottom: 30px;
 		justify-content: space-between;
 		background-image: url("/static/backgroud/top_run.png"), linear-gradient(180deg, #178bff 0%, #004d9b 100%);
 		background-repeat: no-repeat;

+ 3 - 2
card/pages/mytz/index.vue

@@ -140,20 +140,21 @@ https://oss-mbh5.colormaprun.com/card/#/pages/mytz/index
 		/* line-height: 25px; */
 		font-family: Roboto;
 		color: #ffffff;
-		font-size: 36rpx;
+		font-size: 40rpx;
 		text-align: center;
 	}
 	
 	.name {
 		font-family: Roboto;
 		color: #ffffff;
-		font-size: 46rpx;
+		font-size: 50rpx;
 		text-align: center;
 	}
 	
 	.button {
 		width: 320rpx;
 		height: 86rpx;
+		margin-top: 20rpx;
 		background: #ffffff;
 		border-radius: 56rpx;
 		font-size: 46rpx;

BIN
card/static/backgroud/top_medal.png


BIN
card/static/cup/1/1.png


BIN
card/static/cup/1/10.png


BIN
card/static/cup/1/10h.png


BIN
card/static/cup/1/11.png


BIN
card/static/cup/1/11h.png


BIN
card/static/cup/1/12.png


BIN
card/static/cup/1/12h.png


BIN
card/static/cup/1/1h.png


BIN
card/static/cup/1/2.png


BIN
card/static/cup/1/2h.png


BIN
card/static/cup/1/3.png


BIN
card/static/cup/1/3h.png


BIN
card/static/cup/1/4.png


BIN
card/static/cup/1/4h.png


BIN
card/static/cup/1/5.png


BIN
card/static/cup/1/5h.png


BIN
card/static/cup/1/6.png


BIN
card/static/cup/1/6h.png


BIN
card/static/cup/1/7.png


BIN
card/static/cup/1/7h.png


BIN
card/static/cup/1/8.png


BIN
card/static/cup/1/8h.png


BIN
card/static/cup/1/9.png


BIN
card/static/cup/1/9h.png


BIN
card/static/logo/map_baidu.png


BIN
card/static/logo/map_gaode.png


BIN
card/static/logo/map_tengxun.png