You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.5 KiB

3 months ago
  1. <template>
  2. <view class="orderGoods borRadius14">
  3. <view class='total'>{{ orderProNum?orderProNum:totalNmu}}件商品</view>
  4. <view class='goodWrapper pad30'>
  5. <view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index"
  6. @click="jumpCon(item.productId)">
  7. <view class='pictrue'>
  8. <image :src='item.image'></image>
  9. </view>
  10. <view class='text'>
  11. <view class='acea-row row-between-wrapper'>
  12. <view class='name line1'>{{item.productName ? item.productName : item.storeName}}</view>
  13. <view class='num'>x {{item.payNum ? item.payNum : item.cartNum}}</view>
  14. </view>
  15. <view class='attr line1' v-if="item.sku">{{item.sku}}</view>
  16. <view class='money'>{{item.vipPrice ? item.vipPrice : item.price}}</view>
  17. <view class='evaluate' v-if='item.isReply==0 && evaluate==2' @click.stop="evaluateTap(item)">评价
  18. </view>
  19. <view class='evaluate' v-else-if="item.isReply==1">已评价</view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. props: {
  28. evaluate: {
  29. type: Number,
  30. default: 0,
  31. },
  32. cartInfo: {
  33. type: Array,
  34. default: function() {
  35. return [];
  36. }
  37. },
  38. orderId: {
  39. type: String,
  40. default: '',
  41. },
  42. ids: {
  43. type: Number,
  44. default: 0,
  45. },
  46. jump: {
  47. type: Boolean,
  48. default: false,
  49. },
  50. orderProNum: {
  51. type: Number,
  52. default: function() {
  53. return 0;
  54. }
  55. },
  56. productType: {
  57. type: Number,
  58. default: function() {
  59. return 0;
  60. }
  61. }
  62. },
  63. data() {
  64. return {
  65. totalNmu: ''
  66. };
  67. },
  68. watch: {
  69. cartInfo: function(nVal, oVal) {
  70. let num = 0
  71. nVal.forEach((item, index) => {
  72. num += item.cartNum
  73. })
  74. this.totalNmu = num
  75. }
  76. },
  77. methods: {
  78. evaluateTap(item) {
  79. uni.navigateTo({
  80. url: "/pages/goods/goods_comment_con/index?unique=" + item.attrId + "&orderId=" + this.orderId + '&id=' + this.ids
  81. })
  82. },
  83. jumpCon: function(id) {
  84. let type = this.productType==0?'normal':'video'
  85. if (this.jump) {
  86. uni.navigateTo({
  87. url: `/pages/goods/goods_details/index?id=${id}&type=${type}`
  88. })
  89. }
  90. }
  91. }
  92. }
  93. </script>
  94. <style scoped lang="scss">
  95. .orderGoods {
  96. background-color: #fff;
  97. margin-top: 15rpx;
  98. }
  99. .money{
  100. @include price_color(theme);
  101. }
  102. .orderGoods .total {
  103. width: 100%;
  104. height: 86rpx;
  105. padding: 0 24rpx;
  106. border-bottom: 2rpx solid #f0f0f0;
  107. font-size: 30rpx;
  108. color: #282828;
  109. line-height: 86rpx;
  110. box-sizing: border-box;
  111. }
  112. .pictrue image {
  113. background: #f4f4f4;
  114. }
  115. </style>