editionIntro.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. // TODO 第一版本暂无此功能 后续优化以及更新
  2. <template>
  3. <view class="edition-intro">
  4. <view class="logo c-content">
  5. <view>
  6. <image src="/static/img/edition.png" mode=""></image>
  7. </view>
  8. <view>版本不息&nbsp;优化不止</view>
  9. </view>
  10. <view class="edition c-content" v-for="(item,index) in editionHistory" :key="index">
  11. <view class="level">
  12. <text style="color: #1ABC9C;">{{item.version}}</text>
  13. <text>{{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}</text>
  14. </view>
  15. <view class="detail" v-html="item.content"></view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import * as API_Message from "@/api/message.js";
  21. export default {
  22. data() {
  23. return {
  24. editionHistory: [], //版本历史
  25. params: {
  26. pageNumber: 1,
  27. pageSize: 5,
  28. },
  29. loadStatus: "more",
  30. };
  31. },
  32. onLoad() {
  33. if (uni.getSystemInfoSync().platform === "android") {
  34. this.params.type = 0;
  35. } else {
  36. this.params.type = 1;
  37. }
  38. this.GET_AppVersionList(true);
  39. },
  40. onReachBottom() {
  41. if (this.loadStatus != "noMore") {
  42. this.params.pageNumber++;
  43. this.GET_AppVersionList(false);
  44. }
  45. },
  46. methods: {
  47. GET_AppVersionList(reset) {
  48. if (reset) {
  49. this.params.pageNumber = 1;
  50. }
  51. uni.showLoading({
  52. title: "加载中",
  53. });
  54. API_Message.getAppVersionList(this.params).then((response) => {
  55. uni.hideLoading();
  56. if (response.statusCode == 200) {
  57. const { data } = response;
  58. if (data.data.length < 10) {
  59. this.loadStatus = "noMore";
  60. }
  61. this.editionHistory.push(...data.data);
  62. }
  63. });
  64. },
  65. },
  66. };
  67. </script>
  68. <style lang="scss" scoped>
  69. .edition-intro {
  70. .logo {
  71. display: flex;
  72. justify-content: center;
  73. align-items: center;
  74. flex-direction: column;
  75. font-size: $font-lg;
  76. color: $font-color-light;
  77. height: 330rpx;
  78. margin-bottom: 20rpx;
  79. > view:nth-child(1) {
  80. width: 144rpx;
  81. height: 144rpx;
  82. border: 1px solid #ffc71c;
  83. border-radius: 50%;
  84. position: relative;
  85. margin-bottom: 30rpx;
  86. image {
  87. width: 80rpx;
  88. height: 113rpx;
  89. position: absolute;
  90. top: 0;
  91. left: 0;
  92. right: 0;
  93. bottom: 0;
  94. margin: auto;
  95. }
  96. }
  97. }
  98. .edition {
  99. margin-bottom: 20rpx;
  100. color: $font-color-light;
  101. font-size: $font-sm;
  102. .level {
  103. display: flex;
  104. justify-content: space-between;
  105. align-items: center;
  106. padding: 20rpx 30rpx;
  107. border-bottom: 2rpx solid $border-color-light;
  108. text:nth-child(1) {
  109. font-size: $font-base;
  110. font-weight: 700;
  111. }
  112. }
  113. .detail {
  114. margin-left: 20rpx;
  115. line-height: 2em;
  116. padding: 20rpx 0;
  117. }
  118. }
  119. }
  120. </style>