index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <div v-if="info" class="p-benefits bg-gray">
  3. <h3 class="ptc-title">Member benefits</h3>
  4. <div class="ptc-block">
  5. <div class="ptc-inner">
  6. <div class="l1">
  7. <i class="icon-lite"></i
  8. ><strong class="primary">{{ info.product_name }}</strong
  9. >{{ info.start_time }} to {{ info.end_time }}
  10. </div>
  11. <p class="l2">{{ info.phone_info }}</p>
  12. <p class="l3">{{ info.phone_imei }}</p>
  13. <p class="l4">
  14. <button class="ptc-button ptc-button--stroke">Renewal</button>
  15. </p>
  16. <p class="l5" @click="$router.push('/renewal')">Renewal management ></p>
  17. </div>
  18. </div>
  19. <div class="ptc-block">
  20. <div class="ptc-inner">
  21. <!-- <div
  22. v-for="(item, index) of info.rights"
  23. :key="index"
  24. class="benefit"
  25. :style="{ backgroundImage: `url(${item.icon})` }"
  26. >
  27. <p class="benefit-name">{{ info.title }}</p>
  28. <p class="benefit-desc">Avaliable 1</p>
  29. <p class="benefit-sup">
  30. Member price:<span class="highlight">$35</span>
  31. </p>
  32. <button v-if="info.button_type" class="ptc-button">
  33. {{ info.button_name }}
  34. </button>
  35. </div> -->
  36. <div class="benefit benefit-b">
  37. <p class="benefit-name">Phone Health Inspection Service</p>
  38. <p class="benefit-desc">Avaliable 1</p>
  39. <p class="benefit-sup">Available after 2021/06/01</p>
  40. <button class="ptc-button">Nearby shops</button>
  41. </div>
  42. <div class="benefit benefit-c">
  43. <p class="benefit-name">Technical Support</p>
  44. <p class="benefit-desc">Available throughout the year</p>
  45. <button class="ptc-button">Contact us</button>
  46. </div>
  47. <div class="benefit benefit-d">
  48. <p class="benefit-name">Birthday Gift</p>
  49. <p class="benefit-desc">
  50. Pick up at the store in the month of your birthday, you can only
  51. enjoy it once
  52. </p>
  53. </div>
  54. <div class="benefit benefit-e">
  55. <p class="benefit-name">Cleaning Kit</p>
  56. <p class="benefit-desc">Give a gift of XX</p>
  57. <button
  58. class="ptc-button"
  59. @click="
  60. $router.push({
  61. path: '/mailing',
  62. query: { right_id: 6, right_name: 'Cleaning Kit' },
  63. })
  64. "
  65. >
  66. Send to me
  67. </button>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </template>
  73. <script>
  74. import { defineComponent } from 'vue'
  75. import { getOrderInfo } from '@/service/order'
  76. export default defineComponent({
  77. name: 'OrderDetail',
  78. async beforeRouteEnter(to, from, next) {
  79. const { results } = await getOrderInfo(to.params.id)
  80. next(vm => (vm.info = results))
  81. },
  82. data() {
  83. return {
  84. /** @type {any} */
  85. info: null,
  86. }
  87. },
  88. })
  89. </script>
  90. <style lang="scss">
  91. .p-benefits {
  92. .l1 {
  93. display: flex;
  94. font-size: 28px;
  95. color: #90a0c0;
  96. strong {
  97. margin: 0 20px 0 10px;
  98. }
  99. }
  100. .l2 {
  101. margin-top: 48px;
  102. line-height: 56px;
  103. font-size: 40px;
  104. font-weight: bold;
  105. color: #333;
  106. text-align: center;
  107. }
  108. .l3 {
  109. margin-top: 8px;
  110. line-height: 40px;
  111. font-size: 28px;
  112. color: #999;
  113. text-align: center;
  114. }
  115. .l4 {
  116. margin: 64px 0 24px;
  117. font-size: 0;
  118. text-align: center;
  119. button {
  120. margin: auto;
  121. width: 412px;
  122. height: 68px;
  123. font-size: 32px;
  124. }
  125. }
  126. .l5 {
  127. line-height: 44px;
  128. font-weight: bold;
  129. font-size: 32px;
  130. color: $primary-color;
  131. text-align: center;
  132. }
  133. .benefit {
  134. padding-left: 100px;
  135. padding-bottom: 46px;
  136. background-repeat: no-repeat;
  137. background-position: 0 0;
  138. background-size: 64px 64px;
  139. &-a {
  140. background-image: url(@img/benefit0.png);
  141. }
  142. &-b {
  143. background-image: url(@img/benefit1.png);
  144. }
  145. &-c {
  146. background-image: url(@img/benefit2.png);
  147. }
  148. &-d {
  149. background-image: url(@img/benefit3.png);
  150. }
  151. &-e {
  152. background-image: url(@img/benefit4.png);
  153. }
  154. + .benefit {
  155. padding-top: 48px;
  156. background-position: 0 48px;
  157. @include thin-border(top);
  158. }
  159. &-name {
  160. line-height: 56px;
  161. font-size: 40px;
  162. font-weight: bold;
  163. color: #1a1a1a;
  164. }
  165. &-desc {
  166. margin-top: 24px;
  167. line-height: 44px;
  168. font-size: 32px;
  169. color: #1a1a1a;
  170. }
  171. &-sup {
  172. margin-top: 8px;
  173. line-height: 44px;
  174. font-size: 32px;
  175. color: #999;
  176. }
  177. .ptc-button {
  178. margin-top: 24px;
  179. width: 248px;
  180. height: 68px;
  181. font-size: 32px;
  182. }
  183. }
  184. }
  185. </style>