nearby_team_map.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view style="height: 100vh;">
  3. <view class="page-body">
  4. <view class="page-section page-section-gap">
  5. <map
  6. :id="myMap"
  7. :latitude="latitude"
  8. :longitude="longitude"
  9. :markers="covers"
  10. style="width: 100%; height: 800upx;">
  11. </map>
  12. </view>
  13. </view>
  14. <view style="border-top-left-radius:20upx;border-top-right-radius:20upx;padding: 40upx 30upx;overflow: hidden;background-color: #fff;">
  15. <view style="display: flex;align-items: center;">
  16. <image :src="organizationInfo.organizeicon" mode="aspectFit" style="background-color: #f7f7f7;border-radius: 50%;width: 80upx;height: 80upx;"></image>
  17. <view style="flex:1;margin-left: 30upx;">
  18. <view style="font-size: 30upx;">{{organizationInfo.organizename}}</view>
  19. <view style="font-size: 20upx;color: #999999;margin-top: 10upx;">当前群人数{{organizationInfo.num}}员</view>
  20. </view>
  21. <view @tap="makePhone" style="width: 152upx;height:56upx;border-radius: 25px;text-align: center;font-size: 24upx;color: #fff;line-height: 56upx;background-color: #E42F2F;">
  22. 联系团长
  23. </view>
  24. </view>
  25. <view style="height: 2upx;background-color: #F6F6F6;margin: 20upx 0;"></view>
  26. <view style="color: #999999;font-size: 24upx;">
  27. {{organizationInfo.areaname}}{{organizationInfo.address}}
  28. </view>
  29. </view>
  30. <view @tap="startNav" style="position: absolute;bottom: 0;left: 0;right: 0;font-size: 28upx;color: #fff;text-align:center;line-height:88upx;background:linear-gradient(93deg,rgba(218,62,62,1) 0%,rgba(255,121,121,1) 100%);">
  31. 地图导航
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. id:1, // 使用 marker点击事件 需要填写id
  40. title: 'map',
  41. latitude: 39.909,
  42. longitude: 116.39742,
  43. covers: [{
  44. latitude: 39.909,
  45. longitude: 116.39742,
  46. iconPath: 'http://139.9.103.171:1888/img/image/ic_location.png',
  47. title:'',
  48. width:'30',
  49. height:'30',
  50. }],
  51. organizationInfo:{}
  52. };
  53. },
  54. methods:{
  55. makePhone(){
  56. this.makePhoneCall(this.organizationInfo.phone);
  57. },
  58. onLoadPage(options){
  59. if(options.info){
  60. this.organizationInfo = JSON.parse(decodeURIComponent(options.info));
  61. }
  62. },
  63. startNav(){
  64. uni.openLocation({
  65. latitude: this.latitude,//要去的纬度-地址
  66. longitude: this.longitude,//要去的经度-地址
  67. name: this.organizationInfo.areaname,//地址名称
  68. address: this.organizationInfo.address,//详细地址名称
  69. success: function () {
  70. console.log('导航成功');
  71. },
  72. fail:function(error){
  73. console.log(error)
  74. }
  75. });
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss">
  81. </style>