xjy_XiangQing.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <view class="box">
  3. <u-navbar title="宣讲员介绍" autoBack :placeholder="true" bgColor="#fee1b9"></u-navbar>
  4. <view class="ban">
  5. <view class="top_box">
  6. <img src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418" class="img" />
  7. <view class="name_box">
  8. <view class="">{{details.name}}</view>
  9. <view class="name_js">{{details.sex_text}},来自福建厦门,擅长中国历史文物讲解</view>
  10. </view>
  11. </view>
  12. <view class="xxjs">
  13. {{details.intro}}
  14. </view>
  15. <view class="" style="display: flex">
  16. <img class="left_img" src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418" style="" />
  17. <view class="">
  18. <view class="">
  19. <img src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418" class="img_js" />
  20. </view>
  21. <view class="">
  22. <img src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418" class="img_js" />
  23. </view>
  24. </view>
  25. </view>
  26. <!-- -->
  27. <view class="ld">历史讲解</view>
  28. <scroll-view scroll-x enable-flex class="scroll-view_H" type="list">
  29. <view class="goods-item" v-for="item in xuanjiangActivityList" :key="item">
  30. <image class="img" style="" :src="item.image" />
  31. <view style="margin-left: 20rpx">
  32. <view>{{item.title}}</view>
  33. <view class="gs_js">精彩瞬间</view>
  34. </view>
  35. </view>
  36. </scroll-view>
  37. <view class="ld">用户评价</view>
  38. <view class="">
  39. <view class="top_box">
  40. <img src="https://img2.baidu.com/it/u=443975182,626431415&fm=253&fmt=auto&app=120&f=JPEG?w=627&h=418" class="img" />
  41. <view class="name_box">
  42. <view class="">
  43. 赵丽
  44. <view class="" style="margin-top: 6rpx; display: flex; align-items: center">
  45. <u-icon v-for="item in 5" :key="item" name="star-fill" color="#86827c" size="12"></u-icon>
  46. <view class="name_js" style="margin-left: 6rpx; font-size: 22rpx">2023-5-13</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="" style="margin-top: 10rpx; font-size: 26rpx">讲解生动形象非常生动有趣,内容丰富,值得推荐!</view>
  52. <view class="icon_box" style="">
  53. <u-icon name="thumb-up" color="#86827c" size="20"></u-icon>
  54. <u-icon name="thumb-down" color="#86827c" size="20"></u-icon>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. let that;
  62. export default {
  63. data() {
  64. return {
  65. xuanjiangActivityList: [],
  66. details: [],
  67. volunteer_id: ''
  68. };
  69. },
  70. onLoad(option) {
  71. that = this;
  72. that.volunteer_id = option.id;
  73. that.getXuanjiangDetails();
  74. that.getActivityReviewList();
  75. },
  76. methods: {
  77. getXuanjiangDetails() {
  78. this.$api.getXuanjiangDetails(
  79. {
  80. volunteer_id: that.volunteer_id
  81. },
  82. data => {
  83. if (data.code == 0) {
  84. that.$common.errorToShow(data.msg);
  85. return;
  86. } else {
  87. that.details = data.data;
  88. console.log(that.details, '文物跑活动宣讲员详情');
  89. }
  90. }
  91. );
  92. },
  93. // 活动精彩
  94. getActivityReviewList() {
  95. this.$api.getContentList(
  96. {
  97. page: 1,
  98. pageSize: 4,
  99. model_id: 15,
  100. main_body_column_id: 186 ,
  101. volunteer_id: that.volunteer_id
  102. },
  103. data => {
  104. if (data.code == 0) {
  105. that.$common.errorToShow(data.msg);
  106. return;
  107. } else {
  108. that.xuanjiangActivityList = data.data;
  109. console.log(that.xuanjiangActivityList, '宣讲员参与的活动');
  110. }
  111. }
  112. );
  113. },
  114. }
  115. };
  116. </script>
  117. <style>
  118. .box {
  119. height: auto;
  120. width: 100%;
  121. padding-bottom: 50rpx;
  122. background-image: url('https://huli-app.wenlvti.net/app_static/minnanhun/image/gj_bg.png');
  123. background-repeat: repeat-y;
  124. background-size: 100%;
  125. }
  126. .ban {
  127. width: 92%;
  128. margin: auto;
  129. }
  130. .img {
  131. width: 80rpx;
  132. height: 80rpx;
  133. border-radius: 50%;
  134. }
  135. .top_box {
  136. display: flex;
  137. margin-top: 10rpx;
  138. }
  139. .name_box {
  140. margin-left: 30rpx;
  141. }
  142. .name_js {
  143. color: #8a8787;
  144. font-size: 24rpx;
  145. margin-top: 10rpx;
  146. }
  147. .xxjs {
  148. margin-top: 20rpx;
  149. text-indent: 2em;
  150. color: black;
  151. font-size: 28rpx;
  152. line-height: 40rpx;
  153. margin-bottom: 26rpx;
  154. }
  155. .img_js {
  156. width: 330rpx;
  157. height: 200rpx;
  158. border-radius: 4rpx 10rpx 4rpx 10rpx;
  159. }
  160. .left_img {
  161. width: 330rpx;
  162. height: 400rpx;
  163. margin-right: 20rpx;
  164. border-radius: 10rpx 4rpx 4rpx 10rpx;
  165. }
  166. .scroll-view_H {
  167. width: 100%;
  168. white-space: nowrap;
  169. /* height: 480rpx; */
  170. flex-direction: row;
  171. }
  172. .scroll-view_H {
  173. white-space: nowrap; /* 确保子元素在同一行显示 */
  174. width: 100%; /* 设置 scroll-view 的宽度 */
  175. }
  176. .scroll-view_H .goods-item {
  177. display: inline-block; /* 使用 inline-block 确保子元素在同一行显示 */
  178. width: 320rpx;
  179. height: 400rpx;
  180. border-radius: 10rpx;
  181. flex-direction: column;
  182. background-color: #fcedd6;
  183. margin-right: 20rpx; /* 添加右边距,最后一个子元素的右边距为 0 */
  184. }
  185. .scroll-view_H .goods-item:last-child {
  186. margin-right: 0;
  187. }
  188. .goods-item .img {
  189. width: 100%;
  190. height: 300rpx;
  191. border-radius: 10rpx;
  192. }
  193. .gs_js {
  194. font-size: 28rpx;
  195. color: #aba89a;
  196. margin-top: 10rpx;
  197. }
  198. .ld {
  199. font-size: 30rpx;
  200. font-weight: 700;
  201. margin-top: 20rpx;
  202. margin-bottom: 20rpx;
  203. }
  204. .icon_box {
  205. width: 100rpx;
  206. margin-top: 10rpx;
  207. display: flex;
  208. align-items: center;
  209. justify-content: space-between;
  210. }
  211. </style>