huangxiaojing il y a 3 ans
Parent
commit
99a597c0dd

+ 84 - 0
microserviceUserH5/static/css/promote.css

@@ -0,0 +1,84 @@
+@media screen and (max-width: 750px) {
+    html {
+        font-size: calc(100vw / 7.5);
+    }
+}
+@media screen and (min-width: 750px) {
+    html {
+        font-size: calc(450px / 7.5);
+    }
+    
+}
+::selection {
+    background-color: #b3d4fc;
+    text-shadow: none;
+}
+
+.clearfix:before,
+.clearfix:after {
+    content: "";
+    display: table;
+}
+
+.clearfix:after {
+    clear: both;
+}
+
+body {
+    background-color: #ffffff;
+}
+
+.free-code-con {
+    background-color: #169AF2;
+    width: 7.5rem;
+    min-height: 100vh;
+    margin: 0 auto;
+}
+
+.free-code-con .bottom-img{
+    width: 100%;
+}
+
+button:focus, input:focus{
+    outline: 0;
+}
+
+.top .center-pic {
+    position: absolute;
+    top: 10.15rem;
+}
+
+.top .center-pic .recv-cont .recv-ipt{
+    width: 6.7rem;
+    height: 1rem;
+    margin-left: 0.4rem;
+    padding-left: 0.4rem;
+    border-radius: 0.5rem;
+    font-size: 0.3rem;
+    color: #333333;
+    background-color: white;
+    border: none;
+}
+.top .center-pic .recv-cont .recv-btn {
+    color: #FFFFFF;
+    letter-spacing: 0.04rem;
+    line-height: 1.21rem;
+    font-size: 0.36rem;
+    font-weight: 500;
+    margin-left: 0.31rem;
+    margin-top: 0.33rem;
+    border-radius: 0.5rem;
+    text-align: center;
+    width: 6.88rem;
+    height: 1.21rem;
+    background: url(../img/experienceBtn.png) no-repeat;
+    background-size: 100% 100%;
+}
+
+.top .center-pic .recv-cont .recv-btn img {
+    width: 0.25rem;
+    height: 0.25rem;
+    position: absolute;
+    top: -0.12rem;
+    right: -0.2rem;
+}

+ 12 - 0
microserviceUserH5/static/js/vender/ase.js

