OrderList.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. shopId: obj.shopId,
  40. goodId: obj.goodId,
  41. coverImg: obj.coverImg,
  42. title: obj.title,
  43. price: obj.price,
  44. produce: obj.produce,
  45. evaluate: obj.evaluate
  46. }
  47. })
  48. }
  49. }
  50. }
  51. </script>
  52. <style scoped>
  53. .shopGoodList-wrap{
  54. width: calc(100% - 40px);
  55. background-color: #fff;
  56. margin: 20px auto;
  57. padding: 20px 20px 0;
  58. display: flex;
  59. justify-content: space-between;
  60. flex-wrap: wrap;
  61. }
  62. .goodList-content{
  63. width: 300px;
  64. height: auto;
  65. margin-bottom: 20px;
  66. }
  67. .goodList-content img{
  68. width: 100%;
  69. height: 300px;
  70. display: block;
  71. }
  72. .goodList-mess{
  73. width: 100%;
  74. padding: 10px;
  75. text-align: left;
  76. }
  77. .goodList-mess h5{
  78. font-size: 16px;
  79. }
  80. .goodList-mess span{
  81. font-size: 30px;
  82. color: #EA6A69;
  83. line-height: 65px;
  84. }
  85. .goodList-mess span.link{
  86. float: right;
  87. line-height: 65px;
  88. color: #409eff;
  89. font-size: 14px;
  90. cursor: pointer;
  91. }
  92. </style>