Bladeren bron

Merge branch 'master' of http://81.70.224.233:10080/yichael/ZhongChuang_front_2

# Conflicts:
#	components/startLearning/learningAndExperiment/learningAndExperiment.vue
yichael 4 jaren geleden
bovenliggende
commit
21abc6dd7c

+ 46 - 0
components/home/shutDownWebview.vue

@@ -0,0 +1,46 @@
+<template>
+	<view class="s_container" v-show='bShowWebview'>
+		<view class="shut_down" @click="onClickShutWebview">退出</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				bShowWebview:false,
+			}
+		},
+		methods: {
+			onClickShutWebview(){
+				this.bShowWebview=false;
+				this.$emit('onHideWebview');
+			},
+			onClickShow(){
+				this.bShowWebview=true;
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.s_container {
+		position: fixed;
+		width: 100%;
+		height: 100%;
+		// z-index: 3;
+	}
+	.shut_down{
+		margin-top: 2%;
+		margin-left: 92%;
+		width: px2vw(78);
+		height: px2vw(58);
+		background: #ffffff;
+		border-radius: px2vw(8);
+		
+		display: flex;
+		text-align: center;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 44 - 0
components/home/webview720.vue

@@ -0,0 +1,44 @@
+<template>
+	<view class="s_container" @touchmove.stop.prevent = "stopPenetrate">
+		<web-view class="webview720" :src="url" v-if='bShowWebview'></web-view>
+			<!-- <web-view class="webview720" :src="url"></web-view> -->
+	</view>	
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				url:'https://www.yuyekeji.cn/H5/720/',
+				bShowWebview:false,
+			}
+		},
+		methods: {
+			onClickShutWebview(){
+				// console.log('3333')
+				this.bShowWebview=false;
+			},
+			onClickShow(){
+				this.bShowWebview=true;
+			},
+			
+			stopPenetrate(){
+			    return;
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.s_container {
+		position: fixed;
+		width: 100%;
+		height: 100%;
+		z-index: 3;
+		// background-color: #ff0000;
+	}
+	.webview720{
+		width: 100%;
+		height: 100%;
+		z-index: 3;
+	}
+</style>

+ 21 - 8
components/startLearning/learningAndExperiment/learningAndExperiment.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 学习与实验 -->
 	<view class="myComRoot df jcc bgclF8">
-		<view class="df fdc contentBox" v-show='!bShowWebview'>
+		<view class="df fdc contentBox">
 			<!-- 换行的段落文字 -->
 			<view class="df content-paragraph" v-for="(paragraph,i) in data_XXYSY[checkedIndex_topTitle].content.paragraphList"
 			 :key="i">
@@ -21,14 +21,13 @@
 			<!-- 按钮 -->
 			<view class="df jcc">
 				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==0' @click="onClick_KSRZ">开始认知</view>
-				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==1' @click="onClick_KSKC" >开始勘察</view>
-				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==2'>下载客户端</view>
-				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==3'>下载客户端</view>
+				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==1' @click="onClick_KSKC">开始勘察</view>
+				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==2' @click="onClick_download_btn">下载客户端</view>
+				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==3' @click="onClick_download_btn">下载客户端</view>
 				<view class="df aic jcc btn-xxysy" v-show='checkedIndex_topTitle==4'>进入虚拟资源库</view>
 			</view>
 		</view>
 	</view>
-
 </template>
 
 <script>
@@ -50,8 +49,6 @@
 				checkedColor: "#EA252C",
 				unCheckedColor_text: "#0E0E0E",
 				unCheckedColor_border: "#C4C4C4",
-				url:'https://www.yuyekeji.cn/H5/720/',
-				bShowWebview:getApp().globalData.bShowWebview,
 			}
 		},
 		methods: {
@@ -60,13 +57,29 @@
 				// console.log("2级点击", index, this.data_XXYSY[index].content);
 				// console.log("***",this.myData_QXZB_SYQY);
 			},
-			onClick_KSRZ(){
 				this.$emit("onClick_KSRZ")
 			},
 			onClick_KSKC(){
 				this.$emit("onShowWebview720");
 				// this.$emit("onClick_KSKC")
 			},
+			onClick_download_btn() {
+				let url = this.$Api + "/file/simulationexe";
+				uni.request({
+					url: url, //仅为示例,并非真实接口地址。
+					success: (res) => {
+						console.log('get成功');
+						console.log(res.data);
+
+						window.location.href = res.data;
+
+					},
+					fail: (res) => {
+						console.log('get失败');
+						console.log(res.data);
+					}
+				});
+			}
 		}
 	}
 </script>