Browse Source

Merge branch 'master' into prod

shibei_master
dai 4 years ago
parent
commit
a2f260c560
  1. 2
      .env.production
  2. 2
      .env.production.uat
  3. 4
      public/index.html
  4. 2
      src/App.vue
  5. 2
      src/components/ren-process-detail/src/ren-process-detail.vue
  6. 2
      src/i18n/index.js
  7. 6
      src/js/ajax.js
  8. 4
      src/main.js
  9. 2
      src/mixins/view-module.js
  10. 6
      src/utils/request.js
  11. 2
      src/views/components/tinymce/index.vue
  12. 6
      src/views/main-content.vue
  13. 113
      src/views/main-navbar.vue
  14. 6
      src/views/main-shuju/main-content.vue
  15. 35
      src/views/main-shuju/main-navbar.vue
  16. 8
      src/views/main-shuju/main.vue
  17. 106
      src/views/main.vue
  18. 4
      src/views/modules/activiti/model.vue
  19. 2
      src/views/modules/activiti/process-deploy.vue
  20. 2
      src/views/modules/activiti/process-initiation.vue
  21. 2
      src/views/modules/activiti/process.vue
  22. 2
      src/views/modules/message/mail-template-add-or-update.vue
  23. 2
      src/views/modules/oss/oss-upload.vue
  24. 2
      src/views/modules/sys/news-add-or-update.vue
  25. 2
      src/views/pages/index.vue
  26. 2
      src/views/pages/login copy.vue
  27. 4
      src/views/pages/login.vue

2
.env.production

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api
VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api
VUE_APP_NODE_ENV=prod
VUE_APP_PUBLIC_PATH=epmet-oper

2
.env.production.uat

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
VUE_APP_API_SERVER = http://120.27.18.76/api
VUE_APP_NODE_ENV=prod:uat
VUE_APP_PUBLIC_PATH=epmet-oper

4
public/index.html

@ -57,13 +57,13 @@
<!-- 验收测试环境 aliyun -->
<% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
window.SITE_CONFIG['apiURL'] = 'http://120.27.18.76/api'
</script>
<% } %>
<!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-cloud.elinkservice.cn/api'
window.SITE_CONFIG['apiURL'] = 'https://epdc-shibei.elinkservice.cn/api'
</script>
<% } %>
</head>

2
src/App.vue

