custom.vue 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div class="page_home">
  3. <div class="swiper-slide">
  4. <div style="widht:100%;height:100%">
  5. <iframe :src = this.customUrl width="100%" height="100%" marginwidth="0" frameborder="no" scrolling="no"></iframe>
  6. </div>
  7. </div>
  8. <!-- tab切换 -->
  9. <div class="tabs">
  10. <ul class="tabList">
  11. <li
  12. class="tabOne"
  13. v-for="item in this.navigationdata"
  14. :key="item.id"
  15. @click="CallPhone(item.linktype,item.navaddress,item.user_org_id)">
  16. <img :src="item.nonavimages" alt />
  17. <span>{{item.navtitle}}</span>
  18. </li>
  19. </ul>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import { getDefalutNavigationData,} from "@/api/micro/micro";
  25. export default {
  26. data() {
  27. return {
  28. navigationdata: [],
  29. url:"",
  30. customUrl:"http://wx.kuyicloud.com/weixin/im/"+this.url,
  31. };
  32. },
  33. methods: {
  34. getDefalutNavigationData(orgid) {
  35. getDefalutNavigationData(orgid).then(response => {
  36. if (response.data.state == 1) {
  37. var navigation = response.data.data.navigation;
  38. for (let index = 0; index < navigation.length; index++) {
  39. navigation[1].nonavimages = "https://images.shengws.com/2101_o_1571990903053.png";
  40. }
  41. console.log("navigation是什么", navigation);
  42. this.navigationdata = navigation;
  43. }
  44. });
  45. },
  46. CallPhone(linktype, address,orgid) {
  47. console.log("orgid是什么啊",orgid)
  48. console.log("linktype",linktype)
  49. if(linktype == "1"){
  50. this.$router.push({
  51. path:"/microHome",
  52. query:{
  53. orgid:orgid,
  54. }
  55. })
  56. }
  57. // if (linktype == "2") {
  58. // // window.location.href = address;
  59. // this.$router.push({
  60. // path: "/contactus",
  61. // query: {
  62. // orgid: orgid
  63. // }
  64. // });
  65. // }
  66. if (linktype == "3") {
  67. window.location.href = "tel://" + address + "";
  68. }
  69. if (linktype == "4") {
  70. // window.location.href = address;
  71. this.$router.push({
  72. path:"/contactus",
  73. query:{
  74. orgid:orgid
  75. }
  76. })
  77. }
  78. },
  79. },
  80. created(){
  81. const orgid = this.$route.query.orgid;
  82. this.url = orgid;
  83. console.log("我的世界", orgid);
  84. this.getDefalutNavigationData(orgid);
  85. },
  86. };
  87. </script>
  88. <style lang="scss" scoped>
  89. @import "../../assets/styles/mixin.scss";
  90. .page_home {
  91. overflow: hidden;
  92. display: flex;
  93. flex-direction: column;
  94. height: 100%;
  95. > div:first-child {
  96. flex: 1;
  97. overflow: auto;
  98. }
  99. > div:first-child::-webkit-scrollbar {
  100. width: 0;
  101. }
  102. // border:solid 1px red;
  103. }
  104. // .bugone{
  105. // border: solid 1px red;
  106. // }
  107. .tabs {
  108. @include border-top;
  109. width: 100%;
  110. height: 3.125rem;
  111. box-sizing: border-box;
  112. }
  113. .tabList {
  114. display: flex;
  115. justify-content: space-around;
  116. height: 100%;
  117. .tabOne {
  118. display: flex;
  119. flex-direction: column;
  120. justify-content: center;
  121. align-items: center;
  122. img {
  123. // margin-top: 0.5rem;
  124. width: 1.875rem;
  125. height: 1.875rem;
  126. }
  127. span {
  128. font-size: 0.75rem;
  129. color: #999;
  130. // line-height: 1.3125rem;
  131. }
  132. }
  133. }
  134. </style>