Commit 12237578 authored by 李苏's avatar 李苏 💬

ERP 特别修改

parent 26029be5
# 页面标题 # 页面标题
VUE_APP_TITLE = Gavel VUE_APP_TITLE = 格物软件
# 开发环境配置 # 开发环境配置
ENV = 'http://demo.ruoyi.vip/' ENV = 'http://demo.ruoyi.vip/'
......
# 页面标题 # 页面标题
VUE_APP_TITLE = Gavel VUE_APP_TITLE = 格物软件
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# gavelErp/生产环境 # gavelErp/生产环境
VUE_APP_BASE_API = '/wmsapp/wmsappServie' VUE_APP_BASE_API = 'test'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
import request from 'common/src/utils/request'
/* 事务类型接口 */
export function initSwlx(query) {
return request({
url: '/jcsj/common/wfstate',
method: 'post',
data: query||{}
})
}
/* 部门接口 */
export function initBm(query) {
return request({
url: '/kzzx/bm/query',
method: 'post',
data: query||{}
})
}
/* 系统初始接口 */
export function systeminfo(query) {
return request({
url: '/systeminfo',
method: 'post',
data: query||{}
})
}
// 公司接口
export function queryGs(query) {
return request({
url: '/jcsj/common/bm/queryGs',
method: 'post',
data: query||{}
})
}
import request from '@/utils/request' import request from 'common/src/utils/request'
import md5 from '@/utils/md5.js' import md5 from '@/utils/md5.js'
// 登录方法 // 登录方法
export function login(username, password, code, uuid) { export function login(username, password, code, uuid,systemid) {
const data = { const data = {
"userid":username.toLowerCase(), "userid":username.toLowerCase(),
"password":md5(username.toLowerCase() + "USER" + password + "PASSWORD"), "password":md5(username.toLowerCase() + "USER" + password + "PASSWORD"),
"newPassword":md5(password) "newPassword":md5(password)
} }
if(systemid){
data.systemid=systemid
}
return request({ return request({
url: '/login', url: '/login',
headers: { headers: {
......
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
return { return {
search: '', search: '',
options: [], options: [],
allPool:[],
searchPool: [], searchPool: [],
show: false, show: false,
fuse: undefined fuse: undefined
...@@ -56,12 +57,23 @@ export default { ...@@ -56,12 +57,23 @@ export default {
}, },
mounted() { mounted() {
this.searchPool = this.generateRoutes(this.routes) this.searchPool = this.generateRoutes(this.routes)
this.allPool= this.searchPool.map((item,index)=>{
let obj={
refIndex:index,
item:item
}
return obj
})
}, },
methods: { methods: {
click() { click() {
this.show = !this.show this.show = !this.show
if (this.show) { if (this.show) {
this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus() this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
setTimeout(()=>{
this.options = this.allPool
},200)
} }
}, },
close() { close() {
...@@ -143,7 +155,7 @@ export default { ...@@ -143,7 +155,7 @@ export default {
if (query !== '') { if (query !== '') {
this.options = this.fuse.search(query) this.options = this.fuse.search(query)
} else { } else {
this.options = [] this.options = this.allPool
} }
}, },
ishttp(url) { ishttp(url) {
......
<template> <template>
<section class="app-main"> <section class="app-main">
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in">
<!-- <keep-alive :include="cachedViews"> <template v-if="cachedViews.indexOf(key)!=-1 ">
<router-view :key="key" />
</keep-alive> -->
<keep-alive > <keep-alive >
<router-view :key="key" /> <router-view :key="key" />
</keep-alive> </keep-alive>
</template>
<template v-else >
<router-view :key="key" />
</template>
</transition> </transition>
</section> </section>
</template> </template>
...@@ -19,7 +22,8 @@ export default { ...@@ -19,7 +22,8 @@ export default {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews
}, },
key() { key() {
return this.$route.path console.log(this.$route.name)
return this.$route.name
} }
} }
} }
......
<template> <template>
<div class="navbar"> <div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<!-- 修改密码-->
<el-dialog :append-to-body='true' title="修改密码" :visible.sync="settingVisible" width="40%">
<div>
<el-form ref="form" :model="users" :rules="rules" label-width="80px">
<el-form-item label="旧密码" prop="oldPassword">
<el-input v-model="users.oldPassword" placeholder="请输入旧密码" type="password" show-password/>
</el-form-item>
<el-form-item label="新密码" prop="newPassword">
<el-input v-model="users.newPassword" placeholder="请输入新密码" type="password" show-password/>
</el-form-item>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="users.confirmPassword" placeholder="请确认新密码" type="password" show-password/>
</el-form-item>
<!-- <el-form-item>
<el-button type="primary" size="mini" @click="submit">保存</el-button>
<el-button type="danger" size="mini" @click="close">关闭</el-button>
</el-form-item> -->
</el-form>
</div>
<div class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="settingVisible = false">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</span>
</div>
</el-dialog>
<!-- -->
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu"> <div class="right-menu">
<div style="height: 100%;width: 200px;float: left;background-color: #eee;"> <div style="height: 100%;float: left;">
<navbarMenu/> <search id="header-search" class="right-menu-item" />
</div>
<div v-if="systemInfo.length!=0" style="height: 100%;width: 200px;float: left;">
<ChangeProject/>
</div> </div>
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
</template> </template>
...@@ -25,9 +56,12 @@ ...@@ -25,9 +56,12 @@
<router-link to="/user/profile"> <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item> <el-dropdown-item>个人中心</el-dropdown-item>
</router-link> </router-link>
<!-- <el-dropdown-item @click.native="setting = true"> <span @click="showItem">
<span>布局设置</span> <el-dropdown-item>修改密码</el-dropdown-item>
</el-dropdown-item> --> </span>
<el-dropdown-item @click.native="setting = true">
<span>主题设置</span>
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout"> <el-dropdown-item divided @click.native="logout">
<span>退出登录</span> <span>退出登录</span>
</el-dropdown-item> </el-dropdown-item>
...@@ -47,6 +81,8 @@ import SizeSelect from '@/components/SizeSelect' ...@@ -47,6 +81,8 @@ import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git' import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc' import RuoYiDoc from '@/components/RuoYi/Doc'
import { updatePassword } from "common/src/api/development/development.js";
import ChangeProject from './changeProject.vue';
export default { export default {
components: { components: {
...@@ -57,17 +93,50 @@ export default { ...@@ -57,17 +93,50 @@ export default {
SizeSelect, SizeSelect,
Search, Search,
RuoYiGit, RuoYiGit,
RuoYiDoc RuoYiDoc,
ChangeProject
}, },
mounted(){ mounted(){
this.user=localStorage.getItem('username')||'用户' this.user=localStorage.getItem('username')||'用户'
}, },
data(){ data(){
const equalToPassword = (rule, value, callback) => {
if (this.users.newPassword !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return{ return{
user:'用户' users: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
user:'用户',
settingVisible:false,
// 表单校验
rules: {
oldPassword: [
{ required: true, message: "旧密码不能为空", trigger: "blur" }
],
newPassword: [
{ required: true, message: "新密码不能为空", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
],
confirmPassword: [
{ required: true, message: "确认密码不能为空", trigger: "blur" },
{ required: true, validator: equalToPassword, trigger: "blur" }
]
}
} }
}, },
computed: { computed: {
systemInfo(){
let data=this.$store.getters.systemInfo||[]
return data
},
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'avatar', 'avatar',
...@@ -91,6 +160,30 @@ export default { ...@@ -91,6 +160,30 @@ export default {
} }
}, },
methods: { methods: {
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
let params={
oldPassword: Base64.encode(this.user.oldPassword),
newPassword: Base64.encode(this.user.newPassword),
newPasswordConfirm: Base64.encode(this.user.confirmPassword)
}
updatePassword(params).then(res=>{
if(res.success){
this.$success('密码修改成功!')
this.settingVisible=false
}
})
// updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
// this.$modal.msgSuccess("修改成功");
// });
}
});
},
showItem(){
this.settingVisible=true
},
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
......
...@@ -35,36 +35,36 @@ ...@@ -35,36 +35,36 @@
</div> </div>
</div> </div>
<el-divider/> <!--<el-divider/>-->
<h3 class="drawer-title">系统布局配置</h3> <!--<h3 class="drawer-title">系统布局配置</h3>-->
<!---->
<!--<div class="drawer-item">-->
<!--<span>开启 TopNav</span>-->
<!--<el-switch v-model="topNav" class="drawer-switch" />-->
<!--</div>-->
<div class="drawer-item"> <!--<div class="drawer-item">-->
<span>开启 TopNav</span> <!--<span>开启 Tags-Views</span>-->
<el-switch v-model="topNav" class="drawer-switch" /> <!--<el-switch v-model="tagsView" class="drawer-switch" />-->
</div> <!--</div>-->
<div class="drawer-item"> <!--<div class="drawer-item">-->
<span>开启 Tags-Views</span> <!--<span>固定 Header</span>-->
<el-switch v-model="tagsView" class="drawer-switch" /> <!--<el-switch v-model="fixedHeader" class="drawer-switch" />-->
</div> <!--</div>-->
<div class="drawer-item"> <!--<div class="drawer-item">-->
<span>固定 Header</span> <!--<span>显示 Logo</span>-->
<el-switch v-model="fixedHeader" class="drawer-switch" /> <!--<el-switch v-model="sidebarLogo" class="drawer-switch" />-->
</div> <!--</div>-->
<div class="drawer-item"> <!--<div class="drawer-item">-->
<span>显示 Logo</span> <!--<span>动态标题</span>-->
<el-switch v-model="sidebarLogo" class="drawer-switch" /> <!--<el-switch v-model="dynamicTitle" class="drawer-switch" />-->
</div> <!--</div>-->
<div class="drawer-item">
<span>动态标题</span>
<el-switch v-model="dynamicTitle" class="drawer-switch" />
</div>
<el-divider/> <!--<el-divider/>-->
<el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button> <el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
<el-button size="small" plain icon="el-icon-refresh" @click="resetSetting">重置配置</el-button> <el-button size="small" plain icon="el-icon-refresh" @click="resetSetting">重置配置</el-button>
......
<template>
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-submenu index="1" @mouseover.native.once="titClick">
<template slot="title">{{systemName||customName}}</template>
<el-menu-item :key="item.id" :index="index" v-for="(item,index) in systemInfo" >{{item.name}}</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
import store from '@/store'
import router from '@/router'
import {
queryMenusBizType
} from "common/src/api/system/dmgSystem.js";
export default{
name:'changeProject',
mounted() {
},
updated() {
},
computed: {
systemInfo(){
let data=this.$store.getters.systemInfo||[]
return data
},
systemName(){
let data=this.$store.getters.systemName||''
return data
},
customName(){
let data=this.$store.getters.customName||''
return data
},
theme() {
return this.$store.state.settings.theme;
},
// 顶部显示菜单
topMenus() {
let topMenus = [];
this.routers.map((menu) => {
if (menu.hidden !== true) {
// 兼容顶部栏一级菜单内部跳转
if (menu.path === "/") {
topMenus.push(menu.children[0]);
} else {
topMenus.push(menu);
}
}
});
return topMenus;
},
// 所有的路由信息
routers() {
return this.$store.state.permission.topbarRouters;
},
// 设置子路由
childrenMenus() {
var childrenMenus = [];
this.routers.map((router) => {
for (var item in router.children) {
if (router.children[item].parentPath === undefined) {
if(router.path === "/") {
router.children[item].path = "/" + router.children[item].path;
} else {
if(!this.ishttp(router.children[item].path)) {
router.children[item].path = router.path + "/" + router.children[item].path;
}
}
router.children[item].parentPath = router.path;
}
childrenMenus.push(router.children[item]);
}
});
return constantRoutes.concat(childrenMenus);
},
// 默认激活的菜单
activeMenu() {
},
},
data(){
return{
activeIndex:'1',
showList:[]
}
},
methods:{
clearPageCache() {
// 获取 router 的 matcher 对象
Object.keys(router.options.routes).forEach((route) => {
// 移除该路由的缓存
});
},
titClick(){
},
activeRoutes(key) {
var routes = [];
if (this.childrenMenus && this.childrenMenus.length > 0) {
this.childrenMenus.map((item) => {
if (key == item.parentPath || (key == "index" && "" == item.path)) {
routes.push(item);
}
});
}
if(routes.length > 0) {
this.$store.commit("SET_SIDEBAR_ROUTERS", routes);
}
},
handleSelect(index){
let id=this.systemInfo[index].id
this.$post('/frame/system/switch',{id:id}).then(res=>{
if(res.success){
/* 关闭所有标签页*/
store.commit('INIT_SIDEBARRPUTERS')
store.dispatch('GenerateRoutes').then(accessRoutes => {
router.addRoutes(accessRoutes)
this.$tab.closeAllPage()
this.clearPageCache()
this.$router.push({
path:'/index'
})
})
}
})
}
}
}
</script>
<style lang="scss" >
.el-submenu__title{
height: 50px!important;
line-height: 50px!important;
}
</style>
...@@ -70,12 +70,12 @@ export const constantRoutes = [ ...@@ -70,12 +70,12 @@ export const constantRoutes = [
path: '', path: '',
component: Layout, component: Layout,
redirect: 'index', redirect: 'index',
hidden: true,
children: [ children: [
{ {
path: 'index', path: 'index',
component: () => import('@/views/index'), component: () => import('@/views/index'),
name: 'Index', name: 'Index',
// redirect: '/user/profile',
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: '首页', icon: 'dashboard', affix: true }
} }
] ]
......
...@@ -16,5 +16,9 @@ const getters = { ...@@ -16,5 +16,9 @@ const getters = {
topbarRouters:state => state.permission.topbarRouters, topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes, defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters, sidebarRouters:state => state.permission.sidebarRouters,
systemInfo:state => state.permission.systemInfo,
appName:state => state.permission.appName,
customName:state => state.permission.customName,
systemName:state => state.permission.systemName,
} }
export default getters export default getters
...@@ -19,8 +19,23 @@ const permission = { ...@@ -19,8 +19,23 @@ const permission = {
topbarRouters: [], topbarRouters: [],
sidebarRouters: [], sidebarRouters: [],
appName:'', appName:'',
customName:'',
systemName:'',
systemInfo:[]
}, },
mutations: { mutations: {
INIT_SIDEBARRPUTERS:(state)=>{
state.sidebarRouters=[]
},
SET_SYSTEMINFO:(state,systemInfo)=>{
state.systemInfo=systemInfo
},
SET_CUSTOMNAME:(state,customName)=>{
state.customName=customName
},
SET_SYSTEMNAME:(state,systemName)=>{
state.systemName=systemName
},
SET_APPNAME:(state,appName)=>{ SET_APPNAME:(state,appName)=>{
state.appName=appName state.appName=appName
}, },
...@@ -63,9 +78,24 @@ const permission = { ...@@ -63,9 +78,24 @@ const permission = {
getRouters({}).then(res => { getRouters({}).then(res => {
let appName=res.data.appName||'' let appName=res.data.appName||''
let customName=res.data.customName||''
let systemName=res.data.systemName||''
commit('SET_APPNAME', appName) commit('SET_APPNAME', appName)
commit('SET_CUSTOMNAME', customName)
commit('SET_SYSTEMNAME', systemName)
/* 构建新list放进列表切换*/
localStorage.setItem('appName',appName) localStorage.setItem('appName',appName)
/* 存储system id list*/
/* 将可切换系统存入store*/
let systemInfo=res.data.systemInfo||[]
if(systemInfo.length!=0){
systemInfo.unshift({
id:'',
name:customName
})
}
commit('SET_SYSTEMINFO', systemInfo)
let menus=res.data.menu let menus=res.data.menu
let asymenus=JSON.parse(JSON.stringify(res.data.menu)) let asymenus=JSON.parse(JSON.stringify(res.data.menu))
/* 权限路由*/ /* 权限路由*/
......
...@@ -43,11 +43,13 @@ const user = { ...@@ -43,11 +43,13 @@ const user = {
const password = userInfo.password const password = userInfo.password
const code = userInfo.code const code = userInfo.code
const uuid = userInfo.uuid const uuid = userInfo.uuid
const systemid=userInfo.systemid
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => { login(username, password, code, uuid,systemid).then(res => {
sessionStorage.setItem('allUserInfo',JSON.stringify(res.data)) sessionStorage.setItem('allUserInfo',JSON.stringify(res.data))
localStorage.setItem('username',res.data.username) localStorage.setItem('username',res.data.username)
localStorage.setItem('userid',res.data.userid) localStorage.setItem('userid',res.data.userid)
localStorage.setItem('systemid',systemid)
/* 存储本地一份 */ /* 存储本地一份 */
setToken(res.data.token) setToken(res.data.token)
commit('SET_TOKEN', res.data.token) commit('SET_TOKEN', res.data.token)
...@@ -93,7 +95,8 @@ const user = { ...@@ -93,7 +95,8 @@ const user = {
commit('SET_ROLES', []) commit('SET_ROLES', [])
commit('SET_PERMISSIONS', []) commit('SET_PERMISSIONS', [])
removeToken() removeToken()
location.href="login" location.href="/#login"
location.reload();
}) })
}, },
......
...@@ -27,6 +27,16 @@ ...@@ -27,6 +27,16 @@
<!-- --> <!-- -->
<h3 class="title">{{appName}}</h3> <h3 class="title">{{appName}}</h3>
<el-form-item v-if="isqyh" prop="systemid">
<el-input
v-model="loginForm.systemid"
type="text"
auto-complete="off"
placeholder="企业号"
>
<!-- <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> -->
</el-input>
</el-form-item>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
...@@ -75,8 +85,8 @@ ...@@ -75,8 +85,8 @@
<span v-if="!loading">登 录</span> <span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span> <span v-else>登 录 中...</span>
</el-button> </el-button>
<div style="float: right;" v-if="register"> <div style="float: right;" >
<router-link class="link-type" :to="'/register'">立即注册</router-link> <span @click="isqyh=!isqyh" class="link-type">{{isqyh?'账号登录':'企业号登录'}}</span>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -98,9 +108,12 @@ export default { ...@@ -98,9 +108,12 @@ export default {
name: "Login", name: "Login",
data() { data() {
return { return {
/* 登录方式*/
isqyh:false,
appName:'', appName:'',
codeUrl: "", codeUrl: "",
loginForm: { loginForm: {
systemid:"",
username: "", username: "",
password: "", password: "",
rememberMe: false, rememberMe: false,
...@@ -108,6 +121,9 @@ export default { ...@@ -108,6 +121,9 @@ export default {
uuid: "" uuid: ""
}, },
loginRules: { loginRules: {
systemid: [
{ required: true, trigger: "blur", message: "请输入企业号" }
],
username: [ username: [
{ required: true, trigger: "blur", message: "请输入您的账号" } { required: true, trigger: "blur", message: "请输入您的账号" }
], ],
...@@ -153,10 +169,12 @@ export default { ...@@ -153,10 +169,12 @@ export default {
}); });
}, },
getCookie() { getCookie() {
const systemid = Cookies.get("systemid");
const username = Cookies.get("username"); const username = Cookies.get("username");
const password = Cookies.get("password"); const password = Cookies.get("password");
const rememberMe = Cookies.get('rememberMe') const rememberMe = Cookies.get('rememberMe')
this.loginForm = { this.loginForm = {
systemid: systemid === undefined ? this.loginForm.systemid : systemid,
username: username === undefined ? this.loginForm.username : username, username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : decrypt(password), password: password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
...@@ -167,17 +185,28 @@ export default { ...@@ -167,17 +185,28 @@ export default {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
if (this.loginForm.rememberMe) { if (this.loginForm.rememberMe) {
Cookies.set("systemid", this.loginForm.systemid, { expires: 30 });
Cookies.set("username", this.loginForm.username, { expires: 30 }); Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 }); Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }); Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
} else { } else {
Cookies.remove("systemid");
Cookies.remove("username"); Cookies.remove("username");
Cookies.remove("password"); Cookies.remove("password");
Cookies.remove('rememberMe'); Cookies.remove('rememberMe');
} }
this.$store.dispatch("Login", this.loginForm).then(() => { /* 判定是否是企业号登录*/
const loginForm=_.cloneDeep(this.loginForm)
if(!this.isqyh){
/*
企业号登录模式为企业号必填
如何不是删除该字段
是否存在该字段将是判定是否企业号登录的标志
*/
delete loginForm.systemid
}
this.$store.dispatch("Login", loginForm).then(() => {
this.$router.push({path:'index'}) this.$router.push({path:'index'})
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
if (this.captchaEnabled) { if (this.captchaEnabled) {
......
...@@ -38,7 +38,9 @@ module.exports = { ...@@ -38,7 +38,9 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.30.254:18080/dmg`, // target: `http://192.168.30.254:18080/dmg`,
// target: `http://192.168.30.254:28084/erp`,
target: `http://localhost:9080/erp`, target: `http://localhost:9080/erp`,
// target:'http://192.168.30.105:9081/erp',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
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