@ -19,7 +19,7 @@ export default {
methods: {
i18nHandle (val, oldVal) {
Cookies.set('language', val)
localStorage.setItem('language', val)
document.querySelector('html').setAttribute('lang', val)
document.title = messages[val].brand.lg
//

2
src/components/ren-process-detail/src/ren-process-detail.vue

@ -69,7 +69,7 @@ export default {
// (xml/image)url
getResourceURL () {
var params = qs.stringify({
'token': Cookies.get('token'),
'token': localStorage.getItem('token'),
'processInstanceId': this.dataForm.processInstanceId
})
return `${window.SITE_CONFIG['apiURL']}/activiti/his/getInstImage?${params}`

2
src/i18n/index.js

@ -29,6 +29,6 @@ export const messages = {
}
export default new VueI18n({
locale: Cookies.get('language') || 'zh-CN',
locale: localStorage.getItem('language') || 'zh-CN',
messages
})

6
src/js/ajax.js

@ -45,9 +45,9 @@ function endLoading () {
*/
axios.interceptors.request.use(
(config) => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
config.headers['token'] = Cookies.get('token') || ''
config.headers['Authorization'] = Cookies.get('token') || ''
config.headers['Accept-Language'] = localStorage.getItem('language') || 'zh-CN'
config.headers['token'] = localStorage.getItem('token') || ''
config.headers['Authorization'] = localStorage.getItem('token') || ''
// 默认参数
var defaults = {}
// 防止缓存,GET请求默认带_t参数

4
src/main.js

@ -33,7 +33,9 @@ import getQueryPara from "dai-js/modules/getQueryPara";
// 兼容token传参登录
if (getQueryPara("token")) {
console.log('token', getQueryPara("token"));
Cookies.set("token", getQueryPara("token"));
localStorage.setItem("token", getQueryPara("token"));
console.log('token222222', localStorage.getItem('token'));
}
window.app = Object.assign(

2
src/mixins/view-module.js

@ -142,7 +142,7 @@ export default {
// 导出
exportHandle () {
var params = qs.stringify({
'token': Cookies.get('token'),
'token': localStorage.getItem('token'),
...this.dataForm
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportURL}?${params}`

6
src/utils/request.js

@ -15,9 +15,9 @@ const http = axios.create({
* 请求拦截
*/
http.interceptors.request.use(config => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
config.headers['token'] = Cookies.get('token') || ''
config.headers['Authorization'] = Cookies.get('token') || ''
config.headers['Accept-Language'] = localStorage.getItem('language') || 'zh-CN'
config.headers['token'] = localStorage.getItem('token') || ''
config.headers['Authorization'] = localStorage.getItem('token') || ''
// 默认参数
var defaults = {}
// 防止缓存,GET请求默认带_t参数

2
src/views/components/tinymce/index.vue

@ -137,7 +137,7 @@ export default {
})
},
getUserToken () {
let token = Cookie.get('token')
let token = localStorage.getItem('token')
// console.log('token', token)
// return this.$store.getters['user/isLogin']
return token

6
src/views/main-content.vue

@ -87,7 +87,7 @@ export default {
// this.$nextTick(() => {
// this.sendMessage()
// })
this.token = Cookie.get("token");
this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId");
},
methods: {
@ -100,7 +100,7 @@ export default {
this.iframeUrl =
url +
"?token=" +
Cookie.get("token") +
localStorage.getItem("token") +
"&customerId=" +
localStorage.getItem("customerId");
return isURL(url);
@ -169,7 +169,7 @@ export default {
console.log("iframe", iframe);
// iframe.postMessage({
// token: Cookie.get('token'),
// token: localStorage.getItem('token'),
// customerId: localStorage.getItem('customerId')
// }, '*')
iframe.postMessage({ name: "lalalal" }, "*");

113
src/views/main-navbar.vue

@ -46,9 +46,7 @@
mode="horizontal"
class="aui-navbar__menu mr-auto z-div"
>
<el-menu-item
@click="toIndexPage"
>
<el-menu-item @click="toIndexPage">
<span>首页</span>
</el-menu-item>
@ -104,12 +102,11 @@
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
@click.native="updatePasswordHandle()"
>{{ $t('updatePassword.title') }}</el-dropdown-item
>
<el-dropdown-item @click.native="updatePasswordHandle()">{{
$t("updatePassword.title")
}}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{
$t('logout')
$t("logout")
}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -127,119 +124,121 @@
</template>
<script>
import { messages } from '@/i18n'
import { mapGetters } from 'vuex'
import screenfull from 'screenfull'
import UpdatePasswordWork from './main-navbar-update-password-work'
import { clearLoginInfo } from '@/utils'
import { messages } from "@/i18n";
import { mapGetters } from "vuex";
import screenfull from "screenfull";
import UpdatePasswordWork from "./main-navbar-update-password-work";
import { clearLoginInfo } from "@/utils";
export default {
inject: ['refresh'],
inject: ["refresh"],
data() {
return {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: localStorage.getItem('customerName')
}
customerName: "",
};
},
components: {
UpdatePasswordWork
UpdatePasswordWork,
},
created() {
let platformToken = localStorage.getItem('showHeader') || ''
let platformToken = localStorage.getItem("showHeader") || "";
if (
typeof platformToken !== 'undefined' &&
platformToken !== 'undefined' &&
platformToken !== ''
typeof platformToken !== "undefined" &&
platformToken !== "undefined" &&
platformToken !== ""
) {
this.showHeader = false
this.showHeader = false;
}
console.log('=============================', this.userType)
this.changeCustomerName();
console.log("=============================", this.userType);
},
computed: {
userType() {
return localStorage.getItem('userType')
}
return localStorage.getItem("userType");
},
},
methods: {
toIndexPage(){
this.$router.replace('/indexWork')
toIndexPage() {
this.$router.replace("/indexWork");
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0]
)[0];
if (route) {
this.$router.push({ name: route.name })
this.$router.push({ name: route.name });
}
this.$store.state.LevelOneMenuActiveName = menuId
this.$store.state.LevelOneMenuActiveName = menuId;
this.$store.state.sidebarActiveSubMenuList =
this.$store.state.sidebarMenuList[idx].children || []
this.$store.state.sidebarMenuList[idx].children || [];
},
changeCustomerName(customerName) {
this.customerName = localStorage.getItem('customerName')
this.customerName =
localStorage.getItem("customerName") || "党建引领基层治理互联管理平台";
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t('fullscreen.prompt'),
type: 'warning',
duration: 500
})
message: this.$t("fullscreen.prompt"),
type: "warning",
duration: 500,
});
}
screenfull.toggle()
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePassowrdVisible = true
this.updatePassowrdVisible = true;
this.$nextTick(() => {
this.$refs.updatePassowrd.init()
})
this.$refs.updatePassowrd.init();
});
},
// 退
logoutHandle() {
this.$confirm(
this.$t('prompt.info', { handle: this.$t('logout') }),
this.$t('prompt.title'),
this.$t("prompt.info", { handle: this.$t("logout") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === 'home'
)
(item) => item.name === "home"
);
this.$http
.post('/auth/login/logout')
.post("/auth/login/logout")
.then(({ data: res }) => {
if (res.code !== 0) {
// 退
if (res.code !== 10007) {
this.$message.error(res.msg)
this.$message.error(res.msg);
}
}
clearLoginInfo()
this.$router.push({ name: 'login' })
clearLoginInfo();
this.$router.push({ name: "login" });
// if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' })
// } else {
// this.$router.push({ name: 'login' })
// }
})
.catch(() => {})
.catch(() => {});
})
.catch(() => {})
}
}
}
.catch(() => {});
},
},
};
</script>
<style lang="scss" scoped>
.main-line {

6
src/views/main-shuju/main-content.vue

@ -24,7 +24,7 @@ export default {
// this.$nextTick(() => {
// this.sendMessage()
// })
this.token = Cookie.get('token')
this.token = localStorage.getItem('token')
this.customerId = localStorage.getItem('customerId')
},
methods: {
@ -34,7 +34,7 @@ export default {
// tabs, iframe
tabIsIframe (url) {
// this.appendIframe(url)
this.iframeUrl = url + '?token=' + Cookie.get('token') + '&customerId=' + localStorage.getItem('customerId')
this.iframeUrl = url + '?token=' + localStorage.getItem('token') + '&customerId=' + localStorage.getItem('customerId')
return isURL(url)
},
// tabs, tab
@ -85,7 +85,7 @@ export default {
console.log('iframe', iframe)
// iframe.postMessage({
// token: Cookie.get('token'),
// token: localStorage.getItem('token'),
// customerId: localStorage.getItem('customerId')
// }, '*')
iframe.postMessage({ name: 'lalalal' }, '*')

35
src/views/main-shuju/main-navbar.vue

@ -3,9 +3,7 @@
<nav v-if="showHeader" class="m-navbar">
<div class="navbar__header">
<h1 class="navbar__brand" @click="$router.push({ name: 'home' })">
<a class="navbar__brand-lg" href="javascript:;">{{
userType === "work" ? customerName : $t("brand.lg")
}}</a>
<a class="navbar__brand-lg" href="javascript:;">{{ customerName }}</a>
<a class="navbar__brand-mini" href="javascript:;">{{
customerName.slice(0, 2)
}}</a>
@ -150,29 +148,25 @@ export default {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: localStorage.getItem("customerName"),
customerName: "",
};
},
components: {
UpdatePasswordWork,
},
created() {
let platformToken = localStorage.getItem("showHeader") || "";
if (
typeof platformToken !== "undefined" &&
platformToken !== "undefined" &&
platformToken !== ""
) {
this.showHeader = false;
}
console.log("=============================", this.userType);
// let platformToken = localStorage.getItem("showHeader") || "";
// if (
// typeof platformToken !== "undefined" &&
// platformToken !== "undefined" &&
// platformToken !== ""
// ) {
// this.showHeader = false;
// }
this.changeCustomerName();
this.$store.state.mainShuju.menuList = window.SITE_CONFIG["menuShujuList"];
},
computed: {
userType() {
return localStorage.getItem("userType");
},
},
computed: {},
methods: {
toIndexPage() {
this.$router.replace("/indexWork");
@ -187,8 +181,9 @@ export default {
this.$store.state.mainShuju.activeName = menuId;
}
},
changeCustomerName(customerName) {
this.customerName = localStorage.getItem("customerName");
changeCustomerName() {
this.customerName =
localStorage.getItem("customerName") || "数据分析可视化平台";
},
//
fullscreenHandle() {

8
src/views/main-shuju/main.vue

@ -108,12 +108,18 @@ export default {
async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user);
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}
} else {
this.$message.error(rspMsg);
}
},
},

106
src/views/main.vue

@ -1,7 +1,8 @@
<template>
<div v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
<div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
'aui-wrapper',
{ 'aui-sidebar--fold': $store.state.sidebarFold },
{
@ -9,14 +10,16 @@
$store.state.sidebarActiveSubMenuList.length == 0,
},
{ 'z-iframe': $store.state.inIframe },
]">
]"
>
<template v-if="!loading">
<main-navbar ref="ref_navbar"
v-if="!$store.state.inIframe" />
<main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
<main-sidebar v-if="!$store.state.inIframe" />
<div class="aui-content__wrapper">
<main-content v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName" />
<main-content
v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
</div>
<main-theme-tools v-if="!$store.state.inIframe" />
</template>
@ -31,12 +34,13 @@ import MainThemeTools from "./main-theme-tools";
import debounce from "lodash/debounce";
import { mapGetters } from "vuex";
import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
export default {
provide () {
provide() {
return {
//
refresh () {
refresh() {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
@ -44,7 +48,7 @@ export default {
},
};
},
data () {
data() {
return {
loading: true,
userType: localStorage.getItem("userType"),
@ -60,26 +64,20 @@ export default {
watch: {
$route: "routeHandle",
},
async created () {
async created() {
this.windowResizeHandle();
this.routeHandle(this.$route);
if (localStorage.getItem("userType") === "work") {
Promise.all([this.getWorkUserInfo()]).then(() => {
this.loading = false;
});
} else {
Promise.all([this.getUserInfo()]).then(() => {
this.loading = false;
});
}
Promise.all([this.getWorkUserInfo()]).then(() => {
this.loading = false;
});
},
computed: {},
methods: {
changeCustomerName (customerName) {
changeCustomerName(customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName);
},
//
windowResizeHandle () {
windowResizeHandle() {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
@ -91,7 +89,7 @@ export default {
);
},
// ,
routeHandle (route) {
routeHandle(route) {
if (!route.meta.isTab) {
return false;
}
@ -114,7 +112,7 @@ export default {
this.$store.state.contentTabsActiveName = tab.name;
this.syncLevelOneMenuActive(tab.menuId);
},
async syncLevelOneMenuActive (menuId) {
async syncLevelOneMenuActive(menuId) {
await nextTick();
console.log(
"*******************************",
@ -137,54 +135,22 @@ export default {
idx !== -1 ? this.$store.state.sidebarMenuList[idx].children : [];
},
//
getUserInfo () {
const url = "/epmetuser/operuser/queryOperUserDto";
return this.$http
.get(url)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$store.state.user.id = res.data.id;
this.$store.state.user.realName = res.data.realName;
this.$store.state.user.superAdmin = res.data.superAdmin;
this.$store.state.user.gender = data.gender;
localStorage.setItem("customerId", "");
})
.catch(() => { });
},
//
getWorkUserInfo () {
async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user);
// this.$store.state.user.id = data.id
// this.$store.state.user.realName = data.realName
// this.$store.state.user.superAdmin = data.superAdmin
// this.$store.state.user.gender = data.gender
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
// this.$store.state.user.roleList = data.roleList
// this.$store.state.user.customerId = data.customerId
},
(rspMsg, data) => {
this.$message.error(rspMsg);
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user);
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || "");
}
);
// return this.$http.get(url).then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg)
// }
// }).catch(() => { })
} else {
this.$message.error(rspMsg);
}
},
},
};

4
src/views/modules/activiti/model.vue

@ -83,7 +83,7 @@ export default {
// 线url
getModelerURL (id) {
var params = qs.stringify({
'token': Cookies.get('token'),
'token': localStorage.getItem('token'),
'modelId': id
})
return `${window.SITE_CONFIG['apiURL']}/activiti/modeler.html?${params}`
@ -91,7 +91,7 @@ export default {
// url
getExportURL (id) {
var params = qs.stringify({
'token': Cookies.get('token')
'token': localStorage.getItem('token')
})
return `${window.SITE_CONFIG['apiURL']}/activiti/model/export/${id}?${params}`
},

2
src/views/modules/activiti/process-deploy.vue

@ -28,7 +28,7 @@ export default {
methods: {
init () {
this.visible = true
this.url = `${window.SITE_CONFIG['apiURL']}/activiti/process/deploy?token=${Cookies.get('token')}`
this.url = `${window.SITE_CONFIG['apiURL']}/activiti/process/deploy?token=${localStorage.getItem('token')}`
this.fileList = []
},
//

2
src/views/modules/activiti/process-initiation.vue

@ -85,7 +85,7 @@ export default {
// (xml/image)url
getResourceURL (id, name) {
var params = qs.stringify({
'token': Cookies.get('token'),
'token': localStorage.getItem('token'),
'deploymentId': id,
'resourceName': name
})

2
src/views/modules/activiti/process.vue

@ -101,7 +101,7 @@ export default {
// (xml/image)url
getResourceURL (id, name) {
var params = qs.stringify({
'token': Cookies.get('token'),
'token': localStorage.getItem('token'),
'deploymentId': id,
'resourceName': name
})

2
src/views/modules/message/mail-template-add-or-update.vue

@ -108,7 +108,7 @@ export default {
theme: 'snow'
})
// (使element upload)
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${localStorage.getItem('token')}`
this.quillEditor.getModule('toolbar').addHandler('image', () => {
this.$refs.uploadBtn.$el.click()
})

2
src/views/modules/oss/oss-upload.vue

@ -29,7 +29,7 @@ export default {
methods: {
init () {
this.visible = true
this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}`
this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${localStorage.getItem('token')}`
this.num = 0
this.fileList = []
},

2
src/views/modules/sys/news-add-or-update.vue

@ -108,7 +108,7 @@ export default {
theme: 'snow'
})
// (使element upload)
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${localStorage.getItem('token')}`
this.quillEditor.getModule('toolbar').addHandler('image', () => {
this.$refs.uploadBtn.$el.click()
})

2
src/views/pages/index.vue

@ -73,7 +73,7 @@ export default {
localStorage.setItem('customerId', res.data.customerId)
localStorage.setItem('userType', 'work')
localStorage.setItem('showHeader', '0')
Cookies.set('token', res.data.token)
localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' })
})
.catch(() => {})

2
src/views/pages/login copy.vue

@ -145,7 +145,7 @@ export default {
return this.$message.error(res.msg)
}
localStorage.setItem('userType', 'oper')
Cookies.set('token', res.data.token)
localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' }).catch(() => { })
}).catch(() => { })
})

4
src/views/pages/login.vue

@ -243,7 +243,7 @@ export default {
localStorage.setItem('customerId', res.data.customerId)
localStorage.setItem('userType', 'work')
localStorage.setItem('showHeader', '0')
Cookies.set('token', res.data.token)
localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'home' })
})
.catch(() => { })
@ -271,7 +271,7 @@ export default {
localStorage.setItem('userType', 'work')
Cookies.set('token', res.data.token)
localStorage.setItem('token', res.data.token)
this.$router.replace({ name: 'indexWork' }).catch(() => { })
})
.catch(() => { })

Loading…
Cancel
Save