version_record.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view>
  3. <view class="list">
  4. <view class="item" v-for="(item,index) in list" :key="index">
  5. <view class="title">{{item.title}}</view>
  6. <view class="box">
  7. <view class="left">
  8. <view class="line">更新类型:{{item.type | set_type}}</view>
  9. <view class="line">更新内容:{{item.contents}}</view>
  10. <view class="line">更新时间:{{item.create_date | conversion}}</view>
  11. </view>
  12. </view>
  13. <view class="tip">{{item.version}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import {
  20. set_appName
  21. } from '@/common/set_base_url.js'
  22. export default {
  23. data() {
  24. return {
  25. appName: "",
  26. list: []
  27. };
  28. },
  29. onLoad() {
  30. this.appName = set_appName(uni.getStorageSync('mine_code'))
  31. this.get_list()
  32. },
  33. methods: {
  34. get_list() {
  35. uni.showLoading({
  36. mask:true
  37. })
  38. uniCloud.callFunction({
  39. name: "get_version_record",
  40. data: {
  41. appName: this.appName
  42. }
  43. }).then((res) => {
  44. uni.hideLoading()
  45. console.log(res.result.data)
  46. this.list = res.result.data
  47. })
  48. }
  49. },
  50. filters: {
  51. conversion: function(value) {
  52. return new Date(value).toLocaleString();
  53. },
  54. set_type: function(value) {
  55. if(value == 'wgt'){
  56. return "资源包更新"
  57. }else if(value == 'native_app'){
  58. return "APP版本更新"
  59. }
  60. },
  61. },
  62. }
  63. </script>
  64. <style lang="scss">
  65. page {
  66. background-color: #F2FAF7;
  67. box-sizing: border-box;
  68. padding: 20rpx 25rpx;
  69. }
  70. .list {
  71. .item {
  72. position: relative;
  73. overflow: hidden;
  74. background-color: #FFFFFF;
  75. box-sizing: border-box;
  76. padding: 25rpx;
  77. border-radius: 15rpx;
  78. margin-bottom: 30rpx;
  79. .title{
  80. height: 70rpx;
  81. line-height: 70rpx;
  82. font-size: 36rpx;
  83. font-weight: 700;
  84. }
  85. .box{
  86. margin-top: 10rpx;
  87. .left {
  88. display: flex;
  89. flex-direction: column;
  90. justify-content: space-between;
  91. .line{
  92. margin-top: 10rpx;
  93. line-height: 40rpx;
  94. font-size: 28rpx;
  95. color: #7f7f7f;
  96. }
  97. }
  98. }
  99. .tip{
  100. transform: rotate(45deg);
  101. background-color: #04A0E6;
  102. color: #FFFFFF;
  103. position: absolute;
  104. top: -14rpx;
  105. right: -46rpx;
  106. font-size: 24rpx;
  107. padding: 30rpx 40rpx 10rpx;
  108. }
  109. }
  110. }
  111. </style>