1、代码优化
2、bug修复 3、数据库优化
This commit is contained in:
@@ -49,6 +49,18 @@ service.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
// if the custom code is not 20000, it is judged as an error.
|
||||
if (res.code === 401) {
|
||||
// to re-login
|
||||
MessageBox.confirm('您已经登出,您可以取消停留在这个页面,或重新登录', '退出', {
|
||||
confirmButtonText: '或重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
store.dispatch('user/resetToken').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
if (res.code !== 200) {
|
||||
Message({
|
||||
message: res.message || 'Error',
|
||||
@@ -57,19 +69,7 @@ service.interceptors.response.use(
|
||||
})
|
||||
|
||||
// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
||||
if (res.code === 401) {
|
||||
// to re-login
|
||||
MessageBox.confirm('您已经登出,您可以取消停留在这个页面,或重新登录', '退出', {
|
||||
confirmButtonText: '或重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
store.dispatch('user/resetToken').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
})
|
||||
}
|
||||
return Promise.reject(new Error(res.message || 'Error'))
|
||||
// return Promise.reject(new Error(res.message || 'Error'))
|
||||
} else {
|
||||
return res.data
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
},
|
||||
loginForm: {
|
||||
account: 'demo', // admin
|
||||
pwd: '123456',
|
||||
pwd: 'crmeb.com',
|
||||
key: '',
|
||||
code: ''
|
||||
},
|
||||
|
||||
@@ -95,12 +95,12 @@
|
||||
min-width="400"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.productList.length">
|
||||
<div v-if=" scope.row.productList && scope.row.productList.length">
|
||||
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.info.productInfo.image"
|
||||
:preview-src-list="imgList"
|
||||
:preview-src-list="[val.info.productInfo.image]"
|
||||
/>
|
||||
</div>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
|
||||
@@ -308,7 +308,6 @@
|
||||
isCreate: 1,
|
||||
editData: null,
|
||||
dialogVisible: false,
|
||||
imgList: [],
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
@@ -508,11 +507,6 @@
|
||||
this.tableData.data = res.list.list || []
|
||||
this.tableData.total = res.list.total
|
||||
this.orderChartType = res.status
|
||||
this.tableData.data.map((item) => {
|
||||
item.productList.map((i) => {
|
||||
this.imgList.push(i.info.productInfo.image)
|
||||
})
|
||||
})
|
||||
const stat = res.top
|
||||
this.cardLists = [
|
||||
{ name: '订单数量', count: stat.count },
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
},
|
||||
// 物流公司列表
|
||||
getList () {
|
||||
expressList({ page: 1, limit: 999, isShow:true }).then(async res => {
|
||||
expressList({ page: 1, limit: 999, isShow:1 }).then(async res => {
|
||||
this.express = res.list
|
||||
})
|
||||
},
|
||||
|
||||
@@ -237,12 +237,12 @@
|
||||
<template v-if="formValidate.isSub">
|
||||
<el-table-column align="center" label="一级返佣(元)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
|
||||
<el-input v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="二级返佣(元)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
|
||||
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
@@ -276,12 +276,12 @@
|
||||
<template v-if="formValidate.isSub">
|
||||
<el-table-column align="center" label="一级返佣(元)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
|
||||
<el-input v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="二级返佣(元)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
|
||||
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
@@ -315,12 +315,12 @@
|
||||
<template v-if="formValidate.isSub">
|
||||
<el-table-column align="center" label="一级返佣(元)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.extension_one" type="number" :min="0" class="priceBox" />
|
||||
<el-input v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="二级返佣(元)" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.extension_two" type="number" :min="0" class="priceBox" />
|
||||
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
@@ -735,23 +735,23 @@
|
||||
onChangetype(item) {
|
||||
if (item === 1) {
|
||||
this.OneattrValue.map(item => {
|
||||
this.$set(item, 'extension_one', null)
|
||||
this.$set(item, 'extension_two', null)
|
||||
this.$set(item, 'brokerage', null)
|
||||
this.$set(item, 'brokerageTwo', null)
|
||||
})
|
||||
this.ManyAttrValue.map(item => {
|
||||
this.$set(item, 'extension_one', null)
|
||||
this.$set(item, 'extension_two', null)
|
||||
this.$set(item, 'brokerage', null)
|
||||
this.$set(item, 'brokerageTwo', null)
|
||||
})
|
||||
} else {
|
||||
this.OneattrValue.map(item => {
|
||||
delete item.extension_one
|
||||
delete item.extension_two
|
||||
this.$set(item, 'extension_one', null)
|
||||
this.$set(item, 'extension_two', null)
|
||||
delete item.brokerage
|
||||
delete item.brokerageTwo
|
||||
this.$set(item, 'brokerage', null)
|
||||
this.$set(item, 'brokerageTwo', null)
|
||||
})
|
||||
this.ManyAttrValue.map(item => {
|
||||
delete item.extension_one
|
||||
delete item.extension_two
|
||||
delete item.brokerage
|
||||
delete item.brokerageTwo
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -772,8 +772,8 @@
|
||||
this.$set(val, 'barCode', this.oneFormBatch[0].barCode)
|
||||
this.$set(val, 'weight', this.oneFormBatch[0].weight)
|
||||
this.$set(val, 'volume', this.oneFormBatch[0].volume)
|
||||
this.$set(val, 'extension_one', this.oneFormBatch[0].extension_one)
|
||||
this.$set(val, 'extension_two', this.oneFormBatch[0].extension_two)
|
||||
this.$set(val, 'brokerage', this.oneFormBatch[0].brokerage)
|
||||
this.$set(val, 'brokerageTwo', this.oneFormBatch[0].brokerageTwo)
|
||||
}
|
||||
},
|
||||
// 添加按钮
|
||||
|
||||
Reference in New Issue
Block a user