Skip to content

Commit 6c8c968

Browse files
committed
feat: self-adaption to PC and Mobile in feedback page
1 parent 0c11051 commit 6c8c968

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

blog-consumer/src/main/resources/templates/feedback-message.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<body>
4545
<div th:replace="components/nav"></div>
4646

47-
<div class="face feedback-container">
47+
<div class="face feedback-container" id="feedbackDiv">
4848
<p style="text-align: center; font-size: x-large">问题反馈与留言板</p>
4949
<div class="comment-input">
5050
<p style="height: 30px">
@@ -73,8 +73,22 @@
7373
<div th:replace="components/footer"></div>
7474

7575
</body>
76+
77+
<script src="/js/common.js"></script>
78+
79+
<!--响应式处理-->
7680
<script>
81+
$(function () {
82+
//检查浏览器类型,移除仅在PC端才会显示的元素
83+
let type = clientType()
84+
if("PC" !== type) {
85+
$("#feedbackDiv").removeClass("face")
86+
}
87+
});
88+
</script>
7789

90+
<!--TinyMCE初始化-->
91+
<script>
7892
tinymce.init({
7993
selector: 'textarea#feedbackTextarea',
8094
plugins: 'preview importcss searchreplace autolink autosave save directionality code ' +
@@ -90,6 +104,7 @@
90104
});
91105
</script>
92106

107+
<!--评论提交以及数据输入框的控制-->
93108
<script>
94109
//清除所有输入框内的内容
95110
$("#resetFeedback").click(function () {
@@ -159,5 +174,4 @@
159174
}, 'json')
160175
}
161176
</script>
162-
<script src="/js/common.js"></script>
163177
</html>

0 commit comments

Comments
 (0)