小程序返回上一页

This commit is contained in:
majintao
2024-12-20 17:58:57 +08:00
parent 98df52a9ca
commit 73076f0b22
4 changed files with 42 additions and 4 deletions
@@ -211,6 +211,13 @@
$(function(){initMap();});
</#if>
if (typeof WeixinJSBridge !== "undefined") {
WeixinJSBridge.on('menu:back', function () {
window.history.back(); // 返回上一页
});
}
</script>
</body>
</html>
@@ -13,10 +13,23 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
<link rel="stylesheet" href="../static/style/wx.css">
<style>
.previous {
color: #a5a9ad !important;
position: fixed;
top: -px;
left: -3px;
z-index: 9999;
}
.list-block .item-content .item-inner{margin-left:0;padding-left:0.75rem;}
</style>
</head>
<body>
<div class="page-group">
<span class="previous">
<a href="javascript:history.back()">〈</a>
</span>
<div class="page-group" style="margin-top: 20px">
<div class="page page-current">
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="100">
<div class="list-container">
@@ -436,6 +436,13 @@
}
})
})
if (typeof WeixinJSBridge !== "undefined") {
WeixinJSBridge.on('menu:back', function () {
window.history.back(); // 返回上一页
});
}
</script>
</body>
</html>
@@ -13,11 +13,22 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
<link rel="stylesheet" href="../static/style/wx.css">
<style>
.previous {
color: #a5a9ad !important;
position: fixed;
top: -2px;
left: -3px;
z-index: 9999;
}
.list-block .item-content .item-inner{margin-left:0;padding-left:0.75rem;}
</style>
</head>
<span class="previous">
<a href="javascript:history.back()">〈</a>
</span>
<body>
<div class="page-group">
<div class="page-group" style="margin-top: 20px">
<div class="page page-current">
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="100">
<div class="list-container">