history.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <style lang="scss">
  2. .app-body{
  3. padding: 20rpx 40rpx;
  4. }
  5. .product{
  6. padding: 25px 0 22px 0;
  7. background: #fff;
  8. box-shadow: 0 0 11px 0 rgba(50, 50, 52, .06);
  9. border-radius: 11px;
  10. margin: 19px auto 0;
  11. display: flex;
  12. flex-direction: column;
  13. align-items: center;
  14. .title{
  15. font-size: 17px;
  16. font-weight: 600;
  17. color: #1d2023;
  18. margin-top: 19px;
  19. }
  20. .img{
  21. image{
  22. width: 172px;
  23. height: 172px;
  24. border-radius: 11px;
  25. }
  26. }
  27. }
  28. .table{
  29. background: #fff;
  30. box-shadow: 0 0 11px 0 rgba(50, 50, 52, .06);
  31. border-radius: 11px;
  32. margin: 17px auto 0;
  33. .tr{
  34. padding: 1px 11px;
  35. display: flex;
  36. align-items: center;
  37. height: 59px;
  38. border-top: 1px solid #ddd;
  39. &:first-child{
  40. margin-top: 0;
  41. }
  42. .td{
  43. width: 50%;
  44. text-align: center;
  45. font-size: 18px;
  46. font-family: PingFang SC;
  47. font-weight: 700;
  48. color: #1d2023;
  49. }
  50. }
  51. }
  52. </style>
  53. <template>
  54. <view class="app-body">
  55. <view class="product fx-h fx-bc fx-ac">
  56. <view class="img">
  57. <image :src="data.pro.image" mode="aspectFill"></image>
  58. </view>
  59. <view class="title">{{ data.pro.nickname }}</view>
  60. <view class="title">艺术家:{{ data.pro.nickname }}</view>
  61. <view class="title">{{ utils.date('Y年m月d日',utils.strtotime(data.pro.create_time)) }}</view>
  62. </view>
  63. <view class="table">
  64. <view class="tr fx-r fx-bc fx-ac">
  65. <view class="td">日期</view>
  66. <view class="td">归属人</view>
  67. </view>
  68. <view class="tr fx-r fx-bc fx-ac" v-for="item in data.data">
  69. <view class="td">{{ utils.date('Y-m-d',item.create_time) }}</view>
  70. <view class="td">{{ item.nickname }}</view>
  71. </view>
  72. </view>
  73. </view>
  74. </template>
  75. <script>
  76. import {mapState,mapMutations } from 'vuex';
  77. export default {
  78. computed: mapState(['user']),
  79. data() {
  80. return {
  81. id : 0,//产品ID
  82. data:{
  83. data : [],
  84. pro : {}
  85. }
  86. }
  87. },
  88. onLoad(option){
  89. this.id = option.proId || 0;
  90. this.initView();
  91. },
  92. methods: {
  93. /**
  94. * 获取配置数据
  95. */
  96. initView: function() {
  97. var that = this;
  98. uni.showLoading({title: '获取数据中..'});
  99. var post = {};
  100. post.id = this.id;
  101. this
  102. .request
  103. .post("auctionProItemHistory",post)
  104. .then(res=>{
  105. uni.hideLoading();
  106. if(res.code == 200) {
  107. this.data = res.data;
  108. } else {
  109. this.utils.showAlert({title: '系统提示',content: res.msg});
  110. }
  111. })
  112. .catch(err=>{
  113. console.log(err);
  114. uni.hideLoading();
  115. this.utils.showAlert({title: '系统提示',content: "加载失败,重新点击尝试!"});
  116. });
  117. },
  118. },
  119. }
  120. </script>