StepOne.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <div class="step-one">
  3. <div class="ptc-block">
  4. <p class="ptc-label">Choose a version</p>
  5. <PtcRadioGroup v-model="state.product" style="display: flex">
  6. <PtcRadio class="version" value="lite">
  7. <i class="icon-lite"></i>
  8. <span class="mt18">Lite</span>
  9. </PtcRadio>
  10. <PtcRadio class="version" value="pro">
  11. <i class="icon-pro"></i>
  12. <span class="mt18">Pro</span>
  13. </PtcRadio>
  14. </PtcRadioGroup>
  15. <div class="version-desc" :class="{ pro: state.product === 'pro' }">
  16. Introduction of member products,Introduction of member products
  17. </div>
  18. </div>
  19. <div class="ptc-block">
  20. <p class="ptc-label">Choose a subscription method</p>
  21. <PtcRadioGroup v-model="state.type">
  22. <PtcRadio class="method" :value="1">
  23. <span class="cost">$99</span>
  24. <span class="name">Annual</span>
  25. <span class="ptc-tag">-25% OFF</span>
  26. </PtcRadio>
  27. <PtcRadio class="method" :value="2">
  28. <span class="cost">$12.5</span>
  29. <span class="name"> Monthly&nbsp; Activation fee $20</span>
  30. </PtcRadio>
  31. </PtcRadioGroup>
  32. </div>
  33. <div class="ptc-block">
  34. <p class="ptc-label">Do you have a discount code?</p>
  35. <div v-if="!showCoupon" class="input-wrap pr">
  36. <input
  37. v-model="state.couponCode"
  38. class="ptc-input"
  39. placeholder="Enter promotional code"
  40. />
  41. <button class="input-btn" @click="showCoupon = true">sbumit</button>
  42. </div>
  43. <div v-else class="coupon-wrap">
  44. <div class="coupon">
  45. <p class="p1">PTC CARE PLUS</p>
  46. <p class="p2">NEWCOMER DISCOUNT</p>
  47. <p class="p3">- $10</p>
  48. </div>
  49. <div class="action">
  50. <span class="code">87889122</span>
  51. <span class="ptc-text" @click="showCoupon = false">Revise</span>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="total">
  56. <p>total<strong>$99</strong></p>
  57. <p class="highlight">($10 discounted)</p>
  58. </div>
  59. <button class="ptc-button block-button">NEXT</button>
  60. </div>
  61. </template>
  62. <script setup lang="ts">
  63. import { ref } from 'vue'
  64. import { PtcRadioGroup, PtcRadio } from '@/components/radio'
  65. import { state } from './store'
  66. const showCoupon = ref(false)
  67. </script>
  68. <style lang="scss" scoped>
  69. .version {
  70. display: flex;
  71. flex-direction: column;
  72. justify-content: center;
  73. align-items: center;
  74. margin-right: 64px;
  75. width: 212px;
  76. height: 212px;
  77. font-size: 56px;
  78. font-weight: bold;
  79. .mt18 {
  80. margin-top: 18px;
  81. }
  82. &-desc {
  83. position: relative;
  84. margin-top: 32px;
  85. padding: 28px 24px;
  86. line-height: 40px;
  87. font-size: 28px;
  88. color: #193059;
  89. background: #f2f5fb;
  90. &::before {
  91. content: '';
  92. position: absolute;
  93. left: 88px;
  94. top: 0;
  95. transform: translateY(-100%);
  96. border-style: solid;
  97. border-width: 0 12px 14px;
  98. border-color: #f2f5fb transparent;
  99. }
  100. &.pro::before {
  101. left: 88px + 276px;
  102. }
  103. }
  104. }
  105. .method {
  106. display: flex;
  107. align-items: center;
  108. padding: 0 38px;
  109. height: 130px;
  110. + .method {
  111. margin-top: 48px;
  112. }
  113. .cost {
  114. font-size: 56px;
  115. font-weight: bold;
  116. }
  117. .name {
  118. margin-left: 20px;
  119. font-size: 32px;
  120. }
  121. }
  122. .ptc-input {
  123. padding-right: 154px;
  124. }
  125. .input-btn {
  126. position: absolute;
  127. top: 0;
  128. right: 0;
  129. height: 100%;
  130. width: 154px;
  131. background: #1a3059;
  132. border-radius: 0px 8px 8px 0px;
  133. color: #fff;
  134. font-size: 32px;
  135. &:active {
  136. background: $primary-color-lighten;
  137. }
  138. }
  139. .total {
  140. margin-bottom: 48px;
  141. padding-left: 36px;
  142. font-size: 32px;
  143. color: #333;
  144. strong {
  145. margin-left: 8px;
  146. font-size: 40px;
  147. }
  148. }
  149. .block-button {
  150. display: block;
  151. margin: auto;
  152. width: 678px;
  153. }
  154. .coupon {
  155. @include icon('@img/coupon-s.png', 488px, 224px);
  156. margin-bottom: 48px;
  157. padding-top: 22px;
  158. text-align: center;
  159. font-size: 28px;
  160. font-weight: bold;
  161. .p1 {
  162. color: #9aa8c5;
  163. }
  164. .p2 {
  165. margin: 16px 0 34px;
  166. color: $primary-color;
  167. }
  168. .p3 {
  169. font-size: 56px;
  170. color: $primary-color;
  171. }
  172. }
  173. .action {
  174. font-size: 32px;
  175. color: #666;
  176. .code {
  177. margin-right: 64px;
  178. }
  179. }
  180. .highlight {
  181. margin-top: 4px;
  182. color: $danger-color;
  183. }
  184. </style>