浏览代码

添加蒙层

ymm 3 年之前
父节点
当前提交
5cbacd5271

+ 3 - 2
microserviceUserH5/static/js/vender/vue/config.js

@@ -2,9 +2,10 @@
 // var base_url = 'http://jakehou92.ticp.io'; //测试服务器
 // var base_url = 'http://192.168.100.137:3001'; //测试服务器
 // var base_url = 'http://192.168.100.98:3001'; //测试服务器
-var base_url = baseUrl; //测试服务器
+//var base_url = baseUrl; //测试服务器
 //http://test.androidscloud.com
-//var base_url = 'https://per.cs.se.androidscloud.com/';
+// var base_url = 'https://per.cs.se.androidscloud.com/';
+var base_url = 'http://test.androidscloud.com'
 //https://www.nn-jtjt.com/app
 // var base_url = 'http://kmpark.cdwatertek.com/appwechatpay'; //测试服务器
 // var base_url = 'http://192.168.100.83:3001'; //测试服务器

二进制
microserviceUserH5/static/offImg/zhiyin_pic.png


+ 66 - 11
microserviceUserH5/vcloud/share.html

@@ -4,14 +4,14 @@
 <head>
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
-	<meta name="description" content="分享朋友">
-	<title></title>
+	<meta name="description" content="分享文章">
 	<link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
 	<link rel="stylesheet" href="../static/css/index.css?v=1.0.0.1">
 	<link rel="stylesheet" href="../static/css/vant.css" />
 	<script src="../static/js/vender/vue/vue.min.js"></script>
 	<script src="../static/js/vender/vue/vant.min.js"></script>
 	<script src="../static/js/vender/config.js"></script>
+	<title>分享文章</title>
 	<style>
 		.container {
 			display: flex;
@@ -131,13 +131,42 @@
 			/* margin-bottom: 0.12rem;
 			margin-top: 0.12rem; */
 		}
+
+		.hide {
+			display: none !important;
+		}
+
+		.prompt {
+			position: fixed;
+			top: 0;
+			left: 0;
+			bottom: 0;
+			right: 0;
+			width: 100%;
+			height: 100%;
+			background: rgba(0, 0, 0, 0.5);
+			/* display: none; */
+		}
+
+		.prompt img {
+			position: absolute;
+			right: 15px;
+			top: 6px;
+
+		}
 	</style>
 </head>
 
 <body>
 	<div id="app" v-cloak class="container">
-
+		<div v-if='isshow' class="hideContainer">
+			<div>
+				<img src="../static/offImg/404.png" alt="" />
+				<p>该资讯已被删除</p>
+			</div>
+		</div>
 		<div class="top-content" v-if='!isshow&&topic.content'>
+			<p class="hide">分享文章</p>
 			<p class="title">{{topic.title}}</p>
 			<p class="createTime"> 发布日期:{{topic.createTime}}</p>
 			<p class="line"></p>
@@ -147,11 +176,8 @@
 		<div class="footer">
 			<img src="../static/offImg/downLoad.png" alt="" @click="download" />
 		</div>
-		<div v-if='isshow' class="hideContainer">
-			<div>
-				<img src="../static//offImg/404.png" alt="" />
-				<p>该资讯已被删除</p>
-			</div>
+		<div class="prompt" v-show='showD'>
+			        <img src="../static/offImg/zhiyin_pic.png" alt="">
 		</div>
 	</div>
 	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
@@ -165,7 +191,8 @@
 			data: {
 				isshow: false,
 				id: GetRequest().id ? GetRequest().id : 404,
-				topic: {}
+				topic: {},
+				showD: true,
 
 			},
 			created() {
@@ -184,14 +211,42 @@
 					var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
 					var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
 					if (isAndroid) {
-						window.location.href =
-							'http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
+						this.getBrowser()
+						window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
+						
 					} else if (isIOS) {
 						window.location.href = 'https://www.pgyer.com/gemini6';
 					} else {
 
 					}
 				},
+				getBrowser() {
+					var browser = {
+						versions: function () {
+							var u = navigator.userAgent,
+								app = navigator.appVersion;
+							return {
+								trident: u.indexOf('Trident') > -1, //IE内核
+								presto: u.indexOf('Presto') > -1, //opera内核
+								webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
+								gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
+								mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
+								ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
+								android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
+								iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
+								iPad: u.indexOf('iPad') > -1, //是否iPad
+								webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
+								weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)
+								qq: u.match(/\sQQ/i) == " qq" //是否QQ
+							};
+						}(),
+						language: (navigator.browserLanguage || navigator.language).toLowerCase()
+					}
+					if(browser.versions.weixin||browser.versions.qq){//qq 微信
+						this.showD=true;
+						return;
+					}
+				},
 				getList() {
 					this.$toast.loading({
 						duration: 0,