普兆健康管家前端代码仓库
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.

81 lines
1.9 KiB

  1. <template>
  2. <view class="flex card cols">
  3. <view class="flex flex-column col" v-for="item in list" :key="item.id" @click="jumpToOrderList(item.index)">
  4. <view class="icon">
  5. <image class="icon-img" :src="item.icon" mode="scaleToFill"></image>
  6. <view class="flex sup" v-if="item.value">{{ item.value }}</view>
  7. </view>
  8. <view class="label">{{ item.label }}</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. list: [],
  17. }
  18. },
  19. mounted() {
  20. this.list = [
  21. { id: '001', label: '待支付', value: 2, index: 1, icon: '/pages_order/static/center/order-1.png' },
  22. { id: '002', label: '待发货', value: 2, index: 2, icon: '/pages_order/static/center/order-2.png' },
  23. { id: '003', label: '待收货', value: 0, index: 3, icon: '/pages_order/static/center/order-3.png' },
  24. // todo: check
  25. { id: '004', label: '售后', value: 0, index: 0, icon: '/pages_order/static/center/order-4.png' },
  26. { id: '005', label: '全部', index: 0, icon: '/pages_order/static/center/order-5.png' },
  27. ]
  28. },
  29. methods: {
  30. jumpToOrderList(index) {
  31. this.$utils.navigateTo(`/pages_order/order/orderList/index?index=${index}`)
  32. }
  33. },
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. @import './styles/card.scss';
  38. .card {
  39. padding: 32rpx;
  40. column-gap: 16rpx;
  41. }
  42. .icon {
  43. position: relative;
  44. width: 48rpx;
  45. height: 48rpx;
  46. &-img {
  47. width: 100%;
  48. height: 100%;
  49. }
  50. .sup {
  51. position: absolute;
  52. top: 0;
  53. right: 0;
  54. transform: translate(50%, -50%);
  55. min-width: 32rpx;
  56. height: 32rpx;
  57. font-family: PingFang SC;
  58. font-weight: 500;
  59. font-size: 24rpx;
  60. line-height: 1.3;
  61. color: #FFFFFF;
  62. background: #F53F3F;
  63. border-radius: 32rpx;
  64. }
  65. }
  66. .label {
  67. margin-top: 12rpx;
  68. font-family: PingFang SC;
  69. font-weight: 400;
  70. font-size: 28rpx;
  71. line-height: 1;
  72. color: #252545;
  73. }
  74. </style>