Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
e52f7622
Commit
e52f7622
authored
Dec 09, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复距离展示
parent
85d5113b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
31 deletions
+25
-31
branch.vue
src/components/Mine/Branch/branch.vue
+1
-1
index.ts
src/filter/index.ts
+0
-6
types.ts
src/service/AddressService/types.ts
+24
-24
No files found.
src/components/Mine/Branch/branch.vue
View file @
e52f7622
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
>
>
<div
class=
"text-gray-400 text-xs"
>
{{
location
}}
</div>
<div
class=
"text-gray-400 text-xs"
>
{{
location
}}
</div>
<div
class=
"text-gray-400 text-xs float-right ml-2"
>
<div
class=
"text-gray-400 text-xs float-right ml-2"
>
{{
filter
.
filterDistance
(
distance
)
}}
{{
distance
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/filter/index.ts
View file @
e52f7622
...
@@ -4,11 +4,5 @@ export default {
...
@@ -4,11 +4,5 @@ export default {
return
phone
.
slice
(
0
,
3
)
+
"*"
.
repeat
(
5
)
+
phone
.
slice
(
-
3
);
return
phone
.
slice
(
0
,
3
)
+
"*"
.
repeat
(
5
)
+
phone
.
slice
(
-
3
);
else
return
""
;
else
return
""
;
},
},
filterDistance
(
distance
:
string
)
{
if
(
!
distance
)
return
""
;
const
m
=
Number
(
distance
);
const
k
=
m
.
toFixed
(
2
);
return
`
${
k
}
km`
;
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}
as
{
[
key
:
string
]:
(...
args
:
any
)
=>
any
};
}
as
{
[
key
:
string
]:
(...
args
:
any
)
=>
any
};
src/service/AddressService/types.ts
View file @
e52f7622
export
interface
iNearbyOutLet
{
export
interface
iNearbyOutLet
{
distance
:
string
distance
:
string
;
is_normal_work
:
boolean
is_normal_work
:
boolean
;
latitude
:
string
latitude
:
string
;
location
:
string
location
:
string
;
longitude
:
string
longitude
:
string
;
name
:
string
name
:
string
;
opening_hours
:
string
opening_hours
:
string
;
weekend_status
:
number
weekend_status
:
number
;
outlet_id
:
number
outlet_id
:
number
;
pos_id
:
string
;
}
}
export
interface
errorInfo
{
export
interface
errorInfo
{
note
:
string
note
:
string
;
}
}
export
interface
iOutLetDetail
{
export
interface
iOutLetDetail
{
id
:
number
id
:
number
;
city_name
:
string
city_name
:
string
;
is_normal_work
:
boolean
is_normal_work
:
boolean
;
latitude
:
string
latitude
:
string
;
location
:
string
location
:
string
;
longitude
:
string
longitude
:
string
;
opening_hours
:
string
pos_id
:
string
;
outlet_name
:
string
opening_hours
:
string
;
region_name
:
string
outlet_name
:
string
;
weekend_status
:
number
region_name
:
string
;
province_name
:
string
weekend_status
:
number
;
}
province_name
:
string
;
\ No newline at end of file
}
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