微信

calendar.vue 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <div style="padding-bottom:.6rem;">
  3. <div class="top">
  4. <img :src="topImg" alt>
  5. </div>
  6. <div class="middle">
  7. <p>云台天境定制专属你的台历</p>
  8. <span>时间: 2018年12月12-21日</span>
  9. <span>地点: 宁区秣陵街道创新东路2号银城蓝溪郡营销中心</span>
  10. </div>
  11. <div class="bottom">
  12. <p class="title">活动详情</p>
  13. <div>相关活动介绍参与活动需出示“城的空间”官微报名截图并支付198元现金(现金需在活动现场支付)</div>
  14. <div>以上礼品需成交方可享受,成交指签订车位销售合同/商品房现售合同,并支付全部价款或支付首付款且办理完毕贷款手续,开发商承诺客户交纳的198元,我司无条件退还,活动名额仅限10人,先到先得。</div>
  15. <div>活动电话:025-86426677</div>
  16. <div>服务案场:银城蓝溪郡</div>
  17. <div>地址:江宁区秣陵街道创新东路2号</div>
  18. <div>*活动最终解释权归银城蓝溪郡开发商所有</div>
  19. </div>
  20. <div class="btn">
  21. <div v-if="state === 1" @click="toCheckModel">立即参与</div>
  22. <div v-if="state === 2" class="disable">已参与</div>
  23. <div v-if="state === 3" class="disable">活动已结束</div>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. import { createNamespacedHelpers } from 'vuex'
  29. const { mapActions: mapMakingActions } = createNamespacedHelpers('making')
  30. import topImg from '@/common/icon/topImg.png'
  31. export default {
  32. data () {
  33. return {
  34. topImg,
  35. state: 1
  36. }
  37. },
  38. created () {
  39. this.getCalendarCustomer().then((res) => {
  40. if (res) {
  41. this.state = 2
  42. } else {
  43. let stringTime = "2018-12-22 00:00:00"
  44. let timestamp = Date.parse(new Date(stringTime))
  45. let now = new Date().getTime()
  46. if (timestamp >= now) {
  47. this.state = 1
  48. } else {
  49. this.state = 3
  50. }
  51. }
  52. })
  53. },
  54. methods: {
  55. ...mapMakingActions(['getCalendarCustomer']),
  56. toCheckModel () {
  57. this.$router.push({ name: 'checkModel' })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .top {
  64. width: 100%;
  65. img {
  66. width: 100%;
  67. }
  68. }
  69. .middle {
  70. padding: 0.14rem 0.25rem;
  71. border-bottom: 0.1rem solid rgba(235, 241, 242, 1);
  72. p {
  73. font-size: 0.16rem;
  74. padding-bottom: 0.05rem;
  75. font-weight: bold;
  76. }
  77. span {
  78. padding-bottom: 0.05rem;
  79. display: block;
  80. }
  81. }
  82. .bottom {
  83. padding: 0.14rem 0.25rem;
  84. p {
  85. font-size: 0.16rem;
  86. padding-bottom: 0.05rem;
  87. font-weight: bold;
  88. }
  89. div{
  90. padding-bottom: .08rem;
  91. }
  92. }
  93. .btn {
  94. position: fixed;
  95. bottom: 0;
  96. left: 0;
  97. width: 100%;
  98. padding: 0.1rem 0.25rem;
  99. box-sizing: border-box;
  100. background: #fff;
  101. div {
  102. width: 100%;
  103. height: 0.4rem;
  104. border-radius: 0.2rem;
  105. background-color: rgba(252, 98, 67, 1);
  106. color: #fff;
  107. text-align: center;
  108. line-height: 0.4rem;
  109. }
  110. .disable {
  111. background: #ccc;
  112. }
  113. }
  114. </style>