badgeDetails-old.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view>
  3. <u-navbar title="荣誉详情"></u-navbar>
  4. <!-- 荣誉名称 -->
  5. <view class="honor-name">
  6. <view class="icon">
  7. <!-- <img :src="info.img" alt=""> -->
  8. <!-- <img src="@/assets/img/honorPic2.png" alt=""> -->
  9. </view>
  10. <view class="explain">
  11. {{info.content}}
  12. </view>
  13. </view>
  14. <!-- 荣誉记录 -->
  15. <view class="record">
  16. <view class="record-title">
  17. <view class="rec">
  18. </view>
  19. <view class="text">
  20. 荣誉记录
  21. </view>
  22. </view>
  23. <view class="commend-box" v-for="(item,i) in list" :key="i">
  24. <view class="commend-content">
  25. <view class="title">
  26. {{item.orgName?item.orgName:item.typeName}}
  27. </view>
  28. <view class="commendation">
  29. {{item.content}}
  30. </view>
  31. <view class="integral">
  32. <view class="flex">
  33. <view class="icon">
  34. <img src="../../../assets/img/riFill-copper-diamond-fill@2x.png" alt="">
  35. </view>
  36. <view class="text">
  37. {{item.scoreInfo}}积分
  38. </view>
  39. </view>
  40. <view class="date">
  41. {{item.createTime}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <u-divider bg-color="#F2F4F4" border-color="#CFD2D5">已经到底了</u-divider>
  48. </view>
  49. </template>
  50. <script>
  51. import * as API from '@/apis/pagejs/cite.js'
  52. export default {
  53. data() {
  54. return {
  55. type:'',
  56. listForm:{
  57. pageIndex:1,
  58. pageSize:20,
  59. },
  60. info:{},
  61. list:[],
  62. recordsTotal:0,
  63. }
  64. },
  65. onLoad(op){
  66. this.type=op.id
  67. this.getInfo()
  68. },
  69. onReachBottom() {
  70. if (this.list.length < this.recordsTotal) {
  71. this.myLoadmore();
  72. }
  73. },
  74. methods: {
  75. myLoadmore(){
  76. this.listForm.pageIndex += 1;
  77. this.getList();
  78. },
  79. getInfo(){
  80. uni.showLoading({
  81. title: "加载中",
  82. mask: true,
  83. })
  84. API.editBadge(this.type).then((res) => {
  85. uni.hideLoading();
  86. //this.list=response.data.data
  87. this.info=res.data.cite;
  88. }).catch(error => {
  89. uni.showToast({
  90. title: error,
  91. icon: "none"
  92. })
  93. })
  94. },
  95. getList(){
  96. uni.showLoading({
  97. title: "加载中",
  98. mask: true,
  99. })
  100. API.pageList(this.listForm).then((res) => {
  101. uni.hideLoading();
  102. //this.list=response.data.data
  103. if(this.listForm.pageIndex==1){
  104. this.list = res.data.data;
  105. }else{
  106. this.list = [
  107. ...this.list,
  108. ...res.data.data
  109. ];
  110. }
  111. this.recordsTotal = res.data.recordsTotal;
  112. }).catch(error => {
  113. uni.showToast({
  114. title: error,
  115. icon: "none"
  116. })
  117. })
  118. },
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. page{
  124. font-family: 'Regular';
  125. }
  126. // 荣誉名称
  127. .honor-name {
  128. background-color: #fff;
  129. padding: 32rpx 0;
  130. text-align: center;
  131. .icon {
  132. img {
  133. max-width: 536rpx;
  134. height: 140rpx;
  135. }
  136. }
  137. .name {
  138. color: rgba(51, 51, 51, 1);
  139. font-size: 18px;
  140. }
  141. .explain {
  142. color: rgba(119, 119, 119, 1);
  143. margin-top: 24rpx;
  144. }
  145. }
  146. // 荣誉记录
  147. .record {
  148. margin-top: 26px;
  149. padding: 0 32rpx;
  150. .record-title {
  151. display: flex;
  152. align-items: center;
  153. margin-bottom: 19px;
  154. color: rgba(51, 51, 51, 1);
  155. font-size: 18px;
  156. line-height: 18px;
  157. font-family: 'Regular';
  158. .rec {
  159. width: 4px;
  160. height: 16px;
  161. background-color: rgba(31, 74, 153, 1);
  162. margin-right: 4px;
  163. }
  164. }
  165. .commend-box {
  166. background-color: #fff;
  167. border-radius: 8px;
  168. padding: 24rpx;
  169. display: flex;
  170. justify-content: space-between;
  171. margin-bottom: 12px;
  172. .commend-content {
  173. width: 100%;
  174. .title {
  175. color: rgba(51, 51, 51, 1);
  176. font-size: 16px;
  177. line-height: 23px;
  178. font-family: 'Medium';
  179. }
  180. .commendation {
  181. color: rgba(119, 119, 119, 1);
  182. font-size: 12px;
  183. line-height: 17px;
  184. margin-top: 4rpx;
  185. }
  186. .integral {
  187. margin-top: 14rpx;
  188. display: flex;
  189. align-items: center;
  190. justify-content: space-between;
  191. .flex{
  192. display: flex;
  193. border-radius: 50px;
  194. height: 28px;
  195. font-size: 24rpx;
  196. background-color: rgba(230, 239, 255, 1);
  197. justify-content: center;
  198. align-items: center;
  199. padding: 0 16rpx;
  200. .icon {
  201. width: 32rpx;
  202. height: 32rpx;
  203. img {
  204. width: 100%;
  205. }
  206. }
  207. .text {
  208. font-size: 24rpx;
  209. color: rgba(119, 119, 119, 1);
  210. }
  211. }
  212. }
  213. .date{
  214. color: rgba(153, 153, 153, 1);
  215. font-size: 12px;
  216. }
  217. }
  218. }
  219. }
  220. </style>