history.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <view class="history">
  3. <!-- <view class="search">
  4. <view class="search_wrap">
  5. <image src="../../static/image/search.png" mode=""></image>
  6. <input type="text" value="" placeholder="请输入关键字" placeholder-style="color:#B8B5B5;" />
  7. </view>
  8. </view> -->
  9. <view class="title">
  10. <view class="name">{{current.name?current.name:'--'}}</view>
  11. <view class="banben">当前版本是 v{{current.version?current.version:'0'}}</view>
  12. </view>
  13. <view class="step_wrap">
  14. <!-- <view class="dot_first"></view> -->
  15. <view :class="['item',list.length==1||index==list.length-1?'first':'',index==0?'active':'']" v-for="(item,index) in list">
  16. <view class="dot"></view>
  17. <view class="version">
  18. 版本v{{item.version?item.version:'0'}} {{item.created_at?item.created_at:'--'}}
  19. </view>
  20. <view class="desc">
  21. {{item.user?item.user.name:'来源于网络'}}
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. slug:'',
  32. list:[],
  33. current:{}
  34. }
  35. },
  36. onShow() {
  37. },
  38. async onLoad(options) {
  39. console.log(options,'options')
  40. await this.getStep(options.slug)
  41. },
  42. methods: {
  43. getStep(slug){
  44. this.$u.get('/qunali/history', {
  45. slug:slug
  46. }).then(res => {
  47. console.log(res,'step')
  48. this.list = res.data
  49. // this.list = this.list.concat(this.list)
  50. this.current = this.list[this.list.length-1]
  51. })
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss">
  57. .history {
  58. padding-bottom: 20px;
  59. .search {
  60. background-color: #ffffff;
  61. padding: 30px 16px 6px;
  62. .search_wrap {
  63. background-color: #F8F5F5;
  64. border-radius: 10px;
  65. display: flex;
  66. align-items: center;
  67. padding: 6px 8px;
  68. image {
  69. width: 16px;
  70. height: 16px;
  71. margin: 0 10px;
  72. }
  73. input {
  74. width: 100%;
  75. }
  76. }
  77. }
  78. .title{
  79. padding: 20px 25px 0;
  80. .name{
  81. font-size: 18px;
  82. font-weight: 400;
  83. color: #000000;
  84. }
  85. .banben{
  86. font-size: 11px;
  87. font-weight: 400;
  88. color: #707070;
  89. padding-top: 10px;
  90. }
  91. }
  92. .step_wrap{
  93. padding: 40px 30px 0;
  94. position: relative;
  95. display: flex;
  96. flex-direction: column;
  97. .item{
  98. position: relative;
  99. border-left: 2px solid #565656;
  100. min-height: 100px;
  101. width: 100%;
  102. display: inline-block;
  103. .dot{
  104. position: absolute;
  105. width: 10px;
  106. height: 10px;
  107. background-color: #565656;
  108. border-radius: 50%;
  109. top: -5px;
  110. left: -5px;
  111. }
  112. .version{
  113. font-size: 14px;
  114. font-weight: 400;
  115. color: #000000;
  116. margin: -10px 0 0 10px;
  117. }
  118. .desc{
  119. font-size: 14px;
  120. font-weight: 400;
  121. color: #000000;
  122. padding-top: 7px;
  123. margin-left: 10px;
  124. }
  125. }
  126. .active{
  127. position: relative;
  128. border-left: 2px solid #16BA63;
  129. display: inline-block;
  130. min-height: 100px;
  131. width: 100%;
  132. .dot{
  133. position: absolute;
  134. width: 10px;
  135. height: 10px;
  136. background-color: #16BA63;
  137. border-radius: 50%;
  138. }
  139. .version{
  140. font-size: 14px;
  141. font-weight: 400;
  142. color: #000000;
  143. margin: -10px 0 0 10px;
  144. }
  145. .desc{
  146. font-size: 14px;
  147. font-weight: 400;
  148. color: #000000;
  149. padding-top: 7px;
  150. margin-left: 10px;
  151. }
  152. }
  153. .first{
  154. position: relative;
  155. border-left: none;
  156. display: inline-block;
  157. min-height: 100px;
  158. width: 100%;
  159. .version{
  160. font-size: 14px;
  161. font-weight: 400;
  162. color: #000000;
  163. margin: -10px 0 0 10px;
  164. }
  165. .desc{
  166. font-size: 14px;
  167. font-weight: 400;
  168. color: #000000;
  169. padding-top: 7px;
  170. margin-left: 10px;
  171. }
  172. }
  173. }
  174. }
  175. </style>