heyang 3 jaren geleden
bovenliggende
commit
d4b59e437b

+ 9 - 3
microserviceUserH5/static/css/browser.css

@@ -103,10 +103,12 @@ input{
 
 #toast-container>.toast-error {
   background-image: none !important;
+  border-radius: 0.2rem;
 }
 
 .toast-error {
   background-color: rgba(0, 0, 0, 0.8);
+  border-radius: 0.2rem;
 }
 
 #toast-container>div {
@@ -114,19 +116,23 @@ input{
   min-width: 80px !important;
   padding: 12px !important;
   box-shadow: none;
+  border-radius: 0.2rem;
 }
 
 .toast-center-center {
-  min-width: 100px;
+  position: fixed;
+  width: 220px;
   top: 50%;
   left: 50%;
   text-align: center;
-  transform: translateX(-50%);
+  transform: translate(-50%, -50%);
+  color: #FFFFFF;
+  border-radius: 0.2rem;
 }
 
 @media (max-width: 480px) and (min-width: 241px) {
   #toast-container>div {
-    min-width: 80px !important;
+    min-width: 88px !important;
     width: auto;
   }
 }

+ 56 - 10
microserviceUserH5/vcloud/browser.html

@@ -10,6 +10,8 @@
 	<script src="../static/js/vender/vue/axios.min.js"></script>
 	<script src="../static/js/vender/jquery-3.4.1.min.js"></script>
 	<script src="../static/js/vender/vue/vue.min.js"></script>
+	<link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
+	<script src="../static/js/vender/toastr/toastr.min.js"></script>
 	<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
 	<script src="../static/js/vender/config.js"></script>
 	<link rel="stylesheet" href="../static/css/browser.css">
@@ -30,8 +32,20 @@
 		</div>
 		<div class="tag-wrap" id="tag-wrap"></div>
 	</div>
+<script>
+	toastr.options.positionClass = 'toast-center-center';
+	toastr.options.timeOut = '1500';
+</script>
 <script type="text/javascript">
+	document.addEventListener("visibilitychange",()=>{
+		if(document.hidden){
+			init();
+		}else{
+			init();
+		}
+	})
 	const tagDom = document.getElementById("tag-wrap");
+	let flag = true, timer=null;
 	(function(){
 		init();
 	})();
@@ -60,18 +74,50 @@
 		let plateName = e.target.dataset.platename;
 		let id = e.target.dataset.id;
 		$.ajax({
-				url: `${baseUrl}/api/public/v1/browserPlate/reportClickNum/${id}`,
-				type: 'get',
-				contentType:"application/json",
-				dataType: 'json',
-				cache: false,
-				success: function (res) {
-					if(res.status === 0){
-						location.href = `./browserDetail.html?plateName=${encodeURIComponent(plateName)}&plateId=${id}`;
-					}
+			url: `${baseUrl}/api/public/v1/browserPlate/reportClickNum/${id}`,
+			type: 'get',
+			contentType:"application/json",
+			dataType: 'json',
+			cache: false,
+			success: function (res) {
+				if(res.status === 0){
+					isGetStatus(id, plateName);
+				} else {
+					stopManyClick(() => {
+						toastr.error(res.msg);
+					})
 				}
-			})
+			}
+		})
 	},false);
+	// 验证是否下架
+	function isGetStatus(id, plateName) {
+		$.ajax({
+			url: `${baseUrl}/api/public/v1/browserPlate/getStatus/${id}`,
+			type: 'get',
+			contentType:"application/json",
+			dataType: 'json',
+			cache: false,
+			success: function (res) {
+				if(res.status === 0){
+					location.href = `./browserDetail.html?plateName=${encodeURIComponent(plateName)}&plateId=${id}`;
+				} else {
+					stopManyClick(() => {
+						toastr.error(res.msg);
+					})
+				}
+			}
+		})
+	}
+	//防止提示一秒内重复显示
+	function stopManyClick(fn) {
+		if (flag) {
+			fn();
+		}
+		flag = false;
+		if(timer){clearTimeout(timer);}
+		timer = setTimeout(() => {flag = true}, 1500);
+	}
 	//点击按钮搜索
 	const searchDom = document.getElementById("search-icon");
 	searchDom.addEventListener('click',()=>{

+ 12 - 10
microserviceUserH5/vcloud/browserDetail.html

@@ -51,11 +51,11 @@
 		init();
 	})();
 	function init(){
-		if(nowlength === 0) {
-			stopManyClick(() => {
-				toastr.error('加载中...');
-			})
-		}
+		// if(nowlength === 0) {
+		// 	stopManyClick(() => {
+		// 		toastr.error('加载中...');
+		// 	})
+		// }
 		$.ajax({
 			url: `${baseUrl}/api/public/v1/browserLabel/client/query/${GetRequest().plateId}`,
 			type: 'get',
@@ -95,7 +95,9 @@
 					if(res.code === 200){
 						let cardType = res.data.devType;
 						let phoneObj = {
-							'RK_3399': 'SVIP'
+							'VIRTUAL': 'VIP',
+							'RK_3399': 'SVIP',
+							'MTK_G90': 'STAR'
 						}
 						phoneType = phoneObj[cardType];
 						resolve(phoneType);
@@ -141,7 +143,7 @@
 										</div>
 									</div>`
 						}
-						if(nowlength <= total && list.length !== 0){
+						if(nowlength < total && list.length !== 0){
 							$('.loading').eq(0).text('正在努力加载中...');
 						} else if(nowlength != 0) {
 							$('.loading').eq(0).text('已加载全部内容');
@@ -173,9 +175,9 @@
 			pageNum = 1;
 			nowlength = 0;
 			total = 0;
-			stopManyClick(() => {
-				toastr.error('加载中...');
-			})
+			// stopManyClick(() => {
+			// 	toastr.error('加载中...');
+			// })
 			$('.loading').eq(0).text('');
 			$('.tag-item')[index].className = 'tag-item';
 			index = e.target.dataset.index;

+ 76 - 76
screenAndroid/WXtrialInterface.html

@@ -36,87 +36,87 @@
   <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
   <style>
     .try-use-wrap, .buy-phone-wrap, .look-wrap{
-    width: 100%;
-    height: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    z-index: 9999;
-    background: rgba(0, 0, 0, 0.5);
-	display: none;
-}
-  
-.try-use-container{
-	width: 80%;
-	height: 409px;
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-	background-color: #FFFFFF;
-	border-radius: 0.66em;
-}
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        top: 0;
+        left: 0;
+        z-index: 9999;
+        background: rgba(0, 0, 0, 0.5);
+      display: none;
+    }
+      
+    .try-use-container{
+      width: 80%;
+      height: 409px;
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+      background-color: #FFFFFF;
+      border-radius: 0.66em;
+    }
 
-.time-close-wrap{
-	width: 5.46em;
-	height: 2em;
-	line-height: 2em;
-	text-align: center;
-	position: absolute;
-	top: 0.24em;
-	right: 0.3em;
-	background: rgba(0, 0, 0, 0.49);
-	border-radius: 1.26em;
-	font-size: 12px;
-	color: #FFFFFF;
-}
+    .time-close-wrap{
+      width: 5.46em;
+      height: 2em;
+      line-height: 2em;
+      text-align: center;
+      position: absolute;
+      top: 0.24em;
+      right: 0.3em;
+      background: rgba(0, 0, 0, 0.49);
+      border-radius: 1.26em;
+      font-size: 12px;
+      color: #FFFFFF;
+    }
 
-.bug-wrap{
-	width: 90%;
-	height: 115px;
-	background: #FFFFFF;
-	border-radius: 10px;
-	position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-}
+    .bug-wrap{
+      width: 90%;
+      height: 115px;
+      background: #FFFFFF;
+      border-radius: 10px;
+      position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+    }
 
-.bug-title{
-	text-align: center;
-	margin: 25px 0;
-	font-size: 18px;
-	font-weight: 600;
-	color: #333333;
-}
+    .bug-title{
+      text-align: center;
+      margin: 25px 0;
+      font-size: 18px;
+      font-weight: 600;
+      color: #333333;
+    }
 
-.btn-list{
-	width: 100%;
-	height: 44px;
-	line-height: 44px;
-	border-top: 1px solid rgba(238,238,238,1);
-	position: absolute;
-	bottom: 0;
-	left: 0;
-	display: flex;
-	align-items: center;
-}
+    .btn-list{
+      width: 100%;
+      height: 44px;
+      line-height: 44px;
+      border-top: 1px solid rgba(238,238,238,1);
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      display: flex;
+      align-items: center;
+    }
 
-.btn{
-	flex: 1;
-	text-align: center;
-}
+    .btn{
+      flex: 1;
+      text-align: center;
+    }
 
-.cannel-btn{
-	font-size: 18px;
-	color: #666666;
-}
+    .cannel-btn{
+      font-size: 18px;
+      color: #666666;
+    }
 
-.go-bug{
-	font-size: 18px;
-	color: #3B7FFF;
-	border-left: 1px solid rgba(238,238,238,1);
-}
+    .go-bug{
+      font-size: 18px;
+      color: #3B7FFF;
+      border-left: 1px solid rgba(238,238,238,1);
+    }
   </style>
 </head>
 
@@ -196,7 +196,7 @@
   </div>
   <div class="buy-phone-wrap">
     <div class="bug-wrap">
-      <div class="bug-title">体验完整云手机服务请前往购买</div>
+      <div class="bug-title">获得极致体验服务请购买云手机</div>
       <div class="btn-list">
         <div class="btn cannel-btn">取消</div>
         <div class="btn go-bug">去购买</div>
@@ -1103,7 +1103,7 @@
       }
       systemBuriedPoint(pointName);
       wx.miniProgram.navigateTo({
-        url: '/packageA/order/buy/index'
+        url: '/packageA/order/renew/index'
       })
     })
     // 放弃

+ 109 - 6
screenIos/WXtrialInterface.html

@@ -35,6 +35,90 @@
   <link rel="stylesheet" type="text/css" href="css/WXtrialInterface.css" />
   <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" />
   <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
+  <style>
+    .try-use-wrap, .buy-phone-wrap, .look-wrap{
+        width: 100%;
+        height: 100%;
+        position: fixed;
+        top: 0;
+        left: 0;
+        z-index: 9999;
+        background: rgba(0, 0, 0, 0.5);
+      display: none;
+    }
+      
+    .try-use-container{
+      width: 80%;
+      height: 409px;
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+      background-color: #FFFFFF;
+      border-radius: 0.66em;
+    }
+
+    .time-close-wrap{
+      width: 5.46em;
+      height: 2em;
+      line-height: 2em;
+      text-align: center;
+      position: absolute;
+      top: 0.24em;
+      right: 0.3em;
+      background: rgba(0, 0, 0, 0.49);
+      border-radius: 1.26em;
+      font-size: 12px;
+      color: #FFFFFF;
+    }
+
+    .bug-wrap{
+      width: 90%;
+      height: 115px;
+      background: #FFFFFF;
+      border-radius: 10px;
+      position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+    }
+
+    .bug-title{
+      text-align: center;
+      margin: 25px 0;
+      font-size: 18px;
+      font-weight: 600;
+      color: #333333;
+    }
+
+    .btn-list{
+      width: 100%;
+      height: 44px;
+      line-height: 44px;
+      border-top: 1px solid rgba(238,238,238,1);
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      display: flex;
+      align-items: center;
+    }
+
+    .btn{
+      flex: 1;
+      text-align: center;
+    }
+
+    .cannel-btn{
+      font-size: 18px;
+      color: #666666;
+    }
+
+    .go-bug{
+      font-size: 18px;
+      color: #3B7FFF;
+      border-left: 1px solid rgba(238,238,238,1);
+    }
+  </style>
 </head>
 
 <body class="scroll h-player" style="overscroll-behavior: contain;">
@@ -108,7 +192,7 @@
   </div>
   <div class="buy-phone-wrap">
     <div class="bug-wrap">
-      <div class="bug-title">体验完整云手机服务请前往购买</div>
+      <div class="bug-title">获得极致体验服务请购买云手机</div>
       <div class="btn-list">
         <div class="btn cannel-btn">取消</div>
         <div class="btn go-bug">去购买</div>
@@ -222,6 +306,10 @@
     var baseUrl = url[0] + '//' + url[2];
     console.log(baseUrl)
     var parameters = GetRequest();
+    var form = {};
+    form.token = parameters['token'];
+    form.mealType = parameters['mealType'];
+    form.userCardId = parameters['userCardId'];
 
     if (parameters['mealType'] === 'VIP') {
       $(".loading_sceen_pic").attr('src', '../static/img/home_bg_VIP.png');
@@ -252,9 +340,6 @@
         isAudioPlay = true;
       }
     });
-    var form = {};
-
-    form.token = parameters['token'];
     var orientation = 0; //0 竖屏,1横屏
     function array_unique(arr) {
       return arr.filter(function (e, i) {
@@ -273,7 +358,7 @@
           },
           type: 'get',
           dataType: 'json',
-          success: function (res) {
+          success: function (res) {systemBuriedPoint
             if (res.status === 0) {
               if (res.data.length) {
                 cutList = array_unique(res.data)
@@ -770,6 +855,7 @@
 
     // 激活码广告相关配置
     function getConfigByPhoneType() {
+      console.log('form', form)
       return new Promise((resolve, reject) => {
         $.ajax({
           url: baseUrl + "/api/pay/v5/trialCodeConfig/getConfigByPhoneType",
@@ -957,7 +1043,7 @@
       }
       systemBuriedPoint(pointName);
       wx.miniProgram.navigateTo({
-        url: '/packageA/order/buy/index'
+        url: '/packageA/order/renew/index'
       })
     })
     // 放弃
@@ -981,6 +1067,23 @@
       }
     })
 
+    // 埋点
+    function systemBuriedPoint(pointName){
+      $.ajax({
+        url: baseUrl + "/api/public/v1/systemBuriedPoint/stat",
+        headers: {
+          'Authorization': form.token
+        },
+        type: 'post',
+        data:JSON.stringify({
+					pointName: pointName
+				}),
+				contentType:"application/json",
+        dataType: 'json',
+        success: function (res) {}
+      })
+    }
+
     function Close() { // webworker 关闭,清理
       var cmd = {
         cmd: 0