Commit 8ba78f0e authored by 罗超's avatar 罗超

修改订单列表

parent 39e00b69
...@@ -183,7 +183,8 @@ module.exports = function( /* ctx */ ) { ...@@ -183,7 +183,8 @@ module.exports = function( /* ctx */ ) {
plugins: [ plugins: [
"Meta", "Meta",
"Notify", "Notify",
'Loading' 'Loading',
'Dialog'
] ]
}, },
......
...@@ -26,7 +26,7 @@ Vue.prototype.domainManager = function() { ...@@ -26,7 +26,7 @@ Vue.prototype.domainManager = function() {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
} else if (domainNameUrl.indexOf('oytour') !== -1) { } else if (domainNameUrl.indexOf('oytour') !== -1) {
// domainUrl = "http://reborn.oytour.com"; // domainUrl = "http://reborn.oytour.com";
domainUrl = 'http://192.168.10.11:8083' //'http://192.168.10.206:8015' ''http://192.168.10.11:8083' ' domainUrl = 'http://192.168.10.206:8015' //'http://192.168.10.206:8015' ''http://192.168.10.11:8083' '
} }
var obj = { var obj = {
//主地址 //主地址
......
<style>
.q-ml-lg .block {
margin-right: 12px;
}
</style>
<style scoped> <style scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
......
<style>
.q-ml-lg .block {
margin-right: 12px;
}
</style>
<style scoped> <style scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
......
This diff is collapsed.
...@@ -2,7 +2,6 @@ const EnumHelper = { ...@@ -2,7 +2,6 @@ const EnumHelper = {
ParseToEnum(TEnum, value, comparison = '') { ParseToEnum(TEnum, value, comparison = '') {
if (Object.isFrozen) { if (Object.isFrozen) {
let t = Object.values(TEnum) let t = Object.values(TEnum)
console.log(t, Symbol(1) == 1)
let r = t.find(x => (comparison != '' && x[comparison] == value) || (comparison == '' && x == value)) let r = t.find(x => (comparison != '' && x[comparison] == value) || (comparison == '' && x == value))
return r return r
} else { } else {
......
...@@ -2,23 +2,33 @@ const ListProductTypeEnum = Object.freeze({ ...@@ -2,23 +2,33 @@ const ListProductTypeEnum = Object.freeze({
TRIP: { TRIP: {
value: 1, value: 1,
desc: '線路旅遊' desc: '線路旅遊',
bgColor: 'bg-pink-2',
color: 'text-pink'
}, },
SCENIC: { SCENIC: {
value: 2, value: 2,
desc: '景點門票' desc: '景點門票',
bgColor: 'bg-purple-2',
color: 'text-purple'
}, },
HOTEL: { HOTEL: {
value: 3, value: 3,
desc: '酒店住宿' desc: '酒店住宿',
bgColor: 'bg-indigo-2',
color: 'text-indigo'
}, },
CAR: { CAR: {
value: 4, value: 4,
desc: '目的地用車' desc: '目的地用車',
bgColor: 'bg-teal-2',
color: 'text-teal'
}, },
JALAN: { JALAN: {
value: 5, value: 5,
desc: '酒店住宿' desc: '酒店住宿',
bgColor: 'bg-indigo-2',
color: 'text-indigo'
}, },
}) })
......
const OrderStatusEnum = Object.freeze({
UN_PAY: {
value: 1,
desc: '待付款',
icon: 'iconfont icontime1',
color: 'text-orange'
},
PAYED: {
value: 2,
desc: '待出行',
icon: 'iconfont iconflag',
color: 'text-green'
},
FINISH: {
value: 3,
desc: '已完成',
icon: 'iconfont iconsuccess',
color: 'text-dark'
},
CANCEL: {
value: 4,
desc: '已取消',
icon: 'iconfont iconminus',
color: 'text-grey-6'
}
})
export default OrderStatusEnum
\ No newline at end of file
import EnumHelper from "./enumhelper"
import ListProductTypeEnum from "./listProductType"
const ProductTypeEnum = Object.freeze({ const ProductTypeEnum = Object.freeze({
/** /**
* 一日游 * 一日游
...@@ -112,4 +115,29 @@ const ProductTypeEnum = Object.freeze({ ...@@ -112,4 +115,29 @@ const ProductTypeEnum = Object.freeze({
}) })
const mappingRules = [
[-1],
[1, 2, 3],
[4, 5, 6, 7],
[-1],
[12, 13, 14],
[8, 9, 10, 11]
]
const mappingListType = (value) => {
let val = mappingRules.findIndex(x => {
return x.indexOf(value) != -1
})
if (val && val > 0) {
return EnumHelper.ParseToEnum(ListProductTypeEnum, val, 'value')
}
return {}
}
const transProductEnum = (value) => {
return mappingRules[value]
}
export default ProductTypeEnum export default ProductTypeEnum
export { mappingListType, transProductEnum }
\ No newline at end of file
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