detail.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <!-- 详情页 -->
  2. <template>
  3. <view class="detail">
  4. <!-- 三大套餐对比 -->
  5. <view class="menu_tmps">
  6. <view class="tips">
  7. <view class="tips-title">
  8. <text class="title-text">三大套餐所有内容对比</text>
  9. <image :src="lineBg" class="line" mode="widthFix"></image>
  10. </view>
  11. </view>
  12. <view class="menu_table">
  13. <view class="table-prop flex jcsb aic">
  14. <view class="table-prop-item">内容板块</view>
  15. <view v-for="item in tabLists" :key="item" class="table-prop-item">{{ item }}</view>
  16. </view>
  17. <view v-for="(item, index) in configs" :key="index" class="table-item">
  18. <view class="table-title flex aic jcsb">
  19. <text class="ttitle">{{ item.name }}</text>
  20. <view class="cutout flex aic" @click="item.flag = !item.flag">
  21. <text>{{ item.flag ? '展开' : '收起' }}</text>
  22. <image :src="item.flag ? more_mindown : more_minup"></image>
  23. </view>
  24. </view>
  25. <view v-if="!item.flag" v-for="(items, indexs) in item.data" :key="indexs" class="table-content">
  26. <view class="row flex aic jcsb">
  27. <view class="row_name">
  28. <text>{{ items.name }}</text>
  29. </view>
  30. <view v-for="(itm, inx) in items.data" :key="inx" class="row_value">
  31. <image v-if="!itm || itm == ''" :src="emptyImg" class="row_empty"></image>
  32. <text v-else>{{ itm }}</text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import { home } from '@/apis/index'
  43. export default {
  44. data() {
  45. return {
  46. lineBg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_line.png',
  47. emptyImg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_empty.png',
  48. tabLists: [],
  49. packagesEntity: [],
  50. configs: [],
  51. type: "",
  52. more_minup: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_more_minup.png',
  53. more_mindown: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_more_mindown.png',
  54. };
  55. },
  56. onLoad(options) {
  57. if (options.type) this.type = options.type
  58. this.getData()
  59. },
  60. methods: {
  61. // 获取列表
  62. getData() {
  63. home({ type: this.type }).then(res => {
  64. this.tabLists = res.packages
  65. this.configs = res.configs
  66. })
  67. },
  68. },
  69. }
  70. </script>
  71. <style lang='scss' scoped>
  72. .detail {
  73. width: 100%;
  74. // min-height: 100vh;
  75. background-color: #0D121A;
  76. // position: absolute;
  77. // top: 0;
  78. // bottom: 0;
  79. display: flex;
  80. flex-direction: column;
  81. padding: 96rpx 24rpx 24rpx;
  82. }
  83. .tips {
  84. display: flex;
  85. flex-direction: column;
  86. justify-content: center;
  87. align-items: center;
  88. .tips-title {
  89. display: flex;
  90. flex-direction: column;
  91. align-items: flex-end;
  92. .title-text {
  93. font-weight: bold;
  94. font-size: 40rpx;
  95. color: transparent;
  96. background: linear-gradient(54.35820730218651deg, #00C1FF 0%, #2FFFFC 100%);
  97. -webkit-background-clip: text;
  98. }
  99. .line {
  100. width: 112rpx;
  101. }
  102. }
  103. .tips-content {
  104. font-size: 32rpx;
  105. color: #F8FAFF;
  106. margin-top: 28rpx;
  107. .cantant {
  108. font-weight: 400;
  109. font-size: 32rpx;
  110. color: #00ECFF;
  111. background: linear-gradient(54.35820730218651deg, #00C1FF 0%, #2FFFFC 100%);
  112. -webkit-background-clip: text;
  113. text-decoration: underline;
  114. margin-left: 8rpx;
  115. }
  116. }
  117. }
  118. .menu_tmps {
  119. width: 100%;
  120. .menu_table {
  121. background: linear-gradient(180deg, rgba(9, 155, 255, 0.12) 0%, rgba(66, 121, 192, 0.08) 100%);
  122. border-radius: 24rpx;
  123. border: 2rpx solid #003849;
  124. margin-top: 48rpx;
  125. .table-prop {
  126. padding: 36rpx 40rpx;
  127. color: #F8FAFF;
  128. font-size: 24rpx;
  129. border-bottom: #1D3A4A 2rpx solid;
  130. }
  131. .table-item {
  132. padding: 40rpx;
  133. font-size: 24rpx;
  134. border-bottom: #1D3A4A 2rpx solid;
  135. .table-title {
  136. .ttitle {
  137. background: linear-gradient(311.670791165708deg, #00C1FF 0%, #2FFFFC 100%);
  138. -webkit-background-clip: text;
  139. color: transparent;
  140. }
  141. .cutout {
  142. text {
  143. background: linear-gradient(54.35820730218651deg, #00C1FF 0%, #2FFFFC 100%);
  144. -webkit-background-clip: text;
  145. color: transparent;
  146. }
  147. image {
  148. width: 32rpx;
  149. height: 32rpx;
  150. margin-left: 8rpx;
  151. }
  152. }
  153. }
  154. .table-content {
  155. margin-top: 40rpx;
  156. color: #FFFFFF;
  157. .row {
  158. margin-top: 40rpx;
  159. width: 100%;
  160. .row_name {
  161. white-space: nowrap;
  162. width: 15%;
  163. display: flex;
  164. flex-direction: column;
  165. text:nth-child(2) {
  166. font-size: 20rpx;
  167. text-align: center;
  168. }
  169. }
  170. .row_value {
  171. width: 15%;
  172. text-align: center;
  173. display: flex;
  174. justify-content: center;
  175. }
  176. .row_empty {
  177. width: 32rpx;
  178. height: 32rpx;
  179. }
  180. }
  181. .row:nth-child(1) {
  182. margin-top: 0;
  183. }
  184. }
  185. }
  186. .table-item:last-child {
  187. border: none;
  188. }
  189. }
  190. }
  191. </style>