洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.3 KiB

10 months ago
  1. <template>
  2. <view class="card">
  3. <view class="flex-b" @click="openMap">
  4. <view class="left_text">
  5. <view class="adr ">{{ info.address}}</view>
  6. <view class="distance" v-if="info.distance">距您{{ $u.utils.distanceFn(info.distance) }}</view>
  7. </view>
  8. <view class="mapEntry">
  9. <view class="icon">
  10. <image src="@/static/images/index/mapIcon.png" mode=""></image>
  11. </view>
  12. <view class="text">地图导航</view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. props: ['info'],
  20. methods: {
  21. openMap() {
  22. uni.openLocation({
  23. latitude: this.info.lat,
  24. longitude: this.info.lng,
  25. success: function () {
  26. console.log('success');
  27. }
  28. });
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .card {
  35. padding: 24rpx;
  36. .flex-b {
  37. align-items: center;
  38. .left_text {
  39. flex: 1;
  40. .adr {
  41. font-size: 28rpx;
  42. color: #333333;
  43. font-weight: 500;
  44. }
  45. .distance {
  46. margin-top: 24rpx;
  47. color: #686B73;
  48. font-size: 24rpx;
  49. }
  50. }
  51. .mapEntry {
  52. width: 130rpx;
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. .icon {
  57. width: 32rpx;
  58. height: 32rpx;
  59. }
  60. .text {
  61. font-size: 24rpx;
  62. margin-top: 10rpx;
  63. color: $themC;
  64. }
  65. }
  66. }
  67. }
  68. </style>