content.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <s-layout title="发货内容">
  3. <view class="order-card ss-m-x-20 ss-r-20">
  4. <s-goods-item
  5. :img="state.data.goods_image"
  6. :title="state.data.goods_title"
  7. :skuText="state.data.goods_sku_text"
  8. :price="state.data.goods_price"
  9. :num="state.data.goods_num"
  10. radius="20"
  11. >
  12. <template #priceSuffix>
  13. <button class="ss-reset-button tag-btn" v-if="state.data.status_text">
  14. {{ state.data.status_text }}
  15. </button>
  16. </template>
  17. </s-goods-item>
  18. </view>
  19. <view class="bg-white ss-p-20 ss-m-x-20 ss-r-20">
  20. <view class="title ss-m-b-26">发货信息</view>
  21. <view v-if="state.data.ext?.dispatch_content_type === 'params'">
  22. <view class="desc ss-m-b-20" v-for="item in state.data.ext.dispatch_content" :key="item">
  23. {{ item.title }}: {{ item.content }}
  24. </view>
  25. </view>
  26. <view class="desc" v-else>{{ state.data.ext?.dispatch_content }}</view>
  27. </view>
  28. </s-layout>
  29. </template>
  30. <script setup>
  31. import { onLoad } from '@dcloudio/uni-app';
  32. import { reactive } from 'vue';
  33. import sheep from '@/sheep';
  34. const state = reactive({
  35. data: [],
  36. });
  37. async function getDetail(id, item_id) {
  38. const { error, data } = await sheep.$api.order.itemDetail(id,item_id);
  39. if (error === 0) {
  40. state.data = data;
  41. }
  42. }
  43. onLoad((options) => {
  44. getDetail(options.id, options.item_id);
  45. });
  46. </script>
  47. <style lang="scss" scoped>
  48. .order-card {
  49. padding: 20rpx 0;
  50. .order-sku {
  51. font-size: 24rpx;
  52. font-weight: 400;
  53. color: rgba(153, 153, 153, 1);
  54. width: 450rpx;
  55. margin-bottom: 20rpx;
  56. .order-num {
  57. margin-right: 10rpx;
  58. }
  59. }
  60. .tag-btn {
  61. margin-left: 16rpx;
  62. font-size: 24rpx;
  63. height: 36rpx;
  64. color: var(--ui-BG-Main);
  65. border: 2rpx solid var(--ui-BG-Main);
  66. border-radius: 14rpx;
  67. padding: 0 4rpx;
  68. }
  69. }
  70. .title {
  71. font-size: 28rpx;
  72. font-weight: bold;
  73. color: #333333;
  74. }
  75. .desc {
  76. font-size: 26rpx;
  77. font-weight: 400;
  78. color: #333333;
  79. }
  80. </style>