信息:iphone8plus, iphone x max, 微信7.0.15
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>replaceState影响识别二维码title>
<style>
button {
width: 100%;
height: 4em;
}
style>
head>
<body>
<div>history.replaceState 之后长按无 识别二维码div>
<img src="https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/2cPoBPC.png">
<button onclick="hack()">点击该按钮修复button>
<script>
// 这行代码会影响长按二维码识别
history.replaceState('', '', location.href.replace(/\?(.*)|$/, '?q=' + Math.random()))
// 本人发现的修复方式
function hack() {
location.replace(location.href.replace(/#(.*)|$/, '#$1'))
}
script>
body>
html>
...

请具体描述问题出现的流程,并提供能复现问题的简单代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html