backHome.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="back_home" :style="{background:color2}" @click="backHome">
  3. <image class="back_home_icon" src="https://dm.static.elab-plus.com/yezhu/icon_home.png" mode=""></image>
  4. <text>返回\n任务大厅</text>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. name:"backHome",
  10. data() {
  11. return {
  12. color2:""
  13. };
  14. },
  15. mounted() {
  16. this.color2 = getApp().globalData.color2;
  17. },
  18. methods:{
  19. backHome(){
  20. uni.navigateBack({
  21. delta:1,
  22. })
  23. }
  24. }
  25. }
  26. </script>
  27. <style lang="scss">
  28. .back_home{
  29. position: fixed;
  30. bottom: 180rpx;
  31. right: 0;
  32. width: 100rpx;
  33. height: 120rpx;
  34. border-radius: 20rpx 0rpx 0rpx 20rpx;
  35. box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(119,55,12,0.20);
  36. display: flex;
  37. flex-direction: column;
  38. justify-content: center;
  39. align-items: center;
  40. .back_home_icon{
  41. width: 30rpx;
  42. height: 28rpx;
  43. margin-bottom: 9rpx;
  44. }
  45. font-size: 20rpx;
  46. font-family: PingFang SC, PingFang SC-Semibold;
  47. font-weight: 600;
  48. text-align: center;
  49. color: #ffffff;
  50. }
  51. </style>