returnButton.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="content" :style="{'bottom': btmSize + 'rpx'}">
  3. <view class="retun-Box" @click="navTo('/pages/order/order?state=0')">
  4. <image class="return-img" src=".././static/tabBar/dingdan.png"></image>
  5. <view class="return-text">订单</view>
  6. </view>
  7. <view class="retun-Box" @click="GoHome">
  8. <image class="return-img" src=".././static/tabBar/home.png" ></image>
  9. <view class="return-text">首页</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. btmSize: {
  17. type: Number,
  18. default: 330
  19. }
  20. },
  21. data() {
  22. return {
  23. }
  24. },
  25. methods: {
  26. navTo(url) {
  27. uni.navigateTo({
  28. url: url
  29. })
  30. },
  31. GoHome() {
  32. // uni.navigateTo({
  33. // url: '/pages/groupBooking/index'
  34. // })
  35. uni.switchTab({
  36. url: '/pages/index/index'
  37. })
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. .content {
  44. position: fixed;
  45. right: 0;
  46. // bottom: 330rpx;
  47. .retun-Box {
  48. border-radius: 50%;
  49. background: #FFFFFF;
  50. width: 100rpx;
  51. height: 100rpx;
  52. margin-top: 30rpx;
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. justify-content: center;
  57. box-shadow: 0 6rpx 20rpx #888888;
  58. .return-img {
  59. width: 40rpx;
  60. height: 40rpx;
  61. }
  62. .return-text {
  63. font-size: $font-sm;
  64. margin-top: 8rpx;
  65. }
  66. }
  67. }
  68. </style>