summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorouttime <i@timewk.cn>2020-03-30 17:49:26 +0800
committerouttime <i@timewk.cn>2020-03-30 17:49:26 +0800
commita5b60155ce6f9fde246f19b05e0ef50546ec1063 (patch)
tree987d05244a6117b854d3ac2d565841c6601c9645
parent6812275866e557fd1610d5c1f125ea4ca5f47650 (diff)
🔨Fix: 二维码栏无法正常打开
-rw-r--r--assets/js/miracles.min.js6
-rw-r--r--includes/footer.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js
index e30d233..a95edff 100644
--- a/assets/js/miracles.min.js
+++ b/assets/js/miracles.min.js
@@ -446,6 +446,12 @@ linkTarget();
* 文章二维码
*/
function togglePostQrcode() {
+ let post_qr = new QRCode(document.getElementById("post-qr"), {
+ width: 230,
+ height: 230,
+ colorLight : "#f1f1f1",
+ correctLevel : QRCode.CorrectLevel.L
+ });
post_qr.makeCode(window.location.href);
$('.post-qr').toggleClass("post-qr-open");
}
diff --git a/includes/footer.php b/includes/footer.php
index cf8d32e..6c82d26 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -39,12 +39,6 @@
<!-- JavaScript -->
<script>
<?php if($this->options->build_time)echo "startTime(\"".$this->options->build_time."\");" ?>
- var post_qr = new QRCode(document.getElementById("post-qr"), {
- width: 230,
- height: 230,
- colorLight : "#f1f1f1",
- correctLevel : QRCode.CorrectLevel.L
- });
</script>
<!-- Send News and Loaders -->
<script><?php if($this->is('post') || $this->is('page')): ?>owoLoad();<?php endif; ?><?php $this->options->jsEcho(); ?></script>