|
@@ -0,0 +1,124 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Document</title>
|
|
|
+</head>
|
|
|
+<style>
|
|
|
+ * {
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ html {
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ body {
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+
|
|
|
+ .main {
|
|
|
+ background-color: transparent;
|
|
|
+ width: 100vw;
|
|
|
+ height: 78vh;
|
|
|
+ padding: 60px 40px 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 20px;
|
|
|
+ line-height: 28px;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text {
|
|
|
+ width: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text p {
|
|
|
+ font-size: 14px;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ min-height: 10px;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text .media-wrap {
|
|
|
+ text-align: center;
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text .media-wrap img {
|
|
|
+ max-width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text::-webkit-scrollbar {
|
|
|
+ /*滚动条整体样式*/
|
|
|
+ width: 3px;
|
|
|
+ /*高宽分别对应横竖滚动条的尺寸*/
|
|
|
+ height: 1px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text::-webkit-scrollbar-thumb {
|
|
|
+ /*滚动条里面小方块*/
|
|
|
+ border-radius: 10px;
|
|
|
+ -webkit-box-shadow: inset 0 0 5px transparent;
|
|
|
+ background: #a64735;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text::-webkit-scrollbar-track {
|
|
|
+ /*滚动条里面轨道*/
|
|
|
+ -webkit-box-shadow: inset 0 0 5px transparent;
|
|
|
+ border-radius: 10px;
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <div class="main">
|
|
|
+ <div class="title"></div>
|
|
|
+ <div class="text"></div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</body>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // const baseUrl = 'https://sit-chaozhoubwg.4dage.com'
|
|
|
+ const baseUrl = ''
|
|
|
+ const urlAll = window.location.href
|
|
|
+ if (urlAll.includes('?id=')) {
|
|
|
+ const arr = urlAll.split('?id=')
|
|
|
+ const id = arr[1] || ''
|
|
|
+ if (id) {
|
|
|
+ fetch(`${baseUrl}/api/show/questionnaire/detail/${id}`)
|
|
|
+ .then(response => response.json())
|
|
|
+ .then(data => {
|
|
|
+ console.log(data)
|
|
|
+
|
|
|
+ const titleDom = document.querySelector('.title')
|
|
|
+ titleDom.innerHTML = data.data.name
|
|
|
+
|
|
|
+ const textDom = document.querySelector('.text')
|
|
|
+ textDom.innerHTML = data.data.description
|
|
|
+
|
|
|
+ const titleHeight = titleDom.clientHeight
|
|
|
+
|
|
|
+ const mainDom = document.querySelector('.main')
|
|
|
+
|
|
|
+ const heightAll = mainDom.clientHeight
|
|
|
+
|
|
|
+ textDom.style.height = heightAll - (titleHeight + 130) + 'px'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|