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 {
...
@@ -29,9 +29,8 @@ class QQMap {
params
.
push
(
`
${
key
}
=
${
encodeURIComponent
(
obj
[
key
])}
`
)
params
.
push
(
`
${
key
}
=
${
encodeURIComponent
(
obj
[
key
])}
`
)
})
})
// window.fetch(`${domain}${method}?${params.join('&')}`, {
// window.fetch(`${domain}${method}?${params.join('&')}`, {
// method:
RequestMethods
,
// method:
'GET'
,
// mode: 'no-cors',
// mode: 'no-cors',
// data: `${params.join('&')}`
// })
// })
let
script
=
document
.
createElement
(
'script'
)
let
script
=
document
.
createElement
(
'script'
)
script
.
src
=
`
${
domain
}${
method
}
?
${
params
.
join
(
'&'
)}
`
script
.
src
=
`
${
domain
}${
method
}
?
${
params
.
join
(
'&'
)}
`
...
@@ -39,6 +38,7 @@ class QQMap {
...
@@ -39,6 +38,7 @@ class QQMap {
document
.
body
.
insertBefore
(
script
,
document
.
body
.
children
[
0
])
document
.
body
.
insertBefore
(
script
,
document
.
body
.
children
[
0
])
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
window
[
'QQmap'
]
=
({
status
,
result
})
=>
{
window
[
'QQmap'
]
=
({
status
,
result
})
=>
{
console
.
log
(
result
)
if
(
status
==
'0'
)
resolve
(
result
)
if
(
status
==
'0'
)
resolve
(
result
)
else
reject
()
else
reject
()
document
.
body
.
removeChild
(
script
)
document
.
body
.
removeChild
(
script
)
...
...
src/views/crowdfunding/components/Action.vue
View file @
3fbb03d
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<
template
v-else-if=
"detail.activityStatus == 3"
>
活动已结束
</
template
>
<
template
v-else
>
<
template
v-else
>
<template
v-if=
"detail.buyFlag == 3"
>
继续参团
</
template
>
<template
v-if=
"detail.buyFlag == 3"
>
继续参团
</
template
>
<
template
v-else-if=
"detail.buyFlag == 2"
>
已参团
</
template
>
<
template
v-else
>
立即参团
</
template
>
<
template
v-else
>
立即参团
</
template
>
</template>
</template>
</div>
</div>
...
@@ -85,7 +86,7 @@ import { util } from '@/utils'
...
@@ -85,7 +86,7 @@ import { util } from '@/utils'
import
PayModal
from
'./PayModal.vue'
import
PayModal
from
'./PayModal.vue'
export
default
{
export
default
{
name
:
'Action'
,
name
:
'Action'
,
components
:
{
PayModal
},
components
:
{
PayModal
},
props
:
[
'detail'
],
props
:
[
'detail'
],
watch
:
{
watch
:
{
'detail'
:
function
(
n
)
{
'detail'
:
function
(
n
)
{
...
@@ -136,7 +137,7 @@ export default {
...
@@ -136,7 +137,7 @@ export default {
methods
:
{
methods
:
{
submit
()
{
submit
()
{
let
{
detail
,
disabled
}
=
this
let
{
detail
,
disabled
}
=
this
if
(
disabled
||
detail
.
activityStatus
==
1
)
return
if
(
disabled
||
detail
.
activityStatus
!=
2
)
return
this
.
showModal
=
true
this
.
showModal
=
true
},
},
checkOut
:
util
.
debounce
(({
obj
,
that
})
=>
{
checkOut
:
util
.
debounce
(({
obj
,
that
})
=>
{
...
...
src/views/crowdfunding/index.vue
View file @
3fbb03d
...
@@ -153,8 +153,8 @@
...
@@ -153,8 +153,8 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"group-info flex"
>
<
div
class
=
"group-info flex"
>
<
div
class
=
"item"
>
最低折扣
<
br
>
需
{{
groupInfo
.
fictitiousLadderQuantity
}}
人
<
/div
>
<
div
class
=
"item"
>
最低折扣
<
br
>
需
{{
groupInfo
.
fictitiousLadderQuantity
||
0
}}
人
<
/div
>
<
div
class
=
"item"
>
已参与
<
br
>
{{
groupInfo
.
groupQuantity
}}
人
<
/div
>
<
div
class
=
"item"
>
已参与
<
br
>
{{
groupInfo
.
groupQuantity
||
0
}}
人
<
/div
>
<
div
>
众筹
<
br
>
成功
<
/div
>
<
div
>
众筹
<
br
>
成功
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -241,14 +241,17 @@ export default {
...
@@ -241,14 +241,17 @@ export default {
link
:
`${redirectUrl
}
?id=${id
}
&staffUuid=${params.staffUuid
}
&userPhone=${userInfo.phone
}
&staffType=1`
,
link
:
`${redirectUrl
}
?id=${id
}
&staffUuid=${params.staffUuid
}
&userPhone=${userInfo.phone
}
&staffType=1`
,
imgUrl
:
data
.
posterImg
imgUrl
:
data
.
posterImg
}
)
}
)
wxConfig
.
getLocation
().
then
(
res
=>
{
if
(
data
.
activityAddressLat
&&
data
.
activityAddressLng
)
{
console
.
log
(
res
)
wxConfig
.
getLocation
().
then
(
res
=>
{
mapApi
.
calculateDistance
([
res
.
latitude
,
res
.
longitude
],
[
data
.
activityAddressLat
,
data
.
activityAddressLng
]).
then
(({
elements
:
[
res
]
}
)
=>
{
console
.
log
(
res
)
this
.
detail
.
distance
=
Number
((
res
.
distance
/
1000
)).
toFixed
(
2
)
mapApi
.
calculateDistance
([
res
.
latitude
,
res
.
longitude
],
[
data
.
activityAddressLat
,
data
.
activityAddressLng
]).
then
(({
elements
:
[
address
]
}
)
=>
{
this
.
distanceKey
=
Date
.
now
()
console
.
log
(
address
)
console
.
log
(
this
.
detail
)
this
.
detail
.
distance
=
Number
((
address
.
distance
/
1000
)).
toFixed
(
2
)
this
.
distanceKey
=
Date
.
now
()
console
.
log
(
this
.
detail
)
}
)
}
)
}
)
}
)
}
}
)
}
)
}
,
}
,
getActivityGroup
()
{
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