|
@@ -1,71 +1,97 @@
|
|
|
<!DOCTYPE html>
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
<html>
|
|
|
|
|
+
|
|
|
<head>
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,
|
|
|
width=device-width,initial-scale=1.0">
|
|
width=device-width,initial-scale=1.0">
|
|
|
- <title>调查</title>
|
|
|
|
|
|
|
+ <title>调查</title>
|
|
|
<!-- import CSS -->
|
|
<!-- import CSS -->
|
|
|
<link rel="stylesheet" href="static/index.css">
|
|
<link rel="stylesheet" href="static/index.css">
|
|
|
</head>
|
|
</head>
|
|
|
<style>
|
|
<style>
|
|
|
- body{
|
|
|
|
|
- margin:0;
|
|
|
|
|
- padding:40px 0 0;
|
|
|
|
|
- height:calc(100vh - 40px);
|
|
|
|
|
- background: linear-gradient(0deg, #CEF0FF, #FFFFFF);
|
|
|
|
|
- }
|
|
|
|
|
- #app{
|
|
|
|
|
|
|
+ body {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ padding: 40px 0 0;
|
|
|
|
|
+ height: calc(100vh - 40px);
|
|
|
|
|
+ background: linear-gradient(0deg, #CEF0FF, #FFFFFF);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #app {
|
|
|
display: none;
|
|
display: none;
|
|
|
}
|
|
}
|
|
|
- .logo-img{
|
|
|
|
|
- width:150px;
|
|
|
|
|
- margin:0 auto;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .logo-img {
|
|
|
|
|
+ width: 150px;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
}
|
|
}
|
|
|
- .el-form{
|
|
|
|
|
- padding:35px;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .el-form {
|
|
|
|
|
+ padding: 35px;
|
|
|
}
|
|
}
|
|
|
- .el-input__inner{
|
|
|
|
|
- height:48px;
|
|
|
|
|
- padding-left:42px;
|
|
|
|
|
- border: 1px solid #EFF0F2;
|
|
|
|
|
- border-radius: 5px;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .el-input__inner {
|
|
|
|
|
+ height: 48px;
|
|
|
|
|
+ padding-left: 42px;
|
|
|
|
|
+ border: 1px solid #EFF0F2;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
}
|
|
}
|
|
|
- .el-form-item img{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .el-form-item img {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
top: 8px;
|
|
top: 8px;
|
|
|
left: 6px;
|
|
left: 6px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-button--primary {
|
|
.el-button--primary {
|
|
|
margin-top: 29px;
|
|
margin-top: 29px;
|
|
|
height: 48px;
|
|
height: 48px;
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
- width:100%;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
background-color: #3780CD;
|
|
background-color: #3780CD;
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.tpl_title {
|
|
.tpl_title {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
|
}
|
|
}
|
|
|
- .el-form-item__label{
|
|
|
|
|
- float:none;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .el-form-item__label {
|
|
|
|
|
+ float: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .imgcode .el-input{
|
|
|
|
|
+ width: 62%;
|
|
|
|
|
+ /* background: #b4bccc; */
|
|
|
|
|
+ }
|
|
|
|
|
+ .imgcode .el-input__inner{
|
|
|
|
|
+ padding-left: 6px!important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .imgcode img{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 10px!important;
|
|
|
|
|
+ left: auto;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|
|
|
|
|
+
|
|
|
<body>
|
|
<body>
|
|
|
- <div id="app" >
|
|
|
|
|
|
|
+ <div id="app">
|
|
|
<div class='logo-img'><img src="static/logo.png" alt=""></div>
|
|
<div class='logo-img'><img src="static/logo.png" alt=""></div>
|
|
|
<el-form>
|
|
<el-form>
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-input v-model='form.username' clearable placeholder="请输入账号"></el-input>
|
|
|
|
|
- <img src="static/username.png" alt="">
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-input v-model='form.password' type='password' clearable placeholder="请输入密码"></el-input>
|
|
|
|
|
- <img src="static/pwd.png" alt="">
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-button type='primary' @click='login'>登录</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-input v-model='form.username' clearable placeholder="请输入账号"></el-input>
|
|
|
|
|
+ <img src="static/username.png" alt="">
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-input v-model='form.password' type='password' clearable placeholder="请输入密码"></el-input>
|
|
|
|
|
+ <img src="static/pwd.png" alt="">
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item class="imgcode">
|
|
|
|
|
+ <img @click="getCode" :src="code" alt="">
|
|
|
|
|
+ <el-input type="text" v-model="form.imgcode" placeholder="请输入验证码"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type='primary' @click='login'>登录</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
</body>
|
|
</body>
|
|
@@ -75,49 +101,61 @@
|
|
|
<!-- import JavaScript -->
|
|
<!-- import JavaScript -->
|
|
|
<script src="static/index.js"></script>
|
|
<script src="static/index.js"></script>
|
|
|
<script>
|
|
<script>
|
|
|
- new Vue({
|
|
|
|
|
- el: '#app',
|
|
|
|
|
- data: function() {
|
|
|
|
|
- return {
|
|
|
|
|
- form:{
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ new Vue({
|
|
|
|
|
+ el: '#app',
|
|
|
|
|
+ data: function () {
|
|
|
|
|
+ return {
|
|
|
|
|
+ form: {
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
- methods:{
|
|
|
|
|
- login(){
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- url:'/api/account/login',
|
|
|
|
|
- method:'post',
|
|
|
|
|
- data:this.form,
|
|
|
|
|
- success:res=>{
|
|
|
|
|
- if(res.code == '1000'){
|
|
|
|
|
- this.$message.error(res.message);
|
|
|
|
|
- }else{
|
|
|
|
|
- var search=window.location.search.split('?')[1].split('&');
|
|
|
|
|
- let id=search[0].split('=')[1]
|
|
|
|
|
- if(window.location.search.split('?')[1].indexOf("type")!=-1){
|
|
|
|
|
- let type=search[1].split('=')[1]
|
|
|
|
|
- // 跳转到问卷页面
|
|
|
|
|
- window.location.href = "/survey/answer.html?id="+id+"&type="+type
|
|
|
|
|
- }else{
|
|
|
|
|
- window.location.href = "/survey/message.html?id="+id
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- created(){
|
|
|
|
|
- // var search=window.location.search.split('?')[1].split('&');
|
|
|
|
|
- // this.id=search[0].split('=')[1]
|
|
|
|
|
- // this.getData()
|
|
|
|
|
- },
|
|
|
|
|
- mounted(){
|
|
|
|
|
- document.getElementById('app').style.display='block'
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- </script>
|
|
|
|
|
-</html>
|
|
|
|
|
|
|
+ code: ""
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ login() {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: '/api/account/login',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data: this.form,
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ if (res.code == '1000') {
|
|
|
|
|
+ this.$message.error(res.message);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ var search = window.location.search.split('?')[1].split('&');
|
|
|
|
|
+ let id = search[0].split('=')[1]
|
|
|
|
|
+ if (window.location.search.split('?')[1].indexOf("type") != -1) {
|
|
|
|
|
+ let type = search[1].split('=')[1]
|
|
|
|
|
+ // 跳转到问卷页面
|
|
|
|
|
+ window.location.href = "/survey/answer.html?id=" + id + "&type=" + type
|
|
|
|
|
+ } else {
|
|
|
|
|
+ window.location.href = "/survey/message.html?id=" + id
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getCode() {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: "/api/account/imgcode",
|
|
|
|
|
+ method: "get",
|
|
|
|
|
+ data: {},
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ this.code = res.data.imgcode
|
|
|
|
|
+ this.form.imgcode_id = res.data.imgcode_id
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getCode()
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ document.getElementById('app').style.display = 'block'
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+</html>
|