OrderList.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div class="shopGoodList-wrap">
  3. <el-card :body-style="{ padding: '0px' }" v-for="item in goodList" class="goodList-content" :key="item.id">
  4. <img :src="item.coverImg">
  5. <div class="goodList-mess">
  6. <h5>{{item.title}}</h5>
  7. <div class="bottom clearfix">
  8. <span class="time">{{item.price}}</span>
  9. <span class="link" @click="toEdit(item)">查看详情</span>
  10. </div>
  11. </div>
  12. </el-card>
  13. </div>
  14. </template>
  15. <script>
  16. export default{
  17. data(){
  18. return{
  19. goodList:[],
  20. }
  21. },
  22. mounted(){
  23. this.getGoodList();
  24. },
  25. methods:{
  26. getGoodList(){
  27. this.axios.post(this.Api.getOrderList,{buyerId:this.$store.state.userMess.id}).then((res)=>{
  28. console.log(res.data.list)
  29. this.goodList=res.data.list;
  30. }).catch((err)=>{
  31. console.log("getShopTagList:"+err);
  32. });
  33. },
  34. toEdit(obj){
  35. this.$router.push({
  36. path: '/buyer/order',
  37. query: {
  38. id: obj.id,
  39. }
  40. })
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped>
  46. .shopGoodList-wrap{
  47. width: calc(100% - 40px);
  48. background-color: #fff;
  49. margin: 20px auto;
  50. padding: 20px 20px 0;
  51. display: flex;
  52. justify-content: space-between;
  53. flex-wrap: wrap;
  54. }
  55. .goodList-content{
  56. width: 300px;
  57. height: auto;
  58. margin-bottom: 20px;
  59. }
  60. .goodList-content img{
  61. width: 100%;
  62. height: 300px;
  63. display: block;
  64. }
  65. .goodList-mess{
  66. width: 100%;
  67. padding: 10px;
  68. text-align: left;
  69. }
  70. .goodList-mess h5{
  71. font-size: 16px;
  72. }
  73. .goodList-mess span{
  74. font-size: 30px;
  75. color: #EA6A69;
  76. line-height: 65px;
  77. }
  78. .goodList-mess span.link{
  79. float: right;
  80. line-height: 65px;
  81. color: #409eff;
  82. font-size: 14px;
  83. cursor: pointer;
  84. }
  85. </style>