publishList.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view>
  3. <view class="bg-white" v-for="(item, index) in list" :key='index' @click="goNavList(item.id)">
  4. <view class="flex justify-around padding-sm ">
  5. <img :src="item.titleImg" alt="" style="width: 100px;height: 100px;" >
  6. <view class="margin-left-sm">
  7. <view class="text-lg text-bold text-black" style="height: 42px;overflow: hidden;text-overflow: ellipsis;width: 225px;">{{item.address}}</view>
  8. <view v-if="item.price" class="text-orange text-bold text-lg margin-tb-sm">¥ {{item.price}}</view>
  9. <view>浏览6/联系1</view>
  10. </view>
  11. </view>
  12. <view class="flex justify-end padding-tb-sm padding-right-sm">
  13. <button class="cu-btn round margin-right-sm" v-if="item.status == 1" @click="editStatus(item)" >上架</button>
  14. <button class="cu-btn round margin-right-sm" v-if="item.status == 2" @click="editStatus(item)" >下架</button>
  15. <button class="cu-btn round margin-right-sm" v-if="item.status == 3" >已驳回</button>
  16. <button class="cu-btn round margin-right-sm">删除</button>
  17. <button class="cu-btn round ">编辑</button>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props:{
  25. list: {
  26. type: Array,
  27. default(){
  28. return []
  29. }
  30. }
  31. },
  32. methods: {
  33. editStatus(e) {
  34. let data = {
  35. id: e.id
  36. }
  37. this.$Request.postT('/information/updateInformationStatus', data).then(res => {
  38. })
  39. }
  40. }
  41. }
  42. </script>
  43. <style>
  44. </style>