no message

This commit is contained in:
小陌 2023-07-03 21:42:11 +08:00
parent 6bb6e24944
commit 3990dbb966
5 changed files with 11 additions and 7 deletions

View File

@ -110,8 +110,8 @@
filterObj(){
const obj = {}
this.filter.forEach((item) => {
if (!this.data[item.name] || this.data[item.name] == '') {
return; //
if (this.data[item.name] === undefined || this.data[item.name] === null || JSON.stringify(this.data[item.name]) === '') {
return ; //
}
if (item.options && item.options.items && item.options.items.length>0) {
const foundItem = item.options.items.find(o => o.value === this.data[item.name]);
@ -119,8 +119,12 @@
item.operator = foundItem.operator;
}
}
obj[item.name] = item.operator ? this.data[item.name]+`${config.separator}${item.operator}` : this.data[item.name]
})
console.log(obj)
return obj
}
},

View File

@ -38,7 +38,7 @@ router.beforeEach(async (to, from, next) => {
NProgress.start()
//动态标题
document.title = to.meta.title ? `${to.meta.title} - ${config.APP_NAME}` : `${config.APP_NAME}`
let token = tool.cookie.get("token");
let token = tool.cookie.get('X-PHPSSESSION');
if (to.path === "/login") {
//删除路由(替换当前layout路由)
router.addRoute(routes[0])

View File

@ -11,7 +11,7 @@ axios.defaults.timeout = sysConfig.TIMEOUT
// HTTP request 拦截器
axios.interceptors.request.use(
(config) => {
let token = tool.cookie.get("token");
let token = tool.cookie.get('X-PHPSSESSION');
if (token) {
config.headers[sysConfig.TOKEN_NAME] = sysConfig.TOKEN_PREFIX + token
}

View File

@ -70,7 +70,7 @@
return false
}
this.$tool.cookie.set("token", user.data.token, {
this.$tool.cookie.set('X-PHPSSESSION', user.data.token, {
expires: 86400*360
})

View File

@ -107,7 +107,7 @@
}
},
created: function() {
this.$tool.cookie.remove("token")
this.$tool.cookie.remove('X-PHPSSESSION')
this.$tool.data.remove("user")
this.$tool.data.remove("menu")
this.$tool.data.remove("permissions")
@ -144,7 +144,7 @@
}else if(res.code==200){
this.showWechatLogin = false
this.$tool.cookie.set("token", res.data.token, {
this.$tool.cookie.set('X-PHPSSESSION', res.data.token, {
expires: 86400*360
})