sort.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="app-content">
  3. <div class="list-wrap">
  4. <block v-if="!$util.isEmpty(list.data)">
  5. <div class="list" v-for="(item, index) in list.data" :key="index">
  6. <div class="list-index">{{ item.id }}</div>
  7. <div class="list-det" @click.stop="pageTo('/admin/itemClass/more?classId='+item.id)">
  8. <div class="app-size-28 app-color-0" style="font-size:32upx;font-weight:bold;color:#333333;">
  9. {{ item.name || '' }}
  10. </div>
  11. <div class="list-operate">
  12. <text class="add-price">修改排序</text>
  13. </div>
  14. </div>
  15. </div>
  16. </block>
  17. <block v-else>
  18. <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
  19. </block>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import ModalModule from '@/components/plugin/modal'
  25. import AppUploader from '@/components/app-uploader'
  26. import OperateModule from '@/admin/home/components/module/operate'
  27. import AppWrapperEmpty from '@/components/app-wrapper-empty'
  28. import { list } from '@/mixins'
  29. import { getList} from '@/api/item-class'
  30. export default {
  31. name: 'add',
  32. components: {
  33. ModalModule,
  34. AppUploader,
  35. OperateModule,
  36. AppWrapperEmpty
  37. },
  38. mixins: [list],
  39. data() {
  40. return {
  41. modifyModal: false,
  42. modifyTitle: '添加',
  43. replaceForm: {
  44. name: '',
  45. id:0,
  46. inTurn: 100
  47. },
  48. delModal: false,
  49. operateShow: false,
  50. operateData: {},
  51. operateIndex: null,
  52. operateTop: 0
  53. }
  54. },
  55. onPullDownRefresh() {
  56. this.resetList()
  57. this._list().then(res => {
  58. uni.stopPullDownRefresh()
  59. })
  60. },
  61. onReachBottom() {
  62. if (!this.list.finished) {
  63. this._list().then(res => {
  64. uni.stopPullDownRefresh()
  65. })
  66. } else {
  67. uni.stopPullDownRefresh()
  68. }
  69. },
  70. onLoad() {
  71. },
  72. methods: {
  73. async init() {
  74. this._list()
  75. },
  76. _list() {
  77. return getList({page: this.list.page}).then(res => {
  78. this.completes(res)
  79. })
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .app-content {
  86. min-height: calc(100vh - 100upx);
  87. padding-bottom: 100upx;
  88. }
  89. .list-wrap {
  90. position: relative;
  91. background-color: #fff;
  92. .list {
  93. height: 130upx;
  94. @include disFlex(center, flex-start);
  95. margin: 0 30upx 0 30upx;
  96. color: $fontColor3;
  97. border-bottom: 1upx solid $borderColor;
  98. .list-index {
  99. width: 80upx;
  100. }
  101. .list-img {
  102. img {
  103. height: 100%;
  104. }
  105. }
  106. .list-det {
  107. width: calc(100% - 50upx);
  108. margin-left: 10upx;
  109. & > div {
  110. margin-top: 14upx;
  111. &:first-child {
  112. margin-top: 0;
  113. }
  114. }
  115. .list-operate {
  116. @include disFlex(center, space-between);
  117. .operate-det {
  118. & > span {
  119. margin-left: 60upx;
  120. &:first-child {
  121. margin-left: 0;
  122. }
  123. }
  124. }
  125. .add-price{
  126. text-decoration:underline;
  127. font-size:32upx;
  128. margin-left:400upx;
  129. color:#3385FF;
  130. }
  131. .operate-icon{
  132. margin-left:30upx;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. .app-footer {
  139. justify-content: flex-end;
  140. .admin-button-com {
  141. width: 200upx;
  142. margin-right: 30upx;
  143. }
  144. }
  145. .modify-modal {
  146. .prompt-text {
  147. color: red;
  148. position: relative;
  149. right: 52upx;
  150. bottom: 24upx;
  151. }
  152. .line-label {
  153. width: 140upx;
  154. flex-shrink: 0;
  155. }
  156. .switch-wrap {
  157. margin-top: 30upx;
  158. }
  159. }
  160. </style>