Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3fbb03d9
authored
Jul 12, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改样式
1 parent
33dc28f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
src/api/mapApi.js
src/views/crowdfunding/components/Action.vue
src/views/crowdfunding/index.vue
src/api/mapApi.js
View file @
3fbb03d
...
...
@@ -29,9 +29,8 @@ class QQMap {
params
.
push
(
`
${
key
}
=
${
encodeURIComponent
(
obj
[
key
])}
`
)
})
// window.fetch(`${domain}${method}?${params.join('&')}`, {
// method:
RequestMethods
,
// method:
'GET'
,
// mode: 'no-cors',
// data: `${params.join('&')}`
// })
let
script
=
document
.
createElement
(
'script'
)
script
.
src
=
`
${
domain
}${
method
}
?
${
params
.
join
(
'&'
)}
`
...
...
@@ -39,6 +38,7 @@ class QQMap {
document
.
body
.
insertBefore
(
script
,
document
.
body
.
children
[
0
])
return
new
Promise
((
resolve
,
reject
)
=>
{
window
[
'QQmap'
]
=
({
status
,
result
})
=>
{
console
.
log
(
result
)
if
(
status
==
'0'
)
resolve
(
result
)
else
reject
()
document
.
body
.
removeChild
(
script
)
...
...
src/views/crowdfunding/components/Action.vue
View file @
3fbb03d
...
...
@@ -44,6 +44,7 @@
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<
template
v-else
>
<template
v-if=
"detail.buyFlag == 3"
>
继续参团
</
template
>
<
template
v-else-if=
"detail.buyFlag == 2"
>
已参团
</
template
>
<
template
v-else
>
立即参团
</
template
>
</template>
</div>
...
...
@@ -85,7 +86,7 @@ import { util } from '@/utils'
import
PayModal
from
'./PayModal.vue'
export
default
{
name
:
'Action'
,
components
:
{
PayModal
},
components
:
{
PayModal
},
props
:
[
'detail'
],
watch
:
{
'detail'
:
function
(
n
)
{
...
...
@@ -136,7 +137,7 @@ export default {
methods
:
{
submit
()
{
let
{
detail
,
disabled
}
=
this
if
(
disabled
||
detail
.
activityStatus
==
1
)
return
if
(
disabled
||
detail
.
activityStatus
!=
2
)
return
this
.
showModal
=
true
},
checkOut
:
util
.
debounce
(({
obj
,
that
})
=>
{
...
...
src/views/crowdfunding/index.vue
View file @
3fbb03d
...
...
@@ -153,8 +153,8 @@
<
/div
>
<
/div
>
<
div
class
=
"group-info flex"
>
<
div
class
=
"item"
>
最低折扣
<
br
>
需
{{
groupInfo
.
fictitiousLadderQuantity
}}
人
<
/div
>
<
div
class
=
"item"
>
已参与
<
br
>
{{
groupInfo
.
groupQuantity
}}
人
<
/div
>
<
div
class
=
"item"
>
最低折扣
<
br
>
需
{{
groupInfo
.
fictitiousLadderQuantity
||
0
}}
人
<
/div
>
<
div
class
=
"item"
>
已参与
<
br
>
{{
groupInfo
.
groupQuantity
||
0
}}
人
<
/div
>
<
div
>
众筹
<
br
>
成功
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -241,14 +241,17 @@ export default {
link
:
`${redirectUrl
}
?id=${id
}
&staffUuid=${params.staffUuid
}
&userPhone=${userInfo.phone
}
&staffType=1`
,
imgUrl
:
data
.
posterImg
}
)
wxConfig
.
getLocation
().
then
(
res
=>
{
console
.
log
(
res
)
mapApi
.
calculateDistance
([
res
.
latitude
,
res
.
longitude
],
[
data
.
activityAddressLat
,
data
.
activityAddressLng
]).
then
(({
elements
:
[
res
]
}
)
=>
{
this
.
detail
.
distance
=
Number
((
res
.
distance
/
1000
)).
toFixed
(
2
)
this
.
distanceKey
=
Date
.
now
()
console
.
log
(
this
.
detail
)
if
(
data
.
activityAddressLat
&&
data
.
activityAddressLng
)
{
wxConfig
.
getLocation
().
then
(
res
=>
{
console
.
log
(
res
)
mapApi
.
calculateDistance
([
res
.
latitude
,
res
.
longitude
],
[
data
.
activityAddressLat
,
data
.
activityAddressLng
]).
then
(({
elements
:
[
address
]
}
)
=>
{
console
.
log
(
address
)
this
.
detail
.
distance
=
Number
((
address
.
distance
/
1000
)).
toFixed
(
2
)
this
.
distanceKey
=
Date
.
now
()
console
.
log
(
this
.
detail
)
}
)
}
)
}
)
}
}
)
}
,
getActivityGroup
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment