vip.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <v-container fill-height>
  3. <v-row v-if="this.$store.state.user.userInfo == null || this.$store.state.user.userInfo.vip === false" justify="center" align="center">
  4. <v-col>
  5. <v-card
  6. class="mx-auto"
  7. max-width="500"
  8. >
  9. <v-row justify="center">
  10. <v-col cols="10" style="text-align: center">
  11. <h3>开启VIP,享受无限观看次数。获取专属VIP标记!</h3>
  12. </v-col>
  13. </v-row>
  14. <v-row justify="center">
  15. <v-col cols="10" style="text-align: center">
  16. <v-btn x-large outlined color="indigo" @click="()=>this.$router.push('/vip/plan')">开启</v-btn>
  17. </v-col>
  18. </v-row>
  19. </v-card>
  20. </v-col>
  21. </v-row>
  22. <v-row v-else justify="center" align="center">
  23. <v-col>
  24. <v-card
  25. class="mx-auto"
  26. max-width="400"
  27. >
  28. <v-img
  29. class="white--text align-end"
  30. height="200px"
  31. src="https://cdn.vuetifyjs.com/images/cards/docks.jpg"
  32. >
  33. <v-card-title>你好,尊贵的 VIP: {{ this.$store.state.user.userInfo.username }}</v-card-title>
  34. </v-img>
  35. <v-card-text class="text--primary">
  36. <div>VIP 到期时间: <strong>{{ this.$store.state.user.userInfo.expiredAt }}</strong></div>
  37. </v-card-text>
  38. <v-card-actions>
  39. <v-btn
  40. color="orange"
  41. text
  42. @click="()=>this.$router.push('/vip/plan')"
  43. >
  44. 续费
  45. </v-btn>
  46. </v-card-actions>
  47. </v-card>
  48. </v-col>
  49. </v-row>
  50. </v-container>
  51. </template>
  52. <script>
  53. import checkPower from '@/utils/check-power.vue'
  54. import TimeUtil from '@/utils/time-util.vue'
  55. export default {
  56. name: 'UserVip',
  57. data() {
  58. return {
  59. checkPower,
  60. TimeUtil
  61. }
  62. },
  63. created() {
  64. console.log(this.$store.state.user.userInfo.vip)
  65. }
  66. }
  67. </script>
  68. <style>
  69. </style>