index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="orderGoods">
  3. <view class='total'>共1件商品</view>
  4. <view class='goodWrapper'>
  5. <view class='item acea-row row-between-wrapper' v-for="(item,index) in cartInfo" :key="index" @click="jumpCon(item.product_id)">
  6. <view class='pictrue'>
  7. <image :src='item.productInfo.attrInfo.image' v-if="item.productInfo.attrInfo"></image>
  8. <image :src='item.productInfo.image' v-else></image>
  9. </view>
  10. <view class='text'>
  11. <view class='acea-row row-between-wrapper'>
  12. <view class='name line1'>{{item.productInfo.store_name}}</view>
  13. <view class='num'>x {{item.cart_num}}</view>
  14. </view>
  15. <view class='attr line1' v-if="item.productInfo.attrInfo">{{item.productInfo.attrInfo.suk}}</view>
  16. <view class='money font-color' v-if="item.productInfo.attrInfo">¥{{item.productInfo.attrInfo.price}}</view>
  17. <view class='money font-color' v-else>¥{{item.productInfo.price}}</view>
  18. <view class='evaluate' v-if='item.is_reply==0 && evaluate==3' @click.stop="evaluateTap(item.unique,orderId)">评价</view>
  19. <view class='evaluate' v-else-if="item.is_reply==1 && evaluate==3">已评价</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. jump: {
  43. type: Boolean,
  44. default: false,
  45. }
  46. },
  47. data() {
  48. return {
  49. totalNmu:''
  50. };
  51. },
  52. watch:{
  53. // cartInfo:function(nVal,oVal){
  54. // console.log(cartInfo,'cartInfo')
  55. // let num = 0
  56. // nVal.forEach((item,index)=>{
  57. // num += item.cart_num
  58. // })
  59. // this.totalNmu = num
  60. // }
  61. },
  62. methods: {
  63. evaluateTap:function(unique,orderId){
  64. uni.navigateTo({
  65. url:"/pages/users/goods_comment_con/index?unique="+unique+"&uni="+orderId
  66. })
  67. },
  68. jumpCon:function(id){
  69. if(this.jump){
  70. uni.navigateTo({
  71. url: `/pages/goods_details/index?id=${id}`
  72. })
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .orderGoods {
  80. background-color: #fff;
  81. margin-top: 12rpx;
  82. }
  83. .orderGoods .total {
  84. width: 100%;
  85. height: 86rpx;
  86. padding: 0 30rpx;
  87. border-bottom: 2rpx solid #f0f0f0;
  88. font-size: 30rpx;
  89. color: #282828;
  90. line-height: 86rpx;
  91. box-sizing: border-box;
  92. }
  93. </style>