template2.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <script>
  2. import countDown from '@/components/countDown';
  3. export default {
  4. components: { countDown },
  5. inject: ['intoPage', 'goMenuPage'],
  6. props: {
  7. orderMenu: {
  8. type: Array,
  9. default: () => []
  10. },
  11. orderStyle: {
  12. type: Number | String,
  13. default: 0
  14. },
  15. notPayOrder: {
  16. type: Object,
  17. default: () => {}
  18. }
  19. }
  20. };
  21. </script>
  22. <template>
  23. <view class="">
  24. <view class="pt-34 pr-24 pb-32 pl-24 bg--w111-fff rd-16rpx mt-20 order-wrapper ml-20 mr-20">
  25. <view class="flex-between-center">
  26. <text class="fs-30 fw-500 lh-42rpx text--w111-333">订单中心</text>
  27. <view class="flex-y-center text--w111-999" @click="intoPage('/pages/goods/order_list/index')">
  28. <text class="fs-26 lh-26rpx">查看全部</text>
  29. <text class="iconfont icon-ic_rightarrow fs-24"></text>
  30. </view>
  31. </view>
  32. <view class="flex-between-center mt-30" :class="{ theme: orderStyle == 2 }">
  33. <view class="w-128 flex-col flex-center item" v-for="item in orderMenu" :key="item.title" @click="intoPage(item.url)">
  34. <text :class="item.icon" class="iconfont fs-48"></text>
  35. <text class="fs-26 lh-36rpx text--w111-282828 pt-22">{{ item.title }}</text>
  36. <uni-badge class="uni-badge-left-margin" v-if="item.num > 0" :text="item.num"></uni-badge>
  37. </view>
  38. </view>
  39. <view class="w-full h-120 rd-16rpx bg--w111-f5f5f5 mt-32 p-10 flex-between-center" v-if="notPayOrder" @click="intoPage('/pages/goods/order_list/index?status=0')">
  40. <view class="flex-y-center">
  41. <image :src="notPayOrder.img" class="w-100 h-100 rd-12rpx"></image>
  42. <view class="ml-16">
  43. <view class="fs-24 lh-34rpx text--w111-333 fw-500">等待付款</view>
  44. <view class="fs-22 lh-30rpx text--w111-333 mt-12 flex-y-center">
  45. 还剩
  46. <!-- <text class="text-primary-con SemiBold">23:57:16</text> -->
  47. <countDown
  48. :is-day="false"
  49. tip-text=" "
  50. day-text=" "
  51. hour-text=":"
  52. minute-text=":"
  53. second-text=" "
  54. :datatime="notPayOrder.stop_time"
  55. bgColor="#F5F5F5"
  56. colors="var(--view-theme)"
  57. dotColor="var(--view-theme)"
  58. @endTime="getMenuData"
  59. ></countDown>
  60. 订单自动关闭
  61. </view>
  62. </view>
  63. </view>
  64. <view class="w-136 h-56 rd-30rpx flex-center fs-24 fw-500 text-primary-con con_border mr-14">去支付</view>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <style lang="scss" scoped>
  70. .order-wrapper {
  71. .uni-badge-left-margin {
  72. position: absolute;
  73. top: -12rpx;
  74. right: 24rpx;
  75. .uni-badge--error {
  76. background-color: #fff !important;
  77. }
  78. /deep/ .uni-badge--error {
  79. background-color: var(--view-theme) !important;
  80. }
  81. .uni-badge {
  82. color: var(--view-theme);
  83. border: 1px solid var(--view-theme);
  84. z-index: 29;
  85. }
  86. }
  87. .con_border {
  88. color: var(--view-theme);
  89. border: 1px solid var(--view-theme);
  90. }
  91. .image {
  92. width: 48rpx;
  93. height: 48rpx;
  94. }
  95. .theme .iconfont {
  96. color: var(--view-theme);
  97. }
  98. .item {
  99. position: relative;
  100. }
  101. }
  102. </style>