123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,
- width=device-width,initial-scale=1.0">
- <title>问卷调查</title>
- <!-- import CSS -->
- <link rel="stylesheet" href="static/index.css">
- </head>
- <style>
- body{margin:0px;padding:0px;}
- #app{
- display: none;
- }
- .tpl_title {
- font-size: 18px;
- margin: 10px 0;
- }
- .item-main{
- padding:10px 15px;
- }
- .el-form-item__label{
- font-weight:600;
- float:none;
- }
- .el-message-box{
- width:80%;
- }
- .survey_logo{
- width:145px;
- }
- </style>
- <body>
- <div id="app">
- <div class="item-main">
- <img src="static/survey_logo.png" alt="" class="survey_logo" />
- <h5 align="center" class="tpl_title">{{ form.name }}</h5>
- <div class="content">
- <div v-html="form.content"></div>
- <div>
- <span>附件:</span>
- <a :href="form.fileurl">{{form.filename}}</a>
- </div>
- </div>
- </div>
- </div>
- </body>
- <!-- import Vue before Element -->
- <script src="static/jquery.min.js"></script>
- <script src="static/vue.js"></script>
- <!-- import JavaScript -->
- <script src="static/index.js"></script>
- <script>
- new Vue({
- el: '#app',
- data: function() {
- return {
- type:null,
- form:{
-
- },
- widgetList:[],
- id:'',
- title:'',
- show:0
- }
- },
- methods:{
- getData(){
- let url = "/api/admin/message/notice"
- $.ajax({
- url:url,
- method:'get',
- data:{
- id:this.id
- },
- success:res=>{
- document.getElementById('app').style.display='block'
- this.form = res.data
- },
- error:res=>{
- if(res.status==403){
- window.location.href="/survey/login.html?id="+this.id
- }
- }
- })
- },
- handleSuccess(res, file) {
- this.form2[res.data.type] = res.data.url;
- },
- },
- created(){
- var search=window.location.search.split('?')[1].split('&');
- this.id=search[0].split('=')[1]
- this.getData()
- }
- })
- </script>
- </html>
|