index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view class="page">
  3. <navBar title="城市展厅" :back="true" color="black" background="white" />
  4. <view class="content">
  5. <view class="cartDef" style="" v-for="(item,index) in bannerList1">
  6. <!-- background:' url('+picBase+item.cover+') no-repeat;' -->
  7. <image :src="picBase+item.logo" mode=""
  8. style="width: 104rpx;height: 104rpx;margin-top: 64rpx;border-radius: 50%;">
  9. </image>
  10. <view class="companyName">
  11. 吉格斯
  12. </view>
  13. <view class="connect">
  14. <image src="@/static/index/dianhua.png" mode=""
  15. style="width: 30rpx;height: 30rpx;display: inline-block;"></image>
  16. <view class="txt">
  17. 联系电话
  18. </view>
  19. </view>
  20. <view class="connectDes">
  21. <view class="num">
  22. {{item.phone}}
  23. </view>
  24. <view class="callBtn" @click="call(item.phone)">
  25. 拨号
  26. </view>
  27. </view>
  28. <view class="addr">
  29. <image src="@/static/index/weizhi.png" mode=""
  30. style="width: 24rpx;height: 32rpx;display: inline-block;"></image>
  31. <view class="txt">
  32. {{item.company}}
  33. </view>
  34. </view>
  35. <view class="addrInfo">
  36. <view class="txt">
  37. {{item.address}}
  38. </view>
  39. <image @click="daohang(item)" src="@/static/index/daohang.png" mode=""
  40. style="width: 36rpx;height: 36rpx;display: inline-block;"></image>
  41. </view>
  42. </view>
  43. </view>
  44. <u-loadmore style="" loadmoreText="已经到底啦" color="#CCCCCC" lineColor="#CCCCCC" line />
  45. <u-loading-page :loading="loading" image="/static/index/logo.png" loading-text="页面加载中..."></u-loading-page>
  46. </view>
  47. </template>
  48. <script>
  49. import {
  50. getAddressDataReq,
  51. } from '@/api/index/index.js'
  52. export default {
  53. components: {
  54. },
  55. data() {
  56. return {
  57. picUrl: this.$picUrl,
  58. picBase: this.$picBase,
  59. bannerList1: [],
  60. loading: true
  61. }
  62. },
  63. async onLoad(options) {
  64. let res1 = await getAddressDataReq()
  65. if (res1.code == 0) {
  66. this.bannerList1 = res1.data
  67. this.loading = false
  68. console.log('地址轮播图数据-列表页', this.bannerList1);
  69. } else {
  70. this.loading = false
  71. this.$toast(res1.message)
  72. }
  73. },
  74. methods: {
  75. call(phone) {
  76. uni.makePhoneCall({
  77. phoneNumber: phone,
  78. })
  79. },
  80. daohang(item) {
  81. console.log('item', item, {
  82. name: item.company,
  83. address: item.address,
  84. latitude: item.latitude,
  85. longitude: item.longitude,
  86. });
  87. uni.openLocation({
  88. name: item.company,
  89. address: item.address,
  90. latitude: Number(item.latitude),
  91. longitude: Number(item.longitude),
  92. success: function() {
  93. console.log('success');
  94. }
  95. });
  96. },
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. @import "./index.scss";
  102. </style>