liuYb лет назад: 6
Родитель
Сommit
03e2f476b0

+ 24 - 0
component/dialog.js

@@ -0,0 +1,24 @@
+Page({
+
+    data: {
+        showModal: false
+    },
+
+    submit: function() {
+        this.setData({
+        showModal: true
+        })
+    },
+
+    preventTouchMove: function() {
+
+    },
+
+
+    go: function() { 
+        this.setData({
+        showModal: false
+        })
+    }
+
+}) 

+ 4 - 0
component/dialog.json

@@ -0,0 +1,4 @@
+// {
+//   "component": true,
+//   "usingComponents": {}
+// }

+ 9 - 0
component/dialog.wxml

@@ -0,0 +1,9 @@
+<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
+
+<view class="modalDlg" wx:if="{{showModal}}">
+    <image src="/figures/logo-smile.png"/>
+    <text>欢迎来到模态对话框~</text>
+    <button bindtap="go">点我可以关掉对话框</button>
+</view>
+
+<button bindtap="submit">点我弹窗</button> 

+ 25 - 0
component/dialog.wxss

@@ -0,0 +1,25 @@
+.mask{
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    left: 0;
+    background: #000;
+    z-index: 9000;
+    opacity: 0.7;
+}
+
+.modalDlg{
+    width: 580rpx;
+    height: 620rpx;
+    position: fixed;
+    top: 50%;
+    left: 0;
+    z-index: 9999;
+    margin: -370rpx 85rpx;
+    background-color: #fff;
+    border-radius: 36rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+} 

+ 12 - 24
pages/index/index.vue

@@ -9,15 +9,15 @@
 		</div>
 		<!-- <image class="banner" src="/static/home-all.png" mode="widthFix"></image> -->
 		<div class="view-content">
-			<div class="view-content-pic-text">
+			<div>
 				<image src="../../static/home_ic_college@2x.png" mode="widthFix"></image>
 				<p>院校库</p>
 			</div>
-			<div class="view-content-pic-text">
+			<div>
 				<image src="../../static/home_ic_major@2x.png" mode="widthFix"></image>
 				<p>专业库</p>
 			</div>
-			<div class="view-content-pic-text">
+			<div>
 				<image src="../../static/home_ic_test@2x.png" mode="widthFix"></image>
 				<p>兴趣测评</p>
 			</div>
@@ -125,8 +125,6 @@
 		 outline: none;
 		 padding-left: 10upx;
 		 border:0;
-		 /* position: relative;
-		 top: ; */
 		 margin-top: 10upx;
 		 }
 	.search-input-box .uni-input-placeholder{
@@ -138,11 +136,13 @@
 		color:rgba(175,178,191,1);
 		line-height:40upx;
 	}
+
 	.banner{
 		width:690upx;
 		height:308upx;
 		border-radius:20upx;
 	}
+
 	.content {
 		display: flex;
 		flex-direction: column;
@@ -150,15 +150,12 @@
 		justify-content: center;
 		/* background-color: #F8F8F8; */
 	}
+
 	.view-content{
 		display: flex;
 		flex-direction: row no-wrap;
-		/* margin-left: 100upx; */
-		width:750upx;
 		height:210upx;
 		background:rgba(255,255,255,1);
-		/* margin-left: 61upx;
-		margin-right: 61upx; */
 	}
 	.view-content image{
 		width:128upx;
@@ -167,10 +164,7 @@
 		vertical-align:middle;
 	}
 	.view-content p{
-		/* padding-left: 24upx; */
-		/*vertical-align:middle;
 		text-align:center;
-		width: 80upx; */
 		width:96upx;
 		height:33upx;
 		font-size:24upx;
@@ -180,13 +174,11 @@
 		line-height:33upx;
 		
 	}
