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
65ab7ebc
Commit
65ab7ebc
authored
Jan 13, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
704f6e29
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
127 additions
and
20 deletions
+127
-20
order.js
api/order.js
+13
-1
index.vue
pages/couponList/index.vue
+4
-3
index.vue
pages/index/index.vue
+0
-1
myInfo.vue
pages/my/myInfo.vue
+1
-1
order.vue
pages/order/order.vue
+57
-5
orderRecord.vue
pages/orderRecord/orderRecord.vue
+9
-3
orderResult.vue
pages/orderResult/orderResult.vue
+33
-2
index.vue
pages/payRecord/index.vue
+8
-2
storeList.vue
pages/storeList/storeList.vue
+2
-2
No files found.
api/order.js
View file @
65ab7ebc
...
@@ -31,7 +31,7 @@ export const computePrice=(data)=>{
...
@@ -31,7 +31,7 @@ export const computePrice=(data)=>{
return
http
.
post
(
url
,
data
)
return
http
.
post
(
url
,
data
)
}
}
// 需要授权
export
const
openDoor
=
(
orderNo
)
=>
{
export
const
openDoor
=
(
orderNo
)
=>
{
let
url
=
`/order/open/door?orderNo=
${
orderNo
}
`
let
url
=
`/order/open/door?orderNo=
${
orderNo
}
`
return
http
.
get
(
url
)
return
http
.
get
(
url
)
...
@@ -52,3 +52,14 @@ export const recordsList=(data,)=>{
...
@@ -52,3 +52,14 @@ export const recordsList=(data,)=>{
let
url
=
`/records/list`
let
url
=
`/records/list`
return
http
.
get
(
url
,
data
)
return
http
.
get
(
url
,
data
)
}
}
// 不需要授权
export
const
noLoginOpenDoor
=
(
orderNo
)
=>
{
let
url
=
`/openInterface/open/door?orderNo=
${
orderNo
}
`
return
http
.
get
(
url
)
}
export
const
noLoginGetOrderInfo
=
(
id
)
=>
{
let
url
=
`/openInterface/order/info/`
+
id
return
http
.
get
(
url
)
}
\ No newline at end of file
pages/couponList/index.vue
View file @
65ab7ebc
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<!-- 列表数量为0时 -->
<!-- 列表数量为0时 -->
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"
6
0"
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"
12
0"
:icon=
"
storeL
istBlankImage"
>
:icon=
"
l
istBlankImage"
>
</u-empty>
</u-empty>
</view>
</view>
<!-- 当数据没有更多时 -->
<!-- 当数据没有更多时 -->
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
status
:
'nomore '
,
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'已展示全部
门店
'
,
nomoreText
:
'已展示全部'
,
scrollTop
:
0
,
scrollTop
:
0
,
current
:
''
,
current
:
''
,
hostUrl
:
indexConfig
.
hostUrl
,
hostUrl
:
indexConfig
.
hostUrl
,
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
eventChannel
:
null
,
eventChannel
:
null
,
tipText
:
""
,
tipText
:
""
,
show
:
false
,
show
:
false
,
listBlankImage
:
indexConfig
.
assetsPath
+
'/no_data_icon.png'
,
};
};
},
},
components
:
{
components
:
{
...
...
pages/index/index.vue
View file @
65ab7ebc
...
@@ -319,7 +319,6 @@
...
@@ -319,7 +319,6 @@
},
},
onGetSortDistance
(
i
=
0
){
onGetSortDistance
(
i
=
0
){
if
(
i
>=
this
.
roomVoList
.
length
){
if
(
i
>=
this
.
roomVoList
.
length
){
console
.
log
(
this
.
roomVoList
,
909090
)
// this.$forceUpdate();
// this.$forceUpdate();
return
return
}
}
...
...
pages/my/myInfo.vue
View file @
65ab7ebc
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<text
class=
"text-title"
>
联系我们
</text>
<text
class=
"text-title"
>
联系我们
</text>
</view>
</view>
</view>
</view>
<view
class=
"cu-item arrow"
@
tap=
"onHandle(5)"
>
<view
v-if=
"userInfo.roleType >= 2"
class=
"cu-item arrow"
@
tap=
"onHandle(5)"
>
<view
class=
"content"
>
<view
class=
"content"
>
<image
:src=
"assetsPath+'/my_list_4.png'"
class=
"png"
mode=
"aspectFit"
></image>
<image
:src=
"assetsPath+'/my_list_4.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-title"
>
设备控制
</text>
<text
class=
"text-title"
>
设备控制
</text>
...
...
pages/order/order.vue
View file @
65ab7ebc
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</view>
</view>
</view>
</view>
<view
class=
"part-left"
>
<view
class=
"part-left"
>
<image
:src=
"roomInfo.images.length?roomInfo.images[0]: assetsPath+'/b
lank2
.jpg'"
mode=
"widthFix"
>
<image
:src=
"roomInfo.images.length?roomInfo.images[0]: assetsPath+'/b
anner
.jpg'"
mode=
"widthFix"
>
</image>
</image>
</view>
</view>
</view>
</view>
...
@@ -319,6 +319,22 @@
...
@@ -319,6 +319,22 @@
></uni-popup-dialog>
></uni-popup-dialog>
</uni-popup>
</uni-popup>
<uni-popup
ref=
"popupMessage"
type=
"center"
>
<view
class=
"flex-col message-box"
>
<view
class=
"header"
>
<text>
提示
</text>
</view>
<view
class=
"content"
>
<text>
您选的预定时间已有被占用,请选择其他空闲时段
</text>
</view>
<view
class=
"button-box"
>
<text>
好的
</text>
</view>
</view>
</uni-popup>
</view>
</view>
</
template
>
</
template
>
...
@@ -480,6 +496,7 @@
...
@@ -480,6 +496,7 @@
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
// this.$refs.popupMessage.open();
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中"
title
:
"加载中"
})
})
...
@@ -693,6 +710,7 @@
...
@@ -693,6 +710,7 @@
}
}
if
(
index
>=
this
.
dateIntervalList
.
length
-
1
){
if
(
index
>=
this
.
dateIntervalList
.
length
-
1
){
if
(
!
this
.
addM
&&
this
.
dateIntervalList
[
0
].
status
){
if
(
!
this
.
addM
&&
this
.
dateIntervalList
[
0
].
status
){
console
.
log
(
this
.
startTime
,
909090
)
this
.
addM
=
true
this
.
addM
=
true
// 开始时间加一分钟
// 开始时间加一分钟
let
arr
=
this
.
startTime
.
split
(
":"
);
let
arr
=
this
.
startTime
.
split
(
":"
);
...
@@ -867,7 +885,7 @@
...
@@ -867,7 +885,7 @@
}
else
{
}
else
{
that
.
selectCouponIndex
=
-
1
that
.
selectCouponIndex
=
-
1
}
}
that
.
onComputePrice
();
}
}
},
},
success
(
res
)
{
success
(
res
)
{
...
@@ -1259,9 +1277,9 @@
...
@@ -1259,9 +1277,9 @@
title
:
res
.
data
.
msg
||
"下单失败"
,
title
:
res
.
data
.
msg
||
"下单失败"
,
duration
:
2000
,
duration
:
2000
,
success
:
()
=>
{
success
:
()
=>
{
setTimeout
(()
=>
{
//
setTimeout(()=>{
this
.
onGetSortDistance
()
//
this.onGetSortDistance()
},
2000
)
//
},2000)
}
}
})
})
}
}
...
@@ -2050,4 +2068,37 @@
...
@@ -2050,4 +2068,37 @@
}
}
}
}
}
}
.message-box
{
display
:
flex
;
width
:
80%
;
background-color
:
#ffffff
;
border-radius
:
12
upx
;
overflow
:
hidden
;
margin
:
0
auto
;
.header{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
height
:
90
upx
;
border-bottom
:
1px
solid
#e5e5e5
;
}
.content
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
240
upx
;
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
0
30
upx
;
}
.button-box
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
90
upx
;
text{
color
:
#55aaff
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/orderRecord/orderRecord.vue
View file @
65ab7ebc
...
@@ -102,7 +102,13 @@
...
@@ -102,7 +102,13 @@
</view>
</view>
</view>
</view>
</view>
</view>
<u-empty
v-if=
"loginStatus && list.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<view
v-if=
"loginStatus && list.length == 0"
class=
"empty-box"
>
<u-empty
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
<view
v-if=
"loginStatus && list.length"
style=
"padding: 12px 6% 0;"
>
<view
v-if=
"loginStatus && list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
...
@@ -172,7 +178,8 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -172,7 +178,8 @@ import NoLogin from "@/components/noLogin/noLogin"
2
:
'退款中'
,
2
:
'退款中'
,
3
:
'已退款'
,
3
:
'已退款'
,
4
:
'拒绝退款'
4
:
'拒绝退款'
}
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -203,7 +210,6 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -203,7 +210,6 @@ import NoLogin from "@/components/noLogin/noLogin"
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
refundStatusEnum
=
getDictItem
(
dicts
,
"order_refund_status"
);
this
.
refundStatusEnum
=
getDictItem
(
dicts
,
"order_refund_status"
);
this
.
onLoading
()
this
.
onLoading
()
})
})
}
}
...
...
pages/orderResult/orderResult.vue
View file @
65ab7ebc
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
<
script
>
<
script
>
import
{
getDictItem
}
from
"@/utils/tools.js"
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
,
openDoor
}
from
"@/api/order.js"
import
{
getOrderInfoByNo
,
orderRefund
,
openDoor
,
noLoginOpenDoor
,
noLoginGetOrderInfo
}
from
"@/api/order.js"
import
moment
from
"@/common/moment_zh_cn.js"
;
import
moment
from
"@/common/moment_zh_cn.js"
;
import
config
from
"@/config/index.config"
import
config
from
"@/config/index.config"
import
{
listSortDistance
}
from
"@/api/store.js"
;
import
{
listSortDistance
}
from
"@/api/store.js"
;
...
@@ -167,11 +167,13 @@
...
@@ -167,11 +167,13 @@
this
.
orderNo
=
option
.
orderNo
;
this
.
orderNo
=
option
.
orderNo
;
if
(
option
.
share
&&
option
.
share
==
"share"
){
if
(
option
.
share
&&
option
.
share
==
"share"
){
this
.
shareOrder
=
true
this
.
shareOrder
=
true
this
.
onGetOrderInfo
()
}
else
{
}
else
{
this
.
shareOrder
=
false
this
.
shareOrder
=
false
this
.
onLoading
();
}
}
this
.
onGetDicts
()
this
.
onGetDicts
()
this
.
onLoading
();
if
(
option
.
success
){
if
(
option
.
success
){
this
.
onMessagePush
()
this
.
onMessagePush
()
}
}
...
@@ -214,6 +216,19 @@
...
@@ -214,6 +216,19 @@
}
}
})
})
},
},
onGetOrderInfo
(){
noLoginGetOrderInfo
(
this
.
orderNo
).
then
(
res
=>
{
this
.
orderInfo
=
{
...
res
.
data
.
data
,
roomImages
:
res
.
data
.
data
.
roomImages
.
split
(
','
),
startDate
:
res
.
data
.
data
.
startDate
?
res
.
data
.
data
.
startDate
.
split
(
" "
)[
0
]
:
res
.
data
.
data
.
preStartDate
.
split
(
" "
)[
0
],
startTime
:
res
.
data
.
data
.
startDate
?
res
.
data
.
data
.
startDate
.
split
(
" "
)[
1
]
:
res
.
data
.
data
.
preStartDate
.
split
(
" "
)[
1
],
endDate
:
res
.
data
.
data
.
endDate
?
res
.
data
.
data
.
endDate
.
split
(
" "
)[
0
]
:
res
.
data
.
data
.
preEndDate
.
split
(
" "
)[
0
],
endTime
:
res
.
data
.
data
.
endDate
?
res
.
data
.
data
.
endDate
.
split
(
" "
)[
1
]
:
res
.
data
.
data
.
preEndDate
.
split
(
" "
)[
1
],
payTime
:
res
.
data
.
data
.
payTime
?
moment
(
res
.
data
.
data
.
payTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
:
''
}
})
},
onNavToShare
(){
onNavToShare
(){
// uni.navigateTo({
// uni.navigateTo({
// url:"/pages/share/share?orderNo="+this.orderNo
// url:"/pages/share/share?orderNo="+this.orderNo
...
@@ -236,6 +251,21 @@
...
@@ -236,6 +251,21 @@
title
:
"开门中..."
title
:
"开门中..."
})
})
this
.
openDoorStatus
=
true
;
this
.
openDoorStatus
=
true
;
if
(
this
.
shareOrder
){
noLoginOpenDoor
(
this
.
orderNo
).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
"none"
,
title
:
res
.
data
.
msg
})
if
(
res
.
data
.
code
==
200
){
this
.
onLoading
();
}
setTimeout
(()
=>
{
this
.
openDoorStatus
=
false
;
},
5000
)
})
}
else
{
openDoor
(
this
.
orderNo
).
then
(
res
=>
{
openDoor
(
this
.
orderNo
).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
...
@@ -250,6 +280,7 @@
...
@@ -250,6 +280,7 @@
},
5000
)
},
5000
)
})
})
}
}
}
},
},
onNavToMap
()
{
onNavToMap
()
{
uni
.
openLocation
({
uni
.
openLocation
({
...
...
pages/payRecord/index.vue
View file @
65ab7ebc
...
@@ -19,7 +19,11 @@
...
@@ -19,7 +19,11 @@
</view>
</view>
</view>
</view>
</view>
</view>
<u-empty
v-if=
"loginStatus && list.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<view
v-if=
"loginStatus && list.length == 0"
class=
"empty-box"
>
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
<view
v-if=
"loginStatus && list.length"
style=
"padding: 12px 6% 0;"
>
<view
v-if=
"loginStatus && list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
...
@@ -29,6 +33,7 @@
...
@@ -29,6 +33,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
config
from
"@/config/index.config"
import
{
import
{
recordsList
recordsList
}
from
"@/api/order.js"
}
from
"@/api/order.js"
...
@@ -84,7 +89,8 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -84,7 +89,8 @@ import NoLogin from "@/components/noLogin/noLogin"
payStatus
:{
payStatus
:{
expenditure
:
'-'
,
expenditure
:
'-'
,
income
:
'+'
income
:
'+'
}
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
};
},
},
onLoad
()
{
onLoad
()
{
...
...
pages/storeList/storeList.vue
View file @
65ab7ebc
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</view>
</view>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<!-- 列表数量为0时 -->
<!-- 列表数量为0时 -->
<u-empty
text=
"暂无门店数据"
textColor=
'#C1C1C1'
width=
"
6
0"
<u-empty
text=
"暂无门店数据"
textColor=
'#C1C1C1'
width=
"
12
0"
:icon=
"storeListBlankImage"
>
:icon=
"storeListBlankImage"
>
</u-empty>
</u-empty>
</view>
</view>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
show
:
true
,
show
:
true
,
timer
:
null
,
timer
:
null
,
storeTypeEnum
:{},
storeTypeEnum
:{},
storeListBlankImage
:
config
.
assetsPath
+
'/
store_blank
.png'
,
storeListBlankImage
:
config
.
assetsPath
+
'/
no_data_icon
.png'
,
};
};
},
},
onLoad
()
{
onLoad
()
{
...
...
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