浏览代码

Merge branch 'master' of http://192.168.32.253:3000/Software/android-cloud-H5

huangxiaojing 3 年之前
父节点
当前提交
efc3a765a3
共有 2 个文件被更改,包括 41 次插入5 次删除
  1. 30 0
      microserviceUserH5/static/css/activationCode.css
  2. 11 5
      microserviceUserH5/vcloud/activationCode.html

+ 30 - 0
microserviceUserH5/static/css/activationCode.css

@@ -166,4 +166,34 @@ ul, li {
   margin-top: 0.2rem;
   color: #FFFFFF;
   font-size: 0.28rem;
+}
+
+#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;
+}
+
+.toast-center-center {
+  min-width: 100px;
+  top: 50%;
+  left: 50%;
+  text-align: center;
+  transform: translateX(-50%);
+}
+
+@media (max-width: 480px) and (min-width: 241px) {
+  #toast-container>div {
+    min-width: 80px !important;
+    width: auto;
+  }
 }

+ 11 - 5
microserviceUserH5/vcloud/activationCode.html

@@ -47,7 +47,7 @@
 		toastr.options.timeOut = '1500';
 	</script>
 	<script type="text/javascript">
-        // var baseUrl = 'http://14.215.128.96'
+        // var baseUrl = 'https://per.cs.se.androidscloud.com/'
 	    let timer,flag = true;
 		var url = window.location.href;
 		url = url.split('/')
@@ -91,12 +91,12 @@
 				},
 			})
 		}
-	    $('.get-gif')[0].addEventListener('click',handleShow,false);
-		function handleShow() {
+	    $('.get-gif')[0].addEventListener('click',getActivationCode,false);
+		function handleShow(data) {
+			$('#copy-code').text(data)
 			$('.dialog').animate({top: '4.36rem'},"fast");
 			$('.mask').show();
 			document.documentElement.style.overflow='hidden';
-			getActivationCode();
 		}
 		//激活码
 		function getActivationCode(){
@@ -110,7 +110,13 @@
 				dataType: 'json',
 				cache: false,
 				success: function (res) {
-					$('#copy-code').text(res.data)
+					if(res.status === 0){
+						handleShow(res.data);
+					}else{
+						stopManyClick(() =>{
+							toastr.error(res.msg)
+						})
+					}
 				},
 			})
 		}