Переглянути джерело

首页 退出bool变量改变 登录限制

yichael 4 роки тому
батько
коміт
cfa63c966b
6 змінених файлів з 50 додано та 5 видалено
  1. 42 3
      components/home/sy.vue
  2. 4 0
      components/leftMenu.vue
  3. 1 0
      components/user/selfInfo.vue
  4. 1 1
      manifest.json
  5. 1 1
      myData.js
  6. 1 0
      pages/home.vue

+ 42 - 3
components/home/sy.vue

@@ -52,8 +52,13 @@
 			
 			
 			<img src="../../assets/home/homeBG.jpg" />
-			<view class = 'theoryLearn' @click="onTheoryLearn()">理论学习</view>
-			<view class = 'startExperiment' @click="onStartExperiment()">开始实验</view>
+
+			<video class="myVideo" src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4"
+			                    @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls>
+			</video>
+		
+		<!-- 	<view class = 'theoryLearn' @click="onTheoryLearn()">理论学习</view>
+			<view class = 'startExperiment' @click="onStartExperiment()">开始实验</view> -->
 		</view>
 	</view>
 </template>
@@ -63,7 +68,7 @@
 		data() {
 			return {
 				showIndex: -1,
-
+		
 				menu: [{
 						"title": '虚拟仿真资产库',
 						"text": '科学实验,是指根据一定目的,运用一定的仪器、设备等物质手'
@@ -96,12 +101,27 @@
 				this.showIndex = index;
 			},
 			onClick_menu_btn(index) {
+				if(!getApp().globalData.bLogin) {
+					alert('请先登录')
+					return
+				};
+				
 				this.$emit("onClick_menu_btn", index);
 			},
 			onTheoryLearn(){
+				if(!getApp().globalData.bLogin) {
+					alert('请先登录')
+					return
+				};
+				
 				this.$emit("onTheoryLearnu_btn");
 			},
 			onStartExperiment(){
+				if(!getApp().globalData.bLogin) {
+					alert('请先登录')
+					return
+				};
+				
 				this.$emit("onStartExperiment_btn");
 			}
 		}
@@ -296,4 +316,23 @@
 		margin-left: px2vw(1144);
 		margin-top: px2vw(171);
 	}
+	
+	.myVideo{
+		position: absolute;
+		
+		left: px2vw(770);
+		top: px2vw(371);
+		
+		// width: px2vw(361);
+		// height: px2vw(143);
+		
+		// display: flex;
+		// justify-content: center;
+		// align-items:center;
+		
+		// background-color: #ff0000;
+		// color: #ffffff;
+		
+		// border-radius: 15px 15px 15px 15px;
+	}
 </style>

+ 4 - 0
components/leftMenu.vue

@@ -98,6 +98,10 @@
 				this.isShow = false;
 			},
 			show(indexArr) {
+				if(!getApp().globalData.bLogin) {
+					alert('请先登录')
+					return
+				};
 				this.isShow = true;
 				// console.log("左侧导航展示",indexArr);
 				this.checkedIndex1 = indexArr[0];

+ 1 - 0
components/user/selfInfo.vue

@@ -486,6 +486,7 @@
 		color: #FFFFFF;
 		line-height: px2vw(31);
 		margin-top: px2vw(94);
+		// z-index: 100;
 	}
 
 	.btn-cancel {

+ 1 - 1
manifest.json

@@ -80,7 +80,7 @@
         "enable" : false
     },
     "h5" : {
-        "title" : "基于XR技术的影视与演播空间设计虚拟仿真实验",
+        "title" : "戏剧影视美术XR创作",
         "router" : {
             "mode" : "history",
             "base" : "./"

+ 1 - 1
myData.js

@@ -30,4 +30,4 @@ mydata_userInfo = {
 }
 // mydata_api='http://39.105.166.141:8085'
 // mydata_api='http://8.140.128.1:8085'
-mydata_api='http://tanhuagame.com:8085'
+mydata_api='http://ilabtft.cuc.edu.cn/web'

+ 1 - 0
pages/home.vue

@@ -582,6 +582,7 @@
 			onClick_userExit() {
 				this.showPage(4);
 				this.$refs.TopMenu.switchMiddleState(topMenuS.SY, -1);
+				getApp().globalData.bLogin = false;
 			},
 			onLoginClick() {
 				this.showPage(0);