Commit 2b84da23 authored by 杨日斐's avatar 杨日斐

东方通打包

parent 038f5162
...@@ -111,7 +111,7 @@ import qs from 'qs' ...@@ -111,7 +111,7 @@ import qs from 'qs'
import ModifyModal from './modify-modal' import ModifyModal from './modify-modal'
// import { sm2 } from 'sm-crypto' // import { sm2 } from 'sm-crypto'
import {Encrypt} from './secert' import {Encrypt} from './secert'
import { snVerify, ruleValidate, registered,getUserHome,getSystemUrl } from '@/api/login' import { snVerify, ruleValidate, registered,getUserHome } from '@/api/login'
import Sidentify from './Sidentify.vue' import Sidentify from './Sidentify.vue'
export default { export default {
name: '', name: '',
...@@ -121,7 +121,6 @@ export default { ...@@ -121,7 +121,6 @@ export default {
}, },
data() { data() {
return { return {
appUrl: "",
showModifyModal: false, showModifyModal: false,
loginBg: { loginBg: {
backgroundImage: 'url(login-bg.jpg)', backgroundImage: 'url(login-bg.jpg)',
...@@ -270,37 +269,26 @@ export default { ...@@ -270,37 +269,26 @@ export default {
this.isHaveHome = false this.isHaveHome = false
} }
}).then(()=>{ }).then(()=>{
getSystemUrl({app:params.app}).then((res) => {
console.log(params.app);
if (res.data.state == 'ok') {
console.log(res.data.url);
this.appUrl = res.data.url
} else {
this.$Notice.error({ title: '提示', desc: res.data.msg })
}
})
/**LiuKexin 20210311 根据用户名获取设置的首页 end */ /**LiuKexin 20210311 根据用户名获取设置的首页 end */
params.username = Encrypt(params.username); params.username = Encrypt(params.username);
params.password = Encrypt(params.password); params.password = Encrypt(params.password);
this.login(params).then((res) => { this.login(params)
.then((res) => {
if (res.data.state === 'ok') { if (res.data.state === 'ok') {
let verify = res.data.verify let verify = res.data.verify
if (verify) { if (verify) {
/**LiuKexin 20210311 区分默认首页和设置首页的callback start */ /**LiuKexin 20210311 区分默认首页和设置首页的callback start */
let callback = res.data.callback let callback = res.data.callback
if (callback) { if (callback) {
console.log(this.isHaveHome); document.location.href = this.isHaveHome
console.log(this.appUrl+callback.split("#")[0] + "?token="+ res.data.token+"#"+callback.split("#")[1]); ?
console.log(this.appUrl+callback + '?token=' + res.data.token); callback.split("#")[0] + "?token="+ res.data.token+"#"+callback.split("#")[1]
document.location.href = this.isHaveHome ?
this.appUrl+callback.split("#")[0] + "?token="+ res.data.token+"#"+callback.split("#")[1]
: :
this.appUrl+callback + '?token=' + res.data.token callback + '?token=' + res.data.token
/**LiuKexin 20210311 区分默认首页和设置首页的callback end */ /**LiuKexin 20210311 区分默认首页和设置首页的callback end */
} else { } else {
console.log(this.appUrl+this.form.callback + '?token=' + res.data.token); document.location.href =
document.location.href = this.appUrl+this.form.callback + '?token=' + res.data.token this.form.callback + '?token=' + res.data.token
} }
this.setSuccess() this.setSuccess()
} else { } else {
...@@ -348,7 +336,10 @@ export default { ...@@ -348,7 +336,10 @@ export default {
}, },
login({ app, callback, username, password }) { login({ app, callback, username, password }) {
return this.$http.post('/aserver/login', { return this.$http.post('/aserver/login', {
app,callback,username,password, app,
callback,
username,
password,
}) })
}, },
setSuccess(msg = '登录成功') { setSuccess(msg = '登录成功') {
......
...@@ -17,7 +17,6 @@ const PUBLIC_PATH = process.env.NODE_ENV === 'production' ? '/' : '/' ...@@ -17,7 +17,6 @@ const PUBLIC_PATH = process.env.NODE_ENV === 'production' ? '/' : '/'
module.exports = { module.exports = {
publicPath: PUBLIC_PATH, publicPath: PUBLIC_PATH,
// publicPath: '/aserver',
chainWebpack: config => { chainWebpack: config => {
config.resolve.alias config.resolve.alias
.set('@', resolve('src')) // key,value自行定义,比如.set('@@', resolve('src/components')) .set('@', resolve('src')) // key,value自行定义,比如.set('@@', resolve('src/components'))
...@@ -47,12 +46,12 @@ module.exports = { ...@@ -47,12 +46,12 @@ module.exports = {
// 提取出来的通用 chunk 和 vendor chunk。 // 提取出来的通用 chunk 和 vendor chunk。
chunks: ['chunk-vendors', 'chunk-common', 'index'] chunks: ['chunk-vendors', 'chunk-common', 'index']
}, },
// login: { login: {
// entry: 'src/main-login.js', entry: 'src/main-login.js',
// template: 'public/login.html', template: 'public/login.html',
// filename: 'login.html', filename: 'login.html',
// tilte: '登录' tilte: '登录'
// }, },
}, },
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment