contactus.vue 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <div class="page_home">
  3. <!-- <iframe :src = this.customUrl width="100%" height="100%" marginwidth="0" frameborder="no" scrolling="no"></iframe> -->
  4. <div>
  5. <div v-for="item in this.ordmodel" :key="item.id" >
  6. <div class="focusImg" v-if="item.mode_type == 1">
  7. <div class="swiper-container">
  8. <div class="swiper-wrapper">
  9. <div class="swiper-slide" v-for="it in item.Conrotation" :key="it.id">
  10. <img class="imgtwo" :src="it.images" />
  11. </div>
  12. </div>
  13. <!-- 如果需要分页器 -->
  14. <div class="swiper-pagination"></div>
  15. </div>
  16. <!-- <div class="swiper-pagination"></div> -->
  17. </div>
  18. <div class="row" v-if="item.mode_type == 2">
  19. <p class="title">{{item.title}}:</p>
  20. <p class="msg">{{item.Hosaddress.address}}</p>
  21. </div>
  22. <div class="row" v-if="item.mode_type == 3">
  23. <div v-for="it in Connectways" :key="it.id">
  24. <p class="title">{{it.title}}:</p>
  25. <p class="msg">{{it.content}}</p>
  26. <br />
  27. </div>
  28. </div>
  29. <div class="row" v-if="item.mode_type == 4">
  30. <p class="title">{{item.title}}:</p>
  31. <p class="msg">{{item.Worktime.worktime}}</p>
  32. </div>
  33. <div class="row" v-if="item.mode_type == 5">
  34. <p class="title">{{item.title}}:</p>
  35. <p class="msg">{{item.Rideway.ride_way}}</p>
  36. </div>
  37. </div>
  38. <!-- tab切换 -->
  39. </div>
  40. <div class="tabs">
  41. <ul class="tabList">
  42. <li
  43. class="tabOne"
  44. v-for="item in this.navigationdata"
  45. :key="item.id"
  46. @click="CallPhone(item.linktype,item.navaddress,item.user_org_id)"
  47. >
  48. <img :src="item.nonavimages" alt />
  49. <span>{{item.navtitle}}</span>
  50. </li>
  51. </ul>
  52. </div>
  53. </div>
  54. </template>
  55. <script>
  56. import Swiper from "swiper";
  57. import Vue from "vue";
  58. import { Swipe, SwipeItem } from "mint-ui";
  59. import "mint-ui/lib/style.css";
  60. import {
  61. getDefalutNavigationData,
  62. getOrderModel,
  63. getAllConnecWay
  64. } from "@/api/micro/micro";
  65. export default {
  66. data() {
  67. return {
  68. navigationdata: [],
  69. ordmodel: [],
  70. Connectways: []
  71. };
  72. },
  73. methods: {
  74. getDefalutNavigationData(orgid) {
  75. getDefalutNavigationData(orgid).then(response => {
  76. if (response.data.state == 1) {
  77. var navigation = response.data.data.navigation;
  78. for (let index = 0; index < navigation.length; index++) {
  79. navigation[3].nonavimages = "https://images.shengws.com/2124_o_1571990749565.png";
  80. }
  81. console.log("navigation是什么", navigation);
  82. this.navigationdata = navigation;
  83. }
  84. });
  85. },
  86. initSwiper() {
  87. var mySwiper1 = new Swiper(".swiper-container", {
  88. loop: true, // 循环模式选项
  89. pagination: {
  90. el: ".swiper-pagination"
  91. },
  92. // autoplay: {
  93. // disableOnInteraction: false
  94. // }
  95. autoplay: true
  96. });
  97. },
  98. getOrderModel(orgid) {
  99. getOrderModel(orgid).then(response => {
  100. if (response.data.state == 1) {
  101. var ordmodel = response.data.data.ordmodel;
  102. console.log("ordmodel是什么", ordmodel);
  103. this.ordmodel = response.data.data.ordmodel;
  104. }
  105. });
  106. },
  107. getAllConnecWay(orgid) {
  108. getAllConnecWay(orgid).then(response => {
  109. if (response.data.state == 1) {
  110. var connect = response.data.data.connect;
  111. this.Connectways = connect;
  112. }
  113. });
  114. },
  115. CallPhone(linktype, address, orgid) {
  116. console.log("orgid是什么啊", orgid);
  117. console.log("linktype", linktype);
  118. if (linktype == "1") {
  119. this.$router.push({
  120. path: "/microHome",
  121. query: {
  122. orgid: orgid
  123. }
  124. });
  125. }
  126. if (linktype == "2") {
  127. // window.location.href = address;
  128. this.$router.push({
  129. path: "/custom",
  130. query: {
  131. orgid: orgid
  132. }
  133. });
  134. }
  135. if (linktype == "3") {
  136. window.location.href = "tel://" + address + "";
  137. }
  138. // if (linktype == "4") {
  139. // // window.location.href = address;
  140. // this.$router.push({
  141. // path: "/custom",
  142. // query: {
  143. // orgid: orgid
  144. // }
  145. // });
  146. // }
  147. // if (linktype == "4") {
  148. // // window.location.href = address;
  149. // this.$router.push({
  150. // path:"/custom",
  151. // query:{
  152. // orgid:orgid
  153. // }
  154. // })
  155. // }
  156. }
  157. },
  158. created() {
  159. const orgid = this.$route.query.orgid;
  160. console.log("我的", orgid);
  161. this.url = orgid;
  162. this.getDefalutNavigationData(orgid);
  163. this.getOrderModel(orgid);
  164. this.getAllConnecWay(orgid);
  165. this.initSwiper();
  166. },
  167. updated() {
  168. this.initSwiper();
  169. }
  170. };
  171. </script>
  172. <style lang="scss" scoped>
  173. @import "../../assets/styles/mixin.scss";
  174. // .page_home {
  175. // overflow: hidden;
  176. // display: flex;
  177. // flex-direction: column;
  178. // height: 100%;
  179. // overflow-y: auto;
  180. // > div:first-child {
  181. // flex: 1;
  182. // overflow: auto;
  183. // }
  184. // > div:first-child::-webkit-scrollbar {
  185. // width: 0;
  186. // }
  187. // // border:solid 1px red;
  188. // }
  189. // .bugone{
  190. // border: solid 1px red;
  191. // }
  192. .tabs {
  193. @include border-top;
  194. width: 100%;
  195. height: 3.125rem;
  196. box-sizing: border-box;
  197. }
  198. .tabList {
  199. display: flex;
  200. justify-content: space-around;
  201. height: 100%;
  202. .tabOne {
  203. display: flex;
  204. flex-direction: column;
  205. justify-content: center;
  206. align-items: center;
  207. img {
  208. // margin-top: 0.5rem;
  209. width: 1.875rem;
  210. height: 1.875rem;
  211. }
  212. span {
  213. font-size: 0.75rem;
  214. color: #999;
  215. // line-height: 1.3125rem;
  216. }
  217. }
  218. }
  219. .page_home {
  220. overflow: hidden;
  221. height: 100%;
  222. // > div:nth-of-type(2) {
  223. // min-height: 5.125rem;
  224. // }
  225. display: flex;
  226. flex-direction: column;
  227. > div:first-child {
  228. flex: 1;
  229. overflow: auto;
  230. }
  231. // > div:nth-of-type(2) {
  232. // min-height: 3rem;
  233. // }
  234. > div:nth-of-type(3) {
  235. min-height: 3.125rem;
  236. }
  237. > div:nth-of-type(4) {
  238. min-height: 2.9rem;
  239. }
  240. .focusImg {
  241. width: 23.4375rem;
  242. height: 11.5625rem;
  243. img {
  244. width: 100%;
  245. height: 100%;
  246. }
  247. .swiper-container {
  248. height: 100%;
  249. }
  250. }
  251. .space {
  252. margin: 0 1.25rem;
  253. }
  254. .row {
  255. font-size: 1rem;
  256. font-weight: 600;
  257. color: rgba(7, 18, 40, 1);
  258. line-height: 2.375rem;
  259. min-height: 2.375rem;
  260. width: 21.125rem;
  261. margin: 0 1.25rem;
  262. // border: 1px solid #000;
  263. .title {
  264. float: left;
  265. width: 5rem;
  266. }
  267. .msg {
  268. float: left;
  269. width: 16rem;
  270. line-height: 2.375rem;
  271. min-height: 2.375rem;
  272. word-wrap: break-word;
  273. word-break: break-all;
  274. // overflow-x: hidden;
  275. }
  276. }
  277. .one {
  278. min-height: 1rem;
  279. // line-height: 3rem;
  280. }
  281. .detail {
  282. width: 21.125rem;
  283. margin: 1.1875rem 1.25rem 0 1.25rem;
  284. }
  285. }
  286. .modeone {
  287. min-height: 210px;
  288. // border:solid 1px red;
  289. }
  290. </style>