|
@@ -1,10 +1,11 @@
|
|
|
<template>
|
|
|
- <!-- <el-container :style="'height:100%;background:url('+LoginBg+');background-size:cover;'"> -->
|
|
|
+ <!-- <el-container :style="'background:url('+LoginBg+');background-size:cover;background-position: center;'"> -->
|
|
|
<el-container>
|
|
|
<el-row type="flex" style="width:100%;height:100%;" justify="center" align="middle">
|
|
|
<el-card style="width:400px;height:300px;" shadow="always">
|
|
|
<div slot="header" class="clearfix">
|
|
|
- <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span>
|
|
|
+ <!-- <span style="font-size: 18px">欢迎使用椰子充值后台管理系统</span> -->
|
|
|
+ <span style="font-size: 18px">欢迎使用{{UserInfo.name}}后台管理系统</span>
|
|
|
</div>
|
|
|
<el-row type="flex" justify="center">
|
|
|
<div class="login_container">
|
|
@@ -38,12 +39,16 @@
|
|
|
<script>
|
|
|
// import LoginBg from "@/assets/login.jpg";
|
|
|
const LoginBg = require('../assets/login.jpg');
|
|
|
+// 商家区分
|
|
|
+import UserInfo from '@/utils/userInfo'
|
|
|
import { login } from "@/api";
|
|
|
import { setUser } from '@/utils/auth'
|
|
|
export default {
|
|
|
+ name: 'login',
|
|
|
data() {
|
|
|
return {
|
|
|
LoginBg,
|
|
|
+ UserInfo,
|
|
|
ruleForm: {
|
|
|
name: "",
|
|
|
pwd: "",
|
|
@@ -56,7 +61,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- console.log('登录版本1.0');
|
|
|
+ console.log('登录版本2.0');
|
|
|
},
|
|
|
methods: {
|
|
|
onLogin(formName) {
|
|
@@ -83,28 +88,6 @@ export default {
|
|
|
this.$router.replace({ path: "/" });
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- // var data = new URLSearchParams();
|
|
|
- // data.append('name', this.ruleForm.name);
|
|
|
- // data.append('password', this.ruleForm.pwd);
|
|
|
- // this.$axios({
|
|
|
- // methods: 'post',
|
|
|
- // url: 'http://192.168.1.195/mobile/index.php?act=merchant_login&op=login&client_type=ajax',
|
|
|
- // data: {
|
|
|
- // name: this.ruleForm.name,
|
|
|
- // password: this.ruleForm.pwd
|
|
|
- // },
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/x-www-form-urlencoded"
|
|
|
- // },
|
|
|
- // // data,
|
|
|
- // withCredentials: true,
|
|
|
- // timeout: 120000,
|
|
|
- // })
|
|
|
- // .then((res) => {
|
|
|
- // console.log('登录', res);
|
|
|
- // })
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
},
|