index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="navigation">
  3. <view class="left">
  4. <view class="item">
  5. <u-icon name="server-fill" :size="20" :color="$u.color['contentColor']"></u-icon>
  6. <view class="text u-line-1">客服</view>
  7. </view>
  8. <view class="item">
  9. <u-icon name="home" :size="20" :color="$u.color['contentColor']"></u-icon>
  10. <view class="text u-line-1">店铺</view>
  11. </view>
  12. <view class="item car">
  13. <u-badge class="car-num" :count="9" type="error" :offset="[-3, -6]"></u-badge>
  14. <u-icon name="shopping-cart" :size="20" :color="$u.color['contentColor']"></u-icon>
  15. <view class="text u-line-1">购物车</view>
  16. </view>
  17. </view>
  18. <view class="right">
  19. <view class="cart btn u-line-1">加入购物车</view>
  20. <view class="buy btn u-line-1">立即购买</view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. };
  27. </script>
  28. <style lang="scss" scoped>
  29. .navigation {
  30. display: flex;
  31. margin-top: 100rpx;
  32. border: solid 2rpx #f2f2f2;
  33. background-color: #ffffff;
  34. padding: 16rpx 0;
  35. .left {
  36. display: flex;
  37. font-size: 20rpx;
  38. .item {
  39. margin: 0 20rpx;
  40. &.car {
  41. text-align: center;
  42. position: relative;
  43. .car-num {
  44. position: absolute;
  45. top: -10rpx;
  46. right: -10rpx;
  47. }
  48. }
  49. }
  50. }
  51. .right {
  52. display: flex;
  53. font-size: 28rpx;
  54. align-items: center;
  55. .btn {
  56. line-height: 66rpx;
  57. padding: 0 30rpx;
  58. border-radius: 36rpx;
  59. color: #ffffff;
  60. }
  61. .cart {
  62. background-color: #ed3f14;
  63. margin-right: 30rpx;
  64. }
  65. .buy {
  66. background-color: #ff7900;
  67. }
  68. }
  69. }
  70. </style>