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
400b7ae5
Commit
400b7ae5
authored
Nov 15, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
0f670be8
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
251 additions
and
21 deletions
+251
-21
cleanRoom.js
api/cleanRoom.js
+7
-0
pages.json
pages.json
+8
-0
cleanManage.vue
pages/cleanManage/cleanManage.vue
+20
-7
cleanOrderInfo.vue
pages/cleanOrderInfo/cleanOrderInfo.vue
+1
-1
index.vue
pages/cleanRecord/index.vue
+200
-0
index.vue
pages/index/index.vue
+8
-4
orderRecord.vue
pages/orderRecord/orderRecord.vue
+4
-5
share.vue
pages/share/share.vue
+3
-4
cart.png
static/cart.png
+0
-0
No files found.
api/cleanRoom.js
View file @
400b7ae5
...
...
@@ -30,3 +30,9 @@ export const getStarOrder=()=>{
let
url
=
`/cleanRecords/getByCleanerId`
return
http
.
get
(
url
)
}
// 保洁订单
export
const
cleanList
=
(
data
)
=>
{
let
url
=
`/cleanRecords/myCleanList`
return
http
.
get
(
url
,
data
)
}
\ No newline at end of file
pages.json
View file @
400b7ae5
...
...
@@ -127,6 +127,14 @@
"navigationBarTitleText"
:
"验券说明"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/cleanRecord/index"
,
"style"
:
{
"navigationBarTitleText"
:
"保洁记录"
,
"enablePullDownRefresh"
:
false
}
}
],
...
...
pages/cleanManage/cleanManage.vue
View file @
400b7ae5
...
...
@@ -10,13 +10,13 @@
<view
class=
"icon-box"
>
<image
:src=
"assetsPath+'/clean_icon.png'"
mode=
"widthFix"
></image>
</view>
<text
class=
"text-
titl
e text-bold text-lg"
>
开始保洁
</text>
<text
class=
"text-
whit
e text-bold text-lg"
>
开始保洁
</text>
</view>
<view
class=
"item"
>
<view
class=
"item"
@
tap=
"onNavToList"
>
<view
class=
"icon-box"
>
<image
:src=
"assetsPath+'/order_icon.png'"
mode=
"widthFix"
></image>
</view>
<text
class=
"text-
titl
e text-bold text-lg"
>
保洁记录
</text>
<text
class=
"text-
whit
e text-bold text-lg"
>
保洁记录
</text>
</view>
</view>
</view>
...
...
@@ -94,10 +94,18 @@
onNavToInfo
(){
getStarOrder
().
then
(
res
=>
{
console
.
log
(
res
,
"查询保洁中的订单"
)
if
(
res
.
data
.
code
===
200
){
uni
.
navigateTo
({
url
:
"/pages/cleanOrderInfo/cleanOrderInfo?id="
+
res
.
data
.
data
})
// uni.navigateTo({
// url:"/pages/cleanOrderInfo/cleanOrderInfo"
// })
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
msg
})
}
})
},
onNavLocation
(
val
){
uni
.
openLocation
({
...
...
@@ -109,6 +117,11 @@
console
.
log
(
res
)
}
})
},
onNavToList
(){
uni
.
navigateTo
({
url
:
"/pages/cleanRecord/index"
})
}
}
}
...
...
@@ -144,7 +157,7 @@
align-items
:
center
;
width
:
23%
;
margin
:
10
upx
1%
30
upx
1%
;
b
order
:
1px
solid
rgba
(
255
,
72
,
255
,
0.45
);
b
ackground
:
rgba
(
255
,
72
,
255
,
0.45
);
border-radius
:
20
upx
;
padding
:
20
upx
0
;
.icon-box{
...
...
pages/cleanOrderInfo/cleanOrderInfo.vue
View file @
400b7ae5
...
...
@@ -70,7 +70,7 @@
</
template
>
<
script
>
import
{
getInfoByRoomId
,
openDoorByCleaner
}
from
"@/api/cleanRoom.js"
;
import
{
getInfoByRoomId
,
openDoorByCleaner
,
startClean
,
endClean
}
from
"@/api/cleanRoom.js"
;
export
default
{
data
()
{
...
...
pages/cleanRecord/index.vue
0 → 100644
View file @
400b7ae5
<
template
>
<view
class=
"order-record"
>
<scroll-view
v-if=
"loginStatus"
scroll-x
class=
"bg-white nav"
>
<view
class=
"flex text-center"
>
<view
class=
"cu-item flex-sub"
:class=
"index==statusIndex?'text-orange cur':''"
v-for=
"(item,index) in statusList"
:key=
"index"
@
tap=
"tabSelect(index)"
>
<text>
{{
item
.
label
}}
</text>
</view>
</view>
</scroll-view>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between part-1"
>
<text
class=
"text-title text-bold text-xl"
>
{{
item
.
roomName
||
'房间名称'
}}
</text>
<text
class=
"text-pink"
>
{{
orderStatusEnum
[
item
.
status
]
}}
</text>
</view>
<view
class=
"flex-between part-1"
>
<view
class=
""
>
<text>
{{
item
.
payType
==
1
?
'微信支付'
:
'余额支付'
}}
:
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
payPrice
}}
元
</text>
</view>
<view
class=
"flex-row"
>
<text>
{{
item
.
orderType
==
1
?
'房间预定'
:
'房间续订'
}}
</text>
</view>
</view>
<view
v-if=
"item.couponId"
class=
"flex-between part-1"
>
<text>
优惠券抵扣
</text>
<text>
{{
item
.
couponName
}}
</text>
</view>
<view
class=
"flex-row part-1"
>
<text>
订单编号:
</text>
<text>
{{
item
.
orderNo
}}
</text>
</view>
<view
class=
"flex-between part-1"
>
<text>
使用时间:
</text>
<text>
{{
item
.
preStartDate
}}
-
{{
item
.
preEndDate
}}
</text>
</view>
<view
class=
"flex-between part-1"
>
<text>
下单时间:
</text>
<text>
{{
item
.
createTime
}}
</text>
</view>
</view>
</view>
</view>
<u-empty
v-if=
"loginStatus && list.length == 0"
text=
"未查询到相关订单"
textColor=
'#C1C1C1'
></u-empty>
<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"
/>
</view>
<NoLogin
v-model=
"loginStatus"
/>
</view>
</
template
>
<
script
>
import
{
cleanList
}
from
"@/api/cleanRoom.js"
import
NoLogin
from
"@/components/noLogin/noLogin"
import
{
getDictItem
}
from
"@/utils/tools.js"
export
default
{
components
:{
NoLogin
},
data
()
{
return
{
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'到底啦'
,
statusIndex
:
0
,
list
:
[],
statusList
:
[
{
label
:
"待保洁"
,
value
:
""
,
},
{
label
:
"保洁中"
,
value
:
"1"
,
},
{
label
:
"已保洁"
,
value
:
"2"
,
}
],
queryParams
:
{
status
:
""
,
pageNum
:
1
,
pageSize
:
10
},
loginStatus
:
true
,
orderStatusEnum
:{}
};
},
onLoad
()
{
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onShow
()
{
this
.
onGetDicts
()
},
methods
:
{
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
onLoading
()
}
else
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
onLoading
()
})
}
},
onLoading
()
{
uni
.
showLoading
({
title
:
'加载中'
})
this
.
status
=
'loading'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
cleanList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
if
(
this
.
queryParams
.
pageNum
==
1
){
this
.
list
=
res
.
data
.
rows
}
else
{
this
.
list
=
[...
this
.
list
,...
res
.
data
.
rows
]
}
if
(
this
.
list
.
length
<
res
.
data
.
total
){
this
.
status
=
"loadmore"
}
else
{
this
.
status
=
'nomore'
}
}
else
if
(
res
.
data
.
code
==
401
){
this
.
loginStatus
=
false
}
})
},
tabSelect
(
i
)
{
console
.
log
(
i
,
99999
)
this
.
statusIndex
=
i
;
this
.
queryParams
.
pageNum
=
1
;
this
.
list
=
[]
this
.
onLoading
()
},
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
url
:
"/pages/orderResult/orderResult?orderNo="
+
val
.
orderNo
})
}
}
}
</
script
>
<
style
>
page
{
background-color
:
#ffffff
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.order-record
{
display
:
flex
;
flex-direction
:
column
;
.content-box
{
display
:
flex
;
flex-direction
:
column
;
.list-content{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.list-item{
width
:
94%
;
padding
:
30
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
.part-1{
display
:
flex
;
align-items
:
center
;
padding
:
10
upx
;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/index/index.vue
View file @
400b7ae5
...
...
@@ -25,9 +25,12 @@
<view
class=
"flex-1 store-name"
>
<text>
{{
storeInfo
.
name
}}
</text>
</view>
<view
class=
"flex-1 flex-row"
>
<view
v-if=
"storeInfo && storeInfo.distance"
class=
"flex-1 flex-row"
>
<text
class=
"cuIcon-locationfill text-red"
></text>
<text>
距您
{{
storeInfo
&&
storeInfo
.
distance
?
Number
(
storeInfo
.
distance
).
toFixed
(
2
):
999
}}
公里
</text>
<text>
距您
{{
Number
(
storeInfo
.
distance
).
toFixed
(
2
)
}}
公里
</text>
</view>
<view
v-else
class=
"flex-1 flex-row"
>
</view>
</view>
<view
class=
"flex-row part-right"
>
...
...
@@ -275,6 +278,7 @@
}
else
{
uni
.
hideLoading
()
this
.
$refs
.
popup
.
open
()
this
.
onGetListStore
()
}
}
})
...
...
@@ -282,8 +286,8 @@
onGetListStore
()
{
getListStore
({
...
this
.
queryParams
,
nowLatitude
:
this
.
latitude
,
nowLongitude
:
this
.
longitude
nowLatitude
:
this
.
latitude
||
''
,
nowLongitude
:
this
.
longitude
||
''
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
...
...
pages/orderRecord/orderRecord.vue
View file @
400b7ae5
...
...
@@ -56,7 +56,6 @@
import
{
orderList
}
from
"@/api/order.js"
import
list
from
"../../uni_modules/uview-ui/libs/config/props/list"
;
import
NoLogin
from
"@/components/noLogin/noLogin"
import
{
getDictItem
...
...
@@ -80,19 +79,19 @@ import NoLogin from "@/components/noLogin/noLogin"
},
{
label
:
"已预约"
,
value
:
"
1
"
,
value
:
"
0
"
,
},
{
label
:
"使用中"
,
value
:
"
2
"
,
value
:
"
1
"
,
},
{
label
:
"已完成"
,
value
:
"
3
"
,
value
:
"
2
"
,
},
{
label
:
"退单"
,
value
:
"
4
"
,
value
:
"
3
"
,
}
],
queryParams
:
{
...
...
pages/share/share.vue
View file @
400b7ae5
...
...
@@ -2,7 +2,7 @@
<view
class=
"share-box"
>
<view
class=
"content-box"
>
<view
class=
"tki-qrcode"
>
<tki-qrcode
ref=
"qrcode"
:cid=
"cid"
:val=
"text"
:size=
"size"
unit=
"upx"
:icon=
"
assetsPath+'/cart.png'
"
<tki-qrcode
ref=
"qrcode"
:cid=
"cid"
:val=
"text"
:size=
"size"
unit=
"upx"
:icon=
"
iconUrl
"
:iconSize=
"24"
:onval=
"true"
:loadMake=
"loadMake"
:showLoading=
"false"
@
result=
"qrR"
/>
</view>
<view
class=
"info"
>
...
...
@@ -32,21 +32,20 @@
</
template
>
<
script
>
import
config
from
"@/config/index.config"
import
tkiQrcode
from
"@/components/tki-qrcode/tki-qrcode"
import
{
getOrderInfoByNo
}
from
"@/api/order.js"
import
moment
from
"@/common/moment_zh_cn.js"
;
import
{
openDoor
}
from
"@/api/order.js"
import
iconUrl
from
"@/static/cart.png"
export
default
{
components
:
{
tkiQrcode
},
data
()
{
return
{
assetsPath
:
config
.
assetsPath
,
iconUrl
,
cid
:
"qrCode"
,
qrPath
:
''
,
text
:
'生成中'
,
...
...
static/cart.png
0 → 100644
View file @
400b7ae5
17.6 KB
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