heyang 3 年之前
父节点
当前提交
2a831aadbd
共有 2 个文件被更改,包括 192 次插入8 次删除
  1. 109 8
      screenAndroid/WXtrialInterface.html
  2. 83 0
      screenAndroid/css/WXtrialInterface.css

+ 109 - 8
screenAndroid/WXtrialInterface.html

@@ -102,6 +102,25 @@
     <p class="weui-toast_content">数据加载中</p>
   </div>
 
+  <div class="try-use-wrap">
+    <div class="try-use-container">
+      <video width="100%" height="100%" muted autoplay="autoplay" loop="loop">
+        <source id="source" src="http://110.53.221.195:8210/document/newFile/download/0/3dn9b4585511476691c6?fileKey=LowLevelMultipartUpload_16522192367175270411" type="video/mp4"></source>
+        您的浏览器不支持 video 标签。
+      </video>
+      <div class="time-close-wrap"><span class="time-node"></span> 关闭</div>
+    </div>
+  </div>
+  <div class="buy-phone-wrap">
+    <div class="bug-wrap">
+      <div class="bug-title">体验完整云手机服务请前往购买</div>
+      <div class="btn-list">
+        <div class="btn cannel-btn">取消</div>
+        <div class="btn go-bug">去购买</div>
+      </div>
+    </div>
+  </div>
+
   <body oncontextmenu="Back()">
   </body>
   <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
@@ -114,7 +133,12 @@
   <script type="text/javascript" src="WXdraw.js?v=110"></script>
   <script type="text/javascript" src="jmuxer.js"></script>
   <script>
+    var baseUrl = 'http://14.18.190.141:24380'
     var parameters = GetRequest();
+    var form = {};
+    form.token = parameters['token'];
+    form.userCardId = parameters['userCardId'];
+    var videoTimer = null, videoTime = 5;
     if (parameters['mealType'] === 'VIP') {
       $(".loading_sceen_pic").attr('src', '../static/img/home_bg_VIP.png');
     } else if (parameters['mealType'] === 'SVIP') {
@@ -124,6 +148,7 @@
     } else if (parameters['mealType'] === 'STARPRO') {
       $(".loading_sceen_pic").attr('src', '../static/img/home_bg_PRO.png');
     }
+    adList();
     var isAudioPlay = false;
     if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
       var video = document.getElementById("playerVideo");
@@ -140,16 +165,92 @@
         });
       }, 1000)
     } else {
-      $.alert({
-        title: '提示',
-        text: '开始使用云手机',
-        onOK: function () {
-          var video = document.getElementById("playerVideo");
-          video.play();
-          isAudioPlay = true;
+      
+      // $.alert({
+      //   title: '提示',
+      //   text: '开始使用云手机',
+      //   onOK: function () {
+      //     var video = document.getElementById("playerVideo");
+      //     video.play();
+      //     isAudioPlay = true;
+      //   }
+      // });
+    }
+    //列表
+    function getSetmealList() {
+      return new Promise((resolve, reject) => {
+        $.ajax({
+          url: baseUrl + "/api/resources/v4/freetrial/setmeal/list",
+          headers: {
+            'Authorization': form.token
+          },
+          type: 'get',
+          dataType: 'json',
+          success: function (res) {
+            if (res.status === 0) {
+              let list = res.data;
+              list.map((item) => {
+                // if(item.phoneType === parameters['mealType']){
+                if(item.phoneType === 'SVIP'){
+                  resolve(item)
+                }
+              })
+            }
+          }
+        })
+      })
+    }
+    //广告信息
+    function adList() {
+      getSetmealList().then((res) => {
+        if(res.pushFlowAdvert === 1){
+          $.ajax({
+            url: baseUrl + "/api/public/v5/advertising/getAdInfoByAdPlace",
+            headers: {
+              'Authorization': form.token
+            },
+            data: {
+              adPlace: 15,
+              os: 0
+            },
+            type: 'post',
+            dataType: 'json',
+            success: function (res) {
+              if (res.status === 0) {
+                let list = res.data.data;
+                let videoTime = list[0].forcedTime;
+                $('#source').src = list[0].forcedTime;
+                videoTimer = setInterval(() =>{
+                  if(videoTime > 0) {
+                    videoTime--;
+                    $('.time-node').eq(0).text(videoTime);
+                  } else {
+                    clearInterval(videoTimer);
+                    $('.time-node').eq(0).text('');
+                  }
+                },1000)
+                $('.try-use-wrap').eq(0).show();
+              }
+            }
+          })
         }
-      });
+      })
     }
+    //关闭广告
+    $('.time-close-wrap')[0].addEventListener('click', () => {
+      $('.try-use-wrap').eq(0).hide();
+      $('.buy-phone-wrap').eq(0).show();
+    })
+    // 点击取消
+    $('.cannel-btn')[0].addEventListener('click', () => {
+      $('.buy-phone-wrap').eq(0).hide();
+    })
+    // 点击去购买
+    $('.go-bug')[0].addEventListener('click', () => {
+      wx.miniProgram.switchTab({
+        url: '/pages/home/home'
+      })
+    })
     var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部  
     $('#wine').css({
       "width": window.screen.width,

+ 83 - 0
screenAndroid/css/WXtrialInterface.css

@@ -484,4 +484,87 @@ ul, li {
 	top: 0;
 	left: 0;
 	z-index: 4;
+}
+
+.try-use-wrap, .buy-phone-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);
 }