@@ -0,0 +1,12 @@
+// 加密数据函数 工具crypto.js 文件工具
+/**
+ * @word 要加密的内容
+ * @keyWord String  服务器随机返回的关键字
+ *  */
+function aesEncrypt(word,keyWord){
+  // var keyWord = keyWord || "XwKsGlMcdPMEhR1B"
+  var key = CryptoJS.enc.Utf8.parse(keyWord);
+  var srcs = CryptoJS.enc.Utf8.parse(word);
+  var encrypted = CryptoJS.AES.encrypt(srcs, key, {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
+  return encrypted.toString();
+}

+ 1 - 1
microserviceUserH5/static/js/vender/config.js

@@ -1,7 +1,7 @@
 var url = window.location.href;
 url = url.split('/');
 var baseUrl = url[0] + '//' + url[2];
-// var baseUrl = 'http://14.215.128.96'
+var baseUrl = 'http://14.18.190.141:54413'
 // var baseUrl = 'http://vclusters.imwork.net:2221'
 
 

+ 285 - 0
microserviceUserH5/vcloud/promote.html

@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+
+<head>
+	<meta charset="UTF-8">
+	<title>双子星</title>
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+
+	<link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
+
+	<link rel="stylesheet" href="../static/js/vender/bootstrap/css/bootstrap.min.css">
+	<link rel="stylesheet" href="../static/css/normalize.css">
+	<link rel="stylesheet" href="../static/css/promote.css">
+	<link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
+	<script>
+		(function () {
+			if (!window.Promise) {
+				document.writeln('<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.1/es6-promise.min.js"><' + '/' + 'script>');
+			}
+		})();
+	</script>
+	<script src="../static/js/vender/jquery-3.4.1.min.js"></script>
+	<script src="../static/js/vender/bootstrap/js/bootstrap.min.js"></script>
+	<script src="../static/js/vender/crypto-js.js"></script>
+	<script src="../static/js/vender/ase.js"></script>
+	<script src="../static/js/vender/verify.js"></script>
+	<script src="../static/js/vender/toastr/toastr.min.js"></script>
+	<script src="../static/js/vender/config.js"></script>
+	<script>
+		toastr.options.positionClass = 'toast-center-center';
+	</script>
+</head>
+
+<body>
+	<div class="top free-code-con" style="position:relative;">
+		<div>
+			<img src="../static/img/experienceBg2.png" alt="" class="bottom-img">
+		</div>
+
+		<div class="center-pic">
+			<div class="recv-cont" id="recv_cont">
+				<div style="position: relative;">
+					<input type="tel" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号码">
+				</div>
+				<div>
+					<div class="recv-btn" id="recv_btn">
+						<span style="position: relative;">
+							领取体验时长并下载
+							<img src="../static/img/xing_icon.png" alt="">
+						</span>
+					</div>
+				</div>
+				<div id="mpanel2"></div>
+			</div>
+		</div>
+	</div>
+	<script type="text/javascript" th:inline="javascript">
+		toastr.options = {
+			positionClass: "toast-center-center",
+			timeOut: 1500
+		};
+		var parameters = GetRequest();
+		var toast = toastr;
+		var html = document.documentElement;
+		var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
+		var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
+		var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
+		$('#mpanel2').eq(0).text('');
+		$('#mpanel2').slideVerify({
+			baseUrl: baseUrl + '/api/user',  //服务器请求地址, 默认地址为安吉服务器;
+			mode: 'pop',     //展示模式
+			containerId: 'recv_btn', //pop模式 必填 被点击之后出现行为验证码的元素id
+			imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
+				width: imgWidth,
+				height: imgHeight
+			},
+			barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
+				width: imgWidth,
+				height: barHeight
+			},
+			beforeCheck: function () {
+				var tel = $("#recv_ipt").val()
+				if (!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(tel)) {
+					stopManyClick(() => {
+						toastr.error('请填写正确的手机号')
+					})
+					return false
+				} else {
+					return true
+				}
+			},
+			ready: function () { },  //加载完毕的回调
+			success: function (params) { //成功的回调
+				// params为返回的二次验证参数 需要在接下来的实现逻辑回传服务器
+				// 例如: login($.extend({}, params))
+				handleClick(params.captchaVerification)
+			},
+			error: function () {
+				console.log('error');
+			}        //失败的回调
+		});
+		$("#recv_ipt").bind('input propertychange', function (e) {
+			var ipt_phones = $('#recv_ipt').val();
+			var c = $(this);
+			if (/[^\d]/.test(c.val())) {//替换非数字字符
+				var temp_amount = c.val().replace(/[^\d]/g, '');
+				$(this).val(temp_amount);
+				toastr.error('请填写正确的手机号')
+			}
+			if (ipt_phones.length >= 12) {
+				toastr.error('请填写正确的手机号')
+				var recvstr = ipt_phones.substring(0, 11)
+				$("#recv_ipt").val(recvstr);
+			}
+		});
+
+		function handleClick(captchaVerification) {
+			var time = new Date().getTime()
+			var data = {}
+			toastr.options = {
+				positionClass: "toast-center-center"
+			};
+			var ipt_phone = $('#recv_ipt').val();
+			var validator = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
+			var res = validator.test(ipt_phone)
+			if (!ipt_phone) {
+				toastr.error('请填写正确的手机号')
+			} else if (!res) {
+				toastr.error('请填写正确的手机号')
+			} else {
+				data.newPhone = ipt_phone
+				data.type =parameters['type']
+				data.code = parameters['code']
+				data.username = parameters['userName']
+				data.captchaVerification = captchaVerification
+				$.ajax({
+					url: baseUrl + '/promote/commitPhone',
+					data: JSON.stringify(data),
+					type: 'post',
+					contentType: "application/json",
+					dataType: 'json',
+					cache: false,
+					success: function (res) {
+						if (res.status === 0) {
+							toastr.error('领取成功')
+							$(window).attr('location', res.data);
+						} else if (res.status === 1) {
+							toastr.error(res.msg)
+							setTimeout(function () {
+								$(window).attr('location', 'http://www.androidscloud.com/');
+							}, 1000)
+						} else {
+							toastr.error(res.msg)
+						}
+					}
+				})
+				var Sys = {};
+				var ua = navigator.userAgent.toLowerCase();
+				var s, browserType;
+				(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
+					(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
+						(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
+							(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
+								(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
+				if (Sys.ie) {
+					browserType = 'IE: ' + Sys.ie
+				}
+				if (Sys.firefox) {
+					browserType = 'Firefox: ' + Sys.firefox
+				}
+				if (Sys.chrome) {
+					browserType = 'Chrome: ' + Sys.chrome
+				}
+				if (Sys.opera) {
+					browserType = 'Opera: ' + Sys.opera
+				}
+				if (Sys.safari) {
+					browserType = 'Safari: ' + Sys.safari
+				}
+				var form = {
+					platform: 4,
+					visitType: 4,
+					time: time,
+					phoneNum: ipt_phone,
+					downLoaderCount: Number(localStorage.getItem('downLoaderCount')),
+					browserType: browserType
+				}
+				var list = []
+				list.push(form)
+				// 推广页面下载埋点接口
+				$.ajax({
+					url: baseUrl + '/promote/burialSiteLog',
+					data: JSON.stringify(list),
+					type: 'post',
+					contentType: "application/json",
+					dataType: 'json',
+					cache: false,
+					success: function (res) {
+					}
+				})
+			}
+		}
+		function visit() {
+			$.ajax({
+				url: baseUrl + '/promote/addInviteData',
+				type: 'get',
+				cache: false,
+				dataType: 'text',
+				success: function () {
+				}
+			})
+		}
+		var timer, flag = true;
+		//防止提示一秒内重复显示
+		function stopManyClick(fn) {
+			if (flag) {
+				fn();
+			}
+			flag = false;
+			if (timer) { clearTimeout(timer); }
+			timer = setTimeout(() => { flag = true }, 1500);
+		}
+		visit()
+	</script>
+</body>
+<style>
+	#toast-container>.toast-error {
+		background-image: none !important;
+	}
+
+	.toast-error {
+		background-color: rgba(0, 0, 0, 0.8);
+	}
+
+	#toast-container>div {
+		font-size: 14px;
+		min-width: 80px !important;
+		padding: 12px !important;
+		box-shadow: none;
+	}
+
+	@media (max-width: 480px) and (min-width: 241px) {
+		#toast-container>div {
+			min-width: 80px !important;
+			width: auto;
+		}
+	}
+
+	@media only screen and (min-width: 640px) {
+		.toast-center-center {
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+		}
+	}
+
+	@media only screen and (max-width: 640px) {
+		.toast-center-center {
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+		}
+	}
+
+	input::-webkit-input-placeholder {
+		color: #BBBBBB;
+	}
+
+	input::-moz-placeholder {
+		/* Mozilla Firefox 19+ */
+		color: #BBBBBB;
+	}
+
+	input:-moz-placeholder {
+		/* Mozilla Firefox 4 to 18 */
+		color: #BBBBBB;
+	}
+
+	input:-ms-input-placeholder {
+		/* Internet Explorer 10-11 */
+		color: #BBBBBB;
+	}
+</style>
+
+</html>

+ 3 - 3
screenAndroid/WXtrialInterface.html

@@ -417,7 +417,7 @@
 		function showShearPlate() {
 			$('.box-shear-plate').empty();
 			$.ajax({
-				url: baseUrl + "/api/user/v1/shear/content",
+				url: baseUrl + "api/public/v5/shear",
 				headers: {
 					'Authorization': form.token
 				},
@@ -455,7 +455,7 @@
 			ids = ids.substring(0, ids.lastIndexOf('&'));
 			$.confirm("确定清空剪贴板?", function () {
 				$.ajax({
-					url: baseUrl + "/api/user/v1/shear/content?" + ids,
+					url: baseUrl + "api/public/v5/shear?" + ids,
 					headers: {
 						'Authorization': form.token
 					},
@@ -483,7 +483,7 @@
 		// 删除剪贴板
 		function handleDelete(id) {
 			$.ajax({
-				url: baseUrl + "/api/user/v1/shear/content?ids=" + id,
+				url: baseUrl + "api/public/v5/shear?ids=" + id,
 				headers: {
 					'Authorization': form.token
 				},

+ 3 - 3
screenIos/WXtrialInterface.html

@@ -225,7 +225,7 @@
 		function showShearPlate() {
 			$('.box-shear-plate').empty();
 			$.ajax({
-				url: baseUrl + "/api/user/v1/shear/content",
+				url: baseUrl + "api/public/v5/shear",
 				headers: {
 					'Authorization': form.token
 				},
@@ -263,7 +263,7 @@
 			ids = ids.substring(0, ids.lastIndexOf('&'));
 			$.confirm("确定清空剪贴板?", function () {
 				$.ajax({
-					url: baseUrl + "/api/user/v1/shear/content?" + ids,
+					url: baseUrl + "api/public/v5/shear?" + ids,
 					headers: {
 						'Authorization': form.token
 					},
@@ -291,7 +291,7 @@
 		// 删除剪贴板
 		function handleDelete(id) {
 			$.ajax({
-				url: baseUrl + "/api/user/v1/shear/content?ids=" + id,
+				url: baseUrl + "api/public/v5/shear?ids=" + id,
 				headers: {
 					'Authorization': form.token
 				},