diff --git a/.env.development b/.env.development index c9678ca..f51046a 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ # just a flag ENV='development' -VUE_APP_BASE_API = http://jintancanlian-test.ali251.langye.net/ -VUE_APP_UPLOAD_API = http://jintancanlian-test.ali251.langye.net/api/admin/upload-file +VUE_APP_BASE_API = https://jintancanlian-test.ali251.langye.net/ +VUE_APP_UPLOAD_API = https://jintancanlian-test.ali251.langye.net/api/admin/upload-file diff --git a/.env.production b/.env.production index c6d0120..1b6e213 100644 --- a/.env.production +++ b/.env.production @@ -2,5 +2,5 @@ ENV = 'production' # base api -VUE_APP_BASE_API = http://jintancanlian-test.ali251.langye.net/ -VUE_APP_UPLOAD_API =http://jintancanlian-test.ali251.langye.net/api/admin/upload-file \ No newline at end of file +VUE_APP_BASE_API = https://jintancanlian-test.ali251.langye.net/ +VUE_APP_UPLOAD_API =https://jintancanlian-test.ali251.langye.net/api/admin/upload-file diff --git a/package.json b/package.json index 774ab66..4c830de 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "echarts": "^4.2.1", "element-ui": "^2.15.13", "file-saver": "^2.0.5", + "js-base64": "^3.7.7", "js-cookie": "2.2.0", "less": "^3.13.1", "less-loader": "^5.0.0", diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ea0927e..5f3b621 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -43,7 +43,7 @@ import { validUsername } from '@/utils/validate' - + import {Base64} from 'js-base64' const defaultSettings = require('../../../src/settings.js') export default { name: 'Login', @@ -114,7 +114,10 @@ this.loading = true console.log("this.redirect",this.redirect) // return - this.$store.dispatch('user/login', this.loginForm).then(() => { + this.$store.dispatch('user/login', { + username: this.loginForm.username, + password: Base64.encode(this.loginForm.password) + }).then(() => { this.$router.push({ path: '/jsc'