Commit 3fbb03d9 by 李伟康

修改样式

1 parent 33dc28f2
......@@ -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)
......
......@@ -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 }) => {
......
......@@ -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 () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!