Logged.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view class="index">
  3. <view class="logo-black logo" />
  4. <swiper-box type="index" height="560rpx" @click="handleClick" />
  5. <view class="btn-box main-left cross-center">
  6. <u-button
  7. text="产品"
  8. color="#000"
  9. shape="square"
  10. :plain="true"
  11. :custom-style="{borderRadius: 0}"
  12. @click="$u.route({url: '/pages/product/index'})"
  13. />
  14. <u-button
  15. v-if="userInfo.account.type === $const.ACCOUNT_DESIGN || userInfo.account.type === $const.ACCOUNT_VIP"
  16. text="案例"
  17. color="#000"
  18. shape="square"
  19. :plain="true"
  20. :custom-style="{marginLeft:'50rpx', borderRadius: 0}"
  21. @click="$u.route({url: '/pages/case/index'})"
  22. />
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { mapState } from 'vuex'
  28. import SwiperBox from '../SwiperBox'
  29. export default {
  30. name: 'IndexLogged',
  31. components: { SwiperBox },
  32. data() {
  33. return {
  34. }
  35. },
  36. computed: {
  37. ...mapState({
  38. userInfo: seate => seate.user.info
  39. })
  40. },
  41. methods: {
  42. handleClick(data) {
  43. const ids = data.product_id.join(',')
  44. this.$u.route({ url: `/pages/product/list?ids=${ids}` })
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .index {
  51. .logo{
  52. margin: 80rpx auto 60rpx;
  53. }
  54. .btn-box{
  55. margin-top: 100rpx;
  56. padding: 0 50rpx;
  57. }
  58. }
  59. </style>