Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_wechat
Commits
eebca2b1
Commit
eebca2b1
authored
Nov 24, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
ae38097f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
7 deletions
+39
-7
order.vue
pages/order/order.vue
+5
-2
orderRecord.vue
pages/orderRecord/orderRecord.vue
+9
-3
orderResult.vue
pages/orderResult/orderResult.vue
+25
-2
No files found.
pages/order/order.vue
View file @
eebca2b1
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<text
class=
"tips"
><text
class=
"text-bold"
>
预定须知:
</text>
预定成功后,请按预约时间及时到店消费,若无法及时到店消费,可提前取消订单
</text>
<text
class=
"tips"
><text
class=
"text-bold"
>
预定须知:
</text>
预定成功后,请按预约时间及时到店消费,若无法及时到店消费,可提前取消订单
</text>
</view>
</view>
<view
class=
"part-right"
>
<view
class=
"part-right"
>
<text
class=
"text-title text-xl text-bold"
>
{{
roomInfo
.
name
||
'一帆风顺'
}}
</text>
<text
class=
"text-title text-xl text-bold"
>
{{
roomInfo
.
name
||
'一帆风顺'
}}
{{
roomInfo
.
roomType
?
'【'
+
roomTypeEnum
[
roomInfo
.
roomType
]
+
'】'
:
''
}}
</text>
<view
class=
"status-icon-box"
>
<view
class=
"status-icon-box"
>
<view
class=
"status-box"
:class=
"'status-box-'+roomInfo.status"
>
<view
class=
"status-box"
:class=
"'status-box-'+roomInfo.status"
>
<text>
{{
roomStatusEnum
[
roomInfo
.
status
]
}}
</text>
<text>
{{
roomStatusEnum
[
roomInfo
.
status
]
}}
</text>
...
@@ -438,7 +438,8 @@
...
@@ -438,7 +438,8 @@
},
},
dateObj
:
{},
dateObj
:
{},
preOrderNo
:
''
,
preOrderNo
:
''
,
roomStatusEnum
:{}
roomStatusEnum
:{},
roomTypeEnum
:{}
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -465,11 +466,13 @@
...
@@ -465,11 +466,13 @@
if
(
uni
.
getStorageSync
(
'dicts'
))
{
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
}
else
{
}
else
{
dictList
().
then
(
res
=>
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
this
.
roomStatusEnum
=
getDictItem
(
dicts
,
"store_room_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
})
})
}
}
},
},
...
...
pages/orderRecord/orderRecord.vue
View file @
eebca2b1
...
@@ -21,11 +21,11 @@
...
@@ -21,11 +21,11 @@
<view
class=
"flex-row room-image-box"
>
<view
class=
"flex-row room-image-box"
>
<view
class=
"img-box"
>
<view
class=
"img-box"
>
<image
:src=
"item.roomImages[0]"
mode=
"heightFix"
></image>
<image
:src=
"
hostUrl+
item.roomImages[0]"
mode=
"heightFix"
></image>
</view>
</view>
<view
class=
"flex-col"
>
<view
class=
"flex-col"
>
<view
class=
"flex-1 flex-col part-top"
>
<view
class=
"flex-1 flex-col part-top"
>
<text
class=
"text-title text-xl text-bold"
>
{{
item
.
roomName
}}
</text>
<text
class=
"text-title text-xl text-bold"
>
{{
item
.
roomName
}}
{{
item
.
roomType
?
'【'
+
roomTypeEnum
[
item
.
roomType
]
+
'】'
:
''
}}
</text>
<text
class=
"text-black margin-top"
>
预约时长:
{{
Number
(
item
.
timeLong
)
}}
小时
</text>
<text
class=
"text-black margin-top"
>
预约时长:
{{
Number
(
item
.
timeLong
)
}}
小时
</text>
</view>
</view>
<view
class=
"flex-1 flex-row part-bottom"
>
<view
class=
"flex-1 flex-row part-bottom"
>
...
@@ -109,7 +109,9 @@
...
@@ -109,7 +109,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
config
from
"@/config/index.config"
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
{
dictList
}
from
"@/api/index.js"
;
import
{
import
{
orderList
orderList
}
from
"@/api/order.js"
}
from
"@/api/order.js"
...
@@ -125,6 +127,7 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -125,6 +127,7 @@ import NoLogin from "@/components/noLogin/noLogin"
},
},
data
()
{
data
()
{
return
{
return
{
hostUrl
:
config
.
hostUrl
,
status
:
'nomore '
,
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
loadmoreText
:
'上划加载'
,
...
@@ -158,7 +161,8 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -158,7 +161,8 @@ import NoLogin from "@/components/noLogin/noLogin"
pageSize
:
10
pageSize
:
10
},
},
loginStatus
:
true
,
loginStatus
:
true
,
orderStatusEnum
:{}
orderStatusEnum
:{},
roomTypeEnum
:{}
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -180,12 +184,14 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -180,12 +184,14 @@ import NoLogin from "@/components/noLogin/noLogin"
if
(
uni
.
getStorageSync
(
'dicts'
))
{
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
onLoading
()
this
.
onLoading
()
}
else
{
}
else
{
dictList
().
then
(
res
=>
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
onLoading
()
this
.
onLoading
()
})
})
}
}
...
...
pages/orderResult/orderResult.vue
View file @
eebca2b1
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<view
class=
"flex-1 flex-col"
>
<view
class=
"flex-1 flex-col"
>
<view
class=
"info"
>
<view
class=
"info"
>
<text
class=
"text-title text-bold"
>
预约包间:
</text>
<text
class=
"text-title text-bold"
>
预约包间:
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
roomName
}}
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
roomName
}}
{{
orderInfo
.
roomType
?
'【'
+
roomTypeEnum
[
orderInfo
.
roomType
]
+
'】'
:
''
}}
</text>
</view>
</view>
<view
class=
"info"
>
<view
class=
"info"
>
<text
class=
"text-title text-bold"
>
下单时间:
</text>
<text
class=
"text-title text-bold"
>
下单时间:
</text>
...
@@ -113,6 +113,9 @@
...
@@ -113,6 +113,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDictItem
}
from
"@/utils/tools.js"
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
{
getOrderInfoByNo
,
orderRefund
}
from
"@/api/order.js"
import
{
getOrderInfoByNo
,
orderRefund
}
from
"@/api/order.js"
import
moment
from
"@/common/moment_zh_cn.js"
;
import
moment
from
"@/common/moment_zh_cn.js"
;
...
@@ -128,15 +131,35 @@
...
@@ -128,15 +131,35 @@
orderNo
:
''
,
orderNo
:
''
,
orderInfo
:{},
orderInfo
:{},
assetsPath
:
config
.
assetsPath
,
assetsPath
:
config
.
assetsPath
,
hostUrl
:
config
.
hostUrl
hostUrl
:
config
.
hostUrl
,
orderStatusEnum
:{},
roomTypeEnum
:{}
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
orderNo
=
option
.
orderNo
;
this
.
orderNo
=
option
.
orderNo
;
this
.
onGetDicts
()
this
.
onLoading
();
this
.
onLoading
();
this
.
onMessagePush
()
this
.
onMessagePush
()
},
},
methods
:{
methods
:{
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
}
else
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
})
}
},
onLoading
(){
onLoading
(){
getOrderInfoByNo
(
this
.
orderNo
).
then
(
res
=>
{
getOrderInfoByNo
(
this
.
orderNo
).
then
(
res
=>
{
this
.
orderInfo
=
{
this
.
orderInfo
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment