Commit 341b0d7e2bc2b42c592765c51b28b67b70ad12af

Authored by ly525
1 parent fc8ffc47

fix #156

back-end/h5-api/views/engine.ejs
1 <!-- 1 <!--
2 * @Author: ly525 2 * @Author: ly525
3 * @Date: 2019-12-04 20:24:04 3 * @Date: 2019-12-04 20:24:04
4 - * @LastEditors : ly525  
5 - * @LastEditTime : 2020-01-24 21:03:29 4 + * @LastEditors: ly525
  5 + * @LastEditTime: 2020-05-03 14:30:37
6 * @FilePath: /luban-h5/back-end/h5-api/views/engine.ejs 6 * @FilePath: /luban-h5/back-end/h5-api/views/engine.ejs
7 * @Github: https://github.com/ly525/luban-h5 7 * @Github: https://github.com/ly525/luban-h5
8 * @Description: 手机端预览模板 8 * @Description: 手机端预览模板
@@ -212,8 +212,9 @@ @@ -212,8 +212,9 @@
212 function updateViewport() { 212 function updateViewport() {
213 var scale = 1; 213 var scale = 1;
214 var w = document.documentElement.clientWidth || 320; 214 var w = document.documentElement.clientWidth || 320;
215 - var h = document.documentElement.clientHeight || 568;  
216 - scale = w/h >= 320/568 ? h/568 : w/320; 215 + // var h = document.documentElement.clientHeight || 568;
  216 + // scale = w/h >= 320/568 ? h/568 : w/320;
  217 + scale = w/320;
217 var viewport = "width=320, initial-scale=" + scale + ", maximum-scale=" + scale + ", user-scalable=no"; 218 var viewport = "width=320, initial-scale=" + scale + ", maximum-scale=" + scale + ", user-scalable=no";
218 document.getElementById("viewport").setAttribute("content", viewport) 219 document.getElementById("viewport").setAttribute("content", viewport)
219 } 220 }