index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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="$appimghost+'/image/expertDiagnosis/05571341dbb0771b23d0b271764ac2e.png'" class="expertimages"></image>
  9. <view class="expert_details">
  10. <view class="details_item" @click="worm">
  11. <image :src="$appimghost+'/image/expertDiagnosis/6612b1293fd1f45dd7ce6269a954999.png'"></image>
  12. <p>虫情百科</p>
  13. </view>
  14. <view class="details_item" @click="virus">
  15. <image :src="$appimghost+'/image/expertDiagnosis/7f34f4eeba4d00819369cfa1b5ecce8.png'"></image>
  16. <p>病害百科</p>
  17. </view>
  18. <view class="details_item" @click="exchange">
  19. <image :src="$appimghost+'/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. onBackPress(options) {
  108. if (options.from === 'navigateBack') {
  109. return false;
  110. }
  111. this.clickLeft();
  112. return true;
  113. },
  114. }
  115. </script>
  116. <style lang="scss">
  117. .expertimages {
  118. width: 100%;
  119. height: 200rpx;
  120. margin-top: 88rpx;
  121. }
  122. .expert_details {
  123. width: 100%;
  124. height: 120rpx;
  125. display: flex;
  126. justify-content: space-around;
  127. margin: 20rpx 0 30rpx;
  128. .details_item {
  129. width: 20%;
  130. padding: 10rpx 20rpx;
  131. text-align: center;
  132. font-size: 24rpx;
  133. image {
  134. width: 70%;
  135. height: 84rpx;
  136. }
  137. }
  138. }
  139. .cooperation {
  140. width: 100%;
  141. margin: 20rpx 0 60rpx;
  142. .cooperation_item {
  143. width: 95%;
  144. margin: 20rpx auto;
  145. .cooperation_item_title {
  146. border-left: 8rpx solid #18B566;
  147. text-indent: 16rpx;
  148. }
  149. .zooid {
  150. width: 100%;
  151. display: flex;
  152. flex-wrap: wrap;
  153. margin-top: 20rpx;
  154. .zooid_item {
  155. width: 22%;
  156. margin: 10rpx;
  157. image {
  158. width: 100%;
  159. height: 154rpx;
  160. }
  161. p {
  162. font-size: 24rpx;
  163. text-align: center;
  164. margin: 10rpx 0;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. </style>