Browse Source

限制没有登录不能点击

yu 4 years ago
parent
commit
d271bb7ad9
3 changed files with 26 additions and 4 deletions
  1. 18 3
      components/home/simulationCore.vue
  2. 0 1
      components/home/sy.vue
  3. 8 0
      pages/home.vue

+ 18 - 3
components/home/simulationCore.vue

@@ -13,8 +13,11 @@
 				</view>
 			</view>
 		</view>
-
 		<view class="s_footer" style="text-align: center;padding: 80rpx;">
+			<button size="mini" class="m_btn_download" style="" @click="goToProjectMange">进入项目管理中心</button>
+		</view>
+		
+		<!-- <view class="s_footer" style="text-align: center;padding: 80rpx;">
 			<view class="s_title" v-text="'推荐项目'">
 
 			</view>
@@ -43,7 +46,7 @@
 				</table>
 			</view>
 
-		</view>
+		</view> -->
 	</view>
 </template>
 
@@ -78,7 +81,10 @@
 				//         });
 				//     }
 				// });
-				this.getProjectsID();
+				// this.getProjectsID();
+			},
+			goToProjectMange(){
+				
 			},
 			getProjectsID() {
 				// console.log('userID=',this.$UserId)
@@ -290,4 +296,13 @@
 		line-height: 120rpx;
 		font-size: 40rpx;
 	}
+	
+	.m_btn_download {
+		height: 80rpx;
+		line-height: 80rpx;
+		padding: 0 70rpx;
+		background: #EA252C;
+		color: #fff;
+		font-family: MicrosoftYaHei;
+	}
 </style>

+ 0 - 1
components/home/sy.vue

@@ -89,7 +89,6 @@
 				this.$forceUpdate()
 			},
 			onClick_menu(index) {
-			
 				if(!getApp().globalData.bLogin) {
 					alert('请先登录')
 					return

+ 8 - 0
pages/home.vue

@@ -136,6 +136,10 @@
 		},
 		methods: {
 			onTopSYClick(index) {
+				if(!getApp().globalData.bLogin) {
+					alert('请先登录')
+					return
+				};
 				// console.log("点击了首页标题", index, myData_QXZB_SYQY.length);
 				let pageIndex = -1;
 				switch (index) {
@@ -292,6 +296,10 @@
 			},
 			//顶部导航左上角icon点击事件
 			onTopMenuIconClick() {
+				if(!getApp().globalData.bLogin) {
+					alert('请先登录')
+					return
+				};
 				let indexArr = [];
 				switch (this.curShowPage) {
 					case 0: //登录