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
bd003f2b
Commit
bd003f2b
authored
Sep 27, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网点时间及电话提取
parent
605f7a21
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
36 deletions
+93
-36
branch.vue
src/components/Mine/Branch/branch.vue
+17
-33
index.vue
src/components/showCall/index.vue
+61
-0
index.ts
src/filter/index.ts
+1
-1
index.ts
src/service/AddressService/index.ts
+12
-0
transfer.ts
src/utils/transfer.ts
+2
-2
No files found.
src/components/Mine/Branch/branch.vue
View file @
bd003f2b
...
@@ -77,34 +77,12 @@
...
@@ -77,34 +77,12 @@
<p
class=
"w-1/2 border-r border-gray-300 mb-0"
@
click=
"handleClickChatWithClientManager"
>
联系客服
</p>
<p
class=
"w-1/2 border-r border-gray-300 mb-0"
@
click=
"handleClickChatWithClientManager"
>
联系客服
</p>
<p
class=
"w-1/2 mb-0"
:class=
"isOpen ? 'text-app-blue' : 'text-gray-800'"
@
click=
"toCall"
>
电话咨询
</p>
<p
class=
"w-1/2 mb-0"
:class=
"isOpen ? 'text-app-blue' : 'text-gray-800'"
@
click=
"toCall"
>
电话咨询
</p>
</div>
</div>
<van-popup
v-model:show=
"show"
round
teleport=
"body"
:style=
"{ width: '90%', top: '80%' }"
>
<show-call
:show=
"show"
:phone=
"phone"
@
hidden=
"hidden"
/>
<div
class=
"text-center py-4"
@
click=
"handleClickCall"
>
<icon
name=
"icon-a-dianhua"
color=
"#3E4FAF"
size=
"17"
class=
"inline-block pr-3 align-text-bottom"
/>
<span
class=
"text-app-blue text-sm align-middle font-semibold"
>
呼叫95533
</span>
</div>
</van-popup>
<van-popup
v-model:show=
"show"
round
:style=
"{ width: '90%', margin: '60px auto 0px auto', top: '80%' }"
teleport=
"body"
:overlay=
"false"
>
<div
class=
"text-app-blue text-sm font-semibold border-t border-gray-200 text-center py-4"
@
click=
"show = false"
>
取消
</div>
</van-popup>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
computed
,
PropType
,
ref
}
from
'vue'
import
{
computed
,
defineComponent
,
PropType
,
ref
}
from
'vue'
import
Icon
from
"@/components/common/Icon.vue"
import
Icon
from
"@/components/common/Icon.vue"
import
{
transfterStrToDate
}
from
'@/utils/transfer'
import
{
transfterStrToDate
}
from
'@/utils/transfer'
import
AddressService
from
'@/service/AddressService'
import
AddressService
from
'@/service/AddressService'
...
@@ -114,9 +92,14 @@ import jsBridge from "@/utils/jsBridge2"
...
@@ -114,9 +92,14 @@ import jsBridge from "@/utils/jsBridge2"
import
UserService
from
'@/service/UserService'
import
UserService
from
'@/service/UserService'
import
{
authCheck
}
from
'@/utils/authCheck'
import
{
authCheck
}
from
'@/utils/authCheck'
import
router
from
'@/router'
import
router
from
'@/router'
import
ShowCall
from
'@/components/showCall/index.vue'
const
addressService
=
new
AddressService
()
const
addressService
=
new
AddressService
()
const
components
=
defineComponent
({
ShowCall
})
const
props
=
defineProps
({
const
props
=
defineProps
({
changeable
:
{
changeable
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -207,23 +190,24 @@ const getErrorNote = () => {
...
@@ -207,23 +190,24 @@ const getErrorNote = () => {
getErrorNote
()
getErrorNote
()
let
show
=
ref
(
false
)
let
show
=
ref
(
false
)
const
phone
=
ref
(
''
)
const
toCall
=
()
=>
{
const
toCall
=
()
=>
{
if
(
isOpen
)
{
authCheck
(
async
()
=>
{
show
.
value
=
true
}
}
const
handleClickCall
=
async
()
=>
{
const
ret
=
await
UserService
.
getInstance
().
contact_custom_service
({
const
ret
=
await
UserService
.
getInstance
().
contact_custom_service
({
outLetID
:
props
.
outlet_id
as
number
outLetID
:
props
.
outlet_id
as
number
})
})
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
new
jsBridge
().
bridge_call
(
ret
.
data
.
phone
,
()
=>
{
phone
.
value
=
ret
.
data
.
phone
show
.
value
=
false
;
show
.
value
=
true
})
}
}
})
}
const
hidden
=
(
v
:
boolean
)
=>
{
show
.
value
=
v
}
}
const
handleClickNagigate
=
()
=>
{
const
handleClickNagigate
=
()
=>
{
new
jsBridge
().
bridge_navigate
(
`
${
props
.
longitude
}
,
${
props
.
latitude
}
`
,
()
=>
{
new
jsBridge
().
bridge_navigate
(
`
${
props
.
longitude
}
,
${
props
.
latitude
}
`
,
()
=>
{
show
.
value
=
false
;
show
.
value
=
false
;
...
...
src/components/showCall/index.vue
0 → 100644
View file @
bd003f2b
<
template
>
<div>
<van-popup
v-model:show=
"show"
round
teleport=
"body"
:style=
"
{ width: '90%', top: '80%' }" @click-overlay="hide">
<div
class=
"text-center py-4"
@
click=
"handleClickCall"
>
<icon
name=
"icon-a-dianhua"
color=
"#3E4FAF"
size=
"17"
class=
"inline-block pr-3 align-text-bottom"
/>
<span
class=
"text-app-blue text-sm align-middle font-semibold"
>
呼叫
{{
phone
}}
</span>
</div>
</van-popup>
<van-popup
v-model:show=
"show"
round
:style=
"
{ width: '90%', margin: '60px auto 0px auto', top: '80%' }"
teleport="body"
:overlay="false"
@click-overlay="hide"
>
<div
class=
"text-app-blue text-sm font-semibold border-t border-gray-200 text-center py-4"
@
click=
"hide"
>
取消
</div>
</van-popup>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
Vue
,
{
ComponentInternalInstance
,
getCurrentInstance
}
from
'vue'
import
jsBridge
from
"@/utils/jsBridge2"
const
{
ctx
}
=
getCurrentInstance
()
as
any
console
.
log
(
ctx
)
const
props
=
defineProps
({
show
:
{
type
:
Boolean
,
default
:
false
,
},
phone
:
{
type
:
String
,
}
})
const
hide
=
()
=>
{
console
.
log
(
ctx
,
'ctx'
)
ctx
.
$emit
(
'hidden'
,
false
)
}
const
handleClickCall
=
async
()
=>
{
console
.
log
(
props
.
phone
)
new
jsBridge
().
bridge_call
(
props
.
phone
,
()
=>
{
ctx
.
$emit
(
'hidden'
,
false
)
})
}
</
script
>
\ No newline at end of file
src/filter/index.ts
View file @
bd003f2b
...
@@ -7,7 +7,7 @@ export default {
...
@@ -7,7 +7,7 @@ export default {
filterDistance
(
distance
:
string
){
filterDistance
(
distance
:
string
){
if
(
!
distance
)
return
''
if
(
!
distance
)
return
''
const
m
=
Number
(
distance
)
const
m
=
Number
(
distance
)
const
k
=
(
m
/
1000
).
toFixed
(
2
)
const
k
=
(
m
).
toFixed
(
2
)
return
`
${
k
}
km`
return
`
${
k
}
km`
}
}
}
as
{
[
key
:
string
]:
(...
args
:
any
)
=>
any
}
}
as
{
[
key
:
string
]:
(...
args
:
any
)
=>
any
}
src/service/AddressService/index.ts
View file @
bd003f2b
...
@@ -12,6 +12,15 @@ class AddressService {
...
@@ -12,6 +12,15 @@ class AddressService {
}
}
getNearby
(
data
:
{
bank_code
:
number
;
number
:
number
})
{
getNearby
(
data
:
{
bank_code
:
number
;
number
:
number
})
{
return
baseAxios
<
iNearbyOutLet
[]
>
({
method
:
'post'
,
url
:
'/address/nearby'
,
data
:
{
...
data
,
longitude
:
'120.194393'
,
latitude
:
'30.244417'
,
},
})
return
new
Promise
<
iRet
<
iNearbyOutLet
[]
>>
((
resolve
)
=>
{
return
new
Promise
<
iRet
<
iNearbyOutLet
[]
>>
((
resolve
)
=>
{
function
getGps
()
{
function
getGps
()
{
new
Bridge
().
bridge_getGps
(
null
,
(
params
:
any
)
=>
{
new
Bridge
().
bridge_getGps
(
null
,
(
params
:
any
)
=>
{
...
@@ -38,7 +47,9 @@ class AddressService {
...
@@ -38,7 +47,9 @@ class AddressService {
(
position
)
=>
{
(
position
)
=>
{
const
la
=
position
.
coords
.
latitude
.
toString
()
const
la
=
position
.
coords
.
latitude
.
toString
()
const
lo
=
position
.
coords
.
longitude
.
toString
()
const
lo
=
position
.
coords
.
longitude
.
toString
()
console
.
log
(
position
,
'position'
)
resolve
(
resolve
(
baseAxios
<
iNearbyOutLet
[]
>
({
baseAxios
<
iNearbyOutLet
[]
>
({
method
:
'post'
,
method
:
'post'
,
url
:
'/address/nearby'
,
url
:
'/address/nearby'
,
...
@@ -51,6 +62,7 @@ class AddressService {
...
@@ -51,6 +62,7 @@ class AddressService {
)
)
},
},
(
error
)
=>
{
(
error
)
=>
{
console
.
log
(
error
)
getGps
()
getGps
()
},
},
)
)
...
...
src/utils/transfer.ts
View file @
bd003f2b
...
@@ -6,8 +6,8 @@ export function transfterStrToDate(str: string) {
...
@@ -6,8 +6,8 @@ export function transfterStrToDate(str: string) {
start
=
start
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
start
=
start
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
end
=
end
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
end
=
end
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
const
d
=
new
Date
()
const
d
=
new
Date
()
start
=
`
${
d
.
getFullYear
()}
${
d
.
getMonth
()
+
1
}
${
d
.
getDate
()}
${
start
}
`
start
=
`
${
d
.
getFullYear
()}
/
${
d
.
getMonth
()
+
1
}
/
${
d
.
getDate
()}
${
start
}
`
end
=
`
${
d
.
getFullYear
()}
${
d
.
getMonth
()
+
1
}
${
d
.
getDate
()}
${
end
}
`
end
=
`
${
d
.
getFullYear
()}
/
${
d
.
getMonth
()
+
1
}
/
${
d
.
getDate
()}
${
end
}
`
const
startDate
=
new
Date
(
start
)
const
startDate
=
new
Date
(
start
)
const
endDate
=
new
Date
(
end
)
const
endDate
=
new
Date
(
end
)
return
[
startDate
,
endDate
]
return
[
startDate
,
endDate
]
...
...
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