Commit a1cc0c9f by 陈宁

# fix bug

parent 140b96c9
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9,30 +9,30 @@ ...@@ -9,30 +9,30 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.19.2",
"core-js": "^3.6.4", "core-js": "^3.6.5",
"lodash": "^4.17.15", "lodash": "^4.17.19",
"moment": "^2.27.0", "moment": "^2.27.0",
"view-design": "^4.1.2", "view-design": "^4.3.2",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-codemirror": "^4.0.6", "vue-codemirror": "^4.0.6",
"vue-router": "^3.1.5" "vue-router": "^3.4.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "~4.2.0", "@vue/cli-plugin-babel": "^4.2.3",
"@vue/cli-plugin-eslint": "~4.2.0", "@vue/cli-plugin-eslint": "^4.2.3",
"@vue/cli-plugin-router": "~4.2.0", "@vue/cli-plugin-router": "^4.2.3",
"@vue/cli-service": "~4.2.0", "@vue/cli-service": "^4.2.3",
"@vue/eslint-config-standard": "^5.1.0", "@vue/eslint-config-standard": "^5.1.0",
"babel-eslint": "^10.0.3", "babel-eslint": "^10.1.0",
"css": "^2.2.4", "css": "^2.2.4",
"css-loader": "^3.4.2", "css-loader": "^3.6.0",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.1", "eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.0.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0", "eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2", "eslint-plugin-vue": "^6.2.2",
"less": "^3.11.1", "less": "^3.12.2",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
} }
......
...@@ -9,7 +9,7 @@ import _ from 'lodash' ...@@ -9,7 +9,7 @@ import _ from 'lodash'
import moment from 'moment' import moment from 'moment'
// dev // dev
axios.defaults.baseURL = 'http://129.211.139.23:8018/api' axios.defaults.baseURL = 'http://129.211.139.23:8010/api'
// prod // prod
// axios.defaults.baseURL = '/api' // axios.defaults.baseURL = '/api'
axios.interceptors.request.use(config => { axios.interceptors.request.use(config => {
......
...@@ -243,28 +243,29 @@ export default { ...@@ -243,28 +243,29 @@ export default {
}) })
const products = [] const products = []
const responseProducts = JSON.parse(data[1].responseContent) if (data[1].responseContent) {
responseProducts.data.products.forEach(p => { const responseProducts = JSON.parse(data[1].responseContent)
const data = [ responseProducts.data.products.forEach(p => {
{ name: '编号', field: 'pid', val: p.pid }, const data = [
{ name: '名称', field: 'name', val: p.name }, { name: '编号', field: 'pid', val: p.pid },
{ name: 'customerCode', field: 'customerCode', val: p.customerCode }, { name: '名称', field: 'name', val: p.name },
{ name: '业务类型', field: 'businessType', val: p.businessType }, { name: 'customerCode', field: 'customerCode', val: p.customerCode },
{ name: '价格', field: 'finalPrice', val: p.finalPrice }, { name: '业务类型', field: 'businessType', val: p.businessType },
{ name: '外带价格', field: 'finalPriceTakeout', val: p.finalPriceTakeout }, { name: '价格', field: 'finalPrice', val: p.finalPrice },
{ name: '原价', field: 'originalPrice', val: p.originalPrice }, { name: '外带价格', field: 'finalPriceTakeout', val: p.finalPriceTakeout },
{ name: '外带原价', field: 'originalPriceTakeout', val: p.originalPriceTakeout }, { name: '原价', field: 'originalPrice', val: p.originalPrice },
{ name: '状态', field: 'status', val: p.status }, { name: '外带原价', field: 'originalPriceTakeout', val: p.originalPriceTakeout },
{ name: '菜品类型', field: 'type', val: p.type } { name: '状态', field: 'status', val: p.status },
] { name: '菜品类型', field: 'type', val: p.type }
]
data.forEach(d => {
d.descriptor = this.buildProductDescriptor(d.field, d.val)
})
products.push({ id: p.pid, name: p.name, data: data }) data.forEach(d => {
}) d.descriptor = this.buildProductDescriptor(d.field, d.val)
})
products.push({ id: p.pid, name: p.name, data: data })
})
}
// 组装数据 // 组装数据
const vdata = [] const vdata = []
coupons.forEach(coup => { coupons.forEach(coup => {
......
...@@ -348,7 +348,6 @@ export default { ...@@ -348,7 +348,6 @@ export default {
vdata.push(this.setVData(20, '麦钱包券', archCards, coupons, products)) vdata.push(this.setVData(20, '麦钱包券', archCards, coupons, products))
vdata.push(this.setVData(30, '商家券', vendorCards, coupons, products)) vdata.push(this.setVData(30, '商家券', vendorCards, coupons, products))
this.vData = vdata this.vData = vdata
console.info(this.vData)
}, },
setVData (type, name, cards, coupons, products) { setVData (type, name, cards, coupons, products) {
const data = [] const data = []
...@@ -368,7 +367,6 @@ export default { ...@@ -368,7 +367,6 @@ export default {
const coupons = [] const coupons = []
if (content) { if (content) {
const responseCoupon = JSON.parse(content) const responseCoupon = JSON.parse(content)
// console.info(responseCoupon)
responseCoupon.couponlist.forEach(c => { responseCoupon.couponlist.forEach(c => {
if (c.statusCode === 100 && c.codeInfo != null) { if (c.statusCode === 100 && c.codeInfo != null) {
const data = [ const data = [
......
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