小程序端工程代码
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.

88 lines
1.7 KiB

  1. <template>
  2. <view class="page">
  3. <view :class="tabtarIndex==0?'page':''" v-show="tabtarIndex==0">
  4. <home></home>
  5. </view>
  6. <view :class="tabtarIndex==1?'page':''" v-show="tabtarIndex==1">
  7. <goods-class></goods-class>
  8. </view>
  9. <view :class="tabtarIndex==2?'page':''" v-if="tabtarIndex==2">
  10. <shopping-cart></shopping-cart>
  11. </view>
  12. <view :class="tabtarIndex==3?'page':''" v-if="tabtarIndex==3">
  13. <user></user>
  14. </view>
  15. <footer-components></footer-components>
  16. </view>
  17. </template>
  18. <script>
  19. import Home from "@/pages/home/index";
  20. import GoodsClass from "@/pages/shop/GoodsClass/index";
  21. import ShoppingCart from "@/pages/shop/ShoppingCart/index";
  22. import User from "@/pages/user/User/index";
  23. import FooterComponents from "@/components/Footer";
  24. import { mapState, mapMutations, mapActions } from "vuex";
  25. export default {
  26. name: "Launch",
  27. data() {
  28. return {
  29. history: [],
  30. };
  31. },
  32. components: {
  33. Home,
  34. GoodsClass,
  35. ShoppingCart,
  36. User,
  37. FooterComponents
  38. },
  39. computed: {
  40. ...mapState(["tabtarIndex"])
  41. },
  42. methods: {
  43. },
  44. mounted() {
  45. let type = this.$yroute.query.type;
  46. if (type) {
  47. }
  48. // if (!this.tabtarIndex) {
  49. // }
  50. },
  51. onHide() {
  52. }
  53. };
  54. </script>
  55. <style scoped lang="less">
  56. .lottie-bg {
  57. position: fixed;
  58. left: 0;
  59. top: 0;
  60. background-color: #fff;
  61. width: 100%;
  62. height: 100%;
  63. z-index: 999;
  64. display: -webkit-flex;
  65. display: flex;
  66. -webkit-align-items: center;
  67. align-items: center;
  68. -webkit-justify-content: center;
  69. justify-content: center;
  70. }
  71. #lottie {
  72. width: 35%;
  73. display: block;
  74. overflow: hidden;
  75. transform: translate3d(0, 0, 0);
  76. margin: auto;
  77. }
  78. .iphonex {
  79. height: 68rpx;
  80. }
  81. </style>