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
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
32 deletions
+139
-32
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
+45
-14
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)=>{
return
http
.
post
(
url
,
data
)
}
// 需要授权
export
const
openDoor
=
(
orderNo
)
=>
{
let
url
=
`/order/open/door?orderNo=
${
orderNo
}
`
return
http
.
get
(
url
)
...
...
@@ -51,4 +51,15 @@ export const orderRefund=(data)=>{
export
const
recordsList
=
(
data
,)
=>
{
let
url
=
`/records/list`
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 @@
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<!-- 列表数量为0时 -->
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"
6
0"
:icon=
"
storeL
istBlankImage"
>
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"
12
0"
:icon=
"
l
istBlankImage"
>
</u-empty>
</view>
<!-- 当数据没有更多时 -->
...
...
@@ -62,7 +62,7 @@
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'已展示全部
门店
'
,
nomoreText
:
'已展示全部'
,
scrollTop
:
0
,
current
:
''
,
hostUrl
:
indexConfig
.
hostUrl
,
...
...
@@ -79,6 +79,7 @@
eventChannel
:
null
,
tipText
:
""
,
show
:
false
,
listBlankImage
:
indexConfig
.
assetsPath
+
'/no_data_icon.png'
,
};
},
components
:
{
...
...
pages/index/index.vue
View file @
65ab7ebc
...
...
@@ -319,7 +319,6 @@
},
onGetSortDistance
(
i
=
0
){
if
(
i
>=
this
.
roomVoList
.
length
){
console
.
log
(
this
.
roomVoList
,
909090
)
// this.$forceUpdate();
return
}
...
...
pages/my/myInfo.vue
View file @
65ab7ebc
...
...
@@ -82,7 +82,7 @@
<text
class=
"text-title"
>
联系我们
</text>
</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"
>
<image
:src=
"assetsPath+'/my_list_4.png'"
class=
"png"
mode=
"aspectFit"
></image>
<text
class=
"text-title"
>
设备控制
</text>
...
...
pages/order/order.vue
View file @
65ab7ebc
...
...
@@ -15,7 +15,7 @@
</view>
</view>
<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>
</view>
</view>
...
...
@@ -319,6 +319,22 @@
></uni-popup-dialog>
</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>
</
template
>
...
...
@@ -480,6 +496,7 @@
}
},
onLoad
(
option
)
{
// this.$refs.popupMessage.open();
uni
.
showLoading
({
title
:
"加载中"
})
...
...
@@ -693,6 +710,7 @@
}
if
(
index
>=
this
.
dateIntervalList
.
length
-
1
){
if
(
!
this
.
addM
&&
this
.
dateIntervalList
[
0
].
status
){
console
.
log
(
this
.
startTime
,
909090
)
this
.
addM
=
true
// 开始时间加一分钟
let
arr
=
this
.
startTime
.
split
(
":"
);
...
...
@@ -867,7 +885,7 @@
}
else
{
that
.
selectCouponIndex
=
-
1
}
that
.
onComputePrice
();
}
},
success
(
res
)
{
...
...
@@ -1259,9 +1277,9 @@
title
:
res
.
data
.
msg
||
"下单失败"
,
duration
:
2000
,
success
:
()
=>
{
setTimeout
(()
=>
{
this
.
onGetSortDistance
()
},
2000
)
//
setTimeout(()=>{
//
this.onGetSortDistance()
//
},2000)
}
})
}
...
...
@@ -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
>
\ No newline at end of file
pages/orderRecord/orderRecord.vue
View file @
65ab7ebc
...
...
@@ -102,7 +102,13 @@
</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;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
...
...
@@ -172,7 +178,8 @@ import NoLogin from "@/components/noLogin/noLogin"
2
:
'退款中'
,
3
:
'已退款'
,
4
:
'拒绝退款'
}
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
},
onLoad
()
{
...
...
@@ -203,7 +210,6 @@ import NoLogin from "@/components/noLogin/noLogin"
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
roomTypeEnum
=
getDictItem
(
dicts
,
"store_room_type"
);
this
.
refundStatusEnum
=
getDictItem
(
dicts
,
"order_refund_status"
);
this
.
onLoading
()
})
}
...
...
pages/orderResult/orderResult.vue
View file @
65ab7ebc
...
...
@@ -135,7 +135,7 @@
<
script
>
import
{
getDictItem
}
from
"@/utils/tools.js"
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
config
from
"@/config/index.config"
import
{
listSortDistance
}
from
"@/api/store.js"
;
...
...
@@ -167,11 +167,13 @@
this
.
orderNo
=
option
.
orderNo
;
if
(
option
.
share
&&
option
.
share
==
"share"
){
this
.
shareOrder
=
true
this
.
onGetOrderInfo
()
}
else
{
this
.
shareOrder
=
false
this
.
onLoading
();
}
this
.
onGetDicts
()
this
.
onLoading
();
if
(
option
.
success
){
this
.
onMessagePush
()
}
...
...
@@ -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
(){
// uni.navigateTo({
// url:"/pages/share/share?orderNo="+this.orderNo
...
...
@@ -236,19 +251,35 @@
title
:
"开门中..."
})
this
.
openDoorStatus
=
true
;
openDoor
(
this
.
orderNo
).
then
(
res
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
"none"
,
title
:
res
.
data
.
msg
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
)
})
if
(
res
.
data
.
code
==
200
){
this
.
onLoading
();
}
setTimeout
(()
=>
{
this
.
openDoorStatus
=
false
;
},
5000
)
})
}
else
{
openDoor
(
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
)
})
}
}
},
onNavToMap
()
{
...
...
pages/payRecord/index.vue
View file @
65ab7ebc
...
...
@@ -19,7 +19,11 @@
</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;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
...
...
@@ -29,6 +33,7 @@
</
template
>
<
script
>
import
config
from
"@/config/index.config"
import
{
recordsList
}
from
"@/api/order.js"
...
...
@@ -84,7 +89,8 @@ import NoLogin from "@/components/noLogin/noLogin"
payStatus
:{
expenditure
:
'-'
,
income
:
'+'
}
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
},
onLoad
()
{
...
...
pages/storeList/storeList.vue
View file @
65ab7ebc
...
...
@@ -28,7 +28,7 @@
</view>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<!-- 列表数量为0时 -->
<u-empty
text=
"暂无门店数据"
textColor=
'#C1C1C1'
width=
"
6
0"
<u-empty
text=
"暂无门店数据"
textColor=
'#C1C1C1'
width=
"
12
0"
:icon=
"storeListBlankImage"
>
</u-empty>
</view>
...
...
@@ -79,7 +79,7 @@
show
:
true
,
timer
:
null
,
storeTypeEnum
:{},
storeListBlankImage
:
config
.
assetsPath
+
'/
store_blank
.png'
,
storeListBlankImage
:
config
.
assetsPath
+
'/
no_data_icon
.png'
,
};
},
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