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
512f40a2
Commit
512f40a2
authored
Nov 15, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
3ac6ccf4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
17 deletions
+71
-17
cleanRoom.js
api/cleanRoom.js
+1
-1
index.js
api/index.js
+24
-1
cleanOrderInfo.vue
pages/cleanOrderInfo/cleanOrderInfo.vue
+46
-15
No files found.
api/cleanRoom.js
View file @
512f40a2
...
@@ -23,7 +23,7 @@ export const endClean=(data)=>{
...
@@ -23,7 +23,7 @@ export const endClean=(data)=>{
export
const
openDoorByCleaner
=
(
data
)
=>
{
export
const
openDoorByCleaner
=
(
data
)
=>
{
let
url
=
`/room/open/door`
let
url
=
`/room/open/door`
return
http
.
pos
t
(
url
,
data
)
return
http
.
ge
t
(
url
,
data
)
}
}
// 获取进行中的保洁订单
// 获取进行中的保洁订单
export
const
getStarOrder
=
()
=>
{
export
const
getStarOrder
=
()
=>
{
...
...
api/index.js
View file @
512f40a2
import
http
from
"@/common/vmeitime-http/index.js"
import
http
from
"@/common/vmeitime-http/index.js"
import
config
from
"@/config/index.config.js"
// 注册
// 注册
export
const
register
=
(
data
)
=>
{
export
const
register
=
(
data
)
=>
{
let
url
=
`/wechat/register/binding/phone`
let
url
=
`/wechat/register/binding/phone`
...
@@ -41,3 +41,25 @@ export const dictList=()=>{
...
@@ -41,3 +41,25 @@ export const dictList=()=>{
let
url
=
`/dict/type/optionselect`
let
url
=
`/dict/type/optionselect`
return
http
.
get
(
url
)
return
http
.
get
(
url
)
}
}
//上传文件
export
const
uploadFile
=
(
data
)
=>
{
console
.
log
(
data
,
"我要上传文件"
)
return
new
Promise
((
resolve
,
reject
)
=>
{
let
tokenHeaders
=
uni
.
getStorageSync
(
"tokenHeaders"
);
uni
.
uploadFile
({
url
:
`
${
config
.
baseUrl
}
/common/upload`
,
filePath
:
data
.
url
,
name
:
'file'
,
header
:{
[
tokenHeaders
]:
uni
.
getStorageSync
(
tokenHeaders
)
},
success
:
(
res
)
=>
{
resolve
(
res
)
},
fail
:
(
err
)
=>
{
reject
(
err
)
}
});
})
}
\ No newline at end of file
pages/cleanOrderInfo/cleanOrderInfo.vue
View file @
512f40a2
...
@@ -3,16 +3,16 @@
...
@@ -3,16 +3,16 @@
<view
class=
"card-box"
>
<view
class=
"card-box"
>
<form>
<form>
<view
class=
"cu-form-group margin-top"
>
<view
class=
"cu-form-group margin-top"
>
<view
class=
"title"
>
门店名称
</view>
<view
class=
"title"
>
门店名称
:
</view>
<text>
{{
orderInfo
.
storeName
}}
</text>
<text
class=
"text-bold"
>
{{
orderInfo
.
storeName
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
门店地址
</view>
<view
class=
"title"
>
门店地址
</view>
<text>
{{
orderInfo
.
address
}}
</text>
<text>
{{
orderInfo
.
sStore
.
address
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
房间名称
</view>
<view
class=
"title"
>
房间名称
</view>
<text>
{{
orderInfo
.
roomName
}}
</text>
<text
class=
"text-bold"
>
{{
orderInfo
.
roomName
}}
</text>
</view>
</view>
<!--
<view
class=
"cu-form-group"
>
<!--
<view
class=
"cu-form-group"
>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
保洁状态
</view>
<view
class=
"title"
>
保洁状态
</view>
<text>
{{
cleanStatusEnum
[
orderInfo
.
status
]
}}
</text>
<text
class=
"text-bold"
>
{{
cleanStatusEnum
[
orderInfo
.
status
]
}}
</text>
</view>
</view>
<view
class=
"cu-bar bg-white margin-top"
>
<view
class=
"cu-bar bg-white margin-top"
>
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
<
script
>
<
script
>
import
{
getInfoById
,
openDoorByCleaner
,
startClean
,
endClean
}
from
"@/api/cleanRoom.js"
;
import
{
getInfoById
,
openDoorByCleaner
,
startClean
,
endClean
}
from
"@/api/cleanRoom.js"
;
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
getDictItem
}
from
"@/utils/tools.js"
import
{
uploadFile
}
from
"@/api/index.js"
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -86,6 +87,9 @@
...
@@ -86,6 +87,9 @@
this
.
orderId
=
option
.
id
;
this
.
orderId
=
option
.
id
;
this
.
onGetDicts
()
this
.
onGetDicts
()
},
},
onShow
()
{
this
.
imgList
=
[]
},
methods
:{
methods
:{
onGetDicts
()
{
onGetDicts
()
{
let
dicts
=
[]
let
dicts
=
[]
...
@@ -98,6 +102,7 @@
...
@@ -98,6 +102,7 @@
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
.
cleanStatusEnum
=
getDictItem
(
dicts
,
"clean_records_status"
);
this
.
cleanStatusEnum
=
getDictItem
(
dicts
,
"clean_records_status"
);
console
.
log
(
this
.
cleanStatusEnum
,
909090
)
this
.
onLoading
()
this
.
onLoading
()
})
})
}
}
...
@@ -116,11 +121,26 @@
...
@@ -116,11 +121,26 @@
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
],
//从相册选择
sourceType
:
[
'album'
],
//从相册选择
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
this
.
imgList
.
length
!=
0
)
{
console
.
log
(
res
,
"文件"
)
this
.
imgList
=
this
.
imgList
.
concat
(
res
.
tempFilePaths
)
// if (this.imgList.length != 0) {
}
else
{
// this.imgList = this.imgList.concat(res.tempFilePaths)
this
.
imgList
=
res
.
tempFilePaths
// } else {
}
// this.imgList = res.tempFilePaths
// }
uni
.
showLoading
({
title
:
'加载中...'
})
uploadFile
({
url
:
res
.
tempFilePaths
[
0
]
}).
then
(
result
=>
{
uni
.
hideLoading
()
if
(
result
.
data
){
let
data
=
JSON
.
parse
(
result
.
data
);
this
.
imgList
.
push
(
data
.
url
)
}
})
}
}
});
});
},
},
...
@@ -132,10 +152,10 @@
...
@@ -132,10 +152,10 @@
},
},
DelImg
(
e
)
{
DelImg
(
e
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'
召唤师
'
,
title
:
'
提示
'
,
content
:
'确定要删除
这段回忆
吗?'
,
content
:
'确定要删除吗?'
,
cancelText
:
'
再看看
'
,
cancelText
:
'
取消
'
,
confirmText
:
'
再见
'
,
confirmText
:
'
确定
'
,
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
this
.
imgList
.
splice
(
e
.
currentTarget
.
dataset
.
index
,
1
)
this
.
imgList
.
splice
(
e
.
currentTarget
.
dataset
.
index
,
1
)
...
@@ -147,8 +167,16 @@
...
@@ -147,8 +167,16 @@
this
.
textareaBValue
=
e
.
detail
.
value
this
.
textareaBValue
=
e
.
detail
.
value
},
},
onOpenDoorByCleaner
(){
onOpenDoorByCleaner
(){
openDoorByCleaner
().
then
(
res
=>
{
openDoorByCleaner
({
roomId
:
this
.
orderInfo
.
roomId
}).
then
(
res
=>
{
console
.
log
()
console
.
log
()
if
(
res
.
data
.
code
==
200
){
uni
.
showToast
({
icon
:
'success'
,
title
:
'开门成功'
})
}
})
})
}
}
}
}
...
@@ -185,4 +213,7 @@
...
@@ -185,4 +213,7 @@
padding
:
0
30
upx
0
0
;
padding
:
0
30
upx
0
0
;
}
}
}
}
.cu-form-group
.title
{
width
:
240
upx
;
}
</
style
>
</
style
>
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