Browse Source

feature: show in wechat

master
欧醚 3 years ago
parent
commit
558d7b573f
2 changed files with 44 additions and 1 deletions
  1. +43
    -0
      static/login/index.html
  2. +1
    -1
      templates/list.html

+ 43
- 0
static/login/index.html View File

@ -44,6 +44,33 @@
text-decoration: underline;
}
.wechat-mask {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
text-align: center;
padding-top: 50px;
background: linear-gradient(25deg,
#5558 calc(50% - 1px),
#333 calc(50%),
#5558 calc(50% + 1px)
);
background-size: 10px 5px;
display: none;
}
.wechat-mask p {
position: relative;
top: 36%;
transform: translateY(-50%);
color: white;
font-size: 28px;;
font-family: 'Noto Serif SC', serif;
font-weight: 700;
}
</style>
</head>
@ -69,6 +96,11 @@
<p>消除信息不对等,追求更有意义的评价体系</p>
</div>
</div>
<div class="wechat-mask">
<p>检测到处于非规范环境<br>(如微信内置浏览器)。<br><br>
如需使用请点击右上角,<br>“在浏览器中打开”。<br><br>
如需在微信中分享,<br>可直接分享本页面
</p>
</body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script>
@ -84,6 +116,17 @@
ifr.attr("src", "guest/");
ifr.show();
}
$(document).ready(function () {
if(navigator.userAgent.search('MicroMessenger') == -1) {
if(window.location.host == 'closed.social') {
window.location.host = '_.closed.social:9443';
}
}
else {
$('.wechat-mask').show();
}
});
</script>
</html>

+ 1
- 1
templates/list.html View File

@ -241,7 +241,7 @@
<div class="form-group row">
<label class="col-sm-3 col-form-label mb-0">课程名</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="name" required placeholder="课程名" maxlength="30">
<input type="text" class="form-control" name="name" required placeholder="课程名,注意保持一致" maxlength="30">
</div>
</div>
<div class="form-group row">

Loading…
Cancel
Save