returnButton.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="content">
  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. },
  17. data() {
  18. return {
  19. }
  20. },
  21. methods: {
  22. navTo(url) {
  23. uni.navigateTo({
  24. url: url
  25. })
  26. },
  27. GoHome() {
  28. // uni.navigateTo({
  29. // url: '/pages/groupBooking/index'
  30. // })
  31. uni.switchTab({
  32. url: '/pages/index/index'
  33. })
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. .content {
  40. position: fixed;
  41. right: 0;
  42. bottom: 330rpx;
  43. .retun-Box {
  44. border-radius: 50%;
  45. background: #FFFFFF;
  46. width: 100rpx;
  47. height: 100rpx;
  48. margin-top: 30rpx;
  49. display: flex;
  50. flex-direction: column;
  51. align-items: center;
  52. justify-content: center;
  53. box-shadow: 0 6rpx 20rpx #888888;
  54. .return-img {
  55. width: 40rpx;
  56. height: 40rpx;
  57. }
  58. .return-text {
  59. font-size: $font-sm;
  60. margin-top: 8rpx;
  61. }
  62. }
  63. }
  64. </style>