wzx 11 달 전
부모
커밋
4cb7d173fb

+ 29 - 0
card/common/tools.js

@@ -99,6 +99,35 @@ var tools = {
 		return timeStr;
 	},
 	
+	// 格式化赛事时间 2024年9月9日 至 9月12日 2024年12月9日 至 2025年1月6日
+	fmtMcTime3(timestamp1, timestamp2) {
+		const date1 = new Date(timestamp1 * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+		const date2 = new Date(timestamp2 * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
+	
+		const Y1 = date1.getFullYear();
+		const Y2 = date2.getFullYear();
+		const M1 = date1.getMonth() + 1;
+		const M2 = date2.getMonth() + 1;
+		const D1 = date1.getDate();
+		const D2 = date2.getDate();
+	
+		var timeStr1 = Y1 + '年' + M1 + '月' + D1 + '日';
+		var timeStr2 = '';
+	
+		if (Y2 != Y1) {
+			timeStr2 += Y2 + '年' + M2 + '月' + D2 + '日';
+		} else {
+			timeStr2 += M2 + '月' + D2 + '日';
+		}
+	
+		var timeStr = timeStr1;
+		if (timeStr2.length > 0) {
+			timeStr += ' 至 ' + timeStr2;
+		}
+		// console.log("timeStr", timeStr);
+		return timeStr;
+	},
+	
 	// 判断赛事/活动状态 0: 未开始  1: 进行中  2: 已结束
 	checkMcState(beginSecond, endSecond) {
 		let mcState = 0;	// 未开始

+ 2 - 2
card/components/my-pathList/my-pathList.vue

@@ -12,7 +12,7 @@
 				<view class="uni-column">
 					<image mode="aspectFit" class="navimg" :src="item.navImg" @click="onPathImgClick(item, 'nav')">
 					</image>
-					<text class="navtext">导航前往</text>
+					<text class="navtext">起点导航</text>
 				</view>
 			</view>
 			<view v-if="item.type == 4" class="path-nav uni-column">
@@ -24,7 +24,7 @@
 				<view class="uni-column">
 					<image mode="aspectFit" class="navimg2" :src="item.navImg" @click="onPathImgClick(item, 'nav')">
 					</image>
-					<text class="navtext">导航前往</text>
+					<text class="navtext">起点导航</text>
 				</view>
 			</view>
 		</template>

+ 2 - 2
card/manifest.json

@@ -2,8 +2,8 @@
     "name" : "card",
     "appid" : "__UNI__A61F96B",
     "description" : "",
-    "versionName" : "2.0.3",
-    "versionCode" : 203,
+    "versionName" : "2.0.4",
+    "versionCode" : 204,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 54 - 7
card/pages/achievement/ecert/ecert.vue

@@ -129,6 +129,10 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/ecert/ecert
 			fmtDistanct(val) {
 				return Math.round(val * 100 / 1000) / 100;
 			},
+			// 格式化 赛事日期
+			fmtMcTime(timestamp1, timestamp2) {
+				return tools.fmtMcTime3(timestamp1, timestamp2);
+			},
 			getEcertImageStyle() {
 				if (this.ecertWidth == 0) {
 					return "";
@@ -152,14 +156,14 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/ecert/ecert
 			},
 			getParamValue(paramName) {
 				let value = null;
-				if (paramName == "nickName") {
-					value = this.nickName;
-				} else if (paramName == "coiName") {
+				if (paramName == "coiName") {
 					value = "(" + this.coiName + ")";
 				} else if (paramName == "totalDistance") {
 					value = this.fmtDistanct(this.totalDistance);
-				} else if (paramName == "totalSysPoint") {
-					value = this.totalSysPoint;
+				} else if (paramName == "compTime") {
+					value = this.fmtMcTime(this.compBt, this.compEt);
+				} else {
+					return this[paramName];
 				}
 				return value;
 			},
@@ -237,10 +241,53 @@ https://oss-mbh5.colormaprun.com/card/#/pages/achievement/ecert/ecert
 
 							/* this.ecertConfig = {
 								"title": "完赛证书",
-								"tplUrl": "/static/ecert/shanda/youxiujiang.jpg",
+								"tplUrl": "/static/ecert/ecert_tpl.jpg",
 								"width": 2000,
 								"height": 2828,
-								"paramList": [{
+								"paramList": [
+									{
+										"paramName": "compName",
+										"font": {
+											"preStyle": "bold",
+											"size": 86,
+											"family": "",
+											"color": "#000000",
+											"align": "center"
+										},
+										"position": {
+											"x": 1000,
+											"y": 1550
+										}
+									},
+									{
+										"paramName": "compTime",
+										"font": {
+											"preStyle": "",
+											"size": 44,
+											"family": "",
+											"color": "#000000",
+											"align": "center"
+										},
+										"position": {
+											"x": 1100,
+											"y": 1643
+										}
+									},
+									{
+										"paramName": "certificateName",
+										"font": {
+											"preStyle": "bold",
+											"size": 116,
+											"family": "",
+											"color": "#fe0000",
+											"align": "center"
+										},
+										"position": {
+											"x": 1000,
+											"y": 1900
+										}
+									},
+									{
 										"paramName": "nickName",
 										"font": {
 											"preStyle": "bold",

+ 1 - 1
card/pages/tpl/style1/signup.vue

@@ -253,7 +253,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/tpl/style1/signup
 			fmtMcTime(timestamp) {
 				return tools.fmtMcTime(timestamp);
 			},
-			// 获取倒计时
+			// 获取活动时间
 			getActtime() {
 				this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
 			},

+ 1 - 1
card/pages/tpl/style2/signup.vue

@@ -306,7 +306,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/tpl/style2/signup
 			fmtMcTime(timestamp) {
 				return tools.fmtMcTime(timestamp);
 			},
-			// 获取倒计时
+			// 获取活动时间
 			getActtime() {
 				this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
 			},

+ 1 - 1
card/pages/tpl/style3/signup.vue

@@ -306,7 +306,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/tpl/style3/signup
 			fmtMcTime(timestamp) {
 				return tools.fmtMcTime(timestamp);
 			},
-			// 获取倒计时
+			// 获取活动时间
 			getActtime() {
 				this.acttime = tools.getActtime(this.beginSecond, this.endSecond);
 			},