printerLabel.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view class="container">
  3. <view class="list">
  4. <navigator :url="`/saomaDiancan/printerLabeldetail/printerLabeldetail?id=${item.id}&tag_name=${item.tag_name}&num=${item.num}&type=${type}`" class="item" v-for="(item,index) in list" :key="index">
  5. <view class="name">{{item.tag_name}}</view>
  6. <view class="content">
  7. <view class="flex flex-y-center">
  8. <view class="cell flex flex-y-center">
  9. <view class="title">门店:</view>
  10. <view class="desc">{{item.store_title}}</view>
  11. </view>
  12. </view>
  13. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  14. <view class="cell flex flex-y-center">
  15. <view class="title">排序:</view>
  16. <view class="desc">{{item.num}}</view>
  17. </view>
  18. </view>
  19. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  20. <view class="cell flex flex-y-center arr-r" style="width:100%">
  21. <view class="title">创建时间:</view>
  22. <view class="desc">{{item.create_time}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </navigator>
  27. <view class="no-more">没有更多内容了~</view>
  28. </view>
  29. <view class="footer-bar">
  30. <view class="content flex flex-center">
  31. <navigator :url="`/saomaDiancan/editprinerlabel/editprinerlabel?type=${type}`" class="btn">+新增标签</navigator>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. store_id:"",admin_id:'',
  41. list: [],
  42. page: 1,
  43. is_bottom: false,
  44. type:2,
  45. }
  46. },
  47. onLoad(options) {
  48. this.type=options.type;
  49. this.store_id = uni.getStorageSync("store_id");
  50. this.admin_id= uni.getStorageSync("admin_id");
  51. },
  52. onShow() {
  53. this.getData()
  54. },
  55. onReachBottom() {
  56. // if (!this.is_bottom) {
  57. // this.getData(this.page + 1)
  58. // }
  59. },
  60. methods: {
  61. getData(page) {
  62. // if (page == 1) {
  63. // this.list = []
  64. // this.page = 1
  65. // this.is_bottom = false
  66. // }
  67. this.request({
  68. url: 'Smdcshop/print_tag',
  69. data: {
  70. store_id: this.store_id,
  71. admin_id:this.admin_id,
  72. }
  73. }).then(res => {
  74. if (res.code =="200") {
  75. this.list =res.data
  76. // this.list.concat(res.data)
  77. // this.page = page
  78. //
  79. } else {
  80. this.is_bottom = true
  81. }
  82. })
  83. }
  84. }
  85. }
  86. </script>
  87. <style>
  88. @import url("../static/css/common.css");
  89. page {
  90. background-color: #F4F5F7;
  91. }
  92. .list {
  93. padding: 30rpx 25rpx;
  94. }
  95. .list .item {
  96. border-radius: 8rpx;
  97. overflow: hidden;
  98. padding-left: 30rpx;
  99. border-left: 8rpx solid #247EFF;
  100. background-color: #fff;
  101. margin-bottom: 30rpx;
  102. }
  103. .list .item .name {
  104. height: 80rpx;
  105. border-bottom: 1rpx solid #f5f5f5;
  106. font-size: 30rpx;
  107. line-height: 80rpx;
  108. font-weight: bold;
  109. }
  110. .list .item .content {
  111. padding: 20rpx 0 24rpx;
  112. }
  113. .list .item .content .cell {
  114. flex: none;
  115. width: 50%;
  116. box-sizing: border-box;
  117. padding-right: 30rpx;
  118. font-size: 26rpx;
  119. line-height: 37rpx;
  120. color: #666;
  121. }
  122. .list .item .content .cell .title {
  123. color: #99A0AD;
  124. }
  125. </style>