fix(首页): 禁止双指缩放和双击放大,页面固定 (v26100105)
viewport 加 user-scalable=no / maximum-scale=1;iOS 微信忽略该设置, JS 再拦 gesture 事件与多指 touchmove;html 也加 touch-action:manipulation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26100104';
|
||||
var VER = '26100105';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
@@ -2983,6 +2983,12 @@
|
||||
if (c) c.textContent = state.kickQuick || 0;
|
||||
}
|
||||
|
||||
/* 禁止双指缩放(2026-10-01 用户要求首页固定)。iOS 微信会忽略 viewport 的 user-scalable=no,
|
||||
所以再拦一道:iOS 的 gesture 事件 + 多指 touchmove;双击放大由 CSS touch-action:manipulation 处理。 */
|
||||
(function noZoom() {
|
||||
['gesturestart', 'gesturechange', 'gestureend'].forEach(t => document.addEventListener(t, e => e.preventDefault(), { passive: false }));
|
||||
document.addEventListener('touchmove', e => { if (e.touches.length > 1) e.preventDefault(); }, { passive: false });
|
||||
})();
|
||||
/* ================= 首页「孕育工具」卡片(box_app 封装数胎动平台数据,2026-09-22) =================
|
||||
数据源:GET /api/mp/public/mama-box/tool-cards(box_app 归一化后的稳定契约;
|
||||
上游是数胎动平台的 GET /taidong/api/user/app-cards,H5 不直连、也不持有上游 token)。
|
||||
|
||||
Reference in New Issue
Block a user