wzx 9 kuukautta sitten
vanhempi
commit
3e55a21591
3 muutettua tiedostoa jossa 48 lisäystä ja 15 poistoa
  1. 2 2
      card/common/api.js
  2. 28 1
      card/pages/game/grid/cardconfig/test.js
  3. 18 12
      card/pages/game/grid/grid.vue

+ 2 - 2
card/common/api.js

@@ -3,8 +3,8 @@ export const apiServer = process.env.API_BASE_URL;
 // console.log("ossUrl", ossUrl);
 // console.log("apiServer", apiServer);
 
-// export const token = '';
-export const token = '96ba3c924394934f7d30fa869a94ce0d';
+export const token = '';
+// export const token = '96ba3c924394934f7d30fa869a94ce0d';
 // export const token = '9db42d9fe9c9635c85e6fc04f08e898f';
 // export const token = '39de263745caccbb183703987b1c21eb';
 // export const token = 'd4dd6b57a15b4abaccf6cb6adcd4fd44';

+ 28 - 1
card/pages/game/grid/cardconfig/test.js

@@ -7,7 +7,34 @@ export const localCardConfig = `{
 				color: #A65600 !important;
 				background: linear-gradient(117.53deg, #FFCD29 0%, #FFE694 42.36%, #FFC508 100%) !important;
 			}
-		"
+			.uni-swiper-dots-horizontal {
+				bottom: 90px !important;
+			}
+			.topbar-rule {
+				color: #FFFFFF;
+				border-radius: 4px;
+				background: #FF870D;
+			}
+		",
+		"popupRuleConfig": {
+			"height": "550px"
+		},
+		"popupRuleList": [
+			"default3",
+			{
+				"type": 10,
+				"data": {
+					"title": "视频教程",
+					"video": {
+						"src": "https://oss-mbh5.colormaprun.com/video/定向讲解.mp4",
+						"poster": "static/common/jbbs2.png",
+						"width": "100%",
+						"height": "280px"
+					},
+					"content": "<br>定向赛怎么玩?点击上面的视频就知道啦~"
+				}
+			}
+		]
 	},
 	"index": {
 		"css": "

+ 18 - 12
card/pages/game/grid/grid.vue

@@ -7,8 +7,8 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 	<view class="body">
 		<view v-if="pageReady" class="content uni-column">
 			<view class="uni-column page-top">
-				<my-topbar :mcName="compName" class="topbar-color" :showRule="false"
-					@btnBackClick="btnBack"></my-topbar>
+				<my-topbar :mcName="compName" class="topbar-color" :showRule="true" @btnBackClick="btnBack"
+					@btnInfoClick="btnInfo"></my-topbar>
 			</view>
 			<view class="main uni-column">
 				<view v-if="grid.state <= 1" class="mt-content">开始你的挑战吧</view>
@@ -20,7 +20,9 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 						<view class="grid-cell" :style="getGridCellStyle(rowId, colId)" v-for="colId in grid.widthNum"
 							:key="colId" @click="onCellClick(rowId, colId)">
 							<template v-for="(item, index) in grid.detailRs" :key="index">
-								<view class="cell-name" :class="item.isComplete ? 'cell-name-complete' : 'cell-name-uncomplete'" v-if="item.orderNum == getCellOrderNum(rowId, colId)">
+								<view class="cell-name"
+									:class="item.isComplete ? 'cell-name-complete' : 'cell-name-uncomplete'"
+									v-if="item.orderNum == getCellOrderNum(rowId, colId)">
 									{{item.showName}}
 								</view>
 							</template>
@@ -36,11 +38,15 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 					<text class="activityRules-title">{{activityRules.title}}</text>
 					<text class="activityRules-content" v-html="activityRules.content"></text>
 				</view>
-				
+
 			</view>
 
 			<my-popup ref="mypopup" :config="popupDataConfig" :dataList="popupDataList"
 				@popup-start="startGame"></my-popup>
+
+			<my-popup ref="mypopupRule" :config="cardConfigData.popupRuleConfig"
+				:dataList="cardConfigData.popupRuleList"></my-popup>
+				
 		</view>
 	</view>
 </template>
@@ -199,7 +205,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 				// if (this.grid.state >= 3) {
 				// 	style = `background-image: url("${this.grid.actualImgPic}");`;
 				// } else {
-					style = `background-image: url("${this.grid.maskImgPic}");`;
+				style = `background-image: url("${this.grid.maskImgPic}");`;
 				// }
 				// console.log("getGridStyle", style);
 				return style;
@@ -258,7 +264,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 			},
 			loadConfig(cardconfig) {
 				cardconfig = cardfunc.parseCardConfig(cardconfig);
-				// console.log("[loadCardConfig] cardconfig:", cardconfig);
+				console.log("[loadCardConfig] cardconfig:", cardconfig);
 
 				// 加载卡片通用配置
 				if (cardconfig.common != undefined) {
@@ -301,7 +307,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 						this.activityRules.content = activityRules.content;
 					}
 				}
-				
+
 				this.pageReady = true;
 			},
 			// 网格卡片信息查询
@@ -436,7 +442,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 				tools.appAction(url);
 			},
 			btnInfo() {
-				this.$refs.mypopup.popupOpen();
+				this.$refs.mypopupRule.popupOpen();
 			}
 		}
 	}
@@ -509,7 +515,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 	.cell-name-complete {
 		color: #CF6B00;
 	}
-		
+
 	.introduce {
 		width: 96%;
 		margin-top: 10px;
@@ -531,7 +537,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 		line-height: 23px;
 		font-family: Source Han Sans CN;
 	}
-	
+
 	.activityRules {
 		width: 96%;
 		margin-top: 5px;
@@ -542,7 +548,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 		border-radius: 9px;
 		background: #FAF5E6;
 	}
-	
+
 	.activityRules-title {
 		color: #333333;
 		font-size: 16px;
@@ -550,7 +556,7 @@ https://oss-mbh5.colormaprun.com/card/#/pages/game/grid/grid
 		font-weight: 500;
 		font-family: Source Han Sans CN;
 	}
-	
+
 	.activityRules-content {
 		color: #333333;
 		font-size: 14px;