|
@@ -1,13 +1,30 @@
|
|
<template>
|
|
<template>
|
|
- <div id="login">
|
|
|
|
- <van-form @submit="onSubmit" style="margin-top:20vh">
|
|
|
|
- <van-field v-model="form.login_id" name="用户名" label="用户名" placeholder="用户名" :rules="[{ required: true, message: '请填写用户名' }]" />
|
|
|
|
- <van-field v-model="form.password" type="password" name="密码" label="密码" placeholder="密码" :rules="[{ required: true, message: '请填写密码' }]" />
|
|
|
|
- <div style="margin: 16px;">
|
|
|
|
- <van-button round block type="info" native-type="submit">提交</van-button>
|
|
|
|
- </div>
|
|
|
|
- </van-form>
|
|
|
|
- <share></share>
|
|
|
|
|
|
+ <div id="index">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ <p>吉林省计算中心</p>
|
|
|
|
+ <p>文章发布系统</p>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }">
|
|
|
|
+ <van-form @submit="onSubmit">
|
|
|
|
+ <van-field v-model="form.login_id" name="用户名" label="用户名" placeholder="用户名" :rules="[{ required: true, message: '请填写用户名' }]" />
|
|
|
|
+ <van-field
|
|
|
|
+ v-model="form.password"
|
|
|
|
+ type="password"
|
|
|
|
+ name="密码"
|
|
|
|
+ label="密码"
|
|
|
|
+ placeholder="密码"
|
|
|
|
+ :rules="[{ required: true, message: '请填写密码' }]"
|
|
|
|
+ />
|
|
|
|
+ <div style="margin: 16px;">
|
|
|
|
+ <van-button round block type="info" native-type="submit">登录</van-button>
|
|
|
|
+ </div>
|
|
|
|
+ </van-form>
|
|
|
|
+ <share></share>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -17,17 +34,20 @@ const _ = require('lodash');
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: mapLogin } = createNamespacedHelpers('login');
|
|
const { mapActions: mapLogin } = createNamespacedHelpers('login');
|
|
export default {
|
|
export default {
|
|
- name: 'login',
|
|
|
|
|
|
+ name: 'index',
|
|
props: {},
|
|
props: {},
|
|
- components: {
|
|
|
|
- share,
|
|
|
|
- },
|
|
|
|
|
|
+ components: { share },
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
|
|
+ clientHeight: '',
|
|
form: {},
|
|
form: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {},
|
|
created() {},
|
|
|
|
+ mounted() {
|
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 200;
|
|
|
|
+ this.$set(this, `clientHeight`, clientHeight);
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
...mapLogin(['login']),
|
|
...mapLogin(['login']),
|
|
async onSubmit() {
|
|
async onSubmit() {
|
|
@@ -41,14 +61,36 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
- pageTitle() {
|
|
|
|
- return `${this.$route.meta.title}`;
|
|
|
|
- },
|
|
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
},
|
|
},
|
|
|
|
+ watch: {},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.main {
|
|
|
|
+ .top {
|
|
|
|
+ height: 200;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ border-bottom: 1px solid #f1f1f1;
|
|
|
|
+ padding: 40px;
|
|
|
|
+ p {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+ p:nth-child(1) {
|
|
|
|
+ font-size: 30px;
|
|
|
|
+ }
|
|
|
|
+ p:nth-child(2) {
|
|
|
|
+ margin: 15px 0 0 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .info {
|
|
|
|
+ overflow-x: hidden;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|