微信

index.vue 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="mainPage">
  3. <div class="title">体验卡详情</div>
  4. <div class="content" v-if="info !== null">
  5. <div class="message">
  6. <div>
  7. <span>{{info.CustomerCardName}}</span>
  8. </div>
  9. <div>
  10. <span>有效时间</span>
  11. <span>{{toolClass.dateFormat(info.StartDate,'yyyy-MM-dd') + '~' + toolClass.dateFormat(info.EndDate,'yyyy-MM-dd')}}</span>
  12. </div>
  13. </div>
  14. <div class="rule">
  15. <div>使用规则</div>
  16. <pre style="white-space: pre-wrap;word-wrap: break-word;">{{info.Share.CardUseInstruction}}</pre>
  17. </div>
  18. <div class="line">
  19. <img :src="Artboard" alt="" width="100%">
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import Artboard from '../../../common/icon/Artboard.png'
  26. import { createNamespacedHelpers } from 'vuex'
  27. const { mapActions: mapCardActions } = createNamespacedHelpers('card')
  28. export default {
  29. data () {
  30. return {
  31. msg: '',
  32. Artboard,
  33. time: '2018年3月17日',
  34. info: null,
  35. }
  36. },
  37. created () {
  38. this.getCardInfo({ id: this.$route.query.id }).then((res) => {
  39. console.log(JSON.stringify(res))
  40. this.info = res
  41. })
  42. },
  43. methods: {
  44. ...mapCardActions(['getCardInfo'])
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. @import 'page.scss';
  50. </style>