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
0e472f79
Commit
0e472f79
authored
Jan 20, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
6c13eee2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
11 deletions
+28
-11
store.js
api/store.js
+6
-1
index.vue
pages/index/index.vue
+22
-10
No files found.
api/store.js
View file @
0e472f79
import
http
from
"@/common/vmeitime-http/index.js"
import
http
from
"@/common/vmeitime-http/index.js"
// 获取门店
及房间信息
// 获取门店
export
const
getListStore
=
(
data
)
=>
{
export
const
getListStore
=
(
data
)
=>
{
let
url
=
`/store/listVo`
let
url
=
`/store/listVo`
return
http
.
get
(
url
,
data
)
return
http
.
get
(
url
,
data
)
}
}
export
const
getRoomList
=
(
data
)
=>
{
let
url
=
`/room/list`
return
http
.
get
(
url
,
data
)
}
export
const
roomInfo
=
(
data
)
=>
{
export
const
roomInfo
=
(
data
)
=>
{
let
url
=
`/room/info`
let
url
=
`/room/info`
return
http
.
get
(
url
,
data
)
return
http
.
get
(
url
,
data
)
...
...
pages/index/index.vue
View file @
0e472f79
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
</view>
</view>
<view
class=
"flex-row list-point-box"
>
<view
class=
"flex-row list-point-box"
>
<view
v-for=
"(val,k) in list"
:key=
"k"
class=
"flex-1 flex-col"
>
<view
v-for=
"(val,k) in list"
:key=
"k"
class=
"flex-1 flex-col"
>
<view
class=
"box"
:class=
"item.
list && item.list[val].status==1 && item.l
ist[val].m>=59?'bg-pink':'bg-gray'"
>
<view
class=
"box"
:class=
"item.
roomStatusList && item.roomStatusList[val].status==1 && item.roomStatusL
ist[val].m>=59?'bg-pink':'bg-gray'"
>
</view>
</view>
<text
class=
"text-gray text-sm"
>
{{
val
==
24
?
'次日'
:
val
>
24
?
val
-
24
:
val
}}
</text>
<text
class=
"text-gray text-sm"
>
{{
val
==
24
?
'次日'
:
val
>
24
?
val
-
24
:
val
}}
</text>
...
@@ -139,7 +139,8 @@
...
@@ -139,7 +139,8 @@
}
from
"@/api/index.js"
;
}
from
"@/api/index.js"
;
import
{
import
{
getListStore
,
getListStore
,
listSortDistance
listSortDistance
,
getRoomList
}
from
"@/api/store"
;
}
from
"@/api/store"
;
import
config
from
"@/config/index.config"
import
config
from
"@/config/index.config"
import
ToolBox
from
"@/components/toolBox/toolBox"
import
ToolBox
from
"@/components/toolBox/toolBox"
...
@@ -278,7 +279,6 @@
...
@@ -278,7 +279,6 @@
uni
.
setStorageSync
(
"longitude"
,
res
.
longitude
)
uni
.
setStorageSync
(
"longitude"
,
res
.
longitude
)
}
else
{
}
else
{
this
.
$refs
.
popup
.
open
()
this
.
$refs
.
popup
.
open
()
uni
.
hideLoading
()
}
}
this
.
onGetListStore
()
this
.
onGetListStore
()
}
}
...
@@ -292,10 +292,9 @@
...
@@ -292,10 +292,9 @@
nowLongitude
:
this
.
longitude
nowLongitude
:
this
.
longitude
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
)
{
this
.
storeList
=
res
.
data
.
data
;
let
obj
=
{}
let
obj
=
{}
if
(
uni
.
getStorageSync
(
"storeId"
)){
if
(
uni
.
getStorageSync
(
"storeId"
)){
obj
=
this
.
storeList
.
find
(
item
=>
item
.
id
===
uni
.
getStorageSync
(
"storeId"
))
obj
=
res
.
data
.
data
.
find
(
item
=>
item
.
id
===
uni
.
getStorageSync
(
"storeId"
))
}
else
{
}
else
{
obj
=
res
.
data
.
data
[
0
];
obj
=
res
.
data
.
data
[
0
];
}
}
...
@@ -303,18 +302,31 @@
...
@@ -303,18 +302,31 @@
...
obj
,
...
obj
,
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
distance
:
obj
.
distance
?
Number
(
obj
.
distance
.
substr
(
0
,
8
)).
toFixed
(
2
):
0
}
}
if
(
obj
.
roomVoList
&&
obj
.
roomVoList
.
length
){
that
.
onGetRoomList
(
obj
.
id
)
that
.
roomVoList
=
obj
.
roomVoList
.
map
(
item
=>
{
}
})
},
onGetRoomList
(
storeId
){
let
that
=
this
;
getRoomList
({
storeId
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
.
length
){
that
.
roomVoList
=
res
.
data
.
data
.
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[]
images
:
item
.
images
?
item
.
images
.
split
(
","
).
map
(
val
=>
this
.
hostUrl
+
val
)
:
[],
roomStatusList
:
item
.
roomStatusList
.
map
(
val
=>
{
return
{
...
val
,
m
:
val
.
endHoldTime
?
Number
(
moment
(
val
.
endHoldTime
).
format
(
"mm"
)):
0
}
}
})
})
uni
.
hideLoading
()
that
.
onGetSortDistance
(
0
);
}
}
})
}
else
{
that
.
roomVoList
=
[]
}
}
uni
.
hideLoading
()
})
})
},
},
onGetSortDistance
(
i
=
0
){
onGetSortDistance
(
i
=
0
){
...
...
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