From 760cfd99814e9d03872896a72c2908ae45e6f453 Mon Sep 17 00:00:00 2001 From: Guoxiaobo <313721439@qq.com> Date: Thu, 22 Dec 2022 09:39:21 +0800 Subject: [PATCH] config.js文件 --- pages/detail.html | 6 ++++-- js/config.js | 9 +++++++++ pages/index.html | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/js/config.js b/js/config.js new file mode 100644 index 0000000..f6c2ce6 --- /dev/null +++ b/js/config.js @@ -0,0 +1,9 @@ +var config = { + domain: '', + otherdomain: 'https://dev3_doctor.kidgrow.cloud/api', + getUrlParam: function (name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 + var r = window.location.search.substr(1).match(reg); //匹配目标参数 + if (r != null) return unescape(r[2]); return null; //返回参数值 + } +} diff --git a/pages/detail.html b/pages/detail.html index 9631a10..86c2ed4 100644 --- a/pages/detail.html +++ b/pages/detail.html @@ -6,7 +6,7 @@ <meta content="yes" name="apple-mobile-web-app-capable"> <meta content="black" name="apple-mobile-web-app-status-bar-style"> <meta content="telephone=no" name="format-detection"> - <title>Document</title> + <title>运动详情</title> <script src="../js/rem.js"></script> <link rel="stylesheet" href="../css//swiper-3.4.2.min.css"> <link rel="stylesheet" href="../css/index.css"> @@ -30,7 +30,7 @@ <div class="swiper-pagination" v-if="top_banner.length > 1"></div> </div> <div class="video_cell" v-if="video_src" id="videopanel"> - <video class="video" id="videopanel" :src="video_src" controls="controls" controlslist="nodownload"></video> + <video class="video" id="videopanel" :src="video_src" controls="controls" controlslist="nodownload noremoteplayback noplaybackrate" disablepictureinpicture></video> </div> </div> <p class="sport_title">{{sportInfo.sportName}}</p> @@ -130,6 +130,7 @@ if (!id) { var sportInfo = JSON.parse(localStorage.getItem('SportDetail') || '{}') this.sportInfo = sportInfo; + document.title = sportInfo.sportName || '运动详情'; return; } loading.spin(target); @@ -143,6 +144,7 @@ if (res.code == 0) { var sports = res.data; that.sportInfo = sports.length > 0 ? sports[0] : {}; + document.title = that.sportInfo.sportName || '运动详情'; } }, error: function (err) { diff --git a/pages/index.html b/pages/index.html index 1d8edb9..dce9814 100644 --- a/pages/index.html +++ b/pages/index.html @@ -6,7 +6,7 @@ <meta content="yes" name="apple-mobile-web-app-capable"> <meta content="black" name="apple-mobile-web-app-status-bar-style"> <meta content="telephone=no" name="format-detection"> - <title>Document</title> + <title>运动演示视频</title> <script src="../js/rem.js"></script> <link rel="stylesheet" href="../css/index.css"> </head> -- Gitblit v1.8.0