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