about.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view class="center">
  3. <heard></heard>
  4. <view class="test_title">关于我们</view>
  5. <view class="aboutBox">
  6. <view class="aboutBox-title" @click="qiehuan(0)">公司介绍</view>
  7. <view class="aboutBox-title" @click="qiehuan(1)">产品介绍</view>
  8. <view class="aboutBox-title" @click="qiehuan(2)">联系我们</view>
  9. </view>
  10. <swiper :current="currentIndex" :duration="1000" style="height: 1000rpx;">
  11. <swiper-item>
  12. <!-- v-html="gsjj.content" -->
  13. <view class="swiper-item" v-html="gsjj.content"></view>
  14. </swiper-item>
  15. <swiper-item><view class="swiper-item" v-html="products.content"></view></swiper-item>
  16. <swiper-item>
  17. <view class="swiper-item swiperRight">
  18. <view class="swiperRight-img"><image src="../../static/img/map.png" mode=""></image></view>
  19. <view class="text">
  20. <text>咨询热线:xxxxxxxxxx</text>
  21. <text>报修电话:xxxxxxxxxx</text>
  22. </view>
  23. </view>
  24. </swiper-item>
  25. </swiper>
  26. <aboutUs class="aboutUs"></aboutUs>
  27. </view>
  28. </template>
  29. <script>
  30. import { changeTaber } from '@/utils/tarberChange.js';
  31. import { articleDetail, articlelist, productlist, productDetail } from '@/api/index.js';
  32. import aboutUs from '@/components/public/introduce.vue';
  33. import heard from '@/components/public/heard.vue';
  34. export default {
  35. components: {
  36. aboutUs,
  37. heard
  38. },
  39. data() {
  40. return {
  41. indexList: [],
  42. topNavWidth: '12%', //设置导航默认宽度
  43. classIndex: 0, //当前进行中的活动
  44. itemWidht: 0, //顶部分类宽度
  45. loadingType: 'more', //加载更多状态
  46. actionClassInd: 0,
  47. page: 1,
  48. limit: 10,
  49. currentIndex: 0,
  50. gsjj: {},
  51. products: {}
  52. };
  53. },
  54. onLoad() {
  55. this.getGsjj(2);
  56. this.getproducts(3);
  57. },
  58. onShow() {
  59. this.$nextTick(function() {
  60. changeTaber(1);
  61. });
  62. },
  63. methods: {
  64. async loadData() {
  65. const obj = this;
  66. },
  67. tabClass(item, index) {
  68. this.classIndex = index;
  69. this.actionClassId = index;
  70. let ls = this.indexList[this.actionClassInd];
  71. },
  72. qiehuan(index) {
  73. console.log(index);
  74. this.currentIndex = index * 1;
  75. },
  76. getGsjj(id) {
  77. articleDetail({}, id)
  78. .then(res => {
  79. console.log(res, '111111');
  80. this.gsjj = res.data;
  81. })
  82. .catch(err => {
  83. this.gsjj = err.data;
  84. console.log(err, 'cuoww');
  85. });
  86. },
  87. getproducts(id) {
  88. productDetail({}, id)
  89. .then(res => {
  90. console.log(res, '111111');
  91. this.products = res.data;
  92. })
  93. .catch(err => {
  94. this.products = err.data;
  95. console.log(err, 'cuoww');
  96. });
  97. }
  98. }
  99. };
  100. </script>
  101. <style lang="scss">
  102. .img {
  103. margin: 17rpx 0 17rpx 41rpx;
  104. width: 208rpx;
  105. height: 52rpx;
  106. image {
  107. width: 100%;
  108. height: 100%;
  109. }
  110. }
  111. .test_title {
  112. display: flex;
  113. justify-content: center;
  114. align-items: center;
  115. width: 100%;
  116. height: 60rpx;
  117. font-size: 22rpx;
  118. font-family: Adobe Heiti Std;
  119. font-weight: normal;
  120. color: #ffffff;
  121. background-color: #0165b5;
  122. }
  123. // .class-box {
  124. // background: #FFFFFF;
  125. // white-space: nowrap;
  126. // height: 78rpx;
  127. // .item {
  128. // text-align: center;
  129. // display: inline-block;
  130. // color: $font-color-base;
  131. // margin: 26rpx 34rpx 15rpx 29rpx;
  132. // background-color: #ffffff;
  133. // line-height: 1;
  134. // .time {
  135. // font-family: PingFang SC;
  136. // font-weight: bold;
  137. // font-size: 30rpx;
  138. // padding-bottom: 19rpx;
  139. // &.action {
  140. // color: #ff0000;
  141. // border-bottom: 4rpx solid #FF0000;
  142. // }
  143. // }
  144. // }
  145. .aboutBox {
  146. display: flex;
  147. justify-content: space-between;
  148. width: 100%;
  149. height: 60rpx;
  150. .aboutBox-title {
  151. display: flex;
  152. justify-content: center;
  153. align-items: center;
  154. width: 33.3%;
  155. background: #127fd5;
  156. font-size: 22rpx;
  157. font-family: Adobe Heiti Std;
  158. font-weight: normal;
  159. color: #ffffff;
  160. line-height: 67rpx;
  161. }
  162. }
  163. .swiper-item {
  164. }
  165. .swiperRight {
  166. margin-top: 140rpx;
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. .swiperRight-img {
  171. width: 560rpx;
  172. height: 266rpx;
  173. image {
  174. width: 100%;
  175. height: 100%;
  176. }
  177. }
  178. }
  179. .text {
  180. margin-top: 80rpx;
  181. display: flex;
  182. flex-direction: column;
  183. font-size: 10rpx;
  184. font-family: Adobe Heiti Std;
  185. font-weight: normal;
  186. color: #000000;
  187. line-height: 40rpx;
  188. }
  189. </style>