mobile-home.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div style="height: 100vh; width: 100vw">
  3. <van-nav-bar title="首页" />
  4. <van-row>
  5. <van-col span="24">
  6. <div class="bgImg"></div>
  7. </van-col>
  8. </van-row>
  9. <van-row>
  10. <van-grid :column-num="3" clickable :gutter="10" style="margin-top: 20px">
  11. <van-grid-item to="/mobile-estimatedData">
  12. <div style="position: relative; height: 120px; width: 100%">
  13. <img
  14. src="../../assets/mobile-Page-Image/home_slices/z_459.png"
  15. alt=""
  16. style="width: 100%; height: 100%; position: absolute"
  17. />
  18. <span
  19. style="
  20. position: absolute;
  21. bottom: 10px;
  22. width: 100%;
  23. text-align: center;
  24. color: #999;
  25. "
  26. >
  27. 月预估数据
  28. </span>
  29. </div>
  30. </van-grid-item>
  31. <van-grid-item @click="callService">
  32. <div style="position: relative; height: 120px; width: 100%">
  33. <img
  34. src="../../assets/mobile-Page-Image/home_slices/z_460.png"
  35. alt=""
  36. style="width: 100%; height: 100%; position: absolute"
  37. />
  38. <span
  39. style="
  40. position: absolute;
  41. bottom: 10px;
  42. width: 100%;
  43. text-align: center;
  44. color: #999;
  45. "
  46. >
  47. 联系服务专员
  48. </span>
  49. </div>
  50. </van-grid-item>
  51. </van-grid>
  52. </van-row>
  53. <van-tabbar route active-color="#B2568C" inactive-color="#999">
  54. <van-tabbar-item replace to="/mobile-home" icon="wap-home">
  55. <span>首页</span>
  56. <template #icon="props">
  57. <img src="../../assets/mobile-Page-Image/home_slices/z_127.png" />
  58. </template>
  59. </van-tabbar-item>
  60. <van-tabbar-item replace to="/mobile-main" icon="user-o">
  61. <span>我的</span>
  62. <template #icon="props">
  63. <img src="../../assets/mobile-Page-Image/home_slices/z_134.png" />
  64. </template>
  65. </van-tabbar-item>
  66. </van-tabbar>
  67. </div>
  68. </template>
  69. <script>
  70. import { Dialog } from 'vant'
  71. import { Toast } from 'vant'
  72. import apis from '@.mobile/api/apis'
  73. import common from '@.mobile/plugin/axios/common'
  74. export default {
  75. data() {
  76. return {
  77. phoneNum: ''
  78. }
  79. },
  80. mounted() {
  81. const user = common.currUser()
  82. if (user && user.qyfwzyid) {
  83. console.log(user.qyfwzyid)
  84. this.phoneNum = user.qyfwzyid
  85. }
  86. },
  87. methods: {
  88. callService() {
  89. let content = '您确认拨打' + this.phoneNum + '吗?'
  90. Dialog.confirm({
  91. title: '拨打电话',
  92. message: content
  93. }).then(action => {
  94. window.location.href = 'tel://' + this.phoneNum
  95. })
  96. },
  97. toMain() {
  98. this.$router.push('/mobile-main')
  99. },
  100. toEstimated() {
  101. this.$router.push('/mobile-estimatedData')
  102. }
  103. }
  104. }
  105. </script>
  106. <style scoped>
  107. .bgImg {
  108. background: url(../../assets/mobile-Page-Image/home_slices/mbz2.png) no-repeat;
  109. width: 100vw;
  110. height: 40vw;
  111. background-size: 100%;
  112. }
  113. ::v-deep .van-grid-item__content {
  114. padding: 0;
  115. border-radius: 10px;
  116. }
  117. </style>