-	.view-content .view-content-pic-text{
+	.view-content div{
 		display: flex;
 		flex-direction: column;
 		width:80upx;
 		height:28upx;
-	/* 	margin-left: 61upx;
-		margin-right: 122upx; */
 	}
 	.view-content div:first-child{
 		margin-left: 61upx;
@@ -199,10 +191,10 @@
 	.view-content div:nth-child(3){
 		margin-right: 61upx;
 	}
-	.view-content-pic-text p{
+	.view-content p{
 		align-self:center;
 	}
-	.view-content-pic-text image{
+	.view-content image{
 		align-self:center;
 	}
 
@@ -250,6 +242,7 @@
 			text-align: -webkit-center;
 		}
 	
+
 	.major{
 		width:750upx;
 		height:470upx;
@@ -262,9 +255,9 @@
 		margin: 0 auto;
 		display: block;
 	}
+
 	.footer{
-		display: flex;/* 
-		justify-content: space-between; */
+		display: flex;
 		position: fixed;
 		bottom: 0;
 		width:750upx;
@@ -286,7 +279,6 @@
 		width:66upx;
 		height:67upx;
 		overflow: visible;
-		/* vertical-align:middle; */
 	}
 	.footer div:first-child p{
 		margin-left: 15upx;
@@ -304,10 +296,6 @@
 		font-weight:500;
 		color:rgba(175,178,191,1);
 		line-height:28upx;
-		/* padding-left: 92upx;
-		padding-right: 93upx; */
 	}
 
-
-
 </style>

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 4 - 21
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -24,8 +24,6 @@
 	 outline: none;
 	 padding-left: 10rpx;
 	 border:0;
-	 /* position: relative;
-	 top: ; */
 	 margin-top: 10rpx;
 }
 .search-input-box .uni-input-placeholder{
@@ -72,12 +70,8 @@
 	-webkit-flex-direction: row no-wrap;
 	    -ms-flex-direction: row no-wrap;
 	        flex-direction: row no-wrap;
-	/* margin-left: 100upx; */
-	width:750rpx;
 	height:210rpx;
 	background:rgba(255,255,255,1);
-	/* margin-left: 61upx;
-	margin-right: 61upx; */
 }
 .view-content image{
 	width:128rpx;
@@ -86,10 +80,7 @@
 	vertical-align:middle;
 }
 .view-content ._p{
-	/* padding-left: 24upx; */
-	/*vertical-align:middle;
 	text-align:center;
-	width: 80upx; */
 	width:96rpx;
 	height:33rpx;
 	font-size:24rpx;
@@ -98,7 +89,7 @@
 	color:rgba(117,119,128,1);
 	line-height:33rpx;
 }
-.view-content .view-content-pic-text{
+.view-content ._div{
 	display: -webkit-box;
 	display: -webkit-flex;
 	display: -ms-flexbox;
@@ -110,8 +101,6 @@
 	        flex-direction: column;
 	width:80rpx;
 	height:28rpx;
-/* 	margin-left: 61upx;
-	margin-right: 122upx; */
 }
 .view-content ._div:first-child{
 	margin-left: 61rpx;
@@ -124,12 +113,12 @@
 .view-content ._div:nth-child(3){
 	margin-right: 61rpx;
 }
-.view-content-pic-text ._p{
+.view-content ._p{
 	-webkit-align-self:center;
 	    -ms-flex-item-align:center;
 	        align-self:center;
 }
-.view-content-pic-text image{
+.view-content image{
 	-webkit-align-self:center;
 	    -ms-flex-item-align:center;
 	        align-self:center;
@@ -211,8 +200,7 @@
 	display: -webkit-box;
 	display: -webkit-flex;
 	display: -ms-flexbox;
-	display: flex;/* 
-	justify-content: space-between; */
+	display: flex;
 	position: fixed;
 	bottom: 0;
 	width:750rpx;
@@ -234,7 +222,6 @@
 	width:66rpx;
 	height:67rpx;
 	overflow: visible;
-	/* vertical-align:middle; */
 }
 .footer ._div:first-child ._p{
 	margin-left: 15rpx;
@@ -259,10 +246,6 @@
 	font-weight:500;
 	color:rgba(175,178,191,1);
 	line-height:28rpx;
-	/* padding-left: 92upx;
-	padding-right: 93upx; */
 }
 
 
-
-

+ 7 - 0
unpackage/dist/dev/mp-weixin/sitemap60.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}