commodityDetail.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="detail">
  3. <view class="title">
  4. <view class="title-left">
  5. <image class="header-img" :src="avatar" mode=""></image>
  6. <text>{{ commodityInformation.nickname }}</text>
  7. <image
  8. class="right-325"
  9. src="../../../static/mine/325.png"
  10. mode=""
  11. ></image>
  12. </view>
  13. </view>
  14. <view class="commodity-information">
  15. <view class="commodity-1" v-for="item in commodityInformation.goods">
  16. <image class="commodity-img" :src="item.sku_item.image" mode=""></image>
  17. <view class="">
  18. <view class="commodity-2">
  19. <view class="commodity-title">{{ item.goods_name }} </view>
  20. <view class="commodity-price">
  21. <text style="font-size: 20rpx">¥</text>
  22. <text>{{ item.amount.split(".")[0] }}</text
  23. >.
  24. <text style="font-size: 20rpx">{{
  25. item.amount.split(".")[1]
  26. }}</text>
  27. </view>
  28. </view>
  29. <view class="commodity-3">
  30. <view class="specifications"> {{ item.sku_item.item }} </view>
  31. <view style="font-size: 24rpx"> x{{ item.goods_num }} </view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="btn-list">
  37. <view
  38. space="nbsp"
  39. style="font-size: 24rpx"
  40. v-if="commodityInformation.goods"
  41. >共 <text>{{ commodityInformation.goods.length }}</text> 件商品
  42. {{ "&nbsp;" }}</view
  43. >
  44. <text style="font-size: 28rpx">买家实付</text>
  45. <view
  46. style="color: #222; font-weight: 600"
  47. v-if="commodityInformation.amount"
  48. >
  49. <text style="font-size: 20rpx">¥</text>
  50. <text>{{ commodityInformation.amount.split(".")[0] }}</text
  51. >.
  52. <text style="font-size: 20rpx">{{
  53. commodityInformation.amount.split(".")[1]
  54. }}</text>
  55. </view>
  56. </view>
  57. <view
  58. class="information"
  59. v-if="status == 'undelivered' || status == 'unfill'"
  60. >
  61. <text class="_label">订单备注</text>
  62. <view class="_title-right"> {{ commodityInformation.remark }}</view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. props: {
  69. status: {
  70. typeof: Number,
  71. default: 0,
  72. },
  73. commodityInformation: {
  74. typeof: Object,
  75. default: () => {
  76. return {};
  77. },
  78. },
  79. },
  80. data() {
  81. return {
  82. avatar: "",
  83. };
  84. },
  85. watch: {
  86. commodityInformation(newVal) {
  87. console.log(newVal);
  88. if (newVal.member) {
  89. this.avatar = newVal.member.avatar;
  90. }
  91. },
  92. },
  93. methods: {
  94. application() {
  95. uni.navigateTo({
  96. url: "/pageC/applicationRefund/applicationRefund",
  97. });
  98. },
  99. },
  100. };
  101. </script>
  102. <style scoped lang="scss">
  103. .detail {
  104. padding: 28rpx 20rpx;
  105. background-color: #fff;
  106. border-radius: 16rpx;
  107. margin-top: 28rpx;
  108. .title {
  109. display: flex;
  110. justify-content: space-between;
  111. .title-left {
  112. display: flex;
  113. font-size: 32rpx;
  114. align-items: center;
  115. .header-img {
  116. width: 36rpx;
  117. height: 36rpx;
  118. border-radius: 50%;
  119. margin-right: 20rpx;
  120. }
  121. .right-325 {
  122. width: 32rpx;
  123. height: 32rpx;
  124. }
  125. }
  126. .order-status {
  127. color: #f83224;
  128. font-size: 26rpx;
  129. }
  130. }
  131. .commodity-information {
  132. margin-top: 28rpx;
  133. .commodity-1 {
  134. display: flex;
  135. .commodity-img {
  136. width: 180rpx;
  137. height: 180rpx;
  138. margin-right: 20rpx;
  139. border-radius: 10rpx;
  140. }
  141. .commodity-2 {
  142. display: flex;
  143. justify-content: space-between;
  144. .commodity-title {
  145. width: 328rpx;
  146. overflow: hidden;
  147. white-space: nowrap;
  148. text-overflow: ellipsis;
  149. margin-right: 38rpx;
  150. }
  151. }
  152. .commodity-3 {
  153. display: flex;
  154. justify-content: space-between;
  155. margin-top: 20rpx;
  156. color: #777;
  157. .specifications {
  158. font-size: 28rpx;
  159. color: #777;
  160. }
  161. }
  162. }
  163. }
  164. .last {
  165. border-bottom: 2rpx solid rgba(151, 151, 151, 0.1);
  166. padding-bottom: 20rpx;
  167. }
  168. .btn-list {
  169. display: flex;
  170. justify-content: flex-end;
  171. align-items: center;
  172. }
  173. .information {
  174. display: flex;
  175. justify-content: space-between;
  176. font-size: 28rpx;
  177. align-items: flex-end;
  178. margin-top: 34rpx;
  179. ._label {
  180. font-size: 28rpx;
  181. color: #333;
  182. }
  183. ._title-right {
  184. font-size: 28rpx;
  185. color: #333;
  186. opacity: 0.6;
  187. }
  188. }
  189. }
  190. </style>