Browse Source

无用修改

master
wen 2 years ago
parent
commit
ad1bc2e7be
  1. 2
      .env.development
  2. 46
      src/views/login/index.vue
  3. 2
      vue.config.js

2
.env.development

@ -2,4 +2,4 @@ @@ -2,4 +2,4 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = '/api'

46
src/views/login/index.vue

@ -223,29 +223,29 @@ export default { @@ -223,29 +223,29 @@ export default {
if (valid) {
this.loading = true
let thiss = this;
// axios.post('/api/mkdir', {
// firstName: 'Fred',
// lastName: 'Flintstone'
// })
// .then(function (response) {
// console.log(thiss.$router)
// thiss.$router.push({ path: '/usermange'})
// console.log(response + 'ffef');
// })
// .catch(function (error) {
// console.log(error);
// });
// this.$message({
// showClose: true,
// message: '',
// type: 'error'
// });
this.$store.dispatch('user/login', this.loginForm).then(() => {
this.$router.push({ path: this.redirect || '/' })
this.loading = false
}).catch(() => {
this.loading = false
})
axios.post('/api/mkdir', {
firstName: 'Fred',
lastName: 'Flintstone'
})
.then(function (response) {
console.log(thiss.$router)
thiss.$router.push({ path: '/usermange'})
console.log(response + 'ffef');
})
.catch(function (error) {
console.log(error);
});
this.$message({
showClose: true,
message: '错了哦,这是一条错误消息',
type: 'error'
});
// this.$store.dispatch('user/login', this.loginForm).then(() => {
// this.$router.push({ path: this.redirect || '/' })
// this.loading = false
// }).catch(() => {
// this.loading = false
// })
} else {
console.log('error submit!!')

2
vue.config.js

@ -41,7 +41,7 @@ module.exports = { @@ -41,7 +41,7 @@ module.exports = {
//before: require('./mock/mock-server.js'),
proxy: {
'/api': {
target: 'http://192.168.1.8:1080',// 你要请求的后端接口ip+port
target: 'http://192.168.0.100:1080',// 你要请求的后端接口ip+port
changeOrigin: true,// 允许跨域,在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题
ws: true,// 开启webSocket
pathRewrite: {

Loading…
Cancel
Save