record.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view>
  3. <view class="records">
  4. <view class="records_itemtf" v-if="dataTF">
  5. 暂无更新记录
  6. </view>
  7. <view class="records_item" v-for="item,index in recordsdata" :key="index" @click="showtf(index)" v-else="dataTF">
  8. <view class="records_item_top">
  9. <view class="item_left">
  10. <p>版本{{item.app_num}}主要更新</p>
  11. <p>{{item.addtime|timeFormat()}}</p>
  12. </view>
  13. <view class="item_right">
  14. <u-icon :name="indexnum == index?'arrow-down':'arrow-right'"></u-icon>
  15. </view>
  16. </view>
  17. <view class="records_item_bot" v-if="indexnum == index">
  18. <p v-for="items,index in item.app_desc" :key="index">{{index+1+'、'+items}}</p>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <style lang="scss">
  25. page {
  26. background-color: #f1f1f1;
  27. }
  28. .records{
  29. margin-top: 20rpx;
  30. .records_itemtf{
  31. font-size: 30rpx;
  32. width: 100%;
  33. height: 100rpx;
  34. line-height: 100rpx;
  35. text-align: center;
  36. }
  37. .records_item{
  38. margin-bottom: 10rpx;
  39. .records_item_top{
  40. width: 100%;
  41. background-color: #FFFFFF;
  42. height: 110rpx;
  43. padding: 10rpx 28rpx;
  44. display: flex;
  45. justify-content: space-between;
  46. box-sizing: border-box;
  47. .item_left{
  48. p{
  49. color: #474747;
  50. }
  51. p:first-child{
  52. font-size: 32rpx;
  53. margin-bottom: 10rpx;
  54. }
  55. p:last-child{
  56. font-size: 26rpx;
  57. }
  58. }
  59. .item_right{
  60. height: 110rpx;
  61. line-height: 100rpx;
  62. }
  63. }
  64. .records_item_bot{
  65. padding: 10rpx 28rpx 0;
  66. box-sizing: border-box;
  67. p{
  68. margin-bottom: 6rpx;
  69. }
  70. }
  71. }
  72. }
  73. </style>
  74. <script>
  75. export default {
  76. data() {
  77. return {
  78. recordsdata: [],
  79. indexnum:0,
  80. dataTF:false
  81. }
  82. },
  83. methods: {
  84. async getEquipList() {
  85. const res = await this.$myRequest({
  86. url: '/api/api_gateway?method=home.homes.app_version_record'
  87. })
  88. console.log(res)
  89. this.recordsdata = res
  90. if(res.length == 0){
  91. this.dataTF = true
  92. }else{
  93. this.dataTF = false
  94. }
  95. },
  96. showtf(index){
  97. this.indexnum = index
  98. console.log(this.indexnum)
  99. }
  100. },
  101. onLoad() {
  102. this.getEquipList()
  103. }
  104. }
  105. </script>