运动处方本地化部署查看方案详情对应的H5
Guoxiaobo
2022-12-22 760cfd99814e9d03872896a72c2908ae45e6f453
config.js文件
2 files modified
1 files added
17 ■■■■ changed files
js/config.js 9 ●●●●● patch | view | raw | blame | history
pages/detail.html 6 ●●●●● patch | view | raw | blame | history
pages/index.html 2 ●●● patch | view | raw | blame | history
js/config.js
New file
@@ -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; //返回参数值
    }
}
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) {
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>