提交 4a3287a7 authored 作者: huaxinzhu's avatar huaxinzhu

优化01

上级 db11856f
......@@ -100,18 +100,13 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
var ssa = window.location.host
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}else{
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}
}, 1000)
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}
})
})
}
......
......@@ -96,11 +96,11 @@ const user = {
removeToken()
var ssa = window.location.host
// setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa
}
// if(ssa =='localhost:1024'){
// window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa
// }else{
// window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa
// }
// }, 1000)
resolve()
......
......@@ -52,8 +52,9 @@ service.interceptors.response.use(res => {
hideLoading()
}, 200)
// debugger
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
const code = ( res.data.code === 0 ? 0 : res.data.code ) || 200;
// 返回所有数据的统一处理
const data = res.data;
// 获取错误信息
......@@ -88,13 +89,8 @@ service.interceptors.response.use(res => {
location.reload() // 为了重新实例化vue-router对象 避免bug
})
})
} else if (code === 500) {
Message({
message: message,
type: 'error'
})
return Promise.reject(new Error(message))
} else if (code !== 200 && code !== 1) {
}
else if (code !== 200 && code !== 1) {
Notification.error({
title: message
})
......@@ -110,8 +106,6 @@ service.interceptors.response.use(res => {
// }, 1000)
// location.reload() // 为了重新实例化vue-router对象 避免bug
})
} else if (code === 200 || code === 1 ) {
return res.data
}
}, error => {
setTimeout(() => {
......
......@@ -679,6 +679,8 @@
.brand-carousel {
width:70%;
min-width: 600px;
max-width: 1920px;
display : flex;
justify-content : center;
flex-direction : row;
......
......@@ -149,7 +149,7 @@ export default {
let money = []
let count = []
let actual = []
if(response.data.line && response.data.line.length > 0) {
if(response.data && response.data.line && response.data.line.length > 0) {
response.data.line.forEach(function(item, index) {
money.unshift(item.price)
actual.unshift(item.date)
......@@ -179,7 +179,7 @@ export default {
this.lineChartData.actualData = count
this.lineChartData.months= actual
// this.lineChartData.countData = count
console.log("response.data",response.data)
//console.log("response.data",response.data)
this.panelData.goodsTotal= response.data.goodsTotal
this.panelData.refundTotal= response.data.rettotal
......
......@@ -190,7 +190,6 @@
goodsImgFileList: [], // 商品图片地址 集合list
goodsImgVisible: false, // 图片能否预览
goodsImgUrlDialog: '',
/* 修改 商品分类 */
loadingSSQ: false,
editGoodsTypeDialog: false,
......@@ -210,7 +209,6 @@
watch: {},
created() {},
mounted() {
//debugger
//深拷贝一份最开始的数据,为初始化准备
//this.goodsInfoDataClone = this.deepClone(this.goodsinfodata);
if(this.goodsinfodata.goods_id) {
......@@ -226,7 +224,6 @@
this.goodsInfoForm.categoryStr = this.goodsinfodata.categoryStr;
this.goodsInfoForm.categoryList = this.goodsinfodata.categoryList;
}
//console.log("tup",this.goodsImgFileList)
// 获取 省
this.getArea();
// 获取 商品品牌
......@@ -286,7 +283,6 @@
if(level === 2) {
limboNode = { pid: node.value };
}
//this.loadingSSQ = true;
getAreaList(limboNode).then(res => {
let result = {};
if (level === 0) {
......@@ -317,7 +313,6 @@
})
}
resolve(result)
//this.loadingSSQ = false;
});
},
SSQGoodsChange(value) {
......
......@@ -268,7 +268,6 @@
// 规格子组件,传给父组件的数据
calcSpeTable(data) {
if(data.pamTableList.length > 0) {
// debugger
data.pamTableList.forEach((item, index) => {
if( Array.isArray(data.pamDataList[index]) ) {
item[0].spec_values = data.pamDataList[index];
......@@ -312,7 +311,7 @@
if(level === 2) {
limboNode = { id: node.value };
}
this.loading = true;
//this.loading = true;
NewGetCategory(limboNode).then(res => {
let result = {};
......@@ -363,7 +362,7 @@
}
resolve(result)
this.loading = false;
//this.loading = false;
});
},
// 添加商品后,下一步 操作
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论