businessDetail.vue
3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<template>
<!-- 商务合作详情 -->
<view class="page">
<view class="page-info">
<view class="banner">
<view class="title">{{tableData.title}}</view>
<view class="banner-info-top">
<view class="times">{{tableData.createTime}}</view>
<view><u-icon name="eye"></u-icon>{{tableData.viewsNumber || 0}}人</view>
</view>
<view class="banner-info-item">
<u-parse :html="tableData.content"></u-parse>
</view>
</view>
<view class="info-box banner good-item" v-if="tableData.cereBasicInformationVenue.venueName">
<view class="img">
<u-image width="100%" height="100%" borderRadius="10" :src="imgurl+tableData.cereBasicInformationVenue.displayImage"></u-image>
</view>
<view class="info" @click="gomapApp(latitude,longitude)">
<view class="title" style="margin-bottom: 28px;">{{tableData.cereBasicInformationVenue.venueName}}</view>
<view>所属区域:{{tableData.cereBasicInformationVenue.district}}</view>
<!-- <view class="info-item">
<image :src="$imgUrl('/kefu.png')" style="margin-top: 8px;"></image>
<map style="width: 100%; height: 70rpx;" longitude="104.06730651855469" latitude="30.65681556429287" >
<text>{{tableData.cereBasicInformationVenue.district}}</text>
</map>
</view> -->
</view>
</view>
<view class="info-box banner">
<view class="title">场地往期活动回顾</view>
<u-row gutter="16">
<u-col span="4" v-for="(item,index) in tableData.previousEvents">
<image :src="imgurl+item" mode="heightFix" style="height:90px; border-radius: 10rpx;" ></image>
</u-col>
</u-row>
</view>
<view class="info-box banner">
<view class="title">联系我们</view>
<view class="info-item">合作类型:{{tableData.cooperationType}}</view>
<view class="info-item">联系人:{{tableData.contactPerson}}</view>
<view class="info-item">联系方式:{{tableData.contactPhone}}</view>
<view class="info-item">邮箱:{{tableData.email}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tableData:{},
imgurl:'',
latitude: null,
longitude: null,
};
},
onLoad(option){
this.imgurl = this.$img
let ce = decodeURIComponent(option.item)
this.tableData = JSON.parse(ce)
if (typeof this.tableData.previousEvents === 'string') {
this.tableData.previousEvents = this.tableData.previousEvents.split(',');
}
console.log(this.tableData)
if (this.tableData.cereBasicInformationVenue.mapMarker&& this.tableData.cereBasicInformationVenue.mapMarker!='') {
this.latitude = parseFloat(this.tableData.cereBasicInformationVenue.mapMarker.split(',')[0])
this.longitude = parseFloat(this.tableData.cereBasicInformationVenue.mapMarker.split(',')[1])
}
let obj ={
id:this.tableData.id,
viewsNumber:Number(this.tableData.viewsNumber) +1
}
this.$http.sendRequest('/cereBusinessCooperation/edit', 'POST', obj,1).then(res => {
})
},
methods: {
leaseAdd(){
uni.navigateTo({
url: '/pages/leaseAdd/leaseAdd'
})
},
// 打开的点击事件,传经纬度和地点名
gomapApp(latitude, longitude ) {
console.log(latitude, longitude);
let url = "";
uni.openLocation({
latitude: latitude,
longitude: longitude,
success: function() {
console.log('success');
}
});
},
}
};
</script>
<style scoped lang="scss">
@import 'businessDetail.scss';
</style>