index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view>
  3. <view class="status_bar"></view>
  4. <view class="" style="position: relative;top: 44px;">
  5. <view style="position: fixed;z-index: 100;">
  6. <uni-nav-bar @clickLeft="clickLeft" left-icon="back" left-text="返回" title="专家诊断"></uni-nav-bar>
  7. </view>
  8. <image src="../../static/image/expertDiagnosis/05571341dbb0771b23d0b271764ac2e.png" class="expertimages"></image>
  9. <view class="expert_details">
  10. <view class="details_item" @click="worm">
  11. <image src="../../static/image/expertDiagnosis/6612b1293fd1f45dd7ce6269a954999.png"></image>
  12. <p>虫情百科</p>
  13. </view>
  14. <view class="details_item" @click="virus">
  15. <image src="../../static/image/expertDiagnosis/7f34f4eeba4d00819369cfa1b5ecce8.png"></image>
  16. <p>病害百科</p>
  17. </view>
  18. <view class="details_item" @click="exchange">
  19. <image src="../../static/image/expertDiagnosis/aa6a168b9fb72b62b687a2debc04a9f.png"></image>
  20. <p>交流圈</p>
  21. </view>
  22. </view>
  23. <view class="cooperation">
  24. <view class="cooperation_item">
  25. <p class="cooperation_item_title">合作单位</p>
  26. <view class="zooid">
  27. <view class="zooid_item" v-for="(item,index) in cooperation_unit" :key="index">
  28. <image :src="item.img_urls" mode=""></image>
  29. <p>{{item.name}}</p>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="cooperation_item">
  34. <p class="cooperation_item_title">合作院校</p>
  35. <view class="zooid">
  36. <view class="zooid_item" v-for="(item,index) in cooperation_academy" :key="index">
  37. <image :src="item.img_urls" mode=""></image>
  38. <p>{{item.name}}</p>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="cooperation_item">
  43. <p class="cooperation_item_title">合作专家</p>
  44. <view class="zooid">
  45. <view class="zooid_item" v-for="(item,index) in cooperation_specialist" :key="index">
  46. <image :src="item.img_urls" mode=""></image>
  47. <p>{{item.name}}</p>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. cooperation_academy: [], //合作院校信息
  60. cooperation_unit: [], //合作单位信息
  61. cooperation_specialist: [], //合作专家信息
  62. }
  63. },
  64. methods: {
  65. async getCooperation(code) {
  66. const res = await this.$myRequest({
  67. url: '/api/api_gateway?method=pest.pests.pests_expert',
  68. data: {
  69. code: code
  70. }
  71. })
  72. console.log(res)
  73. if (code == 1) {
  74. this.cooperation_unit = res.data
  75. } else if (code == 2) {
  76. this.cooperation_academy = res.data
  77. } else if (code == 3) {
  78. this.cooperation_specialist = res.data
  79. }
  80. },
  81. clickLeft() {
  82. uni.switchTab({
  83. url: "../index/index"
  84. })
  85. },
  86. worm() {
  87. uni.navigateTo({
  88. url: "./wormcase?name=" + '虫情百科',
  89. });
  90. },
  91. virus() {
  92. uni.navigateTo({
  93. url: "./wormcase?name=" + '病毒百科',
  94. });
  95. },
  96. exchange() {
  97. uni.navigateTo({
  98. url: "./exchangeShare"
  99. });
  100. }
  101. },
  102. onLoad() {
  103. this.getCooperation(1)
  104. this.getCooperation(2)
  105. this.getCooperation(3)
  106. }
  107. }
  108. </script>
  109. <style lang="scss">
  110. .expertimages {
  111. width: 100%;
  112. height: 154rpx;
  113. margin-top: 88rpx;
  114. }
  115. .expert_details {
  116. width: 100%;
  117. height: 120rpx;
  118. display: flex;
  119. justify-content: space-around;
  120. margin: 20rpx 0 30rpx;
  121. .details_item {
  122. width: 20%;
  123. padding: 10rpx 20rpx;
  124. text-align: center;
  125. font-size: 24rpx;
  126. image {
  127. width: 70%;
  128. height: 84rpx;
  129. }
  130. }
  131. }
  132. .cooperation {
  133. width: 100%;
  134. margin: 20rpx 0 60rpx;
  135. .cooperation_item {
  136. width: 95%;
  137. margin: 20rpx auto;
  138. .cooperation_item_title {
  139. border-left: 8rpx solid #18B566;
  140. text-indent: 16rpx;
  141. }
  142. .zooid {
  143. width: 100%;
  144. display: flex;
  145. flex-wrap: wrap;
  146. margin-top: 20rpx;
  147. .zooid_item {
  148. width: 22%;
  149. margin: 10rpx;
  150. image {
  151. width: 100%;
  152. height: 154rpx;
  153. }
  154. p {
  155. font-size: 24rpx;
  156. text-align: center;
  157. margin: 10rpx 0;
  158. }
  159. }
  160. }
  161. }
  162. }
  163. </style>